zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Marlon Richert <marlon.richert@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Yank index
Date: Tue, 21 May 2024 13:59:43 -0700	[thread overview]
Message-ID: <CAH+w=7ZOxLoe1ZtjD0FeOggk5-=_tgcuk=435WX9keDh4D=ZGw@mail.gmail.com> (raw)
In-Reply-To: <22E6658B-6827-4170-92CD-4546683FA4EA@gmail.com>

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@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?

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.


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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21 20:17 Marlon Richert
2024-05-21 20:59 ` Bart Schaefer [this message]
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='CAH+w=7ZOxLoe1ZtjD0FeOggk5-=_tgcuk=435WX9keDh4D=ZGw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=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).