From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20507 invoked by alias); 11 Nov 2014 19:33:18 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33682 Received: (qmail 4383 invoked from network); 11 Nov 2014 19:33:16 -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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=wn70HNTdD1tiDhmn7jzrpEW48DiT4Drab1bXOBm+9sQ=; b=JReQUC/OLEa4GaqaLG/+R9gsTaz7nNu9fAoJGpox9gthNOs4eV2zoE8GtnmRgszhGc I2bHPd+swyDgsS0YqOFTVH+1+HXRT5jDLNBpOuUz3OALsxj7zNIIrjuGacbU/zbho82X i5gbPgs/eiXm6/jcXF+hmQ03Kg4TlDhExKPvgRgakGdFPABh/34AFChJBcbuLe0I/z/v B8j13uSvHx8/ijw3YjCZGgoHy13SVicaI8OYZcJGV0pHUT/9l4W94Btau5zND6Ix8zap ZDyRSOAH+6ebJYQfWX5DmL66QCC6hpk0ZrfT1aziW3A9p+4bsgD64om/33/YPNm9sMzQ 9ToA== X-Gm-Message-State: ALoCoQkeRgHnjB77v95kptvjUDqmpJIhfSoLLgLVa6KI+pi/C28KaImZvxaTrIIQz8p8cTK7WK7t MIME-Version: 1.0 X-Received: by 10.194.203.201 with SMTP id ks9mr55340696wjc.105.1415734393799; Tue, 11 Nov 2014 11:33:13 -0800 (PST) In-Reply-To: <54625276.2070901@eastlink.ca> References: <545A6D66.3080500@eastlink.ca> <1458.1415209763@thecus.kiddle.eu> <20141105180035.22f6e9b1@pwslap01u.europe.root.pri> <141105204330.ZM2973@torch.brasslantern.com> <20141106211017.11b8848a@pws-pc.ntlworld.com> <20141108204123.1fcc698e@pws-pc.ntlworld.com> <141109105139.ZM27532@torch.brasslantern.com> <54625276.2070901@eastlink.ca> Date: Tue, 11 Nov 2014 11:33:13 -0800 Message-ID: Subject: Re: 'whence' question From: Bart Schaefer To: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On Tue, Nov 11, 2014 at 10:16 AM, Ray Andrews wrote: > > FIRST OCCURRENCE OF FILES ONLY? I'D EXPECT THE '-m' FORM TO BE > THE DEFAULT, THE DOC IS CLEAR THAT ALL COMMAND FORMS ARE > SEARCHED. I'm not sure what you're hollering about. Searching all forms has nothing to do with whether the search is for a literal string (which is the default) or for a pattern (which requires the -m option to be explicitly stated). "All command forms" means aliases, reserved words, and functions, and your example found those aliases. > $ whence zsh* > /usr/local/bin/zsh > /usr/local/bin/zsh-RayStyle1 I'm 99.75% sure that you'd see $ echo zsh* zsh zsh-RayStyle1 and that this is entirely the reason you get the above result from whence. > $ whence "zsh*" > (nothing) Well, yeah. You did not specify -m and there is no command or function whose name literally is zee ess aitch star, so whence found nothing. > REMOVE '-v' AND ALIASES 'BECOME' FILES! :( Well, no, they don't become files, the become whatever is on the right-hand-side of the alias. % alias zsh='echo good golly miss molly' % whence -a zsh echo good golly miss molly /bin/zsh It's not the fault of "whence" that you don't find this to be as useful as the -v output.