From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12684 invoked by alias); 18 May 2015 02:31:33 -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: 35173 Received: (qmail 3675 invoked from network); 18 May 2015 02:31:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Q9Mh2G/Z24/y3zg2J26+v0MkzA0YE4ePa2ejSM9EPMM=; b=aR6cS6c33gpuEXeaaE/C3T6nHAFYqf7DHrzYHmdqJiEVHnXg0u/7ORIHwDMz5CheRU qWfid4RWcT9U+aYbHIU5mW1poQvda8EZZ1mekVaLIJ7fxnGrd88lTBxl+T5/qxFBxjc4 jgjZtdid7ZECNYXBdYvot1c3hgm8ppqoGPFcfabFdG04NihYp9bzXF7el2bEBWodGR3x xW8Z699yZOlpZ6qdfFex2CxP/7EsOGVn08IU8C158Je30uKBhyhHVIRvynVK3UzFRP5M OZlDKk7+wzsRRbqBnd7ZUblqaEw+n0nlDSScCOuhpvrQFlI/AaJOSiHAkIci1cphc8tG LiZw== MIME-Version: 1.0 X-Received: by 10.107.16.32 with SMTP id y32mr26083046ioi.53.1431916289209; Sun, 17 May 2015 19:31:29 -0700 (PDT) In-Reply-To: <5558FF85.1060400@thequod.de> References: <150425125149.ZM1489@torch.brasslantern.com> <5558FF85.1060400@thequod.de> Date: Mon, 18 May 2015 04:31:29 +0200 Message-ID: Subject: Re: "whence -v" and function file names From: Mikael Magnusson To: Daniel Hahler Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Sun, May 17, 2015 at 10:52 PM, Daniel Hahler wrote: > On 25.04.2015 21:51, Bart Schaefer wrote: > >> In workers/34903 I posted a patch to append the function filename (when >> useful) to the "whence -v" output for functions. I temporized: >> > > This is a nice addition, but it does not seem to work with compdef functions: > > % whence -v _git > _git is an autoload shell function > % git > % whence -v _git > _git is a shell function > > It would be nice if it could provide the path, at least with the second call. It's not autoloaded or compdef functions that don't work; % whence -v _zattr _zattr is a shell function from /usr/local/share/zsh/5.0.7-dev-2/functions.zwc/_zattr but rather, things that redefine themselves from within the function definition when run that don't; % grep '^_git()' **/_git _git() { % cat foo.z bar() {} baz() {baz() {}; baz} % source foo.z % whence -v bar baz bar is a shell function from foo.z baz is a shell function from foo.z % bar; baz % whence -v bar baz bar is a shell function from foo.z baz is a shell function -- Mikael Magnusson