mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 10:12:38 +02:00
commit bash-20090813 snapshot
This commit is contained in:
+39
-4
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Thu Jul 30 09:25:13 EDT 2009
|
||||
.\" Last Change: Fri Aug 14 18:32:52 EDT 2009
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2009 July 30" "GNU Bash-4.0"
|
||||
.TH BASH 1 "2009 August 14" "GNU Bash-4.0"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -429,8 +429,12 @@ If the shell is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the \fB\-p\fP option is not supplied, no startup
|
||||
files are read, shell functions are not inherited from the environment, the
|
||||
.SM
|
||||
.B SHELLOPTS
|
||||
variable, if it appears in the environment, is ignored,
|
||||
.BR SHELLOPTS ,
|
||||
.BR BASHOPTS ,
|
||||
.BR CDPATH ,
|
||||
and
|
||||
.B GLOBIGNORE
|
||||
variables, if they appear in the environment, are ignored,
|
||||
and the effective user id is set to the real user id.
|
||||
If the \fB\-p\fP option is supplied at invocation, the startup behavior is
|
||||
the same, but the effective user id is not reset.
|
||||
@@ -1304,6 +1308,27 @@ The following variables are set by the shell:
|
||||
Expands to the full file name used to invoke this instance of
|
||||
.BR bash .
|
||||
.TP
|
||||
.B BASHOPTS
|
||||
A colon-separated list of enabled shell options. Each word in
|
||||
the list is a valid argument for the
|
||||
.B \-s
|
||||
option to the
|
||||
.B shopt
|
||||
builtin command (see
|
||||
.SM
|
||||
.B "SHELL BUILTIN COMMANDS"
|
||||
below). The options appearing in
|
||||
.SM
|
||||
.B BASHOPTS
|
||||
are those reported as
|
||||
.I on
|
||||
by \fBshopt\fP.
|
||||
If this variable is in the environment when
|
||||
.B bash
|
||||
starts up, each shell option in the list will be enabled before
|
||||
reading any startup files.
|
||||
This variable is read-only.
|
||||
.TP
|
||||
.B BASHPID
|
||||
Expands to the process id of the current \fBbash\fP process.
|
||||
This differs from \fB$$\fP under certain circumstances, such as subshells
|
||||
@@ -5632,6 +5657,15 @@ character. A negative count searches for previous occurrences.
|
||||
A character is read and point is moved to the previous occurrence of that
|
||||
character. A negative count searches for subsequent occurrences.
|
||||
.TP
|
||||
.B skip\-csi\-sequence ()
|
||||
Read enough characters to consume a multi-key sequence such as those
|
||||
defined for keys like Home and End. Such sequences begin with a
|
||||
Control Sequence Indicator (CSI), usually ESC\-[. If this sequence is
|
||||
bound to "\e[", keys producing such sequences will have no effect
|
||||
unless explicitly bound to a readline command, instead of inserting
|
||||
stray characters into the editing buffer. This is unbound by default,
|
||||
but usually bound to ESC\-[.
|
||||
.TP
|
||||
.B insert\-comment (M\-#)
|
||||
Without a numeric argument, the value of the readline
|
||||
.B comment\-begin
|
||||
@@ -8306,6 +8340,7 @@ files are not processed, shell functions are not inherited from the
|
||||
environment, and the
|
||||
.SM
|
||||
.BR SHELLOPTS ,
|
||||
.BR BASHOPTS ,
|
||||
.BR CDPATH ,
|
||||
and
|
||||
.B GLOBIGNORE
|
||||
|
||||
+85
-6
@@ -429,8 +429,12 @@ If the shell is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the \fB\-p\fP option is not supplied, no startup
|
||||
files are read, shell functions are not inherited from the environment, the
|
||||
.SM
|
||||
.B SHELLOPTS
|
||||
variable, if it appears in the environment, is ignored,
|
||||
.BR SHELLOPTS ,
|
||||
.BR BASHOPTS ,
|
||||
.BR CDPATH ,
|
||||
and
|
||||
.B GLOBIGNORE
|
||||
variables, if they appear in the environment, are ignored,
|
||||
and the effective user id is set to the real user id.
|
||||
If the \fB\-p\fP option is supplied at invocation, the startup behavior is
|
||||
the same, but the effective user id is not reset.
|
||||
@@ -1304,6 +1308,27 @@ The following variables are set by the shell:
|
||||
Expands to the full file name used to invoke this instance of
|
||||
.BR bash .
|
||||
.TP
|
||||
.B BASHOPTS
|
||||
A colon-separated list of enabled shell options. Each word in
|
||||
the list is a valid argument for the
|
||||
.B \-s
|
||||
option to the
|
||||
.B shopt
|
||||
builtin command (see
|
||||
.SM
|
||||
.B "SHELL BUILTIN COMMANDS"
|
||||
below). The options appearing in
|
||||
.SM
|
||||
.B BASHOPTS
|
||||
are those reported as
|
||||
.I on
|
||||
by \fBshopt\fP.
|
||||
If this variable is in the environment when
|
||||
.B bash
|
||||
starts up, each shell option in the list will be enabled before
|
||||
reading any startup files.
|
||||
This variable is read-only.
|
||||
.TP
|
||||
.B BASHPID
|
||||
Expands to the process id of the current \fBbash\fP process.
|
||||
This differs from \fB$$\fP under certain circumstances, such as subshells
|
||||
@@ -1847,7 +1872,8 @@ adds the contents of the new file to the existing list.
|
||||
If
|
||||
.SM
|
||||
.B HOSTFILE
|
||||
is set, but has no value, \fBbash\fP attempts to read
|
||||
is set, but has no value, or does not name a readable file,
|
||||
\fBbash\fP attempts to read
|
||||
.FN /etc/hosts
|
||||
to obtain the list of possible hostname completions.
|
||||
When
|
||||
@@ -5631,6 +5657,15 @@ character. A negative count searches for previous occurrences.
|
||||
A character is read and point is moved to the previous occurrence of that
|
||||
character. A negative count searches for subsequent occurrences.
|
||||
.TP
|
||||
.B skip\-csi\-sequence ()
|
||||
Read enough characters to consume a multi-key sequence such as those
|
||||
defined for keys like Home and End. Such sequences begin with a
|
||||
Control Sequence Indicator (CSI), usually ESC\-[. If this sequence is
|
||||
bound to "\e[", keys producing such sequences will have no effect
|
||||
unless explicitly bound to a readline command, instead of inserting
|
||||
stray characters into the editing buffer. This is unbound by default,
|
||||
but usually bound to ESC\-[.
|
||||
.TP
|
||||
.B insert\-comment (M\-#)
|
||||
Without a numeric argument, the value of the readline
|
||||
.B comment\-begin
|
||||
@@ -5697,12 +5732,17 @@ using the \fBcomplete\fP builtin (see
|
||||
below), the programmable completion facilities are invoked.
|
||||
.PP
|
||||
First, the command name is identified.
|
||||
If the command word is the empty string (completion attempted at the
|
||||
beginning of an empty line), any compspec defined with
|
||||
the \fB\-E\fP option to \fBcomplete\fP is used.
|
||||
If a compspec has been defined for that command, the
|
||||
compspec is used to generate the list of possible completions for the word.
|
||||
If the command word is a full pathname, a compspec for the full
|
||||
pathname is searched for first.
|
||||
If no compspec is found for the full pathname, an attempt is made to
|
||||
find a compspec for the portion following the final slash.
|
||||
If those searches to not result in a compspec, any compspec defined with
|
||||
the \fB\-D\fP option to \fBcomplete\fP is used as the default.
|
||||
.PP
|
||||
Once a compspec has been found, it is used to generate the list of
|
||||
matching words.
|
||||
@@ -5835,6 +5875,35 @@ the programmable completion functions force readline to append a slash
|
||||
to completed names which are symbolic links to directories, subject to
|
||||
the value of the \fBmark\-directories\fP readline variable, regardless
|
||||
of the setting of the \fBmark-symlinked\-directories\fP readline variable.
|
||||
.PP
|
||||
There is some support for dynamically modifying completions. This is
|
||||
most useful when used in combination with a default completion specified
|
||||
with \fBcomplete -D\fP.
|
||||
It's possible for shell functions executed as completion
|
||||
handlers to indicate that completion should be retried by returning an
|
||||
exit status of 124. If a shell function returns 124, and changes
|
||||
the compspec associated with the command on which completion is being
|
||||
attempted (supplied as the first argument when the function is executed),
|
||||
programmable completion restarts from the beginning, with an
|
||||
attempt to find a compspec for that command. This allows a set of
|
||||
completions to be built dynamically as completion is attempted, rather than
|
||||
being loaded all at once.
|
||||
.PP
|
||||
For instance, assuming that there is a library of compspecs, each kept in a
|
||||
file corresponding to the name of the command, the following default
|
||||
completion function would load completions dynamically:
|
||||
.PP
|
||||
\f(CW_completion_loader()
|
||||
.br
|
||||
{
|
||||
.br
|
||||
. "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
|
||||
.br
|
||||
}
|
||||
.br
|
||||
complete -D -F _completion_loader
|
||||
.br
|
||||
\fP
|
||||
.SH HISTORY
|
||||
When the
|
||||
.B \-o history
|
||||
@@ -6566,12 +6635,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\-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]
|
||||
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DE\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 [\fB\-E\fP] [\fIname\fP ...]
|
||||
\fBcomplete\fP \fB\-pr\fP [\fB\-DE\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,
|
||||
@@ -6580,6 +6649,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\-D\fP option indicates that the remaining options and actions should
|
||||
apply to the ``default'' command completion; that is, completion attempted
|
||||
on a command for which no completion has previously been defined.
|
||||
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.
|
||||
@@ -6759,7 +6831,7 @@ a \fIname\fP for which no specification exists, or
|
||||
an error occurs adding a completion specification.
|
||||
.RE
|
||||
.TP
|
||||
\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP]
|
||||
\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB\-DE\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP]
|
||||
Modify completion options for each \fIname\fP according to the
|
||||
\fIoption\fPs, or for the
|
||||
currently-execution completion if no \fIname\fPs are supplied.
|
||||
@@ -6767,6 +6839,12 @@ If no \fIoption\fPs are given, display the completion options for each
|
||||
\fIname\fP or the current completion.
|
||||
The possible values of \fIoption\fP are those valid for the \fBcomplete\fP
|
||||
builtin described above.
|
||||
The \fB\-D\fP option indicates that the remaining options should
|
||||
apply to the ``default'' command completion; that is, completion attempted
|
||||
on a command for which no completion has previously been defined.
|
||||
The \fB\-E\fP option indicates that the remaining options should
|
||||
apply to ``empty'' command completion; that is, completion attempted on a
|
||||
blank line.
|
||||
.PP
|
||||
The return value is true unless an invalid option is supplied, an attempt
|
||||
is made to modify the options for a \fIname\fP for which no completion
|
||||
@@ -8262,6 +8340,7 @@ files are not processed, shell functions are not inherited from the
|
||||
environment, and the
|
||||
.SM
|
||||
.BR SHELLOPTS ,
|
||||
.BR BASHOPTS ,
|
||||
.BR CDPATH ,
|
||||
and
|
||||
.B GLOBIGNORE
|
||||
|
||||
+19
-4
@@ -4136,8 +4136,8 @@ Same as @code{-x}.
|
||||
Turn on privileged mode.
|
||||
In this mode, the @env{$BASH_ENV} and @env{$ENV} files are not
|
||||
processed, shell functions are not inherited from the environment,
|
||||
and the @env{SHELLOPTS}, @env{CDPATH} and @env{GLOBIGNORE} variables,
|
||||
if they appear in the environment, are ignored.
|
||||
and the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH} and @env{GLOBIGNORE}
|
||||
variables, if they appear in the environment, are ignored.
|
||||
If the shell is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the @code{-p} option is not supplied, these actions
|
||||
are taken and the effective user id is set to the real user id.
|
||||
@@ -4650,6 +4650,16 @@ variables for controlling the job control facilities
|
||||
@item BASH
|
||||
The full pathname used to execute the current instance of Bash.
|
||||
|
||||
@item BASHOPTS
|
||||
A colon-separated list of enabled shell options. Each word in
|
||||
the list is a valid argument for the @option{-s} option to the
|
||||
@code{shopt} builtin command (@pxref{The Shopt Builtin}).
|
||||
The options appearing in @env{BASHOPTS} are those reported
|
||||
as @samp{on} by @samp{shopt}.
|
||||
If this variable is in the environment when Bash
|
||||
starts up, each shell option in the list will be enabled before
|
||||
reading any startup files. This variable is readonly.
|
||||
|
||||
@item BASHPID
|
||||
Expands to the process id of the current Bash process.
|
||||
This differs from @code{$$} under certain circumstances, such as subshells
|
||||
@@ -5495,8 +5505,9 @@ allow them to be specified.
|
||||
If Bash is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the @code{-p} option is not supplied, no startup
|
||||
files are read, shell functions are not inherited from the environment,
|
||||
the @env{SHELLOPTS} variable, if it appears in the environment, is ignored,
|
||||
and the effective user id is set to the real user id.
|
||||
the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH}, and @env{GLOBIGNORE}
|
||||
variables, if they appear in the environment, are ignored, and the effective
|
||||
user id is set to the real user id.
|
||||
If the @code{-p} option is supplied at invocation, the startup behavior is
|
||||
the same, but the effective user id is not reset.
|
||||
|
||||
@@ -7241,6 +7252,10 @@ Include support for the @code{((@dots{}))} command
|
||||
Include support for the extended pattern matching features described
|
||||
above under @ref{Pattern Matching}.
|
||||
|
||||
@item --enable-extended-glob-default
|
||||
Set the default value of the @var{extglob} shell option described
|
||||
above under @ref{The Shopt Builtin} to be enabled.
|
||||
|
||||
@item --enable-help-builtin
|
||||
Include the @code{help} builtin, which displays help on shell builtins and
|
||||
variables (@pxref{Bash Builtins}).
|
||||
|
||||
+17
-5
@@ -4136,8 +4136,8 @@ Same as @code{-x}.
|
||||
Turn on privileged mode.
|
||||
In this mode, the @env{$BASH_ENV} and @env{$ENV} files are not
|
||||
processed, shell functions are not inherited from the environment,
|
||||
and the @env{SHELLOPTS}, @env{CDPATH} and @env{GLOBIGNORE} variables,
|
||||
if they appear in the environment, are ignored.
|
||||
and the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH} and @env{GLOBIGNORE}
|
||||
variables, if they appear in the environment, are ignored.
|
||||
If the shell is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the @code{-p} option is not supplied, these actions
|
||||
are taken and the effective user id is set to the real user id.
|
||||
@@ -4650,6 +4650,16 @@ variables for controlling the job control facilities
|
||||
@item BASH
|
||||
The full pathname used to execute the current instance of Bash.
|
||||
|
||||
@item BASHOPTS
|
||||
A colon-separated list of enabled shell options. Each word in
|
||||
the list is a valid argument for the @option{-s} option to the
|
||||
@code{shopt} builtin command (@pxref{The Shopt Builtin}).
|
||||
The options appearing in @env{BASHOPTS} are those reported
|
||||
as @samp{on} by @samp{shopt}.
|
||||
If this variable is in the environment when Bash
|
||||
starts up, each shell option in the list will be enabled before
|
||||
reading any startup files. This variable is readonly.
|
||||
|
||||
@item BASHPID
|
||||
Expands to the process id of the current Bash process.
|
||||
This differs from @code{$$} under certain circumstances, such as subshells
|
||||
@@ -4974,7 +4984,8 @@ is running;
|
||||
the next time hostname completion is attempted after the
|
||||
value is changed, Bash adds the contents of the new file to the
|
||||
existing list.
|
||||
If @env{HOSTFILE} is set, but has no value, Bash attempts to read
|
||||
If @env{HOSTFILE} is set, but has no value, or does not name a readable file,
|
||||
Bash attempts to read
|
||||
@file{/etc/hosts} to obtain the list of possible hostname completions.
|
||||
When @env{HOSTFILE} is unset, the hostname list is cleared.
|
||||
|
||||
@@ -5494,8 +5505,9 @@ allow them to be specified.
|
||||
If Bash is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the @code{-p} option is not supplied, no startup
|
||||
files are read, shell functions are not inherited from the environment,
|
||||
the @env{SHELLOPTS} variable, if it appears in the environment, is ignored,
|
||||
and the effective user id is set to the real user id.
|
||||
the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH}, and @env{GLOBIGNORE}
|
||||
variables, if they appear in the environment, are ignored, and the effective
|
||||
user id is set to the real user id.
|
||||
If the @code{-p} option is supplied at invocation, the startup behavior is
|
||||
the same, but the effective user id is not reset.
|
||||
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2009 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Wed Jun 17 08:50:54 EDT 2009
|
||||
@set LASTCHANGE Fri Aug 14 18:32:24 EDT 2009
|
||||
|
||||
@set EDITION 4.0
|
||||
@set VERSION 4.0
|
||||
@set UPDATED 17 June 2009
|
||||
@set UPDATED-MONTH June 2009
|
||||
@set UPDATED 14 August 2009
|
||||
@set UPDATED-MONTH August 2009
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2009 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Tue May 26 17:04:05 EDT 2009
|
||||
@set LASTCHANGE Wed Jun 17 08:50:54 EDT 2009
|
||||
|
||||
@set EDITION 4.0
|
||||
@set VERSION 4.0
|
||||
@set UPDATED 26 May 2009
|
||||
@set UPDATED-MONTH May 2009
|
||||
@set UPDATED 17 June 2009
|
||||
@set UPDATED-MONTH June 2009
|
||||
|
||||
Reference in New Issue
Block a user