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

Re: history puzzle



On Tue, Jun 4, 2024, at 3:49 PM, Ray Andrews wrote:
> On 2024-06-04 11:12, Mark J. Reed wrote:
>> What's "history -m"? Doesn't that just look for items in the history 
>> containing "-m"?
> The Devil!  Had that in my function for years, thought it meant 'pattern 
> following'.  Nuts, it works:
>
> 5 /aWorking/Zsh/Source/Wk 1 % history -rn "grep*" 1
> fc: event not found: grep*
>
> 5 /aWorking/Zsh/Source/Wk 1 % history -rnm "grep*" 1
> grep c52f */idProduct
> grep c52f
> grep c349 */idProduct
> ...
>
> ... but I can't find it in the doc :(  A few examples would be so helpful.

See the description of "fc" in zshbuiltins(1).  No examples, though.

-- 
vq




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