Zsh Mailing List Archive
Messages sorted by:
Re: [PATCH] _pick_variant: Update builtin check
- X-seq: zsh-workers 44146
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _pick_variant: Update builtin check
- Date: Tue, 19 Mar 2019 22:38:16 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ia7nC+DgMI0v8yzHFCCfzVZ//1Ud9tMN9gpVEWiXmbw=; b=cwCK5+NXyl3bUN8LIS/v1mOBbmvl3vZBOSuCIOKUgAQ6u1hJoGt9SILeACD9opsMif Q9eeHF7IzZI1igsBCFHq5ptT4TxEFkoMkXKfwPQAN88riRwvTRprIl/vAkNDBqrx2YNS 5ktMYXGu5TxTkjW3tWHQAWJR9ABIyvjis9p+WnxnTLLrZgpEkA/8CYDFtsb+iVzzM+vK Kxc6LsFAVJSKMkTKuhN0zTzDojOKNARHagRlARYEKyzTacQrZ1Vqgjwx7oWTRTpePG1l jyFPKRIVC4RITxUnojhMxx8JrBIh2gwmd9kANQivWImLIP3v7TqqAxE8BZDvuh31RF8a Ytvw==
- In-reply-to: <20190320020511.GA6739@CptOrmolo.darkstar>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- List-unsubscribe: <mailto:email@example.com>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20190320020511.GA6739@CptOrmolo.darkstar>
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: