From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14770 invoked from network); 19 Jun 2006 21:03:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 Jun 2006 21:03:10 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 64935 invoked from network); 19 Jun 2006 21:03:02 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Jun 2006 21:03:02 -0000 Received: (qmail 4062 invoked by alias); 19 Jun 2006 21:02:54 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10395 Received: (qmail 4053 invoked from network); 19 Jun 2006 21:02:54 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 19 Jun 2006 21:02:54 -0000 Received: (qmail 63784 invoked from network); 19 Jun 2006 21:02:54 -0000 Received: from mail.gmx.de (HELO mail.gmx.net) (213.165.64.21) by a.mx.sunsite.dk with SMTP; 19 Jun 2006 21:02:52 -0000 Received: (qmail invoked by alias); 19 Jun 2006 21:02:51 -0000 Received: from pD9E9BAB4.dip0.t-ipconnect.de (EHLO zitrone.obstwiese) [217.233.186.180] by mail.gmx.net (mp039) with SMTP; 19 Jun 2006 23:02:51 +0200 X-Authenticated: #885628 Received: from luthien by zitrone.obstwiese with local (Exim 4.50) id 1FsQub-0000iK-2N; Mon, 19 Jun 2006 23:03:57 +0200 Date: Mon, 19 Jun 2006 23:03:57 +0200 From: Dominik Vogt To: zsh-users Cc: Dominik Vogt Subject: Re: searching upwards from cwd Message-ID: <20060619210356.GB2434@gmx.de> Reply-To: dominik.vogt@gmx.de Mail-Followup-To: zsh-users , Dominik Vogt References: <20060619081505.151910@gmx.net> <20060619091328.GA1672@ulpmm.u-strasbg.fr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NKoe5XOeduwbEQHU" Content-Disposition: inline In-Reply-To: <20060619091328.GA1672@ulpmm.u-strasbg.fr> X-PGP-Key: http://www.dominikvogt.de/gpg/pubkey.asc User-Agent: Mutt/1.5.9i X-Y-GMX-Trusted: 0 --NKoe5XOeduwbEQHU Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 19, 2006 at 11:13:28AM +0200, Marc Chantreux wrote: > Hi Dominik, >=20 > le 19/06/2006, > Dominik Vogt nous =E9crivait : > >=20 > > I'd like to be able to open addresses.txt in a single command without k= nowing > > about the working directory. At the moment, the command depends on cwd: > >=20 > > work/ =3D> less addresses.txt > > work/cvs/ =3D> less ../addresses.txt > > work/cvs/projectx/ =3D> less ../../addresses.txt > > work/cvs/projectx/src/ =3D> less ../../../addresses.txt >=20 > is this enought ?=20 >=20 > from () { > local base=3D${PWD%/$1/*}/$1 > shift > print -l $base/${~^*} > } >=20 > less $( from works '**/adresses.txt' ) Ah, that's not quite what I'm looking for. It's too much to type - I could as well try an increasing numer of '../' components and hit TAB every time. Dominik ^_^ ^_^ -- Dominik Vogt, dominik.vogt@gmx.de --NKoe5XOeduwbEQHU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFElxE8meSprTOr4tgRAquHAKDgvoB+31qTRlQiLgq2vg99/kE5ewCg6YnX sTG4iksWgIP3MW+e5TyaGVs= =ybG0 -----END PGP SIGNATURE----- --NKoe5XOeduwbEQHU--