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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26796 invoked from network); 13 Sep 2020 09:32:11 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Sep 2020 09:32:11 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1599989531; b=WkCR3iQ1aVTmYGk3aFrmgzH9MXvObAE+MJl76+leKJUKw667jU+gA5OoJaAMutlyi/rH39ngN8 m1W4oJ/DX0zovZYxH9TD24R5pho4T6p0QBmqoTFPueWlpZ3PQVDQh7pFnYDlJQlIuWIL0sE38V ioAphskMBXRLZfxMem/2z2EUOTIpo0GDM58WJ6+0EejdzFOYc/BdSshyIw2Ljflqe8c9zl6HDw 9BiGrkKHjla4Mg5ebW4k2sx0VPweDcirAFgHCUAFu2W9hvblr2IPfuyKSFNmE497yZscCq9Wil ighitd+m2xiTk/ooT8IarxJO8T8SsMYvqGnTfEoM4AuAig==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f170.google.com) smtp.remote-ip=209.85.166.170; 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=1599989531; bh=YFJMSRTelhras6NJPOgbcfVn6DFwKFWVnClRpspL7O8=; 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=F91DICuIFo1ZnVHhYn2AbKnK8+kjAKZzRMUbi6FRR1PStDG/jVi2LrZ9tShurimsN6Gtc/7UED tEWK4UkKYo1pF+CFPkvStY2V70y3FtTnjW0+gInFLZsov6zqo0/rmL6VRCN5Zm32BatH8Mmnbj tDQku5BjGlaRqzVhIooRv5AJBtQvsD33GnOkZ1QQFg6g7xrm9Oym4XKG4h4OH+rxI8RJjZvDhG 1fSQX29YL9n/BPmCBIsypX9GbsPrkkGJxbgdkSAlNrVOTcDTseX4oa1VtCMWJ1NHuqiZ5FS4iw sg420nXWAiNQDM2744wf8qdys6n4sM6hK4VmmMAPOl04sQ==; 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=6G135OQcOPNJMk3xbGx+6yNq2CzHBqD8igcH96LRmmY=; b=mj5d+nTF5bY9Y+ya7it6fBC8Se RkHYMlMI22nlAS9Hj9GhMy8KvuPxIeKR9CwDtanscpIVPD+8jgJgq3nmD9KHi/d30V+LncpfpaEc7 clMKir3We6AKc2ESY/8zLz/XcvK8s65NJs6Nol8HdK41Zekc9j3aPPp17cZ3PK2vugM8A242Olw3L 25gbIy1SxGE9Y6qnI0tZm6DaLy7UEola1Ve1wy1CdP1TFXMUS/HcvHaqDENY3WJppBQByeKntxkG6 +LeqLdbnrckGekJUF4/rMVEMYYV9TK2tRlhA+3AXVzWtqt2PzTIqJQqwGNyoR/25M8WsUx1IQUiL7 BukmGVCw==; Received: from authenticated user by zero.zsh.org with local id 1kHOMi-000Glg-Os; Sun, 13 Sep 2020 09:32:08 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f170.google.com) smtp.remote-ip=209.85.166.170; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-il1-f170.google.com ([209.85.166.170]:44439) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kHOMR-000GdM-5o; Sun, 13 Sep 2020 09:31:52 +0000 Received: by mail-il1-f170.google.com with SMTP id h11so12864377ilj.11 for ; Sun, 13 Sep 2020 02:31:51 -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=6G135OQcOPNJMk3xbGx+6yNq2CzHBqD8igcH96LRmmY=; b=jjNp8OXKtgkMIhJOZ8LFMX+AevOZy4yUfWdbtzvcM6o38MX3aexiUPwM/cWnKD4cHq Nqk0LZRsvcx3ZZ1N0+QpLEWlQYGR/yED5nO8h+uuuG57yOnh13oBxHW6Ih7NKnF3iQK9 Gv3+KVdZg2Aabyqkk/9A6vV4N5Gy59l+71kBpKVpQpdP49I9KAMok7KYMpzw9VB7k+hv onrBF8pi1RFsebeQ1p4z3n32Wfq8YIM3SJe++u1wPY7dRqtQSqlzDe5Grt5QtfNwPcZJ kp1tQ+yc2f22rRlc68SPmhXdmgkU1Js5RkMmwDPIkL0dVfTIYhZ6fmMDlTMeSk7G0pCo cr5w== 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=6G135OQcOPNJMk3xbGx+6yNq2CzHBqD8igcH96LRmmY=; b=SAgOAlIeUic+nY1p5knSLM0uqhw0N0ijTpcOnBT2Rkc1CNoqjEiSa4v+VV0a2WD9X8 0VuAhUsmBlY2MOn6j04q5XHBm9n0hYGxX7saskqQWG7dkFjvBhh6pWsHZ4gmvgoTf9Ch F/pqDJQgE/WZ1KbfOhlXN5NAOx6uLyqoZPJOW1rkK4c2vvoDsSTiZXfyYTZJzpyBNCTy bwHPUGpkLjdIF2tAsu7AjftGbKwp2yb+aZBFZxQthXcbi/+Pb7jdrr241x/xJNTomcqk XmAlk54ZjnSoFFJJieusMTSOmLKSjNij0Y9Vsez0WiPmIryV9PmXxSJ38cJIRb27rGYx u8SA== X-Gm-Message-State: AOAM531kLOsUZTGsGjDmfFprWQjjwkGUr1Y03tA06706B+SamOOyKC4L kEuofKPXd5/oEwd44EpQEXhEdsY5cOrQeMFuz08= X-Google-Smtp-Source: ABdhPJy4AdLDZTWmdUtMa1g3xInXRrfNt0+TrmscEzWB2eqtbjLSZuyZVe6roT3VT4mdrAbfaG0OTNpDu1WQ+Jxyzg8= X-Received: by 2002:a92:1a03:: with SMTP id a3mr7857879ila.304.1599989509849; Sun, 13 Sep 2020 02:31:49 -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: Roman Perepelitsa Date: Sun, 13 Sep 2020 11:31:38 +0200 Message-ID: Subject: Re: Possible bug: HASH_CMDS has no observable effect To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47377 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 Sat, Sep 12, 2020 at 10:41 PM Bart Schaefer wrote: > > That's exactly how it works. The search in execute() is only done if > an absolute file location for the command isn't provided by the > parent, which only occurs if HASH_CMDS is not set. 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. Here's a new test case that doesn't use docker. % zsh -f % mkdir /tmp/foo % path+=(/tmp/foo) % print $+commands[bar] 0 % print 'echo hello' >/tmp/foo/bar % chmod +x /tmp/foo/bar % bar hello % print $+commands[bar] 0 The output of the last command should be "1", right? Everything else looks as expected. Roman.