From 24559bb1f681c6037cdc91ed4b1a0ffb70be173a Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 6 Jun 2000 12:19:33 +0000 Subject: fix for _path_files and globcomplete, better test if word contains wildcards (11776) --- Completion/Core/_path_files | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Completion/Core') diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index be7eaff85..32a92302e 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -184,7 +184,7 @@ eorig="$orig" [[ $compstate[insert] = (*menu|[0-9]*) || -n "$_comp_correct" || ( -n "$compstate[pattern_match]" && - "${orig#\~}" != "${${orig#\~}:q}" ) ]] && menu=yes + "${orig#\~}" != (|*[^\\])[][*?#~^\|\<\>]* ) ]] && menu=yes # Now let's have a closer look at the string to complete. @@ -491,7 +491,8 @@ for prepath in "$prepaths[@]"; do fi if (( tmp4 )) || - [[ -n "$compstate[pattern_match]" && "$tmp2" != "${(q)tmp2}" ]]; then + [[ -n "$compstate[pattern_match]" && + "$tmp2" = (|*[^\\])[][*?#~^\|\<\>]* ]]; then # It is. For menucompletion we now add the possible completions # for this component with the unambigous prefix we have built # and the rest of the string from the line as the suffix. -- cgit 1.4.1