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

Re: whence defect?



On Wed, Mar 28, 2018 at 6:06 AM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
>    /bin $ whence -aS zsh
>    ./zsh
>    /usr/local/bin/zsh -> /aWorking/Bin/zsh5.3
>    /usr/bin/zsh -> /aWorking/Bin/zsh5.3
>    /bin/zsh -> /aWorking/Bin/zsh5.3
>
>    /bin $
>
> Can that be right? I'd probably prefer that the duplicate find of /bin/zsh
> was detected (current directory and '/bin' explicitly) and removed

That'd get very strange to keep track of, given that "." could appear
anywhere in the path, including at the end.  You did ask (-a) for ALL
occurrences.

> perhaps noted, but if it is to show up twice why would the 'dot' version not
> show that it's a link as the explicit entry does?

Hmm.  The code to print whether a command is a symbolic link is using
zsh's internal symlink-chasing routine, but that method only works for
file names starting with "/".



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