about summary refs log tree commit diff
path: root/Src/init.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:10:10 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:10:10 +0000
commit2a5a899a55fd2bce10efd01c75a4bec5285aa46c (patch)
tree4744bc2f1a6b86fc1b12870be94edf96fdab4879 /Src/init.c
parent9003d99d16c46b5679da7fcf1f2a41adef495ff9 (diff)
downloadzsh-2a5a899a55fd2bce10efd01c75a4bec5285aa46c.tar.gz
zsh-2a5a899a55fd2bce10efd01c75a4bec5285aa46c.tar.xz
zsh-2a5a899a55fd2bce10efd01c75a4bec5285aa46c.zip
zsh-3.1.5-pws-4 zsh-3.1.5-pws-4
Diffstat (limited to 'Src/init.c')
-rw-r--r--Src/init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Src/init.c b/Src/init.c
index decc7617e..0c874eead 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -111,13 +111,17 @@ loop(int toplevel, int justonce)
 	    if (toplevel && (prelist = getshfunc("preexec")) != &dummy_list) {
 		Histent he = gethistent(curhist);
 		LinkList args;
+		int osc = sfcontext;
+
 		PERMALLOC {
 		    args = newlinklist();
 		    addlinknode(args, "preexec");
 		    if (he && he->text)
 			addlinknode(args, he->text);
 		} LASTALLOC;
+		sfcontext = SFC_HOOK;
 		doshfunc("preexec", prelist, args, 0, 1);
+		sfcontext = osc;
 		freelinklist(args, (FreeFunc) NULL);
 		errflag = 0;
 	    }
@@ -613,6 +617,7 @@ setupvals(void)
     breaks = loops = 0;
     lastmailcheck = time(NULL);
     locallevel = sourcelevel = 0;
+    sfcontext = SFC_DIRECT;
     trapreturn = 0;
     noerrexit = -1;
     nohistsave = 1;