zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
	zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Problem with _expand, _path_files, and $(command)
Date: Mon, 3 Jul 2000 17:30:03 +0000	[thread overview]
Message-ID: <1000703173003.ZM426@candle.brasslantern.com> (raw)
In-Reply-To: <200007030901.LAA04627@beta.informatik.hu-berlin.de>

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   


  reply	other threads:[~2000-07-03 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-03  9:01 Sven Wischnowsky
2000-07-03 17:30 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-07-05  6:26 Sven Wischnowsky
2000-07-04  8:04 Sven Wischnowsky
2000-07-04 17:15 ` Bart Schaefer
2000-07-03  8:12 Sven Wischnowsky
2000-07-03  8:51 ` Bart Schaefer
2000-07-02 17:13 Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1000703173003.ZM426@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).