From 5668418df04777110154c9a257c59d656d881924 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Tue, 7 Mar 2017 19:01:17 +0100 Subject: (m) Simplify code and tweak whitespace --- .bash_prompt | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to '.bash_prompt') diff --git a/.bash_prompt b/.bash_prompt index 59cf090..e2dfbab 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -89,6 +89,7 @@ __fontify () shift __start-nonprinting + echo -en '\E[' for ((i=1; i<=$#; i++)) @@ -106,6 +107,7 @@ __fontify () __end-nonprinting echo -en "${text}" + __start-nonprinting echo -en '\E[0m' __end-nonprinting @@ -114,11 +116,8 @@ __fontify () __set-prompt () { BUILDING_PS1=t - PS1='' - PS1+="$(__write-context)\n" - PS1+=$(__fontify '\$' dim) - PS1+=' ' + PS1="$(__write-context)\n$(__fontify '\$' dim) " unset BUILDING_PS1 } @@ -147,7 +146,7 @@ __signal-no-newline () __draw-rule () { - local line='' + local line for ((i=$(__current-column); i