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

Re: About insert-last-word and "command args | less"



On Oct 15,  2:50am, Vincent Lefevre wrote:
}
} Thanks, but this is buggy with setopt HIST_IGNORE_DUPS:

Hrm.  It's not *just* HIST_IGNORE_DUPS, because it works fine as long
as you're not inserting the word in command position.  In fact, it
works fine as long as $BUFFER is not empty when you begin using it.

This implies that the bug is in one of up-history or down-history.
smart-insert-last-word sets NUMERIC and assumes that thereafter a
call to .up-history followed by one to .down-history will return the
editor to the current line.  This appears not to work when $BUFFER
starts out empty and there are duplicate history items to skip.

The simple workaround is to change

  setopt extendedglob

to

  setopt extendedglob nohistignoredups

in smart-insert-last-word, on the second line.



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