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

Re: 'whence' question



On Wed, 05 Nov 2014 10:33:10 -0800
Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> This seems right, the '-a' switch doesn't take wildcards:
> 
> 
>       $ whence -a zsh
>     /usr/local/bin/zsh
>     /usr/bin/zsh
>     /bin/zsh
> 
> ... however the '-m' switch accepts wildcards:
> 
> 
>     $ whence -m "zsh*"
>     /usr/local/bin/zsh
>     /usr/local/bin/zsh-ok
>     /usr/local/bin/zsh-test1
>     /usr/local/bin/zsh-test2-orig-rebuild
>     /bin/zsh4
>     /bin/zsh5
> 
> ... yet, although '/usr/local/bin/zsh' is found, all of the other files 
> found by
> 'whence -a zsh' above are missed. How is it that '/usr/local/bin/zsh' 
> matches
> 'zsh*' but '/bin/zsh' does not?

It's telling you the first instance of each distinct command it finds.
To find all instances, you need to specify -a as well.

pws



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