diff --git a/.gitignore b/.gitignore index 6ba475c..79421c7 100644 --- a/.gitignore +++ b/.gitignore @@ -19,9 +19,7 @@ zsh/* !zsh/.zsh_plugins*.txt !zsh/scripts.zsh !zsh/aliases.zsh -!zsh/completions/.keep !zsh/ssh-menu -!zsh/get-dump # starship !starship diff --git a/zsh/.zshrc b/zsh/.zshrc index 5c460d1..1f2f0fe 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -33,10 +33,18 @@ source "$ZDOTDIR/aliases.zsh" source "$ZDOTDIR/scripts.zsh" # completion -fpath=("$ZDOTDIR/completions" $fpath) +fpath=("$XDG_DATA_HOME/zsh/completions" $fpath) autoload -Uz compinit -compinit -d "$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION" +# only regenerate dump once per day +local _zcompdump="$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION" +if [[ -n $_zcompdump(#qN.mh+24) ]]; then + compinit -d "$_zcompdump" +else + compinit -C -d "$_zcompdump" +fi zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache" +zstyle ':completion:*' menu select +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' eval "$(starship init zsh)" eval "$(direnv hook zsh)" diff --git a/zsh/completions/.keep b/zsh/completions/.keep deleted file mode 100644 index e69de29..0000000