dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit f31bc534ff4bf23ac052f668da985261a4f39273
parent 5a0e86de02b8698da6e166727a18f717f6f1d7f9
Author: Chris Bracken <chris@bracken.jp>
Date:   Sun,  7 Jun 2026 08:05:50 +0900

zsh: improve compinit performance

Only run the full `compinit` once a day; otherwise run `compinit -C` and
skip the full security audit.

Diffstat:
M.config/zsh/.zshrc | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -30,7 +30,14 @@ zstyle ':compinstall' filename "$ZDOTDIR/.zshrc" zstyle ':completion:*' menu select # Initialize completion for current session. -autoload -Uz compinit && compinit +autoload -Uz compinit +if [[ -n $ZDOTDIR/.zcompdump(#qNmh-24) ]]; then + # .zcompinit generated within the last 24 hours. + # Skip the `compaudit` check to speed things up. + compinit -C +else + compinit +fi # Current VCS branch (for prompt). vcs_branch() {