From d0303296cdd465703ef95930ac254b73280b66bf Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 11 Oct 2001 09:19:54 +0000 Subject: use expanded paths (expand style with value prefix) only when we are at the last matcher spec (16002) --- Completion/Unix/Type/_path_files | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Completion') 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}" -- cgit 1.4.1