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=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17972 invoked from network); 13 Sep 2020 22:24:43 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Sep 2020 22:24:43 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1600035884; b=giBn3NgxjI11qFo3RENK3lltJaPI0OjZgMvdEiPAs/Yhh/BdBNbOlcCZCuA2EVqWI12T5bzMm1 RqlP/kS9y53Nbg4I3yhD9FkWnTbOvZMrhqE6g1hRAylquAhaGLMdB+OiUhxah01SAkkzc71Ytm szwQ5WVZ1sso8mZIQ3fhWlN3Hb/4trFpep229sI/VD2gqcu7hvM4UmxenPUx6ErHNnYrwDmStZ lM/0yu2tBlmqErviKiVmMIXdDYAC3IlaeUee0mY8WqnXhSNLRtJ1Op8SHRse1mH06o7Hr8NOiT hjC6owYbk/5mG5Mg+3QJzp9d2rNeZSIGtO8IjqZAU7M+Fw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f42.google.com) smtp.remote-ip=209.85.210.42; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1600035884; bh=qKXzDEm0hPjMtY3YSjW9YLWBi/EHDjNl2ClmCg1nn6Y=; 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=NkM67TN9zFdPq2vIeGnYmlzScqBxQ9ojO3w034BVeqWxW1S46nHn/JhrkiSree0GHDFeHtRl0Y hB5YApIf+sKQgfV+jBqo64D4AtnXPKo0mY1ouYulEQYjJCJV1Jan7mY0jVG715D2rXHBBqrnTz TTGIh8ZESI6TwrOw1D392xvb++Bkb9QW/C3oQ/L34uhlMsSKh1oUIEu9V3cMIsLMOwuiwDhBGR IpphIb/HYayKBXSKk4Uj0JYknjUNHcvbj4dJK/pEVUXUOkWQ5/Pw7rPI/1QMbovV9pOeTPeOK7 OK0THS3/IcyH35iKP944TsiTri9vSTd2rRlCklpXeo1sWQ==; 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=ZLpn5kE2PAgni0MbbpbBpqJpcm58avjTpJfzlemDvCc=; b=fl0I0+SIZq0ftcXYUO4p5nJ1ht ekFnCTRVZdoZ1nnFg1fSsZSUX7r1ofsio+USBea0tWJMcQGYjitnDoPgwX5B/ME1K66rQIFl2Bqdg 8DJb5R1BLBIiJ79/E8Suosb45M+UPPjz7cAWqCkLSUfitPZiQ2Yoq74g54lQQN5S2yyOkjnzuE27s s/UEf77AIg582UgnZ7mNfWWx5X5xmapYn5reLMd+lUsZU/boMlMHJnWpcV9zcFa64XpaucwS+NUJd SRa46Qo6rNiI0oj9a7aHTBzhSAgyS/2WolwI6t6R5J3UNNhddb7aqMTdnuO6khc99CdC33Rehztwn R1xfdoxw==; Received: from authenticated user by zero.zsh.org with local id 1kHaQN-0009Cj-Pl; Sun, 13 Sep 2020 22:24:43 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f42.google.com) smtp.remote-ip=209.85.210.42; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f42.google.com ([209.85.210.42]:38153) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kHaQA-00093Y-JC; Sun, 13 Sep 2020 22:24:31 +0000 Received: by mail-ot1-f42.google.com with SMTP id y5so13209321otg.5 for ; Sun, 13 Sep 2020 15:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZLpn5kE2PAgni0MbbpbBpqJpcm58avjTpJfzlemDvCc=; b=PtvyImUrhLbXc0Co4YKOK7WNTvlrwbHtq4jEi/RaSEHeECBSfSJm/QSUY/xjKurnoH v9vn1Xn7ZX/xhBi8zGfnnjBHpBE527OfTS7o/5GAJ7GwYzDXblStzOdiCaPTkegubOXz rnklzyQxW82FIp3i0igSvhCgbS7hfon0exMnIX9jvRheloN8G21KRQWPBfHq1uZc5rrc 10PXbSPnN4Xdmd2QQgucg0G+bo2/UDMcRG7RfsT0tJGMdJleGfbKCjzAjXEhdZKffeSA GpWq7N8JP+ljb/+Q0pPdQUcGLZiukzWf1CuDAe9CNENGhRkKcKveJjnUX5G2DDDddN7D hF7g== 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=ZLpn5kE2PAgni0MbbpbBpqJpcm58avjTpJfzlemDvCc=; b=JkLSVa6wmk7ZRTsS8W5x/1rtQatYg/nI9EUmUMFpea6QKfdVuPZ6aQTwneXsVUw+1D nw6Yxt/lXBEYjtF/AwGaczENJB8DDmq2RDXpt31K5O+w5o1g2kL/KTR/fBqmOhh/EQ8b Co9g3/bJrMcgi0LQvZ8iMx+603U3KFWHaQJtn9CT/hUod5PakwxL4Oczdex9Q57wZqgF 9li/qzfn53ERoUAsFSJ1tTrSKPwk1h18GiR341Lf5HCmre0e90ylYG/8TnXNWNxPnKoM GWQAXDr90PV925/QQOxSNIAarQdpfAojumafv0t4ows4Ojg1fBcHdmO+A9sutB8VHrzf 3fgQ== X-Gm-Message-State: AOAM533+jxpbPAyGrz9IsD5fH6vGdsAWUkE0zWqh+Yj1yRG9KbiSbBmZ L2OB5923PuNgUBNYJSgl+uAumjQ28ux1jbn7T5fodaaDnDmPbdR8 X-Google-Smtp-Source: ABdhPJxSOAOVr5Gdwl97pFmlTFLvcZfcn54L5DUnrPYVnELxVtq86L/dBUa/yoqQ3yGzzThjKk+Ept/4hAcTAIbjzKk= X-Received: by 2002:a9d:7541:: with SMTP id b1mr7709233otl.229.1600035869578; Sun, 13 Sep 2020 15:24:29 -0700 (PDT) MIME-Version: 1.0 References: <20200911144852.GA1669764@fullerene.field.pennock-tech.net> <20200911161000.GA1679994@fullerene.field.pennock-tech.net> In-Reply-To: From: Bart Schaefer Date: Sun, 13 Sep 2020 15:24:18 -0700 Message-ID: Subject: Re: Possible bug: HASH_CMDS has no observable effect To: Roman Perepelitsa Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47380 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 Sun, Sep 13, 2020 at 2:31 AM Roman Perepelitsa wrote: > > This is what I expected to happen but that's not what actually > happens. Sometimes, when HASH_CMDS is set, a successfully invoked > command does not get hashed. Ah ... recall that several messages back, I wrote: > A complication of this is that the completion system also invokes > command hashing in order to be able to use the $commands associative > array. So if you use completion at all, you might also find that > command (re)hashing works differently than in a "zsh -f" shell. I forgot that even with zsh -f, interactive shells load the zsh/compctl and zsh/complete modules. Those are causing the $commands hash to be immediately repopulated as soon as $path is changed, and HASH_DIRS is also set by default, so further updates to the hash table do not occur. If you were to create /tmp/foo/bar before adding /tmp/foo to the path, you would see what you expect. It appears that throughout this thread I've been conflating the command being "not found" by correction [spckword()] with the command being "not found" by execute(). Sorry about that.