zsh-users
 help / color / mirror / code / Atom feed
From: Marlon Richert <marlon.richert@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Yank index
Date: Tue, 21 May 2024 23:17:25 +0300	[thread overview]
Message-ID: <22E6658B-6827-4170-92CD-4546683FA4EA@gmail.com> (raw)

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.



             reply	other threads:[~2024-05-21 20:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21 20:17 Marlon Richert [this message]
2024-05-21 20:59 ` Bart Schaefer
2024-05-22  4:58   ` Marlon Richert
  -- strict thread matches above, loose matches on Subject: below --
2024-05-20 11:31 Marlon Richert
2024-05-20 13:17 ` Peter Stephenson
2024-05-27  7:31   ` Marlon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22E6658B-6827-4170-92CD-4546683FA4EA@gmail.com \
    --to=marlon.richert@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).