diff options
author | Robby Russell <robby@planetargon.com> | 2015-09-19 08:40:34 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2015-09-19 08:40:34 -0700 |
commit | 56cdec75348cc7c33f54c5441884238c25a6597b (patch) | |
tree | 2a47f31206b0c92e3fd6b5e2ed09dac712139ee3 /oh-my-zsh.sh | |
parent | 9c08641d7c2aae0c82fa5ad91f94c67b70115ba5 (diff) | |
parent | e8caf22beb8cde69f097382a75f6d1a247625030 (diff) | |
download | zsh-56cdec75348cc7c33f54c5441884238c25a6597b.tar.gz zsh-56cdec75348cc7c33f54c5441884238c25a6597b.tar.bz2 zsh-56cdec75348cc7c33f54c5441884238c25a6597b.zip |
Merge pull request #3889 from leycec/compaudit
Repair `zsh` Path Permissions on `oh-my-zsh` Startup under Cygwin
Diffstat (limited to 'oh-my-zsh.sh')
-rw-r--r-- | oh-my-zsh.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 4e5f77990..8e31ddd0f 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -8,6 +8,9 @@ fi # add a function path fpath=($ZSH/functions $ZSH/completions $fpath) +# Load all stock functions (from $fpath files) called below. +autoload -U compaudit compinit + # Set ZSH_CUSTOM to the path where your custom config files # and plugins exists, or else we will use the default custom/ if [[ -z "$ZSH_CUSTOM" ]]; then @@ -59,9 +62,14 @@ if [ -z "$ZSH_COMPDUMP" ]; then ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}" fi -# Load and run compinit -autoload -U compinit -compinit -i -d "${ZSH_COMPDUMP}" +# If completion insecurities exist, warn the user without enabling completions. +if ! compaudit &>/dev/null; then + # This function resides in the "lib/compfix.zsh" script sourced above. + handle_completion_insecurities +# Else, enable and cache completions to the desired file. +else + compinit -d "${ZSH_COMPDUMP}" +fi # Load all of the plugins that were defined in ~/.zshrc for plugin ($plugins); do |