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

copy-prev-word doesn't respect universal argument



Why don't copy-prev-word and copy-prev-shell-word respect the
universal argument?

Given the following:

  bindkey '^XA' copy-prev-word
  echo abc def ghi <ESC>2^XA

I would expect the result to be

  echo abc def ghi def

but zle seems always to copy the most recent word, ('ghi' in this
case), yielding:

  echo abc def ghi ghi

no matter what the prefix arg is.  I'm surprised I'm the first person
to request this.  Is there an alternate way to copy an arbitrary word
from earlier in the same command, or is the !#:<n> syntax sufficient
for most people?

Thanks,
  Vin



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