zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Huy Z <h-zsh@huyz.us>
Cc: zsh-workers@zsh.org
Subject: Re: Path to fix copy-earlier-word handling of numeric arguments
Date: Thu, 4 Apr 2024 12:10:03 +0200	[thread overview]
Message-ID: <CAHYJk3RDHcXSb9XS39OVqAmezLOfFB_T2usfpFcKFX+Rz4SkKg@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3RL_s4qVnHs_4qH81OVEQLCiEPZFuOUhC0kS7wNcxZ4-Q@mail.gmail.com>

On Thu, Apr 4, 2024 at 12:03 PM Mikael Magnusson <mikachu@gmail.com> wrote:
>
> On Thu, Apr 4, 2024 at 11:41 AM Huy Z <h-zsh@huyz.us> wrote:
> >
> > As initially submitted at https://github.com/zsh-users/zsh/pull/116 :
> >
> > ________________________________
> >
> > As mentioned in the code comment:
> >
> >   # 1 means last word, 2 second last, etc.
> >
> > the numeric argument is supposed to be interpreted as an offset from the end.
> >
> > The intended behavior is a lot more useful than the current behavior.
>
> NAK on this, this is not only longstanding behavior, but also what is
> actually documented in the manpage:
>   words on the relevant history line.  With a numeric argument  N,  insert  the
>   Nth  word  from  the history line; N may be negative to count from the end of
>   the line.

If you feel the other way around is more useful, perhaps adding a
zstyle to configure it would be a good idea, eg
if zstyle -t :$WIDGET count-from-end; then ...; else ...; fi

-- 
Mikael Magnusson


      reply	other threads:[~2024-04-04 10:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04  9:39 Huy Z
2024-04-04 10:03 ` Mikael Magnusson
2024-04-04 10:10   ` Mikael Magnusson [this message]

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=CAHYJk3RDHcXSb9XS39OVqAmezLOfFB_T2usfpFcKFX+Rz4SkKg@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=h-zsh@huyz.us \
    --cc=zsh-workers@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).