Fix escaping of escape codes.

Without this, readline will compute the length of the prompt
incorrectly, leading to display artifacts.
This commit is contained in:
Adrien Destugues
2018-08-23 20:27:58 +02:00
parent d15e61541e
commit abb35d283f
+2 -2
View File
@@ -13,8 +13,8 @@ else
fi
unset ARCH
PS1='`if [ $? = 0 ]; then echo "\e[32m";
else echo "\e[31m\]"; fi`'"$PS1\e[0m\]> "
PS1="\["'`if [ $? = 0 ]; then echo "\e[32m";
else echo "\e[31m"; fi`'"\]$PS1\[\e[0m\]> "
export USER=`id -un`
export GROUP=`id -gn`