diff options
author | katherine <shmibs@shmibbles.me> | 2017-09-09 23:12:58 -0700 |
---|---|---|
committer | katherine <shmibs@shmibbles.me> | 2017-09-09 23:12:58 -0700 |
commit | f0a556fc35600e7e3b426a2557e51e76d9877539 (patch) | |
tree | 06692d0574da370cec0c759f3bb7c965cb3f7665 | |
parent | 0381a50f10bd3649a61d6e246224eb8023b30d66 (diff) | |
download | dotfiles-f0a556fc35600e7e3b426a2557e51e76d9877539.tar.gz |
source local zsh-syntax-highlighting on freebsd
-rw-r--r-- | .zshrc | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -77,11 +77,14 @@ fi ################# HIGHLIGHTING ################ -if [[ -f '/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' ]]; then - source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -else - source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -fi +local HIGHLIGHT_DIR='~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' +[[ -f '/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' ]] && \ + HIGHLIGHT_DIR='/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' +[[ -f '/usr/local/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' ]] && \ + HIGHLIGHT_DIR='/usr/local/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' + +source $HIGHLIGHT_DIR + ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern) #ZSH_HIGHLIGHT_STYLES[alias]="fg=yellow" |