Skip to content

Commit

Permalink
Add ls alias to uv {tool, python, pip} list (#10240)
Browse files Browse the repository at this point in the history
## Summary

This PR adds `ls` alias to `uv {tool, python, pip} list` for
convenience.

Not sure if folks previously discussed this or have any opinion on
having aliases – but I have a muscle memory for `ls` for listing things
in commands I'm using (like `docker images ls`, `zellij ls`, `helm ls`
etc.) and thought having `ls` alias for `list` command would be useful.

## Test Plan

I simply compiled `uv` and manually checked `./target/release/uv {tool,
python, pip} ls`.
  • Loading branch information
unexge authored Jan 8, 2025
1 parent 68bfa5b commit 391ab75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,8 @@ pub enum PipCommand {
/// List, in tabular format, packages installed in an environment.
#[command(
after_help = "Use `uv help pip list` for more details.",
after_long_help = ""
after_long_help = "",
alias = "ls"
)]
List(PipListArgs),
/// Show information about one or more installed packages.
Expand Down Expand Up @@ -3724,6 +3725,7 @@ pub enum ToolCommand {
#[command(alias = "update")]
Upgrade(ToolUpgradeArgs),
/// List installed tools.
#[command(alias = "ls")]
List(ToolListArgs),
/// Uninstall a tool.
Uninstall(ToolUninstallArgs),
Expand Down Expand Up @@ -4203,6 +4205,7 @@ pub enum PythonCommand {
/// Use `--all-versions` to view all available patch versions.
///
/// Use `--only-installed` to omit available downloads.
#[command(alias = "ls")]
List(PythonListArgs),

/// Download and install Python versions.
Expand Down

0 comments on commit 391ab75

Please sign in to comment.