bug-bash
[Top][All Lists]
Advanced

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

vi editing mode + color prompt = trouble?


From: Halim Issa
Subject: vi editing mode + color prompt = trouble?
Date: Mon, 8 Dec 2008 18:44:29 +0100
User-agent: KMail/1.10.3 (Linux/2.6.27.7; KDE/4.1.3; i686; ; )

On bash 3.2 patchlevel 048 (and earlier) there appears to be problems in vi 
mode and prompts containing escape characters (such as to get bold text).

To reproduce:
Enter vi editing mode set -o vi

Set the following prompt:
export PS1="[\!] \[\e[1m\]\u\[\e[m\]@\h:\w>"

Type "one two three four five six seven eight" press ESCape and 7 B to go 
seven words back. This takes me right in the middle of the prompt while 
displaying (args:7) on the prompt. Once it removes the (args:7) info, ie when 
I press the "B", the cursor location is messed up and I end up in the middle 
of the prompt, instead of at the word "two" where I should be.

Ofcourse it doesn't have to be 7 B, any numbered vi command that displays the 
(args:) feedback will cause things to go wrong with this prompt...

Thanks for reading. Please advise if I chose the wrong channel of reporting.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]