This is the mail archive of the cygwin@cygwin.com 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]

Re: first line overwritten in Bash


Luciano,

You're not signalling BASH (and the readline library it uses) which portions of that prompt do not produce characters on the screen. That causes it to lose track of where the cursor really is when the prompt is printed. Any non-printing sequence in PS1 should be surrounded by \[ and \]. See the PROMPTING section of the BASH manual for more details.

Randall Schulz


At 17:42 2003-04-11, Luciano wrote:
I customized my prompt in Bash, but it is not working.

PS1='\033[38;1m\][\!]\W> \033[0m\]'

When I type and reach the end of the first line, it continues on the
same line, overwriting what is already there. The subsequent lines
are typed correctly. It only happens with rxvt. In pure DOS console,
though, my prompt has smiling face symbols on either side. What have
I done wrong?

Thanks,

Luciano ES


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]