From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9560 invoked from network); 27 Aug 2004 00:40:24 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Aug 2004 00:40:24 -0000 Received: (qmail 98186 invoked from network); 27 Aug 2004 00:40:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Aug 2004 00:40:05 -0000 Received: (qmail 1726 invoked by alias); 27 Aug 2004 00:39:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7932 Received: (qmail 1716 invoked from network); 27 Aug 2004 00:39:20 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 27 Aug 2004 00:39:20 -0000 Received: (qmail 96048 invoked from network); 27 Aug 2004 00:37:22 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 27 Aug 2004 00:37:20 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i7R0bJIK004669 for ; Thu, 26 Aug 2004 17:37:19 -0700 Date: Thu, 26 Aug 2004 17:37:19 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-users@sunsite.dk To: Zsh-users List Subject: Re: Problem with ignore-line and parenthesis In-Reply-To: <20040826181857.GF10369@localhost> Message-ID: References: <20040826181857.GF10369@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 On Thu, 26 Aug 2004, Jesper Holmberg wrote: > I have the following zstyle in my .zshrc: > > zstyle ':completion:*:(rm|cp|mv):*' ignore-line yes > > Filenames with parentheses in them seem to cause problems, though. Filenames with any glob pattern in them would have problems, I think. See if this does the right thing. Index: Completion/Base/Core/_description --- _description.~1.5.~ 2003-08-10 09:00:12.000000000 -0700 +++ _description 2004-08-26 17:32:46.000000000 -0700 @@ -49,13 +49,13 @@ zstyle -s ":completion:${curcontext}:$1" ignore-line hidden && case "$hidden" in - true|yes|on|1) _comp_ignore=( "$_comp_ignore[@]" "$words[@]" );; - current) _comp_ignore=( "$_comp_ignore[@]" "$words[CURRENT]" );; + true|yes|on|1) _comp_ignore=( "$_comp_ignore[@]" "${(q)words[@]}" );; + current) _comp_ignore=( "$_comp_ignore[@]" "${(q)words[CURRENT]}" );; current-shown) [[ "$compstate[old_list]" = *shown* ]] && - _comp_ignore=( "$_comp_ignore[@]" "$words[CURRENT]" );; + _comp_ignore=( "$_comp_ignore[@]" "${(q)words[CURRENT]}" );; other) _comp_ignore=( "$_comp_ignore[@]" - "${(@)words[1,CURRENT-1]}" - "${(@)words[CURRENT+1,-1]}" );; + "${(@q)words[1,CURRENT-1]}" + "${(@q)words[CURRENT+1,-1]}" );; esac (( $#_comp_ignore )) && opts=( $opts -F _comp_ignore )