From: Ian Tegebo <ian.tegebo@gmail.com>
To: zsh-users@sunsite.dk
Subject: Suggestion: Allow whence to report path(s) for autoloaded functions
Date: Tue, 21 Apr 2009 14:14:09 -0700 [thread overview]
Message-ID: <c21da7250904211414y609f2a62q426555c8feac39e@mail.gmail.com> (raw)
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
next reply other threads:[~2009-04-21 21:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-21 21:14 Ian Tegebo [this message]
2009-04-22 8:29 ` Peter Stephenson
2009-04-25 19:55 ` Bart Schaefer
2009-04-26 1:38 ` Ian Tegebo
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=c21da7250904211414y609f2a62q426555c8feac39e@mail.gmail.com \
--to=ian.tegebo@gmail.com \
--cc=zsh-users@sunsite.dk \
/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).