Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Using history / fc for case-insensitive pattern matching




On 21/02/2022 21:01, Mikael Magnusson wrote:
On 2/21/22, Zach Riggle <zachriggle@xxxxxxxxx> 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?

and i fing it simpler to

alias hg='fc -l 1 | grep -i '

zzapper





Messages sorted by: Reverse Date, Date, Thread, Author