summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-14 09:26:55 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-14 09:26:55 +0000
commit5f81bbc8695db820a2a1996b63cc8ec3b9a902e6 (patch)
tree3172c05313ef0811bf86c84f0e0bb7ab7896f1f5
parent53f5cc9465c0a0d3b7ae125a318fb8a0b7373908 (diff)
downloadzsh-5f81bbc8695db820a2a1996b63cc8ec3b9a902e6.tar.gz
zsh-5f81bbc8695db820a2a1996b63cc8ec3b9a902e6.tar.xz
zsh-5f81bbc8695db820a2a1996b63cc8ec3b9a902e6.zip
nix kaboom with `time time' (?)
-rw-r--r--ChangeLog4
-rw-r--r--Src/parse.c18
2 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 68e9da60a..819021237 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2000-06-14  Sven Wischnowsky  <wischnow@zsh.org>
 
-	* 11885: Src/Zle/complist.c: better fix for menu selection on dumb 
+	* ?????: Src/parse.c: nix kaboom with `time time'
+	
+	* ?????: Src/Zle/complist.c: better fix for menu selection on dumb 
 	terminal
 	
 2000-06-13  Clint Adams  <schizo@debian.org>
diff --git a/Src/parse.c b/Src/parse.c
index 5e90984ac..4f79b2e4b 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -799,10 +799,6 @@ par_cmd(int *complex)
 	par_funcdef();
 	cmdpop();
 	break;
-    case TIME:
-	*complex = 1;
-	par_time();
-	break;
     case DINBRACK:
 	cmdpush(CS_COND);
 	par_dinbrack();
@@ -813,6 +809,20 @@ par_cmd(int *complex)
 	ecstr(tokstr);
 	yylex();
 	break;
+    case TIME:
+	{
+	    static int inpartime = 0;
+
+	    if (!inpartime) {
+		*complex = 1;
+		inpartime = 1;
+		par_time();
+		inpartime = 0;
+		break;
+	    }
+	}
+	tok = STRING;
+	/* fall through */
     default:
 	{
 	    int sr;