argh
argh copied to clipboard
Garbles help text when subcommand follows a positional argument
/// ...
#[derive(argh::FromArgs)]
struct Opts {
#[argh(positional)]
dbpath: PathBuf,
#[argh(subcommand)]
cmd: Cmd,
}
/// Outout entire content of the database to text file, stdout (suitable for migrations)
#[derive(argh::FromArgs)]
#[argh(subcommand, name = "export")]
struct Export {}
/// Import entire content of the database from text file, stdin (suitable for migrations)
#[derive(argh::FromArgs)]
#[argh(subcommand, name = "import")]
struct Import {}
#[derive(argh::FromArgs)]
#[argh(subcommand)]
enum Cmd {
Export(Export),
Import(Import),
}
Required positional arguments not provided:
dbpathOne of the following subcommands must be present:
help
export
import
Also subcommand's help text omits dbpath
, as if the subcommand came immediately after the program's name.