From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2695 invoked by alias); 2 Jan 2015 18:43:01 -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: 19662 Received: (qmail 17564 invoked from network); 2 Jan 2015 18:43:00 -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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=X+5rdgje c=1 sm=1 tr=0 a=HOv8TPlFSS3eFj132gCofQ==:117 a=HOv8TPlFSS3eFj132gCofQ==:17 a=Hpgzp-inWqAA:10 a=N659UExz7-8A:10 a=BXSwD01h8dWMIoRTwwEA:9 a=pILNOxqGKmIA:10 Message-id: <54A6E6B1.6070201@eastlink.ca> Date: Fri, 02 Jan 2015 10:42:57 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: symlink chain. References: <549E3A7B.9010209@eastlink.ca> <20150102170307.7d2e644a@ntlworld.com> In-reply-to: <20150102170307.7d2e644a@ntlworld.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit 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.