diff --git a/crates/uv-dev/src/generate_cli_reference.rs b/crates/uv-dev/src/generate_cli_reference.rs index 8388ad191..04a688472 100644 --- a/crates/uv-dev/src/generate_cli_reference.rs +++ b/crates/uv-dev/src/generate_cli_reference.rs @@ -22,6 +22,8 @@ const REPLACEMENTS: &[(&str, &str)] = &[ ), ]; +const SHOW_HIDDEN_COMMANDS: &[&str] = &["generate-shell-completion"]; + #[derive(clap::Args)] pub(crate) struct Args { /// Write the generated output to stdout (rather than to `settings.md`). @@ -101,7 +103,7 @@ fn generate() -> String { } fn generate_command<'a>(output: &mut String, command: &'a Command, parents: &mut Vec<&'a Command>) { - if command.is_hide_set() { + if command.is_hide_set() && !SHOW_HIDDEN_COMMANDS.contains(&command.get_name()) { return; } diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 5474f3a1f..90cf40aae 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -5694,6 +5694,91 @@ uv version [OPTIONS] +## uv generate-shell-completion + +Generate shell completion + +
SHELL--cache-dir cache-dirPath to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and {FOLDERID_LocalAppData}\uv\cache on Windows.
--color color-choiceControl colors in output
+ +[default: auto]
+Possible values:
+ +auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
--help, -hDisplay the concise help for this command
+ +--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
+ +By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
+ +--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
+ +--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
+ +--no-progressHide all progress outputs.
+ +For example, spinners or progress bars.
+ +--no-python-downloadsDisable automatic downloads of Python
+ +--offlineDisable network access.
+ +When disabled, uv will only use locally cached data and locally available files.
+ +--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
+ +By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
+ +Possible values:
+ +only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
+ +--verbose, -vUse verbose output.
+ +You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
+ +