From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12596 invoked by alias); 5 Nov 2014 18:42:23 -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: 19351 Received: (qmail 5692 invoked from network); 5 Nov 2014 18:42:21 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=HYUtEE08 c=1 sm=1 tr=0 a=tDZUtGgdvB6RbretPev/jw==:117 a=tDZUtGgdvB6RbretPev/jw==:17 a=G8GL833Es-AA:10 a=N659UExz7-8A:10 a=JtFntoLIs1H8gxoeJDUA:9 a=pILNOxqGKmIA:10 Message-id: <545A7757.3090301@eastlink.ca> Date: Wed, 05 Nov 2014 11:15:35 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-version: 1.0 To: Oliver Kiddle Cc: Zsh Users Subject: Re: 'whence' question References: <545A6D66.3080500@eastlink.ca> <1458.1415209763@thecus.kiddle.eu> In-reply-to: <1458.1415209763@thecus.kiddle.eu> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 11/05/2014 09:49 AM, Oliver Kiddle wrote: > Ray Andrews wrote: >> ... yet, although '/usr/local/bin/zsh' is found, all of the other files >> found by >> 'whence -a zsh' above are missed. How is it that '/usr/local/bin/zsh' >> matches >> 'zsh*' but '/bin/zsh' does not? > Because /bin/zsh is hidden by /usr/local/bin/zsh. The commands are in a > hash table and there is only the one entry for zsh. > > Looking at the source, it seems that whence doesn't support both -a and > -m together though it doesn't produce an error. You anticipate me. '-am' was the first 'cure' I tried. > I'd agree that this isn't ideal. Note that whence -m does show a zsh > alias in addition to /usr/local/bin/zsh if there is one. I'm not sure what the intuitive answer might be. As Peter said, '-m' finds only the first *active* match, whereas '-a' pointedly keeps looking. Perhaps '-a' might accept wildcards? That would leave '-m' alone, but expand the usefulness of '-a' without (I hope) breaking anything.