about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 7e77bc190..6c41ce2fd 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -992,9 +992,13 @@ cd_new_pwd(int func, LinkNode dir, int chaselinks)
 
     /* execute the chpwd function */
     if ((l = getshfunc("chpwd")) != &dummy_list) {
+	int osc = sfcontext;
+
 	fflush(stdout);
 	fflush(stderr);
+	sfcontext = SFC_HOOK;
 	doshfunc("chpwd", l, NULL, 0, 1);
+	sfcontext = osc;
     }
 
     dirstacksize = getiparam("DIRSTACKSIZE");
@@ -1469,7 +1473,7 @@ bin_typeset(char *name, char **argv, char *ops, int func)
     Param pm;
     Asgment asg;
     Comp com;
-    char *optstr = "aiLRZlurtxU----A";
+    char *optstr = "aiALRZlurtxU";
     int on = 0, off = 0, roff, bit = PM_ARRAY;
     int initon, initoff, of, i;
     int returnval = 0, printflags = 0;