uv/crates/uv-cache
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
..
src Add value hints to command line arguments to improve shell completion accuracy (#17080) 2025-12-15 18:29:32 +00:00
Cargo.toml Support creating lock files on ExFAT on MacOS (#17115) 2025-12-15 14:05:05 +00:00
README.md Bump version to 0.9.17 (#17058) 2025-12-09 16:36:00 -06:00

README.md

uv-cache

This crate is an internal component of uv. The Rust API exposed here is unstable and will have frequent breaking changes.

This version (0.0.7) is a component of uv 0.9.17. The source can be found here.

See uv's crate versioning policy for details on versioning.