diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index d70c801..1f44358 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -122,7 +122,8 @@ fi [[ ${COLORTERM} == *(truecolor|24bit)* ]] || zmodload zsh/nearcolor # emacsclient 27 (TODO: check later versions) needs this for TrueColor -if [[ ${TERM#*-} == "256color" ]] \ +if type emacsclient >& - \ + && [[ ${TERM#*-} == "256color" ]] \ && [[ ${COLORTERM} == *(truecolor|24bit)* ]] \ && [[ -f "/usr/share/terminfo/${TERM[1]}/${TERM%-*}-direct" ]]; then alias $(command -v emacsclient)="TERM=${TERM%-*}-direct $(command -v emacsclient)"