From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7372 invoked by alias); 6 Nov 2014 22:42:10 -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: 19355 Received: (qmail 21175 invoked from network); 6 Nov 2014 22:42:08 -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,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_FmWufnhVc9BKKAGpkAXILg)" X-Authority-Analysis: v=2.1 cv=HYUtEE08 c=1 sm=1 tr=0 a=WaDuc+ZEBMlF3jy0Tbv8PA==:117 a=WaDuc+ZEBMlF3jy0Tbv8PA==:17 a=G8GL833Es-AA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=9iDbn-4jx3cA:10 a=cKsnjEOsciEA:10 a=daEgULg8ppUhbvXkJVkA:9 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=idvVPne5xLs_xAdEOZ8A:9 a=SoDjAaG0FpHXZRcK:21 a=_W_S_7VecoQA:10 Message-id: <545C010F.8030109@eastlink.ca> Date: Thu, 06 Nov 2014 15:15:27 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.2.0 To: zsh-users@zsh.org Subject: Re: 'whence' question References: <545A6D66.3080500@eastlink.ca> <1458.1415209763@thecus.kiddle.eu> <20141105180035.22f6e9b1@pwslap01u.europe.root.pri> <141105204330.ZM2973@torch.brasslantern.com> <545BEC0F.8080805@eastlink.ca> In-reply-to: --Boundary_(ID_FmWufnhVc9BKKAGpkAXILg) Content-type: text/plain; CHARSET=US-ASCII; format=flowed Content-transfer-encoding: 7BIT On 11/06/2014 01:53 PM, Bart Schaefer wrote: > > A "regular glob" and a pattern aren't significantly different, but for > example you can't use (most) glob qualifiers in a pattern, and the meaning > of "/" is very different. Note that "whence" is not a file search tool; > scanning a hash table of alias names with a glob comparing file type or > modification time would make no sense. Quite so. I'm limiting my thinking to files. > > Interesting, it worked very nicely for me even as far back as zsh-4.2.6 on > an ancient virtual machine: > > % whence -vsa ${(k)commands[(I)zsh*]} Ooops, I thought I had to replace 'commands' with (in this case) 'zsh*'. ... works fine Bart. (But really, shouldn't it be a bit simpler?). $ whence -vsa ${(k)commands[(I)zsh*]} zsh is /usr/local/bin/zsh -> /usr/local/bin/zsh-test2-orig-rebuild zsh is /usr/bin/zsh -> /usr/local/bin/zsh-test2-orig-rebuild zsh is /bin/zsh -> /usr/local/bin/zsh-test2-orig-rebuild zsh-ok is /usr/local/bin/zsh-ok zsh-test1 is /usr/local/bin/zsh-test1 zsh-test2-orig-rebuild is /usr/local/bin/zsh-test2-orig-rebuild --Boundary_(ID_FmWufnhVc9BKKAGpkAXILg)--