commit 841b71492a9fdf3a7a4bb5c4c11673a62038174b parent ca252d9fce68de806735c964c92f152e55221c84 Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com> Date: Sat, 5 Nov 2016 10:17:44 +0100 (m) Move comment on non-printing characters Diffstat:
| M | .bashprompt | | | 5 | ++--- |
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git 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['