From 9c9301cd7552d758172f8bde1c28085e700f7306 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 7 Nov 2018 10:34:42 +0100 Subject: Modifs en vrac.... (Sérieusement !?) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 10_Environment.zsh | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to '10_Environment.zsh') 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 -- cgit v1.2.3