commit fd287e2775cf5ae52668a7d0b4aa0421c7bc6648
parent 9416d345a95172e789dec1b1a213e4da185ce0b7
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date: Tue, 8 Nov 2016 18:48:21 +0100
(m) Use literals instead of octal values
"\E" means "the escape character", and "\a" means "bell".
References:
bash(1)
console_codes(4)
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.bashprompt b/.bashprompt
@@ -38,7 +38,7 @@ __set-title ()
fi
fi
- echo -ne "\033]2;${title}\007"
+ echo -ne "\E]2;${title}\a"
}
# In order to know how much space PS1 takes, Bash needs us to delimit
@@ -74,7 +74,7 @@ __fontify ()
shift
output=$(__start-nonprinting)
- output+='\033['
+ output+='\E['
for ((i=1; i<=$#; i++))
do
@@ -92,7 +92,7 @@ __fontify ()
output+="${text}"
output+=$(__start-nonprinting)
- output+='\033[0m'
+ output+='\E[0m'
output+=$(__end-nonprinting)
echo -en "${output}"