commit 1390434aaa6e044fc713547a232f20f2aa17f972
parent f5a8b82b914ca696bbe41453827929bc772f3332
Author: ccx <ccx@te2000.cz>
Date: Sun, 24 Mar 2024 18:47:25 +0000
Don't error out without TERM
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zsh-functions/site_zshenv_10_PS4 b/zsh-functions/site_zshenv_10_PS4
@@ -2,7 +2,7 @@
zmodload zsh/system # to get actual pid
zmodload zsh/terminfo # to get terminal color capability
setopt PROMPT_SUBST
-if (($terminfo[colors] >= 8)); then
+if ((${terminfo[colors]:-0} >= 8)); then
# first color is for main shell process, second is subshell
typeset -g -a PS4_PID_COLORS
PS4_PID_COLORS=(cyan magenta)