summaryrefslogtreecommitdiff
path: root/10_Environment.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2012-01-17 20:35:34 +0100
committerHugues Hiegel <hugues@hiegel.fr>2012-01-17 20:35:34 +0100
commitb7b42704a331475392c7ce262c1a3cf7951eb61b (patch)
tree5cde9187b76f8964e8902f6dc638e9ca467818b2 /10_Environment.zsh
parentf54174910fb108de76c671693c938815a8a30c2b (diff)
Manages termcaps only on good terminals..
Diffstat (limited to '10_Environment.zsh')
-rw-r--r--10_Environment.zsh16
1 files changed, 13 insertions, 3 deletions
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