mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
feature: shorthand for --with (-w) in uvx and uv tool run (#14530)
<!-- 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 This is a small quality of life feature that adds a shorthand (`-w`) to the `--with` flag for minimizing keystrokes. Pretty minor, but I didn't see any conflicts with `-w` and thought this could be a nice place for it. ```bash # proposed addition (short) uvx -w numpy ipython # original (long) uvx --with numpy ipython ``` ## Test Plan Added testing already in the P.R. - just copied over tests from the `--with` flag <!-- How was it tested? -->
This commit is contained in:
parent
b0348ee2a9
commit
43dbdba578
4 changed files with 76 additions and 6 deletions
|
@ -200,6 +200,12 @@ The `--with` option supports package specifications, so a specific version can b
|
|||
$ uvx --with <extra-package>==<version> <tool-package>
|
||||
```
|
||||
|
||||
The `-w` shorthand can be used in place of the `--with` option:
|
||||
|
||||
```console
|
||||
$ uvx -w <extra-package> <tool-package>
|
||||
```
|
||||
|
||||
If the requested version conflicts with the requirements of the tool package, package resolution
|
||||
will fail and the command will error.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue