Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: symlink chain.
On 01/02/2015 09:03 AM, Peter Stephenson wrote:
Thanks Peter, terse, but effective:
$ showlinkchain /usr/bin/zsh
/etc/alternatives/zsh-usrbin
/usr/local/bin/zsh
zsh-5.0.7-165-g2194da1
I'm using a cut down 'namei' to give this:
l zsh -> /etc/alternatives/zsh-usrbin
l zsh-usrbin -> /usr/local/bin/zsh
l zsh -> zsh-5.0.7-165-g2194da1
... which is prettier.
Do you think 'whence' would benefit from showing the chain if '-s' is
specified? Maybe it's just me, but I want no surprises when I use
whence, I want complete information about what any typed command it
actually going to end up executing and a roadmap of any and all links as
to how it got there. Again, maybe it's only me, but when I first
started using the development builds, I was never sure what the hell was
actually going on because I have three 'zsh' on my path, each of which
is a chain of links going hither and yon pointing to various and sundry
binaries all over the place. Only once I untangled these Gordian Knots
could I end up with this:
$ whence -masv "zsh"
zsh-5.0.7-165-g2194da1
zsh is /usr/local/bin/zsh -> /usr/local/bin/zsh-5.0.7-165-g2194da1
zsh is /usr/bin/zsh -> /usr/local/bin/zsh-5.0.7-165-g2194da1
zsh is /bin/zsh -> /usr/local/bin/zsh-5.0.7-165-g2194da1
... so I actually know what the heck is happening. (And when Debian
breaks it, I can fix it fast.)
BTW, how is it that both your method and 'namei' show paths except for
the final binary target, whereas the 'whence' output just above shows
all paths including for the final binary? Consistency is not a zsh virtue.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author