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

Re: [patch] Re: odd bash wrapping due to ansi codes


yeah, the default setup is ... well since the person who set it up is
probably on this list I won't go into that.... let's just say my version
is quite different as well. On the other hand, there's a couple guys at
work that LOVE that type of setup... to each their own.

>Anyway, I really wrote to make sure you knew that the BASH behavior you're 
>discovering is common to all BASH shells, not just Cygwin. I don't know 
>for a fact, but that behavior might actually originate in the readline library.

hmm... I *don't* see this on Linux, or AIX and I don't recall it on Solaris
or *BSD; but it's been a while since I was on either of those platforms.

Here's the PS1 string I use on Linux and Cygwin:
'\[\033]0;\w\007\033[1m\033[34m\]\w\[\033[0m\] $ '
to the best of my recollection AIX is the same. (and I'm very embarrassed to
admit that my Linux box already *had* the \[ \] wrappers.)

I just did an experiment in removing the \[ \] wrappers on Linux and it does
not exhibit the same odd wrapping problems that Cygwin did. (it did have a 
minor
problem when the prompt was near the right edge, and the current command flowed
to the next line AND the new prompt wrapped off the right edge, but it was 
a minor
problem and would probably not have been noticed if I wasn't looking (it 
lost one
character in the prompt string))

That linux had this minor improvement to "perfect" handling of my test I'm now
even more convinced this is the right thing to do.

p.s. for the two of you folks that asked for a better explanation of what I was
talking about:

http://pws.bresnanlink.net/~cabbey/broken.png cygwin w/o \[ \] (note that
what's missing is a *lot* of bells when the first broken prompt is printed,
and one or two every time thereafter.)
http://pws.bresnanlink.net/~cabbey/cygnus.png cygwin w/ \[ \] (near perfect)
http://pws.bresnanlink.net/~cabbey/linux.png linux w/ \[ \] (perfect)


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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