From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13841 invoked from network); 3 May 2001 16:49:05 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 May 2001 16:49:05 -0000 Received: (qmail 11769 invoked by alias); 3 May 2001 16:48:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14217 Received: (qmail 11739 invoked from network); 3 May 2001 16:48:58 -0000 From: "Bart Schaefer" Message-Id: <1010503164642.ZM17873@candle.brasslantern.com> Date: Thu, 3 May 2001 16:46:42 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: PATCH: `_files ... -F ...' stomps wrong position in opts array MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Index: Completion/Unix/Type/_files =================================================================== --- Completion/Unix/Type/_files 2001/04/09 20:14:09 1.1.1.1 +++ Completion/Unix/Type/_files 2001/05/03 16:33:38 @@ -12,9 +12,9 @@ [[ "$glob" = *[^\\][[:blank:]]* ]] && glob="{${glob//(#b)([^\\])[[:blank:]]##/${match[1]},}}" fi -ign=$opts[(I)-F] -if (( ign )); then - ign=( $=opts[ign+1] ) +tmp=$opts[(I)-F] +if (( tmp )); then + ign=( $=opts[tmp+1] ) if [[ $ign = _comp_ignore ]]; then ign=( $_comp_ignore ) else The bad bit is actually what comes after the above -- `tmp' was previously not a number when this line executed: opts[tmp+1]=_comp_ignore fi else ign= fi Thus causing opts[1] to be stomped. This worked only if `-F' was the first option given. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net