cli: remove special case for clap's default "help" subcommand

Since 536c629d "cli: Explicitly add a Help command to accept the early args
after it", "jj help" is a normal subcommand.
This commit is contained in:
Yuya Nishihara 2024-11-02 10:52:18 +09:00
parent f251f08ce7
commit 8e1eb23246

View file

@ -2908,7 +2908,7 @@ fn resolve_default_command(
app: &Command,
mut string_args: Vec<String>,
) -> Result<Vec<String>, CommandError> {
const PRIORITY_FLAGS: &[&str] = &["help", "--help", "-h", "--version", "-V"];
const PRIORITY_FLAGS: &[&str] = &["--help", "-h", "--version", "-V"];
let has_priority_flag = string_args
.iter()
@ -3033,7 +3033,6 @@ fn handle_early_args(
.clone()
.disable_version_flag(true)
.disable_help_flag(true)
.disable_help_subcommand(true)
.ignore_errors(true)
.try_get_matches_from(args)?;
let mut args: EarlyArgs = EarlyArgs::from_arg_matches(&early_matches).unwrap();