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

Re: have run-help not put itself in history?



>>>>> On December 13, 2009 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> That the above works, almost looks like a bug to me.  Why is the history
> ever reset to the default in this case?  It's a stack push without any
> stack pop, and automatic popping is supposed to require the -a option

Hi Bart,

See Chapter 9: Functions -> Special Functions -> zshaddhistory:

| A hook function may call 'fc -p ...' to switch the history context so
| that the history is saved in a different file from the that in the
| global HISTFILE parameter. This is handled specially: the history
| context is automatically restored after the processing of the history
| line is finished.

> (which I think would pop the stack too soon).

Yes, it does, I tried that before finding the doc cited above.

Greg



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