Python segment should check for the py
launcher on Windows and display the version it runs
#4923
Closed
1 task done
Labels
🚀 feat
New feature
Code of Conduct
What would you like to see changed/added?
On Windows, the default Python installation does not put
python.exe
onPATH
, but instead installs the Python launcherpy.exe
. This runs Python for the user, handling the job of finding the latest Python version installed.When using the "python" segment with no virtual environment active, it shows "NO VERSION" in this situation, which is technically accurate (running the command
python
won't work) but not actually useful (I want to know what version thepy
command will run).Could this segment be updated to fall back to checking if
py.exe
is onPATH
, and if so, reporting the Python version that it will run?Alternatively, could the segment add a configuration to set the list of Python executables to check? This is what
starship
does, and I set it to look for["python", "py"]
- which gives the result I want.The text was updated successfully, but these errors were encountered: