On Mon, 23 Jan 2006, Zach Gelnett wrote:

> On 1/23/06, Zach Gelnett <[EMAIL PROTECTED]> wrote:
> > On 1/23/06, Igor Peshansky <[EMAIL PROTECTED]> 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;[EMAIL PROTECTED]:\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;[EMAIL PROTECTED]@\h:\w\\$ "
>
> all the sudden i have a duplicate space after my prompt as in:
>
> [EMAIL PROTECTED]:~$  ls db2Mgr.
>
> that goes away when i hit the tab complete button to show me my options:
>
> [EMAIL PROTECTED]:~$  ls db2Mgr.
> db2Mgr.C  db2Mgr.h
> [EMAIL PROTECTED]:~$ ls db2Mgr.
>
> I'm trying to get this prompt to work:
>
> PS1="\[\033]61;[EMAIL PROTECTED]@\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 [EMAIL PROTECTED] 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/
      |\      _,,,---,,_            [EMAIL PROTECTED] | [EMAIL PROTECTED]
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/

Reply via email to