From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12960 invoked from network); 20 Jan 2005 11:06:24 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Jan 2005 11:06:24 -0000 Received: (qmail 96751 invoked from network); 20 Jan 2005 11:06:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Jan 2005 11:06:18 -0000 Received: (qmail 22701 invoked by alias); 20 Jan 2005 11:06:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20730 Received: (qmail 22688 invoked from network); 20 Jan 2005 11:06:15 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 Jan 2005 11:06:15 -0000 Received: (qmail 96235 invoked from network); 20 Jan 2005 11:05:39 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 20 Jan 2005 11:05:31 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-12.tower-36.messagelabs.com!1106219130!13058350!1 X-StarScan-Version: 5.4.5; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 5139 invoked from network); 20 Jan 2005 11:05:30 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-12.tower-36.messagelabs.com with SMTP; 20 Jan 2005 11:05:30 -0000 Received: from trentino.logica.co.uk ([158.234.142.59]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id j0KB5Un6015503; Thu, 20 Jan 2005 11:05:30 GMT Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 076B629AA6; Thu, 20 Jan 2005 12:05:10 +0100 (CET) Cc: zsh-workers@sunsite.dk X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <41EAE932.5070808@portfolio16.de> From: Oliver Kiddle References: <41EAE932.5070808@portfolio16.de> To: Tobias Gruetzmacher Subject: Re: Strange bug when completing [ in file names Date: Thu, 20 Jan 2005 12:05:09 +0100 Message-ID: <6483.1106219109@trentino.logica.co.uk> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On 16 Jan, Tobias Gruetzmacher wrote: > I have a very strange problem when completing files in directories under > my home directory. The problem only occours when I start the file name > with ~ and have a [ somewhere in the file name. Some short test case: Looks like the handling of the suffix style in _expand is seeing the `[' character and assuming that we have a glob pattern in there. But we don't: the `[' is quoted. The following patch fixes it. Oliver Index: Completion/Base/Completer/_expand =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Base/Completer/_expand,v retrieving revision 1.9 diff -u -r1.9 _expand --- Completion/Base/Completer/_expand 7 Aug 2004 15:27:29 -0000 1.9 +++ Completion/Base/Completer/_expand 20 Jan 2005 11:03:32 -0000 @@ -35,7 +35,7 @@ zstyle -T ":completion:${curcontext}:" suffix && [[ "$word" = (\~*/*|*\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|*\$\{*\}?) && - "${(e)word}" != *[][^*?\(\)\<\>\{\}\|]* ]] && + "${(e)word}" != *[^\\][][^*?\(\)\<\>\{\}\|]* ]] && return 1 zstyle -s ":completion:${curcontext}:" accept-exact tmp ||