summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Src/glob.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4264932f6..351dedede 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 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,
 	Src/zsh.h, Test/D02glob.ztst: also ! and ^ need to be tokenised
 	in character set.
diff --git a/Src/glob.c b/Src/glob.c
index c7992813e..69de15544 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -1230,7 +1230,7 @@ zglob(LinkList list, LinkNode np, int nountok)
 	char *s;
 	int sense, qualsfound;
 	off_t data;
-	char *sdata, *newcolonmod;
+	char *sdata, *newcolonmod, *ptr;
 	int (*func) _((char *, Statptr, off_t, char *));
 
 	/*
@@ -1273,6 +1273,9 @@ zglob(LinkList list, LinkNode np, int nountok)
 	*s++ = 0;
 	if (qualsfound == 2)
 	    s += 2;
+	for (ptr = s; *ptr; ptr++)
+	    if (*ptr == Dash)
+		*ptr = '-';
 	while (*s && !newcolonmod) {
 	    func = (int (*) _((char *, Statptr, off_t, char *)))0;
 	    if (idigit(*s)) {