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

Re: BASH BUG



On Mon, Nov 22, 1999 at 01:23:42PM +0100, Juli-Manel Merino Vidal wrote:
> try the following PS1 (for root) and notice what happens:
> 	export PS1='^[[1m^[[31m\h:\w\$^[[0m '
> 
> ^[ are scape secuences... This PS1 is red and shows the hostname and
> the path.
> Or try other scape secuences.
> 
> Before you reach the end of the line, bash jump to the start of it...
> and when you go back, it goes two lines above. Try it ! It's really
> annoying.

The supposed fix for this is:

PS1="\[\e[31;1m\]\h:\w\$\[\e[0m\] "

It however causes other (known) bugs to pop up for which there are no
fixes at this time.  If you fix it, please send the fix upstream, they'd
really appreciate it.  =>

BTW, add a \u@ to that, it's much better that way so you also know who you
are!

-- 
- Joseph Carter         GnuPG public key:   1024D/DCF9DAB3, 2048g/3F9C2A43
- knghtbrd@debian.org   20F6 2261 F185 7A3E 79FC  44F9 8FF7 D7A3 DCF9 DAB3
--------------------------------------------------------------------------
// Minor lesson: don't fuck about with something you don't fully understand
        -- the dosdoom source code

Attachment: pgpnvibbAz91D.pgp
Description: PGP signature


Reply to: