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

Yank index



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?

For example, let’s say that I yanked the $CUTBUFFER, then cycled with yank-pop to $killring[2]. Inside my widget, I would like to be able to tell that I currently have $killring[2] on the command line instead of $CUTBUFFER.

Another example: yank-pop normally cycles from $CUTBUFFER to $killring and then steps through $killring from lowest to highest index, until it wraps around to $CUTBUFFER. I would like to cycle in the opposite direction.





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