From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-users@zsh.org
Subject: Re: Using history / fc for case-insensitive pattern matching
Date: Tue, 22 Feb 2022 09:27:51 +0000 (GMT) [thread overview]
Message-ID: <894112583.938338.1645522071761@mail2.virginmedia.com> (raw)
In-Reply-To: <c63f1026-ea3b-4ee8-f45b-1358aac1897d@rayninfo.co.uk>
> On 22 February 2022 at 09:09 zzapper <zsh@rayninfo.co.uk> wrote:
> On 21/02/2022 21:01, Mikael Magnusson wrote:
> > On 2/21/22, Zach Riggle <zachriggle@gmail.com> wrote:
> >> I've written a neat little tool that wraps "fc" / "history" to make
> >> everything look neat and easily documentable for later reference /
> >> incident response.
> >>
> > You can use (#i) to make a pattern case insensitive, eg
> > fc -m '(#i)*zsh-u*'
> >
> > you may need to setopt extendedglob first.
> >
> Thanks Mikael for resolving this
>
> (i needed the -nl)
>
> fc -nl -m '(#i)*Mortg*'
>
> but there's something clunky with the fc -m match .. I can't get to
> match all of my history?
Try sticking a "1" at the end of the line to get the whole history.
It still does the match, but it now starts searching from the beginning.
pws
next prev parent reply other threads:[~2022-02-22 9:28 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 [this message]
2022-02-22 9:39 ` zzapper
2022-02-22 9:47 ` zzapper
2022-02-22 10:18 ` Peter Stephenson
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=894112583.938338.1645522071761@mail2.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).