Skip site navigation (1)Skip section navigation (2)
Date:      17 Oct 1999 03:57:42 +0200
From:      naddy@mips.rhein-neckar.de (Christian Weisgerber)
To:        freebsd-questions@freebsd.org
Subject:   Re: bash's "\$" in PS1 doesn't work right
Message-ID:  <7ubaem$8q3$1@bigeye.rhein-neckar.de>
References:  <87g0zbxmdg.fsf@main.wgaf.net> <87aepjxlrk.fsf@main.wgaf.net> <86ogdyn6p3.fsf@localhost.hell.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas <keramida@ceid.upatras.gr> wrote:

> If you had used
> 
> 	export PS1="\\h:\\w:\\\$ "
> 
> it would have worked without a glitch,

The situation is further muddied by the fact that Bourne compatible
shells (such as bash) only substitute the backslash escapes '\\',
'\"' and '\$' inside double quotes. Other backslash combinations
are passed as is, i.e.

    PS1="\h:\w:\\\$ "

produces the intended result.

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7ubaem$8q3$1>