about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-23 03:54:48 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-23 03:54:48 +0000
commite205dee960e5c32e5acfa130942e26ed498539fd (patch)
tree5774eb7397521f9e9c272cc19e4fa87fd429c5f8
parent9117370f0d9951ae824fb4f61fafb9ca773d81a5 (diff)
downloadzsh-e205dee960e5c32e5acfa130942e26ed498539fd.tar.gz
zsh-e205dee960e5c32e5acfa130942e26ed498539fd.tar.xz
zsh-e205dee960e5c32e5acfa130942e26ed498539fd.zip
zsh-workers/10168
-rw-r--r--Src/init.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/init.c b/Src/init.c
index e59ff16a5..9e75e4b00 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -106,12 +106,16 @@ loop(int toplevel, int justonce)
     for (;;) {
 	freeheap();
 	errflag = 0;
+	hbegin(1);		/* init history mech        */
 	if (isset(SHINSTDIN)) {
 	    setblock_stdin();
-	    if (interact)
+	    if (interact) {
+	        int hstop = stophist;
+		stophist = 3;
 		preprompt();
+		stophist = hstop;
+	    }
 	}
-	hbegin(1);		/* init history mech        */
 	intr();			/* interrupts on            */
 	lexinit();              /* initialize lexical state */
 	if (!(prog = parse_event())) {	/* if we couldn't parse a list */