[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \w in PS1 hopelessly confuses bash in workdir ending in \
From: |
Chet Ramey |
Subject: |
Re: \w in PS1 hopelessly confuses bash in workdir ending in \ |
Date: |
Wed, 6 Aug 2008 17:08:12 -0400 |
> Machine Type: i486-pc-linux-gnu
>
> Bash Version: 3.2
> Patch Level: 39
> Release Status: release
>
> Description:
>
> \w in PS1 prompt string confuses bash when ending in \
>
> The standard prompt setting in ubuntu is
> PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$"
>
> 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.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU chet@case.edu http://tiswww.tis.case.edu/~chet/