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]

Re: Escape colour codes


* Matthew Woehlke (Tue, 03 Apr 2007 16:55:45 -0500)
> Thorsten Kampe wrote:
> > lftp and yafc show a wrong prompt in the following terminals: cmd, 4nt, 
> >> console and far manager. Basically each coloured part of the prompt is 
> >> surrounded by two "funny faces" - the first is white and the second has 
> >> the desired colour.
> 
> I don't know what these are. Are they non-Cygwin applications that are 
> looking at the environment variable 'PS1'?

No, these are Cygwin applications using Cygwin readline and allowing 
you to define your own application specific prompt (similar to the PS1 
prompt syntax used in bash and zsh).

> Cygwin apps (e.g. 'printf') should cope with escapes correctly even
> in Windows consoles

That's exactly the point. They actually do cope with the escapes - 
just not with the \001 and \002 used by readline to calculate the 
length of the line.

> (otherwise even bash would not work).

Yes, bash is the exception. Maybe bash doesn't use \001/\002?
 
> > Obvioulsy all Windows terminals can't interpret those "non-visible 
> > characters" (or they don't ignore them like they should or readline 
> > doesn't "eat" them like it should).
> > 
> > Where is the culprit here? Cygwin readline not correctly interacting 
> > with non Cygwin terminals? Windows terminals not understanding common 
> > readline(?) escape characters?
> 
> Windows consoles don't understand escapes, period. Also AFAIK nothing 
> except readline understands \[ and \]. But Cygwin understands escapes so 
> Cygwin applications should work even in a Windows console.

Okay, so it's obviously a readline (or Cygwin) bug.

I think it's a readline thing (as rxvt doesn't have the problem) - the 
question is just where to submit a bug report? To the Cygwin readline 
maintainer or upstream?


Thorsten


--
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]