diff --git a/85-compinit.zsh b/85-compinit.zsh index 0a8a055..d3d2d07 100644 --- a/85-compinit.zsh +++ b/85-compinit.zsh @@ -1,15 +1,17 @@ -typeset -i _compinit_updated_at=$(date +'%j' -r $ZSH_COMPDUMP 2>/dev/null || stat -f '%Sm' -t '%j' $ZSH_COMPDUMP 2>/dev/null) -ZGEN_COMPINIT_FLAGS="-i" -if [ $(date +'%j') = $_compinit_updated_at ]; then - ZGEN_COMPINIT_FLAGS+=" -C" +if [ -z "${ZSH_IS_SUBSHELL}" ]; then + typeset -i _compinit_updated_at=$(date +'%j' -r $ZSH_COMPDUMP 2>/dev/null || stat -f '%Sm' -t '%j' $ZSH_COMPDUMP 2>/dev/null) + ZGEN_COMPINIT_FLAGS="-i" + if [ $(date +'%j') = $_compinit_updated_at ]; then + ZGEN_COMPINIT_FLAGS+=" -C" + fi + unset _compinit_updated_at + + zmodload -i zsh/complist + autoload -Uz compinit && eval "compinit $ZGEN_COMPINIT_FLAGS -d $ZSH_COMPDUMP" + + #zgenom load marlonrichert/zsh-autocomplete + zgenom load zsh-users/zsh-autosuggestions fi -unset _compinit_updated_at - -zmodload -i zsh/complist -autoload -Uz compinit && eval "compinit $ZGEN_COMPINIT_FLAGS -d $ZSH_COMPDUMP" - -#zgenom load marlonrichert/zsh-autocomplete -zgenom load zsh-users/zsh-autosuggestions # Speed up autocomplete, force prefix mapping zstyle ':completion:*' accept-exact '*(N)'