about summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-13 08:42:10 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-13 08:42:10 +0000
commitc3082d546e19df8fa70f179e1151c6b742ba5388 (patch)
treee598b63d43686f1b06bf12346924a8df930d8a88 /Src/lex.c
parent6ef0d9767fc86b39c17bc29ec633dfb07baadd6e (diff)
downloadzsh-c3082d546e19df8fa70f179e1151c6b742ba5388.tar.gz
zsh-c3082d546e19df8fa70f179e1151c6b742ba5388.tar.xz
zsh-c3082d546e19df8fa70f179e1151c6b742ba5388.zip
slightly improved (z) flag for parsing conditions; recognising glob flags in conditions still doesn't work (12237)
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 5aa63ece5..db2c2c8bd 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -116,7 +116,12 @@ mod_export int parbegin;
 
 /**/
 mod_export int parend;
+
+/* don't recognize comments */
  
+/**/
+mod_export int nocomments;
+
 /* text of puctuation tokens */
 
 /**/
@@ -672,8 +677,8 @@ gettok(void)
 
     /* chars in initial position in word */
 
-    if (c == hashchar &&
-	((zleparse != 3 && isset(INTERACTIVECOMMENTS)) ||
+    if (c == hashchar && !nocomments &&
+	(isset(INTERACTIVECOMMENTS) ||
 	 (!zleparse && !expanding &&
 	  (!interact || unset(SHINSTDIN) || strin)))) {
 	/* History is handled here to prevent extra  *