1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-21 11:51:57 +00:00

fix(python): set py alias if py is not installed (#12059)

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
MikuHatsune39 2023-11-24 00:35:46 -08:00 committed by GitHub
parent 76a1dfcf2b
commit ddf673b36d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,7 @@ plugins=(... python)
| Command | Description | | Command | Description |
| ---------------- | -------------------------------------------------------------------------------------- | | ---------------- | -------------------------------------------------------------------------------------- |
| `py` | Runs `python3` | | `py` | Runs `python3`. Only set if `py` is not installed. |
| `ipython` | Runs the appropriate `ipython` version according to the activated virtualenv | | `ipython` | Runs the appropriate `ipython` version according to the activated virtualenv |
| `pyfind` | Finds .py files recursively in the current directory | | `pyfind` | Finds .py files recursively in the current directory |
| `pyclean [dirs]` | Deletes byte-code and cache files from a list of directories or the current one | | `pyclean [dirs]` | Deletes byte-code and cache files from a list of directories or the current one |

View file

@ -1,5 +1,5 @@
# python command # set python command if 'py' not installed
alias py='python3' builtin which py > /dev/null || alias py='python3'
# Find python file # Find python file
alias pyfind='find . -name "*.py"' alias pyfind='find . -name "*.py"'