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

Re: RFC PATCH: fix lookup in $commands array when HASHLISTALL is unset



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