Skip to content

Commit

Permalink
fix: workaround for gencompl on macOS 12.3
Browse files Browse the repository at this point in the history
completion-generator doesn't detect python on systems with only python3
binaries.

macOS 12.3 now no longer has a python executable; python 2.x has been
completely removed.

See: RobSis/zsh-completion-generator#19
  • Loading branch information
docwhat committed Mar 15, 2022
1 parent a98e684 commit 0a91173
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zsh/startup/z-zinit-env.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export _ZL_MATCH_MODE=1
export _ZL_ROOT_MARKERS=".git,.svn,.hg,.root,package.json"

# RobSis/zsh-completion-generator
if [[ -z $GENCOMPL_PY ]] && [[ -z "${commandds[python]}" ]] && [[ -n "${commands[python3]}" ]]; then
# It doesn't auto-detect 'python3' when 'python' is missing.
GENCOMPL_PY=python3
fi
GENCOMPL_FPATH="${ZSH_CACHE_DIR}/completion-generator"

# EOF

0 comments on commit 0a91173

Please sign in to comment.