From 24858a4fddf28866f31fbc6bc89851cb51d11315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Tue, 14 Aug 2012 15:11:48 +0200 Subject: [PATCH] Fix tabs --- liquidprompt | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/liquidprompt b/liquidprompt index 255fe62..7be1911 100755 --- a/liquidprompt +++ b/liquidprompt @@ -293,17 +293,17 @@ _lp_user() _lp_connection() { - if [[ -n "$SSH_CLIENT$SSH2_CLIENT" ]] ; then - echo ssh - else - # TODO check on *BSD - local sess_src=$(who am i | sed -n 's/.*(\(.*\))/\1/p') - if [[ -z "$sess_src" || "$sess_src" = :0.0 ]] ; then - echo lcl # Local - else - echo tel # Telnet - fi - fi + if [[ -n "$SSH_CLIENT$SSH2_CLIENT" ]] ; then + echo ssh + else + # TODO check on *BSD + local sess_src=$(who am i | sed -n 's/.*(\(.*\))/\1/p') + if [[ -z "$sess_src" || "$sess_src" = :0.0 ]] ; then + echo lcl # Local + else + echo tel # Telnet + fi + fi } # Put the hostname if not locally connected @@ -313,15 +313,15 @@ _lp_connection() # build this just once case "$(_lp_connection)" in lcl) - if [[ $LP_HOSTNAME_ALWAYS == 0 ]] ; then - LP_HOST="${NO_COL}" # no hostname if local - else - LP_HOST="${NO_COL}@${LP_COLOR_HOST}${_LP_HOST_SYMBOL}${NO_COL}" - fi - ;; + if [[ $LP_HOSTNAME_ALWAYS == 0 ]] ; then + LP_HOST="${NO_COL}" # no hostname if local + else + LP_HOST="${NO_COL}@${LP_COLOR_HOST}${_LP_HOST_SYMBOL}${NO_COL}" + fi + ;; ssh) LP_HOST="${NO_COL}@${LP_COLOR_SSH}${_LP_HOST_SYMBOL}${NO_COL}" - ;; + ;; tel) LP_HOST="${NO_COL}@${LP_COLOR_TELNET}${_LP_HOST_SYMBOL}${NO_COL}" ;; @@ -981,4 +981,4 @@ prompt_OFF() # By default, sourcing liquidprompt.bash will activate the liquid prompt prompt_on -# vim: set ts=4 sw=4 tw=120 ft=sh: +# vim: set et sts=4 sw=4 tw=120 ft=sh: