From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2008 invoked from network); 13 Oct 2008 23:03:45 -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=-1.5 required=5.0 tests=AWL 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; 13 Oct 2008 23:03:45 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 21797 invoked from network); 13 Oct 2008 23:03:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Oct 2008 23:03:28 -0000 Received: (qmail 26279 invoked by alias); 13 Oct 2008 23:03:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25883 Received: (qmail 26256 invoked from network); 13 Oct 2008 23:03:11 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 13 Oct 2008 23:03:11 -0000 Received: from uucp.gnuu.de (unknown [83.246.114.63]) by bifrost.dotsrc.org (Postfix) with ESMTP id BCA2880524C2 for ; Tue, 14 Oct 2008 01:03:06 +0200 (CEST) Received: by uucp.gnuu.de (Postfix, from userid 10) id 720C2488083; Tue, 14 Oct 2008 01:03:06 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.5.2 uucp.gnuu.de 720C2488083 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuu.de; s=banki; t=1223938986; i=@alea.gnuu.de; bh=DVoKs9KLPoCFX7LZuPXRHXuQKSzoqjRLd pMfCAKVHts=; h=From:To:Cc:Subject:Date:Message-Id; b=GQTOQPCFl79gI4 3un0OfA+bmgB5tfUImSx5s3e0JvSUib4f1hS/Y2pUqfPm0xD4xUkcBvGCvfXFG7qrlE AHXBhGyLzNClLxYKin48wCgWDP5xA8J8yyo53QNSATXJP0cADFEL0AIDvC5yCFREd45 QvbH90fShgzAMbeVpnLp5bQ= Received: from ibook.localnet ([192.168.0.5] helo=alea.gnuu.de) by alea.gnuu.de with esmtp (Exim 4.63) (envelope-from ) id 1KpWPu-0002W8-4z for zsh-workers@sunsite.dk; Tue, 14 Oct 2008 01:01:34 +0200 Received: from joerg by alea.gnuu.de with local (Exim 4.69) (envelope-from ) id 1KpWPt-0000fL-PY; Tue, 14 Oct 2008 01:01:33 +0200 From: =?utf-8?q?J=C3=B6rg=20Sommer?= To: zsh-workers@sunsite.dk Cc: =?utf-8?q?J=C3=B6rg=20Sommer?= Subject: [PATCH] Quote components before using it is pattern Date: Tue, 14 Oct 2008 01:01:33 +0200 Message-Id: <1223938893-2537-1-git-send-email-joerg@alea.gnuu.de> X-Mailer: git-send-email 1.6.0.2 X-Virus-Scanned: ClamAV 0.92.1/8417/Mon Oct 13 09:34:29 2008 on bifrost X-Virus-Status: Clean A component might contain a character active in patterns, like * or (). Take for example the path /tmp/foobar). Passing this and /tmp/foo123 as a completion to _multi_parts results in an error: _multi_parts:147: bad pattern: (foo123|foobar))* The characters in the temporary variable tmp1 must be quote, before the pattern is build with them. --- Completion/Base/Utility/_multi_parts | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Completion/Base/Utility/_multi_parts b/Completion/Base/Utility/_multi_parts index 615ef79..6fb6cbd 100644 --- a/Completion/Base/Utility/_multi_parts +++ b/Completion/Base/Utility/_multi_parts @@ -144,7 +144,7 @@ while true; do SUFFIX="$suf" fi - matches=( "${(@M)matches:#(${(j:|:)~tmp1})*}" ) + matches=( "${(@M)matches:#(${(j:|:)~${(q)tmp1}})*}" ) if ! zstyle -t ":completion:${curcontext}:" expand suffix || [[ -n "$menu" || -z "$compstate[insert]" ]]; then -- 1.6.0.2