mirror of https://github.com/astral-sh/uv
Show file extensions on available commands when not `.exe` (#9099)
Closes https://github.com/astral-sh/uv/issues/8770
This commit is contained in:
parent
57ff5330fc
commit
50cfbd904c
|
|
@ -897,7 +897,11 @@ pub(crate) async fn run(
|
||||||
.map(|entry| entry.path())
|
.map(|entry| entry.path())
|
||||||
.filter(|path| is_executable(path))
|
.filter(|path| is_executable(path))
|
||||||
.map(|path| {
|
.map(|path| {
|
||||||
if cfg!(windows) {
|
if cfg!(windows)
|
||||||
|
&& path
|
||||||
|
.extension()
|
||||||
|
.is_some_and(|exe| exe == std::env::consts::EXE_EXTENSION)
|
||||||
|
{
|
||||||
// Remove the extensions.
|
// Remove the extensions.
|
||||||
path.with_extension("")
|
path.with_extension("")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ fn run_no_args() -> Result<()> {
|
||||||
|
|
||||||
The following commands are available in the environment:
|
The following commands are available in the environment:
|
||||||
|
|
||||||
- pydoc
|
- pydoc.bat
|
||||||
- python
|
- python
|
||||||
- pythonw
|
- pythonw
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue