Remove --version from subcommands (#13108)

Supersedes https://github.com/astral-sh/uv/pull/12439 — does not use the
Clap macro so we retain control over the messages
Closes #12431

https://github.com/astral-sh/uv/pull/13108/commits/0077a67b34d22071dcfd42c9281c6929658bb7f9
pulls `uv run` and `uv tool run` test changes from
https://github.com/astral-sh/uv/pull/12439
This commit is contained in:
Zanie Blue
2025-04-28 10:43:29 -05:00
parent b6df755c9b
commit 60a164abbb
6 changed files with 66 additions and 145 deletions
-80
View File
@@ -481,8 +481,6 @@ uv run [OPTIONS] [COMMAND]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-run--version"><a href="#uv-run--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd><dt id="uv-run--with"><a href="#uv-run--with"><code>--with</code></a> <i>with</i></dt><dd><p>Run with the given packages installed.</p>
<p>When used in a project, these dependencies will be layered on top of the project environment in a separate, ephemeral environment. These dependencies are allowed to conflict with those specified by the project.</p>
@@ -733,8 +731,6 @@ uv init [OPTIONS] [PATH]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-init--version"><a href="#uv-init--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv add
@@ -1116,8 +1112,6 @@ uv add [OPTIONS] <PACKAGES|--requirements <REQUIREMENTS>>
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-add--version"><a href="#uv-add--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv remove
@@ -1464,8 +1458,6 @@ uv remove [OPTIONS] <PACKAGES>...
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-remove--version"><a href="#uv-remove--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv sync
@@ -1890,8 +1882,6 @@ uv sync [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-sync--version"><a href="#uv-sync--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv lock
@@ -2208,8 +2198,6 @@ uv lock [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-lock--version"><a href="#uv-lock--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv export
@@ -2617,8 +2605,6 @@ uv export [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-export--version"><a href="#uv-export--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv tree
@@ -3061,8 +3047,6 @@ uv tree [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-tree--version"><a href="#uv-tree--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv tool
@@ -3435,8 +3419,6 @@ uv tool run [OPTIONS] [COMMAND]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-tool-run--version"><a href="#uv-tool-run--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd><dt id="uv-tool-run--with"><a href="#uv-tool-run--with"><code>--with</code></a> <i>with</i></dt><dd><p>Run with the given packages installed</p>
</dd><dt id="uv-tool-run--with-editable"><a href="#uv-tool-run--with-editable"><code>--with-editable</code></a> <i>with-editable</i></dt><dd><p>Run with the given packages installed in editable mode</p>
@@ -3777,8 +3759,6 @@ uv tool install [OPTIONS] <PACKAGE>
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-tool-install--version"><a href="#uv-tool-install--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd><dt id="uv-tool-install--with"><a href="#uv-tool-install--with"><code>--with</code></a> <i>with</i></dt><dd><p>Include the following extra requirements</p>
</dd><dt id="uv-tool-install--with-editable"><a href="#uv-tool-install--with-editable"><code>--with-editable</code></a> <i>with-editable</i></dt><dd><p>Include the given packages in editable mode</p>
@@ -4086,8 +4066,6 @@ uv tool upgrade [OPTIONS] <NAME>...
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-tool-upgrade--version"><a href="#uv-tool-upgrade--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv tool list
@@ -4202,8 +4180,6 @@ uv tool list [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-tool-list--version"><a href="#uv-tool-list--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv tool uninstall
@@ -4324,8 +4300,6 @@ uv tool uninstall [OPTIONS] <NAME>...
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-tool-uninstall--version"><a href="#uv-tool-uninstall--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv tool update-shell
@@ -4444,8 +4418,6 @@ uv tool update-shell [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-tool-update-shell--version"><a href="#uv-tool-update-shell--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv tool dir
@@ -4582,8 +4554,6 @@ uv tool dir [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-tool-dir--version"><a href="#uv-tool-dir--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv python
@@ -4812,8 +4782,6 @@ uv python list [OPTIONS] [REQUEST]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-python-list--version"><a href="#uv-python-list--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv python install
@@ -4985,8 +4953,6 @@ uv python install [OPTIONS] [TARGETS]...
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-python-install--version"><a href="#uv-python-install--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv python find
@@ -5126,8 +5092,6 @@ uv python find [OPTIONS] [REQUEST]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-python-find--version"><a href="#uv-python-find--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv python pin
@@ -5276,8 +5240,6 @@ uv python pin [OPTIONS] [REQUEST]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-python-pin--version"><a href="#uv-python-pin--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv python dir
@@ -5412,8 +5374,6 @@ uv python dir [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-python-dir--version"><a href="#uv-python-dir--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv python uninstall
@@ -5539,8 +5499,6 @@ uv python uninstall [OPTIONS] <TARGETS>...
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-python-uninstall--version"><a href="#uv-python-uninstall--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv pip
@@ -6137,8 +6095,6 @@ uv pip compile [OPTIONS] <SRC_FILE|--group <GROUP>>
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-pip-compile--version"><a href="#uv-pip-compile--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv pip sync
@@ -6604,8 +6560,6 @@ uv pip sync [OPTIONS] <SRC_FILE>...
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-pip-sync--version"><a href="#uv-pip-sync--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv pip install
@@ -7157,8 +7111,6 @@ uv pip install [OPTIONS] <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDIT
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-pip-install--version"><a href="#uv-pip-install--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv pip uninstall
@@ -7318,8 +7270,6 @@ uv pip uninstall [OPTIONS] <PACKAGE|--requirements <REQUIREMENTS>>
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-pip-uninstall--version"><a href="#uv-pip-uninstall--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv pip freeze
@@ -7452,8 +7402,6 @@ uv pip freeze [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-pip-freeze--version"><a href="#uv-pip-freeze--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv pip list
@@ -7674,8 +7622,6 @@ uv pip list [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-pip-list--version"><a href="#uv-pip-list--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv pip show
@@ -7812,8 +7758,6 @@ uv pip show [OPTIONS] [PACKAGE]...
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-pip-show--version"><a href="#uv-pip-show--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv pip tree
@@ -8027,8 +7971,6 @@ uv pip tree [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-pip-tree--version"><a href="#uv-pip-tree--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv pip check
@@ -8155,8 +8097,6 @@ uv pip check [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-pip-check--version"><a href="#uv-pip-check--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv venv
@@ -8419,8 +8359,6 @@ uv venv [OPTIONS] [PATH]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-venv--version"><a href="#uv-venv--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv build
@@ -8774,8 +8712,6 @@ uv build [OPTIONS] [SRC]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-build--version"><a href="#uv-build--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd><dt id="uv-build--wheel"><a href="#uv-build--wheel"><code>--wheel</code></a></dt><dd><p>Build a binary distribution (&quot;wheel&quot;) from the given directory</p>
</dd></dl>
@@ -8971,8 +8907,6 @@ uv publish --publish-url https://upload.pypi.org/legacy/ --check-url https://pyp
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-publish--version"><a href="#uv-publish--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv cache
@@ -9111,8 +9045,6 @@ uv cache clean [OPTIONS] [PACKAGE]...
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-cache-clean--version"><a href="#uv-cache-clean--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv cache prune
@@ -9231,8 +9163,6 @@ uv cache prune [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-cache-prune--version"><a href="#uv-cache-prune--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv cache dir
@@ -9353,8 +9283,6 @@ uv cache dir [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-cache-dir--version"><a href="#uv-cache-dir--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv self
@@ -9494,8 +9422,6 @@ uv self update [OPTIONS] [TARGET_VERSION]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-self-update--version"><a href="#uv-self-update--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
### uv self version
@@ -9610,8 +9536,6 @@ uv self version [OPTIONS]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-self-version--version"><a href="#uv-self-version--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv version
@@ -9751,8 +9675,6 @@ uv version [OPTIONS] [VALUE]
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-version--version"><a href="#uv-version--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>
## uv generate-shell-completion
@@ -9927,7 +9849,5 @@ uv help [OPTIONS] [COMMAND]...
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>
</dd><dt id="uv-help--version"><a href="#uv-help--version"><code>--version</code></a>, <code>-V</code></dt><dd><p>Display the uv version</p>
</dd></dl>