From ca0deae382e7798eeff829d9b93472cf876574a3 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 20 Apr 2004 12:11:13 +0000 Subject: 19767, 19785: store flags for -z and -k options to autoload allowing the completion system to be used with ksh_autoload set --- Src/exec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Src/exec.c') 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 */ -- cgit v1.2.3