summaryrefslogtreecommitdiff
path: root/oh-my-zsh.sh
diff options
context:
space:
mode:
authoryleo77 <ylep77@gmail.com>2013-09-19 12:40:45 +0800
committeryleo77 <ylep77@gmail.com>2013-09-19 12:40:45 +0800
commit0240ac6496fc01b287caaab1a62cd760590144be (patch)
tree120cbd08b851e012d8843652ccf8bf89c5a023f7 /oh-my-zsh.sh
parentfda5afaebca57250792696e29c2e111f41f6fce4 (diff)
parentb51c2a0d0b0af68d4b2b70b922f7d56a14a23dcc (diff)
downloadzsh-0240ac6496fc01b287caaab1a62cd760590144be.tar.gz
zsh-0240ac6496fc01b287caaab1a62cd760590144be.tar.bz2
zsh-0240ac6496fc01b287caaab1a62cd760590144be.zip
Merge remote-tracking branch 'robbyrussell/master'
Diffstat (limited to 'oh-my-zsh.sh')
-rw-r--r--oh-my-zsh.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index 93c10e3d2..15c1dce44 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -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