delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/24/09:12:59

X-Spam-Check-By: sourceware.org
Message-ID: <43D635D5.9070204@byu.net>
Date: Tue, 24 Jan 2006 07:12:37 -0700
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: Zach Gelnett <zachg99 AT gmail DOT com>
Subject: Re: Prompt issue within cygwin
References: <f894c8ac0601230831n33d75defj8456f73bb341f46c AT mail DOT gmail DOT com> <Pine DOT GSO DOT 4 DOT 63 DOT 0601231138410 DOT 18707 AT access1 DOT cims DOT nyu DOT edu> <f894c8ac0601230853v12812aaco8e92f875a717fac AT mail DOT gmail DOT com> <Pine DOT GSO DOT 4 DOT 63 DOT 0601231154210 DOT 18707 AT access1 DOT cims DOT nyu DOT edu> <f894c8ac0601231035j6703639h91ce8ea08bcb0ea9 AT mail DOT gmail DOT com> <Pine DOT GSO DOT 4 DOT 63 DOT 0601231426390 DOT 27934 AT access1 DOT cims DOT nyu DOT edu> <f894c8ac0601231138m61563d4ap5b88aa41cf247924 AT mail DOT gmail DOT com> <f894c8ac0601231450m679d19b2u7a01097d0bcd037b AT mail DOT gmail DOT com> <Pine DOT GSO DOT 4 DOT 63 DOT 0601231808510 DOT 27934 AT access1 DOT cims DOT nyu DOT edu>
In-Reply-To: <Pine.GSO.4.63.0601231808510.27934@access1.cims.nyu.edu>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Igor Peshansky on 1/23/2006 4:18 PM:
>>I'm trying to get this prompt to work:
>>
>>PS1="\[\033]61;\u@\H\007\]\u@\H \W>"
>>
>>but the issue there is that the > is duplicated (just like the space
>>above, but much more noticable).  Any ideas as to why making the title
>>modification to use \u@\H instead of \w is causing these issues?
> 

Shoot - the bug is still not fixed upstream; I reproduced it with
bash-3.1-1, readline-5.1-1, and rxvt-2.7.10-6.  One of these days, I hope
to be able to sit down and figure out where readline is going wrong (it is
either a readline bug, or a bug in the terminfo database), but it is
painful to debug.

> 
> There is a prompt bug in bash that causes it to miscount the number of
> displayed characters.  One workaround was to append '\[\]' to PS1.  Also,
> a good habit to get into is to use single quotes in the shell when some
> value contains backslashes.

Unfortunately, appending \[\] to PS1 no longer works with readline-5.1,
since upstream "fixed" readline to recognize that an empty non-printing
sequence has no effect on the location of the last non-printing character.
 However, I think I might be able to recussitate my readline-5.0 hack that
forcefully treats a single-line prompt with non-printing characters as
though it had a \[\] appended (and I hope I can make it work at a lower
level then where empty \[\] is stripped from PS1).  It may be a while, but
I plan on providing readline-5.1-2 that works around this nasty prompt bug
as soon as I can.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
volunteer cygwin readline maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD1jXV84KuGfSFAYARAkqDAKCGrQ9L51s8L2WJ0+TqgXifgbyIcgCgub9/
EgP3PKUv/8VzxRwWmDvAu84=
=16wn
-----END PGP SIGNATURE-----

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