about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-06 12:19:33 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-06 12:19:33 +0000
commit24559bb1f681c6037cdc91ed4b1a0ffb70be173a (patch)
tree50b7f29f57139c4275346c7547e96282c92da839
parent4900804b615ce659b2b1c82644fc5f2240345668 (diff)
downloadzsh-24559bb1f681c6037cdc91ed4b1a0ffb70be173a.tar.gz
zsh-24559bb1f681c6037cdc91ed4b1a0ffb70be173a.tar.xz
zsh-24559bb1f681c6037cdc91ed4b1a0ffb70be173a.zip
fix for _path_files and globcomplete, better test if word contains wildcards (11776)
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Core/_path_files5
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 94bfe5efc..d3b0825cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-06-06  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 11776: Completion/Core/_path_files: fix for _path_files and
+ 	globcomplete, better test if word contains wildcards
+	
 	* 11768: Doc/Zsh/expn.yo, Src/lex.c, Src/subst.c: make (e) flag be
  	silent unless (X) is given, too
 	
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.