From: Mikael Magnusson <mikachu@gmail.com>
To: Daniel Hahler <genml+zsh-workers@thequod.de>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: "whence -v" and function file names
Date: Mon, 18 May 2015 04:31:29 +0200 [thread overview]
Message-ID: <CAHYJk3TE6DDzTr-GJA8vpKAiC9ccSb_kgJuTv-oHwWc8j6fWuA@mail.gmail.com> (raw)
In-Reply-To: <5558FF85.1060400@thequod.de>
On Sun, May 17, 2015 at 10:52 PM, Daniel Hahler
<genml+zsh-workers@thequod.de> 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
prev parent reply other threads:[~2015-05-18 2:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-25 19:51 Bart Schaefer
2015-05-17 20:52 ` Daniel Hahler
2015-05-18 1:44 ` Bart Schaefer
2015-05-18 2:31 ` Mikael Magnusson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHYJk3TE6DDzTr-GJA8vpKAiC9ccSb_kgJuTv-oHwWc8j6fWuA@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=genml+zsh-workers@thequod.de \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).