[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \w in PS1 hopelessly confuses bash in workdir ending in \
From: |
Michelle Konzack |
Subject: |
Re: \w in PS1 hopelessly confuses bash in workdir ending in \ |
Date: |
Tue, 12 Aug 2008 00:04:12 +0200 |
User-agent: |
Mutt/1.5.9i |
Hi *,
Am 2008-08-06 17:08:12, schrieb Chet Ramey:
> > which seems harmless enough. However, if you do
> >
> > mkdir /tmp/chaos\\ ; cd /tmp/chaos\\
> >
> > the prompt display hopelessly confuses bash. At first it displays
> > nothing at all, then with repeated entries of RET fragments of color
> > ANSI sequences appear, like
> >
> > dak@lisa:/tmp/xxx$ mkdir /tmp/chaos\\ ; cd /tmp/chaos\\
> > ]0;dak@lisa: /tmp/chaos\007dak@lisa:/tmp/chaos\$
> > ]0;dak@lisa: /tmp/chaos\007dak@lisa:/tmp/chaos\$
>
> Since bash doesn't output any of that by default, I suspect you have something
> in PROMPT_COMMAND that tries to write to an xterm title bar and is confused by
> the escape at the end of the prompt string.
I tested it with
export PS1='[\h:\w\] '
and
export
PS1='\[ESC[1;33m[ESC[31m\uESC[32m@ESC[34m\hESC[35m:ESC[36m\wESC[33m]ESC[0m '
abd both I get:
[michelle.konzack@tp570:~] cd /tmp
[michelle.konzack@tp570:~] mkdir /tmp/chaos\\ ; cd /tmp/chaos\\
[michelle.konzack@tp570:/tmp/chaos\]
It seems to be an non-escaped coloring sequence
Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
signature.pgp
Description: Digital signature