PDA

View Full Version : set the PS1 env with SGR cause problem



tianlijian
17th April 2009, 05:33 AM
1. add the "export PS1='[\e[1;34m\W\e[0m]\$ " to /etc/profile or ~/.bash_profile .
You must add command to the configuration file, can not set the PS1 in bash command line.
2. log out you bash, and login again. make your change to take effect.
3. type the command 'one two three four five six' in the command line.
4. use 'M-7 C-b' command move the cursor , you will see the display in confusion.

RupertPupkin
17th April 2009, 05:39 AM
Hmm, it works for me.

tianlijian
17th April 2009, 05:50 AM
Hmm, it works for me.

which distro are you using?
I have edit my original post
the `C-A' problem only occurs the Fedora 9(i do not test other fedora version). it does not occurs in other distro, such ubuntu, freeBSD, which i have tested.
However, the `M-7 C-b' occurs the most of the distro(i have test fedora 9, unutu, freeBSD)