Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zle: vi mode: wrong undo handling on fresh lines

2014/01/31 22:45, Oliver Kiddle wrote:

>  How about we instead add a split-undo zle
> widget? It is then easy for someone to add that before completion or
> other widgets like backward-delete-word.

I have no objection to this.

> I'm fairly convinced that we should handle the suffix with the simple
> patch below. I've long had vi-cmd-mode set to first use
> auto-suffix-retain. I could be wrong but would suspect most vi users
> would prefer it this way. However, it'd be good to have the opinion of
> another vi-mode user. What do you think?

In some cases the suffix is purely optional; for example

$ chown m<tab>
will complete to
$ chown myname:

or (on Mac OS X)

$ df -Th<tab>
completes to
$ df -Thfs,

I believe at least for these cases it would be better to erase the suffix
when <esc> is hit.

>> (This will also change the behavior in emacs-mode.)
> I can't quite work out what the emacs-mode behaviour change is.

This is just a minor difference.
Suppose you have directories 'foo' and 'bar'. By hitting <tab> and <space>
a few times after 'ls ' the command line would look like

$ ls foo bar/

Now type <undo> a few times; without the change in zle_main.c, at some
point you get

$ ls foo/

but with my patch '/' will not be appended.

Messages sorted by: Reverse Date, Date, Thread, Author