Pārlūkot izejas kodu

Further speedup zsh init

Kevin Heinicke 2 nedēļas atpakaļ
vecāks
revīzija
cc3e0a258b
2 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 1 1
      sheldon-plugins.toml
  2. 2 2
      zshrc

+ 1 - 1
sheldon-plugins.toml

@@ -21,7 +21,7 @@ apply = ["source"]
 # defer = { value = 'zsh-defer source "{{ file }}"', each = true }
 
 [plugins.compinit]
-inline = 'autoload -Uz compinit && compinit'
+inline = 'autoload -Uz compinit; if [[ -n ~/.zcompdump(#qN.mh+24) ]]; then compinit; else compinit -C; fi'
 
 [plugins.p10k]
 github = "romkatv/powerlevel10k"

+ 2 - 2
zshrc

@@ -63,8 +63,8 @@ eval "$(direnv hook zsh)"
 [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
 
 # load homebrew autocompletions
-if which brew > /dev/null; then
-  fpath=($(brew --prefix)/share/zsh/site-functions $fpath)
+if [[ -d /opt/homebrew/share/zsh/site-functions ]]; then
+  fpath=(/opt/homebrew/share/zsh/site-functions $fpath)
 fi
 
 zmodload zsh/complist