mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
Merge pull request #1829 from docwhat/compinit
Create the zcompdump based on version and host
This commit is contained in:
commit
475fb3a29b
1 changed files with 12 additions and 2 deletions
14
oh-my-zsh.sh
14
oh-my-zsh.sh
|
@ -38,10 +38,20 @@ for plugin ($plugins); do
|
||||||
fi
|
fi
|
||||||
done
|
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
|
# Load and run compinit
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
compinit -i
|
compinit -i -d "${ZSH_COMPDUMP}"
|
||||||
|
|
||||||
|
|
||||||
# Load all of the plugins that were defined in ~/.zshrc
|
# Load all of the plugins that were defined in ~/.zshrc
|
||||||
for plugin ($plugins); do
|
for plugin ($plugins); do
|
||||||
|
|
Loading…
Reference in a new issue