summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2019-01-03 13:51:19 +0000
committerPeter Stephenson <p.stephenson@samsung.com>2019-01-03 13:51:19 +0000
commit232b43571f8ffda16889686a7aeffd4d9a386386 (patch)
treeb12997151866304803fb3211ff8c2e4e02bb0b48
parentb3778fee1abddaec600ecab73cc9cd936d625cf9 (diff)
downloadzsh-232b43571f8ffda16889686a7aeffd4d9a386386.tar.gz
zsh-232b43571f8ffda16889686a7aeffd4d9a386386.tar.xz
zsh-232b43571f8ffda16889686a7aeffd4d9a386386.zip
43969: untokenize Dash for compctl with GLOB_SUBST set
-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);