From aa63017ad0137f44c7b2ffe84761a3fcc32ee551 Mon Sep 17 00:00:00 2001 From: Arialdo Martini Date: Sun, 8 Sep 2013 13:03:32 +0200 Subject: [PATCH] By default does not print a symbol when the correspondent flag is false --- prompt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prompt.sh b/prompt.sh index d133d77..3ae0c82 100644 --- a/prompt.sh +++ b/prompt.sh @@ -7,6 +7,7 @@ function enrich { else coloron=${on} fi + if [ ${use_color_off} == false -a ${flag} == false ]; then symbol=" "; fi if [[ $flag == true ]]; then color="${coloron}"; else color="${off}"; fi PS1="${PS1}${color}${symbol}${reset} " } @@ -40,6 +41,7 @@ function build_prompt { if [[ -z "${display_tag_name}" ]]; then display_tag_name=true; fi if [[ -z "${two_lines}" ]]; then two_lines=true; fi if [[ -z "${finally}" ]]; then finally="\w ∙ "; fi + if [[ -z "${use_color_off}" ]]; then use_color_off=false; fi # Colors on="\[\033[0;37m\]"