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

docs patches for precmd hooks and $?, and vcs_info



Bart Schaefer wrote on Wed, Apr 14, 2021 at 07:00:32 -0700:
> On Wed, Apr 14, 2021 at 5:06 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
> wrote:
> 
> >
> > > +prompt_newuser_precmd() {
> > > +  local exitstatus=$?
> >
> > It's not documented that precmd hooks can rely on $? to be the exit code
> > of the last command.  That does work, though (because callhookfunc()
> > calls doshfunc(noreturnval=1)), and seems useful, and I guess we won't
> > want to change it, so shall we document it?
> 
> 
> It's intentional and as far as I recall has always been assumed, so ... yes.

Done.  Attached as 4/8.  Also did a few other things while I was in the
area, and things that I noticed while auditing for other instances of
the bugs fixed by the the former things.

Split to rather small pieces, but in exchange, the log messages are
informative.  (Also, I do review my own patches to the same standard as
others'.)

Cheers,

Daniel






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