I\'m working with colorizing some output using readline in Ruby, but I am not having any luck getting line wrapping to work properly. For example:
\"\\e[01;
This problem is not ruby-specific - it occurs in bash too. If you put in a bash shell
PS1="\e[01;32mThis prompt is green and bold\e[00m > "
you will see the same result as above. But if you put in
PS1="\[\e[01;32m\]This prompt is green and bold\[\e[00m\] > "
you will get the result you wanted.