From ab911bae4cdf873b73baea9db6a08c6c96321b5e Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 3 Jul 2024 09:30:52 -0500 Subject: [PATCH] Display short help menu when `--help` is used --- crates/uv-cli/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 7fb7f4d04baa..d274b020ab4a 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -51,6 +51,7 @@ fn extra_name_with_clap_error(arg: &str) -> Result { #[derive(Parser)] #[command(name = "uv", author, version = uv_version::version(), long_version = crate::version::version(), about)] #[command(propagate_version = true)] +#[command(disable_help_flag = true)] #[allow(clippy::struct_excessive_bools)] pub struct Cli { #[command(subcommand)] @@ -65,6 +66,10 @@ pub struct Cli { /// The path to a `uv.toml` file to use for configuration. #[arg(global = true, long, env = "UV_CONFIG_FILE")] pub config_file: Option, + + /// Print help + #[arg(global = true, short, long, action = clap::ArgAction::HelpShort)] + help: Option, } #[derive(Parser, Debug, Clone)]