2017-06-08 11:39:31 +0200, Joerg Schilling: > Jilles Tjoelker <jil...@stack.nl> wrote: > > > > While doing this, I discovered that the Burne Shell first parses the > > > command line options and later decides whether the current shell is > > > interactive. For this reason, I do not see that it would be possible > > > to use "sh +m" in a useful way. > > > > It is possible to make a distinction between options that are false > > because they are explicitly turned off and options that are false > > because they have not been mentioned. > > Well, true but it would cause aditional code that is only needed for that > single case. Given that the current version of the Bourne Shell implements > more > than 32 flag bits, this would need to be done for more than a single variable. [...]
Let's face it, a shell that would leave the "m" option "on" when the user explicitly requested it to be "off" in sh +m is a bug (and in this case also a conformance bug for shells that support UP though it may need to be clarified). -- Stephane