Extends https://github.com/astral-sh/uv/pull/13841 — I'll drop that
commit later after that pull request merges but it's small.
I find the split into a "Configuration" section awkward and don't think
it's helping us. Everything moved into the "Concepts" section, except
the "Environment variables" page which definitely belongs in the
reference and the "Installer" page which is fairly niche and seems
better in the reference.
Before / After
<img
src="https://github.com/user-attachments/assets/80d8304b-17da-4900-a5f4-c3ccac96fcc5"
width="400">
## Summary
I only changed the location of where the fish completions get sent, from
`~/.config/fish/config.fish` to `~/.config/fish/completions/uv.fish` and
`~/.config/fish/completions/uvx.fish` respectively
## Test Plan
I have tested and putting the completions in those paths works fine and
complies with the fish docs. Also keeps your `config.fish` clean
### edit:
refer to
https://fishshell.com/docs/current/completions.html#where-to-put-completions
> This wide search may be confusing. If you are unsure, your completions
probably belong in `~/.config/fish/completions`.
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->
## Summary
- PowerShell isn't Windows-only
- Bash/Elvish isn't UNIX-only
- PowerShell profile won't necessarily exist
- Extracted the `echo $SHELL` tip to a tip tooltip
The new PowerShell lines are taken directly from
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.5#how-to-create-a-profile
Note that the "Standalone installer" commands are unaffected. Running
the Linux one through PowerShell worked just fine.
## Test Plan
Look at the page generated from this PR
<!-- How was it tested? -->
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->
## Summary
Add info about uv being available in Scoop.
## Test Plan
`uvx --with-requirements .\docs\requirements.txt mkdocs serve
--config-file mkdocs.public.yml` worked.
See https://github.com/astral-sh/uv/issues/9871
> The current instructions first mention removing the binaries, and then
mention a suggestion for removing stored data. The recommended data
removal process involves uv commands that will no longer be available if
the binaries are gone 😄.
I've edited the uninstallation docs to first suggest removing stored
data before removing the uv and uvx binaries.
<img
src="https://github.com/user-attachments/assets/526fcdb3-4fd2-4e04-b895-810cb826aa11"
width="600"/>
## 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)"`