On Sun, Nov 16, 2014 at 9:48 PM, Chet Ramey <chet.ra...@case.edu> wrote:

> Most of this will be in the next release of bash.  I added some things and
> left out the \m prompt expansion for now.
>

Hi Chet,

I finally had a chance to play with the 4.4 beta.  Unfortunately, it seems
to be getting confused when color escapes are used (getting a lot of
garbage when I switch to command mode).  These are the mode strings I used
(just the defaults with green/yellow color escapes):

    set vi-ins-mode-string   \1\e[32;1m\2(ins)\1\e[0m\2
    set vi-cmd-mode-string \1\e[33;1m\2(cmd)\1\e[0m\2

It breaks even with a very simple PS1, e.g. PS1='$ '

I tried adding the \[ \] guards but that didn't make a difference (I think
those are only interpreted by bash proper right?)

Here is a gif of the buggy behavior:
http://imgur.com/Ri1byLj

By way of comparison here is what it looks like using the original patch
with 4.3 (I merged your naming conventions and the \1 \2 escape support
into the patch):
http://imgur.com/MV5ZsfG

Is it possible something got lost in translation?W


Separately, would it be possible to reconsider including the '\m' escape
functionality?  I think letting the user specify where in the prompt they
want the mode indicator to occur would be a killer feature... I've
certainly enjoyed having that flexibility locally.

Thanks much,
Dylan

Reply via email to