delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/23/18:18:31

X-Spam-Check-By: sourceware.org
Date: Mon, 23 Jan 2006 18:18:20 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Zach Gelnett <zachg99 AT gmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Prompt issue within cygwin
In-Reply-To: <f894c8ac0601231450m679d19b2u7a01097d0bcd037b@mail.gmail.com>
Message-ID: <Pine.GSO.4.63.0601231808510.27934@access1.cims.nyu.edu>
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>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

On Mon, 23 Jan 2006, Zach Gelnett wrote:

> On 1/23/06, Zach Gelnett <zachg99 AT XXXXX DOT XXX> wrote:
> > On 1/23/06, Igor Peshansky <pechtcha AT XX DOT XXX DOT XXX> wrote:

Again, <http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Let's not feed the
spammers.

> [snip]
> I do have one final question.
>
> If I set PS1 like this:
>
>  PS1="\[\033]61;\w\007\]\u@\h:\w\\$ "
>
> Everything works great, no issues at all, what is expected is what is
> displayed.
>
> Now, when i make only a slight modification as such:
>
> PS1="\[\033]61;\u@\H\007\]\u@\h:\w\\$ "
>
> all the sudden i have a duplicate space after my prompt as in:
>
> v468929 AT TRD-CAX40JXD:~$  ls db2Mgr.
>
> that goes away when i hit the tab complete button to show me my options:
>
> v468929 AT TRD-CAX40JXD:~$  ls db2Mgr.
> db2Mgr.C  db2Mgr.h
> v468929 AT TRD-CAX40JXD:~$ ls db2Mgr.
>
> 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?

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.

However, I can't reproduce your problem on my system (I only see one '>'
with the above PS1 setting).  I don't believe you've posted the
information requested in the problem reporting guidelines at
<http://cygwin.com/problems.html> in this thread...  Please attach the
output of "cygcheck -svr" so that we can find out, among other things,
what version of bash you are using, as well as what else is different in
our setups.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

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