mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 02:22:19 +00:00
Move uvx shell completion to uvx --generate-shell-completion (#7511)
## Summary Because a problem was found with Powershell and combining the generated completion scripts for uv and uvx, let's try separating uv and uvx command completion scripts. The generated powershell script template can be seen in clap_complete source, and it starts with `using` directives, which makes it impossible (apparently) to concatenate two of those script outputs. As a side effect, this is available under `uv tool run --generate-shell-completion` too. Fixes #7482 ## Test Plan - `eval "$(cargo run --bin uvx -- --generate-shell-completion bash)"` - Test Powershell
This commit is contained in:
parent
99d354b893
commit
7a25a82fc9
5 changed files with 65 additions and 23 deletions
|
@ -3247,6 +3247,9 @@ pub struct ToolRunArgs {
|
|||
/// By default, environment modifications are omitted, but enabled under `--verbose`.
|
||||
#[arg(long, env = "UV_SHOW_RESOLUTION", value_parser = clap::builder::BoolishValueParser::new(), hide = true)]
|
||||
pub show_resolution: bool,
|
||||
|
||||
#[arg(long, hide = true)]
|
||||
pub generate_shell_completion: Option<clap_complete_command::Shell>,
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue