From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25293 invoked by alias); 9 Dec 2013 09:02:40 -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: 18204 Received: (qmail 23686 invoked from network); 9 Dec 2013 09:02:26 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Mon, 9 Dec 2013 09:53:30 +0100 From: Vincent Lefevre To: zsh-users@zsh.org Subject: Re: how to get the absolute pathname of the current shell? Message-ID: <20131209085330.GA30856@xvii.vinc17.org> Mail-Followup-To: zsh-users@zsh.org References: <20131206132751.GA6509@ypig.lip.ens-lyon.fr> <131206083020.ZM1054@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <131206083020.ZM1054@torch.brasslantern.com> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6305-vl-r59709 (2013-04-16) On 2013-12-06 08:30:20 -0800, Bart Schaefer wrote: > On Dec 6, 2:27pm, Vincent Lefevre wrote: > } Currently I'm doing: ${$(whence -p ${0#-}):a} > } > } But this doesn't work when there are symbolic links > > If the above is otherwise good enough, why not ${$(whence -p ${0#-}):A} > which uses realpath() when it is available? [See above about different > code depending on OS ...] Using :A instead of :a doesn't solve the problem. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)