From 82ff9f24f170eea7daa935fdaa09ab75a2f277ff Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sun, 18 Apr 2021 13:58:09 -0700 Subject: 48560: add TYPESET_TO_UNSET option to remove initialization of parameters Changes typeset such that ${newparam-notset} yields "notset" and "typeset -p newparam" does not show an assignment to the parameter. This is similar to the default behavior of bash and ksh, with minor differences in typeset output. Also add tests for some POSIX incompatibilities plus minor changes for test harness robustness. --- Src/options.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Src/options.c') diff --git a/Src/options.c b/Src/options.c index 6ea6290e5..783022591 100644 --- a/Src/options.c +++ b/Src/options.c @@ -259,6 +259,7 @@ static struct optname optns[] = { {{NULL, "transientrprompt", 0}, TRANSIENTRPROMPT}, {{NULL, "trapsasync", 0}, TRAPSASYNC}, {{NULL, "typesetsilent", OPT_EMULATE|OPT_BOURNE}, TYPESETSILENT}, +{{NULL, "typesettounset", OPT_EMULATE|OPT_BOURNE}, TYPESETTOUNSET}, {{NULL, "unset", OPT_EMULATE|OPT_BSHELL}, UNSET}, {{NULL, "verbose", 0}, VERBOSE}, {{NULL, "vi", 0}, VIMODE}, -- cgit v1.2.3