bug-bash
[Top][All Lists]
Advanced

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

Re: wrong PS1 var width calculation


From: Cheng Renquan
Subject: Re: wrong PS1 var width calculation
Date: Mon, 8 Dec 2008 23:34:21 +0800

On Mon, Dec 8, 2008 at 9:22 PM, Larry Clapp <larry@theclapp.org> wrote:
> On Mon, Dec 08, 2008 at 07:29:14PM +0800, Cheng Renquan wrote:
>> BTW, someone know a good screen record software under Linux please
>> suggest it to me, I will record a video to show this bug clearly,
>
> I think you want script(1):

No. I want to show that bash mishandling the cursor position,
Can script(1) record the cursor position in the bash editing buffer?

Simple description of the BUG: PS1 set to some var very long, longer
than the terminal width, and the command executing is also long,
displaying of PS1 and the current command editing buffer occupies
multi lines on the terminal, then give a sequence of random mixture
of <C-p>,<LeftArrow>,<RightArrow>,<C-b>,<C-f>,<C-r>,<C-a>,<C-l>,<C-e>,
<Home>,<End>, the cursor position will eventually be misplaced,
that can predict.

Sometimes still not reproduce, then execute the long command several times.


-- 
Cheng Renquan, Shenzhen, China
Joe E. Lewis  - "The way taxes are, you might as well marry for love."




reply via email to

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