ANSI escape sequences not being respected in PS1 environment variable when vi or emacs options are enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In my `.profile` I have the following:

> export ENV=$HOME/.rc

and then in `.rc` I have:

> export PS1='\033[36$ \033[m'

These escape sequences are interpreted by my terminal to colour the
text, and do so correctly when executing dash normally.

>dash $ dash
>$

However, when vi or emacs options are enabled (either through command
line option or with `set -o`) these escape sequences are interpreted
as literal text.

>dash $ dash -V
>[36m$ [mset +o vi
>$ set -o emacs
>[36m$ [mset +o emacs
>$

Thanks for any help :)




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux