summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/python/README.md2
-rw-r--r--plugins/python/python.plugin.zsh4
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/python/README.md b/plugins/python/README.md
index 97c1a34ee..7bf1b34ac 100644
--- a/plugins/python/README.md
+++ b/plugins/python/README.md
@@ -12,7 +12,7 @@ plugins=(... python)
| 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 |
| `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 |
diff --git a/plugins/python/python.plugin.zsh b/plugins/python/python.plugin.zsh
index 2fbb59577..3d7ca55c9 100644
--- a/plugins/python/python.plugin.zsh
+++ b/plugins/python/python.plugin.zsh
@@ -1,5 +1,5 @@
-# python command
-alias py='python3'
+# set python command if 'py' not installed
+builtin which py > /dev/null || alias py='python3'
# Find python file
alias pyfind='find . -name "*.py"'