1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-20 11:51:24 +01:00

25266: always use EXTENDED_GLOB for patterns in ZLS_COLORS

This commit is contained in:
Peter Stephenson 2008-07-05 19:55:29 +00:00
parent 1a9386290b
commit 5527851061
3 changed files with 13 additions and 1 deletions

View file

@ -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

View file

@ -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

View file

@ -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;
}