about summary refs log tree commit diff
path: root/Completion/Core/_path_files
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-10 14:52:33 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-10 14:52:33 +0000
commitfc95f1a465638327704ba1bf28413b72c6a4226e (patch)
tree9801f747758a73d4bd77a64b1d94e70ecc18499f /Completion/Core/_path_files
parentff716aaa840fb9a9b5f29217150ddf3d587edbb6 (diff)
downloadzsh-fc95f1a465638327704ba1bf28413b72c6a4226e.tar.gz
zsh-fc95f1a465638327704ba1bf28413b72c6a4226e.tar.xz
zsh-fc95f1a465638327704ba1bf28413b72c6a4226e.zip
zsh-workers/9657
Diffstat (limited to 'Completion/Core/_path_files')
-rw-r--r--Completion/Core/_path_files29
1 files changed, 9 insertions, 20 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 0ec311c64..5ff8d7dd5 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -6,7 +6,7 @@
 local linepath realpath donepath prepath testpath exppath skips skipped
 local tmp1 tmp2 tmp3 tmp4 i orig eorig pre suf tpre tsuf opre osuf cpre
 local pats haspats=no ignore pfxsfx rem remt sopt gopt opt
-local nm=$compstate[nmatches] menu mspec matcher mopts atmp sort match
+local nm=$compstate[nmatches] menu matcher mopts atmp sort match
 
 typeset -U prepaths exppaths
 
@@ -54,8 +54,6 @@ if (( $#ignore )); then
   fi
 fi  
 
-(( $#matcher )) && mspec="${matcher[2]}"
-
 if [[ -z "$_file_pat_checked" ]] &&
    zstyle -s ":completion:${curcontext}:files" file-patterns tmp1 &&
    [[ -n "$tmp1" ]]; then
@@ -92,7 +90,6 @@ if (( ! $mopts[(I)-[JVX]] )); then
   fi
   tmp1=$expl[(I)-M*]
   if (( tmp1 )); then
-    mspec="$mspec $expl[1+tmp1]"
     if (( $#matcher )); then
       matcher[2]="$matcher[2] $expl[1+tmp1]"
     else
@@ -452,30 +449,26 @@ for prepath in "$prepaths[@]"; do
         if [[ "$tmp3" = */* ]]; then
 	  compadd -Qf "$mopts[@]" -p "$linepath$tmp2" -s "/${tmp3#*/}" \
 	          -W "$prepath$realpath$testpath" \
-		  "$pfxsfx[@]" \
-                  -M "r:|/=* r:|=* $mspec" \
+		  "$pfxsfx[@]" -M "r:|/=* r:|=*" \
 		  - "${(@)tmp1%%/*}"
 	else
 	  compadd -Qf "$mopts[@]" -p "$linepath$tmp2" \
 	          -W "$prepath$realpath$testpath" \
-		   "$pfxsfx[@]" \
-                   -M "r:|/=* r:|=* $mspec" \
+		   "$pfxsfx[@]" -M "r:|/=* r:|=*" \
 		   - "$tmp1[@]"
 	fi
       else
         if [[ "$tmp3" = */* ]]; then
 	  atmp=( -Qf "$mopts[@]" -p "$linepath$tmp2"
 	         -W "$prepath$realpath$testpath"
-	         "$pfxsfx[@]" \
-                 -M "r:|/=* r:|=* $mspec" )
+	         "$pfxsfx[@]" -M "r:|/=* r:|=*" )
           for i in "$tmp1[@]"; do
 	    compadd "$atmp[@]" -s "/${i#*/}" - "${i%%/*}"
 	  done
         else
 	  compadd -Qf "$mopts[@]" -p "$linepath$tmp2" \
-		  -W "$prepath$realpath$testpath" \
-		  "$pfxsfx[@]" \
-                  -M "r:|/=* r:|=* $mspec" \
+                  -W "$prepath$realpath$testpath" \
+		  "$pfxsfx[@]" -M "r:|/=* r:|=*" \
 		  - "$tmp1[@]"
         fi
       fi
@@ -522,11 +515,8 @@ for prepath in "$prepaths[@]"; do
     fi
     tmp4="$testpath"
     compquote tmp4 tmp1
-    compadd -Qf "$mopts[@]" -p "$linepath$tmp4" \
-	    -W "$prepath$realpath$testpath" \
-	    "$pfxsfx[@]" \
-            -M "r:|/=* r:|=* $mspec" \
-	    - "$tmp1[@]"
+    compadd -Qf "$mopts[@]" -p "$linepath$tmp4" -W "$prepath$realpath$testpath" \
+	    "$pfxsfx[@]" -M "r:|/=* r:|=*" - "$tmp1[@]"
   fi
 done
 
@@ -542,8 +532,7 @@ if zstyle -t ":completion:${curcontext}:paths" expand prefix &&
   if (( $#exppaths )); then
     PREFIX="${opre}"
     SUFFIX="${osuf}"
-    compadd -Q "$mopts[@]" -S '' \
-            -M "r:|/=* r:|=* $mspec" -p "$linepath" - "$exppaths[@]"
+    compadd -Q "$mopts[@]" -S '' -M "r:|/=* r:|=*" -p "$linepath" - "$exppaths[@]"
   fi
 fi