if i use the following
export PS1=' 33[36m$ 33[0m'
Bash misunderstands the length of the prompt and starts line-wrapping too early. My assumption was that it is counting every character, but comparing ${#PS1}
to $COLUMNS
shows that not to be the case.
if i instead use the following
export PS1='$ '
there is no issue
additionally, if i use dash
shell, this does not happen, so i know it is an issue with Bash, and not my terminal etc. however, if i launch dash
in vi mode with dash -V
or set -o vi
, the escape characters are ignored and not sent to my terminal at all. I assume this is a bug in dash
though, so i reported this on the dash
mailing list.
thanks