argh
argh copied to clipboard
Help subcommand suggested even when disabled
When a subcommand is added to a command such as in the following example
use argh::FromArgs;
#[derive(FromArgs)]
// note that we disable the default `help` subcommand
#[argh(help_triggers("-h", "--help"))]
///
struct Command {
#[argh(subcommand)]
subcommand: Subcommand,
}
#[derive(FromArgs)]
#[argh(subcommand, name = "subcommand")]
///
struct Subcommand {}
fn main() {
let _: Command = argh::from_env();
}
if the command is run without providing a subcommand, the error message is
One of the following subcommands must be present:
help
subcommand
Run command --help for more information.
even though we disabled the help subcommand.
Running command help correctly gives an error message saying unrecognized argument. The problem is only the suggestion to use the help subcommand even if it's not available.
Probably related to #184