[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: How to show path with backslash '\' in it in the prompt?
From: Chet Ramey <chet.ramey () case ! edu>
Date: 2010-07-11 3:07:44
Message-ID: 4C393580.5000002 () case ! edu
[Download RAW message or body]
On 7/10/10 11:00 PM, Peng Yu wrote:
> On Sat, Jul 10, 2010 at 9:52 PM, Chet Ramey <chet.ramey@case.edu> wrote:
>> On 7/10/10 9:57 PM, Peng Yu wrote:
>>> Hi,
>>>
>>> I have a directory named '\E' (two letters, rather than a single
>>> special character). I have the following $PS1 variable.
>>>
>>> $ echo $PS1
>>> ${debian_chroot:+($debian_chroot)}\u@\h:\w\$
>>>
>>> When my current directory is '\E', the prompt shows a special
>>> character (I think that it should be the special character '\E'). I'm
>>> wondering if there is a way to change $PS1 to show two characters '\'
>>> and 'E'.
>>
>> I don't get this behavior with bash-4.1. It may be PROMPT_COMMAND
>> that is messing up your display.
>
> No. I don't think that it is because of PROMPT_COMMAND. I set
> PROMPT_COMMAND to the following command. But the prompt doens't
> change. It only print an additional line whenever I run a command.
>
> export PROMPT_COMMAND=echo
OK. I still can't reproduce it with bash-4.1.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic