From 2c83939a5779bc890fb33ea115a943cba2b1f5e0 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Mon, 25 Feb 2013 18:21:31 +0100 Subject: [Env] Process tree checkup to get urxvt/tmux/screen --- 10_Environment.zsh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to '10_Environment.zsh') diff --git a/10_Environment.zsh b/10_Environment.zsh index 66774ce..6dfbe78 100644 --- a/10_Environment.zsh +++ b/10_Environment.zsh @@ -27,7 +27,17 @@ C_="%{$c_" _C="$_c%}" unset has_termcaps -[ $TERM = "rxvt-unicode" -o $TERM = "screen" ] && has_termcaps="true" +case "$( _process_tree )" in + *":: screen ::"*) + # Discards termcaps even if screen is launched from an urxvt.. + ;; + *":: urxvt ::"*|\ + *":: tmux ::"*) + has_termcaps="true" + ;; + *) + ;; +esac T_=${has_termcaps:+$termcap[as]} _T=${has_termcaps:+$termcap[ae]} _tq_=${${has_termcaps:+"q"}:-"-"} -- cgit v1.2.3