## Summary
Adds wget instructions for linux installations that don't come with
`curl`.
## Test Plan
This was tested on Ubuntu 20.04, Ubuntu 22.04, Ubuntu 24.04, and Debian
11.
---------
Co-authored-by: Zanie Blue <contact@zanie.dev>
## 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 is a suggestion that was easy for me to make a PR for; if other
approaches are considered better, feel free to consider this as a FR for
those instead)
I'd feel more comfortable using the installer with the instructions in
this commit, since I'm uncomfortable with random scripts trying to
modify my system config (PATH in this case).
Currently, the installer seems to be the best way to install `uv` that
allows updating it on a system without Homebrew or `pipx`. I hope
somebody will provide similar instructions for Windows.
I considered recommending saving the script to a file and then running
that, but I think it's better to have fewer options in the instructions.
Most people who'd want to save the file would figure it out.
As an aside, I would personally appreciate if `uv` could be installed
easily with `cargo install` or `cargo binstall`, but a friendly script
that acts predictably is probably more useful for more people.
## Test Plan
I tested the command on my machine, but I did not test compiling the
docs (yet). If the CI does not compile the docs, I could test this a bit
later, or perhaps this would be easier for somebody who already has a
dev environment set up.
---------
Co-authored-by: Zanie Blue <contact@zanie.dev>
## Summary
Generate shell completion for uvx.
Create a `uvx` toplevel command just for completion by combining `uv
tool uvx` (hidden alias for `uv tool run`) with global arguments. This
explicit combination is needed otherwise global arguments are missing
(if they are missing, clap debug assertions fail when `uv tool run`
arguments refer to global arguments in directives like conflicts with).
Fixes#7258
## Test Plan
- Tested using bash using `eval "$(cargo run --bin uv
generate-shell-completion bash)"`
I find this more readable; it also no longer requires bash (thought just
replacing `bash` with `sh` would achieve that much).
Strictly speaking, `env` is not necessary on most shells, but I find it
makes things clearer.
## Test Plan
Ran the command locally, did not try compiling the docs.
----------
Aside, loosely related (and hopefully helpful) suggestions:
I'm hoping you will also explain in the docs how to install to
`~/.local/bin`, with the same goal as
https://github.com/astral-sh/uv/pull/6839. Using environment variables
for that is fine.
Another minor FR I'd have is to mention these environment variables in
the help message of the installer script, especially if you want to
encourage people to use them.
Thank you for working on the installation script! It helps me feel more
comfortable about eventually asking that people install `uv` to compile
docs on my project, hopefully helping people who don't have a Python
environment already installed.