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 8, 2024
1 parent a6783f7 commit 48ecc60
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 228 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 @@ -52,6 +52,7 @@ fn extra_name_with_clap_error(arg: &str) -> Result<ExtraName> {
#[command(name = "uv", author, version = uv_version::version(), long_version = crate::version::version())]
#[command(about = "An extremely fast Python package manager.")]
#[command(propagate_version = true)]
#[command(disable_help_flag = true)]
#[allow(clippy::struct_excessive_bools)]
pub struct Cli {
#[command(subcommand)]
Expand All @@ -66,6 +67,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
Loading

0 comments on commit 48ecc60

Please sign in to comment.