mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-09 19:50:32 +02:00
commit bash-20111216 snapshot
This commit is contained in:
+27
-10
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Wed Dec 7 17:34:07 EST 2011
|
||||
.\" Last Change: Wed Dec 21 20:32:29 EST 2011
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2011 December 7" "GNU Bash 4.2"
|
||||
.TH BASH 1 "2011 December 21" "GNU Bash 4.2"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -1886,6 +1886,7 @@ upon receipt of a
|
||||
An array variable from which \fBbash\fP reads the possible completions
|
||||
generated by a shell function invoked by the programmable completion
|
||||
facility (see \fBProgrammable Completion\fP below).
|
||||
Each array element contains one possible completion.
|
||||
.TP
|
||||
.B EMACS
|
||||
If \fBbash\fP finds this variable in the environment when the shell starts
|
||||
@@ -5908,6 +5909,9 @@ and store the definition.
|
||||
.B call\-last\-kbd\-macro (C\-x e)
|
||||
Re-execute the last keyboard macro defined, by making the characters
|
||||
in the macro appear as if typed at the keyboard.
|
||||
.B print\-last\-kbd\-macro ()
|
||||
Print the last keyboard macro defined in a format suitable for the
|
||||
\fIinputrc\fP file.
|
||||
.PD
|
||||
.SS Miscellaneous
|
||||
.PP
|
||||
@@ -6117,10 +6121,12 @@ and
|
||||
.SM
|
||||
.B COMP_CWORD
|
||||
variables are also set.
|
||||
When the function or command is invoked, the first argument is the
|
||||
name of the command whose arguments are being completed, the
|
||||
second argument is the word being completed, and the third argument
|
||||
is the word preceding the word being completed on the current command line.
|
||||
When the function or command is invoked,
|
||||
the first argument (\fB$1\fP) is the name of the command whose arguments are
|
||||
being completed,
|
||||
the second argument (\fB$2\fP) is the word being completed,
|
||||
and the third argument (\fB$3\fP) is the word preceding the word being
|
||||
completed on the current command line.
|
||||
No filtering of the generated completions against the word being completed
|
||||
is performed; the function or command has complete freedom in generating
|
||||
the matches.
|
||||
@@ -6131,7 +6137,7 @@ The function may use any of the shell facilities, including the
|
||||
It must put the possible completions in the
|
||||
.SM
|
||||
.B COMPREPLY
|
||||
array variable.
|
||||
array variable, one per array element.
|
||||
.PP
|
||||
Next, any command specified with the \fB\-C\fP option is invoked
|
||||
in an environment equivalent to command substitution.
|
||||
@@ -6703,7 +6709,7 @@ returns 0 unless run when job control is disabled or, when run with
|
||||
job control enabled, any specified \fIjobspec\fP was not found
|
||||
or was started without job control.
|
||||
.TP
|
||||
\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-lpsvPSV\fP]
|
||||
\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-lpsvPSVX\fP]
|
||||
.PD 0
|
||||
.TP
|
||||
\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-q\fP \fIfunction\fP] [\fB\-u\fP \fIfunction\fP] [\fB\-r\fP \fIkeyseq\fP]
|
||||
@@ -6798,6 +6804,10 @@ or
|
||||
.SM
|
||||
.BR READLINE_POINT ,
|
||||
those new values will be reflected in the editing state.
|
||||
.TP
|
||||
.B \-X
|
||||
List all key sequences bound to shell commands and the associated commands
|
||||
in a format that can be reused as input.
|
||||
.PD
|
||||
.PP
|
||||
The return value is 0 unless an unrecognized option is given or an
|
||||
@@ -7124,6 +7134,12 @@ used as the possible completions.
|
||||
\fB\-F\fP \fIfunction\fP
|
||||
The shell function \fIfunction\fP is executed in the current shell
|
||||
environment.
|
||||
When the function is executed,
|
||||
the first argument (\fB$1\fP) is the name of the command whose arguments are
|
||||
being completed,
|
||||
the second argument (\fB$2\fP) is the word being completed,
|
||||
and the third argument (\fB$3\fP) is the word preceding the word being
|
||||
completed on the current command line.
|
||||
When it finishes, the possible completions are retrieved from the value
|
||||
of the
|
||||
.SM
|
||||
@@ -8447,8 +8463,9 @@ are supplied, the line read is assigned to the variable
|
||||
.SM
|
||||
.BR REPLY .
|
||||
The return code is zero, unless end-of-file is encountered, \fBread\fP
|
||||
times out (in which case the return code is greater than 128), or an
|
||||
invalid file descriptor is supplied as the argument to \fB\-u\fP.
|
||||
times out (in which case the return code is greater than 128),
|
||||
a variable assignment error (such as assigning to a readonly variable) occurs,
|
||||
or an invalid file descriptor is supplied as the argument to \fB\-u\fP.
|
||||
.RE
|
||||
.TP
|
||||
\fBreadonly\fP [\fB\-aAf\fP] [\fB\-p\fP] [\fIname\fP[=\fIword\fP] ...]
|
||||
|
||||
+41
-24
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Sat Nov 19 15:15:30 EST 2011
|
||||
.\" Last Change: Wed Dec 21 20:32:29 EST 2011
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2011 November 19" "GNU Bash 4.2"
|
||||
.TH BASH 1 "2011 December 21" "GNU Bash 4.2"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -48,7 +48,7 @@ bash \- GNU Bourne-Again SHell
|
||||
.SH SYNOPSIS
|
||||
.B bash
|
||||
[options]
|
||||
[file]
|
||||
[command_string | file]
|
||||
.SH COPYRIGHT
|
||||
.if n Bash is Copyright (C) 1989-2011 by the Free Software Foundation, Inc.
|
||||
.if t Bash is Copyright \(co 1989-2011 by the Free Software Foundation, Inc.
|
||||
@@ -75,13 +75,13 @@ interprets the following options when it is invoked:
|
||||
.PP
|
||||
.PD 0
|
||||
.TP 10
|
||||
.BI \-c "\| string\^"
|
||||
.B \-c
|
||||
If the
|
||||
.B \-c
|
||||
option is present, then commands are read from
|
||||
.IR string .
|
||||
option is present, then commands are read from the first non-option argument
|
||||
.IR command_string .
|
||||
If there are arguments after the
|
||||
.IR string ,
|
||||
.IR command_string ,
|
||||
they are assigned to the positional parameters, starting with
|
||||
.BR $0 .
|
||||
.TP
|
||||
@@ -1981,7 +1981,7 @@ to contain no more than that number of lines by removing the oldest entries.
|
||||
The history file is also truncated to this size after
|
||||
writing it when an interactive shell exits.
|
||||
If the value is 0, the history file is truncated to zero size.
|
||||
Numeric values less than zero are treated as 0.
|
||||
Non-numeric values and numeric values less than zero inhibit truncation.
|
||||
The shell sets the default value to the value of \fBHISTSIZE\fP
|
||||
after reading any startup files.
|
||||
.TP
|
||||
@@ -5908,6 +5908,9 @@ and store the definition.
|
||||
.B call\-last\-kbd\-macro (C\-x e)
|
||||
Re-execute the last keyboard macro defined, by making the characters
|
||||
in the macro appear as if typed at the keyboard.
|
||||
.B print\-last\-kbd\-macro ()
|
||||
Print the last keyboard macro defined in a format suitable for the
|
||||
\fIinputrc\fP file.
|
||||
.PD
|
||||
.SS Miscellaneous
|
||||
.PP
|
||||
@@ -6117,10 +6120,12 @@ and
|
||||
.SM
|
||||
.B COMP_CWORD
|
||||
variables are also set.
|
||||
When the function or command is invoked, the first argument is the
|
||||
name of the command whose arguments are being completed, the
|
||||
second argument is the word being completed, and the third argument
|
||||
is the word preceding the word being completed on the current command line.
|
||||
When the function or command is invoked,
|
||||
the first argument (\fB$1\fP) is the name of the command whose arguments are
|
||||
being completed,
|
||||
the second argument (\fB$2\fP) is the word being completed,
|
||||
and the third argument (\fB$3\fP) is the word preceding the word being
|
||||
completed on the current command line.
|
||||
No filtering of the generated completions against the word being completed
|
||||
is performed; the function or command has complete freedom in generating
|
||||
the matches.
|
||||
@@ -6131,7 +6136,7 @@ The function may use any of the shell facilities, including the
|
||||
It must put the possible completions in the
|
||||
.SM
|
||||
.B COMPREPLY
|
||||
array variable.
|
||||
array variable, one per array element.
|
||||
.PP
|
||||
Next, any command specified with the \fB\-C\fP option is invoked
|
||||
in an environment equivalent to command substitution.
|
||||
@@ -6249,8 +6254,8 @@ is truncated, if necessary, to contain no more than
|
||||
the number of lines specified by the value of
|
||||
.SM
|
||||
.BR HISTFILESIZE .
|
||||
If \fBHISTFILESIZE\fP is unset, or set to a null or non-numeric value,
|
||||
the history file is not truncated.
|
||||
If \fBHISTFILESIZE\fP is unset, or set to null, a non-numeric value,
|
||||
or a numeric value less than zero, the history file is not truncated.
|
||||
When the history file is read,
|
||||
lines beginning with the history comment character followed immediately
|
||||
by a digit are interpreted as timestamps for the preceding history line.
|
||||
@@ -6294,7 +6299,8 @@ to contain no more than
|
||||
lines. If
|
||||
.SM
|
||||
.B HISTFILESIZE
|
||||
is not set, no truncation is performed.
|
||||
is unset, or set to null, a non-numeric value,
|
||||
or a numeric value less than zero, the history file is not truncated.
|
||||
.PP
|
||||
The builtin command
|
||||
.B fc
|
||||
@@ -6457,7 +6463,7 @@ history list starting with
|
||||
.IR string .
|
||||
.TP
|
||||
.B !?\fIstring\fR\fB[?]\fR
|
||||
Refer to the most recent command preceding the current postition in the
|
||||
Refer to the most recent command preceding the current position in the
|
||||
history list containing
|
||||
.IR string .
|
||||
The trailing \fB?\fP may be omitted if
|
||||
@@ -6702,7 +6708,7 @@ returns 0 unless run when job control is disabled or, when run with
|
||||
job control enabled, any specified \fIjobspec\fP was not found
|
||||
or was started without job control.
|
||||
.TP
|
||||
\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-lpsvPSV\fP]
|
||||
\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-lpsvPSVX\fP]
|
||||
.PD 0
|
||||
.TP
|
||||
\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-q\fP \fIfunction\fP] [\fB\-u\fP \fIfunction\fP] [\fB\-r\fP \fIkeyseq\fP]
|
||||
@@ -6797,6 +6803,10 @@ or
|
||||
.SM
|
||||
.BR READLINE_POINT ,
|
||||
those new values will be reflected in the editing state.
|
||||
.TP
|
||||
.B \-X
|
||||
List all key sequences bound to shell commands and the associated commands
|
||||
in a format that can be reused as input.
|
||||
.PD
|
||||
.PP
|
||||
The return value is 0 unless an unrecognized option is given or an
|
||||
@@ -6845,12 +6855,12 @@ call or \fIexpr\fP does not correspond to a valid position in the
|
||||
call stack.
|
||||
.TP
|
||||
\fBcd\fP [\fB\-L\fP|[\fB\-P\fP [\fB\-e\fP]]] [\fIdir\fP]
|
||||
Change the current directory to \fIdir\fP. The variable
|
||||
Change the current directory to \fIdir\fP.
|
||||
if \fIdir\fP is not supplied, the value of the
|
||||
.SM
|
||||
.B HOME
|
||||
is the
|
||||
default
|
||||
.IR dir .
|
||||
shell variable is the default.
|
||||
Any additional arguments following \fIdir\fP are ignored.
|
||||
The variable
|
||||
.SM
|
||||
.B CDPATH
|
||||
@@ -7123,6 +7133,12 @@ used as the possible completions.
|
||||
\fB\-F\fP \fIfunction\fP
|
||||
The shell function \fIfunction\fP is executed in the current shell
|
||||
environment.
|
||||
When the function is executed,
|
||||
the first argument (\fB$1\fP) is the name of the command whose arguments are
|
||||
being completed,
|
||||
the second argument (\fB$2\fP) is the word being completed,
|
||||
and the third argument (\fB$3\fP) is the word preceding the word being
|
||||
completed on the current command line.
|
||||
When it finishes, the possible completions are retrieved from the value
|
||||
of the
|
||||
.SM
|
||||
@@ -8446,8 +8462,9 @@ are supplied, the line read is assigned to the variable
|
||||
.SM
|
||||
.BR REPLY .
|
||||
The return code is zero, unless end-of-file is encountered, \fBread\fP
|
||||
times out (in which case the return code is greater than 128), or an
|
||||
invalid file descriptor is supplied as the argument to \fB\-u\fP.
|
||||
times out (in which case the return code is greater than 128),
|
||||
a variable assignment error (such as assigning to a readonly variable) occurs,
|
||||
or an invalid file descriptor is supplied as the argument to \fB\-u\fP.
|
||||
.RE
|
||||
.TP
|
||||
\fBreadonly\fP [\fB\-aAf\fP] [\fB\-p\fP] [\fIname\fP[=\fIword\fP] ...]
|
||||
|
||||
+9
-3
@@ -3522,7 +3522,7 @@ Aliases are described in @ref{Aliases}.
|
||||
@item bind
|
||||
@btindex bind
|
||||
@example
|
||||
bind [-m @var{keymap}] [-lpsvPSV]
|
||||
bind [-m @var{keymap}] [-lpsvPSVX]
|
||||
bind [-m @var{keymap}] [-q @var{function}] [-u @var{function}] [-r @var{keyseq}]
|
||||
bind [-m @var{keymap}] -f @var{filename}
|
||||
bind [-m @var{keymap}] -x @var{keyseq:shell-command}
|
||||
@@ -3604,6 +3604,10 @@ of the insertion point.
|
||||
If the executed command changes the value of @code{READLINE_LINE} or
|
||||
@code{READLINE_POINT}, those new values will be reflected in the
|
||||
editing state.
|
||||
|
||||
@item -X
|
||||
List all key sequences bound to shell commands and the associated commands
|
||||
in a format that can be reused as input.
|
||||
@end table
|
||||
|
||||
@noindent
|
||||
@@ -4031,8 +4035,9 @@ meaning for the next character read and for line continuation.
|
||||
If no names are supplied, the line read is assigned to the
|
||||
variable @env{REPLY}.
|
||||
The return code is zero, unless end-of-file is encountered, @code{read}
|
||||
times out (in which case the return code is greater than 128), or an
|
||||
invalid file descriptor is supplied as the argument to @option{-u}.
|
||||
times out (in which case the return code is greater than 128),
|
||||
a variable assignment error (such as assigning to a readonly variable) occurs,
|
||||
or an invalid file descriptor is supplied as the argument to @option{-u}.
|
||||
|
||||
Options, if supplied, have the following meanings:
|
||||
|
||||
@@ -5238,6 +5243,7 @@ programmable completion facilities (@pxref{Programmable Completion}).
|
||||
An array variable from which Bash reads the possible completions
|
||||
generated by a shell function invoked by the programmable completion
|
||||
facility (@pxref{Programmable Completion}).
|
||||
Each array element contains one possible completion.
|
||||
|
||||
@item COPROC
|
||||
An array variable created to hold the file descriptors
|
||||
|
||||
+21
-6
@@ -1060,7 +1060,12 @@ will a line containing a @samp{b} anywhere in its value.
|
||||
|
||||
Storing the regular expression in a shell variable is often a useful
|
||||
way to avoid problems with quoting characters that are special to the
|
||||
shell. For example, the following is equivalent to the above:
|
||||
shell.
|
||||
It is sometimes difficult to specify a regular expression literally
|
||||
without using quotes, or to keep track of the quoting used by regular
|
||||
expressions while paying attention to the shell's quote removal.
|
||||
Using a shell variable to store the pattern decreases these problems.
|
||||
For example, the following is equivalent to the above:
|
||||
@example
|
||||
pattern='[[:space:]]*(a)?b'
|
||||
[[ $line =~ $pattern ]]
|
||||
@@ -1069,6 +1074,9 @@ pattern='[[:space:]]*(a)?b'
|
||||
@noindent
|
||||
If you want to match a character that's special to the regular expression
|
||||
grammar, it has to be quoted to remove its special meaning.
|
||||
This means that in the pattern @samp{xxx.txt}, the @samp{.} matches any
|
||||
character in the string (its usual regular expression meaning), but in the
|
||||
pattern @samp{"xxx.txt"} it can only match a literal @samp{.}.
|
||||
Shell programmers should take special care with backslashes, since backslashes
|
||||
are used both by the shell and regular expressions to remove the special
|
||||
meaning from the following character.
|
||||
@@ -3030,8 +3038,9 @@ cd [-L|[-P [-e]]] [@var{directory}]
|
||||
@end example
|
||||
|
||||
Change the current working directory to @var{directory}.
|
||||
If @var{directory} is not given, the value of the @env{HOME} shell
|
||||
variable is used.
|
||||
If @var{directory} is not supplied, the value of the @env{HOME}
|
||||
shell variable is used.
|
||||
Any additional arguments following @var{directory} are ignored.
|
||||
If the shell variable @env{CDPATH} exists, it is used as a search path.
|
||||
If @var{directory} begins with a slash, @env{CDPATH} is not used.
|
||||
|
||||
@@ -3513,7 +3522,7 @@ Aliases are described in @ref{Aliases}.
|
||||
@item bind
|
||||
@btindex bind
|
||||
@example
|
||||
bind [-m @var{keymap}] [-lpsvPSV]
|
||||
bind [-m @var{keymap}] [-lpsvPSVX]
|
||||
bind [-m @var{keymap}] [-q @var{function}] [-u @var{function}] [-r @var{keyseq}]
|
||||
bind [-m @var{keymap}] -f @var{filename}
|
||||
bind [-m @var{keymap}] -x @var{keyseq:shell-command}
|
||||
@@ -3595,6 +3604,10 @@ of the insertion point.
|
||||
If the executed command changes the value of @code{READLINE_LINE} or
|
||||
@code{READLINE_POINT}, those new values will be reflected in the
|
||||
editing state.
|
||||
|
||||
@item -X
|
||||
List all key sequences bound to shell commands and the associated commands
|
||||
in a format that can be reused as input.
|
||||
@end table
|
||||
|
||||
@noindent
|
||||
@@ -4022,8 +4035,9 @@ meaning for the next character read and for line continuation.
|
||||
If no names are supplied, the line read is assigned to the
|
||||
variable @env{REPLY}.
|
||||
The return code is zero, unless end-of-file is encountered, @code{read}
|
||||
times out (in which case the return code is greater than 128), or an
|
||||
invalid file descriptor is supplied as the argument to @option{-u}.
|
||||
times out (in which case the return code is greater than 128),
|
||||
a variable assignment error (such as assigning to a readonly variable) occurs,
|
||||
or an invalid file descriptor is supplied as the argument to @option{-u}.
|
||||
|
||||
Options, if supplied, have the following meanings:
|
||||
|
||||
@@ -5224,6 +5238,7 @@ The line is split into words as Readline would split it, using
|
||||
@code{COMP_WORDBREAKS} as described above.
|
||||
This variable is available only in shell functions invoked by the
|
||||
programmable completion facilities (@pxref{Programmable Completion}).
|
||||
Each array element contains one possible completion.
|
||||
|
||||
@item COMPREPLY
|
||||
An array variable from which Bash reads the possible completions
|
||||
|
||||
Reference in New Issue
Block a user