zsh: only set alias for emacsclient if it is installed
This commit is contained in:
parent
8febf74ca9
commit
b638b4d1ac
|
@ -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)"
|
||||
|
|
Loading…
Reference in New Issue
Block a user