login_init.zsh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # startup file read in interactive login shells
  3. #
  4. # The following code helps us by optimizing the existing framework.
  5. # This includes zcompile, zcompdump, etc.
  6. #
  7. (
  8. local file
  9. local zmodule
  10. setopt LOCAL_OPTIONS EXTENDED_GLOB
  11. autoload -U zrecompile
  12. # zcompile the completion cache; siginificant speedup
  13. zrecompile -pq ${ZDOTDIR:-${HOME}}/${zcompdump_file:-.zcompdump}
  14. # zcompile .zshrc
  15. zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshrc
  16. # zcompile enabled module autoloaded functions
  17. zrecompile -pq ${ZIM_HOME}/functions ${ZIM_HOME}/modules/${^zmodules}/functions/^([_.]*|prompt_*_setup|README*|*.zwc|*.zwc.old)(-.N)
  18. # zcompile enabled module init scripts
  19. for zmodule (${zmodules}); do
  20. zrecompile -pq ${ZIM_HOME}/modules/${zmodule}/init.zsh
  21. done
  22. # zcompile all prompt setup scripts
  23. for file in ${ZIM_HOME}/modules/prompt/functions/prompt_*_setup; do
  24. zrecompile -pq ${file}
  25. done
  26. # syntax-highlighting
  27. for file in ${ZIM_HOME}/modules/syntax-highlighting/external/highlighters/**^test-data/*.zsh; do
  28. zrecompile -pq ${file}
  29. done
  30. zrecompile -pq ${ZIM_HOME}/modules/syntax-highlighting/external/zsh-syntax-highlighting.zsh
  31. # zsh-histery-substring-search
  32. zrecompile -pq ${ZIM_HOME}/modules/history-substring-search/external/zsh-history-substring-search.zsh
  33. ) &!