Hi Eric, > But as long as we're relying on Bash semantics, why not use the simpler: > > local -; set -x > > which will auto-restore $- (and hence set +x if needed) when the > function exits, rather than having to futz around with $is_tracing?
Because it's not portable. It does not work with - bash versions < 4.0, - /bin/sh on macOS (because that is bash-3.2.57), - /bin/sh on Solaris. I've committed the testing script with its results at https://git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=blob;f=test-programs/sh-features Bruno