From b7b42704a331475392c7ce262c1a3cf7951eb61b Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 17 Jan 2012 20:35:34 +0100 Subject: Manages termcaps only on good terminals.. --- 10_Environment.zsh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to '10_Environment.zsh') diff --git a/10_Environment.zsh b/10_Environment.zsh index e84c623..4d41f4a 100644 --- a/10_Environment.zsh +++ b/10_Environment.zsh @@ -25,8 +25,18 @@ c_='['$color[none]";" _c=m C_="%{$c_" _C="$_c%}" -T_=$termcap[as] -_T=$termcap[ae] + +unset _t_ +[ $TERM = "urxvt" ] && _t_=yes +T_=${_t_:+$termcap[as]} +_T=${_t_:+$termcap[ae]} +_t_q=${${_t_:+q}:--} +_t_j=${${_t_:+j}:-[} +_t_k=${${_t_:+k}:-[} +_t_l=${${_t_:+l}:-]} +_t_m=${${_t_:+m}:-]} +_t_t=${${_t_:+t}:-]} +_t_u=${${_t_:+u}:-]} # I hate kik00l0l colorized prompts, so I'm using a way to # give a dominant color for each part of the prompt, each of @@ -77,7 +87,7 @@ HISTSIZE=$(( $SAVEHIST * 1.10 )) export GPG_TTY=`tty` # YeahConsole.. -if ( ps fx | grep $$ -B1 | grep -q yeahconsole ) +if ( ps x | grep $$ -B1 | grep -q yeahconsole ) then YEAHCONSOLE=true fi -- cgit v1.2.3