From ad4cd3d1f6925144be63e104cfc7a1e6292866ae Mon Sep 17 00:00:00 2001 From: Salvydas Lukosius Date: Wed, 27 May 2026 01:36:11 +0100 Subject: [PATCH] fix(completions): rebuild compinit after managed changes --- lib/zsh/install.zsh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/zsh/install.zsh b/lib/zsh/install.zsh index 8f81f3e..7bc33ec 100755 --- a/lib/zsh/install.zsh +++ b/lib/zsh/install.zsh @@ -587,11 +587,18 @@ builtin source "${ZI[BIN_DIR]}/lib/zsh/side.zsh" || { builtin print -P "${ZI[col builtin setopt null_glob extended_glob warn_create_global typeset_silent integer use_C=$2 + typeset -a compinit_opts + compinit_opts=( "${(Q@)${(z@)ZI[COMPINIT_OPTS]}}" ) + + if [[ $1 = 1 ]]; then + use_C=0 + compinit_opts=( "${(@)compinit_opts:#-C}" ) + fi +zi-message "{mmdsh}{happy} Zi{rst} » {faint}initializing {func}compinit{rst}{…}" builtin autoload -Uz compinit - compinit ${${(M)use_C:#1}:+-C} -d "${ZI[ZCOMPDUMP_PATH]}" "${(Q@)${(z@)ZI[COMPINIT_OPTS]}}" + compinit ${${(M)use_C:#1}:+-C} -d "${ZI[ZCOMPDUMP_PATH]}" "${compinit_opts[@]}" } # ]]] # FUNCTION: .zi-download-file-stdout [[[ # Downloads file to stdout.