From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: Yank index
Date: Mon, 20 May 2024 14:17:06 +0100 (BST) [thread overview]
Message-ID: <576626392.1946457.1716211026926@mail.virginmedia.com> (raw)
In-Reply-To: <EAA34E01-6497-43EA-BBDC-786EEE0AB309@gmail.com>
> On 20/05/2024 12:31 BST Marlon Richert <marlon.richert@gmail.com> 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?
Looking at the code, I think it works in such a way that when you use
the special array $killring, available via the zsh/zleparameter module,
the first entry is the one most recently yanked, i.e. the killring you
see in the variable effectively cycles by itself. (There is some
relationship between $killring and $CUTBUFFER --- I'm reading the code
as saying they can be manipulated independently, however.)
You can set killring=(...) and that similarly becomes the ring with the
first entry as if you'd just yanked it, so you can cycle through it just
by assigning the array in a different order.
However, I haven't tried this out, so I may be missing subtleties --- I
doubt this ever got thought through to the level of detail you're now
investigating.
pws
next prev parent reply other threads:[~2024-05-20 13:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 11:31 Marlon Richert
2024-05-20 13:17 ` Peter Stephenson [this message]
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
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=576626392.1946457.1716211026926@mail.virginmedia.com \
--to=p.w.stephenson@ntlworld.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).