delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/04/03:39:36

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Thorsten Kampe <thorsten AT thorstenkampe DOT de>
Subject: Re: Escape colour codes
Date: Wed, 4 Apr 2007 08:38:53 +0100
Lines: 45
Message-ID: <euvkme$hv0$1@sea.gmane.org>
References: <etlt2v$aq0$1 AT sea DOT gmane DOT org> <euuhri$f63$1 AT sea DOT gmane DOT org> <euuih2$iro$1 AT sea DOT gmane DOT org>
Mime-Version: 1.0
User-Agent: MicroPlanet-Gravity/2.70.2067
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

* 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019