Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: whence (was Re: local unfunction)
- X-seq: zsh-users 23300
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: whence (was Re: local unfunction)
- Date: Sun, 01 Apr 2018 17:33:56 +0000
- 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 ==
- In-reply-to: <CAH+w=7ane3_cT75hyZYp_4Zd1aT1eeDbbW9CVpBTZjAhKFQ+Qw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAH+w=7Zz4HMfB_RA5nHr_i_iwKvD=S0QOjcogc0Y0OYSXv0JXw@mail.gmail.com> <6935145d-785f-f2dd-d4f2-e7ea627e2bc3@eastlink.ca> <CAH+w=7ane3_cT75hyZYp_4Zd1aT1eeDbbW9CVpBTZjAhKFQ+Qw@mail.gmail.com>
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?)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author