NetBSD/bin
kre d98a8b3c74 Command line, and "set" command options processing cleanup.
sh +c "command string"	no longer works (it must be -c)
sh +o   and   sh -o	no longer work (if you could call what they did
			before working.)  nb: this is without an option name.
-ooo Opt1 Opt2 Opt3	no longer works (set & cmd line), this should be
			-o Opt1 -o Opt2 -o Opt3   (same with +ooo of course).
-oOpt			is now supported - option value (name of option in
			this case) immediately following -o (or +o).
			(as with other commands that use std opt parsing)
			Both set comamnd and command line.

In addition, the output from "set +o" has shrunk dramatically, by borrowing
a trick from ksh93 (but implemented in a more traditional syntax).
"set +o" is required to produce a command (or commands) which when executed
later, will return all options to the state they were in when "set +o"
was done.  Previously that was done by generating a set command, with
every option listed (set -o opt +o other-opt ...) to set them all back
to their current setings.   Now we have a new "magic option" ("default")
which sets all options to their default values, so now set +o output
need only be "set -o default -o changed-opt ..." (only the options that
have been changed from their default values need be explicitly mentioned.)
The definition of "default value" for this is the value the shell set the
option to, after startup, after processing the command line (with any
flags, or -o option type settings), but before beginning processing any
user input (incuding startup files, like $ENV etc).

Anyone can execute "set -o default" of course, but only from a "set"
command (it makes no sense at all as a -o option to sh).   This also
causes "set +o" to be slightly more useful as a general command, as
ignoring the "set -o default" part of the result, it lists just those
options that have been altered after sh startup.  There is no +o default.
There isn't an option called "default" at all...

This causes some of the commented out text from sh.1 to become uncommented.
2017-05-18 13:53:18 +00:00
..
cat When invoked with -se, print a '$' on blank lines 2016-06-16 00:52:37 +00:00
chio Move the description of CHANGER variable to ENVIRONMENT section 2016-08-25 18:16:10 +00:00
chmod Document the version chmod first appeared. 2016-08-11 00:10:42 +00:00
cp Document the version cp first appeared. 2016-08-11 00:17:23 +00:00
csh switch to a backtracking instead of a recursive pattern matcher. 2017-04-27 18:50:34 +00:00
date The range of the SS field is [0,60] 2017-01-03 16:01:05 +00:00
dd Drop main() prototype. 2016-09-05 01:00:07 +00:00
df Bump date 2016-08-10 23:48:14 +00:00
domainname
echo Drop main() prototype. 2016-09-05 01:00:07 +00:00
ed PR/50879: David Binderman: remove redundant code. 2016-03-02 19:11:28 +00:00
expr Drop main() prototype. 2016-09-05 01:00:07 +00:00
hostname
kill Clarify 0 2017-04-22 23:01:36 +00:00
ksh PR/52210: David H. Gutteridge: revert var pattern handling. 2017-05-03 00:41:34 +00:00
ln When called as "link" (not currently installed that way) always simply 2017-04-22 12:22:31 +00:00
ls white space 2017-02-06 21:06:04 +00:00
mkdir Grammar 2016-08-10 18:42:00 +00:00
mt
mv Forgot to bump date with previous commit 2016-08-10 18:08:14 +00:00
pax Document the version pax first appeared. 2016-08-12 01:52:22 +00:00
ps simplify logic; there must be no CPU usage when p_swtime is zero 2016-12-26 20:52:39 +00:00
pwd Document the version pwd first appeared. 2016-08-12 02:03:26 +00:00
rcmd
rcp
rm Document the version rm first appeared. 2016-08-12 02:26:42 +00:00
rmdir Document the version rmdir first appeared. 2016-08-12 02:30:37 +00:00
sh Command line, and "set" command options processing cleanup. 2017-05-18 13:53:18 +00:00
sleep Document the version sleep first appeared. 2016-08-12 02:36:38 +00:00
stty need <time.h> for time(3) 2017-01-10 20:44:05 +00:00
sync Drop main() prototype. 2016-09-05 01:00:07 +00:00
test Drop main() prototype. 2016-09-05 01:00:07 +00:00
Makefile
Makefile.inc