delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/03/17:56:37

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Matthew Woehlke <mw_triad AT users DOT sourceforge DOT net>
Subject: Re: Escape colour codes
Date: Tue, 03 Apr 2007 16:55:45 -0500
Lines: 30
Message-ID: <euuih2$iro$1@sea.gmane.org>
References: <etlt2v$aq0$1 AT sea DOT gmane DOT org> <euuhri$f63$1 AT sea DOT gmane DOT org>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.4.0
In-Reply-To: <euuhri$f63$1@sea.gmane.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

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'? Cygwin apps (e.g. 'printf') 
should cope with escapes correctly even in Windows consoles (otherwise 
even bash would not work).

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

> Is there a way to solve the issue?

Don't use escapes in non-Cygwin programs.

-- 
Matthew
Obscurity: +5


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