zshrc: switch highlighting to fast, readd lost wsl tag

This commit is contained in:
Cynthia Foxwell 2023-08-11 21:13:04 -06:00
parent 8595d08f86
commit abd18c6ca9

View file

@ -28,8 +28,8 @@ if [[ $CONF_ENABLEAC -eq 1 ]]; then
fi fi
if [[ $CONF_ENABLESH -eq 1 ]]; then if [[ $CONF_ENABLESH -eq 1 ]]; then
if [[ ! -d "$HOME/.zsh/zsh-syntax-highlighting" ]]; then if [[ ! -d "$HOME/.zsh/fast-syntax-highlighting" ]]; then
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh/zsh-syntax-highlighting" git clone --depth=1 https://github.com/zdharma-continuum/fast-syntax-highlighting "$HOME/.zsh/fast-syntax-highlighting"
fi fi
fi fi
@ -156,6 +156,8 @@ ssh_hostname=""
get_is_in_ssh() { get_is_in_ssh() {
if [[ ! -z $SSH_TTY ]]; then if [[ ! -z $SSH_TTY ]]; then
ssh_hostname="%F{blue}[%m]%f " ssh_hostname="%F{blue}[%m]%f "
elif [[ ! -z $WSL_DISTRO_NAME ]]; then
ssh_hostname="%F{blue}[$WSL_DISTRO_NAME]%f "
fi fi
} }
precmd_functions+=(get_is_in_ssh) precmd_functions+=(get_is_in_ssh)
@ -267,4 +269,4 @@ if [[ $CONF_FORTUNE -eq 1 ]]; then
echo echo
fi fi
[[ $CONF_ENABLESH -eq 1 ]] && source "$HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" [[ $CONF_ENABLESH -eq 1 ]] && source "$HOME/.zsh/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh"