Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "whence -v" and function file names
- X-seq: zsh-workers 35173
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- Subject: Re: "whence -v" and function file names
- Date: Mon, 18 May 2015 04:31:29 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- 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==
- In-reply-to: <5558FF85.1060400@thequod.de>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <150425125149.ZM1489@torch.brasslantern.com> <5558FF85.1060400@thequod.de>
On Sun, May 17, 2015 at 10:52 PM, Daniel Hahler
<genml+zsh-workers@xxxxxxxxxx> 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 <tab>
> % 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author