From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29568 invoked from network); 3 Jul 2000 17:30:22 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Jul 2000 17:30:22 -0000 Received: (qmail 27 invoked by alias); 3 Jul 2000 17:30:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12148 Received: (qmail 20 invoked from network); 3 Jul 2000 17:30:14 -0000 From: "Bart Schaefer" Message-Id: <1000703173003.ZM426@candle.brasslantern.com> Date: Mon, 3 Jul 2000 17:30:03 +0000 In-Reply-To: <200007030901.LAA04627@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: PATCH: Problem with _expand, _path_files, and $(command)" (Jul 3, 11:01am) References: <200007030901.LAA04627@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: Sven Wischnowsky , zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Problem with _expand, _path_files, and $(command) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 3, 11:01am, Sven Wischnowsky wrote: } Subject: Re: PATCH: Problem with _expand, _path_files, and $(command) } } > } > zagzig[88] echo $(exit 0) } > } > zagzig[88] echo \$\*\(exit\ 0Om\) } } Maybe just change the patterns in lines 120, 122, 166 and 168 } from `(?*)' to `(*[^\$])'? (Haven't tried...) Not quite; I also had to change the patterns on lines 153 and 154. zagzig[95] echo $(exit 0) No matches for `file' or `corrections' Index: Completion/Core/_path_files =================================================================== @@ -117,9 +117,9 @@ tmp2=() for tmp1 in "$pats[@]"; do - if [[ "$tmp1" = (#b)(?*)(\(\([^\|~]##\)\)) ]]; then + if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then tmp2=( "$tmp2[@]" "${match[1]}((${sort}${match[2][3,-1]}" ) - elif [[ "$tmp1" = (#b)(?*)(\([^\|~]##\)) ]]; then + elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then tmp2=( "$tmp2[@]" "${match[1]}(${sort}${match[2][2,-1]}" ) else tmp2=( "$tmp2[@]" "${tmp1}(${sort})" ) @@ -150,8 +150,8 @@ zstyle -s ":completion:${curcontext}:files" ignore-parents ignpar if [[ -n "$compstate[pattern_match]" && - ( ( -z "$SUFFIX" && "$PREFIX" = *\([^\|\~]##\) ) || - "$SUFFIX" = *\([^\|\~]##\) ) ]]; then + ( ( -z "$SUFFIX" && "$PREFIX" = (|*[^\$])\([^\|\~]##\) ) || + "$SUFFIX" = (|*[^\$])\([^\|\~]##\) ) ]]; then # Copy all glob qualifiers from the line to # the patterns used when generating matches if [[ "$SUFFIX" = *\([^\|\~]##\) ]]; then @@ -163,9 +163,9 @@ fi tmp2=() for tmp1 in "$pats[@]"; do - if [[ "$tmp1" = (#b)(?*)(\(\([^\|~]##\)\)) ]]; then + if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then tmp2=( "$tmp2[@]" "${match[1]}((${tmp3}${match[2][3,-1]}" ) - elif [[ "$tmp1" = (#b)(?*)(\([^\|~]##\)) ]]; then + elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then tmp2=( "$tmp2[@]" "${match[1]}(${tmp3}${match[2][2,-1]}" ) else tmp2=( "$tmp2[@]" "${tmp1}(${tmp3})" ) -- 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