From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5249 invoked from network); 15 Feb 2009 02:29:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) 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.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 15 Feb 2009 02:29:05 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 30428 invoked from network); 15 Feb 2009 02:28:51 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Feb 2009 02:28:51 -0000 Received: (qmail 28556 invoked by alias); 15 Feb 2009 02:28:28 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13859 Received: (qmail 28531 invoked from network); 15 Feb 2009 02:28:25 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 15 Feb 2009 02:28:25 -0000 Received: from mail-ew0-f20.google.com (mail-ew0-f20.google.com [209.85.219.20]) by bifrost.dotsrc.org (Postfix) with ESMTP id AB7AC80271F0 for ; Sun, 15 Feb 2009 03:28:21 +0100 (CET) Received: by ewy13 with SMTP id 13so1307516ewy.21 for ; Sat, 14 Feb 2009 18:28:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=jkJ4TRHAJjNfRoZXRPbK8xwtbfiEAYWxAeY2KQoQdGI=; b=Tg/vMDBWCTm46AxF2iDlX1sBuRrabT2BoE8bIWml+pOTXDciKUEXmzX5E7khldOvBQ +ukoPv1EYo/fuhmyMAQ0TiQdEOglbl69ef8nxkYpWQR9g55M2BZpCDmuNssjVTt5wv3X nh+f8TxjYG/Hgb6nDAybiiLs7b/I17bdPntoY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Gbgx7+XNIleuHQcBG7gWdhGzTB1BSh8En9CVogt1yeGulJrXJPY5r7e6PM0VyUa6F3 Cf9k+Gm5KLt+PHliDSZ2R+2xZBtwNkB1371MKXC8Rq68HUVaa1JVA66pm+FDk7OZhW9j XWjkq66gJEpAJeHIKlhx+NfpGsMvIsXoVCYRc= MIME-Version: 1.0 Received: by 10.210.92.8 with SMTP id p8mr1215681ebb.143.1234664901182; Sat, 14 Feb 2009 18:28:21 -0800 (PST) In-Reply-To: <237967ef0902141535j532bc256i5d0e08275fc9e164@mail.gmail.com> References: <237967ef0902140622s7389d2c8h5a0c786dcf207422@mail.gmail.com> <200902141801.n1EI1E2l003603@pws-pc.ntlworld.com> <237967ef0902141019t30118690m30116c9413015d96@mail.gmail.com> <090214111316.ZM15188@torch.brasslantern.com> <237967ef0902141141y609b61d3i154546f6f6886c65@mail.gmail.com> <090214133904.ZM15383@torch.brasslantern.com> <237967ef0902141409o3a0c30a1mfbae985453403342@mail.gmail.com> <090214152621.ZM15489@torch.brasslantern.com> <237967ef0902141535j532bc256i5d0e08275fc9e164@mail.gmail.com> Date: Sun, 15 Feb 2009 03:28:21 +0100 Message-ID: <237967ef0902141828i2a8c190ch2c94971863385212@mail.gmail.com> Subject: Re: Problem with fake-files style and cd From: Mikael Magnusson To: zsh-users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/8992/Sat Feb 14 16:43:07 2009 on bifrost X-Virus-Status: Clean 2009/2/15 Mikael Magnusson : > 2009/2/15 Bart Schaefer : >> On Feb 14, 11:09pm, Mikael Magnusson wrote: >> } >> } > zstyle -e :completion::complete:cd::path-directories ignored-patterns \ >> } > 'reply=( *(/) )' >> } > >> } > This says that when completing in the cdpath, ignore any name that matches >> } > the name of a directory in the current directory. >> } >> } while the above appears to work, it really doesn't: >> } % mkdir path/code/foo >> } % cd code/ >> } ---- local directory >> } foo/ >> } ---- directory in cdpath >> } bar/ foo/ >> } >> } Presumably this is because *(/) (which I changed to *(-/) (not in the >> } above testcase though)) only matches one segment and that *(/) is run >> } in $PWD, not $PWD/$PREFIX? >> >> Yep, true. Try it this way: >> >> zstyle -e :completion::complete:cd::path-directories ignored-patterns \ >> 'reply=( ${PREFIX}*(-/) )' >> >> You might need to fool around with that a bit; for example, if you don't >> use the _expand completer you may want ${~PREFIX}*(-/) instead. There >> may also be tricky bits with IPREFIX, QIPREFIX, and special cases for >> completing in the middle of a word instead of at the end. > > Aha, I didn't expect my wild guess to even have the correct variable > name :). If it breaks though, the worst that could happen is that I > get a duplicate entry in the listing though? > > Thanks! I'll try this for a while and see what happens. Okay, it happened now, % mkdir -p {local,path}/{'path with spaces',pathwithoutspaces} % cd local % cd path ---- local directory pathwithoutspaces/ path\ with\ spaces/ ---- directory in cdpath path\ with\ spaces/ I tried putting some "" in various constellations in our zstyle to no avail. Any ideas? -- Mikael Magnusson