about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@ipost.com>2021-04-10 14:10:21 -0700
committerBart Schaefer <schaefer@ipost.com>2021-04-10 14:13:02 -0700
commite67ccd7f1efae7696dc17f6e3e720cd994e90155 (patch)
tree453c16b9f1a2bfbcc7ce1335eecaea152a3c413f
parent13f85796ac15c871cf760f6415424f4f96c0a460 (diff)
downloadzsh-e67ccd7f1efae7696dc17f6e3e720cd994e90155.tar.gz
zsh-e67ccd7f1efae7696dc17f6e3e720cd994e90155.tar.xz
zsh-e67ccd7f1efae7696dc17f6e3e720cd994e90155.zip
Add TYPESET_DOES_NOT_SET option (cf. 48469)
-rw-r--r--Src/builtin.c2
-rw-r--r--Src/options.c1
-rw-r--r--Src/zsh.h1
-rw-r--r--Test/E03posix.ztst2
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