From 0353bdd96c4b09f097830335561daef3c53ff9d0 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Thu, 27 Jul 2023 21:52:07 -0600 Subject: [PATCH] zshrc: add syntax highlighting --- common/.zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/.zshrc b/common/.zshrc index 93a0a2e..1ac902c 100644 --- a/common/.zshrc +++ b/common/.zshrc @@ -27,6 +27,12 @@ if [[ $CONF_ENABLEAC -eq 1 ]]; then source "$HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" fi +if [[ $CONF_ENABLESH -eq 1 ]]; then + if [[ ! -d "$HOME/.zsh/zsh-syntax-highlighting" ]]; then + git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh/zsh-syntax-highlighting" + fi +fi + # Lines configured by zsh-newuser-install HISTFILE=~/.zsh_history HISTSIZE=10000 @@ -242,3 +248,5 @@ if [[ $CONF_FORTUNE -eq 1 ]]; then fortune $CONF_FORTUNE_PATH echo fi + +[[ $CONF_ENABLESH -eq 1 ]] && source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh