From e67ccd7f1efae7696dc17f6e3e720cd994e90155 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 10 Apr 2021 14:10:21 -0700 Subject: Add TYPESET_DOES_NOT_SET option (cf. 48469) --- Src/builtin.c | 2 +- Src/options.c | 1 + Src/zsh.h | 1 + Test/E03posix.ztst | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Src/builtin.c b/Src/builtin.c index f0c490119..edd4cad44 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2491,7 +2491,7 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func), return NULL; } } - if (isset(POSIXBUILTINS)) + if (isset(TYPESETDOESNOTSET)) pm->node.flags |= PM_DEFAULTED; } else { if (idigit(*pname)) diff --git a/Src/options.c b/Src/options.c index fba021e7d..766ffdfdb 100644 --- a/Src/options.c +++ b/Src/options.c @@ -257,6 +257,7 @@ static struct optname optns[] = { {{NULL, "sunkeyboardhack", 0}, SUNKEYBOARDHACK}, {{NULL, "transientrprompt", 0}, TRANSIENTRPROMPT}, {{NULL, "trapsasync", 0}, TRAPSASYNC}, +{{NULL, "typesetdoesnotset", OPT_EMULATE|OPT_BOURNE}, TYPESETDOESNOTSET}, {{NULL, "typesetsilent", OPT_EMULATE|OPT_BOURNE}, TYPESETSILENT}, {{NULL, "unset", OPT_EMULATE|OPT_BSHELL}, UNSET}, {{NULL, "verbose", 0}, VERBOSE}, diff --git a/Src/zsh.h b/Src/zsh.h index 27be1f788..12efb784f 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -2536,6 +2536,7 @@ enum { SUNKEYBOARDHACK, TRANSIENTRPROMPT, TRAPSASYNC, + TYPESETDOESNOTSET, TYPESETSILENT, UNSET, VERBOSE, diff --git a/Test/E03posix.ztst b/Test/E03posix.ztst index c59ca4f6e..a2769f3aa 100644 --- a/Test/E03posix.ztst +++ b/Test/E03posix.ztst @@ -4,7 +4,7 @@ # %prep - setopt POSIX_BUILTINS + setopt POSIX_BUILTINS TYPESET_DOES_NOT_SET %test -- cgit 1.4.1