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

Re: [PATCH] _pick_variant: Update builtin check



Matthew Martin wrote on Thu, 21 Mar 2019 00:17 +00:00:
> On Wed, Mar 20, 2019 at 01:05:23PM +0000, Daniel Shahaf wrote:
> > Matthew Martin wrote on Wed, Mar 20, 2019 at 07:52:39 -0500:
> > > +builtin_precommands=(- builtin eval exec nocorrect noglob time)
> > 
> > May I suggest a comment here documenting the semantics of this variable?
> > For example, why doesn't it list the 'command' precommand (presumably
> > becaus that one doesn't preserve builtins, but this info should be in
> > the comment, not in the list archives)?
> 
> How's
> +# Precommands which allow the command to be builtin (unlike command and sudo).
> +local -ar builtin_precommands=(- builtin eval exec nocorrect noglob time)

I understand what you mean in the context of this thread, but I think
the two uses of the term 'command' might be confusing to someone who
opens the file in a year or three.  How about:

# Precommands which allow their wrapped command to be a builtin.
# All of these are necessarily builtins or reserved words themselves, but not all builtin precommands are listed here: for one, the 'command' builtin is excluded.

Cheers,

Daniel



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