[comp.unix.questions] /bin/sh -s flag

chris@mimsy.UUCP (Chris Torek) (10/04/88)

>In article <13820@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes:
>>The `-s' option means `reading stdin'; it gets set automatically
>>*after* the shell sets up $-.  When you `set <anything>', sh updates
>>its list of currently set flags, and -s suddenly appears.  I regard
>>this as a minor bug, which I may fix later.

In article <8625@smoke.ARPA>, gwyn@smoke.ARPA (Doug Gwyn ) writes:
>Be careful!  The c, s, i, and r flags are automatically set by the shell
>and should not be alterable by the user.  The s flag SHOULD be set for
>normal interactive shell use.

You misinterpret: I mean that `$-' should expand to s *before* typing
`set'.  I.e.:

	% /bin/sh
	$ echo $-
	s
	$ 

The `r' flag has always been settable with `set -r'; obviously it
should not be unsettable with `set +r'.  `-s' is in fact never
inspected again, and clearing it after startup would have no effect,
but I have arranged that both it and -i cannot be unset.  The -c flag
is parsed specially anyway, so it is no trouble.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris