Skip to content

Commit

Permalink
Display short help menu when --help is used
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Jul 3, 2024
1 parent dcdf26e commit ab911ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ fn extra_name_with_clap_error(arg: &str) -> Result<ExtraName> {
#[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)]
Expand All @@ -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<PathBuf>,

/// Print help
#[arg(global = true, short, long, action = clap::ArgAction::HelpShort)]
help: Option<bool>,
}

#[derive(Parser, Debug, Clone)]
Expand Down

0 comments on commit ab911ba

Please sign in to comment.