diff options
Diffstat (limited to 'oh-my-zsh.sh')
-rw-r--r-- | oh-my-zsh.sh | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 689a79fef..15c1dce44 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -1,7 +1,7 @@ # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" != "true" ] then - /usr/bin/env ZSH=$ZSH zsh $ZSH/tools/check_for_upgrade.sh + /usr/bin/env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh $ZSH/tools/check_for_upgrade.sh fi # Initializes Oh My Zsh @@ -38,10 +38,20 @@ for plugin ($plugins); do fi done +# Figure out the SHORT hostname +if [ -n "$commands[scutil]" ]; then + # OS X + SHORT_HOST=$(scutil --get ComputerName) +else + SHORT_HOST=${HOST/.*/} +fi + +# Save the location of the current completion dump file. +ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}" + # Load and run compinit autoload -U compinit -compinit -i - +compinit -i -d "${ZSH_COMPDUMP}" # Load all of the plugins that were defined in ~/.zshrc for plugin ($plugins); do @@ -73,6 +83,9 @@ else if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ] then source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" + elif [ -f "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" ] + then + source "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" else source "$ZSH/themes/$ZSH_THEME.zsh-theme" fi |