[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 4.4-rc1: readline wrapping error when prompt wraps around
From: |
Chet Ramey |
Subject: |
Re: 4.4-rc1: readline wrapping error when prompt wraps around |
Date: |
Mon, 28 Mar 2016 10:27:00 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 3/26/16 6:08 AM, Andreas Schwab wrote:
> When $PS1 contains \[ \] and is longer than the line length then
> readline miscounts the wrap coloumn. For example, set PS1 like this:
>
> PS1="\[$(tput bold)\]$(printf '%*s' $(stty size | awk '{print$2}') x)\[$(tput
> sgr0)\] "
>
> This causes readline to wrap the input too early by the amount of hidden
> characters inside \[ \].
Thanks for the report. This will be fixed in the bash-4.4 release.
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/