From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28285 invoked from network); 20 Jun 2006 18:32:36 -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; 20 Jun 2006 18:32:36 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 13188 invoked from network); 20 Jun 2006 18:32:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Jun 2006 18:32:28 -0000 Received: (qmail 2793 invoked by alias); 20 Jun 2006 18:32:21 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10401 Received: (qmail 2784 invoked from network); 20 Jun 2006 18:32:21 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 Jun 2006 18:32:21 -0000 Received: (qmail 12019 invoked from network); 20 Jun 2006 18:32:21 -0000 Received: from mail.gmx.net (213.165.64.21) by a.mx.sunsite.dk with SMTP; 20 Jun 2006 18:32:19 -0000 Received: (qmail invoked by alias); 20 Jun 2006 18:32:19 -0000 Received: from pD9E98584.dip0.t-ipconnect.de (EHLO zitrone.obstwiese) [217.233.133.132] by mail.gmx.net (mp001) with SMTP; 20 Jun 2006 20:32:19 +0200 X-Authenticated: #885628 Received: from luthien by zitrone.obstwiese with local (Exim 4.50) id 1Fskxp-0000hH-Qd; Tue, 20 Jun 2006 20:28:37 +0200 Date: Tue, 20 Jun 2006 20:28:37 +0200 From: Dominik Vogt To: zsh-users Cc: Dominik Vogt Subject: Re: searching upwards from cwd Message-ID: <20060620182837.GA2609@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> <20060619210356.GB2434@gmx.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline In-Reply-To: <20060619210356.GB2434@gmx.de> X-PGP-Key: http://www.dominikvogt.de/gpg/pubkey.asc User-Agent: Mutt/1.5.9i X-Y-GMX-Trusted: 0 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 19, 2006 at 11:03:57PM +0200, Dominik Vogt wrote: > On Mon, Jun 19, 2006 at 11:13:28AM +0200, Marc Chantreux wrote: > > le 19/06/2006, > > Dominik Vogt nous =E9crivait : > > >=20 > > > I'd like to be able to open addresses.txt in a single command without= knowing > > > about the working directory. At the moment, the command depends on c= wd: > > >=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' ) >=20 > 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. Hm, this is close: less (../)#adr* But is there any way to prevent the globbing pattern is expanded to multiple words? I just want the first/shortest match. Ciao Dominik ^_^ ^_^ -- Dominik Vogt, dominik.vogt@gmx.de --6TrnltStXW4iwmi0 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) iD8DBQFEmD5VmeSprTOr4tgRAgV0AKDbj9aRiSp8tYC60onG/G7GKQOj7QCffL/H yRKhtsvvUBxsHU36TekbkoI= =RIZ8 -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--