From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23815 invoked by alias); 2 Jan 2015 20:28:11 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19664 Received: (qmail 26863 invoked from network); 2 Jan 2015 20:27:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 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= X-Sasl-enc: mQLlp/o8Ox0/1JpIpoNMm/4unuPzhhxKEF6NcNKHKHHy 1420230471 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: symlink chain. From: =?windows-1252?Q?Lawrence_Vel=E1zquez?= In-Reply-To: <54A6E6B1.6070201@eastlink.ca> Date: Fri, 2 Jan 2015 15:27:50 -0500 Cc: zsh-users@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <74193E12-E858-4733-B713-3548A9C69393@larryv.me> References: <549E3A7B.9010209@eastlink.ca> <20150102170307.7d2e644a@ntlworld.com> <54A6E6B1.6070201@eastlink.ca> To: Ray Andrews X-Mailer: Apple Mail (2.1993) On Jan 2, 2015, at 1:42 PM, Ray Andrews 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: >=20 > $ whence -masv "zsh" > zsh-5.0.7-165-g2194da1 >=20 > 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 >=20 > ... 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=