Zsh Mailing List Archive
Messages sorted by:
Re: symlink chain.
- X-seq: zsh-users 19664
- From: Lawrence Velázquez <vq@xxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Subject: Re: symlink chain.
- Date: Fri, 2 Jan 2015 15:27:50 -0500
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=larryv.me; h= x-sasl-enc:content-type:mime-version:subject:from:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to; s= mesmtp; bh=sNvHS3H4mDnu7LJLQMjRbY1SZl0=; b=Rj+B4D7B9aTq/jq+l2PTf rSeVluuobbdiSSkBShM5vnIcEF73MlvNcHa86ScKMpKxEfXqZFzZCaot7AGWtKMo MCs+PztbgDHpsUSt1weZt2ijr8YHDgMx7Pdj1iDGtVuVey8G/nxA/rCLLAM0xdms v/dKT28lcMA1lvkZYOWrvI=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:content-type:mime-version :subject:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; s=smtpout; bh=sNvHS3H4mDnu7LJLQMjRbY1 SZl0=; b=TopiTI+ev1PeqrYfabMw9m9q764V4SGvey+aRRQapnCkWmkHFGCI1rM /hDRSXUm5KtrNcw048xsACkN/A3HizAe8RnmkbZLblk5rTS2Sclrd0rUdJGw+T16 yuKWB343f5VPCOrQeTlkMAL5BwuVWyMljTvn8wScV+27QUVEB8Do=
- In-reply-to: <54A6E6B1.email@example.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <549E3A7B.firstname.lastname@example.org> <email@example.com> <54A6E6B1.firstname.lastname@example.org>
On Jan 2, 2015, at 1:42 PM, Ray Andrews <rayandrews@xxxxxxxxxxx> 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 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.
Messages sorted by: