bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to show path with backslash '\' in it in the prompt?


From: Chet Ramey
Subject: Re: How to show path with backslash '\' in it in the prompt?
Date: Sat, 10 Jul 2010 22:52:12 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1

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.

Chet


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]