summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Type/_path_files8
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0fbaf6ad1..1f2573921 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-11 Sven Wischnowsky <wischnow@zsh.org>
+
+ * 16002: Completion/Unix/Type/_path_files: use expanded paths
+ (expand style with value prefix) only when we are at the last
+ matcher spec
+
2001-10-10 Clint Adams <clint@zsh.org>
* 16006: Completion/Unix/Type/_mailboxes, Doc/Zsh/compsys.yo:
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 811e63173..ff4240f90 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -656,9 +656,13 @@ done
# If we are configured to expand paths as far as possible and we collected
# expanded paths that are different from the string on the line, we add
-# them as possible matches.
+# them as possible matches. Do that only if we are currently trying the
+# last entry in the matcher-list style, otherwise other match specs might
+# make the suffix that didn't match this time match in one of the following
+# attempts.
-if zstyle -t ":completion:${curcontext}:paths" expand prefix &&
+if [[ _matcher_num -eq ${#_matchers} ]] &&
+ zstyle -t ":completion:${curcontext}:paths" expand prefix &&
[[ nm -eq compstate[nmatches] && $#exppaths -ne 0 &&
"$linepath$exppaths" != "$eorig" ]]; then
PREFIX="${opre}"