about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2004-04-20 12:11:13 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2004-04-20 12:11:13 +0000
commitca0deae382e7798eeff829d9b93472cf876574a3 (patch)
treee5d49d22db9e4521ce70fadeaec7dbe4502728b1 /Src/exec.c
parent8c890ebe7fb9c9335b2433148dec0588f7fa3f7a (diff)
downloadzsh-ca0deae382e7798eeff829d9b93472cf876574a3.tar.gz
zsh-ca0deae382e7798eeff829d9b93472cf876574a3.tar.xz
zsh-ca0deae382e7798eeff829d9b93472cf876574a3.zip
19767, 19785: store flags for -z and -k options to autoload allowing the
completion system to be used with ksh_autoload set
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 8256910b3..ff34edb4b 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3398,8 +3398,12 @@ loadautofn(Shfunc shf, int fksh, int autol)
     prog = getfpfunc(shf->nam, &ksh);
     noaliases = noalias;
 
-    if (ksh == 1)
+    if (ksh == 1) {
 	ksh = fksh;
+	if (ksh == 1)
+	    ksh = (shf->flags & PM_KSHSTORED) ? 2 :
+		  (shf->flags & PM_ZSHSTORED) ? 0 : 1;
+    }
 
     if (prog == &dummy_eprog) {
 	/* We're not actually in the function; decrement locallevel */