Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 'whence' question
On Tue, Nov 11, 2014 at 10:16 AM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> FIRST OCCURRENCE OF FILES ONLY? I'D EXPECT THE '-m' FORM TO BE
> THE DEFAULT, THE DOC IS CLEAR THAT ALL COMMAND FORMS ARE
> SEARCHED.
I'm not sure what you're hollering about. Searching all forms has
nothing to do with whether the search is for a literal string (which
is the default) or for a pattern (which requires the -m option to be
explicitly stated). "All command forms" means aliases, reserved
words, and functions, and your example found those aliases.
> $ whence zsh*
> /usr/local/bin/zsh
> /usr/local/bin/zsh-RayStyle1
I'm 99.75% sure that you'd see
$ echo zsh*
zsh
zsh-RayStyle1
and that this is entirely the reason you get the above result from whence.
> $ whence "zsh*"
> (nothing)
Well, yeah. You did not specify -m and there is no command or
function whose name literally is zee ess aitch star, so whence found
nothing.
> REMOVE '-v' AND ALIASES 'BECOME' FILES! :(
Well, no, they don't become files, the become whatever is on the
right-hand-side of the alias.
% alias zsh='echo good golly miss molly'
% whence -a zsh
echo good golly miss molly
/bin/zsh
It's not the fault of "whence" that you don't find this to be as
useful as the -v output.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author