about summary refs log tree commit diff
path: root/Src/builtin.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/builtin.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/builtin.c')
-rw-r--r--Src/builtin.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 8703ecead..b7a724cb7 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2406,9 +2406,16 @@ bin_functions(char *name, char **argv, Options ops, int func)
 	on |= PM_TAGGED;
     else if (OPT_PLUS(ops,'t'))
 	off |= PM_TAGGED;
+    if (OPT_MINUS(ops,'z'))
+	on |= PM_ZSHSTORED;
+    else if (OPT_PLUS(ops,'z'))
+	off |= PM_ZSHSTORED;
+    if (OPT_MINUS(ops,'k'))
+	on |= PM_KSHSTORED;
+    else if (OPT_PLUS(ops,'k'))
+	off |= PM_KSHSTORED;
 
     if ((off & PM_UNDEFINED) || (OPT_ISSET(ops,'k') && OPT_ISSET(ops,'z')) ||
-	(!OPT_PLUS(ops,'X') && (OPT_ISSET(ops,'k') || OPT_ISSET(ops,'z'))) ||
 	(OPT_MINUS(ops,'X') && (OPT_ISSET(ops,'m') || *argv || !scriptname))) {
 	zwarnnam(name, "invalid option(s)", NULL, 0);
 	return 1;