From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29182 invoked from network); 11 Sep 2020 15:02:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Sep 2020 15:02:20 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1599836540; b=STa/n7H1MPiH4BYTCqxGXpR0XMccHLGCmCu7u6UiwaspQi8ltIc+qREGVetfryIWPxLP8rQzZ0 cNLI64ZlUC1b18RrEVlmeS7HcbkuQTEKJtIepJUrJEod8hI6sx01ovs7CndAog2070utHZi7Ez O7cWR/9fn6eHbl+4P/hVFVw8Pu0ZR513+Z9u5MtXtwqeN8CQmdPG1yLvHOvfJ2ontCrLdIchP2 EoptWJMiNKDI16hH98QfCLeLM+BQAguJZfEIPxVgKYyi6jvmUmb2Tcbkdii36mXGpQE6vLw02H mEXSeBrKnVUajb/UfpetC/xV3t2e0PaMZ1hn01Xy2sdzTA==; ARC-Authentication-Results: i=1; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1599836540; bh=RaoufroIu+qVOn25wmTt1W6t4gPa7PoyOQJJN1Fg+jI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=nEd597eiTB7ljHOKK3QGUJAtIlWu+8SzVsVVP3nlEEM4MaHzCombIykzq9qONQMNcwm7c0UDNl pMxmfGnEazqPhz3UvwR6vN51IE+mQ00BWILcD4XcwejZKjyzaCEl2NwLRyl4bU1ZmsyuZ6aGvO 46y1VGEZYNutZr6lpIetPhL568RZ53kR25iqCYCeLmdZeMkYojtjNvCwAbHEuAHJtG0eCWulhO bIxXrO6bPMCBp9mjhxsU5973WqpODl/vUrWKsuIofm2IxMo9QHf0YTcAKYIfeUU5HNGMDp5VNs E8chvmtqM9u1YqoiI5ixatiPu1P1DKB2mb/jOSBT9Wew4w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=YL3SMRDNvVMRqu91zxNTJd95gUYrAwrSZ98FCPR0Dcw=; b=KQrdREqXsG0pMgZjzvncgAnC4v bfe+ohGCRjKacD3by7ePLh4O+3PdOBvF+RoKhYmugfBaSBnn7e7lxVT33kAgN1dKFGDnW54YulJw5 Larzx7tnnBNfbsOHwZEtNw89L2dkV5llGloc4Yn7RY+tS46VjzirbVL7kV/tZve2MpKx/t8lMzRME jtIuKIu63ggiBnxmxjISncNIUeLtoMFTyIUECwqYGLsRFk8MKXG5nRMjQ0bB94+tLyRErPjWyI6zW o8pifOdVGgcbTp78ClHaefs38RLKD/en7szoZ0AIpzceIxkyrMYMvSDBZKzqswaKiJqkS/RGWXOAL wU5ncanQ==; Received: from authenticated user by zero.zsh.org with local id 1kGkZ9-000GpZ-8p; Fri, 11 Sep 2020 15:02:19 +0000 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 Received: from mail-io1-f52.google.com ([209.85.166.52]:39974) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kGkYr-000Ggr-Ds; Fri, 11 Sep 2020 15:02:02 +0000 Received: by mail-io1-f52.google.com with SMTP id j2so11345516ioj.7 for ; Fri, 11 Sep 2020 08:02:01 -0700 (PDT) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YL3SMRDNvVMRqu91zxNTJd95gUYrAwrSZ98FCPR0Dcw=; b=jAJW6Qlk2G9jwBxSwxx18TI55CxYbGP+jrO9tHA5ZIiGXz1MoOb4Na3LXiKnvIxQQd la1sgpKXhN7hg+TMSPZ69mtsLAOur62huHKE2MvOTYULchwJdrfj1Go4C8URzhUBxRoj pgQquOhgVVcSAnHSBgQ+ae5u5Z6eFBZTNfP5IErE751nKibS5uFa/++DhNgDfLERlNO2 I2xMyAPTex4cqCXL1B3OnxeEY/+6Dgw2hpiqLXXFy0ADYfpF5rbuSHrvzqRehO5krGeL 26fF3gtLBSQb5Gf8j2w4EAy+gRk4Ok0LbmHSyxQO1ex8l0Rx1bDHKNjZd1BTmqs1JW+B 5Kdg== X-Gm-Message-State: AOAM533W2p+5zlk4vslAtn224Tg1ZrzPe+2qmS5RweAGfw/JMWVISbGy 8n2ucVjo8cVtIdFlxgKU8yzdxm1kvY3wELjICVlLR9c/tEHQdA== X-Google-Smtp-Source: ABdhPJztse5OY6gnzdz+NB/nHOyw3ObUj5RCKwotEE3v1uLG++LO9LBccscE5Uj9JBg3bkNBpGKDlxFHfWbsr1NeoUE= X-Received: by 2002:a02:1004:: with SMTP id 4mr2316513jay.127.1599836520017; Fri, 11 Sep 2020 08:02:00 -0700 (PDT) MIME-Version: 1.0 References: <20200911144852.GA1669764@fullerene.field.pennock-tech.net> In-Reply-To: <20200911144852.GA1669764@fullerene.field.pennock-tech.net> From: Roman Perepelitsa Date: Fri, 11 Sep 2020 17:01:48 +0200 Message-ID: Subject: Re: Possible bug: HASH_CMDS has no observable effect To: Phil Pennock Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47368 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Fri, Sep 11, 2020 at 4:48 PM Phil Pennock 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.