uv/crates/uv-cache/src
Tomasz Kramkowski 94c97b6434
Add value hints to command line arguments to improve shell completion accuracy (#17080)
## Summary

This partially addresses #17076 by adding `value_hint` to various
arguments.

For cases where an option takes a path to either specifically a file or
a directory directory, `ValueHint::FilePath` and `ValueHint::DirPath`
are used respectively to try to limit the amount of noise presented by
completions in shells which support it.

For cases where a URL (and only a URL, not a path) can be supplied,
`ValueHint::Url` is used.

For cases where a python interpreter is to be specified,
`ValueHint::CommandName` is used which will tab complete from `$PATH` by
default, but will fall back to completing executable filenames if you
start typing a path.

Finally, for the many cases where there is no built in completion which
would make sense, and where default completion of a path would make no
sense (e.g. a package name, or version specifier, or date)
`ValueHint::Other` is used to explicitly disable completion.

## Test Plan

Manually tested a bunch of these. These _could_ be automated in the
sense that we could snapshot the completion from zsh but I've not
thought about how that could be done yet.
2025-12-15 18:29:32 +00:00
..
archive.rs Use files instead of junctions on Windows (#11269) 2025-02-13 16:17:49 -06:00
by_timestamp.rs Revert: Include environment variables in interpreter info caching (#11622) 2025-02-19 10:10:21 -06:00
cli.rs Add value hints to command line arguments to improve shell completion accuracy (#17080) 2025-12-15 18:29:32 +00:00
lib.rs Support creating lock files on ExFAT on MacOS (#17115) 2025-12-15 14:05:05 +00:00
removal.rs Make `uv cache clean` parallel process safe (#15888) 2025-09-19 10:21:22 +02:00
wheel.rs Support Git LFS with opt-in (#16143) 2025-12-02 12:23:51 +00:00