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

Re: Possible bug: HASH_CMDS has no observable effect

On Fri, Sep 11, 2020 at 4:48 PM Phil Pennock
<zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:
> On 2020-09-11 at 10:21 +0200, Roman Perepelitsa wrote:
> > From the documentation for HASH_CMDS option:
> >
> >   Note the location of each command the first time it is executed.
> >   Subsequent invocations of the same command will use the saved
> >   location, avoiding a path search. If this option is unset, no path
> >   hashing is done at all. However, when CORRECT is set, commands
> >   whose names do not appear in the functions or aliases hash tables
> >   are hashed in order to avoid reporting them as spelling errors.
> So, if and only if CORRECT is set, then non-present commands will be
> remembered as not present.

Could you clarify how this statement is related to my bug report?

In case this wasn't clear, in my bug report the output of the
following two commands is not what I expect:

  # print $+commands[rsync]
  # hash | grep rsync

The expected output:

  # print $+commands[rsync]
  # hash | grep rsync

The reason why I expect this output is because I've invoked rsync
right before these two commands while HASH_CMDS was in effect.


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