From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27443 invoked from network); 24 Jul 2005 14:42:07 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Jul 2005 14:42:07 -0000 Received: (qmail 1219 invoked from network); 24 Jul 2005 14:41:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Jul 2005 14:41:59 -0000 Received: (qmail 12474 invoked by alias); 24 Jul 2005 14:41:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21517 Received: (qmail 12464 invoked from network); 24 Jul 2005 14:41:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 24 Jul 2005 14:41:56 -0000 Received: (qmail 889 invoked from network); 24 Jul 2005 14:41:56 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 24 Jul 2005 14:41:51 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 37FA670055; Sun, 24 Jul 2005 10:41:49 -0400 (EDT) Date: Sun, 24 Jul 2005 10:41:49 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Subject: PATCH: _baz build-config Message-ID: <20050724144149.GA11444@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Some people have their configs below a directory not in an Arch project tree, and this attempts to accomodate them. Checking for the configs/ dir twice is silly though. Index: Completion/Unix/Command/_baz =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_baz,v retrieving revision 1.6 diff -u -r1.6 _baz --- Completion/Unix/Command/_baz 17 Apr 2005 13:40:27 -0000 1.6 +++ Completion/Unix/Command/_baz 24 Jul 2005 14:38:18 -0000 @@ -54,8 +54,12 @@ [[ -n "$n" ]] && configdir=$opt_args[$n] root="$(_call_program baz $BAZ tree-root ${configdir} 2>&1)" if (( $? )); then - _message -e messages "Error: $root" - return $ret + if [[ -d "configs" ]]; then + root=. + else + _message -e messages "Error: $root" + return $ret + fi fi if [[ -d "$root/configs" ]]; then