From 943fc1d242c951148a0ea59ec441cc67126de0bf Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sun, 7 Nov 2021 10:26:38 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BD=D0=B5=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D1=8B?= =?UTF-8?q?=D0=B5=20=D0=B0=D0=B2=D1=82=D0=BE=D0=B4=D0=BE=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B4=D0=BB=D1=8F=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D0=B2=20mc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 85-compinit.zsh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) 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)'