Skip to content

Commit 0a91173

Browse files
committed
fix: workaround for gencompl on macOS 12.3
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
1 parent a98e684 commit 0a91173

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

zsh/startup/z-zinit-env.zsh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export _ZL_MATCH_MODE=1
1414
export _ZL_ROOT_MARKERS=".git,.svn,.hg,.root,package.json"
1515

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

1923
# EOF

0 commit comments

Comments
 (0)