Use multiple paths to find and load zsh-syntax-highlighting.

master
Icedream 2018-02-17 20:51:44 +01:00
parent b846e05dcf
commit 7cdfdea65f
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 5 additions and 1 deletions

View File

@ -74,7 +74,11 @@ section_end
section "zsh-syntax-highlighting"
if [ $ZSH_SYNTAX_HIGHLIGHTING -gt 0 ]; then
log "Loading plugin..."
source "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
if [ -f "/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]; then
source "/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
else
source "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
fi
fi
section_end