Imported from ../bash-2.05.tar.gz.

This commit is contained in:
Jari Aalto 2001-04-06 19:14:31 +00:00
commit 28ef6c316f
251 changed files with 22319 additions and 12413 deletions

220
doc/FAQ
View file

@ -1,4 +1,4 @@
This is the Bash FAQ, version 3.7, for Bash version 2.04.
This is the Bash FAQ, version 3.11, for Bash version 2.05.
This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
@ -36,8 +36,8 @@ A10) What is the bash `posix mode'?
Section B: The latest version
B1) What's new in version 2.04?
B2) Are there any user-visible incompatibilities between bash-2.04 and
B1) What's new in version 2.05?
B2) Are there any user-visible incompatibilities between bash-2.05 and
bash-1.14.7?
Section C: Differences from other Unix shells
@ -70,6 +70,10 @@ E5) I have a bunch of shell scripts that use backslash-escaped characters
in arguments to `echo'. Bash doesn't interpret these characters. Why
not, and how can I make it understand them?
E6) Why doesn't a while or for loop get suspended when I type ^Z?
E7) What about empty for loops in Makefiles?
E8) Why does the arithmetic evaluation code complain about `08'?
E9) Why does the pattern matching expression [A-Z]* match files beginning
with every letter except `z'?
Section F: Things to watch out for on certain Unix versions
@ -130,22 +134,22 @@ of Case Western Reserve University.
A2) What's the latest version?
The latest version is 2.04, first made available on Friday, 17 March 2000.
The latest version is 2.05, first made available on Monday, 9 April 2001.
A3) Where can I get it?
Bash is the GNU project's shell, and so is available from the
master GNU archive site, ftp.gnu.org, and its mirrors. The
latest version is also available for FTP from ftp.cwru.edu.
The following URLs tell how to get version 2.04:
The following URLs tell how to get version 2.05:
ftp://ftp.gnu.org/pub/gnu/bash/bash-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-2.04.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-2.05.tar.gz
Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-2.04.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-2.05.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-2.05.tar.gz
A4) On what machines will bash run?
@ -160,7 +164,7 @@ More information appears in the file `INSTALL' in the distribution.
A5) Will bash run on operating systems other than Unix?
Configuration specifics for Unix-like systems such as QNX and
LynxOS are included in the distribution. Bash-2.04 should
LynxOS are included in the distribution. Bash-2.05 should
compile and run on Minix 2.0 (patches were contributed), but I
don't believe anyone has built bash-2.x on earlier Minix versions
yet.
@ -168,16 +172,17 @@ yet.
Bash has been ported to versions of Windows implementing the Win32
programming interface. This includes Windows 95 and Windows NT.
The port was done by Cygnus Solutions as part of their CYGWIN
project. For more information about the project, look at the URL
project. For more information about the project, look at the URLs
http:/sourceware.cygnus.com/cygwin
http://www.cygwin.com/
http://sourceware.cygnus.com/cygwin
Cygnus originally ported bash-1.14.7, and that port was part of their
early GNU-Win32 (the original name) releases. Cygnus has also done a
port of bash-2.02.1 to the CYGWIN environment, and it is available as
part of their current release. (They may have upgraded by now.)
port of bash-2.04 to the CYGWIN environment, and it is available as
part of their current release.
Bash-2.04 should require no local Cygnus changes to build and run under
Bash-2.05 should require no local Cygnus changes to build and run under
CYGWIN.
The Cygnus port works only on Intel machines. There is a port of bash
@ -185,25 +190,13 @@ The Cygnus port works only on Intel machines. There is a port of bash
ftp://ftp.gnustep.org//pub/win32/bash-alpha-nt-1.01.tar.gz
Softway Systems has ported bash-2.01 to their Interix (nee OpenNT)
system, a Unix subsystem for NT that replaces the Microsoft POSIX
subsystem. Check out http://www.interix.com for more information.
Some support for Interix has been incorporated into bash, beginning
with Bash-2.03. It should be easier to build bash on Interix now,
but Interix users should fetch
ftp://ftp.interix.com/pub/tw/unsup/bash.diffs.tar.gz
and read the README.OpenNT file in that archive. It will detail the
arguments `configure' needs to build on Interix. A configure cache
file for Interix is in the bash distribution in cross-build/opennt.cache;
copy that to `config.cache' before starting configure.
D. J. Delorie has ported bash-1.14.7 to run under MS-DOS, as part of
the DJGPP project. For more information on the project, see
DJ Delorie has a port of bash-1.14.7 which runs under MS-DOS, as part
of the DJGPP project. For more information on the project, see
http://www.delorie.com/djgpp/
I have been told that the original DJGPP port was done by Daisuke Aoyama.
I picked up a binary of bash-1.14.7 that is purported to work with
the DJGPP V2 environment from
@ -374,18 +367,45 @@ Reference Manual.
Section B: The latest version
B1) What's new in version 2.04?
B1) What's new in version 2.05?
Bash-2.04 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-2.04
Bash-2.05 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-2.05
distribution):
o This version has once again reverted to using locales and strcoll(3) when
processing pattern matching bracket expressions, as POSIX requires.
o Added a new `--init-file' invocation argument as a synonym for `--rcfile',
per the new GNU coding standards.
o The /dev/tcp and /dev/udp redirections now accept service names as well as
port numbers.
o `complete' and `compgen' now take a `-o value' option, which controls some
of the aspects of that compspec. Valid values are:
default - perform bash default completion if programmable
completion produces no matches
dirnames - perform directory name completion if programmable
completion produces no matches
filenames - tell readline that the compspec produces filenames,
so it can do things like append slashes to
directory names and suppress trailing spaces
o A new loadable builtin, realpath, which canonicalizes and expands symlinks
in pathname arguments.
o When `set' is called without options, it prints function defintions in a
way that allows them to be reused as input. This affects `declare' and
`declare -p' as well. This only happens when the shell is not in POSIX
mode, since POSIX.2 forbids this behavior.
A short feature history dating from bash-2.0:
Bash-2.04 introduced the following new features:
o Programmable word completion with the new `complete' and `compgen' builtins;
examples are provided in examples/complete/complete-examples
o `history' has a new `-d' option to delete a history entry
o `bind' has a new `-x' option to bind key sequences to shell commands
o The prompt expansion code has new `\j' and `\l' escape sequences
o The `no_empty_command_completion' shell option, if enabled, inhibits
o The `no_empty_cmd_completion' shell option, if enabled, inhibits
command completion when TAB is typed on an empty line
o `help' has a new `-s' option to print a usage synopsis
o New arithmetic operators: var++, var--, ++var, --var, expr1,expr2 (comma)
@ -405,7 +425,7 @@ o A new shopt `xpg_echo' variable, to control the behavior of echo with
respect to backslash-escape sequences at runtime
o The NON_INTERACTIVE_LOGIN_SHELLS #define has returned
The version of Readline released with Bash-2.04, Readline-4.1, has several
The version of Readline released with Bash-2.04, Readline-4.1, had several
new features as well:
o Parentheses matching is always compiled into readline, and controllable
@ -417,8 +437,6 @@ o A new function for applications: rl_on_new_line_with_prompt()
o New variables for applications: rl_already_prompted, and rl_gnu_readline_p
A short feature history dating from bash-2.0:
Bash-2.03 had very few new features, in keeping with the convention
that odd-numbered releases provide mainly bug fixes. A number of new
features were added to Readline, mostly at the request of the Cygnus
@ -505,11 +523,11 @@ grammar tighter and smaller (66 reduce-reduce conflicts gone)
lots of code now smaller and faster
test suite greatly expanded
B2) Are there any user-visible incompatibilities between bash-2.04 and
B2) Are there any user-visible incompatibilities between bash-2.05 and
bash-1.14.7?
There are a few incompatibilities between version 1.14.7 and version 2.04.
They are detailed in the file COMPAT in the bash-2.04 distribution.
There are a few incompatibilities between version 1.14.7 and version 2.05.
They are detailed in the file COMPAT in the bash-2.05 distribution.
Section C: Differences from other Unix shells
@ -660,6 +678,7 @@ Things bash has or uses that ksh88 does not:
Things ksh88 has or uses that bash does not:
tracked aliases
variables: ERRNO, FPATH, EDITOR, VISUAL
trap on ERR
co-processes (|&, >&p, <&p)
weirdly-scoped functions
typeset +f to list all function names without definitions
@ -678,7 +697,7 @@ Implementation differences:
C3) Which new features in ksh-93 are not in bash, and which are?
New things in ksh-93 not in bash-2.04:
New things in ksh-93 not in bash-2.05:
associative arrays
floating point arithmetic
math library functions
@ -824,15 +843,15 @@ D4) How can I make my csh aliases work when I convert to bash?
Bash uses a different syntax to support aliases than csh does.
The details can be found in the documentation. We have provided
a shell script which does most of the work of conversion for you;
this script can be found in ./examples/misc/alias-conv.sh. Here is
this script can be found in ./examples/misc/aliasconv.sh. Here is
how you use it:
Start csh in the normal way for you. (e.g., `csh')
Pipe the output of `alias' through `alias-conv.sh', saving the
Pipe the output of `alias' through `aliasconv.sh', saving the
results into `bash_aliases':
alias | alias-conv.sh >bash_aliases
alias | bash aliasconv.sh >bash_aliases
Edit `bash_aliases', carefully reading through any created
functions. You will need to change the names of some csh specific
@ -967,7 +986,10 @@ E4) If I pipe the output of a command into `read variable', why doesn't
the output show up in $variable when the read command finishes?
This has to do with the parent-child relationship between Unix
processes.
processes. It affects all commands run in pipelines, not just
simple calls to `read'. For example, piping a command's output
into a `while' loop that repeatedly calls `read' will result in
the same behavior.
Each element of a pipeline runs in a separate process, a child of
the shell running the pipeline. A subprocess cannot affect its
@ -1058,6 +1080,100 @@ If you want to be able to stop the entire loop, you need to put it
within parentheses, which will force the loop into a subshell that
may be stopped (and subsequently restarted) as a single unit.
E7) What about empty for loops in Makefiles?
It's fairly common to see constructs like this in automatically-generated
Makefiles:
SUBDIRS = @SUBDIRS@
...
subdirs-clean:
for d in ${SUBDIRS}; do \
( cd $$d && ${MAKE} ${MFLAGS} clean ) \
done
When SUBDIRS is empty, this results in a command like this being passed to
bash:
for d in ; do
( cd $d && ${MAKE} ${MFLAGS} clean )
done
This is a syntax error. If the reserved word `in' is present, a word must
follow it before the semicolon or newline. The language in the manual page
referring to the list of words being empty refers to the list after it is
expanded. There must be at least one word following the `in' when the
construct is parsed.
The idiomatic Makefile solution is something like:
SUBDIRS = @SUBDIRS@
subdirs-clean:
subdirs=$SUBDIRS ; for d in $$subdirs; do \
( cd $$d && ${MAKE} ${MFLAGS} clean ) \
done
The POSIX.2 interpretation committee has considered this issue and declared
that the bash implemenation is correct, according to the standard:
http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-169.html
E8) Why does the arithmetic evaluation code complain about `08'?
The bash arithmetic evaluation code (used for `let', $(()), (()), and in
other places), interprets a leading `0' in numeric constants as denoting
an octal number, and a leading `0x' as denoting hexadecimal. This is
in accordance with the POSIX.2 spec, section 2.9.2.1, which states that
arithmetic constants should be handled as signed long integers as defined
by the ANSI/ISO C standard.
The POSIX.2 interpretation committee has confirmed this:
http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-173.html
E9) Why does the pattern matching expression [A-Z]* match files beginning
with every letter except `z'?
Bash-2.05 and later versions have reverted to the bash-2.03 behavior of
honoring the current locale setting when processing ranges within pattern
matching bracket expressions ([A-Z]). This is what POSIX.2 and SUSv2/XPG5
specify.
The behavior of the matcher in bash-2.05 depends on the current LC_COLLATE
setting. Setting this variable to `C' or `POSIX' will result in the
traditional behavior ([A-Z] matches all uppercase ASCII characters).
Many other locales, including the en_US locale (the default on many US
versions of Linux) collate the upper and lower case letters like this:
AaBb...Zz
which means that [A-Z] matches every letter except `z'.
The portable way to specify upper case letters is [:upper:] instead of
A-Z; lower case may be specified as [:lower:] instead of a-z.
Look at the manual pages for setlocale(3), strcoll(3), and, if it is
present, locale(1). If you have locale(1), you can use it to find
your current locale information even if you do not have any of the
LC_ variables set.
My advice is to put
export LC_COLLATE=C
into /etc/profile and inspect any shell scripts run from cron for
constructs like [A-Z]. This will prevent things like
rm [A-Z]*
from removing every file in the current directory except those beginning
with `z' and still allow individual users to change the collation order.
Users may put the above command into their own profiles as well, of course.
Section F: Things to watch out for on certain Unix versions
F1) Why can't I use command line editing in my `cmdtool'?
@ -1163,7 +1279,7 @@ comp.unix.shell). While most commands of the form
can be converted to `< file command', shell control structures such as
loops and subshells require `command < file'.
The file CWRU/sh-redir-hack in the bash-2.04 distribution is an
The file CWRU/sh-redir-hack in the bash-2.05 distribution is an
(unofficial) patch to parse.y that will modify the grammar to
support this construct. It will not apply with `patch'; you must
modify parse.y by hand. Note that if you apply this, you must
@ -1410,8 +1526,12 @@ H3) What's coming in future versions?
These are features I plan to include in a future version of bash.
a bash debugger (a minimally-tested version is included with bash-2.04)
a bash debugger (a minimally-tested version is included with bash-2.05)
associative arrays
changes to the DEBUG trap to be compatible with ksh93 (which runs the
trap before each simple command, instead of after each one like previous
versions)
an implementation of the ksh-like ERR trap
H4) What's on the bash `wish list' for future versions?
@ -1428,11 +1548,11 @@ a better loadable interface to perl with access to the shell builtins and
H5) When will the next release appear?
The next version will appear sometime in 2000 or 2001. Never make
The next version will appear sometime in 2001 or 2002. Never make
predictions.
This document is Copyright 1995-2000 by Chester Ramey.
This document is Copyright 1995-2001 by Chester Ramey.
Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute

View file

@ -110,10 +110,10 @@ RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo
all: ps info dvi text html
nodvi: ps info text html
PSFILES = bash.ps bashbug.ps readline.ps article.ps builtins.ps rbash.ps
PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
DVIFILES = bashref.dvi bashref.ps
INFOFILES = bashref.info
MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0 readline.0
MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
HTMLFILES = bashref.html bash.html
ps: ${PSFILES}
@ -162,8 +162,6 @@ bash.0: bash.1
bashbug.0: bashbug.1
builtins.0: builtins.1 bash.1
rbash.0: rbash.1 bash.1
readline.0: readline.3
readline.ps: readline.3
article.ps: article.ms
$(MAN2HTML): ${topdir}/support/man2html.c
@ -212,8 +210,6 @@ maintainer-clean: clean
installdirs:
-test -d $(man1dir) || $(SHELL) ${MKDIRS} $(man1dir)
# uncomment the next line to create the directory for the readline man page
# -test -d $(man3dir) || $(SHELL) ${MKDIRS} $(man3dir)
-test -d $(infodir) || $(SHELL) ${MKDIRS} $(infodir)
-if [ -n "$(htmldir)" ]; then \
test -d $(htmldir) || $(SHELL) ${MKDIRS} $(htmldir) ; \
@ -222,8 +218,6 @@ installdirs:
install: info installdirs
-$(INSTALL_DATA) $(srcdir)/bash.1 $(man1dir)/bash.${man1ext}
-$(INSTALL_DATA) $(srcdir)/bashbug.1 $(man1dir)/bashbug.${man1ext}
# uncomment the next line to install the readline man page
# -$(INSTALL_DATA) $(srcdir)/readline.3 $(man3dir)/readline.${man3ext}
# uncomment the next line to install the builtins man page
# $(INSTALL_DATA) $(srcdir)/builtins.1 $(man1dir)/bash_builtins.${man1ext}
-$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info
@ -239,7 +233,6 @@ install: info installdirs
uninstall:
-$(RM) $(man1dir)/bash.${man1ext} $(man1dir)/bashbug.${man1ext}
-$(RM) $(man3dir)/readline.${man3ext}
$(RM) $(infodir)/bash.info
-if [ -n "$(htmldir)" ]; then \
$(RM) $(htmldir)/bash.html ; \
@ -256,3 +249,5 @@ posix: bashref.texi
$(SHELL) ./mkposix
cmp -s POSIX.NOTES ../CWRU/POSIX.NOTES || mv POSIX.NOTES ../CWRU/POSIX.NOTES
$(RM) POSIX.NOTES
xdist: inst posix

View file

@ -6,12 +6,12 @@
.\" Case Western Reserve University
.\" chet@ins.CWRU.Edu
.\"
.\" Last Change: Tue Mar 14 11:36:43 EST 2000
.\" Last Change: Mon Mar 5 10:19:14 EST 2001
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2000 Mar 14" "GNU Bash-2.04"
.TH BASH 1 "2001 Mar 5" "GNU Bash-2.05"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@ -51,8 +51,8 @@ bash \- GNU Bourne-Again SHell
[options]
[file]
.SH COPYRIGHT
.if n Bash is Copyright (C) 1989-1999 by the Free Software Foundation, Inc.
.if t Bash is Copyright \(co 1989-1999 by the Free Software Foundation, Inc.
.if n Bash is Copyright (C) 1989-2001 by the Free Software Foundation, Inc.
.if t Bash is Copyright \(co 1989-2001 by the Free Software Foundation, Inc.
.SH DESCRIPTION
.B Bash
is an \fBsh\fR-compatible command language interpreter that
@ -110,7 +110,7 @@ A list of all double-quoted strings preceded by \fB$\fP
is printed on the standard ouput.
These are the strings that
are subject to language translation when the current locale
is not C or POSIX.
is not \fBC\fP or \fBPOSIX\fP.
This implies the \fB\-n\fP option; no commands will be executed.
.TP
.B \-\-
@ -141,6 +141,20 @@ Equivalent to \fB\-D\fP.
.B \-\-help
Display a usage message on standard output and exit successfully.
.TP
.PD 0
\fB\-\-init\-file\fP \fIfile\fP
.TP
\fB\-\-rcfile\fP \fIfile\fP
.PD
Execute commands from
.I file
instead of the standard personal initialization file
.I ~/.bashrc
if the shell is interactive (see
.SM
.B INVOCATION
below).
.TP
.B \-\-login
Make
.B bash
@ -178,17 +192,7 @@ This option is on by default if the shell is invoked as
.TP
.B \-\-posix
Change the behavior of \fBbash\fP where the default operation differs
from the POSIX 1003.2 standard to match the standard.
.TP
\fB\-\-rcfile\fP \fIfile\fP
Execute commands from
.I file
instead of the standard personal initialization file
.I ~/.bashrc
if the shell is interactive (see
.SM
.B INVOCATION
below).
from the POSIX 1003.2 standard to match the standard (\fIposix mode\fP).
.TP
.B \-\-restricted
The shell becomes restricted (see
@ -303,7 +307,8 @@ expanded value as the name of a file to read and execute.
behaves as if the following command were executed:
.sp .5
.RS
\f(CWif [ \-n "$BASH_ENV" ]; then . "$BASH_ENV"; fi\fP
.if t \f(CWif [ \-n "$BASH_ENV" ]; then . "$BASH_ENV"; fi\fP
.if n if [ \-n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
.RE
.sp .5
but the value of the
@ -1119,7 +1124,7 @@ user is a member.
Assignments to
.SM
.B GROUPS
have no effect and are silently discarded.
have no effect and return an error status.
If
.SM
.B GROUPS
@ -1223,7 +1228,7 @@ This variable exists only when a shell function is executing.
Assignments to
.SM
.B FUNCNAME
have no effect and are silently discarded.
have no effect and return an error status.
If
.SM
.B FUNCNAME
@ -1376,7 +1381,9 @@ the shell looks for commands (see
below). The default path is system-dependent,
and is set by the administrator who installs
.BR bash .
A common value is ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.''.
A common value is
.if t \f(CW/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.\fP.
.if n ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.''.
.TP
.B HOME
The home directory of the current user; the default argument for the
@ -1421,7 +1428,8 @@ often (in seconds)
.B bash
checks for mail. The default is 60 seconds. When it is time to check
for mail, the shell does so before displaying the primary prompt.
If this variable is unset, the shell disables mail checking.
If this variable is unset, or set to a value that is not a number
greater than or equal to zero, the shell disables mail checking.
.TP
.B MAILPATH
A colon-separated list of file names to be checked for mail.
@ -1578,6 +1586,14 @@ strings preceded by a \fB$\fP.
.B LC_NUMERIC
This variable determines the locale category used for number formatting.
.TP
.B LINES
Used by the \fBselect\fP builtin command to determine the column length
for printing selection lists. Automatically set upon receipt of a SIGWINCH.
.TP
.B COLUMNS
Used by the \fBselect\fP builtin command to determine the terminal width
when printing selection lists. Automatically set upon receipt of a SIGWINCH.
.TP
.B PROMPT_COMMAND
If set, the value is executed as a command prior to issuing each primary
prompt.
@ -2502,9 +2518,10 @@ Matches any single character.
.TP
.B [...]
Matches any one of the enclosed characters. A pair of characters
separated by a minus sign denotes a
.IR range ;
any character lexically between those two characters, inclusive,
separated by a hyphen denotes a
\fIrange expression\fP;
any character that sorts between those two characters, inclusive,
using the current locale's collating sequence and character set,
is matched. If the first character following the
.B [
is a
@ -2512,6 +2529,9 @@ is a
or a
.B ^
then any character not enclosed is matched.
The sorting order of characters in range expressions is determined by
the current locale and the value of the \fBLC_COLLATE\fP shell variable,
if set.
A
.B \-
may be matched by including it as the first or last character
@ -3990,6 +4010,7 @@ command or the text of a macro and a key sequence to which
it should be bound. The name may be specified in one of two ways:
as a symbolic key name, possibly with \fIMeta\-\fP or \fIControl\-\fP
prefixes, or as a key sequence.
.PP
When using the form \fBkeyname\fP:\^\fIfunction\-name\fP or \fImacro\fP,
.I keyname
is the name of a key spelled out in English. For example:
@ -4013,7 +4034,8 @@ and
.I C\-o
is bound to run the macro
expressed on the right hand side (that is, to insert the text
.I "> output"
.if t \f(CW> output\fP
.if n ``> output''
into the line).
.PP
In the second form, \fB"keyseq"\fP:\^\fIfunction\-name\fP or \fImacro\fP,
@ -4023,7 +4045,8 @@ differs from
above in that strings denoting
an entire key sequence may be specified by placing the sequence
within double quotes. Some GNU Emacs style key escapes can be
used, as in the following example.
used, as in the following example, but the symbolic character names
are not recognized.
.sp
.RS
"\eC\-u": universal\-argument
@ -4043,7 +4066,9 @@ is bound to the function
and
.I "ESC [ 1 1 ~"
is bound to insert the text
.BR "Function Key 1" .
.if t \f(CWFunction Key 1\fP.
.if n ``Function Key 1''.
.PP
The full set of GNU Emacs style escape sequences is
.RS
.PD 0
@ -4467,8 +4492,8 @@ This is a non-incremental search.
.TP
.B yank\-nth\-arg (M\-C\-y)
Insert the first argument to the previous command (usually
the second word on the previous line) at point (the current
cursor position). With an argument
the second word on the previous line) at point.
With an argument
.IR n ,
insert the \fIn\fPth word from the previous command (the words
in the previous command begin with word 0). A negative argument
@ -4527,7 +4552,7 @@ argument is ignored.
.PD 0
.TP
.B delete\-char (C\-d)
Delete the character under the cursor. If point is at the
Delete the character at point. If point is at the
beginning of the line, there are no characters in the line, and
the last character typed was not bound to \fBdelete\-char\fP,
then return
@ -4554,15 +4579,15 @@ Insert a tab character.
Insert the character typed.
.TP
.B transpose\-chars (C\-t)
Drag the character before point forward over the character at point.
Point moves forward as well.
If point is at the end of the line, then transpose the two characters
before point.
Drag the character before point forward over the character at point,
moving point forward as well.
If point is at the end of the line, then this transposes
the two characters before point.
Negative arguments have no effect.
.TP
.B transpose\-words (M\-t)
Drag the word before point past the word after point,
moving the point over that word as well.
moving point over that word as well.
.TP
.B upcase\-word (M\-u)
Uppercase the current (or following) word. With a negative argument,
@ -4605,7 +4630,6 @@ Word boundaries are the same as those used by \fBbackward\-word\fP.
.TP
.B unix\-word\-rubout (C\-w)
Kill the word behind point, using white space as a word boundary.
The word boundaries are different from \fBbackward\-kill\-word\fP.
The killed text is saved on the kill-ring.
.TP
.B delete\-horizontal\-space (M\-\e)
@ -4626,7 +4650,7 @@ Copy the word following point to the kill buffer.
The word boundaries are the same as \fBforward\-word\fP.
.TP
.B yank (C\-y)
Yank the top of the kill ring into the buffer at the cursor.
Yank the top of the kill ring into the buffer at point.
.TP
.B yank\-pop (M\-y)
Rotate the kill ring, and yank the new top. Only works following
@ -4682,8 +4706,9 @@ Similar to \fBcomplete\fP, but replaces the word to be completed
with a single match from the list of possible completions.
Repeated execution of \fBmenu\-complete\fP steps through the list
of possible completions, inserting each match in turn.
At the end of the list of completions, the bell is rung and the
original text is restored.
At the end of the list of completions, the bell is rung
(subject to the setting of \Bbell\-style\fP)
and the original text is restored.
An argument of \fIn\fP moves \fIn\fP positions forward in the list
of matches; a negative argument may be used to move backward
through the list.
@ -4802,7 +4827,7 @@ command enough times to return the line to its initial state.
Perform tilde expansion on the current word.
.TP
.B set\-mark (C\-@, M\-<space>)
Set the mark to the current point. If a
Set the mark to the point. If a
numeric argument is supplied, the mark is set to that position.
.TP
.B exchange\-point\-and\-mark (C\-x C\-x)
@ -4975,10 +5000,17 @@ options are added to each member of the completion list, and the result is
returned to the readline completion code as the list of possible
completions.
.PP
If a compspec is found, whatever it generates is returned to the completion
code as the full set of possible completions.
If the previously-applied actions do not generate any matches, and the
\fB\-o dirnames\fP option was supplied to \fBcomplete\fP when the
compspec was defined, directory name completion is attempted.
.PP
By default, if a compspec is found, whatever it generates is returned
to the completion code as the full set of possible completions.
The default \fBbash\fP completions are not attempted, and the readline
default of filename completion is disabled.
If the \fB-o default\fP option was supplied to \fBcomplete\fP when the
compspec was defined, readline's default completion will be performed
if the compspec generates no matches.
.SH HISTORY
When the
.B \-o history
@ -5377,7 +5409,8 @@ are used to find the directory containing
The file searched for in
.SM
.B PATH
need not be executable. The current directory is
need not be executable.
When \fBbash\fP is not in \fIposix mode\fP, the current directory is
searched if no file is found in
.SM
.BR PATH .
@ -5454,7 +5487,7 @@ Acceptable
.I keymap
names are
\fIemacs, emacs\-standard, emacs\-meta, emacs\-ctlx, vi,
vi\-command\fP, and
vi\-move, vi\-command\fP, and
.IR vi\-insert .
\fIvi\fP is equivalent to \fIvi\-command\fP; \fIemacs\fP is
equivalent to \fIemacs\-standard\fP.
@ -5639,7 +5672,7 @@ The return value is true unless an invalid option is supplied, or no
matches were generated.
.TP
.PD 0
\fBcomplete\fP [\fB\-abcdefjkvu\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP]
\fBcomplete\fP [\fB\-abcdefjkvu\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP]
.br
[\fB\-X\fP \fIfilterpat\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP] \fIname\fP [\fIname ...\fP]
.TP
@ -5665,6 +5698,24 @@ builtin is invoked.
.RS
.PD 0
.TP 8
\fB\-o\fP \fIcomp-option\fP
The \fIcomp-option\fP controls several aspects of the compspec's behavior
beyond the simple generation of completions.
\fIcomp-option\fP may be one of:
.RS
.TP 8
.B default
Use readline's default completion if the compspec generates no matches.
.TP 8
.B dirnames
Perform directory name completion if the compspec generates no matches.
.TP 8
.B filenames
Tell readline that the compspec generates filenames, so it can perform any
filename\-specific processing (like adding a slash to directory names or
suppressing trailing spaces). Intended to be used with shell functions.
.RE
.TP 8
\fB\-A\fP \fIaction\fP
The \fIaction\fP may be one of the following to generate a list of possible
completions:
@ -5964,7 +6015,7 @@ the following backslash-escaped characters is enabled. The
.B \-E
option disables the interpretation of these escape characters,
even on systems where they are interpreted by default.
The \fBxpg_echo\fP shell option to the may be used to
The \fBxpg_echo\fP shell option may be used to
dynamically determine whether or not \fBecho\fP expands these
escape characters by default.
.B echo
@ -6029,7 +6080,8 @@ binary found via the
.SM
.B PATH
instead of the shell builtin version, run
\f(CWenable -n test\fP.
.if t \f(CWenable -n test\fP.
.if n ``enable -n test''.
The
.B \-f
option means to load the new builtin command
@ -6885,8 +6937,8 @@ Options, if specified, have the following meanings:
.PD 0
.TP 8
.B \-a
Automatically mark variables which are modified or created for export
to the environment of subsequent commands.
Automatically mark variables and functions which are modified or created
for export to the environment of subsequent commands.
.TP 8
.B \-b
Report the status of terminated background jobs
@ -6978,7 +7030,10 @@ Enable command history, as described above under
This option is on by default in interactive shells.
.TP 8
.B ignoreeof
The effect is as if the shell command \f(CWIGNOREEOF=10\fP had been executed
The effect is as if the shell command
.if t \f(CWIGNOREEOF=10\fP
.if n ``IGNOREEOF=10''
had been executed
(see
.B Shell Variables
above).
@ -7023,7 +7078,7 @@ Same as
Change the behavior of
.B bash
where the default operation differs
from the POSIX 1003.2 standard to match the standard.
from the POSIX 1003.2 standard to match the standard (\fIposix mode\fP).
.TP 8
.B privileged
Same as
@ -7621,7 +7676,9 @@ either returns the name of the disk file
that would be executed if
.I name
were specified as a command name,
or nothing if \f(CWtype -t name\fP
or nothing if
.if t \f(CWtype -t name\fP
.if n ``type -t name''
would not return
.IR file .
If a command is hashed,

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff