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

Re: Error in zshaddhistory() should not prevent command from running



Bart Schaefer wrote on Sun, Jan 01, 2017 at 11:20:30 -0800:
> On Jan 1,  3:10am, Daniel Shahaf wrote:
> } Subject: Re: Error in zshaddhistory() should not prevent command from runn
> }
> } > Possibly more controversial, why run this hook at all when nothing is
> } > being added?
> } 
> } 2) It's easier to call the user-provided hook function on one more case
> } that it can easily ignore, than not to do so and to leave the user with
> } no easy alternative.
> 
> As far as I can tell the only case where *chline == '\0' is when the EOF
> character has been typed -- there's always at least a newline in there
> in all other circumstances.

I'd assumed we were talking about empty lines (i.e., <accept-line> when
BUFFER='').  My bad.  I don't have an opinion on whether zshaddhistory()
should be called during the EOF processing sequence.

> There are lots of other places to add to
> the history on shell exit.  But this is why I asked -- other opinions?
> 



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