about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2017-04-07 22:35:00 -0700
committerBart Schaefer <schaefer@zsh.org>2017-04-07 22:35:00 -0700
commitca2a43f23c626b3299404af4c7121777a3f142f7 (patch)
tree24f2824d3100050e38abe93e63b7d150d113c024
parentce7a98fc05c6cb8ff944ccdc5c82d84592b00ed6 (diff)
downloadzsh-ca2a43f23c626b3299404af4c7121777a3f142f7.tar.gz
zsh-ca2a43f23c626b3299404af4c7121777a3f142f7.tar.xz
zsh-ca2a43f23c626b3299404af4c7121777a3f142f7.zip
40940: untokenize names of condition features before attempting to look up the definition from a module.
Necessary because of 40760 (tokenization of '-' as Dash).
-rw-r--r--ChangeLog6
-rw-r--r--Src/cond.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 30c0e5f76..b232c16af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-07  Bart Schaefer  <schaefer@zsh.org>
+
+	* 40940: Src/cond.c: untokenize names of condition features
+	before attempting to look up the definition from a module.
+	Necessary because of 40760 (tokenization of '-' as Dash).
+
 2017-04-05  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* users/22653: Doc/Zsh/options.yo: Clarify REMATCH_PCRE
diff --git a/Src/cond.c b/Src/cond.c
index 9b739f6c1..a63841234 100644
--- a/Src/cond.c
+++ b/Src/cond.c
@@ -139,9 +139,9 @@ evalcond(Estate state, char *fromtest)
 		l = 2;
 	    }
 	    if (name && IS_DASH(name[0]))
-		errname = name;
+		untokenize(errname = name);
 	    else if (strs[0] && IS_DASH(*strs[0]))
-		errname = strs[0];
+		untokenize(errname = strs[0]);
 	    else
 		errname = "<null>";
 	    if (name && IS_DASH(name[0]) &&