Open borkovic opened 8 months ago
Right, this is alluded to in the commit which added "flag". I have to say this is an unfortunate tangle at this point. I added -n mostly for testing purposes back in the day. "flag" was added much later. Perhaps it should simply reject "n" with an error. Resuming execution with "flag n -" makes no sense.
Bash man page says set -n
is ignored in interactive shells:
-n Read commands but do not execute them. This may be used to check a shell script for syntax errors. This is ignored by interactive shells.
I agree with
Perhaps it should simply reject "n" with an error.
Executing
flag n +
does not stop execution. If it did, how would we recoverflag n -
. Should flag 'n' be immutable?I expected no output, similar to the case when
-n
is passed on the command line: