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

Re: How to parse zsh history



On Thu, Jul 7, 2022 at 6:46 AM Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
>
> If you need to load from files before search, fc has numerous options
> for that, including one to load to a local context so you don't pollute
> the global history.

In particular
fc -p -a /dev/null $(wc -l < $filename) 0
fc -R $filename

will load the contents of $filename into $history for the scope of the
containing function, and then discard it when the function returns.




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