mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +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:
parent
caf7ab6c71
commit
82d6272733
2 changed files with 45 additions and 34 deletions
|
@ -248,7 +248,6 @@ const char sh_set[] =
|
|||
"be zero if all commands return zero exit status.]"
|
||||
"[+posix?Enable full POSIX standard compliance mode.]"
|
||||
"[+privileged?Equivalent to \b-p\b.]"
|
||||
"[+rc?Do not run the \b.kshrc\b file for interactive shells.]"
|
||||
"[+showme?Simple commands preceded by a \b;\b will be traced "
|
||||
"as if \b-x\b were enabled but not executed.]"
|
||||
"[+trackall?Equivalent to \b-h\b.]"
|
||||
|
@ -1527,14 +1526,10 @@ const char sh_optksh[] =
|
|||
"[+DESCRIPTION?\b\f?\f\b is a command language interpreter that "
|
||||
"executes commands read from a command line string, the "
|
||||
"standard input, or a specified file.]"
|
||||
"[+?If the \b-i\b option is present, or there are no \aarg\as and "
|
||||
"[+?If the \b-i\b option is specified, or there are no \aarg\as and "
|
||||
"the standard input and standard error are attached to a "
|
||||
"terminal, the shell is considered to be interactive.]"
|
||||
"[+?The \b-s\b and \b-c\b options are mutually exclusive. If the \b-c\b "
|
||||
"option is specified, the first \aarg\a is the command-line string "
|
||||
"and must be specified. Any remaining \aarg\as will be used "
|
||||
"to initialize \b$0\b and positional parameters.]"
|
||||
"[+?If the neither \b-s\b nor \b-c\b is specified, then the first \barg\b "
|
||||
"[+?If neither \b-s\b nor \b-c\b is specified, then the first \barg\b "
|
||||
"will be the pathname of the file containing commands and \b$0\b "
|
||||
"will be set to this value. If there is no file with this pathname, "
|
||||
"and this pathname does not contain a \b/\b, then the \bPATH\b "
|
||||
|
@ -1542,7 +1537,14 @@ const char sh_optksh[] =
|
|||
"\aarg\as will be used to initialize the positional parameters.]"
|
||||
"[+?Any option can use a \b+\b instead of a \b-\b to disable the corresponding "
|
||||
"option.]"
|
||||
"[c?Read the commands from the first \aarg\a.]"
|
||||
"[c?Read and execute a script from the first \aarg\a instead of a file. "
|
||||
"The second \aarg\a, if present, becomes that script's command name (\b$0\b). "
|
||||
"Any third and further \aarg\as become positional parameters starting at \b$1\b.]"
|
||||
"[s?Read and execute a script from standard input instead of a file. "
|
||||
"The command name (\b$0\b) cannot be set. "
|
||||
"Any \aarg\as become the positional parameters starting at \b$1\b. "
|
||||
"This option is forced on if no \aarg\a is given "
|
||||
"and is ignored if \b-c\b is also specified.]"
|
||||
"[i?Specifies that the shell is interactive.]"
|
||||
"[l?Invoke the shell as a login shell; \b/etc/profile\b and \b$HOME/.profile\b, "
|
||||
"if they exist, are read before the first command.]"
|
||||
|
@ -1558,8 +1560,6 @@ const char sh_optksh[] =
|
|||
"\bbuiltin\b.]"
|
||||
"[+-?Executing \bcommand -p\b \a...\a .]"
|
||||
"}"
|
||||
"[s?Read the commands from standard input. The positional parameters will be "
|
||||
"initialized from \aarg\a. This option is forced on if no \aarg\a is given.]"
|
||||
"[D\f:dump-strings\f?Do not execute the script, but output the set of double "
|
||||
"quoted strings preceded by a \b$\b. These strings are needed for "
|
||||
"localization of the script to different locales.]"
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue