From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17470 invoked from network); 26 Mar 2008 15:23:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,MIME_QP_LONG_LINE autolearn=no version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Mar 2008 15:23:12 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 98028 invoked from network); 26 Mar 2008 15:23:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Mar 2008 15:23:10 -0000 Received: (qmail 25513 invoked by alias); 26 Mar 2008 15:23:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24739 Received: (qmail 25498 invoked from network); 26 Mar 2008 15:23:07 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 26 Mar 2008 15:23:07 -0000 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by bifrost.dotsrc.org (Postfix) with ESMTP id 491C18097826 for ; Wed, 26 Mar 2008 16:23:00 +0100 (CET) Received: by ug-out-1314.google.com with SMTP id u2so82104uge.9 for ; Wed, 26 Mar 2008 08:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:message-id:date:from:to:cc:subject:references:in-reply-to:mime-version:content-type:content-disposition:content-transfer-encoding:user-agent; bh=kt6kQD0m95qcdJY/nPIP1QXA79nTjDDfnvTjtSjlTFY=; b=WCrCC1RElkW6S+dHbSUtfyI24rX+zP6VoeSlJRwA0rUemVreEJvCtkU1Bcy5m0wJj4BjDmrIz3Y4yScwlZry258h/rKeUsHMPN0JJEPEkg4RHzOPmizHf4YVlvRvmnDaWFA9u3Y5PSc8eN853yLg6TQMRdiZJDnlw1LVpAn60y0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:cc:subject:references:in-reply-to:mime-version:content-type:content-disposition:content-transfer-encoding:user-agent; b=H8Y6rwP7PvSK8GEl6B7JmNxXvWLI452ECFiGxiw62KI8e9Q2Q3zEHyZJSni+XiERqzjkfRJsvcfzT9NxNxoTY/m1cNsG5pw3hDBfzXmAnJyVvzD03HIwPC3r48Ohcl+SBhVBfcqF7+WBEwZjPCT6l8NEWg4vp9ychEqB3kD7ZAw= Received: by 10.78.168.1 with SMTP id q1mr260578hue.51.1206544980157; Wed, 26 Mar 2008 08:23:00 -0700 (PDT) Received: from bapt.selfip.org ( [82.245.249.89]) by mx.google.com with ESMTPS id i5sm6015541mue.7.2008.03.26.08.22.58 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 26 Mar 2008 08:22:58 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by bapt.selfip.org (Postfix) with ESMTP id 2E744F2789; Wed, 26 Mar 2008 16:27:11 +0100 (CET) Received: from 172.20.24.3 (172.20.24.3 [172.20.24.3]) by bapt.selfip.org (Horde Framework) with HTTP; Wed, 26 Mar 2008 16:27:10 +0100 Message-ID: <20080326162710.20476ooqf5nlulwc@bapt.selfip.org> Date: Wed, 26 Mar 2008 16:27:10 +0100 From: Baptiste Daroussin To: Peter Stephenson Cc: zsh-workers@sunsite.dk, Pea Subject: Re: _canonical_path not working on *BSD References: <20080326114413.80713vrmznwpnyuc@bapt.selfip.org> <20080326150552.52b3f1c4@news01> In-Reply-To: <20080326150552.52b3f1c4@news01> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.0-RC2) X-Virus-Scanned: ClamAV 0.91.2/6396/Wed Mar 26 12:29:12 2008 on bifrost X-Virus-Status: Clean Quoting Peter Stephenson : > > Pea suggested just removing the -q, but probably we should also redirect > stderr: > > Index: Completion/Unix/Type/_canonical_paths > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_canonical_paths,v > retrieving revision 1.1 > diff -u -r1.1 _canonical_paths > --- Completion/Unix/Type/_canonical_paths=0928 May 2006 18:36:06 -0000=091= .1 > +++ Completion/Unix/Type/_canonical_paths=0926 Mar 2008 15:05:05 -0000 > @@ -38,7 +38,8 @@ > files=3D($@) > else > for __index in $@; do > - files+=3D$(readlink -qf $__index) > + # BSD doesn't have -q, so redirect stderr. > + files+=3D$(readlink -f $__index 2>/dev/null) > done > fi > > @@ -48,7 +49,7 @@ > expref=3D${~origpref} > [[ $origpref =3D=3D (|*/). ]] && rltrim=3D. > curpref=3D${${expref%$rltrim}:-./} > - canpref=3D$(readlink -qf $curpref) > + canpref=3D$(readlink -f $curpref 2>/dev/null) > if [[ $? -eq 0 ]]; then > [[ $curpref =3D=3D */ && $canpref =3D=3D *[^/] ]] && canpref+=3D/ > canpref+=3D$rltrim > > > -- > Peter Stephenson Software Engineer > CSR PLC, Churchill House, Cambridge Business Park, Cowley Road > Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 > This only work on OpenBSD, readlink on FreeBSD doesn't allow -f. here is the manpage on FreeBSD : =20 http://www.freebsd.org/cgi/man.cgi?query=3Dreadlink&apropos=3D0&sektion=3D0&= manpath=3DFreeBSD+6.3-RELEASE&format=3Dhtml it seems to be ok on NetBSD, but I don't have tried (the manpage says =20 -f is ok for readlink) Darwin should have the same problem, the man page is the same as the =20 freebsd one : http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/read= link.1.html I will also see with the freebsd folks if it is not possible to add -f =20 to readlink. --- Baptiste ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.