zsh-users
 help / color / mirror / code / Atom feed
From: "Lawrence Velázquez" <vq@larryv.me>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: symlink chain.
Date: Fri, 2 Jan 2015 15:27:50 -0500	[thread overview]
Message-ID: <74193E12-E858-4733-B713-3548A9C69393@larryv.me> (raw)
In-Reply-To: <54A6E6B1.6070201@eastlink.ca>

On Jan 2, 2015, at 1:42 PM, Ray Andrews <rayandrews@eastlink.ca> wrote:

> 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.

I would consider this undesirable noise, and I think most users would agree. The point of `whence` is to "indicate how [the argument] would be interpreted if used as a command name". I don't care about the chain of links, I just want to know what ends up being run.

> 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.)

That's fine, but it's easy enough for you to write a script or function that accomplishes what you need. It's not worth increasing complexity for everyone else.

> 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.

It looks like `showlinkchain` and `namei` just display link targets, which are often relative paths. `whence` resolves the targets to an absolute path, as befits its purpose.

vq

  reply	other threads:[~2015-01-02 20:28 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27  4:50 Ray Andrews
2014-12-27 23:38 ` Ray Andrews
2015-01-02 17:03 ` Peter Stephenson
2015-01-02 18:42   ` Ray Andrews
2015-01-02 20:27     ` Lawrence Velázquez [this message]
2015-01-02 21:19       ` Ray Andrews
2015-01-02 21:24     ` Peter Stephenson
2015-01-02 21:36       ` Ray Andrews
2015-01-02 21:53       ` Ray Andrews
2015-01-02 22:21         ` Peter Stephenson
2015-01-02 23:42           ` Ray Andrews
2015-01-03  1:08             ` Ray Andrews
2015-01-03  5:03               ` Bart Schaefer
2015-01-03  5:53                 ` Ray Andrews
2015-01-03  7:17                   ` Bart Schaefer
2015-01-03 17:14                     ` Ray Andrews
2015-01-03 20:02                       ` Bart Schaefer
2015-01-03 21:13                         ` Ray Andrews
2015-01-03 21:42                           ` Peter Stephenson
2015-01-03 22:42                             ` Ray Andrews
2015-01-04  0:41                               ` Bart Schaefer
2015-01-04  3:45                                 ` Ray Andrews
2015-01-04  0:40                           ` Bart Schaefer
2015-01-04  3:35                             ` Ray Andrews
2015-01-04  8:31                               ` Bart Schaefer
2015-01-04 20:49                                 ` Ray Andrews
2015-01-05  1:34                                   ` Bart Schaefer
2015-01-05  2:28                                     ` Lawrence Velázquez
2015-01-05  4:24                                       ` Ray Andrews
2015-01-02 22:22         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74193E12-E858-4733-B713-3548A9C69393@larryv.me \
    --to=vq@larryv.me \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).