From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4437 invoked from network); 19 Jun 2006 08:15:25 -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 08:15:25 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 79911 invoked from network); 19 Jun 2006 08:15:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Jun 2006 08:15:17 -0000 Received: (qmail 19670 invoked by alias); 19 Jun 2006 08:15:10 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10389 Received: (qmail 19661 invoked from network); 19 Jun 2006 08:15:09 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 19 Jun 2006 08:15:09 -0000 Received: (qmail 78966 invoked from network); 19 Jun 2006 08:15:09 -0000 Received: from mail.gmx.de (HELO mail.gmx.net) (213.165.64.21) by a.mx.sunsite.dk with SMTP; 19 Jun 2006 08:15:08 -0000 Received: (qmail 8224 invoked by uid 0); 19 Jun 2006 08:15:05 -0000 Received: from 217.7.72.1 by www014.gmx.net with HTTP; Mon, 19 Jun 2006 10:15:05 +0200 (CEST) X-Flags: 0001 Date: Mon, 19 Jun 2006 10:15:05 +0200 Message-ID: <20060619081505.151910@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Cc: dominik.vogt@gmx.de From: "Dominik Vogt" Subject: searching upwards from cwd To: zsh-users@sunsite.dk X-Authenticated: #885628 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 Content-Transfer-Encoding: 8bit The EQUALS option is very handy, and I'd like to have something similary, but with a different search path. My working directory, is structured like this: work/ adresses.txt cvs/ projectx/ src/ foo/ projecty/ ... 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 cwd: work/ => less addresses.txt work/cvs/ => less ../addresses.txt work/cvs/projectx/ => less ../../addresses.txt work/cvs/projectx/src/ => less ../../../addresses.txt It would be very helpful to have an alternative syntax similar to '**/' and '=' that looks upwards in the path. Maybe **/adresses.txt => look in all subdirs =addresses.txt => look in the PATH .=addresses.txt => successively look in ., .., ../.., ../../.. and so on **.=addresses.txt => works like .=, and if that fails works like **/ (or whatever the syntax would be). I'd be happy to have it as a zsh function, but I think it could be done much more efficient in the source code. Ciao Dominik ^_^ ^_^ P.S.: Please CC me for fast replies. -- Echte DSL-Flatrate dauerhaft für 0,- Euro*! "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl