mirror of
https://github.com/dnlbauer/dotfiles.git
synced 2026-09-10 21:45:30 +00:00
feat: build completions only once a day; improve startup time
This commit is contained in:
13
dot_zshrc
13
dot_zshrc
@@ -12,7 +12,18 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
|||||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
autoload -U +X compinit && compinit # fix compdef not found
|
# Load compdef immediately (needed before antidote loads plugins that call
|
||||||
|
# it), but only do the expensive security audit + dump rebuild once a day;
|
||||||
|
# otherwise just source the existing dump (-C).
|
||||||
|
autoload -U +X compinit
|
||||||
|
() {
|
||||||
|
setopt local_options extended_glob
|
||||||
|
if [[ -n ${HOME}/.zcompdump(#qN.mh+24) ]]; then
|
||||||
|
compinit
|
||||||
|
else
|
||||||
|
compinit -C 2>/dev/null || compinit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if [ -f $HOME/.zshrc_local ]; then
|
if [ -f $HOME/.zshrc_local ]; then
|
||||||
source $HOME/.zshrc_local
|
source $HOME/.zshrc_local
|
||||||
|
|||||||
Reference in New Issue
Block a user