about summary refs log tree commit diff
path: root/Completion/Core/_path_files
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_path_files')
-rw-r--r--Completion/Core/_path_files12
1 files changed, 6 insertions, 6 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 0f1ef01fe..993d0e89a 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -6,7 +6,7 @@
 local linepath realpath donepath prepath testpath exppath
 local tmp1 tmp2 tmp3 tmp4 i orig pre suf tpre tsuf opre osuf cpre
 local pats haspats=no ignore group expl addpfx addsfx remsfx
-local nm=$compstate[nmatches] menu match matcher mopts
+local nm=$compstate[nmatches] menu match matcher mopts atmp
 
 typeset -U prepaths exppaths
 
@@ -366,12 +366,12 @@ for prepath in "$prepaths[@]"; do
 	fi
       else
         if [[ "$tmp3" = */* ]]; then
+	  atmp=( -Qf "$mopts[@]" -p "$linepath$tmp4"
+	         -W "$prepath$realpath$testpath" "$ignore[@]"
+	         "$addpfx[@]" "$addsfx[@]" "$remsfx[@]"
+                 -M "r:|/=* r:|=* $match" "$group[@]" "$expl[@]" )
           for i in "$tmp1[@]"; do
-	    compadd -Qf "$mopts[@]" -p "$linepath$tmp4" -s "/${i#*/}" \
-		    -W "$prepath$realpath$testpath" "$ignore[@]" \
-		    "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" \
-                    -M "r:|/=* r:|=* $match" "$group[@]" "$expl[@]" \
-		    - "${i%%/*}"
+	    compadd "$atmp[@]" -s "/${i#*/}" - "${i%%/*}"
 	  done
         else
 	  compadd -Qf "$mopts[@]" -p "$linepath$tmp4" \