bug-bash
[Top][All Lists]
Advanced

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

Re: Coloured prompt mangles long input lines


From: Chet Ramey
Subject: Re: Coloured prompt mangles long input lines
Date: Tue, 6 Nov 2001 09:02:33 -0500

> Machine Type: i386-redhat-linux-gnu
> 
> Bash Version: 2.05
> Patch Level: 8
> Release Status: release
> 
> Description:
>       When PS1 is set to produce coloured output via ANSI escape
>       sequences, then long lines (longer than screen width) are
>       wrapped and rewrite the prompt itself. It behaves like there be
>       '\r' at the end instead of '\n'
> 
> Repeat-By:
>       $ export PS1='\e[1;31m\w\e[0m\$ '
>       $ write looooooooong looooong line

Look at the Bash FAQ, question E3, or read the description of the \[ and \]
escape sequences in the PROMPTING section of the bash manual page.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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