diff --git a/zsh-completion-generator.plugin.zsh b/zsh-completion-generator.plugin.zsh index 8046449..d7a9c89 100755 --- a/zsh-completion-generator.plugin.zsh +++ b/zsh-completion-generator.plugin.zsh @@ -21,7 +21,11 @@ fi # which python to use local python if [[ -z $GENCOMPL_PY ]]; then - python=python + if [[ -z "${commands[python]}" ]] && [[ -n "${commands[python3]}" ]]; then + python=python3 + else + python=python + fi else python=$GENCOMPL_PY fi