add --show-extras to uv tool list to list extra requirements installed with tools (#13783)

## Summary

Implemented as suggested in #13761 

eg.

```
$ uv tool install 'harlequin[postgres]'
$ uv tool list --show-extras
harlequin v2.1.2 [extras: postgres]
- harlequin
```

## Test Plan

Added a new test with the argument along with the others from the `uv
tool list` cli.
This commit is contained in:
Tobias Gårdhus
2025-06-02 16:59:40 +02:00
committed by GitHub
parent 5400434957
commit 459c902425
6 changed files with 145 additions and 2 deletions
+4
View File
@@ -4419,6 +4419,10 @@ pub struct ToolListArgs {
#[arg(long)]
pub show_with: bool,
/// Whether to display the extra requirements installed with each tool.
#[arg(long)]
pub show_extras: bool,
// Hide unused global Python options.
#[arg(long, hide = true)]
pub python_preference: Option<PythonPreference>,