1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

manual: invocation options: edits for clarity

src/cmd/ksh93/data/builtins.c:
- sh_optksh[]: Edit descriptions of -c and -s options for clarity.
- sh_set[]: The --rc long name equivalent for -E was documented
  wrong, but in any case it does not belong in sh_set[], because
  that also shows up in 'set --man' and this invocation-only option
  cannot be used with 'set'. Remove it. (Note that all other
  invocation options already don't have inline documentation of
  their long equivalents. This may or may not be fixed at some
  point. It is problematic because they should not be documented in
  sh_set[] but there is no other good place for them.)

src/cmd/ksh93/sh.1:
- Generally edit the Invocation section for clarity.
- Document the long invocation option equivalents.
- Remove some nonsense from the -s description: "Shell output,
  except for the output of the Special Commands listed above, is
  written to file descriptor 2" (which is standard error).
  In fact, this option has no influence at all on what is written
  to standard error or standard output.
This commit is contained in:
Martijn Dekker 2021-02-25 16:23:42 +00:00
parent caf7ab6c71
commit 82d6272733
2 changed files with 45 additions and 34 deletions

View file

@ -8250,37 +8250,48 @@ when the locale is not C or POSIX.
No commands will be executed.
.PD
.TP 8
.B \-E
Reads the file named by the
.BR \-E \ or\ \-o\ rc \ or\ \-\-rc
Read the file named by the
.B ENV
variable or by
.B \s-1$HOME\s+1/\f3.\fPkshrc
if not defined after the profiles.
On by default for interactive shells. Use
.BR +E ,
.B +o\ rc
or
.B \-\-norc
to turn off.
.TP 8
.BI \-c
If the
Read and execute a script from the first
.I arg
instead of a file.
The second
.IR arg ,
if present, becomes that script's command name
.RB ( $0 ).
Any third and further
.IR arg s
become positional parameters starting at
.BR $1 .
.TP
.B \-s
Read and execute a script from standard input instead of a file.
The command name
.RB ( $0 )
cannot be set.
Any
.IR arg s
become the positional parameters starting at
.BR $1 .
This option is forced on if no
.I arg
is given and is ignored if
.B \-c
option is present, then
commands are read from the first
.IR arg .
Any remaining arguments become
positional parameters starting at
.BR 0 .
is also specified.
.TP
.B \-s
If the
.B \-s
option is present or if no
arguments remain,
then commands are read from the standard input.
Shell output,
except for the output of the
.I Special Commands\^
listed above,
is written to
file descriptor 2.
.TP
.B \-i
.BR \-i \ or\ \-o\ interactive \ or\ \-\-interactive
If the
.B \-i
option is present or
@ -8295,7 +8306,7 @@ does not kill an interactive shell) and \s-1INTR\s+1 is caught and ignored
is interruptible).
In all cases, \s-1QUIT\s+1 is ignored by the shell.
.TP
.B \-r
.BR \-r \ or\ \-o\ restricted \ or\ \-\-restricted
If the
.B \-r
option is present, the shell is a restricted shell.