mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-16 14:41:02 +02:00
37693: turn Dash into '-' in glob qualifiers
This commit is contained in:
parent
ad16356e19
commit
c2b6bd51f9
2 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
2016-01-19 Peter Stephenson <p.stephenson@samsung.com>
|
2016-01-19 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
|
* 37693: Src/glob.c: turn Dash into '-' in glob qualifiers.
|
||||||
|
|
||||||
* 37689: README, Src/glob.c, Src/lex.c, Src/pattern.c,
|
* 37689: README, Src/glob.c, Src/lex.c, Src/pattern.c,
|
||||||
Src/zsh.h, Test/D02glob.ztst: also ! and ^ need to be tokenised
|
Src/zsh.h, Test/D02glob.ztst: also ! and ^ need to be tokenised
|
||||||
in character set.
|
in character set.
|
||||||
|
|
|
@ -1230,7 +1230,7 @@ zglob(LinkList list, LinkNode np, int nountok)
|
||||||
char *s;
|
char *s;
|
||||||
int sense, qualsfound;
|
int sense, qualsfound;
|
||||||
off_t data;
|
off_t data;
|
||||||
char *sdata, *newcolonmod;
|
char *sdata, *newcolonmod, *ptr;
|
||||||
int (*func) _((char *, Statptr, off_t, char *));
|
int (*func) _((char *, Statptr, off_t, char *));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1273,6 +1273,9 @@ zglob(LinkList list, LinkNode np, int nountok)
|
||||||
*s++ = 0;
|
*s++ = 0;
|
||||||
if (qualsfound == 2)
|
if (qualsfound == 2)
|
||||||
s += 2;
|
s += 2;
|
||||||
|
for (ptr = s; *ptr; ptr++)
|
||||||
|
if (*ptr == Dash)
|
||||||
|
*ptr = '-';
|
||||||
while (*s && !newcolonmod) {
|
while (*s && !newcolonmod) {
|
||||||
func = (int (*) _((char *, Statptr, off_t, char *)))0;
|
func = (int (*) _((char *, Statptr, off_t, char *)))0;
|
||||||
if (idigit(*s)) {
|
if (idigit(*s)) {
|
||||||
|
|
Loading…
Reference in a new issue