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

Re: [PATCH] _pick_variant: Update builtin check



On Tue, Mar 19, 2019 at 09:05:13PM -0500, Matthew Martin wrote:
> Move the builtin check prior to the cache lookup and don't cache
> builtins if -b is provided. This corrects the result if a user uses both
> a builtin and external version of a command in one shell session.
> 
> The command may be builtin only if all precommands are
> builtin-preserving which are enumerated in builtin_precommands.
> Since a builtin-preserving precommand must be itself builtin, I figure
> it's easier to maintain as a white list. This corrects the case Daniel
> brought up: command chmod <tab>.

I've realized that I was only testing on a system that uses the fallback
variant and the patch will give incorrect results on GNU systems since
_call_program may call a builtin. I'll rework the patch (although I'm
open to suggestions for fixing it).

Sorry for the noise.



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