about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core')
-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 bce3144af..5aa85c706 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -622,7 +622,7 @@ for prepath in "$prepaths[@]"; do
         compquote tmp4 tmp1
       fi
       if [[ -z "$_comp_correct" && -n "$compstate[pattern_match]" &&
-            "$PREFIX$SUFFIX" = (|*[^\\])[][*?#~^\|\<\>]* ]]; then
+            "${PREFIX#\~}$SUFFIX" = (|*[^\\])[][*?#~^\|\<\>]* ]]; then
         compadd -Qf -W "$prepath$realpath" "$pfxsfx[@]" "$mopts[@]" \
                 -M "r:|/=* r:|=*" - "$linepath$tmp4${(@)^tmp1}"
       else