zsh-users
 help / color / mirror / code / Atom feed
* Yank index
@ 2024-05-20 11:31 Marlon Richert
  2024-05-20 13:17 ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Marlon Richert @ 2024-05-20 11:31 UTC (permalink / raw)
  To: Zsh Users

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.



^ permalink raw reply	[flat|nested] 6+ messages in thread
* Yank index
@ 2024-05-21 20:17 Marlon Richert
  2024-05-21 20:59 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Marlon Richert @ 2024-05-21 20:17 UTC (permalink / raw)
  To: Zsh Users

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.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-27  7:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-20 11:31 Yank index Marlon Richert
2024-05-20 13:17 ` Peter Stephenson
2024-05-27  7:31   ` Marlon
2024-05-21 20:17 Marlon Richert
2024-05-21 20:59 ` Bart Schaefer
2024-05-22  4:58   ` Marlon Richert

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).