develop#zsh: check of ~/.zcompdump exists
This commit is contained in:
parent
8f52fbd807
commit
c6cb43fc21
1 changed files with 9 additions and 5 deletions
|
@ -28,12 +28,16 @@ bindkey -M vicmd 'j' history-substring-search-down
|
||||||
#load compinit
|
#load compinit
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
|
|
||||||
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump \
|
if [[ -f ~/.zcompdump ]]; then
|
||||||
|
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump \
|
||||||
|| stat -f '%Sm' -t '%j' ~/.zcompdump)
|
|| stat -f '%Sm' -t '%j' ~/.zcompdump)
|
||||||
|
|
||||||
# save time if completion cache has been update recently
|
# save time if completion cache has been update recently
|
||||||
if [ $(date +'%j') != $updated_at ]; then
|
if [ $(date +'%j') != $updated_at ]; then
|
||||||
compinit -u
|
compinit -u
|
||||||
|
else
|
||||||
|
compinit -C
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
compinit -C
|
compinit -C
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue