summaryrefslogtreecommitdiff
path: root/.bashprompt
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2016-11-05 10:17:44 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2016-11-05 10:25:09 +0100
commit841b71492a9fdf3a7a4bb5c4c11673a62038174b (patch)
treececf7b9dbb243d950a0f855e6e66b3f2a25ba41b /.bashprompt
parentca252d9fce68de806735c964c92f152e55221c84 (diff)
downloaddotfiles-841b71492a9fdf3a7a4bb5c4c11673a62038174b.tar.xz
(m) Move comment on non-printing characters
Diffstat (limited to '.bashprompt')
-rw-r--r--.bashprompt5
1 files 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['