Imported from ../bash-4.0-rc1.tar.gz.

This commit is contained in:
Jari Aalto 2009-01-12 13:36:28 +00:00
commit 3185942a52
666 changed files with 188710 additions and 54674 deletions

47
doc/FAQ
View file

@ -1,4 +1,4 @@
This is the Bash FAQ, version 3.34, for Bash version 3.2.
This is the Bash FAQ, version 3.36, for Bash version 3.2.
This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
@ -79,6 +79,8 @@ E11) If I resize my xterm while another program is running, why doesn't bash
notice the change?
E12) Why don't negative offsets in substring expansion work like I expect?
E13) Why does filename completion misbehave if a colon appears in the filename?
E14) Why does quoting the pattern argument to the regular expression matching
conditional operator (=~) cause matching to stop working?
Section F: Things to watch out for on certain Unix versions
@ -908,7 +910,9 @@ D1) Why does bash run a different version of `command' than
On many systems, `which' is actually a csh script that assumes
you're running csh. In tcsh, `which' and its cousin `where'
are builtins. On other Unix systems, `which' is a perl script
that uses the PATH environment variable.
that uses the PATH environment variable. Many Linux distributions
use GNU `which', which is a C program that can understand shell
aliases.
The csh script version reads the csh startup files from your
home directory and uses those to determine which `command' will
@ -1425,6 +1429,34 @@ COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
You can also quote the colon with a backslash to achieve the same result
temporarily.
E14) Why does quoting the pattern argument to the regular expression matching
conditional operator (=~) cause regexp matching to stop working?
In versions of bash prior to bash-3.2, the effect of quoting the regular
expression argument to the [[ command's =~ operator was not specified.
The practical effect was that double-quoting the pattern argument required
backslashes to quote special pattern characters, which interfered with the
backslash processing performed by double-quoted word expansion and was
inconsistent with how the == shell pattern matching operator treated
quoted characters.
In bash-3.2, the shell was changed to internally quote characters in single-
and double-quoted string arguments to the =~ operator, which suppresses the
special meaning of the characters special to regular expression processing
(`.', `[', `\', `(', `), `*', `+', `?', `{', `|', `^', and `$') and forces
them to be matched literally. This is consistent with how the `==' pattern
matching operator treats quoted portions of its pattern argument.
Since the treatment of quoted string arguments was changed, several issues
have arisen, chief among them the problem of white space in pattern arguments
and the differing treatment of quoted strings between bash-3.1 and bash-3.2.
Both problems may be solved by using a shell variable to hold the pattern.
Since word splitting is not performed when expanding shell variables in all
operands of the [[ command, this allows users to quote patterns as they wish
when assigning the variable, then expand the values to a single string that
may contain whitespace. The first problem may be solved by using backslashes
or any other quoting mechanism to escape the white space in the patterns.
Section F: Things to watch out for on certain Unix versions
F1) Why can't I use command line editing in my `cmdtool'?
@ -1742,7 +1774,12 @@ this:
echo .!(.|) *
A solution that works without extended globbing is given in the Unix Shell
FAQ, posted periodically to comp.unix.shell.
FAQ, posted periodically to comp.unix.shell. It's a variant of
echo .[!.]* ..?* *
(The ..?* catches files with names of three or more characters beginning
with `..')
Section H: Where do I go from here?
@ -1791,8 +1828,8 @@ it in fine bookstores near you. This edition of the book has been updated
to cover bash-3.0.
The GNU Bash Reference Manual has been published as a printed book by
Network Theory Ltd (Paperback, ISBN: 0-9541617-7-7, Feb 2003). It covers
bash-2.0 and is available from most online bookstores (see
Network Theory Ltd (Paperback, ISBN: 0-9541617-7-7, Nov. 2006). It covers
bash-3.2 and is available from most online bookstores (see
http://www.network-theory.co.uk/bash/manual/ for details). The publisher
will donate $1 to the Free Software Foundation for each copy sold.

View file

@ -1,20 +1,19 @@
# This Makefile is for the Bash/documentation directory -*- text -*-.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# Copyright (C) 2003-2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
@ -35,6 +34,8 @@ VPATH = .:@srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
infodir = @infodir@
# set this to a directory name to have the HTML files installed
@ -143,6 +144,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/version.texi
all: ps info dvi text html
nodvi: ps info text html
everything: all pdf
PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
DVIFILES = bashref.dvi bashref.ps
@ -223,9 +225,12 @@ installdirs:
install: info installdirs bash.info
-$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext}
-$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext}
# uncomment the next line to install the builtins man page
# -$(INSTALL_DATA) $(srcdir)/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
-$(INSTALL_DATA) $(srcdir)/bash.info $(DESTDIR)$(infodir)/bash.info
# uncomment the next lines to install the builtins man page
# sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
# -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
# -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
-if test -f bash.info; then d=.; else d=$(srcdir); fi; \
$(INSTALL_DATA) $$d/bash.info $(DESTDIR)$(infodir)/bash.info
# run install-info if it is present to update the info directory
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
@ -236,8 +241,16 @@ install: info installdirs bash.info
$(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \
fi
install_builtins: installdirs
sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
-$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
-$(RM) $${TMPDIR:-/var/tmp}/builtins.1
install_everything: install install_builtins
uninstall:
-$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext}
-$(RM) $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
$(RM) $(DESTDIR)$(infodir)/bash.info
-if test -n "$(htmldir)" ; then \
$(RM) $(DESTDIR)$(htmldir)/bash.html ; \

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,17 @@
.TH BASHBUG 1 "1998 July 30" GNU
.\"
.\" MAN PAGE COMMENTS to
.\"
.\" Chet Ramey
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
.\" Last Change: Tue Apr 3 15:46:30 EDT 2007
.\"
.TH BASHBUG 1 "1998 July 30" "GNU Bash-4.0"
.SH NAME
bashbug \- report a bug in bash
.SH SYNOPSIS
\fBbashbug\fP [\fIaddress\fP]
\fBbashbug\fP [\fI--version\fP] [\fI--help\fP] [\fIemail-address\fP]
.SH DESCRIPTION
.B bashbug
is a shell script to help the user compose and mail bug reports
@ -15,7 +24,7 @@ on a temporary copy of the bug report format outline. The user must
fill in the appropriate fields and exit the editor.
.B bashbug
then mails the completed report to \fIbug-bash@gnu.org\fP, or
\fIaddress\fP. If the report cannot be mailed, it is saved in the
\fIemail-address\fP. If the report cannot be mailed, it is saved in the
file \fIdead.bashbug\fP in the invoking user's home directory.
.PP
The bug report format outline consists of several sections. The first
@ -39,3 +48,17 @@ defaults to
.TP
.B HOME
Directory in which the failed bug report is saved if the mail fails.
.TP
.B TMPDIR
Directory in which to create temporary files and directories.
.SH "SEE ALSO"
.TP
\fIbash\fP(1)
.SH AUTHORS
Brian Fox, Free Software Foundation
.br
bfox@gnu.org
.PP
Chet Ramey, Case Western Reserve University
.br
chet@po.cwru.edu

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,14 @@
.\" This is a hack to force bash builtins into the whatis database
.\" and to get the list of builtins to come up with the man command.
.TH BASH_BUILTINS 1 "2004 Apr 20" "GNU Bash-3.0"
.TH BASH_BUILTINS 1 "2004 Apr 20" "GNU Bash-4.0"
.SH NAME
bash, :, ., [, alias, bg, bind, break, builtin, cd, command, compgen, complete,
continue, declare, dirs, disown, echo, enable, eval, exec, exit,
export, fc, fg, getopts, hash, help, history, jobs, kill,
let, local, logout, popd, printf, pushd, pwd, read, readonly, return, set,
shift, shopt, source, suspend, test, times, trap, type, typeset,
bash, :, ., [, alias, bg, bind, break, builtin, caller,
cd, command, compgen, complete,
compopt, continue, declare, dirs, disown, echo, enable, eval, exec, exit,
export, false, fc, fg, getopts, hash, help, history, jobs, kill,
let, local, logout, mapfile, popd, printf, pushd, pwd, read,
readonly, return, set,
shift, shopt, source, suspend, test, times, trap, true, type, typeset,
ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1)
.SH BASH BUILTIN COMMANDS
.nr zZ 1

View file

@ -1,13 +1,12 @@
@node GNU Free Documentation License
@appendixsec GNU Free Documentation License
@cindex FDL, GNU Free Documentation License
@c The GNU Free Documentation License.
@center Version 1.2, November 2002
@c This file is intended to be included within another document,
@c hence no sectioning command or @node.
@display
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -344,7 +343,7 @@ and independent documents or works, in or on a volume of a storage or
distribution medium, is called an ``aggregate'' if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included an aggregate, this License does not
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
@ -408,7 +407,7 @@ as a draft) by the Free Software Foundation.
@end enumerate
@page
@appendixsubsec ADDENDUM: How to use this License for your documents
@heading ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
@ -420,14 +419,14 @@ license notices just after the title page:
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled ``GNU
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
@end group
@end smallexample
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the ``with...Texts.'' line with this:
replace the ``with@dots{}Texts.'' line with this:
@smallexample
@group

View file

@ -1,4 +1,4 @@
.TH RBASH 1 "2004 Apr 20" "GNU Bash-3.0"
.TH RBASH 1 "2004 Apr 20" "GNU Bash-4.0"
.SH NAME
rbash \- restricted bash, see \fBbash\fR(1)
.SH RESTRICTED SHELL

View file

@ -1,10 +1,10 @@
@ignore
Copyright (C) 1988-2006 Free Software Foundation, Inc.
Copyright (C) 1988-2009 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Thu Sep 28 10:25:45 EDT 2006
@set LASTCHANGE Mon Dec 29 16:48:40 EST 2008
@set EDITION 3.2
@set VERSION 3.2
@set UPDATED 28 September 2006
@set UPDATED-MONTH September 2006
@set EDITION 4.0
@set VERSION 4.0
@set UPDATED 29 December 2008
@set UPDATED-MONTH December 2008