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:
+2
-2
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user