about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-07-05 19:55:29 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-07-05 19:55:29 +0000
commit5527851061a83ae0eac78f94fc62c03c01a31af9 (patch)
treea7d87817d34517e233d29e7a0165828013305965
parent1a9386290b36ea4d500092f7f5b6a08367ec4886 (diff)
downloadzsh-5527851061a83ae0eac78f94fc62c03c01a31af9.tar.gz
zsh-5527851061a83ae0eac78f94fc62c03c01a31af9.tar.xz
zsh-5527851061a83ae0eac78f94fc62c03c01a31af9.zip
25266: always use EXTENDED_GLOB for patterns in ZLS_COLORS
-rw-r--r--ChangeLog5
-rw-r--r--Doc/Zsh/mod_complist.yo3
-rw-r--r--Src/Zle/complist.c6
3 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a4b87970..04033033f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-05  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 25266: Doc/Zsh/mod_complist.yo, Src/Zle/complist.c: always use
+	EXTENDED_GLOB for patterns in ZLS_COLORS.
+
 2008-07-01  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 25262: Src/parse.c: suspicious attempt to test errors
diff --git a/Doc/Zsh/mod_complist.yo b/Doc/Zsh/mod_complist.yo
index 4d873728f..e5d2b463f 100644
--- a/Doc/Zsh/mod_complist.yo
+++ b/Doc/Zsh/mod_complist.yo
@@ -100,7 +100,8 @@ Apart from these strings, the var(name) may also be an asterisk
 (`tt(*)') followed by any string. The var(value) given for such a
 string will be used for all files whose name ends with the string.
 The var(name) may also be an equals sign (`tt(=)') followed by a
-pattern.  The var(value) given for this pattern will be used for all
+pattern; the tt(EXTENDED_GLOB) option will be turned on for evaluation
+of the pattern.  The var(value) given for this pattern will be used for all
 matches (not just filenames) whose display string are matched by
 the pattern.  Definitions for both of these take precedence over the
 values defined for file types and the form with the leading asterisk 
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 6e0a89a47..de4b493c7 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -1923,6 +1923,7 @@ static int
 complistmatches(UNUSED(Hookdef dummy), Chdata dat)
 {
     static int onlnct = -1;
+    static int extendedglob;
 
     Cmgroup oamatches = amatches;
 
@@ -1945,6 +1946,8 @@ complistmatches(UNUSED(Hookdef dummy), Chdata dat)
      * useful outside.
      */
     pushheap();
+    extendedglob = opts[EXTENDEDGLOB];
+    opts[EXTENDEDGLOB] = 1;
 
     getcols();
 
@@ -1958,6 +1961,7 @@ complistmatches(UNUSED(Hookdef dummy), Chdata dat)
 	noselect = 1;
 	amatches = oamatches;
 	popheap();
+	opts[EXTENDEDGLOB] = extendedglob;
 	return 1;
     }
     if (inselect || mlbeg >= 0)
@@ -1990,6 +1994,7 @@ complistmatches(UNUSED(Hookdef dummy), Chdata dat)
 	if (asklist()) {
 	    amatches = oamatches;
 	    popheap();
+	    opts[EXTENDEDGLOB] = extendedglob;
 	    return (noselect = 1);
 	}
     }
@@ -2034,6 +2039,7 @@ complistmatches(UNUSED(Hookdef dummy), Chdata dat)
     amatches = oamatches;
 
     popheap();
+    opts[EXTENDEDGLOB] = extendedglob;
 
     return noselect;
 }