Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possible bug: HASH_CMDS has no observable effect
- X-seq: zsh-workers 47368
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- Subject: Re: Possible bug: HASH_CMDS has no observable effect
- Date: Fri, 11 Sep 2020 17:01:48 +0200
- Archived-at: <https://zsh.org/workers/47368>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-09/CAN%3D4vMrFhmKitKbdPdabZ1Ey9cjmEf62GVaGVMxn6T9AjZVc8Q%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-io1-f52.google.com) smtp.remote-ip=209.85.166.52; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YL3SMRDNvVMRqu91zxNTJd95gUYrAwrSZ98FCPR0Dcw=; b=iHnBqwn5ixvAirrBNeho2L6GNEjBlkqJ5reEGXZmLbKh/fxrDtuAHj+sRc4F4rmsLH Ss3ZIk6U6agz2icTHMJPsHjWbmni/x3Ppi+Ej4unTXOxMSgfkTB51ZoTFJPJmyiWHJZq MA93r4MuxEQFP8ZIKmzT9Ngqv2Vge+tlO6liSyPasylxrMJQne4KMP5vy6ToRfBK70ep +P1oWt81DRXR7N88wK+qlQ5Ww5gD2HZeWgvaorB23oSpGoMg52NSzmenql2Hebw2Fo3s 5BkBObllcn6jZ57QrBPiQQBD8M45uiOyOhFGLr/dwvqvLVUt4BatEW9C+T/f4VsuqD72 +WPA==
- In-reply-to: <20200911144852.GA1669764@fullerene.field.pennock-tech.net>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <CAN=4vMqM-2Vu0n+QTbA9B_9z=3DKDdiOKbDRRaGGOG2rbY7-jA@mail.gmail.com> <20200911144852.GA1669764@fullerene.field.pennock-tech.net>
- Sender: zsh-workers-request@xxxxxxx
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]
0
# hash | grep rsync
#
The expected output:
# print $+commands[rsync]
1
# hash | grep rsync
rsync=/usr/bin/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.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author