From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20869 invoked by alias); 2 Jan 2015 22:21:48 -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: X-Seq: 19671 Received: (qmail 28213 invoked from network); 2 Jan 2015 22:21:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [86.6.153.127] X-Spam: 0 X-Authority: v=2.1 cv=AoZg3YNP c=1 sm=1 tr=0 a=39NrsSuza2clQiZR/7fYWQ==:117 a=39NrsSuza2clQiZR/7fYWQ==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=D3EgW9cK0YOoFKl7RzcA:9 a=CjuIK1q_8ugA:10 Date: Fri, 2 Jan 2015 22:21:40 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: symlink chain. Message-ID: <20150102222140.1303a633@ntlworld.com> In-Reply-To: <54A7136C.1060102@eastlink.ca> References: <549E3A7B.9010209@eastlink.ca> <20150102170307.7d2e644a@ntlworld.com> <54A6E6B1.6070201@eastlink.ca> <20150102212422.3a761af5@ntlworld.com> <54A7136C.1060102@eastlink.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 02 Jan 2015 13:53:48 -0800 Ray Andrews wrote: > Another little gotcha: > > $ whence -s /usr/bin/zsh > /usr/bin/zsh -> /usr/local/bin/zsh-5.0.7-165-g2194da1 > > $ whence -sa /usr/bin/zsh > (nothing) > > > ... why would the '-a' switch kill the '-s' switch? It's nothing to do with "-s", it's the "-a". It searches the path for all occurrences. It still searches even if there's already a full path. This isn't a hell of a lot of use. diff --git a/Src/builtin.c b/Src/builtin.c index 47d1aa0..ebc0654 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3315,7 +3315,7 @@ bin_whence(char *nam, char **argv, Options ops, int func) /* Option -a is to search the entire path, * * rather than just looking for one match. */ - if (all) { + if (all && **argv != '/') { char **pp, *buf; pushheap(); pws