Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: RFC PATCH: fix lookup in $commands array when HASHLISTALL is unset
- X-seq: zsh-workers 54619
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: RFC PATCH: fix lookup in $commands array when HASHLISTALL is unset
- Date: Tue, 26 May 2026 19:39:13 +0200
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FLX+QKiDqUq73oR7lDiE2FUMXHxaKG/68arwp4ZusNM=; fh=QgfxxE0gysBJ7evxa0WZY5Olv+ibLYueRkqhtBdu00I=; b=ebRhcfY8NAVkoaYzB5R41RXjklwjosrgCZzXCKWBXIOdGVoRXQ9rVO8iFwt32ApODy 0czb4+La3Abgy10wh1OqGnu3r8rrK4GgSYi56k1sLm3duJ6CTYw2SY3XPo0EoroNIUgZ 1D9XS5/+aco3HMIpP+YoNfiPhwQHhpSTU4wdg3eweflxwlIpObscG/kl/7xG2mGGWK5f TvZANepUTXaH4YelW9Pz4L7lYeUKYxXHJNjYQuqxEP4WDxog1oJhDk29JnyT9S8DWwg2 FzJImjleuJvsGaASOmF3Ti9HqwfyACCspFk0/ry87x2JqpW2aO7bKrbL2v0Bsp17R0iM Nj9g==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1779817167; cv=none; d=google.com; s=arc-20240605; b=PIdelf6EPK6AREQ/dlwAY6MebhzQREf+kyWIbR3SoYbzXJidOYaTbmVUgTvE3cTcUd wkX+s0fZZ7fwkWuvHcx4wGp/BYb/Ey2dv78wmnVFAekUVO1XXfi6Ia05BvvnMQvSRblH On0+tpr2Iz9PrEBfYce2Fo4QhX1FnIvXBFdkH6feXbghtlOZKGob/W75bymQ8jbYouea vYePEvhhHCcyRfVYAEUqB7Qw9ulbZbWDWI5QHmOrfAa4i2dhdUZ0cqmuzXb/w8F9+rtE Wfr60G6WAdgI0QkJcL8cM+5PIA5z1NpHZdDGD/GKHBARTpRrk/D8lPMzlyxTliA2BsH+ vwIA==
- Archived-at: <https://zsh.org/workers/54619>
- In-reply-to: <CAH+w=7YPRhd8FWUcTkECT_2qdvbP0g7-Kk-JZ58=cF7Bvrwb6g@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20260526153604.29508-1-mikachu@gmail.com> <CAH+w=7YPRhd8FWUcTkECT_2qdvbP0g7-Kk-JZ58=cF7Bvrwb6g@mail.gmail.com>
On Tue, May 26, 2026 at 7:23 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, May 26, 2026 at 8:36 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> >
> > Change getpmcommand to always do a lookup via findcmd() if it the entry
> > is not found in the hash and HASHLISTALL is unset. This will indirectly
> > respect HASHCMDS and add the single entry if it is set, look it up in
> > the hash if it was added and then HASHCMDS was unset, etc.
>
> This is a reasonable idea. It'll mostly affect non-interactive use,
> though? Because doesn't loading up compsys effectively force a
> hashlistall so the $commands array can be referenced in completers?
My git prompt immediately broke when I ran "rehash" interactively,
with the HASHLISTALL option unset. I can't find anything in
Completion/ for git grep -i hashlistall or hash_list_all. I'm not sure
what other mechanism it could be using to achieve this?
If I am in this state, then
% ls $commands[<tab>
---- no match for: `association key'
(without either of the patches in this thread)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author