summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/compctl.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d8145deab..e64fab175 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-03  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* 43969: Src/Zle/compctl.c: untokenize Dash for compctl with
+	GLOB_SUBST set.
+
 2018-01-01  dana  <dana@dana.is>
 
 	* 43960: Completion/Linux/Command/_setsid,
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c
index 87d13afc1..fe87409cb 100644
--- a/Src/Zle/compctl.c
+++ b/Src/Zle/compctl.c
@@ -3256,6 +3256,15 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
 	rpl = strlen(rpre);
 	rsl = strlen(rsuf);
     }
+    else
+    {
+	for (p = rpre; *p; ++p)
+	    if (*p == Dash)
+		*p = '-';
+	for (p = rsuf; *p; ++p)
+	    if (*p == Dash)
+		*p = '-';
+    }
     untokenize(lpre);
     untokenize(lsuf);