commit bash-20080410 snapshot

This commit is contained in:
Chet Ramey
2011-12-07 09:21:48 -05:00
parent 1d0e1a34e0
commit 6a8fd0ed50
220 changed files with 27343 additions and 10005 deletions
+97 -23
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
.\" Last Change: Thu Mar 27 22:15:12 EDT 2008
.\" Last Change: Sat Apr 12 17:15:24 EDT 2008
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2008 April 5" "GNU Bash-3.2"
.TH BASH 1 "2008 April 12" "GNU Bash-3.2"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -6187,6 +6187,20 @@ The return status is false if
.I shell\-builtin
is not a shell builtin command.
.TP
\fBcaller\fP [\fIexpr\fP]
Returns the context of any active subroutine call (a shell function or
a script executed with the \fB.\fP or \fBsource\fP builtins.
Without \fIexpr\fP, \fBcaller\fP displays the line number and source
filename of the current subroutine call.
If a non-negative integer is supplied as \fIexpr\fP, \fBcaller\fP
displays the line number, subroutine name, and source file corresponding
to that position in the current execution call stack. This extra
information may be used, for example, to print a stack trace. The
current frame is frame 0.
The return value is 0 unless the shell is not executing a subroutine
call or \fIexpr\fP does not correspond to a valid position in the
call stack.
.TP
\fBcd\fP [\fB\-L|-P\fP] [\fIdir\fP]
Change the current directory to \fIdir\fP. The variable
.SM
@@ -6232,20 +6246,6 @@ written to the standard output.
The return value is true if the directory was successfully changed;
false otherwise.
.TP
\fBcaller\fP [\fIexpr\fP]
Returns the context of any active subroutine call (a shell function or
a script executed with the \fB.\fP or \fBsource\fP builtins.
Without \fIexpr\fP, \fBcaller\fP displays the line number and source
filename of the current subroutine call.
If a non-negative integer is supplied as \fIexpr\fP, \fBcaller\fP
displays the line number, subroutine name, and source file corresponding
to that position in the current execution call stack. This extra
information may be used, for example, to print a stack trace. The
current frame is frame 0.
The return value is 0 unless the shell is not executing a subroutine
call or \fIexpr\fP does not correspond to a valid position in the
call stack.
.TP
\fBcommand\fP [\fB\-pVv\fP] \fIcommand\fP [\fIarg\fP ...]
Run
.I command
@@ -6309,12 +6309,12 @@ will be displayed.
The return value is true unless an invalid option is supplied, or no
matches were generated.
.TP
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP]
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-E\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP]
.br
[\fB\-X\fP \fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \fIname\fP [\fIname ...\fP]
.PD 0
.TP
\fBcomplete\fP \fB\-pr\fP [\fIname\fP ...]
\fBcomplete\fP \fB\-pr\fP [\fB\-E\fP] [\fIname\fP ...]
.PD
Specify how arguments to each \fIname\fP should be completed.
If the \fB\-p\fP option is supplied, or if no options are supplied,
@@ -6323,6 +6323,9 @@ them to be reused as input.
The \fB\-r\fP option removes a completion specification for
each \fIname\fP, or, if no \fIname\fPs are supplied, all
completion specifications.
The \fB\-E\fP option indicates that the remaining options and actions should
apply to ``empty'' command completion; that is, completion attempted on a
blank line.
.sp 1
The process of applying these completion specifications when word completion
is attempted is described above under \fBProgrammable Completion\fP.
@@ -7139,7 +7142,7 @@ The return status is true unless a
.I name
is not found or an invalid option is supplied.
.TP
\fBhelp\fP [\fB\-s\fP] [\fIpattern\fP]
\fBhelp\fP [\fB\-dms\fP] [\fIpattern\fP]
Display helpful information about builtin commands. If
.I pattern
is specified,
@@ -7148,8 +7151,19 @@ gives detailed help on all commands matching
.IR pattern ;
otherwise help for all the builtins and shell control structures
is printed.
The \fB\-s\fP option restricts the information displayed to a short
usage synopsis.
.RS
.PD 0
.TP
.B \-d
Display a short description of each \fIpattern\fP
.TP
.B \ -m
Display the description of each \fIpattern\fP in a manpage-like format
.TP
.B \-s
Display only a short usage synopsis for each \fIpattern\fP
.PD
.RE
The return status is 0 unless no command matches
.IR pattern .
.TP
@@ -7375,6 +7389,66 @@ is supplied, or
.B logout
Exit a login shell.
.TP
\fBmapfile\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcou
nt\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \f
Iquantum\fP] [\fIarray\fP]
Read lines from the standard input into array variable
.IR array ,
or from file descriptor
.IR fd
if the
.B \-u
option is supplied.
The variable \fBMAPFILE\fP is the default \fIarray\fP.
Options, if supplied, have the following meanings:
.RS
.PD 0
.TP
.B \-n
Copy at most
.I count
lines. If \fIcount\fP is 0, all lines are copied.
.TP
.B \-O
Begin assigning to
.I array
at index
.IR origin .
The default index is 0.
.TP
.B \-s
Discard the first \fIcount\fP lines read.
.TP
.B \-t
Remove a trailing line from each line read.
.TP
.B \-u
Read lines from file descriptor \fIfd\fP instead of the standard input.
.TP
.B \-C
Evaluate
.I callback
each time \fIquantum\fP lines are read. The \fB\-c\fP option specifies
.IR quantum .
.TP
.B \-c
Specify the number of lines read between each call to
.IR callback .
.PD
.PP
If
.B \-C
is specified without
.BR \-c ,
the default quantum is 5000.
.PP
If not supplied with an explicit origin, \fBmapfile\fP will clear \fIarray\fP
before assigning to it.
.PP
\fBmapfile\fP returns successfully unless an invalid option or option
argument is supplied, or \fIarray\fP is invalid or unassignable.
.RE
.TP
\fBpopd\fP [\-\fBn\fP] [+\fIn\fP] [\-\fIn\fP]
Removes entries from the directory stack. With no arguments,
removes the top directory from the stack, and performs a
@@ -8636,8 +8710,8 @@ The
.B \-f
option suppresses shell function lookup, as with the \fBcommand\fP builtin.
.B type
returns true if any of the arguments are found, false if
none are found.
returns true if all of the arguments are found, false if
any are not found.
.TP
\fBulimit\fP [\fB\-HSTabcdefilmnpqrstuvx\fP [\fIlimit\fP]]
Provides control over the resources available to the shell and to