This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bash 3.0-7 bug - prompt length with non-printing characters


I have a prompt ($PS1) which includes non-printing characters. They are enclosed with \[ .... \] so that bash knows not to count them in discovering the length of the prompt in order to position the cursor correctly.

On upgrading to bash 3, I noticed that the last few characters of my prompt were erroneously duplicated (it ended with two $ signs). When tab completion was used, the text got nastlily corrupted.

Here is a reproduction case:

PS1='\[\e[32;1m\]@\[\e[33;1m\]#\[\e[0m\] $ '

Curiously, appending '\[\]' to the end of $PS1 works around the problem.

Max.


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]