mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix various minor problems and update the documentation (#237)
These are minor fixes I've accumulated over time. The following
changes are somewhat notable:
- Added a missing entry for 'typeset -s' to the man page.
- Add strftime(3) to the 'see also' section. This and the date(1)
addition are meant to add onto the documentation for 'printf %T'.
- Removed the man page the entry for ksh reading $PWD/.profile on
login. That feature was removed in commit aa7713c2
.
- Added date(1) to the 'see also' section of the man page.
- Note that the 'hash' command can be used instead of 'alias -t' to
workaround one of the caveats listed in the man page.
- Use an 'out of memory' error message rather than 'out of space'
when memory allocation fails.
- Replaced backticks with quotes in some places for consistency.
- Added missing documentation for the %P date format.
- Added missing documentation for the printf %Q and %p formats
(backported from ksh2020: https://github.com/att/ast/pull/1032).
- The comments that show each builtin's options have been updated.
This commit is contained in:
parent
2d7e9a0d6d
commit
814b5c6890
151 changed files with 378 additions and 378 deletions
|
@ -39,7 +39,7 @@ ksh93, rksh93 \- KornShell, a standard/restricted command and programming langua
|
|||
.B ksh93
|
||||
.\}
|
||||
[
|
||||
.B \(+-abcefhiklmnoprstuvxBCDEGH
|
||||
.B \(+-abcefhiklmnprstuvxBCDEGH
|
||||
] [
|
||||
.B \(+-o
|
||||
option ] .\|.\|. [
|
||||
|
@ -56,7 +56,7 @@ option ] .\|.\|. [
|
|||
.B rksh93
|
||||
.\}
|
||||
[
|
||||
.B \(+-abcefhiklmnopstuvxBCDEGH
|
||||
.B \(+-abcefhiklmnpstuvxBCDEGH
|
||||
] [
|
||||
.B \(+-o
|
||||
option ] .\|.\|. [
|
||||
|
@ -416,7 +416,7 @@ that matches
|
|||
.IR word .
|
||||
The form of the patterns is
|
||||
the same as that used for
|
||||
file-name generation (see
|
||||
file name generation (see
|
||||
.I "File Name Generation\^"
|
||||
below).
|
||||
The
|
||||
|
@ -1214,7 +1214,7 @@ If an array
|
|||
with last subscript
|
||||
.B *
|
||||
.BR @ ,
|
||||
or for index arrays of the form
|
||||
or for indexed arrays of the form
|
||||
.I sub1\^
|
||||
.B ..
|
||||
.IR sub2 .
|
||||
|
@ -1557,7 +1557,7 @@ command.
|
|||
The decimal value returned by the last executed command.
|
||||
.TP
|
||||
.B $
|
||||
The process number of this shell.
|
||||
The process id of this shell.
|
||||
.TP
|
||||
.B _
|
||||
Initially, the value of
|
||||
|
@ -1766,7 +1766,7 @@ built-in command.
|
|||
.TP
|
||||
.B
|
||||
.SM PPID
|
||||
The process number of the parent of the shell.
|
||||
The process id of the parent of the shell.
|
||||
.TP
|
||||
.B
|
||||
.SM PWD
|
||||
|
@ -2965,6 +2965,7 @@ can be used within an arithmetic expression:
|
|||
.if n abs acos acosh asin asinh atan atan2 atanh cbrt ceil copysign cos cosh erf erfc exp exp2 expm1 fabs fpclassify fdim finite floor fma fmax fmin fmod hypot ilogb int isfinite sinf isnan isnormal issubnormal issubordered iszero j0 j1 jn lgamma log log10 log2 logb nearbyint nextafter nexttoward pow remainder rint round scanb signbit sin sinh sqrt tan tanh tgamma trunc y0 y1 yn
|
||||
.if t abs acos acosh asin asinh atan atan2 atanh cbrt ceil copysign cos cosh erf erfc exp exp2 expm1 fabs fpclassify fdim finite floor fma fmax fmod j0 j1 jn hypot ilogb int isfinite isinf isnan isnormal issubnormal issubordered iszero lgamma log log10 log2 logb nearbyint nextafter nexttoward pow rint round scalb signbit sin sinh sqrt tan tanh tgamma trunc y0 y1 yn
|
||||
.if t .RE
|
||||
|
||||
In addition, arithmetic functions can be defined as shell functions with a
|
||||
variant of the
|
||||
.B function
|
||||
|
@ -6147,7 +6148,7 @@ The pathname
|
|||
is used for each of the parameters that requires
|
||||
.IR pathname .
|
||||
.TP
|
||||
\f3getopts\fP \*(OK \f3\ \-a\fP \f2name\^\fP \*(CK \f2optstring vname\^\fP \*(OK \f2arg\^\fP .\|.\|. \*(CK
|
||||
\f3getopts\fP \*(OK \f3\-a\fP \f2name\^\fP \*(CK \f2optstring vname\^\fP \*(OK \f2arg\^\fP .\|.\|. \*(CK
|
||||
Checks
|
||||
.I arg
|
||||
for legal options.
|
||||
|
@ -6266,7 +6267,7 @@ option empties the hash table. This can also be achieved by resetting
|
|||
.PD 0
|
||||
\f3hist\fP \*(OK \f3\-e\fP \f2ename\^\fP \ \*(CK \*(OK \f3\-N\fP \f2num\^\fP \*(CK \*(OK \f3\-nlr\^\fP \*(CK \*(OK \f2first\^\fP \*(OK \f2last\^\fP \*(CK \*(CK
|
||||
.TP
|
||||
\f3hist \-s \fP \*(OK \f2old\fP\f3\=\fP\f2new\^\fP \*(CK \*(OK \f2command\^\fP \*(CK
|
||||
\f3hist \-s\fP \*(OK \f2old\fP\f3\=\fP\f2new\^\fP \*(CK \*(OK \f2command\^\fP \*(CK
|
||||
.PD
|
||||
In the first form,
|
||||
a range of commands from
|
||||
|
@ -6507,7 +6508,7 @@ The formfeed character (ascii
|
|||
.BR 014 ).
|
||||
.TP
|
||||
.B \en
|
||||
The new-line character (ascii
|
||||
The newline character (ascii
|
||||
.BR 012 ).
|
||||
.TP
|
||||
.B \er
|
||||
|
@ -6641,6 +6642,11 @@ The alternate flag
|
|||
.B #
|
||||
formats the output for use as a URI.
|
||||
.TP
|
||||
.B %p
|
||||
A
|
||||
.B %p
|
||||
format will convert the given number to hexadecimal.
|
||||
.TP
|
||||
.B %P
|
||||
A
|
||||
.B %P
|
||||
|
@ -6651,16 +6657,6 @@ to cause
|
|||
to be interpreted as an extended regular
|
||||
expression and be printed as a shell pattern.
|
||||
.TP
|
||||
.B %R
|
||||
A
|
||||
.B %R
|
||||
format can be used instead of
|
||||
.B %s
|
||||
to cause
|
||||
.I arg\^
|
||||
to be interpreted as a shell pattern
|
||||
and to be printed as an extended regular expression.
|
||||
.TP
|
||||
.B %q
|
||||
A
|
||||
.B %q
|
||||
|
@ -6683,6 +6679,21 @@ format can be used to treat an argument as a date/time string
|
|||
and to format the date/time according to the
|
||||
.IR date-format .
|
||||
.TP
|
||||
.B %Q
|
||||
A
|
||||
.B %Q
|
||||
format will convert the given number of seconds to readable time.
|
||||
.TP
|
||||
.B %R
|
||||
A
|
||||
.B %R
|
||||
format can be used instead of
|
||||
.B %s
|
||||
to cause
|
||||
.I arg\^
|
||||
to be interpreted as a shell pattern
|
||||
and to be printed as an extended regular expression.
|
||||
.TP
|
||||
.B %Z
|
||||
A
|
||||
.B %Z
|
||||
|
@ -6953,7 +6964,7 @@ script,
|
|||
then it behaves the same as
|
||||
.BR exit .
|
||||
.TP
|
||||
\(dg \f3set\fP \*(OK \f3\(+-BCGabefhkmnoprstuvx\fP \*(CK \*(OK \f3\(+-o\fP \*(OK \f2option\^\fP \*(CK \*(CK .\|.\|. \*(OK \f3\(+-A\fP \f2vname\^\fP \*(CK \*(OK \f2arg\^\fP .\|.\|. \*(CK
|
||||
\(dg \f3set\fP \*(OK \f3\(+-BCGHabefhkmnprstuvx\fP \*(CK \*(OK \f3\(+-o\fP \*(OK \f2option\^\fP \*(CK \*(CK .\|.\|. \*(OK \f3\(+-A\fP \f2vname\^\fP \*(CK \*(OK \f2arg\^\fP .\|.\|. \*(CK
|
||||
The options for this command have meaning as follows:
|
||||
.RS
|
||||
.PD 0
|
||||
|
@ -7576,7 +7587,7 @@ for infinite loops.
|
|||
The same as
|
||||
.BR whence\ \-v .
|
||||
.TP
|
||||
\(dg\(dd \f3typeset\fP \*(OK \f3\(+-ACHSfblmnprtux\^\fP \*(CK \*(OK \f3\(+-EFLRXZi\*(OK\f2n\^\fP\*(CK \*(CK \*(OK \f3\+-M \*(OK \f2mapname\fP \*(CK \*(CK \*(OK \f3\-T \*(OK \f2tname\fP=(\f2assign_list\fP) \*(CK \*(CK \*(OK \f3\-h \f2str\fP \*(CK \*(OK \f3\-a\fP \*(OK\f2type\fP\*(CK \*(CK \*(OK \f2vname\^\fP\*(OK\f3=\fP\f2value\^\fP \*(CK \^ \*(CK .\|.\|.
|
||||
\(dg\(dd \f3typeset\fP \*(OK \f3\(+-ACHSbflmnprstux\^\fP \*(CK \*(OK \f3\(+-EFLRXZi\*(OK\f2n\^\fP\*(CK \*(CK \*(OK \f3\+-M \*(OK \f2mapname\fP \*(CK \*(CK \*(OK \f3\-T \*(OK \f2tname\fP=(\f2assign_list\fP) \*(CK \*(CK \*(OK \f3\-h \f2str\fP \*(CK \*(OK \f3\-a\fP \*(OK\f2type\fP\*(CK \*(CK \*(OK \f2vname\^\fP\*(OK\f3=\fP\f2value\^\fP \*(CK \^ \*(CK .\|.\|.
|
||||
Sets attributes and values for shell variables and functions.
|
||||
When invoked inside a function defined with the
|
||||
.B function
|
||||
|
@ -7876,6 +7887,11 @@ readonly and these
|
|||
names cannot be changed
|
||||
by subsequent assignment.
|
||||
.TP
|
||||
.B \-s
|
||||
When given along with
|
||||
.BR \-i ,
|
||||
restricts integer size to short.
|
||||
.TP
|
||||
.B \-t
|
||||
Tags the variables.
|
||||
Tags are user definable and have no special
|
||||
|
@ -8051,7 +8067,7 @@ The number of 512-byte blocks for pipe buffering.
|
|||
The message queue size in K-bytes.
|
||||
.TP
|
||||
.B \-r
|
||||
The max real time priority.
|
||||
The max real-time priority.
|
||||
.TP
|
||||
.B \-s
|
||||
The number of K-bytes on the size of the stack area.
|
||||
|
@ -8265,11 +8281,9 @@ After this, if the shell was assumed to be a
|
|||
.I login
|
||||
shell, commands are read from
|
||||
.B /etc/profile
|
||||
and then from either
|
||||
.B .profile
|
||||
in the current directory or
|
||||
.BR \s-1$HOME\s+1/.profile ,
|
||||
if either file exists.
|
||||
and then from
|
||||
.BR \s-1$HOME\s+1/.profile
|
||||
if it exists.
|
||||
Next, for interactive shells, commands are read from
|
||||
the file named by
|
||||
.SM
|
||||
|
@ -8528,6 +8542,7 @@ cat(1),
|
|||
cd(1),
|
||||
chmod(1),
|
||||
cut(1),
|
||||
date(1),
|
||||
egrep(1),
|
||||
echo(1),
|
||||
emacs(1),
|
||||
|
@ -8553,6 +8568,7 @@ sysconf(2),
|
|||
umask(2),
|
||||
ulimit(2),
|
||||
wait(2),
|
||||
strftime(3),
|
||||
wctrans(3),
|
||||
rand(3),
|
||||
a.out(5),
|
||||
|
@ -8574,6 +8590,8 @@ original command was found, the shell will continue to
|
|||
.I exec\^
|
||||
the original command.
|
||||
Use the
|
||||
.B hash\^
|
||||
command or the
|
||||
.B \-t
|
||||
option of the
|
||||
.B alias\^
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue