From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28733 invoked from network); 21 Apr 2009 21:14:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Apr 2009 21:14:45 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 4960 invoked from network); 21 Apr 2009 21:14:30 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Apr 2009 21:14:30 -0000 Received: (qmail 3348 invoked by alias); 21 Apr 2009 21:14:14 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14056 Received: (qmail 3338 invoked from network); 21 Apr 2009 21:14:13 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 21 Apr 2009 21:14:13 -0000 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by bifrost.dotsrc.org (Postfix) with ESMTP id BCFBA8028C72 for ; Tue, 21 Apr 2009 23:13:11 +0200 (CEST) Received: by yw-out-2324.google.com with SMTP id 3so1614287ywj.81 for ; Tue, 21 Apr 2009 14:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=pNo3WfD8wMNWxlY46OU+Gi+0Y4sWxIuzRpbeTpSvucw=; b=skyiyhzqq51rtNF/F/XzpxiP/UM+Wio7blE5RkSxpLkCfQb5VlnzgmH7JsFrZgJCLL lRUGlCYn8xpZ2ggwvSg6B3VFOmu8+rflWhAyRTNdtVR+S6geYTtOkeizojma+t0WSqqW B/J5S0MCX344unxkSSYhd9gUzzXxEDZgpBypM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=KApOksLA1nq8BRM+R+7IuRsUpeUHOxUPb6wfZ4bf1sJqdCGjiOoGJBCn021WnOqMHy uxE9KWrWynqblQ4PdCE3f9Q95kY0TJgunDTK5jNIvhaLC69xvZzN2poBC61NeCQT7oZ7 AyW0cGa3kveJyAC8W5IYD5vTL+Du46VI2tRiI= MIME-Version: 1.0 Received: by 10.150.151.20 with SMTP id y20mr9211069ybd.51.1240348449097; Tue, 21 Apr 2009 14:14:09 -0700 (PDT) Date: Tue, 21 Apr 2009 14:14:09 -0700 Message-ID: Subject: Suggestion: Allow whence to report path(s) for autoloaded functions From: Ian Tegebo To: zsh-users@sunsite.dk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/9268/Tue Apr 21 17:10:12 2009 on bifrost X-Virus-Status: Clean Given a function name, I'm finding it useful to know where it's located within fpath: for p in $fpath; do [[ -e $p/_MYFUNC ]] && echo $p/_MYFUNC && break done (where fpath is something like ( /blah/path_one/ /blah/path_two/ ) ) It seems like 'whence -v _MYFUNC' is the intuitive place to look for this behavior. I'd imagine it working like: $ whence -v _MYFUNC _MYFUNC is a shell function defined in /blah/path/_MYFUNC Consequently, removing the '&& break' provides the expected result for 'whence -a': $ whence -av _MYFUNC _MYFUNC is a shell function defined in /blah/path_one/_MYFUNC _MYFUNC is a shell function defined in /blah/path_two/_MYFUNC (BTW, is zsh-workers@ more appropriate for discussing changes to builtins?) -- Ian Tegebo