From 2a5a899a55fd2bce10efd01c75a4bec5285aa46c Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:10:10 +0000 Subject: zsh-3.1.5-pws-4 --- Src/init.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Src/init.c') 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; -- cgit 1.4.1