diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Doc/Zsh/mod_complist.yo | 3 | ||||
-rw-r--r-- | Src/Zle/complist.c | 6 |
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; } |