summaryrefslogtreecommitdiff
path: root/10_Environment.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@advisorsla.com>2018-11-07 10:34:42 +0100
committerHugues Hiegel <hugues.hiegel@advisorsla.com>2018-11-07 10:34:42 +0100
commit9c9301cd7552d758172f8bde1c28085e700f7306 (patch)
tree6cc20c86e1f7a64029e6c0c317eec6effb2c63b3 /10_Environment.zsh
parent96840d9338607f52da7812af56e9ad5a9b2e422e (diff)
Modifs en vrac.... (Sérieusement !?)
Diffstat (limited to '10_Environment.zsh')
-rw-r--r--10_Environment.zsh33
1 files changed, 20 insertions, 13 deletions
diff --git a/10_Environment.zsh b/10_Environment.zsh
index ce82154..714172f 100644
--- a/10_Environment.zsh
+++ b/10_Environment.zsh
@@ -26,28 +26,33 @@ _c=m
C_="%{$c_"
_C="$_c%}"
-unset has_termcaps
+unset _has_tcaps
case "$( _process_tree )" in
*":: SCREEN ::"*)
# Discards termcaps even if screen is launched from an urxvt..
;;
*":: "*"urxvt ::"*|\
*":: tmux ::"*)
- has_termcaps="true"
+ has_termcaps=${has_termcaps:-true}
;;
*)
;;
esac
-T_=${has_termcaps:+$termcap[as]}
-_T=${has_termcaps:+$termcap[ae]}
-_tq_=${${has_termcaps:+"q"}:-"-"}
-_tj_=${${has_termcaps:+"j"}:-"'"}
-_tk_=${${has_termcaps:+"k"}:-"."}
-_tl_=${${has_termcaps:+"l"}:-","}
-_tm_=${${has_termcaps:+"m"}:-"\`"}
-_tt_=${${has_termcaps:+"t"}:-"]"}
-_tu_=${${has_termcaps:+"u"}:-"["}
-_tx_=${${has_termcaps:+"x"}:-"|"}
+_has_tcaps="${has_termcaps}"
+[ "${_has_tcaps}" != "true" ] && unset _has_tcaps
+
+T_=${_has_tcaps:+$termcap[as]}
+_T=${_has_tcaps:+$termcap[ae]}
+_tq_=${${_has_tcaps:+"q"}:-"-"}
+_tj_=${${_has_tcaps:+"j"}:-"'"}
+_tk_=${${_has_tcaps:+"k"}:-"."}
+_tl_=${${_has_tcaps:+"l"}:-","}
+_tm_=${${_has_tcaps:+"m"}:-"\`"}
+_tt_=${${_has_tcaps:+"t"}:-"]"}
+_tu_=${${_has_tcaps:+"u"}:-"["}
+_tx_=${${_has_tcaps:+"x"}:-"|"}
+# Not needed anymore
+unset _has_tcaps
# I hate kik00l0l colorized prompts, so I'm using a way to
# give a dominant color for each part of the prompt, each of
@@ -94,9 +99,11 @@ HISTSIZE=$(( $SAVEHIST * 1.10 ))
export GPG_TTY=`tty`
# YeahConsole..
-if ( ps x 2>&- | grep $$ -B1 | grep -q yeahconsole )
+if ( ps 2>&- | grep $$ -B1 | grep -q yeahconsole )
then
_yeahconsole=true
+else
+ _yeahconsole=false
fi
# Display guess