[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lengthy working dir (\w) breaks wrapping in a multi line coloured PS
Re: Lengthy working dir (\w) breaks wrapping in a multi line coloured PS1 prompt
Fri, 27 Dec 2013 13:14:21 -0500
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1
On 12/17/13 9:59 AM, Jinesh Choksi wrote:
> Bash Version: 4.2
> Patch Level: 45
> Release Status: release
> The simplest PS1 prompt which demonstrates the issue is:
> PS1="\[\033[01;31m\]Hello address@hidden:\[\033[01;32m\]\w\$\[\033[00m\] "
> The issue is that a lengthy current working directory gets split up before
> the width of the terminal is reached.
> This happens only when colour sequences are used. When no colour sequences
> are used, the prompt works correctly.
This is the result of the \n in the prompt, believe it or not. I have
attached a patch, and the patch will be in bash-4.3/readline-6.3. I
would appreciate as many people as possible testing it.
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/
Description: Source code patch