From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11165 invoked by alias); 1 Apr 2018 17:44:38 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23300 Received: (qmail 10376 invoked by uid 1010); 1 Apr 2018 17:44:38 -0000 X-Qmail-Scanner-Diagnostics: from out5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.29):SA:0(-2.6/5.0):. Processed in 2.636389 secs); 01 Apr 2018 17:44:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=HRLiGW 2G06uBS2MSIIJ2f/rd6+MWMEXJMBLcK0qN+Do=; b=DKKnfutq5iFeFMhBMJEYAR h+5TrD7F4pdGTaTdgGVupbSVmMURGcHXIh/orwlX0oYmcTkPAVECNdjdbaxAIXKC 90ikRzQpOdIDlo+xahVTHY8/RM5gh8/TZoH5Yrf4iBHsbGCqvBE1/zISWVx0bYXI pRsy0ROKxJwtlwzw88zWRlOy4Y9wXuYVq83/Jd8ndVe/n1MlX4iJkJZzYq/zAtCR RhUvAnKUJbPTKg2N9kj9hTHl5xQU+n8mDW9G8FpH1P4Wk5IeRnr8X+K9qWozOx2n PJHfMPVKJqeekOO2BCI3wpvGF6nKzPkz7VNtdaX43eVk4xPb/bl33q5LmvVX/6YQ == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=HRLiGW 2G06uBS2MSIIJ2f/rd6+MWMEXJMBLcK0qN+Do=; b=lfUKTNa+K86CONljIJCDyX hfVIEkXNadyROThq6ZgpdOCtVt6kL7Q2E5ceTHTnf6OwNYUfSRLIGQXAKVraeEye uuPsNHkSicHLORNP0uvyM/NFKXmJgIEgQVz+PPUVyL5RnXqfeZfXCa60//eN1FUf QmxiT4xzFqy1CYKZDDWreOXi5BXp5RqNkddGbKgCwCMRoGgwW4s/xIZccQTo+mwp zRu3Zv0reqOEzGPY502MHwrFtl1Dv8nQoynXLo/LiNijJ+BA4KeGjSn+E6rVeWu+ YVPyXfAeHUeizr3BLwsAHFC6KIqdnfd3XAT4rapkGk3/lKxX+obeekkW14COI18Q == X-ME-Sender: Message-Id: <1522604036.2902094.1322956328.767274EF@webmail.messagingengine.com> From: Daniel Shahaf To: zsh-users@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-bb419338 In-Reply-To: Date: Sun, 01 Apr 2018 17:33:56 +0000 References: <6935145d-785f-f2dd-d4f2-e7ea627e2bc3@eastlink.ca> Subject: Re: whence (was Re: local unfunction) Bart Schaefer wrote on Sat, 31 Mar 2018 18:18 -0700: > The other confusion is that -m never searches $path. It always > populates the command hash table if necessary and then searches the > hash table. > > % path=(./Src $path) > % whence zsh > ./Src/zsh > % whence -a zsh > ./Src/zsh > /bin/zsh > % whence -m zsh > /bin/zsh > % So, -m can lie if 'rehash' hasn't been run since $PATH was last changed? I'm having trouble seeing why this is useful behaviour. (Yes, 'rehash' could be expensive, but even so, why does -m give outdated results as opposed to just erroring out?)