From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 504 invoked from network); 27 Oct 2004 16:42:07 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Oct 2004 16:42:07 -0000 Received: (qmail 8778 invoked from network); 27 Oct 2004 16:41:58 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Oct 2004 16:41:58 -0000 Received: (qmail 1014 invoked by alias); 27 Oct 2004 16:41:48 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8138 Received: (qmail 997 invoked from network); 27 Oct 2004 16:41:46 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Oct 2004 16:41:46 -0000 Received: (qmail 7744 invoked from network); 27 Oct 2004 16:41:46 -0000 Received: from ns9.hostinglmi.net (213.194.149.146) by a.mx.sunsite.dk with SMTP; 27 Oct 2004 16:41:44 -0000 Received: from 212.red-80-35-44.pooles.rima-tde.net ([80.35.44.212]:56302 helo=dervishd.net) by ns9.hostinglmi.net with esmtpa (Exim 4.43) id 1CMqrn-0001U7-0u; Wed, 27 Oct 2004 18:41:43 +0200 Date: Wed, 27 Oct 2004 18:44:29 +0200 From: DervishD To: Oliver Kiddle Cc: Zsh Users Subject: Re: compsys issues Message-ID: <20041027164429.GA10361@DervishD> Mail-Followup-To: Oliver Kiddle , Zsh Users References: <20041027132610.GA9928@DervishD> <15603.1098886106@trentino.logica.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15603.1098886106@trentino.logica.co.uk> User-Agent: Mutt/1.4.2.1i Organization: DervishD X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns9.hostinglmi.net X-AntiAbuse: Original Domain - sunsite.dk X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - dervishd.net X-Source: X-Source-Args: X-Source-Dir: X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi Oliver :) * Oliver Kiddle dixit: > compadd -W $PWD/$IPREFIX -f - $IPREFIX*(/:t) > > That won't work with paths starting with variable expansions or > non-relative directories. You'll need more logic to work out the > argument to -W. Using $~IPREFIX will help resolve any expansions on the > command line. Just to make sure I've understood, if I want to make it work with absolute and relative pathnames (I'll get into variable expansions after that), I should do something like: compset -P '*/' PREPATH="$PWD/" [[ $IPREFIX[1] == "/" ]] && { IPPREFIX=${IPPREFIX#/} PREPATH="/" } compadd -W $PREPATH$IPREFIX -f - ${IPREFIX}*(:t) Quick'n'dirty hack, but it should work, shouldn't it? Thanks again, Oliver :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.dervishd.net & http://www.pleyades.net/