oh-my-zsh.sh 986 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Initializes Oh My Zsh
  2. # add a function path
  3. fpath=($ZSH/functions $fpath)
  4. # Load all of the config files in ~/oh-my-zsh that end in .zsh
  5. # TIP: Add files you don't want in git to .gitignore
  6. for config_file ($ZSH/lib/*.zsh) source $config_file
  7. # Load all of your custom configurations from custom/
  8. for config_file ($ZSH/custom/*.zsh) source $config_file
  9. # Load all of the plugins that were defined in ~/.zshrc
  10. plugin=${plugin:=()}
  11. for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh
  12. # Load the theme
  13. # Check for updates on initial load...
  14. if [ "$ZSH_THEME" = "random" ]
  15. then
  16. themes=($ZSH/themes/*zsh-theme)
  17. N=${#themes[@]}
  18. ((N=RANDOM%N))
  19. RANDOM_THEME=${themes[$N]}
  20. source "$RANDOM_THEME"
  21. echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
  22. else
  23. source "$ZSH/themes/$ZSH_THEME.zsh-theme"
  24. fi
  25. # Check for updates on initial load...
  26. if [ "$DISABLE_AUTO_UPDATE" = "true" ]
  27. then
  28. return
  29. else
  30. /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh
  31. fi