[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] the first line of $PS1 is not updated when it's multi-li
From: |
李仁林 |
Subject: |
Re: [Help-bash] the first line of $PS1 is not updated when it's multi-line |
Date: |
Mon, 21 Jul 2014 18:18:26 +0100 |
Hi Chet,
Thank you for the reply, and looking forward to the fix!
On 21 July 2014 16:28, Chet Ramey <address@hidden> wrote:
> On 7/18/14, 5:23 AM, 李仁林 wrote:
> > Hi all,
> >
> > Recently I use bash 4.3, and it provides a cool notation to help me find
> > out which mode am I in when vi editing is enabled.
> >
> > I use the following bashrc configuration to enable them
> >
> > bind 'set show-mode-in-prompt on'
> > set -o vi
> >
> > it works nice when my $ps1 is one line. and it doesn't work when it spans
> > into two line.
> > It seems only the current editing line is updated.
> >
> > for example:
> >
> > address@hidden:/work/
> > $ type_CMD_here
> >
> > Is there a way to specify the mode hint position so that I can put it in
> > the second line to circumvent this problem? or it's possible to update
> the
> > whole command prompt?
>
> Thanks for the report. You're right that the redisplay code only deals
> with the portion of the prompt following the final newline, and that the
> mode indicator is put before the first character of the prompt.
>
> I will have to figure out the best way to fix this. It may be that
> special-case code to update the first character following the final newline
> is the best way to go.
>
> Chet
>
> --
> ``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/
>