Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 'whence' question



On 11/06/2014 01:53 PM, Bart Schaefer wrote:

A "regular glob" and a pattern aren't significantly different, but for
example you can't use (most) glob qualifiers in a pattern, and the meaning
of "/" is very different.  Note that "whence" is not a file search tool;
scanning a hash table of alias names with a glob comparing file type or
modification time would make no sense.
Quite so.  I'm limiting my thinking to files.

Interesting, it worked very nicely for me even as far back as zsh-4.2.6 on
an ancient virtual machine:

% whence -vsa ${(k)commands[(I)zsh*]}
Ooops, I thought I had to replace 'commands' with (in this case) 'zsh*'.
... works fine Bart. (But really, shouldn't it be a bit simpler?).

   $ whence -vsa ${(k)commands[(I)zsh*]}

   zsh is /usr/local/bin/zsh -> /usr/local/bin/zsh-test2-orig-rebuild
   zsh is /usr/bin/zsh -> /usr/local/bin/zsh-test2-orig-rebuild
   zsh is /bin/zsh -> /usr/local/bin/zsh-test2-orig-rebuild
   zsh-ok is /usr/local/bin/zsh-ok
   zsh-test1 is /usr/local/bin/zsh-test1
   zsh-test2-orig-rebuild is /usr/local/bin/zsh-test2-orig-rebuild





Messages sorted by: Reverse Date, Date, Thread, Author