zsh-workers
 help / color / mirror / code / Atom feed
From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] _pick_variant: Update builtin check
Date: Tue, 19 Mar 2019 22:38:16 -0500	[thread overview]
Message-ID: <20190320033815.GA22718@CptOrmolo.darkstar> (raw)
In-Reply-To: <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.

  reply	other threads:[~2019-03-20  3:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20  2:05 Matthew Martin
2019-03-20  3:38 ` Matthew Martin [this message]
2019-03-20 12:52   ` Matthew Martin
2019-03-20 13:05     ` Daniel Shahaf
2019-03-21  0:16       ` Matthew Martin
2019-03-21 11:57         ` Daniel Shahaf
2019-03-21 12:40           ` Matthew Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190320033815.GA22718@CptOrmolo.darkstar \
    --to=phy1729@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).