zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zzapper <zsh@rayninfo.co.uk>, zsh-users@zsh.org
Subject: Re: Using history / fc for case-insensitive pattern matching
Date: Tue, 22 Feb 2022 10:18:45 +0000 (GMT)	[thread overview]
Message-ID: <1117602475.939955.1645525125795@mail2.virginmedia.com> (raw)
In-Reply-To: <c243ad91-a320-6965-6648-bd7f629a392b@rayninfo.co.uk>

> On 22 February 2022 at 09:47 zzapper <zsh@rayninfo.co.uk> wrote:
> # pws: yes thanks the following works
> >
> > fc -l -m '(#i)*Mortg*' 1
> >
> >
> > (should this be documented?)
> >
> > zzapper
> >
> >
> To answer my own question: with fc any number range eg first last 
> should/must be the last

Would this be a little clearer?  History (pun intended) shows that
making the docs more verbose doesn't mean people necessarily find
them clearer, but I think they are particularly terse at this point.

pws

diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index c7de50f..dbb787f 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -756,15 +756,16 @@ specifies the most recent event beginning with the given string.  All
 substitutions var(old)tt(=)var(new), if any, are then performed on the
 text of the events.
 
-In addition to the number range,
+The range of events selected by numbers can be narrowed further by the
+following flags.
 startsitem()
 sitem(tt(-I))(restricts to only internal events (not from tt($HISTFILE)))
 sitem(tt(-L))(restricts to only local events (not from other shells, see
 tt(SHARE_HISTORY) in ifzman(zmanref(zshoptions))\
 ifnzman(noderef(Description of Options)) -- note that tt($HISTFILE) is
 considered local when read at startup))
-sitem(tt(-m))(takes the first argument as a pattern (should be quoted) and
-only the history events matching this pattern are considered)
+sitem(tt(-m))(takes the first argument as a pattern (which should be
+quoted) and only the history events matching this pattern are considered)
 endsitem()
 
 If var(first) is not specified, it will be set to -1 (the most recent


  reply	other threads:[~2022-02-22 10:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 17:43 Zach Riggle
2022-02-21 21:01 ` Mikael Magnusson
2022-02-22  9:09   ` zzapper
2022-02-22  9:27     ` Peter Stephenson
2022-02-22  9:39       ` zzapper
2022-02-22  9:47         ` zzapper
2022-02-22 10:18           ` Peter Stephenson [this message]
2022-02-22 13:07             ` zzapper

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=1117602475.939955.1645525125795@mail2.virginmedia.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-users@zsh.org \
    --cc=zsh@rayninfo.co.uk \
    /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).