about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Completion/Core/_path_files2
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index a41f8d73a..e944c8433 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -452,7 +452,7 @@ for prepath in "$prepaths[@]"; do
 
     if (( $#tmp4 )) ||
        [[ -n "$compstate[pattern_match]" &&
-          "$PREFIX$SUFFIX" != "${(q)PREFIX}${(q)SUFFIX}" ]]; then
+          "${PREFIX:s/$//}${SUFFIX:s/$//}" != "${(q)PREFIX:s/$//}${(q)SUFFIX:s/$//}" ]]; then
 
       # It is. For menucompletion we now add the possible completions
       # for this component with the unambigous prefix we have built