diff --git a/adds-on/src/main.rs b/adds-on/src/main.rs index 4138bcd..f606ea9 100644 --- a/adds-on/src/main.rs +++ b/adds-on/src/main.rs @@ -21,6 +21,7 @@ SPECIAL COMMANDS: → real uv completions + plugins injected shells: bash zsh fish nushell uv __complete → list discovered plugins (used by shell completions) + uv --version, -V → show wrapper version uv --help, -h → show this message ENVIRONMENT: @@ -42,6 +43,9 @@ fn main() { Some("-h") | Some("--help") => { print_help(); } + Some("--version") | Some("-V") => { + println!("uv (plugin wrapper) {}", env!("CARGO_PKG_VERSION")); + } // Dynamic plugin discovery — called by shell completion at tab-press time Some("__complete") => { for plugin in discover_plugins() { diff --git a/src/main.rs b/src/main.rs index 75ce38f..2ee6746 100644 --- a/src/main.rs +++ b/src/main.rs @@ -279,6 +279,7 @@ Options (forwarded to `uv venv`): --no-config Avoid discovering configuration files -q, --quiet Quiet output -v, --verbose Verbose output + -V, --version Show version -h, --help Show this help message All other `uv venv` options are also forwarded. See `uv venv --help` for the full list. @@ -360,6 +361,10 @@ fn main() { // Subcommand dispatch if let Some(first) = user_args.first() { match first.as_str() { + "--version" | "-V" => { + println!("uv-shell {}", env!("CARGO_PKG_VERSION")); + return; + } "anchor" => { let anchor_args = &user_args[1..]; let shell_override = parse_anchor_shell(anchor_args);