From 0a9117315d9d8d8802ea344eea67a72fae226e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=B6ltje?= Date: Tue, 15 Mar 2022 12:25:04 -0400 Subject: [PATCH] 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 --- zsh/startup/z-zinit-env.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zsh/startup/z-zinit-env.zsh b/zsh/startup/z-zinit-env.zsh index 1ff11f9..9de0a38 100644 --- a/zsh/startup/z-zinit-env.zsh +++ b/zsh/startup/z-zinit-env.zsh @@ -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