diff options
author | Robby Russell <robby@planetargon.com> | 2013-09-11 06:19:43 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-09-11 06:19:43 -0700 |
commit | 475fb3a29bb551abfa7a55fdf1ad4905da39928a (patch) | |
tree | 1e2092b821e3234ac1aaedb8c77dd353a61e54c3 | |
parent | 1c468c63c078a874fc6dc22ba19206a9a6cfe7a2 (diff) | |
parent | d2fe03d7549558745f999865ea0e348cb44e818f (diff) | |
download | zsh-475fb3a29bb551abfa7a55fdf1ad4905da39928a.tar.gz zsh-475fb3a29bb551abfa7a55fdf1ad4905da39928a.tar.bz2 zsh-475fb3a29bb551abfa7a55fdf1ad4905da39928a.zip |
Merge pull request #1829 from docwhat/compinit
Create the zcompdump based on version and host
-rw-r--r-- | oh-my-zsh.sh | 14 |
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 |