From 841b71492a9fdf3a7a4bb5c4c11673a62038174b Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sat, 5 Nov 2016 10:17:44 +0100 Subject: (m) Move comment on non-printing characters --- .bashprompt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.bashprompt b/.bashprompt index 1ec822c..31624ee 100644 --- a/.bashprompt +++ b/.bashprompt @@ -13,6 +13,8 @@ __set-title () echo -ne "\033]2;${title}\007" } +# In order to know how much space PS1 takes, Bash needs us to delimit +# non-printing characters with \[ and \]. __start-nonprinting () { if [ ${BUILDING_PS1} ] @@ -43,9 +45,6 @@ __fontify () local text=$1 shift - # We need to add \[ \] around CSI sequences so that Bash can tell which - # characters are non-printing. - output=$(__start-nonprinting) output+='\033[' -- cgit v1.2.3