Dash Archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: Harald van Dijk <harald@gigawatt.nl>, dash@vger.kernel.org
Subject: Re: [PATCH 1/6] fc -s: refuse multiple events instead of ignoring
Date: Sat, 6 Apr 2024 16:55:42 +0800	[thread overview]
Message-ID: <ZhEODiKLhiGh1dPl@gondor.apana.org.au> (raw)
In-Reply-To: <96c003b30fc95cdf5aed3162901abaa9b89430e2.1675798292.git.nabijaczleweli@nabijaczleweli.xyz>

On Tue, Feb 07, 2023 at 08:33:25PM +0100, наб wrote:
> The POSIX SYNOPSIS (and our manual which steals it verbatim) says:
>   fc -s [old=new] [first]
> and, indeed, we only use the first non-= argument
> instead of enforcing the usage, which is confusing.
> 
> bash:
> 	2025     ls
> 	2026     id
> 	$ fc -s ls=who 2025 2026
> 	who
> 	nabijaczleweli pts/2 2023-02-07 17:36 (192.168.1.109)
> 	nabijaczleweli pts/3 2023-02-07 17:38 (192.168.1.109)
> 	nabijaczleweli pts/4 2023-02-07 16:58 (192.168.1.109)
> 	nabijaczleweli pts/5 2023-02-07 17:45 (192.168.1.109)
> ksh93:
> 	240     id
> 	241     ls
> 	$ fc -s ls=who 241 240
> 	ksh: hist: -e - requires single argument
> yash:
> 	2       ls
> 	3       id
> 	$ fc -s ls=who 2 3
> 	fc: too many operands are specified
> zsh:
> 	    2  id
> 	    3  ls
> 	tarta% fc -s ls=who 3 2
> 	fc: bad option: -s
> dash (before):
> 	    1 ls
> 	    2 id
> 	$ fc -s ls=who 1 2
> 	who
> 	nabijaczleweli pts/2 2023-02-07 17:36 (192.168.1.109)
> 	nabijaczleweli pts/3 2023-02-07 17:38 (192.168.1.109)
> 	nabijaczleweli pts/4 2023-02-07 16:58 (192.168.1.109)
> 	nabijaczleweli pts/5 2023-02-07 17:45 (192.168.1.109)
> dash (after):
> 	    1 ls
> 	    2 id
> 	$ fc -s ls=who 1 2
> 	src/dash: 3: fc: -s takes one history argument
> 
> Adapted-from: NetBSD src bin/sh/histedit.c rev 1.38 by aymeric@
> ---
> Here's a quick few that fix my report and a couple of the ones you list
> at the end of that thread.
> 
>  src/histedit.c | 7 +++++++
>  1 file changed, 7 insertions(+)

All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2024-04-06  8:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-08 16:10 dash repeats first line in history entry forever with fc -s наб
2023-01-08 16:31 ` Harald van Dijk
2023-01-08 17:01   ` Christoph Anton Mitterer
2023-02-07 19:33   ` [PATCH 1/6] fc -s: refuse multiple events instead of ignoring наб
2024-04-06  8:55     ` Herbert Xu [this message]
2023-02-07 19:33   ` [PATCH 2/6] fc -s: don't loop forever when executing the latest entry наб
2023-02-07 19:33   ` [PATCH 3/6] fc: only parse old=new if -s, per POSIX наб
2023-02-07 19:33   ` [PATCH 4/6] fc: don't require an argument наб
2023-02-07 19:33   ` [PATCH 5/6] fc: fix "fc -3" extension on glibc наб
2023-02-07 19:33   ` [PATCH 6/6] fc: don't include the current fc in out-of-range last наб

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=ZhEODiKLhiGh1dPl@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=dash@vger.kernel.org \
    --cc=harald@gigawatt.nl \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).