Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Yank index
Did you not get Peter's reply to the last time you asked this (yesterday)?
On Tue, May 21, 2024 at 1:17 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> Inside a ZLE widget, is there a way to get the kill ring index of the active yank? Is it possible to move this index?
The killring rotates when you yank, so $killring[1] is always the
"active yank" and $killring[-1] is always the previous yank -- unless
you use a negative prefix (e.g., ESC - 1 before yank).
Presently (as I understand it from PWS's response yesterday), the only
way to "move the index" is to make a copy of $killring, rearrange it
however you want, and then assign it back via killring=(...).
Oliver may have additional insight.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author