From a6416aa4508d58781f6852b7d2f4872f0dcb7f04 Mon Sep 17 00:00:00 2001 From: Ahmed Ilyas Date: Fri, 2 Aug 2024 14:35:33 +0200 Subject: [PATCH] Fix CLI reference URLs to subcommands (#5722) ## Summary Currently all of these links end up 404-ed. I've added a `#` to fix the URLs. Screenshot 2024-08-02 at 12 34 22 ## Test Plan Checked manually. --- crates/uv-dev/src/generate_cli_reference.rs | 2 +- docs/reference/cli.md | 76 ++++++++++----------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/crates/uv-dev/src/generate_cli_reference.rs b/crates/uv-dev/src/generate_cli_reference.rs index d01d64657..5dfcfe75e 100644 --- a/crates/uv-dev/src/generate_cli_reference.rs +++ b/crates/uv-dev/src/generate_cli_reference.rs @@ -143,7 +143,7 @@ fn generate_command<'a>(output: &mut String, command: &'a Command, parents: &mut } let subcommand_name = format!("{name} {}", subcommand.get_name()); output.push_str(&format!( - "
{subcommand_name}
", + "
{subcommand_name}
", subcommand_name.replace(' ', "-") )); if let Some(about) = subcommand.get_about() { diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 09b664025..55979ea40 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -12,33 +12,33 @@ uv [OPTIONS]

Commands

-
uv pip

Manage Python packages with a pip-compatible interface

+
uv pip

Manage Python packages with a pip-compatible interface

-
uv tool

Run and manage tools provided by Python packages (experimental)

+
uv tool

Run and manage tools provided by Python packages (experimental)

-
uv python

Manage Python versions and installations (experimental)

+
uv python

Manage Python versions and installations (experimental)

-
uv init

Create a new project (experimental)

+
uv init

Create a new project (experimental)

-
uv run

Run a command in an environment (experimental)

+
uv run

Run a command in an environment (experimental)

-
uv sync

Update the project’s environment to match the project’s dependencies (experimental)

+
uv sync

Update the project’s environment to match the project’s dependencies (experimental)

-
uv lock

Create or update a lockfile for the project’s dependencies (experimental)

+
uv lock

Create or update a lockfile for the project’s dependencies (experimental)

-
uv add

Add one or more packages to the project’s dependencies (experimental)

+
uv add

Add one or more packages to the project’s dependencies (experimental)

-
uv remove

Remove one or more packages from the project’s dependencies (experimental)

+
uv remove

Remove one or more packages from the project’s dependencies (experimental)

-
uv tree

Display the dependency tree for the project (experimental)

+
uv tree

Display the dependency tree for the project (experimental)

-
uv venv

Create a virtual environment

+
uv venv

Create a virtual environment

-
uv cache

Manage the cache

+
uv cache

Manage the cache

-
uv version

Display uv’s version

+
uv version

Display uv’s version

-
uv help

Display documentation for a command

+
uv help

Display documentation for a command

@@ -54,23 +54,23 @@ uv pip [OPTIONS]

Commands

-
uv pip compile

Compile a requirements.in file to a requirements.txt file

+
uv pip compile

Compile a requirements.in file to a requirements.txt file

-
uv pip sync

Sync an environment with a requirements.txt file

+
uv pip sync

Sync an environment with a requirements.txt file

-
uv pip install

Install packages into an environment

+
uv pip install

Install packages into an environment

-
uv pip uninstall

Uninstall packages from an environment

+
uv pip uninstall

Uninstall packages from an environment

-
uv pip freeze

List, in requirements format, packages installed in an environment

+
uv pip freeze

List, in requirements format, packages installed in an environment

-
uv pip list

List, in tabular format, packages installed in an environment

+
uv pip list

List, in tabular format, packages installed in an environment

-
uv pip show

Show information about one or more installed packages

+
uv pip show

Show information about one or more installed packages

-
uv pip tree

Display the dependency tree for an environment

+
uv pip tree

Display the dependency tree for an environment

-
uv pip check

Verify installed packages have compatible dependencies

+
uv pip check

Verify installed packages have compatible dependencies

@@ -800,17 +800,17 @@ uv tool [OPTIONS]

Commands

-
uv tool run

Run a tool

+
uv tool run

Run a tool

-
uv tool install

Install a tool

+
uv tool install

Install a tool

-
uv tool list

List installed tools

+
uv tool list

List installed tools

-
uv tool uninstall

Uninstall a tool

+
uv tool uninstall

Uninstall a tool

-
uv tool update-shell

Ensure that the tool executable directory is on PATH

+
uv tool update-shell

Ensure that the tool executable directory is on PATH

-
uv tool dir

Show the tools directory

+
uv tool dir

Show the tools directory

@@ -1146,17 +1146,17 @@ uv python [OPTIONS]

Commands

-
uv python list

List the available Python installations

+
uv python list

List the available Python installations

-
uv python install

Download and install Python versions

+
uv python install

Download and install Python versions

-
uv python find

Search for a Python installation

+
uv python find

Search for a Python installation

-
uv python pin

Pin to a specific Python version

+
uv python pin

Pin to a specific Python version

-
uv python dir

Show the uv Python installation directory

+
uv python dir

Show the uv Python installation directory

-
uv python uninstall

Uninstall Python versions

+
uv python uninstall

Uninstall Python versions

@@ -2130,11 +2130,11 @@ uv cache [OPTIONS]

Commands

-
uv cache clean

Clear the cache, removing all entries or those linked to specific packages

+
uv cache clean

Clear the cache, removing all entries or those linked to specific packages

-
uv cache prune

Prune all unreachable objects from the cache

+
uv cache prune

Prune all unreachable objects from the cache

-
uv cache dir

Show the cache directory

+
uv cache dir

Show the cache directory