mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-14 08:45:01 +00:00
uv run: List available scripts when a script is not specified (#7687)
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> ## Summary This PR adds the ability to list available scripts in the environment when `uv run` is invoked without any arguments. It somewhat mimics the behavior of `rye run` command (See https://rye.astral.sh/guide/commands/run). This is an attempt to fix #4024. ## Test Plan I added test cases. The CI pipeline should pass. ### Manuel Tests ```shell ❯ uv run Provide a command or script to invoke with `uv run <command>` or `uv run script.py`. The following scripts are available: normalizer python python3 python3.12 See `uv run --help` for more information. ``` --------- Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
parent
282fab5f70
commit
1a39ffe391
12 changed files with 152 additions and 16 deletions
|
@ -37,7 +37,6 @@ mod python_version;
|
|||
mod target;
|
||||
mod version_files;
|
||||
mod virtualenv;
|
||||
mod which;
|
||||
|
||||
#[cfg(not(test))]
|
||||
pub(crate) fn current_dir() -> Result<std::path::PathBuf, std::io::Error> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue