Closed adavies42 closed 5 months ago
I recall that the AST team always tried to preserve existing behaviour for established syntax. For that reason, any new behaviour was only enabled in the new function name {
... syntax.
To be clear, what I'm suggesting is an addition to src/cmd/ksh93/sh.1, probably to the Functions section, documenting how set -o
options behave wrt both types of functions.
It's a long-standing behavior of ksh that
set -e
andset -x
need to be repeated at the beginning offunction
functions (but not()
functions) even if they're active in the main script.Is it actually documented anywhere? Are there any other shell options that don't inherit into functions and/or differ between the two types of functions?