commit bash-20070329 snapshot

This commit is contained in:
Chet Ramey
2011-12-07 09:05:53 -05:00
parent 28157acd2d
commit d3ad40dee6
265 changed files with 56692 additions and 40436 deletions
+259 -1
View File
@@ -1,3 +1,261 @@
This document details the changes between this version, bash-3.2-release,
and the previous version, bash-3.2-beta.
1. Changes to Bash
a. Fixed a bug that caused the temporary environment passed to a command to
affect the shell's environment under certain circumstances.
b. Fixed a bug in the printf builtin that caused the %q format specifier to
ignore empty string arguments.
c. Improved multibyte character environment detection at configuration time.
d. Fixed a bug in the read builtin that left spurious escape characters in the
input after processing backslashes when assigning to an array variable.
2. Changes to Readline
a. Fixed a redisplay bug that occurred in multibyte-capable locales when the
prompt was one character longer than the screen width.
------------------------------------------------------------------------------
This document details the changes between this version, bash-3.2-beta,
and the previous version, bash-3.2-alpha.
1. Changes to Bash
a. Changed the lexical analyzer to treat locale-specific blank characters as
white space.
b. Fixed a bug in command printing to avoid confusion between redirections and
process substitution.
c. Fixed problems with cross-compiling originating from inherited environment
variables.
d. Added write error reporting to printf builtin.
e. Fixed a bug in the variable expansion code that could cause a core dump in
a multi-byte locale.
f. Fixed a bug that caused substring expansion of a null string to return
incorrect results.
g. BASH_COMMAND now retains its previous value while executing commands as the
result of a trap, as the documentation states.
2. Changes to Readline
a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
the prompt and input line multiple times.
b. Fixed history expansion to not be confused by here-string redirection.
c. Readline no longer treats read errors by converting them to newlines, as
it does with EOF. This caused partial lines to be returned from readline().
------------------------------------------------------------------------------
This document details the changes between this version, bash-3.2-alpha,
and the previous version, bash-3.1-release.
1. Changes to Bash
a. Fixed a source bug that caused the minimal configuration to not compile.
b. Fixed memory leaks in error handling for the `read' builtin.
c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit
status.
d. Fixed some parsing problems with compound array assignments.
e. Added additional configuration changes for: NetBSD (incomplete multibyte
character support)
f. Fixed two bugs with local array variable creation when shadowing a variable
of the same name from a previous context.
g. Fixed the `read' builtin to restore the correct set of completion functions
if a timeout occurs.
h. Added code to defer the initialization of HISTSIZE (and its stifling of the
history list) until the history file is loaded, allowing a startup file to
override the default value.
i. Tightened up the arithmetic expression parsing to produce better error
messages when presented with invalid operators.
j. Fixed the cross-compilation support to build the signal list at shell
invocation rather than compile time if cross-compiling.
k. Fixed multibyte support for non-gcc compilers (or compilers that do not
allow automatic array variable sizing based on a non-constant value).
l. Several fixes to the code that manages the list of terminated jobs and
their exit statuses, and the list of active and recently-terminated jobs
to avoid pid aliasing/wraparound and allocation errors.
m. Fixed a problem that allowed scripts to die due to SIGINT while waiting
for children, even when started in the background or otherwise ignoring
SIGINT.
n. Fixed a bug that caused shells invoked as -/bin/bash from not being
recognized as login shells.
o. Fixed a problem that caused shells in the background to give the terminal
to a process group other than the foreground shell process group.
p. Fixed a problem with extracting the `varname' in ${#varname}.
q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby
calling functions that may not be called in a signal handler context --
but set a flag and exit afterward (like SIGINT).
r. Changed the brace expansion code to skip over braces that don't begin a
valid matched brace expansion construct.
s. Fixed `typeset' and `declare' to not require that their shell function
operands to be valid shell identifiers.
t. Changed `test' to use access(2) with a temporary uid/euid swap when testing
file attributes and running setuid, and access(2) in most other cases.
u. Changed completion code to not attempt command name completion on a line
consisting solely of whitespace when no_empty_command_completion is set.
v. The `hash' builtin now prints nothing in posix mode when the hash table is
empty, and prints a message to that effect to stdout instead of stderr
when not in posix mode.
w. Fixed a bug in the extended pattern matching code that caused it to fail to
match periods with certain patterns.
x. Fixed a bug that caused the shell to dump core when performing filename
generation in directories with thousands of files.
y. Returned to the original Bourne shell rules for parsing ``: no recursive
parsing of embedded quoted strings or ${...} constructs.
z. The inheritence of the DEBUG, RETURN, and ERR traps is now dependent only
on the settings of the `functrace' and `errtrace' shell options, rather
than whether or not the shell is in debugging mode.
aa. Fixed a problem with $HOME being converted to ~ in the expansion of
members of the DIRSTACK array.
bb. Fixed a problem with quoted arguments to arithmetic expansions in certain
constructs.
cc. The command word completion code now no longer returns matching directories
while searching $PATH.
dd. Fixed a bug with zero-padding and precision handling in snprintf()
replacement.
ee. Fixed a bug that caused the command substitution code not to take embedded
shell comments into account.
ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an
arithmetic substitution.
gg. Fixed a bug in the prompt expansion code that inappropriately added a
\001 before a \002 under certain circumstances.
hh. Fixed a bug that caused `unset LANG' to not properly reset the locale
(previous versions would set the locale back to what it was when bash
was started rather than the system's "native" locale).
ii. Fixed a bug that could cause file descriptors > 10 to not be closed even
when closed explicitly by a script.
jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting
inside double-quoted command substitutions.
kk. Fixed a bug that could cause core dumps when `return' was executed as the
last element of a pipeline inside a shell function.
ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in
the jobs list.
2. Changes to Readline
a. Fixed a problem that caused segmentation faults when using readline in
callback mode and typing consecutive DEL characters on an empty line.
b. Fixed several redisplay problems with multibyte characters, all having to
do with the different code paths and variable meanings between single-byte
and multibyte character redisplay.
c. Fixed a problem with key sequence translation when presented with the
sequence \M-\C-x.
d. Fixed a problem that prevented the `a' command in vi mode from being
undone and redone properly.
e. Fixed a problem that prevented empty inserts in vi mode from being undone
properly.
f. Fixed a problem that caused readline to initialize with an incorrect idea
of whether or not the terminal can autowrap.
g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
convert-meta and use \e where appropriate.
h. Changed the default filename completion function to call the filename
dequoting function if the directory completion hook isn't set. This means
that any directory completion hooks need to dequote the directory name,
since application-specific hooks need to know how the word was quoted,
even if no other changes are made.
i. Fixed a bug with creating the prompt for a non-interactive search string
when there are non-printing characters in the primary prompt.
j. Fixed a bug that caused prompts with invisible characters to be redrawn
multiple times in a multibyte locale.
k. Fixed a bug that could cause the key sequence scanning code to return the
wrong function.
l. Fixed a problem with the callback interface that caused it to fail when
using multi-character keyboard macros.
m. Fixed a bug that could cause a core dump when an edited history entry was
re-executed under certain conditions.
n. Fixed a bug that caused readline to reference freed memory when attmpting
to display a portion of the prompt.
3. New Features in Bash
a. Changed the parameter pattern replacement functions to not anchor the
pattern at the beginning of the string if doing global replacement - that
combination doesn't make any sense.
b. When running in `word expansion only' mode (--wordexp option), inhibit
process substitution.
c. Loadable builtins now work on MacOS X 10.[34].
d. Shells running in posix mode no longer set $HOME, as POSIX requires.
e. The code that checks for binary files being executed as shell scripts now
checks only for NUL rather than any non-printing character.
f. Quoting the string argument to the [[ command's =~ operator now forces
string matching, as with the other pattern-matching operators.
4. New Features in Readline
a. Calling applications can now set the keyboard timeout to 0, allowing
poll-like behavior.
b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
the default last-ditch startup file.
c. The history file reading functions now allow windows-like \r\n line
terminators.
------------------------------------------------------------------------------
This document details the changes between this version, bash-3.1-release,
and the previous version, bash-3.1-rc2.
@@ -48,7 +306,7 @@ and the previous version, bash-3.1-beta1.
1. Changes to Bash
a. Fixed a bug that could cause core dumps due of accessing the current
a. Fixed a bug that could cause core dumps due to accessing the current
pipeline while in the middle of modifying it.
b. Fixed a bug that caused pathnames with backslashes still quoting characters
+19 -2
View File
@@ -1,5 +1,5 @@
This document details the incompatibilities between this version of bash,
bash-3.1, and the previous widely-available versions, bash-1.14 (which is
bash-3.2, and the previous widely-available versions, bash-1.14 (which is
still the `standard' version for a few Linux distributions) and bash-2.x.
These were discovered by users of bash-2.x and 3.x, so this list is not
comprehensive. Some of these incompatibilities occur between the current
@@ -201,7 +201,9 @@ bash-2.0 were significant.)
Bash-2.x does not support it.
15. Bash no longer auto-exports the HOME, PATH, SHELL, TERM, HOSTNAME,
HOSTTYPE, MACHTYPE, or OSTYPE variables.
HOSTTYPE, MACHTYPE, or OSTYPE variables. If they appear in the initial
environment, the export attribute will be set, but if bash provides a
default value, they will remain local to the current shell.
16. Bash no longer initializes the FUNCNAME, GROUPS, or DIRSTACK variables
to have special behavior if they appear in the initial environment.
@@ -256,3 +258,18 @@ bash-2.0 were significant.)
30. Beginning with bash-3.1, the combination of posix mode and enabling the
`xpg_echo' option causes echo to ignore all options, not looking for `-n'
31. Beginning with bash-3.2, bash follows the Bourne-shell-style (and POSIX-
style) rules for parsing the contents of old-style backquoted command
substitutions. Previous versions of bash attempted to recursively parse
embedded quoted strings and shell constructs; bash-3.2 uses strict POSIX
rules to find the closing backquote and simply passes the contents of the
command substitution to a subshell for parsing and execution.
32. Beginning with bash-3.2, bash uses access(2) when executing primaries for
the test builtin and the [[ compound command, rather than looking at the
file permission bits obtained with stat(2). This obeys restrictions of
the file system (e.g., read-only or noexec mounts) not available via stat.
33. Beginning with bash-3.1/readline-5.1, the readline key binding code obeys
the current setting of the `convert-meta' variable.
+1264 -4
View File
File diff suppressed because it is too large Load Diff
+39
View File
@@ -14418,3 +14418,42 @@ parse.y
escape it with CTLESC if pass_next_character indicates that the
CTLESC was escaped by a backslash. Fixes bug reported by
Paul Bagshaw <paul.bagshaw@orange-ftgroup.com>.
3/25
----
lib/readline/text.c
- in rl_forward_char, short-circuit the loop if in emacs mode and
rl_point == rl_end. Fixes problem with multibyte locales
reported by Len Lattanzi <llattanzi@apple.com>
3/29
----
command.h
- new flag for subshell_environment: SUBSHELL_PROCSUB, for process
substitution
subst.c
- add SUBSHELL_PROCSUB to subshell_environment in process_substitute
3/30
----
doc/Makefile.in
- fix installation of bash.info to understand that it is in the build
directory, not the source directory
mailcheck.c
- new function, init_mail_dates, calls remember_mail_dates only if
there are no mailboxes in `mailfiles'
- new function, init_mail_file, just calls RESET_MAIL_FILE (placeholder
for later expansion)
- call init_mail_file instead of update_mail_file in add_mail_file,
called from remember_mail_dates (which is supposed to initialize
the list of mail files)
- new convenience functions, alloc_mail_file and dispose_mail_file to
allocate and free FILEINFO structs
mailcheck.h
- extern declaration for init_mail_dates
shell.c
- call init_mail_dates instead of remember_mail_dates
+4
View File
@@ -21,6 +21,10 @@
#include <sys/types.h>
#include <fcntl.h>
#include <sys/file.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
main()
+13
View File
@@ -422,9 +422,11 @@ lib/sh/times.c f
lib/sh/timeval.c f
lib/sh/tmpfile.c f
lib/sh/vprint.c f
lib/sh/wcsdup.c f
lib/sh/winsize.c f
lib/sh/xstrchr.c f
lib/sh/zcatfd.c f
lib/sh/zmapfd.c f
lib/sh/zread.c f
lib/sh/zwrite.c f
lib/termcap/Makefile.in f
@@ -469,6 +471,8 @@ po/en@quot.gmo f
po/en@boldquot.gmo f
po/ru.po f
po/ru.gmo f
po/sv.po f
po/sv.gmo f
po/insert-header.sin f
po/quot.sed f
po/remove-potcdate.sin f
@@ -480,6 +484,7 @@ CWRU/misc/errlist.c f
CWRU/misc/hpux10-dlfcn.h f
CWRU/PLATFORMS f
CWRU/README f
CWRU/audit-patch f
CWRU/changelog f
CWRU/sh-redir-hack f
CWRU/mh-folder-comp f
@@ -655,6 +660,7 @@ examples/scripts/showperm.bash f
examples/scripts/shprompt f
examples/scripts/spin.bash f
examples/scripts/timeout f
examples/scripts/timeout2 f
examples/scripts/vtree2 f
examples/scripts/vtree3 f
examples/scripts/vtree3a f
@@ -679,6 +685,7 @@ examples/misc/aliasconv.sh f
examples/misc/aliasconv.bash f
examples/misc/cshtobash f
tests/README f
tests/COPYRIGHT f
tests/alias.tests f
tests/alias.right f
tests/appendop.tests f
@@ -708,8 +715,12 @@ tests/source2.sub f
tests/source3.sub f
tests/source4.sub f
tests/source5.sub f
tests/source6.sub f
tests/comsub.tests f
tests/comsub.right f
tests/cond.tests f
tests/cond.right f
tests/cond-regexp.sub f
tests/cprint.tests f
tests/cprint.right f
tests/dbg-support.right f
@@ -800,6 +811,7 @@ tests/new-exp2.sub f
tests/new-exp3.sub f
tests/new-exp4.sub f
tests/new-exp5.sub f
tests/new-exp6.sub f
tests/new-exp.right f
tests/nquote.tests f
tests/nquote.right f
@@ -854,6 +866,7 @@ tests/run-array f
tests/run-array2 f
tests/run-braces f
tests/run-builtins f
tests/run-comsub f
tests/run-cond f
tests/run-cprint f
tests/run-dbg-support f
+27 -12
View File
@@ -31,12 +31,15 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
libdir = @libdir@
infodir = @infodir@
includedir = @includedir@
datadir = @datadir@
localedir = $(datadir)/locale
localedir = @localedir@
mandir = @mandir@
manpfx = man
@@ -78,6 +81,8 @@ INSTALLMODE2 = -m 0555
TESTSCRIPT = @TESTSCRIPT@
DEBUGGER_START_FILE = @DEBUGGER_START_FILE@
#If you have purify, and want to use it, uncomment this definition or
# run the make as `make PURIFY=purify'
# or run configure with the --with-purify argument.
@@ -147,8 +152,11 @@ LDFLAGS_FOR_BUILD = $(LDFLAGS)
INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC)
GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \
-Wcast-align -Wstrict-prototypes -Wconversion \
# Maybe add: -Wextra
GCC_LINT_FLAGS = -O -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wno-parentheses \
-Wcast-align -Wstrict-prototypes -Wconversion -Wformat \
-Wformat-nonliteral -Wmissing-braces -Wuninitialized \
-Wmissing-declarations -Winline \
-Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic
GCC_LINT_CFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(GCC_LINT_FLAGS)
@@ -201,7 +209,8 @@ SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \
${SH_LIBSRC}/memset.c ${SH_LIBSRC}/xstrchr.c \
${SH_LIBSRC}/zcatfd.c ${SH_LIBSRC}/shmatch.c \
${SH_LIBSRC}/strnlen.c ${SH_LIBSRC}/winsize.c \
${SH_LIBSRC}/eaccess.c
${SH_LIBSRC}/eaccess.c ${SH_LIBSRC}/wcsdup.c \
${SH_LIBSRC}/zmapfd.c
SHLIB_LIB = -lsh
SHLIB_LIBNAME = libsh.a
@@ -499,7 +508,7 @@ CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \
tests/recho$(EXEEXT) tests/zecho$(EXEEXT) \
tests/printenv$(EXEEXT) mksignames$(EXEEXT) lsignames.h \
mksyntax${EXEEXT} syntax.c $(VERSPROG) $(VERSOBJ) \
buildversion.o mksignames.o signames.o
buildversion.o mksignames.o signames.o buildsignames.o
CREATED_CONFIGURE = config.h config.cache config.status config.log \
stamp-h po/POTFILES
CREATED_MAKEFILES = Makefile builtins/Makefile doc/Makefile \
@@ -611,7 +620,7 @@ ${INTL_LIBRARY}: config.h ${INTL_LIBDIR}/Makefile
@(cd ${INTL_LIBDIR} && \
$(MAKE) $(MFLAGS) all) || exit 1
${LIBINTL_H}: ${INTL_LIBRARY}
${LIBINTL_H}: ${INTL_DEP}
signames.o: $(SUPPORT_SRC)signames.c
$(RM) $@
@@ -666,9 +675,6 @@ ${DEFDIR}/builtext.h: $(BUILTIN_DEFS)
Makefile makefile: config.status $(srcdir)/Makefile.in
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
pathnames.h: config.status $(srcdir)/Makefile.in
CONFIG_HEADERS= $(SHELL) ./config.status
Makefiles makefiles: config.status $(srcdir)/Makefile.in
@for mf in $(CREATED_MAKEFILES); do \
CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \
@@ -682,6 +688,15 @@ stamp-h: config.status $(srcdir)/config.h.in $(srcdir)/config-top.h $(srcdir)/co
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
pathnames.h: Makefile $(srcdir)/pathnames.h.in
@sed -e 's|@DEBUGGER_START_FILE\@|${DEBUGGER_START_FILE}|g' $(srcdir)/pathnames.h.in > pathnames.tmp
@if test -f $@; then \
cmp -s pathnames.tmp $@ || mv pathnames.tmp $@; \
else \
mv pathnames.tmp $@; \
fi
@${RM} pathnames.tmp
# comment out for distribution
$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in
cd $(srcdir) && autoconf
@@ -704,10 +719,10 @@ info dvi ps: force
force:
tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
etags $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
ctags -x $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) > $@
# Targets that actually do things not part of the build
@@ -1387,7 +1402,7 @@ builtins/inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
builtins/jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
builtins/kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
builtins/let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
builtins/mkbuiltins.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
builtins/mkbuiltins.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
builtins/printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
builtins/pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
builtins/read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+35
View File
@@ -1,3 +1,38 @@
This is a terse description of the new features added to bash-3.2 since
the release of bash-3.1. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
1. New Features in Bash
a. Changed the parameter pattern replacement functions to not anchor the
pattern at the beginning of the string if doing global replacement - that
combination doesn't make any sense.
b. When running in `word expansion only' mode (--wordexp option), inhibit
process substitution.
c. Loadable builtins now work on MacOS X 10.[34].
d. Shells running in posix mode no longer set $HOME, as POSIX requires.
e. The code that checks for binary files being executed as shell scripts now
checks only for NUL rather than any non-printing character.
f. Quoting the string argument to the [[ command's =~ operator now forces
string matching, as with the other pattern-matching operators.
2. New Features in Readline
a. Calling applications can now set the keyboard timeout to 0, allowing
poll-like behavior.
b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
the default last-ditch startup file.
c. The history file reading functions now allow windows-like \r\n line
terminators.
-------------------------------------------------------------------------------
This is a terse description of the new features added to bash-3.1 since
the release of bash-3.0. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
+7
View File
@@ -261,6 +261,10 @@ Platform-Specific Configuration and Operation Notes
I have received word that adding -L/etc/lib (or the equivalent
-Wl,-L/etc/lib) might also be necessary, in addition to the -R/etc/lib.
On later versions of Solaris, it may be necessary to add -lnsl before
-ldl; statically-linked versions of bash using libnsl are not guaranteed
to work correctly on future versions of Solaris.
12. Configuring bash to build it in a cross environment. Currently only
two native versions can be compiled this way, cygwin32 and x86 BeOS.
For BeOS, you would configure it like this:
@@ -331,3 +335,6 @@ Platform-Specific Configuration and Operation Notes
17. Do NOT use bison-1.75. It builds a non-working parser. The most
obvious effect is that constructs like "for i; do echo $i; done" don't
loop over the positional parameters.
18. I have received reports that using -O2 with the MIPSpro results in a
binary that fails in strange ways. Using -O1 seems to work.
+17 -17
View File
@@ -3,8 +3,8 @@
Starting Bash with the `--posix' command-line option or executing `set
-o posix' while Bash is running will cause Bash to conform more closely
to the POSIX 1003.2 standard by changing the behavior to match that
specified by POSIX in areas where the Bash default differs.
to the POSIX standard by changing the behavior to match that specified
by POSIX in areas where the Bash default differs.
When invoked as `sh', Bash enters POSIX mode after reading the startup
files.
@@ -29,13 +29,13 @@ The following list is what's changed when `POSIX mode' is in effect:
5. Reserved words appearing in a context where reserved words are
recognized do not undergo alias expansion.
6. The POSIX 1003.2 `PS1' and `PS2' expansions of `!' to the history
number and `!!' to `!' are enabled, and parameter expansion is
performed on the values of `PS1' and `PS2' regardless of the
setting of the `promptvars' option.
6. The POSIX `PS1' and `PS2' expansions of `!' to the history number
and `!!' to `!' are enabled, and parameter expansion is performed
on the values of `PS1' and `PS2' regardless of the setting of the
`promptvars' option.
7. The POSIX 1003.2 startup files are executed (`$ENV') rather than
the normal Bash files.
7. The POSIX startup files are executed (`$ENV') rather than the
normal Bash files.
8. Tilde expansion is only performed on assignments preceding a
command name, rather than on all assignment statements on the line.
@@ -66,12 +66,12 @@ The following list is what's changed when `POSIX mode' is in effect:
may not start with a digit. Declaring a function with an invalid
name causes a fatal syntax error in non-interactive shells.
17. POSIX 1003.2 special builtins are found before shell functions
during command lookup.
17. POSIX special builtins are found before shell functions during
command lookup.
18. If a POSIX 1003.2 special builtin returns an error status, a
18. If a POSIX special builtin returns an error status, a
non-interactive shell exits. The fatal errors are those listed in
the POSIX.2 standard, and include things like passing incorrect
the POSIX standard, and include things like passing incorrect
options, redirection errors, variable assignment errors for
assignments preceding the command name, and so on.
@@ -92,15 +92,15 @@ The following list is what's changed when `POSIX mode' is in effect:
22. Process substitution is not available.
23. Assignment statements preceding POSIX 1003.2 special builtins
persist in the shell environment after the builtin completes.
23. Assignment statements preceding POSIX special builtins persist in
the shell environment after the builtin completes.
24. Assignment statements preceding shell function calls persist in the
shell environment after the function returns, as if a POSIX
special builtin command had been executed.
25. The `export' and `readonly' builtin commands display their output
in the format required by POSIX 1003.2.
in the format required by POSIX.
26. The `trap' builtin displays signal names without the leading `SIG'.
@@ -162,8 +162,8 @@ The following list is what's changed when `POSIX mode' is in effect:
displayed, after escape characters are converted.
There is other POSIX 1003.2 behavior that Bash does not implement by
default even when in POSIX mode. Specifically:
There is other POSIX behavior that Bash does not implement by default
even when in POSIX mode. Specifically:
1. The `fc' builtin checks `$EDITOR' as a program to edit history
entries if `FCEDIT' is unset, rather than defaulting directly to
+5 -5
View File
@@ -1,7 +1,7 @@
Introduction
============
This is GNU Bash, version 3.1. Bash is the GNU Project's Bourne
This is GNU Bash, version 3.2. Bash is the GNU Project's Bourne
Again SHell, a complete implementation of the POSIX.2 shell spec,
but also with interactive command line editing, job control on
architectures that support it, csh-like features such as history
@@ -15,9 +15,9 @@ See the file POSIX for a discussion of how the Bash defaults differ
from the POSIX.2 spec and a description of the Bash `posix mode'.
There are some user-visible incompatibilities between this version
of Bash and a previous widely-distributed version, bash-1.14.
For details, see the file COMPAT. The NEWS file tersely lists
features that are new in this release.
of Bash and previous widely-distributed versions, bash-1.14 and
bash-2.05b. For details, see the file COMPAT. The NEWS file tersely
lists features that are new in this release.
Bash is free software, distributed under the terms of the [GNU]
General Public License, version 2. For more information, see the
@@ -87,4 +87,4 @@ like this shell to be the best that we can make it.
Enjoy!
Chet Ramey
chet@po.cwru.edu
chet.ramey@case.edu
Vendored
+62 -25
View File
@@ -215,7 +215,7 @@ AC_CACHE_VAL(bash_cv_sys_siglist,
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifndef SYS_SIGLIST_DECLARED
#if !HAVE_DECL_SYS_SIGLIST
extern char *sys_siglist[];
#endif
main()
@@ -685,7 +685,7 @@ fi
])
AC_DEFUN(BASH_FUNC_GETCWD,
[AC_MSG_CHECKING([if getcwd() will dynamically allocate memory])
[AC_MSG_CHECKING([if getcwd() will dynamically allocate memory with 0 size])
AC_CACHE_VAL(bash_cv_getcwd_malloc,
[AC_TRY_RUN([
#include <stdio.h>
@@ -1540,20 +1540,22 @@ fi
AC_DEFUN(BASH_CHECK_DEV_FD,
[AC_MSG_CHECKING(whether /dev/fd is available)
AC_CACHE_VAL(bash_cv_dev_fd,
[if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then
[bash_cv_dev_fd=""
if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
exec 3<&0
if test -r /dev/fd/3; then
if (exec test -r /dev/fd/3 3</dev/null) ; then
bash_cv_dev_fd=standard
else
bash_cv_dev_fd=absent
fi
exec 3<&-
elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then
bash_cv_dev_fd=whacky
else
bash_cv_dev_fd=absent
fi
fi
if test -z "$bash_cv_dev_fd" ; then
if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
bash_cv_dev_fd=whacky
else
bash_cv_dev_fd=absent
fi
fi
])
AC_MSG_RESULT($bash_cv_dev_fd)
if test $bash_cv_dev_fd = "standard"; then
@@ -1568,9 +1570,9 @@ fi
AC_DEFUN(BASH_CHECK_DEV_STDIN,
[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
AC_CACHE_VAL(bash_cv_dev_stdin,
[if test -d /dev/fd && test -r /dev/stdin < /dev/null; then
[if test -d /dev/fd && (exec test -r /dev/stdin < /dev/null) ; then
bash_cv_dev_stdin=present
elif test -d /proc/self/fd && test -r /dev/stdin < /dev/null; then
elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; then
bash_cv_dev_stdin=present
else
bash_cv_dev_stdin=absent
@@ -1676,24 +1678,22 @@ AC_CHECK_HEADERS(wchar.h)
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC))
AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN))
AC_CHECK_FUNC(wctomb, AC_DEFINE(HAVE_WCTOMB))
AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB))
AC_CHECK_FUNC(wcscoll, AC_DEFINE(HAVE_WCSCOLL))
AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP))
AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
AC_CHECK_FUNC(wctype, AC_DEFINE(HAVE_WCTYPE))
AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
[AC_TRY_COMPILE([
#include <wchar.h>], [
mbstate_t ps;
mbstate_t *psp;
psp = (mbstate_t *)0;
], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
if test $bash_cv_have_mbstate_t = yes; then
dnl checks for both mbrtowc and mbstate_t
AC_FUNC_MBRTOWC
if test $ac_cv_func_mbrtowc = yes; then
AC_DEFINE(HAVE_MBSTATE_T)
fi
AC_CHECK_FUNCS(iswlower iswupper towlower towupper iswctype)
AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset,
[AC_TRY_LINK(
[#include <langinfo.h>],
@@ -1703,6 +1703,43 @@ if test $bash_cv_langinfo_codeset = yes; then
AC_DEFINE(HAVE_LANGINFO_CODESET)
fi
dnl check for wchar_t in <wchar.h>
AC_CACHE_CHECK([for wchar_t in wchar.h], bash_cv_type_wchar_t,
[AC_TRY_COMPILE(
[#include <wchar.h>
],
[
wchar_t foo;
foo = 0;
], bash_cv_type_wchar_t=yes, bash_cv_type_wchar_t=no)])
if test $bash_cv_type_wchar_t = yes; then
AC_DEFINE(HAVE_WCHAR_T, 1, [systems should define this type here])
fi
dnl check for wctype_t in <wctype.h>
AC_CACHE_CHECK([for wctype_t in wctype.h], bash_cv_type_wctype_t,
[AC_TRY_COMPILE(
[#include <wctype.h>],
[
wctype_t foo;
foo = 0;
], bash_cv_type_wctype_t=yes, bash_cv_type_wctype_t=no)])
if test $bash_cv_type_wctype_t = yes; then
AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here])
fi
dnl check for wint_t in <wctype.h>
AC_CACHE_CHECK([for wint_t in wctype.h], bash_cv_type_wint_t,
[AC_TRY_COMPILE(
[#include <wctype.h>],
[
wint_t foo;
foo = 0;
], bash_cv_type_wint_t=yes, bash_cv_type_wint_t=no)])
if test $bash_cv_type_wint_t = yes; then
AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])
fi
])
dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
@@ -2327,7 +2364,7 @@ AC_DEFUN([AM_INTL_SUBDIR],
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h])
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
geteuid getgid getuid mempcpy munmap putenv setenv setlocale localeconv stpcpy \
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
__fsetlocking])
+34 -6
View File
@@ -120,7 +120,6 @@ ARRAY *a;
return(a1);
}
#ifdef INCLUDE_UNUSED
/*
* Make and return a new array composed of the elements in array A from
* S to E, inclusive.
@@ -141,13 +140,12 @@ ARRAY_ELEMENT *s, *e;
for (p = s, i = 0; p != e; p = element_forw(p), i++) {
n = array_create_element (element_index(p), element_value(p));
ADD_BEFORE(a->head, n);
mi = element_index(ae);
mi = element_index(n);
}
a->num_elements = i;
a->max_index = mi;
return a;
}
#endif
/*
* Walk the array, calling FUNC once for each element, with the array
@@ -300,6 +298,23 @@ ARRAY *array;
return array;
}
ARRAY *
array_quote_escapes(array)
ARRAY *array;
{
ARRAY_ELEMENT *a;
char *t;
if (array == 0 || array_head(array) == 0 || array_empty(array))
return (ARRAY *)NULL;
for (a = element_forw(array->head); a != array->head; a = element_forw(a)) {
t = quote_escapes (a->value);
FREE(a->value);
a->value = t;
}
return array;
}
/*
* Return a string whose elements are the members of array A beginning at
* index START and spanning NELEM members. Null elements are counted.
@@ -311,9 +326,10 @@ ARRAY *a;
arrayind_t start, nelem;
int starsub, quoted;
{
ARRAY *a2;
ARRAY_ELEMENT *h, *p;
arrayind_t i;
char *ifs, sep[2];
char *ifs, sep[2], *t;
p = a ? array_head (a) : 0;
if (p == 0 || array_empty (a) || start > array_max_index(a))
@@ -336,6 +352,13 @@ int starsub, quoted;
for (i = 0, h = p; p != a->head && i < nelem; i++, p = element_forw(p))
;
a2 = array_slice(a, h, p);
if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
array_quote(a2);
else
array_quote_escapes(a2);
if (starsub && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) {
ifs = getifs();
sep[0] = ifs ? *ifs : '\0';
@@ -343,7 +366,10 @@ int starsub, quoted;
sep[0] = ' ';
sep[1] = '\0';
return (array_to_string_internal (h, p, sep, quoted));
t = array_to_string (a2, sep, 0);
array_dispose(a2);
return t;
}
char *
@@ -367,7 +393,9 @@ int mflags;
}
if (mflags & MATCH_QUOTED)
array_quote (a2);
array_quote(a2);
else
array_quote_escapes(a2);
if (mflags & MATCH_STARSUB) {
ifs = getifs();
sifs[0] = ifs ? *ifs : '\0';
+1
View File
@@ -55,6 +55,7 @@ extern int array_rshift __P((ARRAY *, int, char *));
extern ARRAY_ELEMENT *array_unshift_element __P((ARRAY *));
extern int array_shift_element __P((ARRAY *, char *));
extern ARRAY *array_quote __P((ARRAY *));
extern ARRAY *array_quote_escapes __P((ARRAY *));
extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int, int));
extern char *array_patsub __P((ARRAY *, char *, char *, int));
+47 -27
View File
@@ -1,6 +1,6 @@
/* arrayfunc.c -- High-level array functions used by other parts of the shell. */
/* Copyright (C) 2001-2005 Free Software Foundation, Inc.
/* Copyright (C) 2001-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -45,7 +45,7 @@ static void quote_array_assignment_chars __P((WORD_LIST *));
static char *array_value_internal __P((char *, int, int, int *));
/* Standard error message to use when encountering an invalid array subscript */
char *bash_badsub_errmsg = N_("bad array subscript");
const char * const bash_badsub_errmsg = N_("bad array subscript");
/* **************************************************************** */
/* */
@@ -265,32 +265,22 @@ assign_array_var_from_word_list (var, list, flags)
return var;
}
/* Perform a compound array assignment: VAR->name=( VALUE ). The
VALUE has already had the parentheses stripped. */
SHELL_VAR *
assign_array_var_from_string (var, value, flags)
SHELL_VAR *var;
WORD_LIST *
expand_compound_array_assignment (value, flags)
char *value;
int flags;
{
ARRAY *a;
WORD_LIST *list, *nlist;
char *w, *val, *nval;
int ni, len;
arrayind_t ind, last_ind;
char *val;
int ni;
if (value == 0)
return var;
/* If this is called from declare_builtin, value[0] == '(' and
xstrchr(value, ')') != 0. In this case, we need to extract
the value from between the parens before going on. */
/* I don't believe this condition is ever true any more. */
if (*value == '(') /*)*/
{
ni = 1;
val = extract_array_assignment_list (value, &ni);
if (val == 0)
return var;
return (WORD_LIST *)NULL;
}
else
val = value;
@@ -315,6 +305,21 @@ assign_array_var_from_string (var, value, flags)
if (val != value)
free (val);
return nlist;
}
void
assign_compound_array_list (var, nlist, flags)
SHELL_VAR *var;
WORD_LIST *nlist;
int flags;
{
ARRAY *a;
WORD_LIST *list;
char *w, *val, *nval;
int len, iflags;
arrayind_t ind, last_ind;
a = array_cell (var);
/* Now that we are ready to assign values to the array, kill the existing
@@ -325,6 +330,7 @@ assign_array_var_from_string (var, value, flags)
for (list = nlist; list; list = list->next)
{
iflags = flags;
w = list->word->word;
/* We have a word of the form [ind]=value */
@@ -332,12 +338,8 @@ assign_array_var_from_string (var, value, flags)
{
len = skipsubscript (w, 0);
#if 1
/* XXX - changes for `+=' */
if (w[len] != ']' || (w[len+1] != '=' && (w[len+1] != '+' || w[len+2] != '=')))
#else
if (w[len] != ']' || w[len+1] != '=')
#endif
{
nval = make_variable_value (var, w, flags);
if (var->assign_func)
@@ -368,10 +370,10 @@ assign_array_var_from_string (var, value, flags)
continue;
}
last_ind = ind;
/* XXX - changes for `+=' */
/* XXX - changes for `+=' -- just accept the syntax. ksh93 doesn't do this */
if (w[len + 1] == '+' && w[len + 2] == '=')
{
flags |= ASS_APPEND;
iflags |= ASS_APPEND;
val = w + len + 3;
}
else
@@ -385,11 +387,29 @@ assign_array_var_from_string (var, value, flags)
if (integer_p (var))
this_command_name = (char *)NULL; /* no command name for errors */
bind_array_var_internal (var, ind, val, flags);
bind_array_var_internal (var, ind, val, iflags);
last_ind++;
}
}
dispose_words (nlist);
/* Perform a compound array assignment: VAR->name=( VALUE ). The
VALUE has already had the parentheses stripped. */
SHELL_VAR *
assign_array_var_from_string (var, value, flags)
SHELL_VAR *var;
char *value;
int flags;
{
WORD_LIST *nlist;
if (value == 0)
return var;
nlist = expand_compound_array_assignment (value, flags);
assign_compound_array_list (var, nlist, flags);
if (nlist)
dispose_words (nlist);
return (var);
}
@@ -590,7 +610,7 @@ array_expand_index (s, len)
exp = (char *)xmalloc (len);
strncpy (exp, s, len - 1);
exp[len - 1] = '\0';
t = expand_arith_string (exp);
t = expand_arith_string (exp, 0);
this_command_name = (char *)NULL;
val = evalexp (t, &expok);
free (t);
+3
View File
@@ -34,6 +34,9 @@ extern SHELL_VAR *find_or_make_array_variable __P((char *, int));
extern SHELL_VAR *assign_array_from_string __P((char *, char *, int));
extern SHELL_VAR *assign_array_var_from_word_list __P((SHELL_VAR *, WORD_LIST *, int));
extern WORD_LIST *expand_compound_array_assignment __P((char *, int));
extern void assign_compound_array_list __P((SHELL_VAR *, WORD_LIST *, int));
extern SHELL_VAR *assign_array_var_from_string __P((SHELL_VAR *, char *, int));
extern int unbind_array_element __P((SHELL_VAR *, char *));
+563 -148
View File
@@ -1,7 +1,7 @@
@%:@! /bin/sh
@%:@ From configure.in for Bash 3.1, version 3.183.
@%:@ From configure.in for Bash 3.2, version 3.192.
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.53 for bash 3.1-release.
@%:@ Generated by GNU Autoconf 2.53 for bash 3.2-maint.
@%:@
@%:@ Report bugs to <bug-bash@gnu.org>.
@%:@
@@ -257,8 +257,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
PACKAGE_VERSION='3.1-release'
PACKAGE_STRING='bash 3.1-release'
PACKAGE_VERSION='3.2-maint'
PACKAGE_STRING='bash 3.2-maint'
PACKAGE_BUGREPORT='bug-bash@gnu.org'
ac_unique_file="shell.h"
@@ -767,7 +767,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures bash 3.1-release to adapt to many kinds of systems.
\`configure' configures bash 3.2-maint to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -828,7 +828,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of bash 3.1-release:";;
short | recursive ) echo "Configuration of bash 3.2-maint:";;
esac
cat <<\_ACEOF
@@ -988,7 +988,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
bash configure 3.1-release
bash configure 3.2-maint
generated by GNU Autoconf 2.53
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
@@ -1003,7 +1003,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by bash $as_me 3.1-release, which was
It was created by bash $as_me 3.2-maint, which was
generated by GNU Autoconf 2.53. Invocation command line was
$ $0 $@
@@ -1313,11 +1313,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ac_config_headers="$ac_config_headers config.h"
BASHVERS=3.1
RELSTATUS=release
BASHVERS=3.2
RELSTATUS=maint
case "$RELSTATUS" in
alp*|bet*|dev*|rc*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
*) DEBUG= MALLOC_DEBUG= ;;
esac
@@ -1585,7 +1585,7 @@ if test "$opt_curses" = yes; then
fi
if test -z "${DEBUGGER_START_FILE}"; then
DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc
DEBUGGER_START_FILE=${ac_default_prefix}/share/bashdb/bashdb-main.inc
fi
opt_minimal_config=no
@@ -3647,22 +3647,22 @@ fi
SIGNAMES_O=
SIGNAMES_H=lsignames.h
CROSS_COMPILE=
if test "x$cross_compiling" = "xyes"; then
case "${host}" in
*-cygwin*)
cross_cache=${srcdir}/cross-build/cygwin32.cache
SIGNAMES_H='$(srcdir)/cross-build/win32sig.h'
;;
*-mingw*)
cross_cache=${srcdir}/cross-build/cygwin32.cache
;;
i[3456]86-*-beos*)
cross_cache=${srcdir}/cross-build/x86-beos.cache
SIGNAMES_H='${srcdir}/cross-build/beos-sig.h'
;;
*) echo "configure: cross-compiling for $host is not supported" >&2
;;
@@ -3672,11 +3672,13 @@ if test "x$cross_compiling" = "xyes"; then
. ${cross_cache}
fi
unset cross_cache
SIGNAMES_O='signames.o'
CROSS_COMPILE='-DCROSS_COMPILING'
fi
if test -z "$CC_FOR_BUILD"; then
if test "x$cross_compiling" = "xno"; then
CC_FOR_BUILD='$(CC)'
@@ -7521,10 +7523,11 @@ done
for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
geteuid getgid getuid mempcpy munmap putenv setenv setlocale localeconv stpcpy \
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
__fsetlocking
do
@@ -10565,6 +10568,77 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking for isnan" >&5
echo $ECHO_N "checking for isnan... $ECHO_C" >&6
if test "${ac_cv_func_isnan+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char isnan (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char isnan ();
char (*f) ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_isnan) || defined (__stub___isnan)
choke me
#else
f = isnan;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_isnan=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_isnan=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_isnan" >&5
echo "${ECHO_T}$ac_cv_func_isnan" >&6
if test $ac_cv_func_isnan = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_ISNAN_IN_LIBC 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for mkfifo" >&5
echo $ECHO_N "checking for mkfifo... $ECHO_C" >&6
@@ -10664,10 +10738,11 @@ fi
for ac_func in dup2 fcntl getdtablesize getgroups gethostname getpagesize \
getpeername getrlimit getrusage gettimeofday kill killpg \
lstat readlink sbrk select setdtablesize tcgetpgrp uname \
ulimit waitpid
for ac_func in dup2 eaccess fcntl getdtablesize getgroups gethostname \
getpagesize getpeername getrlimit getrusage gettimeofday \
kill killpg lstat readlink sbrk select setdtablesize \
tcgetpgrp uname ulimit waitpid
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -11531,6 +11606,70 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking whether setregid is declared" >&5
echo $ECHO_N "checking whether setregid is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_setregid+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
$ac_includes_default
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
#ifndef setregid
char *p = (char *) setregid;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_setregid=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_decl_setregid=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_setregid" >&5
echo "${ECHO_T}$ac_cv_have_decl_setregid" >&6
if test $ac_cv_have_decl_setregid = yes; then
cat >>confdefs.h <<_ACEOF
@%:@define HAVE_DECL_SETREGID 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
@%:@define HAVE_DECL_SETREGID 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether strcpy is declared" >&5
echo $ECHO_N "checking whether strcpy is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_strcpy+set}" = set; then
@@ -13561,77 +13700,6 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking for mbrtowc" >&5
echo $ECHO_N "checking for mbrtowc... $ECHO_C" >&6
if test "${ac_cv_func_mbrtowc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char mbrtowc (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mbrtowc ();
char (*f) ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_mbrtowc) || defined (__stub___mbrtowc)
choke me
#else
f = mbrtowc;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_mbrtowc=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_mbrtowc=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5
echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6
if test $ac_cv_func_mbrtowc = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_MBRTOWC 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for mbrlen" >&5
echo $ECHO_N "checking for mbrlen... $ECHO_C" >&6
if test "${ac_cv_func_mbrlen+set}" = set; then
@@ -13703,16 +13771,17 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking for wctomb" >&5
echo $ECHO_N "checking for wctomb... $ECHO_C" >&6
if test "${ac_cv_func_wctomb+set}" = set; then
echo "$as_me:$LINENO: checking for wcrtomb" >&5
echo $ECHO_N "checking for wcrtomb... $ECHO_C" >&6
if test "${ac_cv_func_wcrtomb+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wctomb (); below. */
which can conflict with char wcrtomb (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -13720,7 +13789,7 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char wctomb ();
char wcrtomb ();
char (*f) ();
#ifdef F77_DUMMY_MAIN
@@ -13735,10 +13804,10 @@ main ()
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_wctomb) || defined (__stub___wctomb)
#if defined (__stub_wcrtomb) || defined (__stub___wcrtomb)
choke me
#else
f = wctomb;
f = wcrtomb;
#endif
;
@@ -13757,33 +13826,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_wctomb=yes
ac_cv_func_wcrtomb=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_wctomb=no
ac_cv_func_wcrtomb=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_wctomb" >&5
echo "${ECHO_T}$ac_cv_func_wctomb" >&6
if test $ac_cv_func_wctomb = yes; then
echo "$as_me:$LINENO: result: $ac_cv_func_wcrtomb" >&5
echo "${ECHO_T}$ac_cv_func_wcrtomb" >&6
if test $ac_cv_func_wcrtomb = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_WCTOMB 1
@%:@define HAVE_WCRTOMB 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for wcwidth" >&5
echo $ECHO_N "checking for wcwidth... $ECHO_C" >&6
if test "${ac_cv_func_wcwidth+set}" = set; then
echo "$as_me:$LINENO: checking for wcscoll" >&5
echo $ECHO_N "checking for wcscoll... $ECHO_C" >&6
if test "${ac_cv_func_wcscoll+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wcwidth (); below. */
which can conflict with char wcscoll (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -13791,7 +13860,7 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char wcwidth ();
char wcscoll ();
char (*f) ();
#ifdef F77_DUMMY_MAIN
@@ -13806,10 +13875,10 @@ main ()
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_wcwidth) || defined (__stub___wcwidth)
#if defined (__stub_wcscoll) || defined (__stub___wcscoll)
choke me
#else
f = wcwidth;
f = wcscoll;
#endif
;
@@ -13828,19 +13897,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_wcwidth=yes
ac_cv_func_wcscoll=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_wcwidth=no
ac_cv_func_wcscoll=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_wcwidth" >&5
echo "${ECHO_T}$ac_cv_func_wcwidth" >&6
if test $ac_cv_func_wcwidth = yes; then
echo "$as_me:$LINENO: result: $ac_cv_func_wcscoll" >&5
echo "${ECHO_T}$ac_cv_func_wcscoll" >&6
if test $ac_cv_func_wcscoll = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_WCWIDTH 1
@%:@define HAVE_WCSCOLL 1
_ACEOF
fi
@@ -13916,17 +13985,26 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking for mbstate_t" >&5
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
if test "${bash_cv_have_mbstate_t+set}" = set; then
echo "$as_me:$LINENO: checking for wcwidth" >&5
echo $ECHO_N "checking for wcwidth... $ECHO_C" >&6
if test "${ac_cv_func_wcwidth+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wcwidth (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char wcwidth ();
char (*f) ();
#include <wchar.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
@@ -13936,44 +14014,209 @@ else
int
main ()
{
mbstate_t ps;
mbstate_t *psp;
psp = (mbstate_t *)0;
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_wcwidth) || defined (__stub___wcwidth)
choke me
#else
f = wcwidth;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_have_mbstate_t=yes
ac_cv_func_wcwidth=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
bash_cv_have_mbstate_t=no
ac_cv_func_wcwidth=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_have_mbstate_t" >&5
echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6
if test $bash_cv_have_mbstate_t = yes; then
echo "$as_me:$LINENO: result: $ac_cv_func_wcwidth" >&5
echo "${ECHO_T}$ac_cv_func_wcwidth" >&6
if test $ac_cv_func_wcwidth = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_WCWIDTH 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for wctype" >&5
echo $ECHO_N "checking for wctype... $ECHO_C" >&6
if test "${ac_cv_func_wctype+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wctype (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char wctype ();
char (*f) ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_wctype) || defined (__stub___wctype)
choke me
#else
f = wctype;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_wctype=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_wctype=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
echo "${ECHO_T}$ac_cv_func_wctype" >&6
if test $ac_cv_func_wctype = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_WCTYPE 1
_ACEOF
fi
AC_FUNC_MBRTOWC
if test $ac_cv_func_mbrtowc = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_MBSTATE_T 1
_ACEOF
fi
for ac_func in iswlower iswupper towlower towupper iswctype
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
char (*f) ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
if test "${bash_cv_langinfo_codeset+set}" = set; then
@@ -14026,6 +14269,175 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking for wchar_t in wchar.h" >&5
echo $ECHO_N "checking for wchar_t in wchar.h... $ECHO_C" >&6
if test "${bash_cv_type_wchar_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#include <wchar.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
wchar_t foo;
foo = 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_type_wchar_t=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
bash_cv_type_wchar_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_type_wchar_t" >&5
echo "${ECHO_T}$bash_cv_type_wchar_t" >&6
if test $bash_cv_type_wchar_t = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_WCHAR_T 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for wctype_t in wctype.h" >&5
echo $ECHO_N "checking for wctype_t in wctype.h... $ECHO_C" >&6
if test "${bash_cv_type_wctype_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#include <wctype.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
wctype_t foo;
foo = 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_type_wctype_t=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
bash_cv_type_wctype_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_type_wctype_t" >&5
echo "${ECHO_T}$bash_cv_type_wctype_t" >&6
if test $bash_cv_type_wctype_t = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_WCTYPE_T 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for wint_t in wctype.h" >&5
echo $ECHO_N "checking for wint_t in wctype.h... $ECHO_C" >&6
if test "${bash_cv_type_wint_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#include <wctype.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
wint_t foo;
foo = 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_type_wint_t=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
bash_cv_type_wint_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_type_wint_t" >&5
echo "${ECHO_T}$bash_cv_type_wint_t" >&6
if test $bash_cv_type_wint_t = yes; then
cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_WINT_T 1
_ACEOF
fi
if test "$opt_static_link" != yes; then
@@ -23095,20 +23507,22 @@ echo $ECHO_N "checking whether /dev/fd is available... $ECHO_C" >&6
if test "${bash_cv_dev_fd+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then
bash_cv_dev_fd=""
if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
exec 3<&0
if test -r /dev/fd/3; then
if (exec test -r /dev/fd/3 3</dev/null) ; then
bash_cv_dev_fd=standard
else
bash_cv_dev_fd=absent
fi
exec 3<&-
elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then
bash_cv_dev_fd=whacky
else
bash_cv_dev_fd=absent
fi
fi
if test -z "$bash_cv_dev_fd" ; then
if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
bash_cv_dev_fd=whacky
else
bash_cv_dev_fd=absent
fi
fi
fi
@@ -23139,9 +23553,9 @@ echo $ECHO_N "checking whether /dev/stdin stdout stderr are available... $ECHO_C
if test "${bash_cv_dev_stdin+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -d /dev/fd && test -r /dev/stdin < /dev/null; then
if test -d /dev/fd && (exec test -r /dev/stdin < /dev/null) ; then
bash_cv_dev_stdin=present
elif test -d /proc/self/fd && test -r /dev/stdin < /dev/null; then
elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; then
bash_cv_dev_stdin=present
else
bash_cv_dev_stdin=absent
@@ -23670,7 +24084,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by bash $as_me 3.1-release, which was
This file was extended by bash $as_me 3.2-maint, which was
generated by GNU Autoconf 2.53. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23732,7 +24146,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
bash config.status 3.1-release
bash config.status 3.2-maint
configured by $0, generated by GNU Autoconf 2.53,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -23966,6 +24380,7 @@ s,@OBJEXT@,$OBJEXT,;t t
s,@CPP@,$CPP,;t t
s,@CROSS_COMPILE@,$CROSS_COMPILE,;t t
s,@SIGNAMES_H@,$SIGNAMES_H,;t t
s,@SIGNAMES_O@,$SIGNAMES_O,;t t
s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
s,@STATIC_LD@,$STATIC_LD,;t t
s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t
+3 -3
View File
@@ -5,7 +5,7 @@
@request = (
bless( [
'0',
1,
0,
[
'/usr/share/autoconf'
],
@@ -79,12 +79,12 @@
'AC_FUNC_GETLOADAVG' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_FSEEKO' => 1,
'AM_CONDITIONAL' => 1,
'AC_FUNC_MKTIME' => 1,
'AM_CONDITIONAL' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_PROG_LN_S' => 1,
'AC_FUNC_MEMCMP' => 1,
'm4_include' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_CHECK_FUNCS' => 1
File diff suppressed because it is too large Load Diff
+11534 -7118
View File
File diff suppressed because it is too large Load Diff
+26 -12
View File
@@ -15,7 +15,10 @@
'configure.in'
],
{
'AM_PROG_F77_C_O' => 1,
'_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_C_VOLATILE' => 1,
'AC_TYPE_OFF_T' => 1,
@@ -23,15 +26,16 @@
'AC_REPLACE_FNMATCH' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_STAT' => 1,
'AC_HEADER_TIME' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_HEADER_TIME' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_STRUCT_TM' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRTOD' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_FUNC_STRNLEN' => 1,
'm4_sinclude' => 1,
'AC_PROG_CXX' => 1,
@@ -41,52 +45,61 @@
'_m4_warn' => 1,
'AC_HEADER_STDC' => 1,
'AC_HEADER_MAJOR' => 1,
'AM_PROG_CXX_C_O' => 1,
'LT_INIT' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_LIBSOURCE' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_CANONICAL_BUILD' => 1,
'AM_PROG_FC_C_O' => 1,
'AC_TYPE_UID_T' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_PROG_MAKE_SET' => 1,
'sinclude' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'm4_pattern_allow' => 1,
'sinclude' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_PROG_CC' => 1,
'AC_FUNC_FORK' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_FUNC_FORK' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_PROG_YACC' => 1,
'AC_SUBST_TRACE' => 1,
'AC_INIT' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_SUBST' => 1,
'AC_FUNC_ALLOCA' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_FC_SRCEXT' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_PROG_RANLIB' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_FUNC_SETPGRP' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_FUNC_MMAP' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_CHECK_TYPES' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'LT_SUPPORTED_TAG' => 1,
'AC_CHECK_MEMBERS' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_HEADER_STAT' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_PROG_CPP' => 1,
'AC_C_INLINE' => 1,
'AC_TYPE_PID_T' => 1,
'AC_PROG_LEX' => 1,
'AC_C_CONST' => 1,
'AC_TYPE_PID_T' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
@@ -97,6 +110,7 @@
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AC_FC_FREEFORM' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_FSEEKO' => 1,
'AM_PROG_CC_C_O' => 1,
@@ -105,8 +119,8 @@
'AM_CONDITIONAL' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_PROG_LN_S' => 1,
'AC_FUNC_MEMCMP' => 1,
'm4_include' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_CHECK_FUNCS' => 1
+1863 -1172
View File
File diff suppressed because it is too large Load Diff
+29 -5
View File
@@ -1,6 +1,6 @@
/* bashline.c -- Bash's interface to the readline library. */
/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
/* Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -1236,7 +1236,7 @@ command_word_completion_function (hint_text, state)
static char *filename_hint = (char *)NULL;
static char *dequoted_hint = (char *)NULL;
static int path_index, hint_len, dequoted_len, istate, igncase;
static int mapping_over, local_index;
static int mapping_over, local_index, searching_path, hint_is_dir;
static SHELL_VAR **varlist = (SHELL_VAR **)NULL;
#if defined (ALIAS)
static alias_t **alias_list = (alias_t **)NULL;
@@ -1252,7 +1252,8 @@ command_word_completion_function (hint_text, state)
if (hint)
free (hint);
mapping_over = 0;
mapping_over = searching_path = 0;
hint_is_dir = CMD_IS_DIR (hint_text);
val = (char *)NULL;
temp = rl_variable_value ("completion-ignore-case");
@@ -1391,6 +1392,16 @@ command_word_completion_function (hint_text, state)
mapping_over++;
}
/* If the text passed is a directory in the current directory, return it
as a possible match. Executables in directories in the current
directory can be specified using relative pathnames and successfully
executed even when `.' is not in $PATH. */
if (hint_is_dir)
{
hint_is_dir = 0; /* only return the hint text once */
return (savestring (hint_text));
}
/* Repeatedly call filename_completion_function while we have
members of PATH left. Question: should we stat each file?
Answer: we call executable_file () on each file. */
@@ -1408,6 +1419,7 @@ command_word_completion_function (hint_text, state)
(current_path = extract_colon_unit (path, &path_index)) == 0)
return ((char *)NULL);
searching_path = 1;
if (*current_path == 0)
{
free (current_path);
@@ -1449,7 +1461,9 @@ command_word_completion_function (hint_text, state)
else
{
int match, freetemp;
char *temp;
#if 0
char *temp; /* shadows previous declaration */
#endif
if (absolute_program (hint))
{
@@ -1501,9 +1515,18 @@ command_word_completion_function (hint_text, state)
freetemp = match = 0;
}
#if 0
/* If we have found a match, and it is an executable file or a
directory name, return it. */
if (match && executable_or_directory (val))
#else
/* If we have found a match, and it is an executable file, return it.
We don't return directory names when searching $PATH, since the
bash execution code won't find executables in directories which
appear in directories in $PATH when they're specified using
relative pathnames. */
if (match && (searching_path ? executable_file (val) : executable_or_directory (val)))
#endif
{
free (val);
val = ""; /* So it won't be NULL. */
@@ -1739,8 +1762,9 @@ bash_servicename_completion_function (text, state)
if (snamelen == 0 || (STREQN (sname, srvent->s_name, snamelen)))
break;
/* Not primary, check aliases */
for (alist = srvent->s_aliases; aentry = *alist; alist++)
for (alist = srvent->s_aliases; *alist; alist++)
{
aentry = *alist;
if (STREQN (sname, aentry, snamelen))
{
afound = 1;
+13 -1
View File
@@ -55,7 +55,7 @@
*/
/* The character which is used to separate arguments. */
int brace_arg_separator = ',';
static const int brace_arg_separator = ',';
#if defined (__P)
static int brace_gobbler __P((char *, size_t, int *, int));
@@ -71,6 +71,18 @@ static char **mkseq();
static char **array_concat ();
#endif
#if 0
static void
dump_result (a)
char **a;
{
int i;
for (i = 0; a[i]; i++)
printf ("dump_result: a[%d] = -%s-\n", i, a[i]);
}
#endif
/* Return an array of strings; the brace expansion of TEXT. */
char **
brace_expand (text)
+13 -2
View File
@@ -39,9 +39,12 @@ prefix = @prefix@
srcdir = @srcdir@
VPATH = .:@srcdir@
topdir = @top_srcdir@
datarootdir = @datarootdir@
includedir = @includedir@
datadir = @datadir@
localedir = $(datadir)/locale
localedir = @localedir@
# Support an alternate destination root directory for package building
DESTDIR =
@@ -74,7 +77,10 @@ RL_INCLUDEDIR = @RL_INCLUDEDIR@
INTL_LIBSRC = ${topdir}/lib/intl
INTL_BUILDDIR = ${LIBBUILD}/intl
INTL_LIBDIR = ${INTL_BUILDDIR}
INTL_LIBRARY = ${INTL_BUILDDIR}/libintl.a
INTL_INC = @INTL_INC@
INTL_DEP = @INTL_DEP@
LIBINTL_H = @LIBINTL_H@
HELPDIR = @HELPDIR@
@@ -236,6 +242,11 @@ $(OFILES): $(MKBUILTINS) ../config.h
po: builtins.c
xgettext -L C -o $(topdir)/po/builtins.pot --keyword='N_' builtins.c 2>/dev/null
${LIBINTL_H}:
@echo making $@ in ${INTL_BUILDDIR}
@(cd ${INTL_BUILDDIR} && \
$(MAKE) $(MFLAGS) libintl.h) || exit 1
# dependencies
alias.o: alias.def
@@ -609,7 +620,7 @@ inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
mkbuiltins.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
mkbuiltins.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+13 -13
View File
@@ -1,7 +1,7 @@
This file is bind.def, from which is created bind.c.
It implements the builtin "bind" in Bash.
Copyright (C) 1987-2003 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -29,10 +29,10 @@ $FUNCTION bind_builtin
$SHORT_DOC bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]
Bind a key sequence to a Readline function or a macro, or set
a Readline variable. The non-option argument syntax is equivalent
to that found in ~/.inputrc, but must be passed as a single argument:
to that found in ~/.inputrc, but must be passed as a single argument: e.g.,
bind '"\C-x\C-r": re-read-init-file'.
bind accepts the following options:
-m keymap Use `keymap' as the keymap for the duration of this
-m keymap Use KEYMAP as the keymap for the duration of this
command. Acceptable keymap names are emacs,
emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,
vi-command, and vi-insert.
@@ -40,18 +40,18 @@ bind accepts the following options:
-P List function names and bindings.
-p List functions and bindings in a form that can be
reused as input.
-r keyseq Remove the binding for KEYSEQ.
-x keyseq:shell-command Cause SHELL-COMMAND to be executed when
KEYSEQ is entered.
-f filename Read key bindings from FILENAME.
-q function-name Query about which keys invoke the named function.
-u function-name Unbind all keys which are bound to the named function.
-V List variable names and values
-v List variable names and values in a form that can
be reused as input.
-S List key sequences that invoke macros and their values
-s List key sequences that invoke macros and their values
in a form that can be reused as input.
-V List variable names and values
-v List variable names and values in a form that can
be reused as input.
-q function-name Query about which keys invoke the named function.
-u function-name Unbind all keys which are bound to the named function.
-r keyseq Remove the binding for KEYSEQ.
-f filename Read key bindings from FILENAME.
-x keyseq:shell-command Cause SHELL-COMMAND to be executed when
KEYSEQ is entered.
$END
#if defined (READLINE)
@@ -310,7 +310,7 @@ unbind_command (name)
function = rl_named_function (name);
if (function == 0)
{
builtin_error ("`%s': unknown function name", name);
builtin_error (_("`%s': unknown function name"), name);
return EXECUTION_FAILURE;
}
+3 -3
View File
@@ -1,7 +1,7 @@
This file is break.def, from which is created break.c.
It implements the builtins "break" and "continue" in Bash.
Copyright (C) 1987-2003 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -70,7 +70,7 @@ break_builtin (list)
if (newbreak <= 0)
{
sh_erange (list->word->word, "loop count");
sh_erange (list->word->word, _("loop count"));
breaking = loop_level;
return (EXECUTION_FAILURE);
}
@@ -105,7 +105,7 @@ continue_builtin (list)
if (newcont <= 0)
{
sh_erange (list->word->word, "loop count");
sh_erange (list->word->word, _("loop count"));
breaking = loop_level;
return (EXECUTION_FAILURE);
}
+5 -4
View File
@@ -1,7 +1,7 @@
This file is builtin.def, from which is created builtin.c.
It implements the builtin "builtin" in Bash.
Copyright (C) 1987-2002 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -24,9 +24,10 @@ $PRODUCES builtin.c
$BUILTIN builtin
$FUNCTION builtin_builtin
$SHORT_DOC builtin [shell-builtin [arg ...]]
Run a shell builtin. This is useful when you wish to rename a
shell builtin to be a function, but need the functionality of the
builtin within the function itself.
Execute SHELL-BUILTIN with arguments ARGs without performing shell function
lookup. This is useful when you wish to reimplement a shell builtin as a
shell function, but need the functionality of the builtin within the function
itself.
$END
#include <config.h>
+11 -12
View File
@@ -24,13 +24,13 @@ $PRODUCES caller.c
$BUILTIN caller
$FUNCTION caller_builtin
$DEPENDS_ON DEBUGGER
$SHORT_DOC caller [EXPR]
$SHORT_DOC caller [expr]
Returns the context of the current subroutine call.
Without EXPR, returns returns "$line $filename". With EXPR,
Without EXPR, returns "$line $filename". With EXPR,
returns "$line $subroutine $filename"; this extra information
can be used used to provide a stack trace.
can be used to provide a stack trace.
The value of EXPR indicates how many call frames to go back before the
current one; the top frame is frame 0.
@@ -76,7 +76,6 @@ caller_builtin (list)
SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v;
ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
char *funcname_s, *source_s, *lineno_s;
ARRAY_ELEMENT *ae;
intmax_t num;
GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a);
@@ -129,14 +128,14 @@ caller_builtin (list)
#ifdef LOADABLE_BUILTIN
static char *caller_doc[] = {
N_("Returns the context of the current subroutine call."),
N_(" "),
N_("Without EXPR, returns returns \"$line $filename\". With EXPR,"),
N_("returns \"$line $subroutine $filename\"; this extra information"),
N_("can be used used to provide a stack trace."),
N_(" "),
N_("The value of EXPR indicates how many call frames to go back before the"),
N_("current one; the top frame is frame 0."),
N_("Returns the context of the current subroutine call.\n\
\n\
Without EXPR, returns \"$line $filename\". With EXPR,\n\
returns \"$line $subroutine $filename\"; this extra information\n\
can be used used to provide a stack trace.\n\
\n\
The value of EXPR indicates how many call frames to go back before the\n\
current one; the top frame is frame 0."),
(char *)NULL
};
+7 -6
View File
@@ -56,10 +56,11 @@ extern int errno;
extern int posixly_correct;
extern int array_needs_making;
extern char *bash_getcwd_errstr;
extern const char * const bash_getcwd_errstr;
static int bindpwd __P((int));
static void setpwd __P((char *));
static char *resetpwd __P((char *));
static int change_to_directory __P((char *, int));
static char *cdspell __P((char *));
@@ -72,11 +73,11 @@ int cdable_vars;
$BUILTIN cd
$FUNCTION cd_builtin
$SHORT_DOC cd [-L|-P] [dir]
Change the current directory to DIR. The variable $HOME is the
default DIR. The variable CDPATH defines the search path for
the directory containing DIR. Alternative directory names in CDPATH
are separated by a colon (:). A null directory name is the same as
the current directory, i.e. `.'. If DIR begins with a slash (/),
Change the current directory to DIR. The default for DIR is the value
of the HOME shell variable. The variable CDPATH defines the search
path for the directory containing DIR. Alternative directory names in
CDPATH are separated by a colon (:). A null directory name is the same
as the current directory, i.e., `.'. If DIR begins with a slash (/),
then CDPATH is not used. If the directory is not found, and the
shell option `cdable_vars' is set, then try the word as a variable
name. If that variable has a value, then cd to the value of that
+14 -9
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
/* Copyright (C) 1987-2007 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -69,7 +69,7 @@ extern int last_command_exit_value;
extern int running_trap;
extern int posixly_correct;
extern char *this_command_name, *shell_name;
extern char *bash_getcwd_errstr;
extern const char * const bash_getcwd_errstr;
/* Used by some builtins and the mainline code. */
sh_builtin_func_t *last_shell_builtin = (sh_builtin_func_t *)NULL;
@@ -100,7 +100,7 @@ builtin_error (format, va_alist)
fprintf (stderr, "%s: ", name);
if (interactive_shell == 0)
fprintf (stderr, "line %d: ", executing_line_number ());
fprintf (stderr, _("line %d: "), executing_line_number ());
if (this_command_name && *this_command_name)
fprintf (stderr, "%s: ", this_command_name);
@@ -117,7 +117,7 @@ void
builtin_usage ()
{
if (this_command_name && *this_command_name)
fprintf (stderr, "%s: usage: ", this_command_name);
fprintf (stderr, _("%s: usage: "), this_command_name);
fprintf (stderr, "%s\n", current_builtin->short_doc);
fflush (stderr);
}
@@ -131,6 +131,7 @@ no_args (list)
if (list)
{
builtin_error (_("too many arguments"));
top_level_cleanup ();
jump_to_top_level (DISCARD);
}
}
@@ -395,7 +396,10 @@ get_numeric_arg (list, fatal)
if (fatal)
throw_to_top_level ();
else
jump_to_top_level (DISCARD);
{
top_level_cleanup ();
jump_to_top_level (DISCARD);
}
}
no_args (list->next);
}
@@ -467,9 +471,6 @@ char *
get_working_directory (for_whom)
char *for_whom;
{
char *directory;
size_t dsize;
if (no_symbolic_links)
{
FREE (the_current_working_directory);
@@ -478,7 +479,11 @@ get_working_directory (for_whom)
if (the_current_working_directory == 0)
{
#if defined (GETCWD_BROKEN)
the_current_working_directory = getcwd (0, PATH_MAX);
#else
the_current_working_directory = getcwd (0, 0);
#endif
if (the_current_working_directory == 0)
{
fprintf (stderr, _("%s: error retrieving current directory: %s: %s\n"),
@@ -642,7 +647,7 @@ display_signal_list (list, forcecols)
{
printf ("%2d) %s", i, name);
if (++column < 4)
if (++column < 5)
printf ("\t");
else
{
+9 -7
View File
@@ -1,7 +1,7 @@
This file is complete.def, from which is created complete.c.
It implements the builtins "complete" and "compgen" in Bash.
Copyright (C) 1999-2003 Free Software Foundation, Inc.
Copyright (C) 1999-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -24,12 +24,14 @@ $PRODUCES complete.c
$BUILTIN complete
$DEPENDS_ON PROGRAMMABLE_COMPLETION
$FUNCTION complete_builtin
$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] [name ...]
$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]
For each NAME, specify how arguments are to be completed.
If the -p option is supplied, or if no options are supplied, existing
completion specifications are printed in a way that allows them to be
reused as input. The -r option removes a completion specification for
each NAME, or, if no NAMEs are supplied, all completion specifications.
When completion is attempted, the actions are applied in the order the
uppercase-letter options are listed above.
$END
#include <config.h>
@@ -71,8 +73,8 @@ static int print_cmd_completions __P((WORD_LIST *));
static char *Garg, *Warg, *Parg, *Sarg, *Xarg, *Farg, *Carg;
static struct _compacts {
char *actname;
static const struct _compacts {
const char * const actname;
int actflag;
int actopt;
} compacts[] = {
@@ -104,8 +106,8 @@ static struct _compacts {
};
/* This should be a STRING_INT_ALIST */
static struct _compopt {
char *optname;
const static struct _compopt {
const char * const optname;
int optflag;
} compopts[] = {
{ "bashdefault", COPT_BASHDEFAULT },
@@ -531,7 +533,7 @@ print_cmd_completions (list)
$BUILTIN compgen
$DEPENDS_ON PROGRAMMABLE_COMPLETION
$FUNCTION compgen_builtin
$SHORT_DOC compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] [word]
$SHORT_DOC compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]
Display the possible completions depending on the options. Intended
to be used from within a shell function generating possible completions.
If the optional WORD argument is supplied, matches against WORD are
+16 -16
View File
@@ -1,7 +1,7 @@
This file is declare.def, from which is created declare.c.
It implements the builtins "declare" and "local" in Bash.
Copyright (C) 1987-2004 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -24,30 +24,29 @@ $PRODUCES declare.c
$BUILTIN declare
$FUNCTION declare_builtin
$SHORT_DOC declare [-afFirtx] [-p] [name[=value] ...]
Declare variables and/or give them attributes. If no NAMEs are
given, then display the values of variables instead. The -p option
will display the attributes and values of each NAME.
Declare variables and give them attributes. If no NAMEs are
given, then display the values of variables instead. When
displaying variable values, the -f option restricts the display
to function names and definitions; the -F option restricts the
display to function names only (plus line number and source file
when debugging). The -p option will display the attributes and
values of each NAME.
The flags are:
The options which set attributes are:
-a to make NAMEs arrays (if supported)
-f to select from among function names only
-F to display function names (and line number and source file name if
debugging) without definitions
-i to make NAMEs have the `integer' attribute
-r to make NAMEs readonly
-t to make NAMEs have the `trace' attribute
-x to make NAMEs export
Using `+' instead of `-' turns off the given attribute.
Variables with the integer attribute have arithmetic evaluation (see
`let') done when the variable is assigned to.
the `let' command) done when the variable is assigned a value.
When displaying values of variables, -f displays a function's name
and definition. The -F option restricts the display to function
name only.
Using `+' instead of `-' turns off the given attribute instead. When
used in a function, makes NAMEs local, as with the `local' command.
When used in a function, `declare' makes NAMEs local, as with the `local'
command.
$END
$BUILTIN typeset
@@ -90,10 +89,11 @@ declare_builtin (list)
$BUILTIN local
$FUNCTION local_builtin
$SHORT_DOC local name[=value] ...
$SHORT_DOC local [option] name[=value] ...
Create a local variable called NAME, and give it VALUE. LOCAL
can only be used within a function; it makes the variable NAME
have a visible scope restricted to that function and its children.
OPTION can be any of the options accepted by `declare'.
$END
int
local_builtin (list)
+7 -2
View File
@@ -31,6 +31,8 @@ $PRODUCES echo.c
#include <stdio.h>
#include "../shell.h"
#include "common.h"
$BUILTIN echo
$FUNCTION echo_builtin
$DEPENDS_ON V9_ECHO
@@ -41,14 +43,17 @@ following backslash-escaped characters is turned on:
\a alert (bell)
\b backspace
\c suppress trailing newline
\E escape character
\e escape character
\f form feed
\n new line
\r carriage return
\t horizontal tab
\v vertical tab
\\ backslash
\num the character whose ASCII code is NUM (octal).
\0nnn the character whose ASCII code is NNN (octal). NNN can be
0 to 3 octal digits
\xHH the eight-bit character whose value is HH (hexadecimal). HH
can be one or two hex digits
You can explicitly turn off the interpretation of the above characters
with the -E option.
+3 -3
View File
@@ -1,7 +1,7 @@
This file is enable.def, from which is created enable.c.
It implements the builtin "enable" in Bash.
Copyright (C) 1987-2003 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -23,7 +23,7 @@ $PRODUCES enable.c
$BUILTIN enable
$FUNCTION enable_builtin
$SHORT_DOC enable [-pnds] [-a] [-f filename] [name ...]
$SHORT_DOC enable [-a] [-dnps] [-f filename] [name ...]
Enable and disable builtin shell commands. This allows
you to use a disk command which has the same name as a shell
builtin without specifying a full pathname. If -n is used, the
@@ -32,7 +32,7 @@ to use the `test' found in $PATH instead of the shell builtin
version, type `enable -n test'. On systems supporting dynamic
loading, the -f option may be used to load new builtins from the
shared object FILENAME. The -d option will delete a builtin
previously loaded with -f. If no non-option names are given, or
previously loaded with -f. If no non-option NAMEs are given, or
the -p option is supplied, a list of builtins is printed. The
-a option means to print every builtin with an indication of whether
or not it is enabled. The -s option restricts the output to the POSIX.2
+17 -8
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996-2003 Free Software Foundation, Inc.
/* Copyright (C) 1996-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -45,6 +45,8 @@
# include "../bashhist.h"
#endif
#include <typemax.h>
#include "common.h"
#if !defined (errno)
@@ -63,7 +65,7 @@ extern int errno;
#define FEVAL_NOPUSHARGS 0x100
extern int posixly_correct;
extern int indirection_level, startup_state, subshell_environment;
extern int indirection_level, subshell_environment;
extern int return_catch_flag, return_catch_value;
extern int last_command_exit_value;
@@ -78,6 +80,7 @@ _evalfile (filename, flags)
volatile int old_interactive;
procenv_t old_return_catch;
int return_val, fd, result, pflags;
ssize_t nr; /* return value from read(2) */
char *string;
struct stat finfo;
size_t file_size;
@@ -147,21 +150,27 @@ file_error_and_exit:
setmode (fd, O_TEXT);
#endif
string = (char *)xmalloc (1 + file_size);
result = read (fd, string, file_size);
string[result] = '\0';
if (S_ISREG (finfo.st_mode) && file_size <= SSIZE_MAX)
{
string = (char *)xmalloc (1 + file_size);
nr = read (fd, string, file_size);
if (nr >= 0)
string[nr] = '\0';
}
else
nr = zmapfd (fd, &string, 0);
return_val = errno;
close (fd);
errno = return_val;
if (result < 0) /* XXX was != file_size, not < 0 */
if (nr < 0) /* XXX was != file_size, not < 0 */
{
free (string);
goto file_error_and_exit;
}
if (result == 0)
if (nr == 0)
{
free (string);
return ((flags & FEVAL_BUILTIN) ? EXECUTION_SUCCESS : 1);
@@ -171,7 +180,7 @@ file_error_and_exit:
check_binary_file (string, (result > 80) ? 80 : result))
{
free (string);
(*errfunc) ("%s: cannot execute binary file", filename);
(*errfunc) (_("%s: cannot execute binary file"), filename);
return ((flags & FEVAL_BUILTIN) ? EX_BINARY_FILE : -1);
}
+2 -3
View File
@@ -56,7 +56,7 @@ extern int errno;
#define IS_BUILTIN(s) (builtin_address_internal(s, 0) != (struct builtin *)NULL)
extern int indirection_level, startup_state, subshell_environment;
extern int indirection_level, subshell_environment;
extern int line_number;
extern int last_command_exit_value;
extern int running_trap;
@@ -316,9 +316,8 @@ static int
cat_file (r)
REDIRECT *r;
{
char lbuf[128], *fn;
char *fn;
int fd, rval;
ssize_t nr;
if (r->instruction != r_input_direction)
return -1;
+2 -2
View File
@@ -24,12 +24,12 @@ $PRODUCES exec.c
$BUILTIN exec
$FUNCTION exec_builtin
$SHORT_DOC exec [-cl] [-a name] file [redirection ...]
Exec FILE, replacing this shell with the specified program.
Execute FILE, replacing this shell with the specified program.
If FILE is not specified, the redirections take effect in this
shell. If the first argument is `-l', then place a dash in the
zeroth arg passed to FILE, as login does. If the `-c' option
is supplied, FILE is executed with a null environment. The `-a'
option means to make set argv[0] of the executed process to NAME.
option means set argv[0] of the executed process to NAME.
If the file cannot be executed and the shell is not interactive,
then the shell exits, unless the shell option `execfail' is set.
$END
+26 -14
View File
@@ -1,7 +1,7 @@
This file is exit.def, from which is created exit.c.
It implements the builtins "exit", and "logout" in Bash.
Copyright (C) 1987-2005 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -45,6 +45,7 @@ $END
#include "common.h"
#include "builtext.h" /* for jobs_builtin */
extern int check_jobs_at_exit;
extern int last_command_exit_value;
extern int running_trap, trap_saved_exit_value;
extern int subshell_environment;
@@ -60,7 +61,7 @@ exit_builtin (list)
{
if (interactive)
{
fprintf (stderr, login_shell ? "logout\n" : "exit\n");
fprintf (stderr, login_shell ? _("logout\n") : "exit\n");
fflush (stderr);
}
@@ -94,7 +95,7 @@ exit_or_logout (list)
int exit_value;
#if defined (JOB_CONTROL)
int exit_immediate_okay;
int exit_immediate_okay, stopmsg;
exit_immediate_okay = (interactive == 0 ||
last_shell_builtin == exit_builtin ||
@@ -102,21 +103,32 @@ exit_or_logout (list)
last_shell_builtin == jobs_builtin);
/* Check for stopped jobs if the user wants to. */
if (!exit_immediate_okay)
if (exit_immediate_okay == 0)
{
register int i;
for (i = 0; i < js.j_jobslots; i++)
for (i = stopmsg = 0; i < js.j_jobslots; i++)
if (jobs[i] && STOPPED (i))
{
fprintf (stderr, _("There are stopped jobs.\n"));
stopmsg = JSTOPPED;
else if (check_jobs_at_exit && stopmsg == 0 && RUNNING (i))
stopmsg = JRUNNING;
/* This is NOT superfluous because EOF can get here without
going through the command parser. Set both last and this
so that either `exit', `logout', or ^D will work to exit
immediately if nothing intervenes. */
this_shell_builtin = last_shell_builtin = exit_builtin;
return (EXECUTION_FAILURE);
}
if (stopmsg == JSTOPPED)
fprintf (stderr, _("There are stopped jobs.\n"));
else if (stopmsg == JRUNNING)
fprintf (stderr, _("There are running jobs.\n"));
if (stopmsg && check_jobs_at_exit)
list_all_jobs (JLIST_STANDARD);
if (stopmsg)
{
/* This is NOT superfluous because EOF can get here without
going through the command parser. Set both last and this
so that either `exit', `logout', or ^D will work to exit
immediately if nothing intervenes. */
this_shell_builtin = last_shell_builtin = exit_builtin;
return (EXECUTION_FAILURE);
}
}
#endif /* JOB_CONTROL */
+3 -4
View File
@@ -1,7 +1,7 @@
This file is fc.def, from which is created fc.c.
It implements the builtin "fc" in Bash.
Copyright (C) 1987-2005 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -24,7 +24,7 @@ $PRODUCES fc.c
$BUILTIN fc
$FUNCTION fc_builtin
$DEPENDS_ON HISTORY
$SHORT_DOC fc [-e ename] [-nlr] [first] [last] or fc -s [pat=rep] [cmd]
$SHORT_DOC fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
fc is used to list or edit and re-execute commands from the history list.
FIRST and LAST can be numbers specifying the range, or FIRST can be a
string, which means the most recent command beginning with that
@@ -37,7 +37,7 @@ string.
-n means no line numbers listed.
-r means reverse the order of the lines (making it newest listed first).
With the `fc -s [pat=rep ...] [command]' format, the command is
With the `fc -s [pat=rep ...] [command]' format, COMMAND is
re-executed after the substitution OLD=NEW is performed.
A useful alias to use with this is r='fc -s', so that typing `r cc'
@@ -81,7 +81,6 @@ $END
extern int errno;
#endif /* !errno */
extern int echo_input_at_read;
extern int current_command_line_count;
extern int literal_history;
extern int posixly_correct;
+2 -2
View File
@@ -1,7 +1,7 @@
This file is fg_bg.def, from which is created fg_bg.c.
It implements the builtins "bg" and "fg" in Bash.
Copyright (C) 1987-2005 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -137,7 +137,7 @@ fg_bg (list, foreground)
if (INVALID_JOB (job))
{
if (job != DUP_JOB)
sh_badjob (list ? list->word->word : "current");
sh_badjob (list ? list->word->word : _("current"));
goto failure;
}
+2 -2
View File
@@ -158,7 +158,7 @@ hash_builtin (list)
#ifdef EISDIR
builtin_error ("%s: %s", pathname, strerror (EISDIR));
#else
builtin_error ("%s: is a directory", pathname);
builtin_error (_("%s: is a directory"), pathname);
#endif
opt = EXECUTION_FAILURE;
}
@@ -233,7 +233,7 @@ print_hashed_commands (fmt)
return (0);
if (fmt == 0)
printf ("hits\tcommand\n");
printf (_("hits\tcommand\n"));
hash_walk (hashed_filenames, fmt ? print_portable_hash_info : print_hash_info);
return (1);
}
+36 -14
View File
@@ -1,7 +1,7 @@
This file is help.def, from which is created help.c.
It implements the builtin "help" in Bash.
Copyright (C) 1987-2003 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -176,7 +176,8 @@ static void
show_builtin_command_help ()
{
int i, j;
char blurb[36];
int height, width;
char *t, blurb[128];
printf (
_("These shell commands are defined internally. Type `help' to see this list.\n\
@@ -187,21 +188,42 @@ Use `man -k' or `info' to find out more about commands not in this list.\n\
A star (*) next to a name means that the command is disabled.\n\
\n"));
for (i = 0; i < num_shell_builtins; i++)
t = get_string_value ("COLUMNS");
width = (t && *t) ? atoi (t) : 80;
if (width <= 0)
width = 80;
width /= 2;
if (width > sizeof (blurb))
width = sizeof (blurb);
height = (num_shell_builtins + 1) / 2; /* number of rows */
for (i = 0; i < height; i++)
{
QUIT;
blurb[0] = (shell_builtins[i].flags & BUILTIN_ENABLED) ? ' ' : '*';
strncpy (blurb + 1, shell_builtins[i].short_doc, 34);
blurb[35] = '\0';
printf ("%s", blurb);
if (i % 2)
printf ("\n");
else
for (j = strlen (blurb); j < 35; j++)
putc (' ', stdout);
/* first column */
blurb[0] = (shell_builtins[i].flags & BUILTIN_ENABLED) ? ' ' : '*';
strncpy (blurb + 1, shell_builtins[i].short_doc, width - 2);
blurb[width - 2] = '>'; /* indicate truncation */
blurb[width - 1] = '\0';
printf ("%s", blurb);
if ((i << 1) == num_shell_builtins)
{
printf ("\n");
break;
}
/* two spaces */
for (j = strlen (blurb); j < width; j++)
putc (' ', stdout);
/* second column */
blurb[0] = (shell_builtins[i+height].flags & BUILTIN_ENABLED) ? ' ' : '*';
strncpy (blurb + 1, shell_builtins[i+height].short_doc, width - 3);
blurb[width - 3] = '>'; /* indicate truncation */
blurb[width - 2] = '\0';
printf ("%s\n", blurb);
}
if (i % 2)
printf ("\n");
}
#endif /* HELP_BUILTIN */
+3 -3
View File
@@ -1,7 +1,7 @@
This file is history.def, from which is created history.c.
It implements the builtin "history" in Bash.
Copyright (C) 1987-2003 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -24,7 +24,7 @@ $PRODUCES history.c
$BUILTIN history
$FUNCTION history_builtin
$DEPENDS_ON HISTORY
$SHORT_DOC history [-c] [-d offset] [n] or history -awrn [filename] or history -ps arg [arg...]
$SHORT_DOC history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
Display the history list with line numbers. Lines listed with
with a `*' have been modified. Argument of N says to list only
the last N lines. The `-c' option causes the history list to be
@@ -36,7 +36,7 @@ to append history lines from this session to the history file.
Argument `-n' means to read all history lines not already read
from the history file and append them to the history list.
If FILENAME is given, then that is used as the history file else
If FILENAME is given, then that is used as the history file. Otherwise,
if $HISTFILE has a value, that is used, else ~/.bash_history.
If the -s option is supplied, the non-option ARGs are appended to
the history list as a single entry. The -p option means to perform
+1 -1
View File
@@ -64,7 +64,7 @@ inlib_builtin (list)
if (status.all != status_$ok)
{
builtin_error ("%s: inlib failed", list->word->word);
builtin_error (_("%s: inlib failed"), list->word->word);
return_value = EXECUTION_FAILURE;
}
+2 -2
View File
@@ -1,7 +1,7 @@
This file is jobs.def, from which is created jobs.c.
It implements the builtins "jobs" and "disown" in Bash.
Copyright (C) 1987-2005 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -261,7 +261,7 @@ disown_builtin (list)
if (job == NO_JOB || jobs == 0 || INVALID_JOB (job))
{
sh_badjob (list ? list->word->word : "current");
sh_badjob (list ? list->word->word : _("current"));
retval = EXECUTION_FAILURE;
}
else if (nohup_only)
+1 -1
View File
@@ -1224,7 +1224,7 @@ write_builtins (defs, structfile, externfile)
document_name (builtin));
fprintf
(structfile, " \"%s\", (char *)NULL },\n",
(structfile, " N_(\"%s\"), (char *)NULL },\n",
builtin->shortdoc ? builtin->shortdoc : builtin->name);
}
+34 -6
View File
@@ -1,7 +1,7 @@
This file is printf.def, from which is created printf.c.
It implements the builtin "printf" in Bash.
Copyright (C) 1997-2005 Free Software Foundation, Inc.
Copyright (C) 1997-2007 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -26,8 +26,8 @@ $FUNCTION printf_builtin
$SHORT_DOC printf [-v var] format [arguments]
printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT
is a character string which contains three types of objects: plain
characters, which are simply copied to standard output, character escape
sequences which are converted and copied to the standard output, and
characters, which are simply copied to standard output; character escape
sequences, which are converted and copied to the standard output; and
format specifications, each of which causes printing of the next successive
argument. In addition to the standard printf(1) formats, %b means to
expand backslash escape sequences in the corresponding argument, and %q
@@ -49,6 +49,12 @@ $END
# define INT_MIN (-2147483647-1)
#endif
#if defined (PREFER_STDARG)
# include <stdarg.h>
#else
# include <varargs.h>
#endif
#include <stdio.h>
#include <chartypes.h>
@@ -64,6 +70,10 @@ $END
#include "bashgetopt.h"
#include "common.h"
#if defined (PRI_MACROS_BROKEN)
# undef PRIdMAX
#endif
#if !defined (PRIdMAX)
# if HAVE_LONG_LONG
# define PRIdMAX "lld"
@@ -91,6 +101,7 @@ extern int errno;
do { \
char *b = 0; \
int nw; \
clearerr (stdout); \
if (have_fieldwidth && have_precision) \
nw = asprintf(&b, f, fieldwidth, precision, func); \
else if (have_fieldwidth) \
@@ -106,6 +117,12 @@ extern int errno;
(void)vbadd (b, nw); \
else \
(void)fputs (b, stdout); \
if (ferror (stdout)) \
{ \
sh_wrerror (); \
clearerr (stdout); \
return (EXECUTION_FAILURE); \
} \
free (b); \
} \
} while (0)
@@ -132,6 +149,11 @@ extern int errno;
vbuf = 0; \
} \
fflush (stdout); \
if (ferror (stdout)) \
{ \
clearerr (stdout); \
return (EXECUTION_FAILURE); \
} \
return (value); \
} \
while (0)
@@ -139,6 +161,10 @@ extern int errno;
#define SKIP1 "#'-+ 0"
#define LENMODS "hjlLtz"
#ifndef HAVE_ASPRINTF
extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3)));
#endif
static void printf_erange __P((char *));
static int printstr __P((char *, char *, int, int, int));
static int tescape __P((char *, char *, int *));
@@ -407,7 +433,9 @@ printf_builtin (list)
r = 0;
p = getstr ();
if (ansic_shouldquote (p))
if (p && *p == 0) /* XXX - getstr never returns null */
xp = savestring ("''");
else if (ansic_shouldquote (p))
xp = ansic_quote (p, 0, (int *)0);
else
xp = sh_backslash_quote (p);
@@ -526,7 +554,7 @@ static void
printf_erange (s)
char *s;
{
builtin_error ("warning: %s: %s", s, strerror(ERANGE));
builtin_error (_("warning: %s: %s"), s, strerror(ERANGE));
}
/* We duplicate a lot of what printf(3) does here. */
@@ -816,7 +844,7 @@ vbadd (buf, blen)
#ifdef DEBUG
if (strlen (vbuf) != vblen)
internal_error ("printf:vbadd: vblen (%d) != strlen (vbuf) (%d)", vblen, strlen (vbuf));
internal_error ("printf:vbadd: vblen (%d) != strlen (vbuf) (%d)", vblen, (int)strlen (vbuf));
#endif
return vbuf;
+73 -73
View File
@@ -1,7 +1,7 @@
This file is pushd.def, from which is created pushd.c. It implements the
builtins "pushd", "popd", and "dirs" in Bash.
Copyright (C) 1987-2004 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -24,11 +24,14 @@ $PRODUCES pushd.c
$BUILTIN pushd
$FUNCTION pushd_builtin
$DEPENDS_ON PUSHD_AND_POPD
$SHORT_DOC pushd [dir | +N | -N] [-n]
$SHORT_DOC pushd [-n] [+N | -N | dir]
Adds a directory to the top of the directory stack, or rotates
the stack, making the new top of the stack the current working
directory. With no arguments, exchanges the top two directories.
-n Suppresses the normal change of directory when adding directories
to the stack, so only the stack is manipulated.
+N Rotates the stack so that the Nth directory (counting
from the left of the list shown by `dirs', starting with
zero) is at the top.
@@ -37,10 +40,7 @@ directory. With no arguments, exchanges the top two directories.
from the right of the list shown by `dirs', starting with
zero) is at the top.
-n suppress the normal change of directory when adding directories
to the stack, so only the stack is manipulated.
dir adds DIR to the directory stack at the top, making it the
dir Adds DIR to the directory stack at the top, making it the
new current working directory.
You can see the directory stack with the `dirs' command.
@@ -49,22 +49,22 @@ $END
$BUILTIN popd
$FUNCTION popd_builtin
$DEPENDS_ON PUSHD_AND_POPD
$SHORT_DOC popd [+N | -N] [-n]
$SHORT_DOC popd [-n] [+N | -N]
Removes entries from the directory stack. With no arguments,
removes the top directory from the stack, and cd's to the new
top directory.
+N removes the Nth entry counting from the left of the list
-n Suppresses the normal change of directory when removing directories
from the stack, so only the stack is manipulated.
+N Removes the Nth entry counting from the left of the list
shown by `dirs', starting with zero. For example: `popd +0'
removes the first directory, `popd +1' the second.
-N removes the Nth entry counting from the right of the list
-N Removes the Nth entry counting from the right of the list
shown by `dirs', starting with zero. For example: `popd -0'
removes the last directory, `popd -1' the next to last.
-n suppress the normal change of directory when removing directories
from the stack, so only the stack is manipulated.
You can see the directory stack with the `dirs' command.
$END
@@ -76,18 +76,18 @@ Display the list of currently remembered directories. Directories
find their way onto the list with the `pushd' command; you can get
back up through the list with the `popd' command.
The -c flag clears the directory stack by deleting all of the elements.
The -l flag specifies that `dirs' should not print shorthand versions
of directories which are relative to your home directory. This means
that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag
causes `dirs' to print the directory stack with one entry per line,
prepending the directory name with its position in the stack. The -p
flag does the same thing, but the stack position is not prepended.
The -c flag clears the directory stack by deleting all of the elements.
that `~/bin' might be displayed as `/homes/bfox/bin'. The -p flag
causes `dirs' to print the directory stack with one entry per line.
The -v flag does the same thing, prefixing each directory name with its
position in the stack.
+N displays the Nth entry counting from the left of the list shown by
+N Displays the Nth entry counting from the left of the list shown by
dirs when invoked without options, starting with zero.
-N displays the Nth entry counting from the right of the list shown by
-N Displays the Nth entry counting from the right of the list shown by
dirs when invoked without options, starting with zero.
$END
@@ -483,9 +483,9 @@ pushd_error (offset, arg)
char *arg;
{
if (offset == 0)
builtin_error ("directory stack empty");
builtin_error (_("directory stack empty"));
else
sh_erange (arg, "directory stack index");
sh_erange (arg, _("directory stack index"));
}
static void
@@ -660,66 +660,66 @@ get_directory_stack (flags)
#ifdef LOADABLE_BUILTIN
char * const dirs_doc[] = {
N_("Display the list of currently remembered directories. Directories"),
N_("find their way onto the list with the `pushd' command; you can get"),
N_("back up through the list with the `popd' command."),
N_(" "),
N_("The -l flag specifies that `dirs' should not print shorthand versions"),
N_("of directories which are relative to your home directory. This means"),
N_("that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"),
N_("causes `dirs' to print the directory stack with one entry per line,"),
N_("prepending the directory name with its position in the stack. The -p"),
N_("flag does the same thing, but the stack position is not prepended."),
N_("The -c flag clears the directory stack by deleting all of the elements."),
N_(" "),
N_("+N displays the Nth entry counting from the left of the list shown by"),
N_(" dirs when invoked without options, starting with zero."),
N_(" "),
N_("-N displays the Nth entry counting from the right of the list shown by"),
N_(" dirs when invoked without options, starting with zero."),
N_("Display the list of currently remembered directories. Directories\n\
find their way onto the list with the `pushd' command; you can get\n\
back up through the list with the `popd' command.\n\
\n\
The -c flag clears the directory stack by deleting all of the elements.\n\
The -l flag specifies that `dirs' should not print shorthand versions\n\
of directories which are relative to your home directory. This means\n\
that `~/bin' might be displayed as `/homes/bfox/bin'. The -p flag\n\
causes `dirs' to print the directory stack with one entry per line.\n\
The -v flag does the same thing, prefixing each directory name with its\n\
position in the stack.\n\
\n\
+N Displays the Nth entry counting from the left of the list shown by\n\
dirs when invoked without options, starting with zero.\n\
\n\
-N Displays the Nth entry counting from the right of the list shown by\n\
dirs when invoked without options, starting with zero."),
(char *)NULL
};
char * const pushd_doc[] = {
N_("Adds a directory to the top of the directory stack, or rotates"),
N_("the stack, making the new top of the stack the current working"),
N_("directory. With no arguments, exchanges the top two directories."),
N_(" "),
N_("+N Rotates the stack so that the Nth directory (counting"),
N_(" from the left of the list shown by `dirs', starting with"),
N_(" zero) is at the top."),
N_(" "),
N_("-N Rotates the stack so that the Nth directory (counting"),
N_(" from the right of the list shown by `dirs', starting with"),
N_(" zero) is at the top."),
N_(" "),
N_("-n suppress the normal change of directory when adding directories"),
N_(" to the stack, so only the stack is manipulated."),
N_(" "),
N_("dir adds DIR to the directory stack at the top, making it the"),
N_(" new current working directory."),
N_(" "),
N_("You can see the directory stack with the `dirs' command."),
N_("Adds a directory to the top of the directory stack, or rotates\n\
the stack, making the new top of the stack the current working\n\
directory. With no arguments, exchanges the top two directories.\n\
\n\
-n Suppresses the normal change of directory when adding directories\n\
to the stack, so only the stack is manipulated.\n\
\n\
+N Rotates the stack so that the Nth directory (counting\n\
from the left of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
\n\
-N Rotates the stack so that the Nth directory (counting\n\
from the right of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
\n\
dir Adds DIR to the directory stack at the top, making it the\n\
new current working directory.\n\
\n\
You can see the directory stack with the `dirs' command."),
(char *)NULL
};
char * const popd_doc[] = {
N_("Removes entries from the directory stack. With no arguments,"),
N_("removes the top directory from the stack, and cd's to the new"),
N_("top directory."),
N_(" "),
N_("+N removes the Nth entry counting from the left of the list"),
N_(" shown by `dirs', starting with zero. For example: `popd +0'"),
N_(" removes the first directory, `popd +1' the second."),
N_(" "),
N_("-N removes the Nth entry counting from the right of the list"),
N_(" shown by `dirs', starting with zero. For example: `popd -0'"),
N_(" removes the last directory, `popd -1' the next to last."),
N_(" "),
N_("-n suppress the normal change of directory when removing directories"),
N_(" from the stack, so only the stack is manipulated."),
N_(" "),
N_("You can see the directory stack with the `dirs' command."),
N_("Removes entries from the directory stack. With no arguments,\n\
removes the top directory from the stack, and cd's to the new\n\
top directory.\n\
\n\
-n Suppresses the normal change of directory when removing directories\n\
from the stack, so only the stack is manipulated.\n\
\n\
+N Removes the Nth entry counting from the left of the list\n\
shown by `dirs', starting with zero. For example: `popd +0'\n\
removes the first directory, `popd +1' the second.\n\
\n\
-N Removes the Nth entry counting from the right of the list\n\
shown by `dirs', starting with zero. For example: `popd -0'\n\
removes the last directory, `popd -1' the next to last.\n\
\n\
You can see the directory stack with the `dirs' command."),
(char *)NULL
};
+7 -2
View File
@@ -23,7 +23,7 @@ $PRODUCES read.c
$BUILTIN read
$FUNCTION read_builtin
$SHORT_DOC read [-ers] [-u fd] [-t timeout] [-p prompt] [-a array] [-n nchars] [-d delim] [name ...]
$SHORT_DOC read [-ers] [-a array] [-d delim] [-n nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
One line is read from the standard input, or from file descriptor FD if the
-u option is supplied, and the first word is assigned to the first NAME,
the second word to the second NAME, and so on, with leftover words assigned
@@ -329,8 +329,10 @@ read_builtin (list)
}
old_alrm = set_signal_handler (SIGALRM, sigalrm);
add_unwind_protect (reset_alarm, (char *)NULL);
#if defined (READLINE)
if (edit)
add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
#endif
alarm (tmout);
}
@@ -532,7 +534,10 @@ add_char:
alist = list_string (input_string, ifs_chars, 0);
if (alist)
{
word_list_remove_quoted_nulls (alist);
if (saw_escape)
dequote_list (alist);
else
word_list_remove_quoted_nulls (alist);
assign_array_var_from_word_list (var, alist, 0);
dispose_words (alist);
}
+5 -5
View File
@@ -57,12 +57,12 @@ until a break command is executed.
$END
$BUILTIN time
$SHORT_DOC time [-p] PIPELINE
$SHORT_DOC time [-p] pipeline
Execute PIPELINE and print a summary of the real time, user CPU time,
and system CPU time spent executing PIPELINE when it terminates.
The return status is the return status of PIPELINE. The `-p' option
prints the timing summary in a slightly different format. This uses
the value of the TIMEFORMAT variable as the output format.
prints the timing summary in the portable Posix format; otherwise, the
the value of the TIMEFORMAT variable is used as the output format.
$END
$BUILTIN case
@@ -110,7 +110,7 @@ $END
$BUILTIN %
$DOCNAME fg_percent
$SHORT_DOC JOB_SPEC [&]
$SHORT_DOC job_spec [&]
Equivalent to the JOB_SPEC argument to the `fg' command. Resume a
stopped or background job. JOB_SPEC can specify either a job name
or a job number. Following JOB_SPEC with a `&' places the job in
@@ -145,7 +145,7 @@ $END
$BUILTIN variables
$DOCNAME variable_help
$SHORT_DOC variables - Some variable names and meanings
$SHORT_DOC variables - Names and meanings of some shell variables
BASH_VERSION Version information for this Bash.
CDPATH A colon-separated list of directories to search
for directries given as arguments to `cd'.
+7 -5
View File
@@ -60,7 +60,10 @@ extern int no_line_editing;
$BUILTIN set
$FUNCTION set_builtin
$SHORT_DOC set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
$SHORT_DOC set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
Change the value of shell attributes and positional parameters, or display
the names and values of shell variables. Available
shell options are:
-a Mark variables which are modified or created for export.
-b Notify of job termination immediately.
-e Exit immediately if a command exits with a non-zero status.
@@ -161,13 +164,13 @@ static int get_edit_mode __P((char *));
static int bash_set_history __P((int, char *));
#endif
static char *on = "on";
static char *off = "off";
static const char * const on = "on";
static const char * const off = "off";
/* A struct used to match long options for set -o to the corresponding
option letter or internal variable. The functions can be called to
dynamically generate values. */
struct {
const struct {
char *name;
int letter;
int *variable;
@@ -578,7 +581,6 @@ set_builtin (list)
WORD_LIST *list;
{
int on_or_off, flag_name, force_assignment, opts_changed;
WORD_LIST *l;
register char *arg;
char s[3];
+2 -2
View File
@@ -1,7 +1,7 @@
This file is setattr.def, from which is created setattr.c.
It implements the builtins "export" and "readonly", in Bash.
Copyright (C) 1987-2004 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -52,7 +52,7 @@ extern int declare_builtin __P((WORD_LIST *));
$BUILTIN export
$FUNCTION export_builtin
$SHORT_DOC export [-nf] [name[=value] ...] or export -p
$SHORT_DOC export [-fn] [name[=value] ...] or export -p
NAMEs are marked for automatic export to the environment of
subsequently executed commands. If the -f option is given,
the NAMEs refer to functions. If no NAMEs are given, or if `-p'
+8 -4
View File
@@ -1,7 +1,7 @@
This file is shopt.def, from which is created shopt.c.
It implements the Bash `shopt' builtin.
Copyright (C) 1994-2005 Free Software Foundation, Inc.
Copyright (C) 1994-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -23,7 +23,7 @@ $PRODUCES shopt.c
$BUILTIN shopt
$FUNCTION shopt_builtin
$SHORT_DOC shopt [-pqsu] [-o long-option] optname [optname...]
$SHORT_DOC shopt [-pqsu] [-o] [optname ...]
Toggle the values of variables controlling optional behavior.
The -s flag means to enable (set) each OPTNAME; the -u flag
unsets each OPTNAME. The -q flag suppresses output; the exit
@@ -68,6 +68,8 @@ extern int glob_ignore_case, match_ignore_case;
extern int hup_on_exit;
extern int xpg_echo;
extern int gnu_error_format;
extern int check_jobs_at_exit;
extern int autocd;
#if defined (EXTENDED_GLOB)
extern int extended_glob;
@@ -114,9 +116,11 @@ static struct {
int *value;
shopt_set_func_t *set_func;
} shopt_vars[] = {
{ "autocd", &autocd, (shopt_set_func_t *)NULL },
{ "cdable_vars", &cdable_vars, (shopt_set_func_t *)NULL },
{ "cdspell", &cdspelling, (shopt_set_func_t *)NULL },
{ "checkhash", &check_hashed_filenames, (shopt_set_func_t *)NULL },
{ "checkjobs", &check_jobs_at_exit, (shopt_set_func_t *)NULL },
{ "checkwinsize", &check_window_size, (shopt_set_func_t *)NULL },
#if defined (HISTORY)
{ "cmdhist", &command_oriented_history, (shopt_set_func_t *)NULL },
@@ -170,8 +174,8 @@ static struct {
{ (char *)0, (int *)0, (shopt_set_func_t *)NULL }
};
static char *on = "on";
static char *off = "off";
static const char * const on = "on";
static const char * const off = "off";
static int find_shopt __P((char *));
static int toggle_shopts __P((int, WORD_LIST *, int));
+1 -4
View File
@@ -38,7 +38,6 @@ in $PATH are used to find the directory containing FILENAME. If any
ARGUMENTS are supplied, they become the positional parameters when
FILENAME is executed.
$END
/* source.c - Implements the `.' and `source' builtins. */
#include <config.h>
@@ -68,9 +67,7 @@ $END
extern int errno;
#endif /* !errno */
#if defined (RESTRICTED_SHELL)
extern int restricted;
#endif
static void maybe_pop_dollar_vars __P((void));
/* If non-zero, `.' uses $PATH to look up the script to be sourced. */
int source_uses_path = 1;
+3 -1
View File
@@ -48,13 +48,15 @@ $END
#include "common.h"
#include "bashgetopt.h"
static sighandler suspend_continue __P((int));
static SigHandler *old_cont;
#if 0
static SigHandler *old_stop;
#endif
/* Continue handler. */
sighandler
static sighandler
suspend_continue (sig)
int sig;
{
+3 -2
View File
@@ -1,7 +1,7 @@
This file is test.def, from which is created test.c.
It implements the builtin "test" in Bash.
Copyright (C) 1987-2002 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -109,6 +109,7 @@ $END
#endif
#include "../bashansi.h"
#include "../bashintl.h"
#include "../shell.h"
#include "../test.h"
@@ -131,7 +132,7 @@ test_builtin (list)
{
if (this_command_name[0] == '[' && !this_command_name[1])
{
builtin_error ("missing `]'");
builtin_error (_("missing `]'"));
return (EX_BADUSAGE);
}
+2 -2
View File
@@ -24,8 +24,8 @@ $PRODUCES times.c
$BUILTIN times
$FUNCTION times_builtin
$SHORT_DOC times
Print the accumulated user and system times for processes run from
the shell.
Print the accumulated user and system times for the shell and all of its
child processes.
$END
#include <config.h>
+3 -3
View File
@@ -23,14 +23,14 @@ $PRODUCES trap.c
$BUILTIN trap
$FUNCTION trap_builtin
$SHORT_DOC trap [-lp] [arg signal_spec ...]
$SHORT_DOC trap [-lp] [[arg] signal_spec ...]
The command ARG is to be read and executed when the shell receives
signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC
is supplied) or `-', each specified signal is reset to its original
value. If ARG is the null string each SIGNAL_SPEC is ignored by the
shell and by the commands it invokes. If a SIGNAL_SPEC is EXIT (0)
the command ARG is executed on exit from the shell. If a SIGNAL_SPEC
is DEBUG, ARG is executed after every simple command. If the`-p' option
is DEBUG, ARG is executed before every simple command. If the`-p' option
is supplied then the trap commands associated with each SIGNAL_SPEC are
displayed. If no arguments are supplied or if only `-p' is given, trap
prints the list of commands associated with each signal. Each SIGNAL_SPEC
@@ -87,7 +87,7 @@ int
trap_builtin (list)
WORD_LIST *list;
{
int list_signal_names, display, result, opt, first_signal;
int list_signal_names, display, result, opt;
list_signal_names = display = 0;
result = EXECUTION_SUCCESS;
+1 -1
View File
@@ -390,7 +390,7 @@ describe_command (command, dflags)
if (dflags & CDESC_TYPE)
puts ("file");
else if (dflags & CDESC_SHORTDESC)
printf ("%s is %s\n", command, full_path);
printf (_("%s is %s\n"), command, full_path);
else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY))
printf ("%s\n", full_path);
+7 -7
View File
@@ -1,7 +1,7 @@
This file is ulimit.def, from which is created ulimit.c.
It implements the builtin "ulimit" in Bash.
Copyright (C) 1987-2005 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -24,7 +24,7 @@ $PRODUCES ulimit.c
$BUILTIN ulimit
$FUNCTION ulimit_builtin
$DEPENDS_ON !_MINIX
$SHORT_DOC ulimit [-SHacdfilmnpqstuvx] [limit]
$SHORT_DOC ulimit [-SHacdefilmnpqrstuvx] [limit]
Ulimit provides control over the resources available to processes
started by the shell, on systems that allow such control. If an
option is given, it is interpreted as follows:
@@ -35,7 +35,7 @@ option is given, it is interpreted as follows:
-c the maximum size of core files created
-d the maximum size of a process's data segment
-e the maximum scheduling priority (`nice')
-f the maximum size of files created by the shell
-f the maximum size of files written by the shell and its children
-i the maximum number of pending signals
-l the maximum size a process may lock into memory
-m the maximum resident set size
@@ -193,8 +193,8 @@ typedef struct {
int option; /* The ulimit option for this limit. */
int parameter; /* Parameter to pass to get_limit (). */
int block_factor; /* Blocking factor for specific limit. */
char *description; /* Descriptive string to output. */
char *units; /* scale */
const char * const description; /* Descriptive string to output. */
const char * const units; /* scale */
} RESOURCE_LIMITS;
static RESOURCE_LIMITS limits[] = {
@@ -430,7 +430,7 @@ ulimit_internal (cmd, cmdarg, mode, multiple)
if ((real_limit / block_factor) != limit)
{
sh_erange (cmdarg, "limit");
sh_erange (cmdarg, _("limit"));
return (EXECUTION_FAILURE);
}
}
@@ -740,7 +740,7 @@ set_all_limits (mode, newlim)
for (retval = i = 0; limits[i].option > 0; i++)
if (set_limit (i, newlim, mode) < 0)
{
builtin_error ("%s: cannot modify limit: %s", limits[i].description,
builtin_error (_("%s: cannot modify limit: %s"), limits[i].description,
strerror (errno));
retval = 1;
}
+2 -4
View File
@@ -1,7 +1,7 @@
This file is wait.def, from which is created wait.c.
It implements the builtin "wait" in Bash.
Copyright (C) 1987-2005 Free Software Foundation, Inc.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -37,8 +37,7 @@ $DEPENDS_ON !JOB_CONTROL
$SHORT_DOC wait [n]
Wait for the specified process and report its termination status. If
N is not given, all currently active child processes are waited for,
and the return code is zero. N is a process ID; if it is not given,
all child processes of the shell are waited for.
and the return code is zero. N must be a process ID.
$END
#include <config.h>
@@ -59,7 +58,6 @@ $END
#include "common.h"
#include "bashgetopt.h"
extern int interrupt_immediately;
extern int wait_signal_received;
procenv_t wait_intr_buf;
+2
View File
@@ -88,6 +88,7 @@ enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select,
#define W_HASQUOTEDNULL 0x040000 /* word contains a quoted null character */
#define W_DQUOTE 0x080000 /* word should be treated as if double-quoted */
#define W_NOPROCSUB 0x100000 /* don't perform process substitution */
#define W_HASCTLESC 0x200000 /* word contains literal CTLESC characters */
/* Possible values for subshell_environment */
#define SUBSHELL_ASYNC 0x01 /* subshell caused by `command &' */
@@ -95,6 +96,7 @@ enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select,
#define SUBSHELL_COMSUB 0x04 /* subshell caused by `command` or $(command) */
#define SUBSHELL_FORK 0x08 /* subshell caused by executing a disk command */
#define SUBSHELL_PIPE 0x10 /* subshell from a pipeline element */
#define SUBSHELL_PROCSUB 0x20 /* subshell caused by <(command) or >(command) */
/* A structure which represents a word. */
typedef struct word_desc {
+20 -6
View File
@@ -1,7 +1,7 @@
/* config-bot.h */
/* modify settings or make new ones based on what autoconf tells us. */
/* Copyright (C) 1989-2002 Free Software Foundation, Inc.
/* Copyright (C) 1989-2007 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -70,9 +70,11 @@
# define TERMIOS_MISSING
#endif
/* If we have a getcwd(3), but it calls popen(), #undef HAVE_GETCWD so
the replacement in getcwd.c will be built. */
#if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN)
/* If we have a getcwd(3), but one that does not dynamically allocate memory,
#undef HAVE_GETCWD so the replacement in getcwd.c will be built. We do
not do this on Solaris, because their implementation of loopback mounts
breaks the traditional file system assumptions that getcwd uses. */
#if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN) && !defined (SOLARIS)
# undef HAVE_GETCWD
#endif
@@ -130,10 +132,22 @@
/* For platforms which support the ISO C amendement 1 functionality we
support user defined character classes. */
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H)
# include <wchar.h>
# include <wctype.h>
# if defined (HAVE_MBSRTOWCS) && defined (HAVE_MBRTOWC) && defined (HAVE_MBRLEN) && defined (HAVE_WCWIDTH) && defined (HAVE_WCTYPE)
# if defined (HAVE_ISWCTYPE) && \
defined (HAVE_ISWLOWER) && \
defined (HAVE_ISWUPPER) && \
defined (HAVE_MBSRTOWCS) && \
defined (HAVE_MBRTOWC) && \
defined (HAVE_MBRLEN) && \
defined (HAVE_TOWLOWER) && \
defined (HAVE_TOWUPPER) && \
defined (HAVE_WCHAR_T) && \
defined (HAVE_WCTYPE_T) && \
defined (HAVE_WINT_T) && \
defined (HAVE_WCWIDTH) && \
defined (HAVE_WCTYPE)
/* system is supposed to support XPG5 */
# define HANDLE_MULTIBYTE 1
# endif
+42 -7
View File
@@ -1,6 +1,6 @@
/* config.h -- Configuration file for bash. */
/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
/* Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -305,9 +305,20 @@
/* Define to `unsigned int' if <sys/socket.h> doesn't define. */
#undef socklen_t
#undef HAVE_MBSTATE_T
/* Define if you have quad_t in <sys/types.h>. */
#undef HAVE_QUAD_T
/* Define if you have wchar_t in <wctype.h>. */
#undef HAVE_WCHAR_T
/* Define if you have wctype_t in <wctype.h>. */
#undef HAVE_WCTYPE_T
/* Define if you have wint_t in <wctype.h>. */
#undef HAVE_WINT_T
#undef RLIMTYPE
/* Define to the type of elements in the array set by `getgroups'.
@@ -402,9 +413,9 @@
#undef HAVE_DECL_STRTOLD
#undef STRTOLD_BROKEN
#undef PRI_MACROS_BROKEN
#undef HAVE_MBSTATE_T
#undef STRTOLD_BROKEN
/* Define if WCONTINUED is defined in system headers, but rejected by waitpid */
#undef WCONTINUED_BROKEN
@@ -583,15 +594,27 @@
/* Define if you have the isgraph function. */
#undef HAVE_ISGRAPH
/* Define if you have the isint function in libc */
/* Define if you have the isinf function in libc */
#undef HAVE_ISINF_IN_LIBC
/* Define if you have the isnan function in libc */
#undef HAVE_ISNAN_IN_LIBC
/* Define if you have the isprint function. */
#undef HAVE_ISPRINT
/* Define if you have the isspace function. */
#undef HAVE_ISSPACE
/* Define if you have the iswctype function. */
#undef HAVE_ISWCTYPE
/* Define if you have the iswlower function. */
#undef HAVE_ISWLOWER
/* Define if you have the iswupper function. */
#undef HAVE_ISWUPPER
/* Define if you have the isxdigit function. */
#undef HAVE_ISXDIGIT
@@ -740,6 +763,12 @@
/* Define if you have the times function. */
#undef HAVE_TIMES
/* Define if you have the towlower function. */
#undef HAVE_TOWLOWER
/* Define if you have the towupper function. */
#undef HAVE_TOWUPPER
/* Define if you have the ttyname function. */
#undef HAVE_TTYNAME
@@ -770,12 +799,15 @@
/* Define if you have the wait3 function. */
#undef HAVE_WAIT3
/* Define if you have the wcrtomb function. */
#undef HAVE_WCRTOMB
/* Define if you have the wcscoll function. */
#undef HAVE_WCSCOLL
/* Define if you have the wcsdup function. */
#undef HAVE_WCSDUP
/* Define if you have the wctomb function. */
#undef HAVE_WCTOMB
/* Define if you have the wctype function. */
#undef HAVE_WCTYPE
@@ -976,6 +1008,9 @@
/* Define if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT
/* Define if you have the `localeconv' function. */
#undef HAVE_LOCALECONV
/* Define if your system has a working `malloc' function. */
/* #undef HAVE_MALLOC */
Vendored
+11529 -7113
View File
File diff suppressed because it is too large Load Diff
+11 -9
View File
@@ -5,7 +5,7 @@ dnl report bugs to chet@po.cwru.edu
dnl
dnl Process this file with autoconf to produce a configure script.
# Copyright (C) 1987-2006 Free Software Foundation, Inc.
# Copyright (C) 1987-2007 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
@@ -22,10 +22,10 @@ dnl Process this file with autoconf to produce a configure script.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_REVISION([for Bash 3.2, version 3.187])dnl
AC_REVISION([for Bash 3.2, version 3.194])dnl
define(bashvers, 3.2)
define(relstatus, devel)
define(relstatus, maint)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
@@ -43,7 +43,7 @@ RELSTATUS=relstatus
dnl defaults for debug settings
case "$RELSTATUS" in
alp*|bet*|dev*|rc*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
*) DEBUG= MALLOC_DEBUG= ;;
esac
@@ -149,7 +149,7 @@ if test "$opt_curses" = yes; then
fi
if test -z "${DEBUGGER_START_FILE}"; then
DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc
DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
fi
dnl optional shell features in config.h.in
@@ -383,6 +383,7 @@ dnl Note that host and target machine are the same, and different than the
dnl build machine.
dnl Set SIGNAMES_H based on whether or not we're cross-compiling.
CROSS_COMPILE=
if test "x$cross_compiling" = "xyes"; then
case "${host}" in
*-cygwin*)
@@ -688,6 +689,7 @@ dnl checks for certain version-specific system calls and libc functions
AC_CHECK_FUNC(__setostype, AC_DEFINE(HAVE_SETOSTYPE))
AC_CHECK_FUNC(wait3, AC_DEFINE(HAVE_WAIT3))
AC_CHECK_FUNC(isinf, AC_DEFINE(HAVE_ISINF_IN_LIBC))
AC_CHECK_FUNC(isnan, AC_DEFINE(HAVE_ISNAN_IN_LIBC))
dnl checks for missing libc functions
AC_CHECK_FUNC(mkfifo,AC_DEFINE(HAVE_MKFIFO),AC_DEFINE(MKFIFO_MISSING))
@@ -780,7 +782,7 @@ AC_CHECK_LIB(dl, dlopen)
AC_CHECK_FUNCS(dlopen dlclose dlsym)
fi
dnl this defines SYS_SIGLIST_DECLARED
dnl this defines HAVE_DECL_SYS_SIGLIST
AC_DECL_SYS_SIGLIST
dnl network functions -- check for inet_aton again
@@ -989,7 +991,8 @@ sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;;
sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;;
sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
case "`uname -r`" in
@@ -1101,8 +1104,7 @@ AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
lib/intl/Makefile \
lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in \
examples/loadables/Makefile examples/loadables/perl/Makefile \
pathnames.h],
examples/loadables/Makefile examples/loadables/perl/Makefile],
[
# Makefile uses this timestamp file to record whether config.h is up to date.
echo timestamp > stamp-h
+65 -28
View File
@@ -1,4 +1,4 @@
This is the Bash FAQ, version 3.33, for Bash version 3.1.
This is the Bash FAQ, version 3.35, 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
@@ -9,7 +9,7 @@ Another good source of basic information about shells is the collection
of FAQ articles periodically posted to comp.unix.shell.
Questions and comments concerning this document should be sent to
chet@po.cwru.edu.
chet.ramey@case.edu.
This document is available for anonymous FTP with the URL
@@ -36,8 +36,8 @@ A10) What is the bash `posix mode'?
Section B: The latest version
B1) What's new in version 3.1?
B2) Are there any user-visible incompatibilities between bash-3.1 and
B1) What's new in version 3.2?
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
Section C: Differences from other Unix shells
@@ -78,6 +78,7 @@ E10) Why does `cd //' leave $PWD as `//'?
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?
Section F: Things to watch out for on certain Unix versions
@@ -140,26 +141,26 @@ of Case Western Reserve University.
A2) What's the latest version?
The latest version is 3.1, first made available on 09 December, 2005.
The latest version is 3.2, first made available on 12 October, 2006.
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 3.1:
The following URLs tell how to get version 3.2:
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.1.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-3.1.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz
Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.1.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.1.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz
Any patches for the current version are available with the URL:
ftp://ftp.cwru.edu/pub/bash/bash-3.1-patches/
ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
A4) On what machines will bash run?
@@ -192,7 +193,7 @@ http://www.cygwin.com/.
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
ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both
are available as part of their current release. Bash-3.1 is currently
are available as part of their current release. Bash-3.2 is currently
being tested and should be available soon.
Bash-2.05b and later versions should require no local Cygnus changes to
@@ -216,7 +217,7 @@ Mark began to work with bash-2.05, but I don't know the current status.
Bash-3.0 compiles and runs with no modifications under Microsoft's Services
for Unix (SFU), once known as Interix. I do not anticipate any problems
with building bash-3.1.
with building bash-3.1 or bash-3.2.
A6) How can I build bash with gcc?
@@ -385,12 +386,22 @@ They are also listed in a section in the Bash Reference Manual
Section B: The latest version
B1) What's new in version 3.1?
B1) What's new in version 3.2?
Bash-3.1 is the first maintenance release of the third major release of
Bash-3.2 is the second maintenance release of the third major release of
bash. It contains the following significant new features (see the manual
page for complete descriptions and the CHANGES and NEWS files in the
bash-3.1 distribution).
bash-3.2 distribution).
o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
characters when deciding whether or not a script is a binary file.
o Quoting the string argument to the [[ command's =~ (regexp) operator now
forces string matching, as with the other pattern-matching operators.
A short feature history dating from Bash-2.0:
Bash-3.1 contained the following new features:
o Bash-3.1 may now be configured and built in a mode that enforces strict
POSIX compliance.
@@ -401,8 +412,6 @@ o The `+=' assignment operator, which appends to the value of a string or
o It is now possible to ignore case when matching in contexts other than
filename generation using the new `nocasematch' shell option.
A short feature history dating from Bash-2.0:
Bash-3.0 contained the following new features:
o Features to support the bash debugger have been implemented, and there
@@ -640,10 +649,10 @@ 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-3.1 and
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
There are a few incompatibilities between version 2.05b and version 3.1.
There are a few incompatibilities between version 2.05b and version 3.2.
They are detailed in the file COMPAT in the bash distribution. That file
is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org
if if you find something that's not mentioned there.
@@ -837,7 +846,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-3.0:
New things in ksh-93 not in bash-3.2:
associative arrays
floating point arithmetic and variables
math library functions
@@ -863,7 +872,7 @@ New things in ksh-93 not in bash-3.0:
lexical scoping for local variables in `ksh' functions
no scoping for local variables in `POSIX' functions
New things in ksh-93 present in bash-3.0:
New things in ksh-93 present in bash-3.2:
[n]<&word- and [n]>&word- redirections (combination dup and close)
for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
?:, ++, --, `expr1 , expr2' arithmetic operators
@@ -899,7 +908,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
@@ -1113,7 +1124,7 @@ will try to write on a pipe without a reader. In that case, bash
will print `Broken pipe' to stderr when ps is killed by a
SIGPIPE.
As of bash-3.1, bash will not report SIGPIPE errors by default. You
As of bash-3.1, bash does not report SIGPIPE errors by default. You
can build a version of bash that will report such errors.
E3) When I have terminal escape sequences in my prompt, why does bash
@@ -1390,6 +1401,32 @@ expanded value of param is unset or null, and $param otherwise.
To use negative offsets that begin with a minus sign, separate the
minus sign and the colon with a space.
E13) Why does filename completion misbehave if a colon appears in the filename?
Filename completion (and word completion in general) may appear to behave
improperly if there is a colon in the word to be completed.
The colon is special to readline's word completion code: it is one of the
characters that breaks words for the completer. Readline uses these characters
in sort of the same way that bash uses $IFS: they break or separate the words
the completion code hands to the application-specific or default word
completion functions. The original intent was to make it easy to edit
colon-separated lists (such as $PATH in bash) in various applications using
readline for input.
This is complicated by the fact that some versions of the popular
`bash-completion' programmable completion package have problems with the
default completion behavior in the presence of colons.
The current set of completion word break characters is available in bash as
the value of the COMP_WORDBREAKS variable. Removing `:' from that value is
enough to make the colon not special to completion:
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
You can also quote the colon with a backslash to achieve the same result
temporarily.
Section F: Things to watch out for on certain Unix versions
F1) Why can't I use command line editing in my `cmdtool'?
@@ -1756,8 +1793,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.
@@ -1795,9 +1832,9 @@ Some of the new ksh93 pattern matching operators, like backreferencing
H5) When will the next release appear?
The next version will appear sometime in 2006. Never make predictions.
The next version will appear sometime in 2007. Never make predictions.
This document is Copyright 1995-2005 by Chester Ramey.
This document is Copyright 1995-2006 by Chester Ramey.
Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute
+4 -1
View File
@@ -35,6 +35,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
@@ -225,7 +227,8 @@ install: info installdirs bash.info
-$(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
-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; \
+2
View File
@@ -35,6 +35,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
+1337 -1279
View File
File diff suppressed because it is too large Load Diff
+151 -56
View File
@@ -1,4 +1,4 @@
\"
.\"
.\" MAN PAGE COMMENTS to
.\"
.\" Chet Ramey
@@ -6,12 +6,12 @@
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
.\" Last Change: Thu Jan 26 09:04:43 EST 2006
.\" Last Change: Fri Jan 12 16:29:22 EST 2007
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2006 Jan 26" "GNU Bash-3.2"
.TH BASH 1 "2007 January 12" "GNU Bash-3.2"
.\"
.\" 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-2005 by the Free Software Foundation, Inc.
.if t Bash is Copyright \(co 1989-2005 by the Free Software Foundation, Inc.
.if n Bash is Copyright (C) 1989-2007 by the Free Software Foundation, Inc.
.if t Bash is Copyright \(co 1989-2007 by the Free Software Foundation, Inc.
.SH DESCRIPTION
.B Bash
is an \fBsh\fR-compatible command language interpreter that
@@ -809,10 +809,10 @@ as for pathname expansion (see
.B Pathname Expansion
below).
The \fIword\fP is expanded using tilde
expansion, parameter and variable expansion, arithmetic substituion,
expansion, parameter and variable expansion, arithmetic substitution,
command substitution, process substitution and quote removal.
Each \fIpattern\fP examined is expanded using tilde
expansion, parameter and variable expansion, arithmetic substituion,
expansion, parameter and variable expansion, arithmetic substitution,
command substitution, and process substitution.
If the shell option
.B nocasematch
@@ -1245,6 +1245,11 @@ The following variables are set by the shell:
Expands to the full file name used to invoke this instance of
.BR bash .
.TP
.B BASHPID
Expands to the process id of the current bash process.
This differs from \fB$$\fP under certain circumstances, such as subshells
that do not require bash to be re-initialized.
.TP
.B BASH_ARGC
An array variable whose values are the number of parameters in each
frame of the current bash execution call stack.
@@ -1346,6 +1351,10 @@ This variable is available only in shell functions invoked by the
programmable completion facilities (see \fBProgrammable Completion\fP
below).
.TP
.B COMP_KEY
The key (or final key of a key sequence) used to invoke the current
completion function.
.TP
.B COMP_LINE
The current command line.
This variable is available only in shell functions and external
@@ -1363,6 +1372,20 @@ commands invoked by the
programmable completion facilities (see \fBProgrammable Completion\fP
below).
.TP
.B COMP_TYPE
Set to an integer value corresponding to the type of completion attempted
that caused a completion function to be called:
\fITAB\fP, for normal completion,
\fI?\fP, for listing completions after successive tabs,
\fI!\fP, for listing alternatives on partial word completion,
\fI@\fP, to list completions if the word is not unmodified,
or
\fI%\fP, for menu completion.
This variable is available only in shell functions and external
commands invoked by the
programmable completion facilities (see \fBProgrammable Completion\fP
below).
.TP
.B COMP_WORDBREAKS
The set of characters that the Readline library treats as word
separators when performing word completion.
@@ -1375,6 +1398,8 @@ subsequently reset.
.B COMP_WORDS
An array variable (see \fBArrays\fP below) consisting of the individual
words in the current command line.
The words are split on shell metacharacters as the shell parser would
separate them.
This variable is available only in shell functions invoked by the
programmable completion facilities (see \fBProgrammable Completion\fP
below).
@@ -1408,7 +1433,9 @@ An array variable containing the names of all shell functions
currently in the execution call stack.
The element with index 0 is the name of any currently-executing
shell function.
The bottom-most element is "main".
The bottom-most element is
.if t \f(CW"main"\fP.
.if n "main".
This variable exists only when a shell function is executing.
Assignments to
.SM
@@ -1693,7 +1720,8 @@ command history is not saved when an interactive shell exits.
.B HISTFILESIZE
The maximum number of lines contained in the history file. When this
variable is assigned a value, the history file is truncated, if
necessary, to contain no more than that number of lines. The default
necessary, by removing the oldest entries,
to contain no more than that number of lines. The default
value is 500. The history file is also truncated to this size after
writing it when an interactive shell exits.
.TP
@@ -1724,6 +1752,8 @@ for \fIstrftime\fP(3) to print the time stamp associated with each history
entry displayed by the \fBhistory\fP builtin.
If this variable is set, time stamps are written to the history file so
they may be preserved across shell sessions.
This uses the history comment character to distinguish timestamps from
other history lines.
.TP
.B HOME
The home directory of the current user; the default argument for the
@@ -2427,7 +2457,9 @@ index of the specified array.
Note that a negative offset must be separated from the colon by at least
one space to avoid being confused with the :- expansion.
Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1.
are used, in which case the indexing starts at 1 by default.
If \fIoffset\fP is 0, and the positional parameters are used, \fB$0\fP is
prefixed to the list.
.TP
${\fB!\fP\fIprefix\fP\fB*\fP}
.PD 0
@@ -2439,6 +2471,8 @@ separated by the first character of the
.SM
.B IFS
special variable.
When \fI@\fP is used and the expansion appears within double quotes, each
variable name expands to a separate word.
.TP
${\fB!\fP\fIname\fP[\fI@\fP]}
.PD 0
@@ -2665,10 +2699,18 @@ is unset, or its
value is exactly
.BR <space><tab><newline> ,
the default, then
sequences of
.BR <space> ,
.BR <tab> ,
and
.B <newline>
at the beginning and end of the results of the previous
expansions are ignored, and
any sequence of
.SM
.B IFS
characters serves to delimit words. If
characters not at the beginning or end serves to delimit words.
If
.SM
.B IFS
has a value other than the default, then sequences of
@@ -4169,11 +4211,15 @@ is executed for each child that exits.
.PP
If an attempt to exit
.B bash
is made while jobs are stopped, the shell prints a warning message. The
is made while jobs are stopped (or, if the \fBcheckjobs\fP shell option has
been enabled using the \fBshopt\fP builtin, running), the shell prints a
warning message, and, if the \fBcheckjobs\fP option is enabled, lists the
jobs and their statuses.
The
.B jobs
command may then be used to inspect their status.
command may then be used to inspect their status.
If a second attempt to exit is made without an intervening command,
the shell does not print another warning, and the stopped
the shell does not print another warning, and any stopped
jobs are terminated.
.SH PROMPTING
When executing interactively,
@@ -5450,10 +5496,14 @@ After these matches have been generated, any shell function or command
specified with the \fB\-F\fP and \fB\-C\fP options is invoked.
When the command or function is invoked, the
.SM
.B COMP_LINE
.BR COMP_LINE ,
.SM
.BR COMP_POINT ,
.SM
.BR COMP_KEY ,
and
.SM
.B COMP_POINT
.B COMP_TYPE
variables are assigned values as described above under
\fBShell Variables\fP.
If a shell function is being invoked, the
@@ -5563,6 +5613,13 @@ is truncated, if necessary, to contain no more than
the number of lines specified by the value of
.SM
.BR HISTFILESIZE .
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.
These timestamps are optionally displayed depending on the value of the
.SM
.B HISTTIMEFORMAT
variable.
When an interactive shell exits, the last
.SM
.B $HISTSIZE
@@ -5583,7 +5640,16 @@ If
.SM
.B HISTFILE
is unset, or if the history file is unwritable, the history is
not saved. After saving the history, the history file is truncated
not saved.
If the
.SM
.HISTTIMEFORMAT
variable is set, time stamps are written to the history file, marked
with the history comment character, so
they may be preserved across shell sessions.
This uses the history comment character to distinguish timestamps from
other history lines.
After saving the history, the history file is truncated
to contain no more than
.SM
.B HISTFILESIZE
@@ -5717,6 +5783,9 @@ history expansion mechanism (see the description of
.B histchars
above under
.BR "Shell Variables" ).
The shell uses
the history comment character to mark history timestamps when
writing the history file.
.SS Event Designators
.PP
An event designator is a reference to a command line entry in the
@@ -5976,8 +6045,9 @@ no alias has been defined.
Resume each suspended job \fIjobspec\fP in the background, as if it
had been started with
.BR & .
If \fIjobspec\fP is not present, the shell's notion of the
\fIcurrent job\fP is used.
If
.I jobspec
is not present, the shell's notion of the \fIcurrent job\fP is used.
.B bg
.I jobspec
returns 0 unless run when job control is disabled or, when run with
@@ -6035,13 +6105,6 @@ that they can be re-read.
.B \-P
List current \fBreadline\fP function names and bindings.
.TP
.B \-v
Display \fBreadline\fP variable names and values in such a way that they
can be re-read.
.TP
.B \-V
List current \fBreadline\fP variable names and values.
.TP
.B \-s
Display \fBreadline\fP key sequences bound to macros and the strings
they output in such a way that they can be re-read.
@@ -6050,6 +6113,13 @@ they output in such a way that they can be re-read.
Display \fBreadline\fP key sequences bound to macros and the strings
they output.
.TP
.B \-v
Display \fBreadline\fP variable names and values in such a way that they
can be re-read.
.TP
.B \-V
List current \fBreadline\fP variable names and values.
.TP
.B \-f \fIfilename\fP
Read key bindings from \fIfilename\fP.
.TP
@@ -6222,9 +6292,9 @@ 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\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP]
\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]
.br
[\fB\-X\fP \fIfilterpat\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP] \fIname\fP [\fIname ...\fP]
[\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 ...]
@@ -6490,8 +6560,11 @@ Mark \fIname\fPs for export to subsequent commands via the environment.
.PD
.PP
Using `+' instead of `\-'
turns off the attribute instead, with the exception that \fB+a\fP
may not be used to destroy an array variable. When used in a function,
turns off the attribute instead,
with the exceptions that \fB+a\fP
may not be used to destroy an array variable and \fB+r\fB will not
remove the readonly attribute.
When used in a function,
makes each
\fIname\fP local, as with the
.B local
@@ -6512,7 +6585,7 @@ an attempt is made to turn off array status for an array variable,
or an attempt is made to display a non-existent function with \fB\-f\fP.
.RE
.TP
.B dirs [\fB\-clpv\fP] [+\fIn\fP] [\-\fIn\fP]
.B dirs [+\fIn\fP] [\-\fIn\fP] [\fB\-cplv\fP]
Without options, displays the list of currently remembered directories.
The default display is on a single line with directory names separated
by spaces.
@@ -6560,6 +6633,10 @@ of the directory stack.
Without options, each
.I jobspec
is removed from the table of active jobs.
If
.I jobspec
is not present, and neither \fB\-a\fB nor \fB\-r\fP is supplied,
the shell's notion of the \fIcurrent job\fP is used.
If the \fB\-h\fP option is given, each
.I jobspec
is not removed from the table, but is marked so that
@@ -6641,17 +6718,13 @@ backslash
the eight-bit character whose value is the octal value \fInnn\fP
(zero to three octal digits)
.TP
.B \e\fInnn\fP
the eight-bit character whose value is the octal value \fInnn\fP
(one to three octal digits)
.TP
.B \ex\fIHH\fP
the eight-bit character whose value is the hexadecimal value \fIHH\fP
(one or two hex digits)
.PD
.RE
.TP
\fBenable\fP [\fB\-adnps\fP] [\fB\-f\fP \fIfilename\fP] [\fIname\fP ...]
\fBenable\fP [\fB\-a\fP] [\fB\-dnps\fP] [\fB\-f\fP \fIfilename\fP] [\fIname\fP ...]
Enable and disable builtin shell commands.
Disabling a builtin allows a disk command which has the same name
as a shell builtin to be executed without specifying a full pathname,
@@ -6712,7 +6785,7 @@ become the arguments to \fIcommand\fP.
If the
.B \-l
option is supplied,
the shell places a dash at the beginning of the zeroth arg passed to
the shell places a dash at the beginning of the zeroth argument passed to
.IR command .
This is what
.IR login (1)
@@ -6783,7 +6856,7 @@ is supplied with a
.I name
that is not a function.
.TP
\fBfc\fP [\fB\-e\fP \fIename\fP] [\fB\-nlr\fP] [\fIfirst\fP] [\fIlast\fP]
\fBfc\fP [\fB\-e\fP \fIename\fP] [\fB\-lnr\fP] [\fIfirst\fP] [\fIlast\fP]
.PD 0
.TP
\fBfc\fP \fB\-s\fP [\fIpat\fP=\fIrep\fP] [\fIcmd\fP]
@@ -7117,7 +7190,11 @@ are added.
.PD
.PP
If the \fBHISTTIMEFORMAT\fP is set, the time stamp information
associated with each history entry is written to the history file.
associated with each history entry is written to the history file,
marked with the history comment character.
When the history file is read, lines beginning with the history
comment character followed immediately by a digit are interpreted
as timestamps for the previous history line.
The return value is 0 unless an invalid option is encountered, an
error occurs while reading or writing the history file, an invalid
\fIoffset\fP is supplied as an argument to \fB\-d\fP, or the
@@ -7269,6 +7346,10 @@ Arguments, if supplied, have the following meanings:
.RS
.PD 0
.TP
.B \-n
Suppresses the normal change of directory when removing directories
from the stack, so that only the stack is manipulated.
.TP
\fB+\fP\fIn\fP
Removes the \fIn\fPth entry counting from the left of the list
shown by
@@ -7292,10 +7373,6 @@ removes the last directory,
.if n ``popd -1''
.if t \f(CWpopd -1\fP
the next to last.
.TP
.B \-n
Suppresses the normal change of directory when removing directories
from the stack, so that only the stack is manipulated.
.PD
.PP
If the
@@ -7334,10 +7411,10 @@ extra format specifications behave as if a zero value or null string, as
appropriate, had been supplied. The return value is zero on success,
non-zero on failure.
.TP
\fBpushd\fP [\fB\-n\fP] [\fIdir\fP]
\fBpushd\fP [\fB\-n\fP] [+\fIn\fP] [\-\fIn\fP]
.PD 0
.TP
\fBpushd\fP [\fB\-n\fP] [+\fIn\fP] [\-\fIn\fP]
\fBpushd\fP [\fB\-n\fP] [\fIdir\fP]
.PD
Adds a directory to the top of the directory stack, or rotates
the stack, making the new top of the stack the current working
@@ -7347,6 +7424,10 @@ Arguments, if supplied, have the following meanings:
.RS
.PD 0
.TP
.B \-n
Suppresses the normal change of directory when adding directories
to the stack, so that only the stack is manipulated.
.TP
\fB+\fP\fIn\fP
Rotates the stack so that the \fIn\fPth directory
(counting from the left of the list shown by
@@ -7360,10 +7441,6 @@ Rotates the stack so that the \fIn\fPth directory
.BR dirs ,
starting with zero) is at the top.
.TP
.B \-n
Suppresses the normal change of directory when adding directories
to the stack, so that only the stack is manipulated.
.TP
.I dir
Adds
.I dir
@@ -7404,7 +7481,7 @@ The return status is 0 unless an error occurs while
reading the name of the current directory or an
invalid option is supplied.
.TP
\fBread\fP [\fB\-ers\fP] [\fB\-u\fP \fIfd\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-a\fP \fIaname\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-n\fP \fInchars\fP] [\fB\-d\fP \fIdelim\fP] [\fIname\fP ...]
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-n\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
One line is read from the standard input, or from the file descriptor
\fIfd\fP supplied as an argument to the \fB\-u\fP option, and the first word
is assigned to the first
@@ -7540,7 +7617,11 @@ the return status is false.
Any command associated with the \fBRETURN\fP trap is executed
before execution resumes after the function or script.
.TP
\fBset\fP [\fB\-\-abefhkmnptuvxBCHP\fP] [\fB\-o\fP \fIoption\fP] [\fIarg\fP ...]
\fBset\fP [\fB\-\-abefhkmnptuvxBCEHPT\fP] [\fB\-o\fP \fIoption\fP] [\fIarg\fP ...]
.PD 0
.TP
\fBset\fP [\fB+abefhkmnptuvxBCEHPT\fP] [\fB+o\fP \fIoption\fP] [\fIarg\fP ...]
.PD
Without options, the name and value of each shell variable are displayed
in a format that can be reused as input
for setting or resetting the currently-set variables.
@@ -7579,12 +7660,14 @@ or
.B until
keyword,
part of the test in an
.I if
.B if
statement, part of a
.B &&
or
.B \(bv\(bv
list, or if the command's return value is
list,
any command in a pipeline but the last,
or if the command's return value is
being inverted via
.BR ! .
A trap on \fBERR\fP, if set, is executed before the shell exits.
@@ -7940,6 +8023,11 @@ The list of \fBshopt\fP options is:
.if n .sp 1v
.PD 0
.TP 8
.B autocd
If set, a command name that is the name of a directory is executed as if
it were the argument to the \fBcd\fP command.
This option is only used by interactive shells.
.TP 8
.B cdable_vars
If set, an argument to the
.B cd
@@ -7962,6 +8050,13 @@ If set, \fBbash\fP checks that a command found in the hash
table exists before trying to execute it. If a hashed command no
longer exists, a normal path search is performed.
.TP 8
.B checkjobs
If set, bash lists the status of any stopped and running jobs before
exiting an interactive shell. If any jobs are running, this causes
the exit to be deferred until a second exit is attempted without an
intervening command (see \fBJOB CONTROL\fP above). The shell always
postpones exiting if any jobs are stopped.
.TP 8
.B checkwinsize
If set, \fBbash\fP checks the window size after each command
and, if necessary, updates the values of
@@ -8406,8 +8501,8 @@ the command
is executed each time a shell function or a script executed with the
\fB.\fP or \fBsource\fP builtins finishes executing.
Signals ignored upon entry to the shell cannot be trapped or reset.
Trapped signals are reset to their original values in a child
process when it is created.
Trapped signals that are not being ignored are reset to their original
values in a child process when it is created.
The return status is false if any
.I sigspec
is invalid; otherwise
@@ -8530,7 +8625,7 @@ The maximum size of a process's data segment
The maximum scheduling priority ("nice")
.TP
.B \-f
The maximum size of files created by the shell
The maximum size of files written by the shell and its children
.TP
.B \-i
The maximum number of pending signals
+167 -61
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2006 Jan 26<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2007 January 12<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -42,7 +42,7 @@ bash - GNU Bourne-Again SHell
<H3>COPYRIGHT</H3>
Bash is Copyright &#169; 1989-2005 by the Free Software Foundation, Inc.
Bash is Copyright &#169; 1989-2007 by the Free Software Foundation, Inc.
<A NAME="lbAE">&nbsp;</A>
<H3>DESCRIPTION</H3>
@@ -1051,10 +1051,10 @@ as for pathname expansion (see
below).
The <I>word</I> is expanded using tilde
expansion, parameter and variable expansion, arithmetic substituion,
expansion, parameter and variable expansion, arithmetic substitution,
command substitution, process substitution and quote removal.
Each <I>pattern</I> examined is expanded using tilde
expansion, parameter and variable expansion, arithmetic substituion,
expansion, parameter and variable expansion, arithmetic substitution,
command substitution, and process substitution.
If the shell option
<B>nocasematch</B>
@@ -1625,6 +1625,12 @@ The following variables are set by the shell:
Expands to the full file name used to invoke this instance of
<B>bash</B>.
<DT><B>BASHPID</B>
<DD>
Expands to the process id of the current bash process.
This differs from <B>$$</B> under certain circumstances, such as subshells
that do not require bash to be re-initialized.
<DT><B>BASH_ARGC</B>
<DD>
@@ -1751,6 +1757,11 @@ cursor position.
This variable is available only in shell functions invoked by the
programmable completion facilities (see <B>Programmable Completion</B>
below).
<DT><B>COMP_KEY</B>
<DD>
The key (or final key of a key sequence) used to invoke the current
completion function.
<DT><B>COMP_LINE</B>
<DD>
@@ -1770,6 +1781,21 @@ This variable is available only in shell functions and external
commands invoked by the
programmable completion facilities (see <B>Programmable Completion</B>
below).
<DT><B>COMP_TYPE</B>
<DD>
Set to an integer value corresponding to the type of completion attempted
that caused a completion function to be called:
<I>TAB</I>, for normal completion,
<I>?</I>, for listing completions after successive tabs,
<I>!</I>, for listing alternatives on partial word completion,
<I>@</I>, to list completions if the word is not unmodified,
or
<I>%</I>, for menu completion.
This variable is available only in shell functions and external
commands invoked by the
programmable completion facilities (see <B>Programmable Completion</B>
below).
<DT><B>COMP_WORDBREAKS</B>
<DD>
@@ -1786,6 +1812,8 @@ subsequently reset.
<DD>
An array variable (see <B>Arrays</B> below) consisting of the individual
words in the current command line.
The words are split on shell metacharacters as the shell parser would
separate them.
This variable is available only in shell functions invoked by the
programmable completion facilities (see <B>Programmable Completion</B>
below).
@@ -1827,7 +1855,9 @@ An array variable containing the names of all shell functions
currently in the execution call stack.
The element with index 0 is the name of any currently-executing
shell function.
The bottom-most element is &quot;main&quot;.
The bottom-most element is
<TT>&quot;main&quot;</TT>.
This variable exists only when a shell function is executing.
Assignments to
<FONT SIZE=-1><B>FUNCNAME</B>
@@ -2192,7 +2222,8 @@ command history is not saved when an interactive shell exits.
<DD>
The maximum number of lines contained in the history file. When this
variable is assigned a value, the history file is truncated, if
necessary, to contain no more than that number of lines. The default
necessary, by removing the oldest entries,
to contain no more than that number of lines. The default
value is 500. The history file is also truncated to this size after
writing it when an interactive shell exits.
<DT><B>HISTIGNORE</B>
@@ -2229,6 +2260,8 @@ for <I>strftime</I>(3) to print the time stamp associated with each history
entry displayed by the <B>history</B> builtin.
If this variable is set, time stamps are written to the history file so
they may be preserved across shell sessions.
This uses the history comment character to distinguish timestamps from
other history lines.
<DT><B>HOME</B>
<DD>
@@ -3118,7 +3151,9 @@ index of the specified array.
Note that a negative offset must be separated from the colon by at least
one space to avoid being confused with the :- expansion.
Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1.
are used, in which case the indexing starts at 1 by default.
If <I>offset</I> is 0, and the positional parameters are used, <B>$0</B> is
prefixed to the list.
<DT>${<B>!</B><I>prefix</I><B>*</B>}<DD>
<DT>${<B>!</B><I>prefix</I><B>@</B>}<DD>
@@ -3129,6 +3164,8 @@ separated by the first character of the
</FONT>
special variable.
When <I>@</I> is used and the expansion appears within double quotes, each
variable name expands to a separate word.
<DT>${<B>!</B><I>name</I>[<I>@</I>]}<DD>
<DT>${<B>!</B><I>name</I>[<I>*</I>]}<DD>
@@ -3415,11 +3452,22 @@ value is exactly
<B>&lt;space&gt;&lt;tab&gt;&lt;newline&gt;</B>,
the default, then
sequences of
<B>&lt;space&gt;</B>,
<B>&lt;tab&gt;</B>,
and
<B>&lt;newline&gt;</B>
at the beginning and end of the results of the previous
expansions are ignored, and
any sequence of
<FONT SIZE=-1><B>IFS</B>
</FONT>
characters serves to delimit words. If
characters not at the beginning or end serves to delimit words.
If
<FONT SIZE=-1><B>IFS</B>
</FONT>
@@ -5409,12 +5457,16 @@ is executed for each child that exits.
If an attempt to exit
<B>bash</B>
is made while jobs are stopped, the shell prints a warning message. The
is made while jobs are stopped (or, if the <B>checkjobs</B> shell option has
been enabled using the <B>shopt</B> builtin, running), the shell prints a
warning message, and, if the <B>checkjobs</B> option is enabled, lists the
jobs and their statuses.
The
<B>jobs</B>
command may then be used to inspect their status.
command may then be used to inspect their status.
If a second attempt to exit is made without an intervening command,
the shell does not print another warning, and the stopped
the shell does not print another warning, and any stopped
jobs are terminated.
<A NAME="lbCC">&nbsp;</A>
<H3>PROMPTING</H3>
@@ -7084,11 +7136,17 @@ completed, and the matching words become the possible completions.
After these matches have been generated, any shell function or command
specified with the <B>-F</B> and <B>-C</B> options is invoked.
When the command or function is invoked, the
<FONT SIZE=-1><B>COMP_LINE</B>
<FONT SIZE=-1><B>COMP_LINE</B>,
</FONT>
<FONT SIZE=-1><B>COMP_POINT</B>,
</FONT>
<FONT SIZE=-1><B>COMP_KEY</B>,
</FONT>
and
<FONT SIZE=-1><B>COMP_POINT</B>
<FONT SIZE=-1><B>COMP_TYPE</B>
</FONT>
variables are assigned values as described above under
@@ -7223,6 +7281,14 @@ the number of lines specified by the value of
<FONT SIZE=-1><B>HISTFILESIZE</B>.
</FONT>
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.
These timestamps are optionally displayed depending on the value of the
<FONT SIZE=-1><B>HISTTIMEFORMAT</B>
</FONT>
variable.
When an interactive shell exits, the last
<FONT SIZE=-1><B>$HISTSIZE</B>
@@ -7249,7 +7315,16 @@ If
</FONT>
is unset, or if the history file is unwritable, the history is
not saved. After saving the history, the history file is truncated
not saved.
If the
<FONT SIZE=-1>
</FONT>
variable is set, time stamps are written to the history file, marked
with the history comment character, so
they may be preserved across shell sessions.
This uses the history comment character to distinguish timestamps from
other history lines.
After saving the history, the history file is truncated
to contain no more than
<FONT SIZE=-1><B>HISTFILESIZE</B>
@@ -7422,6 +7497,9 @@ history expansion mechanism (see the description of
above under
<B>Shell Variables</B>).
The shell uses
the history comment character to mark history timestamps when
writing the history file.
<A NAME="lbCW">&nbsp;</A>
<H4>Event Designators</H4>
@@ -7771,8 +7849,10 @@ Resume each suspended job <I>jobspec</I> in the background, as if it
had been started with
<B>&amp;</B>.
If <I>jobspec</I> is not present, the shell's notion of the
<I>current job</I> is used.
If
<I>jobspec</I>
is not present, the shell's notion of the <I>current job</I> is used.
<B>bg</B>
<I>jobspec</I>
@@ -7837,15 +7917,6 @@ that they can be re-read.
<DD>
List current <B>readline</B> function names and bindings.
<DT><B>-v</B>
<DD>
Display <B>readline</B> variable names and values in such a way that they
can be re-read.
<DT><B>-V</B>
<DD>
List current <B>readline</B> variable names and values.
<DT><B>-s</B>
<DD>
@@ -7856,6 +7927,15 @@ they output in such a way that they can be re-read.
<DD>
Display <B>readline</B> key sequences bound to macros and the strings
they output.
<DT><B>-v</B>
<DD>
Display <B>readline</B> variable names and values in such a way that they
can be re-read.
<DT><B>-V</B>
<DD>
List current <B>readline</B> variable names and values.
<DT><B>-f </B><I>filename</I>
<DD>
@@ -8072,10 +8152,10 @@ will be displayed.
<P>
The return value is true unless an invalid option is supplied, or no
matches were generated.
<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-P</B> <I>prefix</I>] [<B>-S</B> <I>suffix</I>]<DD>
<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD>
<BR>
[<B>-X</B> <I>filterpat</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>] <I>name</I> [<I>name ...</I>]
[<B>-X</B> <I>filterpat</I>] [<B>-P</B> <I>prefix</I>] [<B>-S</B> <I>suffix</I>] <I>name</I> [<I>name ...</I>]
<DT><B>complete</B> <B>-pr</B> [<I>name</I> ...]<DD>
@@ -8395,10 +8475,13 @@ Mark <I>name</I>s for export to subsequent commands via the environment.
<P>
Using `+' instead of `-'
turns off the attribute instead, with the exception that <B>+a</B>
may not be used to destroy an array variable. When used in a function,
turns off the attribute instead,
with the exceptions that <B>+a</B>
may not be used to destroy an array variable and <B>+r will not
remove the readonly attribute.
When used in a function,
makes each
<I>name</I> local, as with the
</B><I>name</I> local, as with the
<B>local</B>
command.
@@ -8419,7 +8502,7 @@ an attempt is made to turn off array status for an array variable,
or an attempt is made to display a non-existent function with <B>-f</B>.
</DL>
<DT><B>dirs [-clpv</B>] [+<I>n</I>] [-<I>n</I>]
<DT><B>dirs [+</B><I>n</I>] [-<I>n</I>] [<B>-cplv</B>]
<DD>
Without options, displays the list of currently remembered directories.
@@ -8479,6 +8562,11 @@ Without options, each
<I>jobspec</I>
is removed from the table of active jobs.
If
<I>jobspec</I>
is not present, and neither <B>-a nor -r</B> is supplied,
the shell's notion of the <I>current job</I> is used.
If the <B>-h</B> option is given, each
<I>jobspec</I>
@@ -8584,11 +8672,6 @@ backslash
<DD>
the eight-bit character whose value is the octal value <I>nnn</I>
(zero to three octal digits)
<DT><B>\</B><I>nnn</I>
<DD>
the eight-bit character whose value is the octal value <I>nnn</I>
(one to three octal digits)
<DT><B>\x</B><I>HH</I>
<DD>
@@ -8597,7 +8680,7 @@ the eight-bit character whose value is the hexadecimal value <I>HH</I>
</DL></DL>
<DT><B>enable</B> [<B>-adnps</B>] [<B>-f</B> <I>filename</I>] [<I>name</I> ...]<DD>
<DT><B>enable</B> [<B>-a</B>] [<B>-dnps</B>] [<B>-f</B> <I>filename</I>] [<I>name</I> ...]<DD>
Enable and disable builtin shell commands.
Disabling a builtin allows a disk command which has the same name
as a shell builtin to be executed without specifying a full pathname,
@@ -8671,7 +8754,7 @@ If the
<B>-l</B>
option is supplied,
the shell places a dash at the beginning of the zeroth arg passed to
the shell places a dash at the beginning of the zeroth argument passed to
<I>command</I>.
This is what
@@ -8760,7 +8843,7 @@ is supplied with a
<I>name</I>
that is not a function.
<DT><B>fc</B> [<B>-e</B> <I>ename</I>] [<B>-nlr</B>] [<I>first</I>] [<I>last</I>]<DD>
<DT><B>fc</B> [<B>-e</B> <I>ename</I>] [<B>-lnr</B>] [<I>first</I>] [<I>last</I>]<DD>
<DT><B>fc</B> <B>-s</B> [<I>pat</I>=<I>rep</I>] [<I>cmd</I>]<DD>
@@ -9168,7 +9251,11 @@ are added.
<P>
If the <B>HISTTIMEFORMAT</B> is set, the time stamp information
associated with each history entry is written to the history file.
associated with each history entry is written to the history file,
marked with the history comment character.
When the history file is read, lines beginning with the history
comment character followed immediately by a digit are interpreted
as timestamps for the previous history line.
The return value is 0 unless an invalid option is encountered, an
error occurs while reading or writing the history file, an invalid
<I>offset</I> is supplied as an argument to <B>-d</B>, or the
@@ -9361,6 +9448,11 @@ Arguments, if supplied, have the following meanings:
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT><B>-n</B>
<DD>
Suppresses the normal change of directory when removing directories
from the stack, so that only the stack is manipulated.
<DT><B>+</B><I>n</I><DD>
Removes the <I>n</I>th entry counting from the left of the list
shown by
@@ -9385,11 +9477,6 @@ removes the last directory,
<TT>popd -1</TT>
the next to last.
<DT><B>-n</B>
<DD>
Suppresses the normal change of directory when removing directories
from the stack, so that only the stack is manipulated.
</DL>
<P>
@@ -9432,10 +9519,10 @@ If the <I>format</I> requires more <I>arguments</I> than are supplied, the
extra format specifications behave as if a zero value or null string, as
appropriate, had been supplied. The return value is zero on success,
non-zero on failure.
<DT><B>pushd</B> [<B>-n</B>] [<I>dir</I>]<DD>
<DT><B>pushd</B> [<B>-n</B>] [+<I>n</I>] [-<I>n</I>]<DD>
<DT><B>pushd</B> [<B>-n</B>] [<I>dir</I>]<DD>
Adds a directory to the top of the directory stack, or rotates
the stack, making the new top of the stack the current working
directory. With no arguments, exchanges the top two directories
@@ -9444,6 +9531,11 @@ Arguments, if supplied, have the following meanings:
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT><B>-n</B>
<DD>
Suppresses the normal change of directory when adding directories
to the stack, so that only the stack is manipulated.
<DT><B>+</B><I>n</I><DD>
Rotates the stack so that the <I>n</I>th directory
(counting from the left of the list shown by
@@ -9457,11 +9549,6 @@ Rotates the stack so that the <I>n</I>th directory
<B>dirs</B>,
starting with zero) is at the top.
<DT><B>-n</B>
<DD>
Suppresses the normal change of directory when adding directories
to the stack, so that only the stack is manipulated.
<DT><I>dir</I>
<DD>
@@ -9515,7 +9602,7 @@ option is used, the pathname printed may contain symbolic links.
The return status is 0 unless an error occurs while
reading the name of the current directory or an
invalid option is supplied.
<DT><B>read</B> [<B>-ers</B>] [<B>-u</B> <I>fd</I>] [<B>-t</B> <I>timeout</I>] [<B>-a</B> <I>aname</I>] [<B>-p</B> <I>prompt</I>] [<B>-n</B> <I>nchars</I>] [<B>-d</B> <I>delim</I>] [<I>name</I> ...]<DD>
<DT><B>read</B> [<B>-ers</B>] [<B>-a</B> <I>aname</I>] [<B>-d</B> <I>delim</I>] [<B>-n</B> <I>nchars</I>] [<B>-p</B> <I>prompt</I>] [<B>-t</B> <I>timeout</I>] [<B>-u</B> <I>fd</I>] [<I>name</I> ...]<DD>
One line is read from the standard input, or from the file descriptor
<I>fd</I> supplied as an argument to the <B>-u</B> option, and the first word
is assigned to the first
@@ -9684,7 +9771,10 @@ function and not during execution of a script by <B>.</B>,
the return status is false.
Any command associated with the <B>RETURN</B> trap is executed
before execution resumes after the function or script.
<DT><B>set</B> [<B>--abefhkmnptuvxBCHP</B>] [<B>-o</B> <I>option</I>] [<I>arg</I> ...]<DD>
<DT><B>set</B> [<B>--abefhkmnptuvxBCEHPT</B>] [<B>-o</B> <I>option</I>] [<I>arg</I> ...]<DD>
<DT><B>set</B> [<B>+abefhkmnptuvxBCEHPT</B>] [<B>+o</B> <I>option</I>] [<I>arg</I> ...]<DD>
Without options, the name and value of each shell variable are displayed
in a format that can be reused as input
for setting or resetting the currently-set variables.
@@ -9734,7 +9824,7 @@ or
keyword,
part of the test in an
<I>if</I>
<B>if</B>
statement, part of a
<B>&amp;&amp;</B>
@@ -9742,7 +9832,9 @@ statement, part of a
or
<B>||</B>
list, or if the command's return value is
list,
any command in a pipeline but the last,
or if the command's return value is
being inverted via
<B>!</B>.
@@ -10219,6 +10311,12 @@ The list of <B>shopt</B> options is:
<DL COMPACT>
<DT><B>autocd</B>
<DD>
If set, a command name that is the name of a directory is executed as if
it were the argument to the <B>cd</B> command.
This option is only used by interactive shells.
<DT><B>cdable_vars</B>
<DD>
@@ -10246,6 +10344,14 @@ This option is only used by interactive shells.
If set, <B>bash</B> checks that a command found in the hash
table exists before trying to execute it. If a hashed command no
longer exists, a normal path search is performed.
<DT><B>checkjobs</B>
<DD>
If set, bash lists the status of any stopped and running jobs before
exiting an interactive shell. If any jobs are running, this causes
the exit to be deferred until a second exit is attempted without an
intervening command (see <B>JOB CONTROL</B> above). The shell always
postpones exiting if any jobs are stopped.
<DT><B>checkwinsize</B>
<DD>
@@ -10801,8 +10907,8 @@ the command
is executed each time a shell function or a script executed with the
<B>.</B> or <B>source</B> builtins finishes executing.
Signals ignored upon entry to the shell cannot be trapped or reset.
Trapped signals are reset to their original values in a child
process when it is created.
Trapped signals that are not being ignored are reset to their original
values in a child process when it is created.
The return status is false if any
<I>sigspec</I>
@@ -10963,7 +11069,7 @@ The maximum scheduling priority (&quot;nice&quot;)
<DT><B>-f</B>
<DD>
The maximum size of files created by the shell
The maximum size of files written by the shell and its children
<DT><B>-i</B>
<DD>
@@ -11435,7 +11541,7 @@ Array variables may not (yet) be exported.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash-3.2<TH ALIGN=CENTER width=33%>2006 Jan 26<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash-3.2<TH ALIGN=CENTER width=33%>2007 January 12<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -11539,6 +11645,6 @@ Array variables may not (yet) be exported.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 26 January 2006 11:19:07 EST
Time: 16 January 2007 11:15:22 EST
</BODY>
</HTML>
BIN
View File
Binary file not shown.
+4969 -4883
View File
File diff suppressed because it is too large Load Diff
+90 -81
View File
@@ -98,13 +98,13 @@
@xrdef{Process Substitution-pg}{22}
@xrdef{Process Substitution-snt}{Section@tie 3.5.6}
@xrdef{Word Splitting-title}{Word Splitting}
@xrdef{Word Splitting-pg}{22}
@xrdef{Word Splitting-pg}{23}
@xrdef{Word Splitting-snt}{Section@tie 3.5.7}
@xrdef{Filename Expansion-title}{Filename Expansion}
@xrdef{Filename Expansion-pg}{23}
@xrdef{Filename Expansion-snt}{Section@tie 3.5.8}
@xrdef{Pattern Matching-title}{Pattern Matching}
@xrdef{Pattern Matching-pg}{23}
@xrdef{Pattern Matching-pg}{24}
@xrdef{Pattern Matching-snt}{Section@tie 3.5.8.1}
@xrdef{Quote Removal-title}{Quote Removal}
@xrdef{Quote Removal-pg}{25}
@@ -122,10 +122,10 @@
@xrdef{Command Search and Execution-pg}{29}
@xrdef{Command Search and Execution-snt}{Section@tie 3.7.2}
@xrdef{Command Execution Environment-title}{Command Execution Environment}
@xrdef{Command Execution Environment-pg}{29}
@xrdef{Command Execution Environment-pg}{30}
@xrdef{Command Execution Environment-snt}{Section@tie 3.7.3}
@xrdef{Environment-title}{Environment}
@xrdef{Environment-pg}{30}
@xrdef{Environment-pg}{31}
@xrdef{Environment-snt}{Section@tie 3.7.4}
@xrdef{Exit Status-title}{Exit Status}
@xrdef{Exit Status-pg}{31}
@@ -145,225 +145,234 @@
@xrdef{Bash Builtins-title}{Bash Builtin Commands}
@xrdef{Bash Builtins-pg}{41}
@xrdef{Bash Builtins-snt}{Section@tie 4.2}
@xrdef{Modifying Shell Behavior-title}{Modifying Shell Behavior}
@xrdef{Modifying Shell Behavior-pg}{49}
@xrdef{Modifying Shell Behavior-snt}{Section@tie 4.3}
@xrdef{The Set Builtin-title}{The Set Builtin}
@xrdef{The Set Builtin-pg}{53}
@xrdef{The Set Builtin-snt}{Section@tie 4.3}
@xrdef{The Set Builtin-pg}{49}
@xrdef{The Set Builtin-snt}{Section@tie 4.3.1}
@xrdef{The Shopt Builtin-title}{The Shopt Builtin}
@xrdef{The Shopt Builtin-pg}{52}
@xrdef{The Shopt Builtin-snt}{Section@tie 4.3.2}
@xrdef{Special Builtins-title}{Special Builtins}
@xrdef{Special Builtins-pg}{56}
@xrdef{Special Builtins-pg}{57}
@xrdef{Special Builtins-snt}{Section@tie 4.4}
@xrdef{Shell Variables-title}{Shell Variables}
@xrdef{Shell Variables-pg}{57}
@xrdef{Shell Variables-pg}{59}
@xrdef{Shell Variables-snt}{Chapter@tie 5}
@xrdef{Bourne Shell Variables-title}{Bourne Shell Variables}
@xrdef{Bourne Shell Variables-pg}{57}
@xrdef{Bourne Shell Variables-pg}{59}
@xrdef{Bourne Shell Variables-snt}{Section@tie 5.1}
@xrdef{Bash Variables-title}{Bash Variables}
@xrdef{Bash Variables-pg}{57}
@xrdef{Bash Variables-pg}{59}
@xrdef{Bash Variables-snt}{Section@tie 5.2}
@xrdef{Bash Features-title}{Bash Features}
@xrdef{Bash Features-pg}{67}
@xrdef{Bash Features-pg}{69}
@xrdef{Bash Features-snt}{Chapter@tie 6}
@xrdef{Invoking Bash-title}{Invoking Bash}
@xrdef{Invoking Bash-pg}{67}
@xrdef{Invoking Bash-pg}{69}
@xrdef{Invoking Bash-snt}{Section@tie 6.1}
@xrdef{Bash Startup Files-title}{Bash Startup Files}
@xrdef{Bash Startup Files-pg}{69}
@xrdef{Bash Startup Files-pg}{71}
@xrdef{Bash Startup Files-snt}{Section@tie 6.2}
@xrdef{Interactive Shells-title}{Interactive Shells}
@xrdef{Interactive Shells-pg}{71}
@xrdef{Interactive Shells-pg}{73}
@xrdef{Interactive Shells-snt}{Section@tie 6.3}
@xrdef{What is an Interactive Shell?-title}{What is an Interactive Shell?}
@xrdef{What is an Interactive Shell?-pg}{71}
@xrdef{What is an Interactive Shell?-pg}{73}
@xrdef{What is an Interactive Shell?-snt}{Section@tie 6.3.1}
@xrdef{Is this Shell Interactive?-title}{Is this Shell Interactive?}
@xrdef{Is this Shell Interactive?-pg}{71}
@xrdef{Is this Shell Interactive?-pg}{73}
@xrdef{Is this Shell Interactive?-snt}{Section@tie 6.3.2}
@xrdef{Interactive Shell Behavior-title}{Interactive Shell Behavior}
@xrdef{Interactive Shell Behavior-pg}{71}
@xrdef{Interactive Shell Behavior-pg}{73}
@xrdef{Interactive Shell Behavior-snt}{Section@tie 6.3.3}
@xrdef{Bash Conditional Expressions-title}{Bash Conditional Expressions}
@xrdef{Bash Conditional Expressions-pg}{73}
@xrdef{Bash Conditional Expressions-pg}{75}
@xrdef{Bash Conditional Expressions-snt}{Section@tie 6.4}
@xrdef{Shell Arithmetic-title}{Shell Arithmetic}
@xrdef{Shell Arithmetic-pg}{74}
@xrdef{Shell Arithmetic-pg}{76}
@xrdef{Shell Arithmetic-snt}{Section@tie 6.5}
@xrdef{Aliases-title}{Aliases}
@xrdef{Aliases-pg}{75}
@xrdef{Aliases-pg}{77}
@xrdef{Aliases-snt}{Section@tie 6.6}
@xrdef{Arrays-title}{Arrays}
@xrdef{Arrays-pg}{76}
@xrdef{Arrays-pg}{78}
@xrdef{Arrays-snt}{Section@tie 6.7}
@xrdef{The Directory Stack-title}{The Directory Stack}
@xrdef{The Directory Stack-pg}{77}
@xrdef{The Directory Stack-pg}{79}
@xrdef{The Directory Stack-snt}{Section@tie 6.8}
@xrdef{Directory Stack Builtins-title}{Directory Stack Builtins}
@xrdef{Directory Stack Builtins-pg}{77}
@xrdef{Directory Stack Builtins-pg}{79}
@xrdef{Directory Stack Builtins-snt}{Section@tie 6.8.1}
@xrdef{Printing a Prompt-title}{Controlling the Prompt}
@xrdef{Printing a Prompt-pg}{79}
@xrdef{Printing a Prompt-pg}{81}
@xrdef{Printing a Prompt-snt}{Section@tie 6.9}
@xrdef{The Restricted Shell-title}{The Restricted Shell}
@xrdef{The Restricted Shell-pg}{80}
@xrdef{The Restricted Shell-pg}{82}
@xrdef{The Restricted Shell-snt}{Section@tie 6.10}
@xrdef{Bash POSIX Mode-title}{Bash POSIX Mode}
@xrdef{Bash POSIX Mode-pg}{80}
@xrdef{Bash POSIX Mode-pg}{82}
@xrdef{Bash POSIX Mode-snt}{Section@tie 6.11}
@xrdef{Job Control-title}{Job Control}
@xrdef{Job Control-pg}{85}
@xrdef{Job Control-pg}{87}
@xrdef{Job Control-snt}{Chapter@tie 7}
@xrdef{Job Control Basics-title}{Job Control Basics}
@xrdef{Job Control Basics-pg}{85}
@xrdef{Job Control Basics-pg}{87}
@xrdef{Job Control Basics-snt}{Section@tie 7.1}
@xrdef{Job Control Builtins-title}{Job Control Builtins}
@xrdef{Job Control Builtins-pg}{86}
@xrdef{Job Control Builtins-pg}{88}
@xrdef{Job Control Builtins-snt}{Section@tie 7.2}
@xrdef{Job Control Variables-title}{Job Control Variables}
@xrdef{Job Control Variables-pg}{88}
@xrdef{Job Control Variables-pg}{90}
@xrdef{Job Control Variables-snt}{Section@tie 7.3}
@xrdef{Command Line Editing-title}{Command Line Editing}
@xrdef{Command Line Editing-pg}{89}
@xrdef{Command Line Editing-pg}{91}
@xrdef{Command Line Editing-snt}{Chapter@tie 8}
@xrdef{Introduction and Notation-title}{Introduction to Line Editing}
@xrdef{Introduction and Notation-pg}{89}
@xrdef{Introduction and Notation-pg}{91}
@xrdef{Introduction and Notation-snt}{Section@tie 8.1}
@xrdef{Readline Interaction-title}{Readline Interaction}
@xrdef{Readline Interaction-pg}{89}
@xrdef{Readline Interaction-pg}{91}
@xrdef{Readline Interaction-snt}{Section@tie 8.2}
@xrdef{Readline Bare Essentials-title}{Readline Bare Essentials}
@xrdef{Readline Bare Essentials-pg}{89}
@xrdef{Readline Bare Essentials-pg}{91}
@xrdef{Readline Bare Essentials-snt}{Section@tie 8.2.1}
@xrdef{Readline Movement Commands-title}{Readline Movement Commands}
@xrdef{Readline Movement Commands-pg}{90}
@xrdef{Readline Movement Commands-pg}{92}
@xrdef{Readline Movement Commands-snt}{Section@tie 8.2.2}
@xrdef{Readline Killing Commands-title}{Readline Killing Commands}
@xrdef{Readline Killing Commands-pg}{91}
@xrdef{Readline Killing Commands-pg}{93}
@xrdef{Readline Killing Commands-snt}{Section@tie 8.2.3}
@xrdef{Readline Arguments-title}{Readline Arguments}
@xrdef{Readline Arguments-pg}{91}
@xrdef{Readline Arguments-pg}{93}
@xrdef{Readline Arguments-snt}{Section@tie 8.2.4}
@xrdef{Searching-title}{Searching for Commands in the History}
@xrdef{Searching-pg}{92}
@xrdef{Searching-pg}{94}
@xrdef{Searching-snt}{Section@tie 8.2.5}
@xrdef{Readline Init File-title}{Readline Init File}
@xrdef{Readline Init File-pg}{92}
@xrdef{Readline Init File-pg}{94}
@xrdef{Readline Init File-snt}{Section@tie 8.3}
@xrdef{Readline Init File Syntax-title}{Readline Init File Syntax}
@xrdef{Readline Init File Syntax-pg}{92}
@xrdef{Readline Init File Syntax-pg}{94}
@xrdef{Readline Init File Syntax-snt}{Section@tie 8.3.1}
@xrdef{Conditional Init Constructs-title}{Conditional Init Constructs}
@xrdef{Conditional Init Constructs-pg}{97}
@xrdef{Conditional Init Constructs-pg}{99}
@xrdef{Conditional Init Constructs-snt}{Section@tie 8.3.2}
@xrdef{Sample Init File-title}{Sample Init File}
@xrdef{Sample Init File-pg}{98}
@xrdef{Sample Init File-pg}{100}
@xrdef{Sample Init File-snt}{Section@tie 8.3.3}
@xrdef{Bindable Readline Commands-title}{Bindable Readline Commands}
@xrdef{Bindable Readline Commands-pg}{101}
@xrdef{Bindable Readline Commands-pg}{103}
@xrdef{Bindable Readline Commands-snt}{Section@tie 8.4}
@xrdef{Commands For Moving-title}{Commands For Moving}
@xrdef{Commands For Moving-pg}{101}
@xrdef{Commands For Moving-pg}{103}
@xrdef{Commands For Moving-snt}{Section@tie 8.4.1}
@xrdef{Commands For History-title}{Commands For Manipulating The History}
@xrdef{Commands For History-pg}{101}
@xrdef{Commands For History-pg}{103}
@xrdef{Commands For History-snt}{Section@tie 8.4.2}
@xrdef{Commands For Text-title}{Commands For Changing Text}
@xrdef{Commands For Text-pg}{103}
@xrdef{Commands For Text-pg}{105}
@xrdef{Commands For Text-snt}{Section@tie 8.4.3}
@xrdef{Commands For Killing-title}{Killing And Yanking}
@xrdef{Commands For Killing-pg}{104}
@xrdef{Commands For Killing-pg}{106}
@xrdef{Commands For Killing-snt}{Section@tie 8.4.4}
@xrdef{Numeric Arguments-title}{Specifying Numeric Arguments}
@xrdef{Numeric Arguments-pg}{105}
@xrdef{Numeric Arguments-pg}{107}
@xrdef{Numeric Arguments-snt}{Section@tie 8.4.5}
@xrdef{Commands For Completion-title}{Letting Readline Type For You}
@xrdef{Commands For Completion-pg}{105}
@xrdef{Commands For Completion-pg}{107}
@xrdef{Commands For Completion-snt}{Section@tie 8.4.6}
@xrdef{Keyboard Macros-title}{Keyboard Macros}
@xrdef{Keyboard Macros-pg}{106}
@xrdef{Keyboard Macros-pg}{108}
@xrdef{Keyboard Macros-snt}{Section@tie 8.4.7}
@xrdef{Miscellaneous Commands-title}{Some Miscellaneous Commands}
@xrdef{Miscellaneous Commands-pg}{107}
@xrdef{Miscellaneous Commands-pg}{109}
@xrdef{Miscellaneous Commands-snt}{Section@tie 8.4.8}
@xrdef{Readline vi Mode-title}{Readline vi Mode}
@xrdef{Readline vi Mode-pg}{109}
@xrdef{Readline vi Mode-pg}{111}
@xrdef{Readline vi Mode-snt}{Section@tie 8.5}
@xrdef{Programmable Completion-title}{Programmable Completion}
@xrdef{Programmable Completion-pg}{109}
@xrdef{Programmable Completion-pg}{111}
@xrdef{Programmable Completion-snt}{Section@tie 8.6}
@xrdef{Programmable Completion Builtins-title}{Programmable Completion Builtins}
@xrdef{Programmable Completion Builtins-pg}{111}
@xrdef{Programmable Completion Builtins-pg}{113}
@xrdef{Programmable Completion Builtins-snt}{Section@tie 8.7}
@xrdef{Using History Interactively-title}{Using History Interactively}
@xrdef{Using History Interactively-pg}{115}
@xrdef{Using History Interactively-pg}{117}
@xrdef{Using History Interactively-snt}{Chapter@tie 9}
@xrdef{Bash History Facilities-title}{Bash History Facilities}
@xrdef{Bash History Facilities-pg}{115}
@xrdef{Bash History Facilities-pg}{117}
@xrdef{Bash History Facilities-snt}{Section@tie 9.1}
@xrdef{Bash History Builtins-title}{Bash History Builtins}
@xrdef{Bash History Builtins-pg}{115}
@xrdef{Bash History Builtins-pg}{117}
@xrdef{Bash History Builtins-snt}{Section@tie 9.2}
@xrdef{History Interaction-title}{History Expansion}
@xrdef{History Interaction-pg}{117}
@xrdef{History Interaction-pg}{119}
@xrdef{History Interaction-snt}{Section@tie 9.3}
@xrdef{Event Designators-title}{Event Designators}
@xrdef{Event Designators-pg}{117}
@xrdef{Event Designators-pg}{120}
@xrdef{Event Designators-snt}{Section@tie 9.3.1}
@xrdef{Word Designators-title}{Word Designators}
@xrdef{Word Designators-pg}{118}
@xrdef{Word Designators-pg}{120}
@xrdef{Word Designators-snt}{Section@tie 9.3.2}
@xrdef{Modifiers-title}{Modifiers}
@xrdef{Modifiers-pg}{119}
@xrdef{Modifiers-pg}{121}
@xrdef{Modifiers-snt}{Section@tie 9.3.3}
@xrdef{Installing Bash-title}{Installing Bash}
@xrdef{Installing Bash-pg}{121}
@xrdef{Installing Bash-pg}{123}
@xrdef{Installing Bash-snt}{Chapter@tie 10}
@xrdef{Basic Installation-title}{Basic Installation}
@xrdef{Basic Installation-pg}{121}
@xrdef{Basic Installation-pg}{123}
@xrdef{Basic Installation-snt}{Section@tie 10.1}
@xrdef{Compilers and Options-title}{Compilers and Options}
@xrdef{Compilers and Options-pg}{122}
@xrdef{Compilers and Options-pg}{124}
@xrdef{Compilers and Options-snt}{Section@tie 10.2}
@xrdef{Compiling For Multiple Architectures-title}{Compiling For Multiple Architectures}
@xrdef{Compiling For Multiple Architectures-pg}{122}
@xrdef{Compiling For Multiple Architectures-pg}{124}
@xrdef{Compiling For Multiple Architectures-snt}{Section@tie 10.3}
@xrdef{Installation Names-title}{Installation Names}
@xrdef{Installation Names-pg}{122}
@xrdef{Installation Names-pg}{124}
@xrdef{Installation Names-snt}{Section@tie 10.4}
@xrdef{Specifying the System Type-title}{Specifying the System Type}
@xrdef{Specifying the System Type-pg}{123}
@xrdef{Specifying the System Type-pg}{125}
@xrdef{Specifying the System Type-snt}{Section@tie 10.5}
@xrdef{Sharing Defaults-title}{Sharing Defaults}
@xrdef{Sharing Defaults-pg}{123}
@xrdef{Sharing Defaults-pg}{125}
@xrdef{Sharing Defaults-snt}{Section@tie 10.6}
@xrdef{Operation Controls-title}{Operation Controls}
@xrdef{Operation Controls-pg}{123}
@xrdef{Operation Controls-pg}{125}
@xrdef{Operation Controls-snt}{Section@tie 10.7}
@xrdef{Optional Features-title}{Optional Features}
@xrdef{Optional Features-pg}{123}
@xrdef{Optional Features-pg}{125}
@xrdef{Optional Features-snt}{Section@tie 10.8}
@xrdef{Reporting Bugs-title}{Reporting Bugs}
@xrdef{Reporting Bugs-pg}{129}
@xrdef{Reporting Bugs-pg}{131}
@xrdef{Reporting Bugs-snt}{Appendix@tie @char65{}}
@xrdef{Major Differences From The Bourne Shell-title}{Major Differences From The Bourne Shell}
@xrdef{Major Differences From The Bourne Shell-pg}{131}
@xrdef{Major Differences From The Bourne Shell-pg}{133}
@xrdef{Major Differences From The Bourne Shell-snt}{Appendix@tie @char66{}}
@xrdef{Copying This Manual-title}{Copying This Manual}
@xrdef{Copying This Manual-pg}{137}
@xrdef{Copying This Manual-pg}{139}
@xrdef{Copying This Manual-snt}{Appendix@tie @char67{}}
@xrdef{GNU Free Documentation License-title}{GNU Free Documentation License}
@xrdef{GNU Free Documentation License-pg}{137}
@xrdef{GNU Free Documentation License-pg}{139}
@xrdef{GNU Free Documentation License-snt}{Section@tie @char67.1}
@xrdef{Indexes-title}{Indexes}
@xrdef{Indexes-pg}{147}
@xrdef{Indexes-snt}{Appendix@tie @char68{}}
@xrdef{Builtin Index-title}{Index of Shell Builtin Commands}
@xrdef{Builtin Index-pg}{145}
@xrdef{Builtin Index-snt}{}
@xrdef{Builtin Index-pg}{148}
@xrdef{Builtin Index-snt}{Section@tie @char68.1}
@xrdef{Reserved Word Index-title}{Index of Shell Reserved Words}
@xrdef{Reserved Word Index-pg}{147}
@xrdef{Reserved Word Index-snt}{}
@xrdef{Reserved Word Index-pg}{149}
@xrdef{Reserved Word Index-snt}{Section@tie @char68.2}
@xrdef{Variable Index-title}{Parameter and Variable Index}
@xrdef{Variable Index-pg}{149}
@xrdef{Variable Index-snt}{}
@xrdef{Variable Index-snt}{Section@tie @char68.3}
@xrdef{Function Index-title}{Function Index}
@xrdef{Function Index-pg}{151}
@xrdef{Function Index-snt}{}
@xrdef{Function Index-snt}{Section@tie @char68.4}
@xrdef{Concept Index-title}{Concept Index}
@xrdef{Concept Index-pg}{153}
@xrdef{Concept Index-snt}{}
@xrdef{Concept Index-snt}{Section@tie @char68.5}
+21 -21
View File
@@ -33,24 +33,24 @@
\entry{logout}{46}{\code {logout}}
\entry{printf}{46}{\code {printf}}
\entry{read}{46}{\code {read}}
\entry{shopt}{47}{\code {shopt}}
\entry{source}{51}{\code {source}}
\entry{type}{51}{\code {type}}
\entry{typeset}{51}{\code {typeset}}
\entry{ulimit}{52}{\code {ulimit}}
\entry{unalias}{53}{\code {unalias}}
\entry{set}{53}{\code {set}}
\entry{dirs}{77}{\code {dirs}}
\entry{popd}{78}{\code {popd}}
\entry{pushd}{78}{\code {pushd}}
\entry{bg}{86}{\code {bg}}
\entry{fg}{86}{\code {fg}}
\entry{jobs}{86}{\code {jobs}}
\entry{kill}{87}{\code {kill}}
\entry{wait}{87}{\code {wait}}
\entry{disown}{87}{\code {disown}}
\entry{suspend}{87}{\code {suspend}}
\entry{compgen}{111}{\code {compgen}}
\entry{complete}{111}{\code {complete}}
\entry{fc}{115}{\code {fc}}
\entry{history}{116}{\code {history}}
\entry{source}{47}{\code {source}}
\entry{type}{47}{\code {type}}
\entry{typeset}{48}{\code {typeset}}
\entry{ulimit}{48}{\code {ulimit}}
\entry{unalias}{49}{\code {unalias}}
\entry{set}{49}{\code {set}}
\entry{shopt}{52}{\code {shopt}}
\entry{dirs}{79}{\code {dirs}}
\entry{popd}{80}{\code {popd}}
\entry{pushd}{80}{\code {pushd}}
\entry{bg}{88}{\code {bg}}
\entry{fg}{88}{\code {fg}}
\entry{jobs}{88}{\code {jobs}}
\entry{kill}{89}{\code {kill}}
\entry{wait}{89}{\code {wait}}
\entry{disown}{89}{\code {disown}}
\entry{suspend}{89}{\code {suspend}}
\entry{compgen}{113}{\code {compgen}}
\entry{complete}{113}{\code {complete}}
\entry{fc}{118}{\code {fc}}
\entry{history}{118}{\code {history}}
+21 -21
View File
@@ -7,7 +7,7 @@
\initial {A}
\entry {\code {alias}}{41}
\initial {B}
\entry {\code {bg}}{86}
\entry {\code {bg}}{88}
\entry {\code {bind}}{41}
\entry {\code {break}}{35}
\entry {\code {builtin}}{42}
@@ -15,13 +15,13 @@
\entry {\code {caller}}{42}
\entry {\code {cd}}{36}
\entry {\code {command}}{43}
\entry {\code {compgen}}{111}
\entry {\code {complete}}{111}
\entry {\code {compgen}}{113}
\entry {\code {complete}}{113}
\entry {\code {continue}}{36}
\initial {D}
\entry {\code {declare}}{43}
\entry {\code {dirs}}{77}
\entry {\code {disown}}{87}
\entry {\code {dirs}}{79}
\entry {\code {disown}}{89}
\initial {E}
\entry {\code {echo}}{44}
\entry {\code {enable}}{45}
@@ -30,47 +30,47 @@
\entry {\code {exit}}{36}
\entry {\code {export}}{36}
\initial {F}
\entry {\code {fc}}{115}
\entry {\code {fg}}{86}
\entry {\code {fc}}{118}
\entry {\code {fg}}{88}
\initial {G}
\entry {\code {getopts}}{37}
\initial {H}
\entry {\code {hash}}{37}
\entry {\code {help}}{45}
\entry {\code {history}}{116}
\entry {\code {history}}{118}
\initial {J}
\entry {\code {jobs}}{86}
\entry {\code {jobs}}{88}
\initial {K}
\entry {\code {kill}}{87}
\entry {\code {kill}}{89}
\initial {L}
\entry {\code {let}}{45}
\entry {\code {local}}{45}
\entry {\code {logout}}{46}
\initial {P}
\entry {\code {popd}}{78}
\entry {\code {popd}}{80}
\entry {\code {printf}}{46}
\entry {\code {pushd}}{78}
\entry {\code {pushd}}{80}
\entry {\code {pwd}}{38}
\initial {R}
\entry {\code {read}}{46}
\entry {\code {readonly}}{38}
\entry {\code {return}}{38}
\initial {S}
\entry {\code {set}}{53}
\entry {\code {set}}{49}
\entry {\code {shift}}{38}
\entry {\code {shopt}}{47}
\entry {\code {source}}{51}
\entry {\code {suspend}}{87}
\entry {\code {shopt}}{52}
\entry {\code {source}}{47}
\entry {\code {suspend}}{89}
\initial {T}
\entry {\code {test}}{39}
\entry {\code {times}}{40}
\entry {\code {trap}}{40}
\entry {\code {type}}{51}
\entry {\code {typeset}}{51}
\entry {\code {type}}{47}
\entry {\code {typeset}}{48}
\initial {U}
\entry {\code {ulimit}}{52}
\entry {\code {ulimit}}{48}
\entry {\code {umask}}{40}
\entry {\code {unalias}}{53}
\entry {\code {unalias}}{49}
\entry {\code {unset}}{41}
\initial {W}
\entry {\code {wait}}{87}
\entry {\code {wait}}{89}
+50 -50
View File
@@ -54,65 +54,65 @@
\entry{expansion, arithmetic}{22}{expansion, arithmetic}
\entry{arithmetic expansion}{22}{arithmetic expansion}
\entry{process substitution}{22}{process substitution}
\entry{word splitting}{22}{word splitting}
\entry{word splitting}{23}{word splitting}
\entry{expansion, filename}{23}{expansion, filename}
\entry{expansion, pathname}{23}{expansion, pathname}
\entry{filename expansion}{23}{filename expansion}
\entry{pathname expansion}{23}{pathname expansion}
\entry{pattern matching}{23}{pattern matching}
\entry{matching, pattern}{23}{matching, pattern}
\entry{pattern matching}{24}{pattern matching}
\entry{matching, pattern}{24}{matching, pattern}
\entry{redirection}{25}{redirection}
\entry{command expansion}{28}{command expansion}
\entry{command execution}{29}{command execution}
\entry{command search}{29}{command search}
\entry{execution environment}{29}{execution environment}
\entry{environment}{30}{environment}
\entry{execution environment}{30}{execution environment}
\entry{environment}{31}{environment}
\entry{exit status}{31}{exit status}
\entry{signal handling}{31}{signal handling}
\entry{shell script}{32}{shell script}
\entry{special builtin}{56}{special builtin}
\entry{login shell}{69}{login shell}
\entry{interactive shell}{69}{interactive shell}
\entry{startup files}{69}{startup files}
\entry{special builtin}{57}{special builtin}
\entry{login shell}{71}{login shell}
\entry{interactive shell}{71}{interactive shell}
\entry{shell, interactive}{71}{shell, interactive}
\entry{expressions, conditional}{73}{expressions, conditional}
\entry{arithmetic, shell}{74}{arithmetic, shell}
\entry{shell arithmetic}{74}{shell arithmetic}
\entry{expressions, arithmetic}{74}{expressions, arithmetic}
\entry{evaluation, arithmetic}{74}{evaluation, arithmetic}
\entry{arithmetic evaluation}{74}{arithmetic evaluation}
\entry{alias expansion}{75}{alias expansion}
\entry{arrays}{76}{arrays}
\entry{directory stack}{77}{directory stack}
\entry{prompting}{79}{prompting}
\entry{restricted shell}{80}{restricted shell}
\entry{POSIX Mode}{80}{POSIX Mode}
\entry{job control}{85}{job control}
\entry{foreground}{85}{foreground}
\entry{background}{85}{background}
\entry{suspending jobs}{85}{suspending jobs}
\entry{Readline, how to use}{88}{Readline, how to use}
\entry{interaction, readline}{89}{interaction, readline}
\entry{notation, readline}{89}{notation, readline}
\entry{command editing}{89}{command editing}
\entry{editing command lines}{89}{editing command lines}
\entry{killing text}{91}{killing text}
\entry{yanking text}{91}{yanking text}
\entry{kill ring}{91}{kill ring}
\entry{initialization file, readline}{92}{initialization file, readline}
\entry{variables, readline}{93}{variables, readline}
\entry{programmable completion}{109}{programmable completion}
\entry{completion builtins}{111}{completion builtins}
\entry{History, how to use}{114}{History, how to use}
\entry{command history}{115}{command history}
\entry{history list}{115}{history list}
\entry{history builtins}{115}{history builtins}
\entry{history expansion}{117}{history expansion}
\entry{event designators}{117}{event designators}
\entry{history events}{117}{history events}
\entry{installation}{121}{installation}
\entry{configuration}{121}{configuration}
\entry{Bash installation}{121}{Bash installation}
\entry{Bash configuration}{121}{Bash configuration}
\entry{FDL, GNU Free Documentation License}{137}{FDL, GNU Free Documentation License}
\entry{startup files}{71}{startup files}
\entry{interactive shell}{73}{interactive shell}
\entry{shell, interactive}{73}{shell, interactive}
\entry{expressions, conditional}{75}{expressions, conditional}
\entry{arithmetic, shell}{76}{arithmetic, shell}
\entry{shell arithmetic}{76}{shell arithmetic}
\entry{expressions, arithmetic}{76}{expressions, arithmetic}
\entry{evaluation, arithmetic}{76}{evaluation, arithmetic}
\entry{arithmetic evaluation}{76}{arithmetic evaluation}
\entry{alias expansion}{77}{alias expansion}
\entry{arrays}{78}{arrays}
\entry{directory stack}{79}{directory stack}
\entry{prompting}{81}{prompting}
\entry{restricted shell}{82}{restricted shell}
\entry{POSIX Mode}{82}{POSIX Mode}
\entry{job control}{87}{job control}
\entry{foreground}{87}{foreground}
\entry{background}{87}{background}
\entry{suspending jobs}{87}{suspending jobs}
\entry{Readline, how to use}{90}{Readline, how to use}
\entry{interaction, readline}{91}{interaction, readline}
\entry{notation, readline}{91}{notation, readline}
\entry{command editing}{91}{command editing}
\entry{editing command lines}{91}{editing command lines}
\entry{killing text}{93}{killing text}
\entry{yanking text}{93}{yanking text}
\entry{kill ring}{93}{kill ring}
\entry{initialization file, readline}{94}{initialization file, readline}
\entry{variables, readline}{95}{variables, readline}
\entry{programmable completion}{111}{programmable completion}
\entry{completion builtins}{113}{completion builtins}
\entry{History, how to use}{116}{History, how to use}
\entry{command history}{117}{command history}
\entry{history list}{117}{history list}
\entry{history builtins}{117}{history builtins}
\entry{history expansion}{119}{history expansion}
\entry{event designators}{120}{event designators}
\entry{history events}{120}{history events}
\entry{installation}{123}{installation}
\entry{configuration}{123}{configuration}
\entry{Bash installation}{123}{Bash installation}
\entry{Bash configuration}{123}{Bash configuration}
\entry{FDL, GNU Free Documentation License}{139}{FDL, GNU Free Documentation License}
+50 -50
View File
@@ -1,21 +1,21 @@
\initial {A}
\entry {alias expansion}{75}
\entry {arithmetic evaluation}{74}
\entry {alias expansion}{77}
\entry {arithmetic evaluation}{76}
\entry {arithmetic expansion}{22}
\entry {arithmetic, shell}{74}
\entry {arrays}{76}
\entry {arithmetic, shell}{76}
\entry {arrays}{78}
\initial {B}
\entry {background}{85}
\entry {Bash configuration}{121}
\entry {Bash installation}{121}
\entry {background}{87}
\entry {Bash configuration}{123}
\entry {Bash installation}{123}
\entry {Bourne shell}{5}
\entry {brace expansion}{17}
\entry {builtin}{3}
\initial {C}
\entry {command editing}{89}
\entry {command editing}{91}
\entry {command execution}{29}
\entry {command expansion}{28}
\entry {command history}{115}
\entry {command history}{117}
\entry {command search}{29}
\entry {command substitution}{21}
\entry {command timing}{8}
@@ -28,17 +28,17 @@
\entry {commands, shell}{8}
\entry {commands, simple}{8}
\entry {comments, shell}{7}
\entry {completion builtins}{111}
\entry {configuration}{121}
\entry {completion builtins}{113}
\entry {configuration}{123}
\entry {control operator}{3}
\initial {D}
\entry {directory stack}{77}
\entry {directory stack}{79}
\initial {E}
\entry {editing command lines}{89}
\entry {environment}{30}
\entry {evaluation, arithmetic}{74}
\entry {event designators}{117}
\entry {execution environment}{29}
\entry {editing command lines}{91}
\entry {environment}{31}
\entry {evaluation, arithmetic}{76}
\entry {event designators}{120}
\entry {execution environment}{30}
\entry {exit status}{3, 31}
\entry {expansion}{17}
\entry {expansion, arithmetic}{22}
@@ -47,44 +47,44 @@
\entry {expansion, parameter}{19}
\entry {expansion, pathname}{23}
\entry {expansion, tilde}{18}
\entry {expressions, arithmetic}{74}
\entry {expressions, conditional}{73}
\entry {expressions, arithmetic}{76}
\entry {expressions, conditional}{75}
\initial {F}
\entry {FDL, GNU Free Documentation License}{137}
\entry {FDL, GNU Free Documentation License}{139}
\entry {field}{3}
\entry {filename}{3}
\entry {filename expansion}{23}
\entry {foreground}{85}
\entry {foreground}{87}
\entry {functions, shell}{14}
\initial {H}
\entry {history builtins}{115}
\entry {history events}{117}
\entry {history expansion}{117}
\entry {history list}{115}
\entry {History, how to use}{114}
\entry {history builtins}{117}
\entry {history events}{120}
\entry {history expansion}{119}
\entry {history list}{117}
\entry {History, how to use}{116}
\initial {I}
\entry {identifier}{3}
\entry {initialization file, readline}{92}
\entry {installation}{121}
\entry {interaction, readline}{89}
\entry {interactive shell}{69, 71}
\entry {initialization file, readline}{94}
\entry {installation}{123}
\entry {interaction, readline}{91}
\entry {interactive shell}{71, 73}
\entry {internationalization}{7}
\initial {J}
\entry {job}{3}
\entry {job control}{3, 85}
\entry {job control}{3, 87}
\initial {K}
\entry {kill ring}{91}
\entry {killing text}{91}
\entry {kill ring}{93}
\entry {killing text}{93}
\initial {L}
\entry {localization}{7}
\entry {login shell}{69}
\entry {login shell}{71}
\initial {M}
\entry {matching, pattern}{23}
\entry {matching, pattern}{24}
\entry {metacharacter}{3}
\initial {N}
\entry {name}{3}
\entry {native languages}{7}
\entry {notation, readline}{89}
\entry {notation, readline}{91}
\initial {O}
\entry {operator, shell}{3}
\initial {P}
@@ -93,44 +93,44 @@
\entry {parameters, positional}{15}
\entry {parameters, special}{16}
\entry {pathname expansion}{23}
\entry {pattern matching}{23}
\entry {pattern matching}{24}
\entry {pipeline}{8}
\entry {POSIX}{3}
\entry {POSIX Mode}{80}
\entry {POSIX Mode}{82}
\entry {process group}{3}
\entry {process group ID}{3}
\entry {process substitution}{22}
\entry {programmable completion}{109}
\entry {prompting}{79}
\entry {programmable completion}{111}
\entry {prompting}{81}
\initial {Q}
\entry {quoting}{6}
\entry {quoting, ANSI}{6}
\initial {R}
\entry {Readline, how to use}{88}
\entry {Readline, how to use}{90}
\entry {redirection}{25}
\entry {reserved word}{3}
\entry {restricted shell}{80}
\entry {restricted shell}{82}
\entry {return status}{3}
\initial {S}
\entry {shell arithmetic}{74}
\entry {shell arithmetic}{76}
\entry {shell function}{14}
\entry {shell script}{32}
\entry {shell variable}{15}
\entry {shell, interactive}{71}
\entry {shell, interactive}{73}
\entry {signal}{4}
\entry {signal handling}{31}
\entry {special builtin}{4, 56}
\entry {startup files}{69}
\entry {suspending jobs}{85}
\entry {special builtin}{4, 57}
\entry {startup files}{71}
\entry {suspending jobs}{87}
\initial {T}
\entry {tilde expansion}{18}
\entry {token}{4}
\entry {translation, native languages}{7}
\initial {V}
\entry {variable, shell}{15}
\entry {variables, readline}{93}
\entry {variables, readline}{95}
\initial {W}
\entry {word}{4}
\entry {word splitting}{22}
\entry {word splitting}{23}
\initial {Y}
\entry {yanking text}{91}
\entry {yanking text}{93}
BIN
View File
Binary file not shown.
+96 -96
View File
@@ -1,96 +1,96 @@
\entry{beginning-of-line (C-a)}{101}{\code {beginning-of-line (C-a)}}
\entry{end-of-line (C-e)}{101}{\code {end-of-line (C-e)}}
\entry{forward-char (C-f)}{101}{\code {forward-char (C-f)}}
\entry{backward-char (C-b)}{101}{\code {backward-char (C-b)}}
\entry{forward-word (M-f)}{101}{\code {forward-word (M-f)}}
\entry{backward-word (M-b)}{101}{\code {backward-word (M-b)}}
\entry{clear-screen (C-l)}{101}{\code {clear-screen (C-l)}}
\entry{redraw-current-line ()}{101}{\code {redraw-current-line ()}}
\entry{accept-line (Newline or Return)}{101}{\code {accept-line (Newline or Return)}}
\entry{previous-history (C-p)}{102}{\code {previous-history (C-p)}}
\entry{next-history (C-n)}{102}{\code {next-history (C-n)}}
\entry{beginning-of-history (M-<)}{102}{\code {beginning-of-history (M-<)}}
\entry{end-of-history (M->)}{102}{\code {end-of-history (M->)}}
\entry{reverse-search-history (C-r)}{102}{\code {reverse-search-history (C-r)}}
\entry{forward-search-history (C-s)}{102}{\code {forward-search-history (C-s)}}
\entry{non-incremental-reverse-search-history (M-p)}{102}{\code {non-incremental-reverse-search-history (M-p)}}
\entry{non-incremental-forward-search-history (M-n)}{102}{\code {non-incremental-forward-search-history (M-n)}}
\entry{history-search-forward ()}{102}{\code {history-search-forward ()}}
\entry{history-search-backward ()}{102}{\code {history-search-backward ()}}
\entry{yank-nth-arg (M-C-y)}{102}{\code {yank-nth-arg (M-C-y)}}
\entry{yank-last-arg (M-. or M-_)}{102}{\code {yank-last-arg (M-. or M-_)}}
\entry{delete-char (C-d)}{103}{\code {delete-char (C-d)}}
\entry{backward-delete-char (Rubout)}{103}{\code {backward-delete-char (Rubout)}}
\entry{forward-backward-delete-char ()}{103}{\code {forward-backward-delete-char ()}}
\entry{quoted-insert (C-q or C-v)}{103}{\code {quoted-insert (C-q or C-v)}}
\entry{self-insert (a, b, A, 1, !, ...{})}{103}{\code {self-insert (a, b, A, 1, !, \dots {})}}
\entry{transpose-chars (C-t)}{103}{\code {transpose-chars (C-t)}}
\entry{transpose-words (M-t)}{103}{\code {transpose-words (M-t)}}
\entry{upcase-word (M-u)}{103}{\code {upcase-word (M-u)}}
\entry{downcase-word (M-l)}{103}{\code {downcase-word (M-l)}}
\entry{capitalize-word (M-c)}{103}{\code {capitalize-word (M-c)}}
\entry{overwrite-mode ()}{103}{\code {overwrite-mode ()}}
\entry{kill-line (C-k)}{104}{\code {kill-line (C-k)}}
\entry{backward-kill-line (C-x Rubout)}{104}{\code {backward-kill-line (C-x Rubout)}}
\entry{unix-line-discard (C-u)}{104}{\code {unix-line-discard (C-u)}}
\entry{kill-whole-line ()}{104}{\code {kill-whole-line ()}}
\entry{kill-word (M-d)}{104}{\code {kill-word (M-d)}}
\entry{backward-kill-word (M-DEL)}{104}{\code {backward-kill-word (M-\key {DEL})}}
\entry{unix-word-rubout (C-w)}{104}{\code {unix-word-rubout (C-w)}}
\entry{unix-filename-rubout ()}{104}{\code {unix-filename-rubout ()}}
\entry{delete-horizontal-space ()}{104}{\code {delete-horizontal-space ()}}
\entry{kill-region ()}{104}{\code {kill-region ()}}
\entry{copy-region-as-kill ()}{104}{\code {copy-region-as-kill ()}}
\entry{copy-backward-word ()}{104}{\code {copy-backward-word ()}}
\entry{copy-forward-word ()}{104}{\code {copy-forward-word ()}}
\entry{yank (C-y)}{105}{\code {yank (C-y)}}
\entry{yank-pop (M-y)}{105}{\code {yank-pop (M-y)}}
\entry{digit-argument (M-0, M-1, ...{} M--)}{105}{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}
\entry{universal-argument ()}{105}{\code {universal-argument ()}}
\entry{complete (TAB)}{105}{\code {complete (\key {TAB})}}
\entry{possible-completions (M-?)}{105}{\code {possible-completions (M-?)}}
\entry{insert-completions (M-*)}{105}{\code {insert-completions (M-*)}}
\entry{menu-complete ()}{105}{\code {menu-complete ()}}
\entry{delete-char-or-list ()}{106}{\code {delete-char-or-list ()}}
\entry{complete-filename (M-/)}{106}{\code {complete-filename (M-/)}}
\entry{possible-filename-completions (C-x /)}{106}{\code {possible-filename-completions (C-x /)}}
\entry{complete-username (M-~)}{106}{\code {complete-username (M-~)}}
\entry{possible-username-completions (C-x ~)}{106}{\code {possible-username-completions (C-x ~)}}
\entry{complete-variable (M-$)}{106}{\code {complete-variable (M-$)}}
\entry{possible-variable-completions (C-x $)}{106}{\code {possible-variable-completions (C-x $)}}
\entry{complete-hostname (M-@)}{106}{\code {complete-hostname (M-@)}}
\entry{possible-hostname-completions (C-x @)}{106}{\code {possible-hostname-completions (C-x @)}}
\entry{complete-command (M-!)}{106}{\code {complete-command (M-!)}}
\entry{possible-command-completions (C-x !)}{106}{\code {possible-command-completions (C-x !)}}
\entry{dynamic-complete-history (M-TAB)}{106}{\code {dynamic-complete-history (M-\key {TAB})}}
\entry{complete-into-braces (M-{\tt \char 123})}{106}{\code {complete-into-braces (M-{\tt \char 123})}}
\entry{start-kbd-macro (C-x ()}{106}{\code {start-kbd-macro (C-x ()}}
\entry{end-kbd-macro (C-x ))}{107}{\code {end-kbd-macro (C-x ))}}
\entry{call-last-kbd-macro (C-x e)}{107}{\code {call-last-kbd-macro (C-x e)}}
\entry{re-read-init-file (C-x C-r)}{107}{\code {re-read-init-file (C-x C-r)}}
\entry{abort (C-g)}{107}{\code {abort (C-g)}}
\entry{do-uppercase-version (M-a, M-b, M-x, ...{})}{107}{\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}
\entry{prefix-meta (ESC)}{107}{\code {prefix-meta (\key {ESC})}}
\entry{undo (C-_ or C-x C-u)}{107}{\code {undo (C-_ or C-x C-u)}}
\entry{revert-line (M-r)}{107}{\code {revert-line (M-r)}}
\entry{tilde-expand (M-&)}{107}{\code {tilde-expand (M-&)}}
\entry{set-mark (C-@)}{107}{\code {set-mark (C-@)}}
\entry{exchange-point-and-mark (C-x C-x)}{107}{\code {exchange-point-and-mark (C-x C-x)}}
\entry{character-search (C-])}{107}{\code {character-search (C-])}}
\entry{character-search-backward (M-C-])}{107}{\code {character-search-backward (M-C-])}}
\entry{insert-comment (M-#)}{108}{\code {insert-comment (M-#)}}
\entry{dump-functions ()}{108}{\code {dump-functions ()}}
\entry{dump-variables ()}{108}{\code {dump-variables ()}}
\entry{dump-macros ()}{108}{\code {dump-macros ()}}
\entry{glob-complete-word (M-g)}{108}{\code {glob-complete-word (M-g)}}
\entry{glob-expand-word (C-x *)}{108}{\code {glob-expand-word (C-x *)}}
\entry{glob-list-expansions (C-x g)}{108}{\code {glob-list-expansions (C-x g)}}
\entry{display-shell-version (C-x C-v)}{108}{\code {display-shell-version (C-x C-v)}}
\entry{shell-expand-line (M-C-e)}{108}{\code {shell-expand-line (M-C-e)}}
\entry{history-expand-line (M-^)}{108}{\code {history-expand-line (M-^)}}
\entry{magic-space ()}{109}{\code {magic-space ()}}
\entry{alias-expand-line ()}{109}{\code {alias-expand-line ()}}
\entry{history-and-alias-expand-line ()}{109}{\code {history-and-alias-expand-line ()}}
\entry{insert-last-argument (M-. or M-_)}{109}{\code {insert-last-argument (M-. or M-_)}}
\entry{operate-and-get-next (C-o)}{109}{\code {operate-and-get-next (C-o)}}
\entry{edit-and-execute-command (C-xC-e)}{109}{\code {edit-and-execute-command (C-xC-e)}}
\entry{beginning-of-line (C-a)}{103}{\code {beginning-of-line (C-a)}}
\entry{end-of-line (C-e)}{103}{\code {end-of-line (C-e)}}
\entry{forward-char (C-f)}{103}{\code {forward-char (C-f)}}
\entry{backward-char (C-b)}{103}{\code {backward-char (C-b)}}
\entry{forward-word (M-f)}{103}{\code {forward-word (M-f)}}
\entry{backward-word (M-b)}{103}{\code {backward-word (M-b)}}
\entry{clear-screen (C-l)}{103}{\code {clear-screen (C-l)}}
\entry{redraw-current-line ()}{103}{\code {redraw-current-line ()}}
\entry{accept-line (Newline or Return)}{103}{\code {accept-line (Newline or Return)}}
\entry{previous-history (C-p)}{104}{\code {previous-history (C-p)}}
\entry{next-history (C-n)}{104}{\code {next-history (C-n)}}
\entry{beginning-of-history (M-<)}{104}{\code {beginning-of-history (M-<)}}
\entry{end-of-history (M->)}{104}{\code {end-of-history (M->)}}
\entry{reverse-search-history (C-r)}{104}{\code {reverse-search-history (C-r)}}
\entry{forward-search-history (C-s)}{104}{\code {forward-search-history (C-s)}}
\entry{non-incremental-reverse-search-history (M-p)}{104}{\code {non-incremental-reverse-search-history (M-p)}}
\entry{non-incremental-forward-search-history (M-n)}{104}{\code {non-incremental-forward-search-history (M-n)}}
\entry{history-search-forward ()}{104}{\code {history-search-forward ()}}
\entry{history-search-backward ()}{104}{\code {history-search-backward ()}}
\entry{yank-nth-arg (M-C-y)}{104}{\code {yank-nth-arg (M-C-y)}}
\entry{yank-last-arg (M-. or M-_)}{104}{\code {yank-last-arg (M-. or M-_)}}
\entry{delete-char (C-d)}{105}{\code {delete-char (C-d)}}
\entry{backward-delete-char (Rubout)}{105}{\code {backward-delete-char (Rubout)}}
\entry{forward-backward-delete-char ()}{105}{\code {forward-backward-delete-char ()}}
\entry{quoted-insert (C-q or C-v)}{105}{\code {quoted-insert (C-q or C-v)}}
\entry{self-insert (a, b, A, 1, !, ...{})}{105}{\code {self-insert (a, b, A, 1, !, \dots {})}}
\entry{transpose-chars (C-t)}{105}{\code {transpose-chars (C-t)}}
\entry{transpose-words (M-t)}{105}{\code {transpose-words (M-t)}}
\entry{upcase-word (M-u)}{105}{\code {upcase-word (M-u)}}
\entry{downcase-word (M-l)}{105}{\code {downcase-word (M-l)}}
\entry{capitalize-word (M-c)}{105}{\code {capitalize-word (M-c)}}
\entry{overwrite-mode ()}{105}{\code {overwrite-mode ()}}
\entry{kill-line (C-k)}{106}{\code {kill-line (C-k)}}
\entry{backward-kill-line (C-x Rubout)}{106}{\code {backward-kill-line (C-x Rubout)}}
\entry{unix-line-discard (C-u)}{106}{\code {unix-line-discard (C-u)}}
\entry{kill-whole-line ()}{106}{\code {kill-whole-line ()}}
\entry{kill-word (M-d)}{106}{\code {kill-word (M-d)}}
\entry{backward-kill-word (M-DEL)}{106}{\code {backward-kill-word (M-\key {DEL})}}
\entry{unix-word-rubout (C-w)}{106}{\code {unix-word-rubout (C-w)}}
\entry{unix-filename-rubout ()}{106}{\code {unix-filename-rubout ()}}
\entry{delete-horizontal-space ()}{106}{\code {delete-horizontal-space ()}}
\entry{kill-region ()}{106}{\code {kill-region ()}}
\entry{copy-region-as-kill ()}{106}{\code {copy-region-as-kill ()}}
\entry{copy-backward-word ()}{106}{\code {copy-backward-word ()}}
\entry{copy-forward-word ()}{106}{\code {copy-forward-word ()}}
\entry{yank (C-y)}{107}{\code {yank (C-y)}}
\entry{yank-pop (M-y)}{107}{\code {yank-pop (M-y)}}
\entry{digit-argument (M-0, M-1, ...{} M--)}{107}{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}
\entry{universal-argument ()}{107}{\code {universal-argument ()}}
\entry{complete (TAB)}{107}{\code {complete (\key {TAB})}}
\entry{possible-completions (M-?)}{107}{\code {possible-completions (M-?)}}
\entry{insert-completions (M-*)}{107}{\code {insert-completions (M-*)}}
\entry{menu-complete ()}{107}{\code {menu-complete ()}}
\entry{delete-char-or-list ()}{108}{\code {delete-char-or-list ()}}
\entry{complete-filename (M-/)}{108}{\code {complete-filename (M-/)}}
\entry{possible-filename-completions (C-x /)}{108}{\code {possible-filename-completions (C-x /)}}
\entry{complete-username (M-~)}{108}{\code {complete-username (M-~)}}
\entry{possible-username-completions (C-x ~)}{108}{\code {possible-username-completions (C-x ~)}}
\entry{complete-variable (M-$)}{108}{\code {complete-variable (M-$)}}
\entry{possible-variable-completions (C-x $)}{108}{\code {possible-variable-completions (C-x $)}}
\entry{complete-hostname (M-@)}{108}{\code {complete-hostname (M-@)}}
\entry{possible-hostname-completions (C-x @)}{108}{\code {possible-hostname-completions (C-x @)}}
\entry{complete-command (M-!)}{108}{\code {complete-command (M-!)}}
\entry{possible-command-completions (C-x !)}{108}{\code {possible-command-completions (C-x !)}}
\entry{dynamic-complete-history (M-TAB)}{108}{\code {dynamic-complete-history (M-\key {TAB})}}
\entry{complete-into-braces (M-{\tt \char 123})}{108}{\code {complete-into-braces (M-{\tt \char 123})}}
\entry{start-kbd-macro (C-x ()}{108}{\code {start-kbd-macro (C-x ()}}
\entry{end-kbd-macro (C-x ))}{109}{\code {end-kbd-macro (C-x ))}}
\entry{call-last-kbd-macro (C-x e)}{109}{\code {call-last-kbd-macro (C-x e)}}
\entry{re-read-init-file (C-x C-r)}{109}{\code {re-read-init-file (C-x C-r)}}
\entry{abort (C-g)}{109}{\code {abort (C-g)}}
\entry{do-uppercase-version (M-a, M-b, M-x, ...{})}{109}{\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}
\entry{prefix-meta (ESC)}{109}{\code {prefix-meta (\key {ESC})}}
\entry{undo (C-_ or C-x C-u)}{109}{\code {undo (C-_ or C-x C-u)}}
\entry{revert-line (M-r)}{109}{\code {revert-line (M-r)}}
\entry{tilde-expand (M-&)}{109}{\code {tilde-expand (M-&)}}
\entry{set-mark (C-@)}{109}{\code {set-mark (C-@)}}
\entry{exchange-point-and-mark (C-x C-x)}{109}{\code {exchange-point-and-mark (C-x C-x)}}
\entry{character-search (C-])}{109}{\code {character-search (C-])}}
\entry{character-search-backward (M-C-])}{109}{\code {character-search-backward (M-C-])}}
\entry{insert-comment (M-#)}{110}{\code {insert-comment (M-#)}}
\entry{dump-functions ()}{110}{\code {dump-functions ()}}
\entry{dump-variables ()}{110}{\code {dump-variables ()}}
\entry{dump-macros ()}{110}{\code {dump-macros ()}}
\entry{glob-complete-word (M-g)}{110}{\code {glob-complete-word (M-g)}}
\entry{glob-expand-word (C-x *)}{110}{\code {glob-expand-word (C-x *)}}
\entry{glob-list-expansions (C-x g)}{110}{\code {glob-list-expansions (C-x g)}}
\entry{display-shell-version (C-x C-v)}{110}{\code {display-shell-version (C-x C-v)}}
\entry{shell-expand-line (M-C-e)}{110}{\code {shell-expand-line (M-C-e)}}
\entry{history-expand-line (M-^)}{110}{\code {history-expand-line (M-^)}}
\entry{magic-space ()}{111}{\code {magic-space ()}}
\entry{alias-expand-line ()}{111}{\code {alias-expand-line ()}}
\entry{history-and-alias-expand-line ()}{111}{\code {history-and-alias-expand-line ()}}
\entry{insert-last-argument (M-. or M-_)}{111}{\code {insert-last-argument (M-. or M-_)}}
\entry{operate-and-get-next (C-o)}{111}{\code {operate-and-get-next (C-o)}}
\entry{edit-and-execute-command (C-xC-e)}{111}{\code {edit-and-execute-command (C-xC-e)}}
+96 -96
View File
@@ -1,116 +1,116 @@
\initial {A}
\entry {\code {abort (C-g)}}{107}
\entry {\code {accept-line (Newline or Return)}}{101}
\entry {\code {alias-expand-line ()}}{109}
\entry {\code {abort (C-g)}}{109}
\entry {\code {accept-line (Newline or Return)}}{103}
\entry {\code {alias-expand-line ()}}{111}
\initial {B}
\entry {\code {backward-char (C-b)}}{101}
\entry {\code {backward-delete-char (Rubout)}}{103}
\entry {\code {backward-kill-line (C-x Rubout)}}{104}
\entry {\code {backward-kill-word (M-\key {DEL})}}{104}
\entry {\code {backward-word (M-b)}}{101}
\entry {\code {beginning-of-history (M-<)}}{102}
\entry {\code {beginning-of-line (C-a)}}{101}
\entry {\code {backward-char (C-b)}}{103}
\entry {\code {backward-delete-char (Rubout)}}{105}
\entry {\code {backward-kill-line (C-x Rubout)}}{106}
\entry {\code {backward-kill-word (M-\key {DEL})}}{106}
\entry {\code {backward-word (M-b)}}{103}
\entry {\code {beginning-of-history (M-<)}}{104}
\entry {\code {beginning-of-line (C-a)}}{103}
\initial {C}
\entry {\code {call-last-kbd-macro (C-x e)}}{107}
\entry {\code {capitalize-word (M-c)}}{103}
\entry {\code {character-search (C-])}}{107}
\entry {\code {character-search-backward (M-C-])}}{107}
\entry {\code {clear-screen (C-l)}}{101}
\entry {\code {complete (\key {TAB})}}{105}
\entry {\code {complete-command (M-!)}}{106}
\entry {\code {complete-filename (M-/)}}{106}
\entry {\code {complete-hostname (M-@)}}{106}
\entry {\code {complete-into-braces (M-{\tt \char 123})}}{106}
\entry {\code {complete-username (M-~)}}{106}
\entry {\code {complete-variable (M-$)}}{106}
\entry {\code {copy-backward-word ()}}{104}
\entry {\code {copy-forward-word ()}}{104}
\entry {\code {copy-region-as-kill ()}}{104}
\entry {\code {call-last-kbd-macro (C-x e)}}{109}
\entry {\code {capitalize-word (M-c)}}{105}
\entry {\code {character-search (C-])}}{109}
\entry {\code {character-search-backward (M-C-])}}{109}
\entry {\code {clear-screen (C-l)}}{103}
\entry {\code {complete (\key {TAB})}}{107}
\entry {\code {complete-command (M-!)}}{108}
\entry {\code {complete-filename (M-/)}}{108}
\entry {\code {complete-hostname (M-@)}}{108}
\entry {\code {complete-into-braces (M-{\tt \char 123})}}{108}
\entry {\code {complete-username (M-~)}}{108}
\entry {\code {complete-variable (M-$)}}{108}
\entry {\code {copy-backward-word ()}}{106}
\entry {\code {copy-forward-word ()}}{106}
\entry {\code {copy-region-as-kill ()}}{106}
\initial {D}
\entry {\code {delete-char (C-d)}}{103}
\entry {\code {delete-char-or-list ()}}{106}
\entry {\code {delete-horizontal-space ()}}{104}
\entry {\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{105}
\entry {\code {display-shell-version (C-x C-v)}}{108}
\entry {\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}{107}
\entry {\code {downcase-word (M-l)}}{103}
\entry {\code {dump-functions ()}}{108}
\entry {\code {dump-macros ()}}{108}
\entry {\code {dump-variables ()}}{108}
\entry {\code {dynamic-complete-history (M-\key {TAB})}}{106}
\entry {\code {delete-char (C-d)}}{105}
\entry {\code {delete-char-or-list ()}}{108}
\entry {\code {delete-horizontal-space ()}}{106}
\entry {\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{107}
\entry {\code {display-shell-version (C-x C-v)}}{110}
\entry {\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}{109}
\entry {\code {downcase-word (M-l)}}{105}
\entry {\code {dump-functions ()}}{110}
\entry {\code {dump-macros ()}}{110}
\entry {\code {dump-variables ()}}{110}
\entry {\code {dynamic-complete-history (M-\key {TAB})}}{108}
\initial {E}
\entry {\code {edit-and-execute-command (C-xC-e)}}{109}
\entry {\code {end-kbd-macro (C-x ))}}{107}
\entry {\code {end-of-history (M->)}}{102}
\entry {\code {end-of-line (C-e)}}{101}
\entry {\code {exchange-point-and-mark (C-x C-x)}}{107}
\entry {\code {edit-and-execute-command (C-xC-e)}}{111}
\entry {\code {end-kbd-macro (C-x ))}}{109}
\entry {\code {end-of-history (M->)}}{104}
\entry {\code {end-of-line (C-e)}}{103}
\entry {\code {exchange-point-and-mark (C-x C-x)}}{109}
\initial {F}
\entry {\code {forward-backward-delete-char ()}}{103}
\entry {\code {forward-char (C-f)}}{101}
\entry {\code {forward-search-history (C-s)}}{102}
\entry {\code {forward-word (M-f)}}{101}
\entry {\code {forward-backward-delete-char ()}}{105}
\entry {\code {forward-char (C-f)}}{103}
\entry {\code {forward-search-history (C-s)}}{104}
\entry {\code {forward-word (M-f)}}{103}
\initial {G}
\entry {\code {glob-complete-word (M-g)}}{108}
\entry {\code {glob-expand-word (C-x *)}}{108}
\entry {\code {glob-list-expansions (C-x g)}}{108}
\entry {\code {glob-complete-word (M-g)}}{110}
\entry {\code {glob-expand-word (C-x *)}}{110}
\entry {\code {glob-list-expansions (C-x g)}}{110}
\initial {H}
\entry {\code {history-and-alias-expand-line ()}}{109}
\entry {\code {history-expand-line (M-^)}}{108}
\entry {\code {history-search-backward ()}}{102}
\entry {\code {history-search-forward ()}}{102}
\entry {\code {history-and-alias-expand-line ()}}{111}
\entry {\code {history-expand-line (M-^)}}{110}
\entry {\code {history-search-backward ()}}{104}
\entry {\code {history-search-forward ()}}{104}
\initial {I}
\entry {\code {insert-comment (M-#)}}{108}
\entry {\code {insert-completions (M-*)}}{105}
\entry {\code {insert-last-argument (M-. or M-_)}}{109}
\entry {\code {insert-comment (M-#)}}{110}
\entry {\code {insert-completions (M-*)}}{107}
\entry {\code {insert-last-argument (M-. or M-_)}}{111}
\initial {K}
\entry {\code {kill-line (C-k)}}{104}
\entry {\code {kill-region ()}}{104}
\entry {\code {kill-whole-line ()}}{104}
\entry {\code {kill-word (M-d)}}{104}
\entry {\code {kill-line (C-k)}}{106}
\entry {\code {kill-region ()}}{106}
\entry {\code {kill-whole-line ()}}{106}
\entry {\code {kill-word (M-d)}}{106}
\initial {M}
\entry {\code {magic-space ()}}{109}
\entry {\code {menu-complete ()}}{105}
\entry {\code {magic-space ()}}{111}
\entry {\code {menu-complete ()}}{107}
\initial {N}
\entry {\code {next-history (C-n)}}{102}
\entry {\code {non-incremental-forward-search-history (M-n)}}{102}
\entry {\code {non-incremental-reverse-search-history (M-p)}}{102}
\entry {\code {next-history (C-n)}}{104}
\entry {\code {non-incremental-forward-search-history (M-n)}}{104}
\entry {\code {non-incremental-reverse-search-history (M-p)}}{104}
\initial {O}
\entry {\code {operate-and-get-next (C-o)}}{109}
\entry {\code {overwrite-mode ()}}{103}
\entry {\code {operate-and-get-next (C-o)}}{111}
\entry {\code {overwrite-mode ()}}{105}
\initial {P}
\entry {\code {possible-command-completions (C-x !)}}{106}
\entry {\code {possible-completions (M-?)}}{105}
\entry {\code {possible-filename-completions (C-x /)}}{106}
\entry {\code {possible-hostname-completions (C-x @)}}{106}
\entry {\code {possible-username-completions (C-x ~)}}{106}
\entry {\code {possible-variable-completions (C-x $)}}{106}
\entry {\code {prefix-meta (\key {ESC})}}{107}
\entry {\code {previous-history (C-p)}}{102}
\entry {\code {possible-command-completions (C-x !)}}{108}
\entry {\code {possible-completions (M-?)}}{107}
\entry {\code {possible-filename-completions (C-x /)}}{108}
\entry {\code {possible-hostname-completions (C-x @)}}{108}
\entry {\code {possible-username-completions (C-x ~)}}{108}
\entry {\code {possible-variable-completions (C-x $)}}{108}
\entry {\code {prefix-meta (\key {ESC})}}{109}
\entry {\code {previous-history (C-p)}}{104}
\initial {Q}
\entry {\code {quoted-insert (C-q or C-v)}}{103}
\entry {\code {quoted-insert (C-q or C-v)}}{105}
\initial {R}
\entry {\code {re-read-init-file (C-x C-r)}}{107}
\entry {\code {redraw-current-line ()}}{101}
\entry {\code {reverse-search-history (C-r)}}{102}
\entry {\code {revert-line (M-r)}}{107}
\entry {\code {re-read-init-file (C-x C-r)}}{109}
\entry {\code {redraw-current-line ()}}{103}
\entry {\code {reverse-search-history (C-r)}}{104}
\entry {\code {revert-line (M-r)}}{109}
\initial {S}
\entry {\code {self-insert (a, b, A, 1, !, \dots {})}}{103}
\entry {\code {set-mark (C-@)}}{107}
\entry {\code {shell-expand-line (M-C-e)}}{108}
\entry {\code {start-kbd-macro (C-x ()}}{106}
\entry {\code {self-insert (a, b, A, 1, !, \dots {})}}{105}
\entry {\code {set-mark (C-@)}}{109}
\entry {\code {shell-expand-line (M-C-e)}}{110}
\entry {\code {start-kbd-macro (C-x ()}}{108}
\initial {T}
\entry {\code {tilde-expand (M-&)}}{107}
\entry {\code {transpose-chars (C-t)}}{103}
\entry {\code {transpose-words (M-t)}}{103}
\entry {\code {tilde-expand (M-&)}}{109}
\entry {\code {transpose-chars (C-t)}}{105}
\entry {\code {transpose-words (M-t)}}{105}
\initial {U}
\entry {\code {undo (C-_ or C-x C-u)}}{107}
\entry {\code {universal-argument ()}}{105}
\entry {\code {unix-filename-rubout ()}}{104}
\entry {\code {unix-line-discard (C-u)}}{104}
\entry {\code {unix-word-rubout (C-w)}}{104}
\entry {\code {upcase-word (M-u)}}{103}
\entry {\code {undo (C-_ or C-x C-u)}}{109}
\entry {\code {universal-argument ()}}{107}
\entry {\code {unix-filename-rubout ()}}{106}
\entry {\code {unix-line-discard (C-u)}}{106}
\entry {\code {unix-word-rubout (C-w)}}{106}
\entry {\code {upcase-word (M-u)}}{105}
\initial {Y}
\entry {\code {yank (C-y)}}{105}
\entry {\code {yank-last-arg (M-. or M-_)}}{102}
\entry {\code {yank-nth-arg (M-C-y)}}{102}
\entry {\code {yank-pop (M-y)}}{105}
\entry {\code {yank (C-y)}}{107}
\entry {\code {yank-last-arg (M-. or M-_)}}{104}
\entry {\code {yank-nth-arg (M-C-y)}}{104}
\entry {\code {yank-pop (M-y)}}{107}
+2391 -2236
View File
File diff suppressed because it is too large Load Diff
+685 -593
View File
File diff suppressed because it is too large Load Diff
+59 -61
View File
@@ -1,4 +1,4 @@
This is TeX, Version 3.14159 (Web2C 7.4.5) (format=tex 2005.3.22) 26 JAN 2006 11:19
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2006.11.28) 16 JAN 2007 11:15
**/Users/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2003-02-03.16]: Basics,
@@ -106,7 +106,7 @@ cross references,
\auxfile=\write2
\savesfregister=\count46
\footnoteno=\count47
(/sw/share/texmf/tex/generic/misc/epsf.tex
(/sw/share/texmf-dist/tex/generic/epsf/epsf.tex
\epsffilein=\read0
\epsfframemargin=\dimen39
\epsfframethickness=\dimen40
@@ -119,18 +119,19 @@ cross references,
\epsfnoopenhelp=\toks24
)
\noepsfhelp=\toks25
localization,
localization,
\nolanghelp=\toks26
\defaultparindent=\dimen47
and turning on texinfo input format.) (./bashref.aux)
and turning on texinfo input format.) (./bashref.aux)
@cpindfile=@write3
@fnindfile=@write4
@vrindfile=@write5
@tpindfile=@write6
@kyindfile=@write7
@pgindfile=@write8
(./version.texi)
(./version.texi)
@btindfile=@write9
@rwindfile=@write10
[1
@@ -152,13 +153,12 @@ and turning on texinfo input format.) (./bashref.aux)
\openout10 = `bashref.rw'.
]
[2] (./bashref.toc [-1] [-2] [-3]) [-4] Chapter 1
] [2] (./bashref.toc [-1] [-2] [-3]) [-4] Chapter 1
\openout0 = `bashref.toc'.
[1] Chapter 2 [2] [3]
Chapter 3 [4] [5] [6] [7] [8] [9] [10]
Overfull \hbox (43.33539pt too wide) in paragraph at lines 845--845
[1]
Chapter 2 [2] [3] Chapter 3 [4] [5] [6] [7] [8] [9] [10]
Overfull \hbox (43.33539pt too wide) in paragraph at lines 839--839
[]@texttt case @textttsl word @texttt in [ [(] @textttsl pat-tern @texttt [| @
textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
@@ -173,7 +173,7 @@ textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
[11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]
[26] [27] [28] [29] [30] [31] [32] Chapter 4 [33] [34] [35] [36] [37] [38]
[39] [40] [41]
Underfull \hbox (badness 5231) in paragraph at lines 3120--3133
Underfull \hbox (badness 5231) in paragraph at lines 3121--3134
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
@@ -186,7 +186,7 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
.etc.
[42] [43] [44] [45]
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3463--3463
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3464--3464
[]@texttt read [-ers] [-a @textttsl aname@texttt ] [-d @textttsl de-lim@texttt
] [-n @textttsl nchars@texttt ] [-p @textttsl prompt@texttt ] [-t @textttsl ti
me-
@@ -199,8 +199,8 @@ me-
.@texttt a
.etc.
[46] [47] [48]
Underfull \hbox (badness 2573) in paragraph at lines 3647--3651
[46] [47] [48] [49] [50] [51] [52] [53]
Underfull \hbox (badness 2573) in paragraph at lines 4086--4090
[] []@textrm Error trac-ing is en-abled: com-mand sub-sti-tu-tion, shell
@hbox(7.60416+2.12917)x433.62, glue set 2.95305
@@ -215,9 +215,9 @@ Underfull \hbox (badness 2573) in paragraph at lines 3647--3651
.@textrm E
.etc.
[49] [50] [51] [52] [53] [54] [55] Chapter 5 [56] [57] [58] [59] [60] [61]
[62] [63] [64] Chapter 6 [65] [66]
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4840--4840
[54] [55] [56] Chapter 5 [57] [58] [59] [60] [61] [62] [63] [64] [65] [66]
Chapter 6 [67] [68]
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4902--4902
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -230,7 +230,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4841--4841
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4903--4903
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
-
@@ -244,7 +244,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 4841--4841
.etc.
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4842--4842
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4904--4904
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -256,8 +256,8 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.@texttt s
.etc.
[67] [68]
Underfull \hbox (badness 2245) in paragraph at lines 5016--5018
[69] [70]
Underfull \hbox (badness 2245) in paragraph at lines 5078--5080
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
the file
@@ -269,8 +269,8 @@ the file
.@textrm n
.etc.
[69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82]
Underfull \hbox (badness 2521) in paragraph at lines 6130--6133
[71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84]
Underfull \hbox (badness 2521) in paragraph at lines 6192--6195
@textrm `@texttt --enable-strict-posix-default[]@textrm '[] to @texttt configur
e[] @textrm when build-ing (see Sec-tion 10.8
@@ -282,10 +282,10 @@ e[] @textrm when build-ing (see Sec-tion 10.8
.@texttt n
.etc.
Chapter 7 [83] [84] [85] [86] [87]
(/Users/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [88] [89]
[90] [91] [92] [93]
Underfull \hbox (badness 5231) in paragraph at lines 500--516
Chapter 7 [85] [86] [87] [88] [89]
(/Users/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [90] [91]
[92] [93] [94] [95]
Underfull \hbox (badness 5231) in paragraph at lines 502--518
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
@@ -297,8 +297,8 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
.@texttt c
.etc.
[94] [95] [96] [97] [98]
Overfull \hbox (26.43913pt too wide) in paragraph at lines 813--813
[96] [97] [98] [99] [100]
Overfull \hbox (26.43913pt too wide) in paragraph at lines 817--817
[]@texttt Meta-Control-h: backward-kill-word Text after the function name is i
gnored[]
@@ -310,8 +310,8 @@ gnored[]
.@texttt t
.etc.
[99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110]
Overfull \hbox (17.80585pt too wide) in paragraph at lines 1662--1662
[101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112]
Overfull \hbox (17.80585pt too wide) in paragraph at lines 1666--1666
[]@texttt complete [-abcdefgjksuv] [-o @textttsl comp-option@texttt ] [-A @tex
tttsl ac-tion@texttt ] [-G @textttsl glob-
@@ -323,8 +323,8 @@ tttsl ac-tion@texttt ] [-G @textttsl glob-
.@texttt m
.etc.
[111] [112]
Underfull \hbox (badness 2753) in paragraph at lines 1764--1767
[113] [114]
Underfull \hbox (badness 2753) in paragraph at lines 1768--1771
@texttt hostname[]@textrm Hostnames, as taken from the file spec-i-fied by
@hbox(7.60416+2.12917)x433.62, glue set 3.02202
@@ -335,9 +335,9 @@ Underfull \hbox (badness 2753) in paragraph at lines 1764--1767
.@texttt o
.etc.
[113]) (/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[114] [115] [116] [117] [118]) Chapter 10 [119] [120] [121] [122] [123]
Underfull \hbox (badness 2772) in paragraph at lines 6724--6728
[115]) (/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[116] [117] [118] [119] [120]) Chapter 10 [121] [122] [123] [124] [125]
Underfull \hbox (badness 2772) in paragraph at lines 6788--6792
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
s/large_
@@ -349,37 +349,35 @@ s/large_
.@textrm a
.etc.
[124] [125] [126] Appendix A [127] [128] Appendix B [129] [130] [131] [132]
[133] [134] [135] Appendix C [136] (./fdl.texi [137] [138] [139] [140] [141]
[142]) (Index of Shell Builtin Commands) [143] [144] (./bashref.bts)
(Index of Shell Reserved Words)
Overfull \vbox (42.26959pt too high) has occurred while \output is active
\vbox(643.19986+0.0)x433.62, glue set - 1.0
.\glue(\topskip) 24.00002
.\vbox(11.99998+0.0)x433.62
..\hbox(11.99998+0.0)x433.62, glue set 148.745fil
[126] [127] [128] Appendix A [129] [130] Appendix B [131] [132] [133] [134]
[135] [136] [137] Appendix C [138] (./fdl.texi [139] [140] [141] [142] [143]
[144]) Appendix D [145] [146] (./bashref.bts) [147]
Overfull \vbox (45.46959pt too high) has occurred while \output is active
\vbox(643.19986+2.0)x433.62, glue set - 1.0
.\glue(\topskip) 26.00002
.\vbox(9.99998+0.0)x433.62
..\hbox(9.99998+0.0)x433.62, glue set 163.10767fil
...\hbox(0.0+0.0)x0.0
...\chaprm I
...\chaprm n
...\chaprm d
...\chaprm e
...\secrm D
...\secrm .
...\secrm 1
...\kern 8.09999
...etc.
.\penalty 10000
.\glue 12.0 plus 4.0 minus 4.0
.\kern 13.2
.\penalty 10000
.etc.
[145] [146] (./bashref.rws) (Parameter and Variable Index) [147] [148]
(./bashref.vrs [149]) (Function Index) [150] (./bashref.fns [151])
(Concept Index) [152] (./bashref.cps [153]) [154] )
[148] (./bashref.rws) (./bashref.vrs [149] [150]) (./bashref.fns [151])
[152] (./bashref.cps [153]) [154] )
Here is how much of TeX's memory you used:
1726 strings out of 98002
23501 string characters out of 1221987
52376 words of memory out of 1000001
2577 multiletter control sequences out of 10000+50000
31953 words of font info for 111 fonts, out of 500000 for 1000
1735 strings out of 97980
23708 string characters out of 1221004
55365 words of memory out of 1000000
2586 multiletter control sequences out of 10000+50000
31953 words of font info for 111 fonts, out of 500000 for 2000
19 hyphenation exceptions out of 1000
15i,8n,11p,269b,465s stack positions out of 1500i,500n,5000p,200000b,5000s
15i,8n,11p,269b,474s stack positions out of 1500i,500n,5000p,200000b,5000s
Output written on bashref.dvi (160 pages, 590960 bytes).
Output written on bashref.dvi (160 pages, 611796 bytes).
BIN
View File
Binary file not shown.
+5305 -4854
View File
File diff suppressed because it is too large Load Diff
+410 -333
View File
File diff suppressed because it is too large Load Diff
+79 -76
View File
@@ -34,7 +34,7 @@
\subsecentry{Word Splitting}{3}{5}{7}{22}
\subsecentry{Filename Expansion}{3}{5}{8}{23}
\subsubsecentry{Pattern Matching}{3}{5}{8}{1}{23}
\subsecentry{Quote Removal}{3}{5}{9}{24}
\subsecentry{Quote Removal}{3}{5}{9}{25}
\secentry{Redirections}{3}{6}{25}
\subsecentry{Redirecting Input}{3}{6}{1}{26}
\subsecentry{Redirecting Output}{3}{6}{2}{26}
@@ -56,79 +56,82 @@
\chapentry{Shell Builtin Commands}{4}{35}
\secentry{Bourne Shell Builtins}{4}{1}{35}
\secentry{Bash Builtin Commands}{4}{2}{41}
\secentry{The Set Builtin}{4}{3}{53}
\secentry{Modifying Shell Behavior}{4}{3}{49}
\subsecentry{The Set Builtin}{4}{3}{1}{49}
\subsecentry{The Shopt Builtin}{4}{3}{2}{52}
\secentry{Special Builtins}{4}{4}{56}
\chapentry{Shell Variables}{5}{57}
\secentry{Bourne Shell Variables}{5}{1}{57}
\secentry{Bash Variables}{5}{2}{57}
\chapentry{Bash Features}{6}{67}
\secentry{Invoking Bash}{6}{1}{67}
\secentry{Bash Startup Files}{6}{2}{69}
\secentry{Interactive Shells}{6}{3}{71}
\subsecentry{What is an Interactive Shell?}{6}{3}{1}{71}
\subsecentry{Is this Shell Interactive?}{6}{3}{2}{71}
\subsecentry{Interactive Shell Behavior}{6}{3}{3}{71}
\secentry{Bash Conditional Expressions}{6}{4}{72}
\secentry{Shell Arithmetic}{6}{5}{74}
\secentry{Aliases}{6}{6}{75}
\secentry{Arrays}{6}{7}{76}
\secentry{The Directory Stack}{6}{8}{77}
\subsecentry{Directory Stack Builtins}{6}{8}{1}{77}
\secentry{Controlling the Prompt}{6}{9}{78}
\secentry{The Restricted Shell}{6}{10}{80}
\secentry{Bash POSIX Mode}{6}{11}{80}
\chapentry{Job Control}{7}{85}
\secentry{Job Control Basics}{7}{1}{85}
\secentry{Job Control Builtins}{7}{2}{86}
\secentry{Job Control Variables}{7}{3}{87}
\chapentry{Command Line Editing}{8}{89}
\secentry{Introduction to Line Editing}{8}{1}{89}
\secentry{Readline Interaction}{8}{2}{89}
\subsecentry{Readline Bare Essentials}{8}{2}{1}{89}
\subsecentry{Readline Movement Commands}{8}{2}{2}{90}
\subsecentry{Readline Killing Commands}{8}{2}{3}{90}
\subsecentry{Readline Arguments}{8}{2}{4}{91}
\subsecentry{Searching for Commands in the History}{8}{2}{5}{91}
\secentry{Readline Init File}{8}{3}{92}
\subsecentry{Readline Init File Syntax}{8}{3}{1}{92}
\subsecentry{Conditional Init Constructs}{8}{3}{2}{97}
\subsecentry{Sample Init File}{8}{3}{3}{98}
\secentry{Bindable Readline Commands}{8}{4}{101}
\subsecentry{Commands For Moving}{8}{4}{1}{101}
\subsecentry{Commands For Manipulating The History}{8}{4}{2}{101}
\subsecentry{Commands For Changing Text}{8}{4}{3}{103}
\subsecentry{Killing And Yanking}{8}{4}{4}{104}
\subsecentry{Specifying Numeric Arguments}{8}{4}{5}{105}
\subsecentry{Letting Readline Type For You}{8}{4}{6}{105}
\subsecentry{Keyboard Macros}{8}{4}{7}{106}
\subsecentry{Some Miscellaneous Commands}{8}{4}{8}{107}
\secentry{Readline vi Mode}{8}{5}{109}
\secentry{Programmable Completion}{8}{6}{109}
\secentry{Programmable Completion Builtins}{8}{7}{111}
\chapentry{Using History Interactively}{9}{115}
\secentry{Bash History Facilities}{9}{1}{115}
\secentry{Bash History Builtins}{9}{2}{115}
\secentry{History Expansion}{9}{3}{117}
\subsecentry{Event Designators}{9}{3}{1}{117}
\subsecentry{Word Designators}{9}{3}{2}{118}
\subsecentry{Modifiers}{9}{3}{3}{119}
\chapentry{Installing Bash}{10}{121}
\secentry{Basic Installation}{10}{1}{121}
\secentry{Compilers and Options}{10}{2}{121}
\secentry{Compiling For Multiple Architectures}{10}{3}{122}
\secentry{Installation Names}{10}{4}{122}
\secentry{Specifying the System Type}{10}{5}{122}
\secentry{Sharing Defaults}{10}{6}{123}
\secentry{Operation Controls}{10}{7}{123}
\secentry{Optional Features}{10}{8}{123}
\appendixentry{Reporting Bugs}{A}{129}
\appendixentry{Major Differences From The Bourne Shell}{B}{131}
\secentry{Implementation Differences From The SVR4.2 Shell}{B}{1}{135}
\appendixentry{Copying This Manual}{C}{137}
\secentry{GNU Free Documentation License}{C}{1}{137}
\subsecentry{ADDENDUM: How to use this License for your documents}{C}{1}{1}{143}
\unnumbchapentry{Index of Shell Builtin Commands}{10}{145}
\unnumbchapentry{Index of Shell Reserved Words}{10}{147}
\unnumbchapentry{Parameter and Variable Index}{10}{149}
\unnumbchapentry{Function Index}{10}{151}
\unnumbchapentry{Concept Index}{10}{153}
\chapentry{Shell Variables}{5}{59}
\secentry{Bourne Shell Variables}{5}{1}{59}
\secentry{Bash Variables}{5}{2}{59}
\chapentry{Bash Features}{6}{69}
\secentry{Invoking Bash}{6}{1}{69}
\secentry{Bash Startup Files}{6}{2}{71}
\secentry{Interactive Shells}{6}{3}{73}
\subsecentry{What is an Interactive Shell?}{6}{3}{1}{73}
\subsecentry{Is this Shell Interactive?}{6}{3}{2}{73}
\subsecentry{Interactive Shell Behavior}{6}{3}{3}{73}
\secentry{Bash Conditional Expressions}{6}{4}{74}
\secentry{Shell Arithmetic}{6}{5}{76}
\secentry{Aliases}{6}{6}{77}
\secentry{Arrays}{6}{7}{78}
\secentry{The Directory Stack}{6}{8}{79}
\subsecentry{Directory Stack Builtins}{6}{8}{1}{79}
\secentry{Controlling the Prompt}{6}{9}{80}
\secentry{The Restricted Shell}{6}{10}{82}
\secentry{Bash POSIX Mode}{6}{11}{82}
\chapentry{Job Control}{7}{87}
\secentry{Job Control Basics}{7}{1}{87}
\secentry{Job Control Builtins}{7}{2}{88}
\secentry{Job Control Variables}{7}{3}{89}
\chapentry{Command Line Editing}{8}{91}
\secentry{Introduction to Line Editing}{8}{1}{91}
\secentry{Readline Interaction}{8}{2}{91}
\subsecentry{Readline Bare Essentials}{8}{2}{1}{91}
\subsecentry{Readline Movement Commands}{8}{2}{2}{92}
\subsecentry{Readline Killing Commands}{8}{2}{3}{92}
\subsecentry{Readline Arguments}{8}{2}{4}{93}
\subsecentry{Searching for Commands in the History}{8}{2}{5}{93}
\secentry{Readline Init File}{8}{3}{94}
\subsecentry{Readline Init File Syntax}{8}{3}{1}{94}
\subsecentry{Conditional Init Constructs}{8}{3}{2}{99}
\subsecentry{Sample Init File}{8}{3}{3}{100}
\secentry{Bindable Readline Commands}{8}{4}{103}
\subsecentry{Commands For Moving}{8}{4}{1}{103}
\subsecentry{Commands For Manipulating The History}{8}{4}{2}{103}
\subsecentry{Commands For Changing Text}{8}{4}{3}{105}
\subsecentry{Killing And Yanking}{8}{4}{4}{106}
\subsecentry{Specifying Numeric Arguments}{8}{4}{5}{107}
\subsecentry{Letting Readline Type For You}{8}{4}{6}{107}
\subsecentry{Keyboard Macros}{8}{4}{7}{108}
\subsecentry{Some Miscellaneous Commands}{8}{4}{8}{109}
\secentry{Readline vi Mode}{8}{5}{111}
\secentry{Programmable Completion}{8}{6}{111}
\secentry{Programmable Completion Builtins}{8}{7}{113}
\chapentry{Using History Interactively}{9}{117}
\secentry{Bash History Facilities}{9}{1}{117}
\secentry{Bash History Builtins}{9}{2}{117}
\secentry{History Expansion}{9}{3}{119}
\subsecentry{Event Designators}{9}{3}{1}{119}
\subsecentry{Word Designators}{9}{3}{2}{120}
\subsecentry{Modifiers}{9}{3}{3}{121}
\chapentry{Installing Bash}{10}{123}
\secentry{Basic Installation}{10}{1}{123}
\secentry{Compilers and Options}{10}{2}{123}
\secentry{Compiling For Multiple Architectures}{10}{3}{124}
\secentry{Installation Names}{10}{4}{124}
\secentry{Specifying the System Type}{10}{5}{124}
\secentry{Sharing Defaults}{10}{6}{125}
\secentry{Operation Controls}{10}{7}{125}
\secentry{Optional Features}{10}{8}{125}
\appendixentry{Reporting Bugs}{A}{131}
\appendixentry{Major Differences From The Bourne Shell}{B}{133}
\secentry{Implementation Differences From The SVR4.2 Shell}{B}{1}{137}
\appendixentry{Copying This Manual}{C}{139}
\secentry{GNU Free Documentation License}{C}{1}{139}
\subsecentry{ADDENDUM: How to use this License for your documents}{C}{1}{1}{145}
\appendixentry{Indexes}{D}{147}
\secentry{Index of Shell Builtin Commands}{D}{1}{147}
\secentry{Index of Shell Reserved Words}{D}{2}{149}
\secentry{Parameter and Variable Index}{D}{3}{149}
\secentry{Function Index}{D}{4}{151}
\secentry{Concept Index}{D}{5}{152}
+107 -104
View File
@@ -10,107 +10,110 @@
\entry{!}{16}{\code {!}}
\entry{0}{16}{\code {0}}
\entry{_}{16}{\code {_}}
\entry{CDPATH}{57}{\code {CDPATH}}
\entry{HOME}{57}{\code {HOME}}
\entry{IFS}{57}{\code {IFS}}
\entry{MAIL}{57}{\code {MAIL}}
\entry{MAILPATH}{57}{\code {MAILPATH}}
\entry{OPTARG}{57}{\code {OPTARG}}
\entry{OPTIND}{57}{\code {OPTIND}}
\entry{PATH}{57}{\code {PATH}}
\entry{PS1}{57}{\code {PS1}}
\entry{PS2}{57}{\code {PS2}}
\entry{BASH}{57}{\code {BASH}}
\entry{BASH_ARGC}{58}{\code {BASH_ARGC}}
\entry{BASH_ARGV}{58}{\code {BASH_ARGV}}
\entry{BASH_COMMAND}{58}{\code {BASH_COMMAND}}
\entry{BASH_ENV}{58}{\code {BASH_ENV}}
\entry{BASH_EXECUTION_STRING}{58}{\code {BASH_EXECUTION_STRING}}
\entry{BASH_LINENO}{58}{\code {BASH_LINENO}}
\entry{BASH_REMATCH}{58}{\code {BASH_REMATCH}}
\entry{BASH_SOURCE}{58}{\code {BASH_SOURCE}}
\entry{BASH_SUBSHELL}{58}{\code {BASH_SUBSHELL}}
\entry{BASH_VERSINFO}{58}{\code {BASH_VERSINFO}}
\entry{BASH_VERSION}{59}{\code {BASH_VERSION}}
\entry{COLUMNS}{59}{\code {COLUMNS}}
\entry{COMP_CWORD}{59}{\code {COMP_CWORD}}
\entry{COMP_LINE}{59}{\code {COMP_LINE}}
\entry{COMP_POINT}{59}{\code {COMP_POINT}}
\entry{COMP_WORDBREAKS}{59}{\code {COMP_WORDBREAKS}}
\entry{COMP_WORDS}{59}{\code {COMP_WORDS}}
\entry{COMPREPLY}{60}{\code {COMPREPLY}}
\entry{DIRSTACK}{60}{\code {DIRSTACK}}
\entry{EMACS}{60}{\code {EMACS}}
\entry{EUID}{60}{\code {EUID}}
\entry{FCEDIT}{60}{\code {FCEDIT}}
\entry{FIGNORE}{60}{\code {FIGNORE}}
\entry{FUNCNAME}{60}{\code {FUNCNAME}}
\entry{GLOBIGNORE}{60}{\code {GLOBIGNORE}}
\entry{GROUPS}{60}{\code {GROUPS}}
\entry{histchars}{60}{\code {histchars}}
\entry{HISTCMD}{61}{\code {HISTCMD}}
\entry{HISTCONTROL}{61}{\code {HISTCONTROL}}
\entry{HISTFILE}{61}{\code {HISTFILE}}
\entry{HISTFILESIZE}{61}{\code {HISTFILESIZE}}
\entry{HISTIGNORE}{61}{\code {HISTIGNORE}}
\entry{HISTSIZE}{61}{\code {HISTSIZE}}
\entry{HISTTIMEFORMAT}{61}{\code {HISTTIMEFORMAT}}
\entry{HOSTFILE}{62}{\code {HOSTFILE}}
\entry{HOSTNAME}{62}{\code {HOSTNAME}}
\entry{HOSTTYPE}{62}{\code {HOSTTYPE}}
\entry{IGNOREEOF}{62}{\code {IGNOREEOF}}
\entry{INPUTRC}{62}{\code {INPUTRC}}
\entry{LANG}{62}{\code {LANG}}
\entry{LC_ALL}{62}{\code {LC_ALL}}
\entry{LC_COLLATE}{62}{\code {LC_COLLATE}}
\entry{LC_CTYPE}{62}{\code {LC_CTYPE}}
\entry{LC_MESSAGES}{62}{\code {LC_MESSAGES}}
\entry{LC_NUMERIC}{62}{\code {LC_NUMERIC}}
\entry{LINENO}{62}{\code {LINENO}}
\entry{LINES}{63}{\code {LINES}}
\entry{MACHTYPE}{63}{\code {MACHTYPE}}
\entry{MAILCHECK}{63}{\code {MAILCHECK}}
\entry{OLDPWD}{63}{\code {OLDPWD}}
\entry{OPTERR}{63}{\code {OPTERR}}
\entry{OSTYPE}{63}{\code {OSTYPE}}
\entry{PIPESTATUS}{63}{\code {PIPESTATUS}}
\entry{POSIXLY_CORRECT}{63}{\code {POSIXLY_CORRECT}}
\entry{PPID}{63}{\code {PPID}}
\entry{PROMPT_COMMAND}{63}{\code {PROMPT_COMMAND}}
\entry{PS3}{63}{\code {PS3}}
\entry{PS4}{63}{\code {PS4}}
\entry{PWD}{63}{\code {PWD}}
\entry{RANDOM}{63}{\code {RANDOM}}
\entry{REPLY}{63}{\code {REPLY}}
\entry{SECONDS}{64}{\code {SECONDS}}
\entry{SHELL}{64}{\code {SHELL}}
\entry{SHELLOPTS}{64}{\code {SHELLOPTS}}
\entry{SHLVL}{64}{\code {SHLVL}}
\entry{TIMEFORMAT}{64}{\code {TIMEFORMAT}}
\entry{TMOUT}{64}{\code {TMOUT}}
\entry{TMPDIR}{65}{\code {TMPDIR}}
\entry{UID}{65}{\code {UID}}
\entry{auto_resume}{88}{\code {auto_resume}}
\entry{bell-style}{93}{\code {bell-style}}
\entry{bind-tty-special-chars}{93}{\code {bind-tty-special-chars}}
\entry{comment-begin}{93}{\code {comment-begin}}
\entry{completion-query-items}{93}{\code {completion-query-items}}
\entry{convert-meta}{94}{\code {convert-meta}}
\entry{disable-completion}{94}{\code {disable-completion}}
\entry{editing-mode}{94}{\code {editing-mode}}
\entry{enable-keypad}{94}{\code {enable-keypad}}
\entry{expand-tilde}{94}{\code {expand-tilde}}
\entry{history-preserve-point}{94}{\code {history-preserve-point}}
\entry{horizontal-scroll-mode}{94}{\code {horizontal-scroll-mode}}
\entry{input-meta}{94}{\code {input-meta}}
\entry{meta-flag}{94}{\code {meta-flag}}
\entry{isearch-terminators}{94}{\code {isearch-terminators}}
\entry{keymap}{94}{\code {keymap}}
\entry{mark-modified-lines}{95}{\code {mark-modified-lines}}
\entry{mark-symlinked-directories}{95}{\code {mark-symlinked-directories}}
\entry{match-hidden-files}{95}{\code {match-hidden-files}}
\entry{output-meta}{95}{\code {output-meta}}
\entry{page-completions}{95}{\code {page-completions}}
\entry{show-all-if-ambiguous}{95}{\code {show-all-if-ambiguous}}
\entry{show-all-if-unmodified}{95}{\code {show-all-if-unmodified}}
\entry{visible-stats}{96}{\code {visible-stats}}
\entry{CDPATH}{59}{\code {CDPATH}}
\entry{HOME}{59}{\code {HOME}}
\entry{IFS}{59}{\code {IFS}}
\entry{MAIL}{59}{\code {MAIL}}
\entry{MAILPATH}{59}{\code {MAILPATH}}
\entry{OPTARG}{59}{\code {OPTARG}}
\entry{OPTIND}{59}{\code {OPTIND}}
\entry{PATH}{59}{\code {PATH}}
\entry{PS1}{59}{\code {PS1}}
\entry{PS2}{59}{\code {PS2}}
\entry{BASH}{59}{\code {BASH}}
\entry{BASHPID}{60}{\code {BASHPID}}
\entry{BASH_ARGC}{60}{\code {BASH_ARGC}}
\entry{BASH_ARGV}{60}{\code {BASH_ARGV}}
\entry{BASH_COMMAND}{60}{\code {BASH_COMMAND}}
\entry{BASH_ENV}{60}{\code {BASH_ENV}}
\entry{BASH_EXECUTION_STRING}{60}{\code {BASH_EXECUTION_STRING}}
\entry{BASH_LINENO}{60}{\code {BASH_LINENO}}
\entry{BASH_REMATCH}{60}{\code {BASH_REMATCH}}
\entry{BASH_SOURCE}{60}{\code {BASH_SOURCE}}
\entry{BASH_SUBSHELL}{61}{\code {BASH_SUBSHELL}}
\entry{BASH_VERSINFO}{61}{\code {BASH_VERSINFO}}
\entry{BASH_VERSION}{61}{\code {BASH_VERSION}}
\entry{COLUMNS}{61}{\code {COLUMNS}}
\entry{COMP_CWORD}{61}{\code {COMP_CWORD}}
\entry{COMP_LINE}{61}{\code {COMP_LINE}}
\entry{COMP_POINT}{61}{\code {COMP_POINT}}
\entry{COMP_TYPE}{61}{\code {COMP_TYPE}}
\entry{COMP_KEY}{62}{\code {COMP_KEY}}
\entry{COMP_WORDBREAKS}{62}{\code {COMP_WORDBREAKS}}
\entry{COMP_WORDS}{62}{\code {COMP_WORDS}}
\entry{COMPREPLY}{62}{\code {COMPREPLY}}
\entry{DIRSTACK}{62}{\code {DIRSTACK}}
\entry{EMACS}{62}{\code {EMACS}}
\entry{EUID}{62}{\code {EUID}}
\entry{FCEDIT}{62}{\code {FCEDIT}}
\entry{FIGNORE}{62}{\code {FIGNORE}}
\entry{FUNCNAME}{62}{\code {FUNCNAME}}
\entry{GLOBIGNORE}{63}{\code {GLOBIGNORE}}
\entry{GROUPS}{63}{\code {GROUPS}}
\entry{histchars}{63}{\code {histchars}}
\entry{HISTCMD}{63}{\code {HISTCMD}}
\entry{HISTCONTROL}{63}{\code {HISTCONTROL}}
\entry{HISTFILE}{63}{\code {HISTFILE}}
\entry{HISTFILESIZE}{63}{\code {HISTFILESIZE}}
\entry{HISTIGNORE}{63}{\code {HISTIGNORE}}
\entry{HISTSIZE}{64}{\code {HISTSIZE}}
\entry{HISTTIMEFORMAT}{64}{\code {HISTTIMEFORMAT}}
\entry{HOSTFILE}{64}{\code {HOSTFILE}}
\entry{HOSTNAME}{64}{\code {HOSTNAME}}
\entry{HOSTTYPE}{64}{\code {HOSTTYPE}}
\entry{IGNOREEOF}{64}{\code {IGNOREEOF}}
\entry{INPUTRC}{64}{\code {INPUTRC}}
\entry{LANG}{64}{\code {LANG}}
\entry{LC_ALL}{64}{\code {LC_ALL}}
\entry{LC_COLLATE}{65}{\code {LC_COLLATE}}
\entry{LC_CTYPE}{65}{\code {LC_CTYPE}}
\entry{LC_MESSAGES}{65}{\code {LC_MESSAGES}}
\entry{LC_NUMERIC}{65}{\code {LC_NUMERIC}}
\entry{LINENO}{65}{\code {LINENO}}
\entry{LINES}{65}{\code {LINES}}
\entry{MACHTYPE}{65}{\code {MACHTYPE}}
\entry{MAILCHECK}{65}{\code {MAILCHECK}}
\entry{OLDPWD}{65}{\code {OLDPWD}}
\entry{OPTERR}{65}{\code {OPTERR}}
\entry{OSTYPE}{65}{\code {OSTYPE}}
\entry{PIPESTATUS}{65}{\code {PIPESTATUS}}
\entry{POSIXLY_CORRECT}{65}{\code {POSIXLY_CORRECT}}
\entry{PPID}{66}{\code {PPID}}
\entry{PROMPT_COMMAND}{66}{\code {PROMPT_COMMAND}}
\entry{PS3}{66}{\code {PS3}}
\entry{PS4}{66}{\code {PS4}}
\entry{PWD}{66}{\code {PWD}}
\entry{RANDOM}{66}{\code {RANDOM}}
\entry{REPLY}{66}{\code {REPLY}}
\entry{SECONDS}{66}{\code {SECONDS}}
\entry{SHELL}{66}{\code {SHELL}}
\entry{SHELLOPTS}{66}{\code {SHELLOPTS}}
\entry{SHLVL}{66}{\code {SHLVL}}
\entry{TIMEFORMAT}{66}{\code {TIMEFORMAT}}
\entry{TMOUT}{67}{\code {TMOUT}}
\entry{TMPDIR}{67}{\code {TMPDIR}}
\entry{UID}{67}{\code {UID}}
\entry{auto_resume}{90}{\code {auto_resume}}
\entry{bell-style}{95}{\code {bell-style}}
\entry{bind-tty-special-chars}{95}{\code {bind-tty-special-chars}}
\entry{comment-begin}{95}{\code {comment-begin}}
\entry{completion-query-items}{95}{\code {completion-query-items}}
\entry{convert-meta}{96}{\code {convert-meta}}
\entry{disable-completion}{96}{\code {disable-completion}}
\entry{editing-mode}{96}{\code {editing-mode}}
\entry{enable-keypad}{96}{\code {enable-keypad}}
\entry{expand-tilde}{96}{\code {expand-tilde}}
\entry{history-preserve-point}{96}{\code {history-preserve-point}}
\entry{horizontal-scroll-mode}{96}{\code {horizontal-scroll-mode}}
\entry{input-meta}{96}{\code {input-meta}}
\entry{meta-flag}{96}{\code {meta-flag}}
\entry{isearch-terminators}{96}{\code {isearch-terminators}}
\entry{keymap}{96}{\code {keymap}}
\entry{mark-modified-lines}{97}{\code {mark-modified-lines}}
\entry{mark-symlinked-directories}{97}{\code {mark-symlinked-directories}}
\entry{match-hidden-files}{97}{\code {match-hidden-files}}
\entry{output-meta}{97}{\code {output-meta}}
\entry{page-completions}{97}{\code {page-completions}}
\entry{show-all-if-ambiguous}{97}{\code {show-all-if-ambiguous}}
\entry{show-all-if-unmodified}{97}{\code {show-all-if-unmodified}}
\entry{visible-stats}{98}{\code {visible-stats}}
+107 -104
View File
@@ -17,127 +17,130 @@
\initial {0}
\entry {\code {0}}{16}
\initial {A}
\entry {\code {auto_resume}}{88}
\entry {\code {auto_resume}}{90}
\initial {B}
\entry {\code {BASH}}{57}
\entry {\code {BASH_ARGC}}{58}
\entry {\code {BASH_ARGV}}{58}
\entry {\code {BASH_COMMAND}}{58}
\entry {\code {BASH_ENV}}{58}
\entry {\code {BASH_EXECUTION_STRING}}{58}
\entry {\code {BASH_LINENO}}{58}
\entry {\code {BASH_REMATCH}}{58}
\entry {\code {BASH_SOURCE}}{58}
\entry {\code {BASH_SUBSHELL}}{58}
\entry {\code {BASH_VERSINFO}}{58}
\entry {\code {BASH_VERSION}}{59}
\entry {\code {bell-style}}{93}
\entry {\code {bind-tty-special-chars}}{93}
\entry {\code {BASH}}{59}
\entry {\code {BASH_ARGC}}{60}
\entry {\code {BASH_ARGV}}{60}
\entry {\code {BASH_COMMAND}}{60}
\entry {\code {BASH_ENV}}{60}
\entry {\code {BASH_EXECUTION_STRING}}{60}
\entry {\code {BASH_LINENO}}{60}
\entry {\code {BASH_REMATCH}}{60}
\entry {\code {BASH_SOURCE}}{60}
\entry {\code {BASH_SUBSHELL}}{61}
\entry {\code {BASH_VERSINFO}}{61}
\entry {\code {BASH_VERSION}}{61}
\entry {\code {BASHPID}}{60}
\entry {\code {bell-style}}{95}
\entry {\code {bind-tty-special-chars}}{95}
\initial {C}
\entry {\code {CDPATH}}{57}
\entry {\code {COLUMNS}}{59}
\entry {\code {comment-begin}}{93}
\entry {\code {COMP_CWORD}}{59}
\entry {\code {COMP_LINE}}{59}
\entry {\code {COMP_POINT}}{59}
\entry {\code {COMP_WORDBREAKS}}{59}
\entry {\code {COMP_WORDS}}{59}
\entry {\code {completion-query-items}}{93}
\entry {\code {COMPREPLY}}{60}
\entry {\code {convert-meta}}{94}
\entry {\code {CDPATH}}{59}
\entry {\code {COLUMNS}}{61}
\entry {\code {comment-begin}}{95}
\entry {\code {COMP_CWORD}}{61}
\entry {\code {COMP_KEY}}{62}
\entry {\code {COMP_LINE}}{61}
\entry {\code {COMP_POINT}}{61}
\entry {\code {COMP_TYPE}}{61}
\entry {\code {COMP_WORDBREAKS}}{62}
\entry {\code {COMP_WORDS}}{62}
\entry {\code {completion-query-items}}{95}
\entry {\code {COMPREPLY}}{62}
\entry {\code {convert-meta}}{96}
\initial {D}
\entry {\code {DIRSTACK}}{60}
\entry {\code {disable-completion}}{94}
\entry {\code {DIRSTACK}}{62}
\entry {\code {disable-completion}}{96}
\initial {E}
\entry {\code {editing-mode}}{94}
\entry {\code {EMACS}}{60}
\entry {\code {enable-keypad}}{94}
\entry {\code {EUID}}{60}
\entry {\code {expand-tilde}}{94}
\entry {\code {editing-mode}}{96}
\entry {\code {EMACS}}{62}
\entry {\code {enable-keypad}}{96}
\entry {\code {EUID}}{62}
\entry {\code {expand-tilde}}{96}
\initial {F}
\entry {\code {FCEDIT}}{60}
\entry {\code {FIGNORE}}{60}
\entry {\code {FUNCNAME}}{60}
\entry {\code {FCEDIT}}{62}
\entry {\code {FIGNORE}}{62}
\entry {\code {FUNCNAME}}{62}
\initial {G}
\entry {\code {GLOBIGNORE}}{60}
\entry {\code {GROUPS}}{60}
\entry {\code {GLOBIGNORE}}{63}
\entry {\code {GROUPS}}{63}
\initial {H}
\entry {\code {histchars}}{60}
\entry {\code {HISTCMD}}{61}
\entry {\code {HISTCONTROL}}{61}
\entry {\code {HISTFILE}}{61}
\entry {\code {HISTFILESIZE}}{61}
\entry {\code {HISTIGNORE}}{61}
\entry {\code {history-preserve-point}}{94}
\entry {\code {HISTSIZE}}{61}
\entry {\code {HISTTIMEFORMAT}}{61}
\entry {\code {HOME}}{57}
\entry {\code {horizontal-scroll-mode}}{94}
\entry {\code {HOSTFILE}}{62}
\entry {\code {HOSTNAME}}{62}
\entry {\code {HOSTTYPE}}{62}
\entry {\code {histchars}}{63}
\entry {\code {HISTCMD}}{63}
\entry {\code {HISTCONTROL}}{63}
\entry {\code {HISTFILE}}{63}
\entry {\code {HISTFILESIZE}}{63}
\entry {\code {HISTIGNORE}}{63}
\entry {\code {history-preserve-point}}{96}
\entry {\code {HISTSIZE}}{64}
\entry {\code {HISTTIMEFORMAT}}{64}
\entry {\code {HOME}}{59}
\entry {\code {horizontal-scroll-mode}}{96}
\entry {\code {HOSTFILE}}{64}
\entry {\code {HOSTNAME}}{64}
\entry {\code {HOSTTYPE}}{64}
\initial {I}
\entry {\code {IFS}}{57}
\entry {\code {IGNOREEOF}}{62}
\entry {\code {input-meta}}{94}
\entry {\code {INPUTRC}}{62}
\entry {\code {isearch-terminators}}{94}
\entry {\code {IFS}}{59}
\entry {\code {IGNOREEOF}}{64}
\entry {\code {input-meta}}{96}
\entry {\code {INPUTRC}}{64}
\entry {\code {isearch-terminators}}{96}
\initial {K}
\entry {\code {keymap}}{94}
\entry {\code {keymap}}{96}
\initial {L}
\entry {\code {LANG}}{62}
\entry {\code {LC_ALL}}{62}
\entry {\code {LC_COLLATE}}{62}
\entry {\code {LC_CTYPE}}{62}
\entry {\code {LC_MESSAGES}}{7, 62}
\entry {\code {LC_NUMERIC}}{62}
\entry {\code {LINENO}}{62}
\entry {\code {LINES}}{63}
\entry {\code {LANG}}{64}
\entry {\code {LC_ALL}}{64}
\entry {\code {LC_COLLATE}}{65}
\entry {\code {LC_CTYPE}}{65}
\entry {\code {LC_MESSAGES}}{7, 65}
\entry {\code {LC_NUMERIC}}{65}
\entry {\code {LINENO}}{65}
\entry {\code {LINES}}{65}
\initial {M}
\entry {\code {MACHTYPE}}{63}
\entry {\code {MAIL}}{57}
\entry {\code {MAILCHECK}}{63}
\entry {\code {MAILPATH}}{57}
\entry {\code {mark-modified-lines}}{95}
\entry {\code {mark-symlinked-directories}}{95}
\entry {\code {match-hidden-files}}{95}
\entry {\code {meta-flag}}{94}
\entry {\code {MACHTYPE}}{65}
\entry {\code {MAIL}}{59}
\entry {\code {MAILCHECK}}{65}
\entry {\code {MAILPATH}}{59}
\entry {\code {mark-modified-lines}}{97}
\entry {\code {mark-symlinked-directories}}{97}
\entry {\code {match-hidden-files}}{97}
\entry {\code {meta-flag}}{96}
\initial {O}
\entry {\code {OLDPWD}}{63}
\entry {\code {OPTARG}}{57}
\entry {\code {OPTERR}}{63}
\entry {\code {OPTIND}}{57}
\entry {\code {OSTYPE}}{63}
\entry {\code {output-meta}}{95}
\entry {\code {OLDPWD}}{65}
\entry {\code {OPTARG}}{59}
\entry {\code {OPTERR}}{65}
\entry {\code {OPTIND}}{59}
\entry {\code {OSTYPE}}{65}
\entry {\code {output-meta}}{97}
\initial {P}
\entry {\code {page-completions}}{95}
\entry {\code {PATH}}{57}
\entry {\code {PIPESTATUS}}{63}
\entry {\code {POSIXLY_CORRECT}}{63}
\entry {\code {PPID}}{63}
\entry {\code {PROMPT_COMMAND}}{63}
\entry {\code {PS1}}{57}
\entry {\code {PS2}}{57}
\entry {\code {PS3}}{63}
\entry {\code {PS4}}{63}
\entry {\code {PWD}}{63}
\entry {\code {page-completions}}{97}
\entry {\code {PATH}}{59}
\entry {\code {PIPESTATUS}}{65}
\entry {\code {POSIXLY_CORRECT}}{65}
\entry {\code {PPID}}{66}
\entry {\code {PROMPT_COMMAND}}{66}
\entry {\code {PS1}}{59}
\entry {\code {PS2}}{59}
\entry {\code {PS3}}{66}
\entry {\code {PS4}}{66}
\entry {\code {PWD}}{66}
\initial {R}
\entry {\code {RANDOM}}{63}
\entry {\code {REPLY}}{63}
\entry {\code {RANDOM}}{66}
\entry {\code {REPLY}}{66}
\initial {S}
\entry {\code {SECONDS}}{64}
\entry {\code {SHELL}}{64}
\entry {\code {SHELLOPTS}}{64}
\entry {\code {SHLVL}}{64}
\entry {\code {show-all-if-ambiguous}}{95}
\entry {\code {show-all-if-unmodified}}{95}
\entry {\code {SECONDS}}{66}
\entry {\code {SHELL}}{66}
\entry {\code {SHELLOPTS}}{66}
\entry {\code {SHLVL}}{66}
\entry {\code {show-all-if-ambiguous}}{97}
\entry {\code {show-all-if-unmodified}}{97}
\initial {T}
\entry {\code {TEXTDOMAIN}}{7}
\entry {\code {TEXTDOMAINDIR}}{7}
\entry {\code {TIMEFORMAT}}{64}
\entry {\code {TMOUT}}{64}
\entry {\code {TMPDIR}}{65}
\entry {\code {TIMEFORMAT}}{66}
\entry {\code {TMOUT}}{67}
\entry {\code {TMPDIR}}{67}
\initial {U}
\entry {\code {UID}}{65}
\entry {\code {UID}}{67}
\initial {V}
\entry {\code {visible-stats}}{96}
\entry {\code {visible-stats}}{98}
+403 -386
View File
File diff suppressed because it is too large Load Diff
+1210 -1182
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -1,5 +1,5 @@
From: chet@po.cwru.edu (Chet Ramey)
From: chet.ramey@case.edu (Chet Ramey)
To: bug-bash@gnu.org
Subject: BASH Frequently-Asked Questions (FAQ version 3.30)
Reply-To: chet@po.cwru.edu
Subject: BASH Frequently-Asked Questions (FAQ version 3.35)
Cc: chet.ramey@case.edu
Reply-To: chet.ramey@case.edu
+1 -1
View File
@@ -1,7 +1,7 @@
Newsgroups: comp.unix.shell,comp.unix.questions
Distribution: world
From: chet@po.cwru.edu (Chet Ramey)
Subject: BASH Frequently-Asked Questions (FAQ version 3.30)
Subject: BASH Frequently-Asked Questions (FAQ version 3.35)
Organization: Case Western Reserve University
Summary: A's to Q's about BASH, the Bourne-Again SHell
Reply-To: chet@po.cwru.edu
+1 -1
View File
@@ -1,6 +1,6 @@
Newsgroups: comp.unix.shell,comp.unix.questions,comp.answers,news.answers
From: chet@po.cwru.edu (Chet Ramey)
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.30)
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.35)
Organization: Case Western Reserve University
Summary: A's to Q's about BASH, the Bourne-Again SHell
Reply-To: chet@po.cwru.edu
+117 -64
View File
@@ -1,18 +1,18 @@
From: chet@po.cwru.edu (Chet Ramey)
From: chet.ramey@case.edu (Chet Ramey)
To: bug-bash@gnu.org
Subject: BASH Frequently-Asked Questions (FAQ version 3.30)
Reply-To: chet@po.cwru.edu
Subject: BASH Frequently-Asked Questions (FAQ version 3.35)
Cc: chet.ramey@case.edu
Reply-To: chet.ramey@case.edu
Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Mon Feb 14 11:57:02 EST 2005
FAQ-Version: 3.30
Bash-Version: 3.0
Last-Modified: Thu Dec 14 11:34:54 EST 2006
FAQ-Version: 3.35
Bash-Version: 3.2
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)
This is the Bash FAQ, version 3.30, for Bash version 3.0.
This is the Bash FAQ, version 3.35, 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
@@ -23,7 +23,7 @@ Another good source of basic information about shells is the collection
of FAQ articles periodically posted to comp.unix.shell.
Questions and comments concerning this document should be sent to
chet@po.cwru.edu.
chet.ramey@case.edu.
This document is available for anonymous FTP with the URL
@@ -50,9 +50,9 @@ A10) What is the bash `posix mode'?
Section B: The latest version
B1) What's new in version 3.0?
B2) Are there any user-visible incompatibilities between bash-3.0 and
bash-1.14.7?
B1) What's new in version 3.2?
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
Section C: Differences from other Unix shells
@@ -92,6 +92,7 @@ E10) Why does `cd //' leave $PWD as `//'?
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?
Section F: Things to watch out for on certain Unix versions
@@ -154,26 +155,26 @@ of Case Western Reserve University.
A2) What's the latest version?
The latest version is 3.0, first made available on 27 July, 2004.
The latest version is 3.2, first made available on 12 October, 2006.
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 3.0:
The following URLs tell how to get version 3.2:
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-3.0.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz
Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.0.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz
Any patches for the current version are available with the URL:
ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/
ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
A4) On what machines will bash run?
@@ -204,10 +205,10 @@ of their CYGWIN project. For more information about the project, see
http://www.cygwin.com/.
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.05b to the CYGWIN environment, and it is available as
part of their current release. Bash-3.0 is currently being tested and
should be available soon.
early GNU-Win32 (the original name) releases. Cygnus has also done
ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both
are available as part of their current release. Bash-3.2 is currently
being tested and should be available soon.
Bash-2.05b and later versions should require no local Cygnus changes to
build and run under CYGWIN.
@@ -229,7 +230,8 @@ ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204s.zip source
Mark began to work with bash-2.05, but I don't know the current status.
Bash-3.0 compiles and runs with no modifications under Microsoft's Services
for Unix (SFU), once known as Interix.
for Unix (SFU), once known as Interix. I do not anticipate any problems
with building bash-3.1 or bash-3.2.
A6) How can I build bash with gcc?
@@ -398,15 +400,33 @@ They are also listed in a section in the Bash Reference Manual
Section B: The latest version
B1) What's new in version 3.0?
B1) What's new in version 3.2?
Bash-3.0 is the third major release of bash. The features introduced
in the intermediate releases following bash-2.05 have been completed.
Support for the bash debugger (a separate project) has been integrated.
Bash-3.2 is the second maintenance release of the third major release of
bash. It contains the following significant new features (see the manual
page for complete descriptions and the CHANGES and NEWS files in the
bash-3.2 distribution).
Bash-3.0 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-3.0
distribution):
o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
characters when deciding whether or not a script is a binary file.
o Quoting the string argument to the [[ command's =~ (regexp) operator now
forces string matching, as with the other pattern-matching operators.
A short feature history dating from Bash-2.0:
Bash-3.1 contained the following new features:
o Bash-3.1 may now be configured and built in a mode that enforces strict
POSIX compliance.
o The `+=' assignment operator, which appends to the value of a string or
array variable, has been implemented.
o It is now possible to ignore case when matching in contexts other than
filename generation using the new `nocasematch' shell option.
Bash-3.0 contained the following new features:
o Features to support the bash debugger have been implemented, and there
is a new `extdebug' option to turn the non-default options on
@@ -436,8 +456,6 @@ o The `jobs', `kill', and `wait' builtins now accept job control notation
o The `gettext' package and libintl have been integrated, and the shell
messages may be translated into other languages
A short feature history dating from Bash-2.0:
Bash-2.05b introduced the following new features:
o support for multibyte characters has been added to both bash and readline
@@ -645,10 +663,10 @@ 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-3.0 and
bash-1.14.7?
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
There are a few incompatibilities between version 1.14.7 and version 3.0.
There are a few incompatibilities between version 2.05b and version 3.2.
They are detailed in the file COMPAT in the bash distribution. That file
is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org
if if you find something that's not mentioned there.
@@ -702,7 +720,7 @@ Things bash has that sh does not:
read -e/-p/-a/-t/-n/-d/-s/-u,
readonly -a/-f/name=value, trap -l, set +o,
set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
unset -f/-v, ulimit -m/-p/-u,
unset -f/-v, ulimit -i/-m/-p/-q/-u/-x,
type -a/-p/-t/-f/-P, suspend -f, kill -n,
test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
@@ -731,11 +749,12 @@ Things bash has that sh does not:
case-insensitive pattern matching and globbing
variable assignments preceding commands affect only that command,
even for builtins and functions
posix mode
posix mode and strict posix conformance
redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr,
/dev/tcp/host/port, /dev/udp/host/port
debugger support, including `caller' builtin and new variables
RETURN trap
the `+=' assignment operator
Things sh has that bash does not:
@@ -797,8 +816,8 @@ Things bash has or uses that ksh88 does not:
set -o braceexpand/-o histexpand/-o interactive-comments/
-o notify/-o physical/-o posix/-o hashall/-o onecmd/
-h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt,
disown, printf, complete, compgen
typeset -a/-F/-p, ulimit -i/-q/-u/-x, umask -S, alias -p,
shopt, disown, printf, complete, compgen
`!' csh-style history expansion
POSIX.2-style globbing character classes
POSIX.2-style globbing equivalence classes
@@ -813,6 +832,7 @@ Things bash has or uses that ksh88 does not:
RETURN trap
Timestamps in history entries
{x..y} brace expansion
The `+=' assignment operator
Things ksh88 has or uses that bash does not:
tracked aliases (alias -t)
@@ -840,7 +860,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-3.0:
New things in ksh-93 not in bash-3.2:
associative arrays
floating point arithmetic and variables
math library functions
@@ -859,7 +879,6 @@ New things in ksh-93 not in bash-3.0:
`fc' has been renamed to `hist'
`.' can execute shell functions
exit statuses between 0 and 255
`+=' variable assignment operator
FPATH and PATH mixing
getopts -a
-I invocation option
@@ -867,7 +886,7 @@ New things in ksh-93 not in bash-3.0:
lexical scoping for local variables in `ksh' functions
no scoping for local variables in `POSIX' functions
New things in ksh-93 present in bash-3.0:
New things in ksh-93 present in bash-3.2:
[n]<&word- and [n]>&word- redirections (combination dup and close)
for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
?:, ++, --, `expr1 , expr2' arithmetic operators
@@ -893,6 +912,7 @@ New things in ksh-93 present in bash-3.0:
command name completion
ENV processed only for interactive shells
set -o pipefail
The `+=' assignment operator
Section D: Why does bash do some things differently than other Unix shells?
@@ -1116,9 +1136,8 @@ will try to write on a pipe without a reader. In that case, bash
will print `Broken pipe' to stderr when ps is killed by a
SIGPIPE.
You can build a version of bash that will not report SIGPIPE errors
by uncommenting the definition of DONT_REPORT_SIGPIPE in the file
config-top.h.
As of bash-3.1, bash does not report SIGPIPE errors by default. You
can build a version of bash that will report such errors.
E3) When I have terminal escape sequences in my prompt, why does bash
wrap lines at the wrong column?
@@ -1145,12 +1164,12 @@ 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
parent's environment. When the `read' command sets the variable
to the input, that variable is set only in the subshell, not the
parent shell. When the subshell exits, the value of the variable
is lost.
Each element of a pipeline, even a builtin or shell function,
runs in a separate process, a child of the shell running the
pipeline. A subprocess cannot affect its parent's environment.
When the `read' command sets the variable to the input, that
variable is set only in the subshell, not the parent shell. When
the subshell exits, the value of the variable is lost.
Many pipelines that end with `read variable' can be converted
into command substitutions, which will capture the output of
@@ -1394,6 +1413,32 @@ expanded value of param is unset or null, and $param otherwise.
To use negative offsets that begin with a minus sign, separate the
minus sign and the colon with a space.
E13) Why does filename completion misbehave if a colon appears in the filename?
Filename completion (and word completion in general) may appear to behave
improperly if there is a colon in the word to be completed.
The colon is special to readline's word completion code: it is one of the
characters that breaks words for the completer. Readline uses these characters
in sort of the same way that bash uses $IFS: they break or separate the words
the completion code hands to the application-specific or default word
completion functions. The original intent was to make it easy to edit
colon-separated lists (such as $PATH in bash) in various applications using
readline for input.
This is complicated by the fact that some versions of the popular
`bash-completion' programmable completion package have problems with the
default completion behavior in the presence of colons.
The current set of completion word break characters is available in bash as
the value of the COMP_WORDBREAKS variable. Removing `:' from that value is
enough to make the colon not special to completion:
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
You can also quote the colon with a backslash to achieve the same result
temporarily.
Section F: Things to watch out for on certain Unix versions
F1) Why can't I use command line editing in my `cmdtool'?
@@ -1579,6 +1624,9 @@ this. These variables can be set in your .inputrc or using the bash
The `set' commands between the single quotes may also be placed
in ~/.inputrc.
The script examples/scripts.noah/meta.bash encapsulates the bind
commands in a shell function.
G2) How do I write a function `x' to replace builtin command `x', but
still invoke the command from within the function?
@@ -1752,20 +1800,26 @@ ftp.cwru.edu in the `pub/bash' directory.
Cameron Newham and Bill Rosenblatt have written a book on bash, published
by O'Reilly and Associates. The book is based on Bill Rosenblatt's Korn
Shell book. The title is ``Learning the Bash Shell'', and the ISBN number
is 1-56592-147-X. Look for it in fine bookstores near you. This book
covers bash-1.14, but has an appendix describing some of the new features
in bash-2.0.
A second edition of this book is available, published in January, 1998.
The ISBN number is 1-56592-347-2. Look for it in the same fine bookstores
or on the web.
of the third edition, published in March, 2005, is 0-596-00965-8. Look for
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.
Arnold Robbins and Nelson Beebe have written ``Classic Shell Scripting'',
published by O'Reilly. The first edition, with ISBN number 0-596-00595-4,
was published in May, 2005.
Chris F. A. Johnson, a frequent contributor to comp.unix.shell and
gnu.bash.bug, has written ``Shell Scripting Recipes: A Problem-Solution
Approach,'' a new book on shell scripting, concentrating on features of
the POSIX standard helpful to shell script writers. The first edition from
Apress, with ISBN number 1-59059-471-1, was published in May, 2005.
H3) What's coming in future versions?
These are features I hope to include in a future version of bash.
@@ -1784,16 +1838,15 @@ a bash programmer's guide with a chapter on creating loadable builtins
a better loadable interface to perl with access to the shell builtins and
variables (contributions gratefully accepted)
ksh93-like `nameref' variables
ksh93-like `+=' variable assignment operator
ksh93-like `xx.yy' variables (including some of the .sh.* variables) and
associated disipline functions
Some of the new ksh93 pattern matching operators, like backreferencing
H5) When will the next release appear?
The next version will appear sometime in 2005. Never make predictions.
The next version will appear sometime in 2007. Never make predictions.
This document is Copyright 1995-2004 by Chester Ramey.
This document is Copyright 1995-2006 by Chester Ramey.
Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute
+114 -61
View File
@@ -1,7 +1,7 @@
Newsgroups: comp.unix.shell,comp.unix.questions
Distribution: world
From: chet@po.cwru.edu (Chet Ramey)
Subject: BASH Frequently-Asked Questions (FAQ version 3.30)
Subject: BASH Frequently-Asked Questions (FAQ version 3.35)
Organization: Case Western Reserve University
Summary: A's to Q's about BASH, the Bourne-Again SHell
Reply-To: chet@po.cwru.edu
@@ -10,13 +10,13 @@ Followup-To: poster
Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Mon Feb 14 11:57:02 EST 2005
FAQ-Version: 3.30
Bash-Version: 3.0
Last-Modified: Thu Dec 14 11:34:54 EST 2006
FAQ-Version: 3.35
Bash-Version: 3.2
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)
This is the Bash FAQ, version 3.30, for Bash version 3.0.
This is the Bash FAQ, version 3.35, 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
@@ -27,7 +27,7 @@ Another good source of basic information about shells is the collection
of FAQ articles periodically posted to comp.unix.shell.
Questions and comments concerning this document should be sent to
chet@po.cwru.edu.
chet.ramey@case.edu.
This document is available for anonymous FTP with the URL
@@ -54,9 +54,9 @@ A10) What is the bash `posix mode'?
Section B: The latest version
B1) What's new in version 3.0?
B2) Are there any user-visible incompatibilities between bash-3.0 and
bash-1.14.7?
B1) What's new in version 3.2?
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
Section C: Differences from other Unix shells
@@ -96,6 +96,7 @@ E10) Why does `cd //' leave $PWD as `//'?
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?
Section F: Things to watch out for on certain Unix versions
@@ -158,26 +159,26 @@ of Case Western Reserve University.
A2) What's the latest version?
The latest version is 3.0, first made available on 27 July, 2004.
The latest version is 3.2, first made available on 12 October, 2006.
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 3.0:
The following URLs tell how to get version 3.2:
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-3.0.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz
Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.0.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz
Any patches for the current version are available with the URL:
ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/
ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
A4) On what machines will bash run?
@@ -208,10 +209,10 @@ of their CYGWIN project. For more information about the project, see
http://www.cygwin.com/.
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.05b to the CYGWIN environment, and it is available as
part of their current release. Bash-3.0 is currently being tested and
should be available soon.
early GNU-Win32 (the original name) releases. Cygnus has also done
ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both
are available as part of their current release. Bash-3.2 is currently
being tested and should be available soon.
Bash-2.05b and later versions should require no local Cygnus changes to
build and run under CYGWIN.
@@ -233,7 +234,8 @@ ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204s.zip source
Mark began to work with bash-2.05, but I don't know the current status.
Bash-3.0 compiles and runs with no modifications under Microsoft's Services
for Unix (SFU), once known as Interix.
for Unix (SFU), once known as Interix. I do not anticipate any problems
with building bash-3.1 or bash-3.2.
A6) How can I build bash with gcc?
@@ -402,15 +404,33 @@ They are also listed in a section in the Bash Reference Manual
Section B: The latest version
B1) What's new in version 3.0?
B1) What's new in version 3.2?
Bash-3.0 is the third major release of bash. The features introduced
in the intermediate releases following bash-2.05 have been completed.
Support for the bash debugger (a separate project) has been integrated.
Bash-3.2 is the second maintenance release of the third major release of
bash. It contains the following significant new features (see the manual
page for complete descriptions and the CHANGES and NEWS files in the
bash-3.2 distribution).
Bash-3.0 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-3.0
distribution):
o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
characters when deciding whether or not a script is a binary file.
o Quoting the string argument to the [[ command's =~ (regexp) operator now
forces string matching, as with the other pattern-matching operators.
A short feature history dating from Bash-2.0:
Bash-3.1 contained the following new features:
o Bash-3.1 may now be configured and built in a mode that enforces strict
POSIX compliance.
o The `+=' assignment operator, which appends to the value of a string or
array variable, has been implemented.
o It is now possible to ignore case when matching in contexts other than
filename generation using the new `nocasematch' shell option.
Bash-3.0 contained the following new features:
o Features to support the bash debugger have been implemented, and there
is a new `extdebug' option to turn the non-default options on
@@ -440,8 +460,6 @@ o The `jobs', `kill', and `wait' builtins now accept job control notation
o The `gettext' package and libintl have been integrated, and the shell
messages may be translated into other languages
A short feature history dating from Bash-2.0:
Bash-2.05b introduced the following new features:
o support for multibyte characters has been added to both bash and readline
@@ -649,10 +667,10 @@ 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-3.0 and
bash-1.14.7?
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
There are a few incompatibilities between version 1.14.7 and version 3.0.
There are a few incompatibilities between version 2.05b and version 3.2.
They are detailed in the file COMPAT in the bash distribution. That file
is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org
if if you find something that's not mentioned there.
@@ -706,7 +724,7 @@ Things bash has that sh does not:
read -e/-p/-a/-t/-n/-d/-s/-u,
readonly -a/-f/name=value, trap -l, set +o,
set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
unset -f/-v, ulimit -m/-p/-u,
unset -f/-v, ulimit -i/-m/-p/-q/-u/-x,
type -a/-p/-t/-f/-P, suspend -f, kill -n,
test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
@@ -735,11 +753,12 @@ Things bash has that sh does not:
case-insensitive pattern matching and globbing
variable assignments preceding commands affect only that command,
even for builtins and functions
posix mode
posix mode and strict posix conformance
redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr,
/dev/tcp/host/port, /dev/udp/host/port
debugger support, including `caller' builtin and new variables
RETURN trap
the `+=' assignment operator
Things sh has that bash does not:
@@ -801,8 +820,8 @@ Things bash has or uses that ksh88 does not:
set -o braceexpand/-o histexpand/-o interactive-comments/
-o notify/-o physical/-o posix/-o hashall/-o onecmd/
-h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt,
disown, printf, complete, compgen
typeset -a/-F/-p, ulimit -i/-q/-u/-x, umask -S, alias -p,
shopt, disown, printf, complete, compgen
`!' csh-style history expansion
POSIX.2-style globbing character classes
POSIX.2-style globbing equivalence classes
@@ -817,6 +836,7 @@ Things bash has or uses that ksh88 does not:
RETURN trap
Timestamps in history entries
{x..y} brace expansion
The `+=' assignment operator
Things ksh88 has or uses that bash does not:
tracked aliases (alias -t)
@@ -844,7 +864,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-3.0:
New things in ksh-93 not in bash-3.2:
associative arrays
floating point arithmetic and variables
math library functions
@@ -863,7 +883,6 @@ New things in ksh-93 not in bash-3.0:
`fc' has been renamed to `hist'
`.' can execute shell functions
exit statuses between 0 and 255
`+=' variable assignment operator
FPATH and PATH mixing
getopts -a
-I invocation option
@@ -871,7 +890,7 @@ New things in ksh-93 not in bash-3.0:
lexical scoping for local variables in `ksh' functions
no scoping for local variables in `POSIX' functions
New things in ksh-93 present in bash-3.0:
New things in ksh-93 present in bash-3.2:
[n]<&word- and [n]>&word- redirections (combination dup and close)
for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
?:, ++, --, `expr1 , expr2' arithmetic operators
@@ -897,6 +916,7 @@ New things in ksh-93 present in bash-3.0:
command name completion
ENV processed only for interactive shells
set -o pipefail
The `+=' assignment operator
Section D: Why does bash do some things differently than other Unix shells?
@@ -1120,9 +1140,8 @@ will try to write on a pipe without a reader. In that case, bash
will print `Broken pipe' to stderr when ps is killed by a
SIGPIPE.
You can build a version of bash that will not report SIGPIPE errors
by uncommenting the definition of DONT_REPORT_SIGPIPE in the file
config-top.h.
As of bash-3.1, bash does not report SIGPIPE errors by default. You
can build a version of bash that will report such errors.
E3) When I have terminal escape sequences in my prompt, why does bash
wrap lines at the wrong column?
@@ -1149,12 +1168,12 @@ 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
parent's environment. When the `read' command sets the variable
to the input, that variable is set only in the subshell, not the
parent shell. When the subshell exits, the value of the variable
is lost.
Each element of a pipeline, even a builtin or shell function,
runs in a separate process, a child of the shell running the
pipeline. A subprocess cannot affect its parent's environment.
When the `read' command sets the variable to the input, that
variable is set only in the subshell, not the parent shell. When
the subshell exits, the value of the variable is lost.
Many pipelines that end with `read variable' can be converted
into command substitutions, which will capture the output of
@@ -1398,6 +1417,32 @@ expanded value of param is unset or null, and $param otherwise.
To use negative offsets that begin with a minus sign, separate the
minus sign and the colon with a space.
E13) Why does filename completion misbehave if a colon appears in the filename?
Filename completion (and word completion in general) may appear to behave
improperly if there is a colon in the word to be completed.
The colon is special to readline's word completion code: it is one of the
characters that breaks words for the completer. Readline uses these characters
in sort of the same way that bash uses $IFS: they break or separate the words
the completion code hands to the application-specific or default word
completion functions. The original intent was to make it easy to edit
colon-separated lists (such as $PATH in bash) in various applications using
readline for input.
This is complicated by the fact that some versions of the popular
`bash-completion' programmable completion package have problems with the
default completion behavior in the presence of colons.
The current set of completion word break characters is available in bash as
the value of the COMP_WORDBREAKS variable. Removing `:' from that value is
enough to make the colon not special to completion:
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
You can also quote the colon with a backslash to achieve the same result
temporarily.
Section F: Things to watch out for on certain Unix versions
F1) Why can't I use command line editing in my `cmdtool'?
@@ -1583,6 +1628,9 @@ this. These variables can be set in your .inputrc or using the bash
The `set' commands between the single quotes may also be placed
in ~/.inputrc.
The script examples/scripts.noah/meta.bash encapsulates the bind
commands in a shell function.
G2) How do I write a function `x' to replace builtin command `x', but
still invoke the command from within the function?
@@ -1756,20 +1804,26 @@ ftp.cwru.edu in the `pub/bash' directory.
Cameron Newham and Bill Rosenblatt have written a book on bash, published
by O'Reilly and Associates. The book is based on Bill Rosenblatt's Korn
Shell book. The title is ``Learning the Bash Shell'', and the ISBN number
is 1-56592-147-X. Look for it in fine bookstores near you. This book
covers bash-1.14, but has an appendix describing some of the new features
in bash-2.0.
A second edition of this book is available, published in January, 1998.
The ISBN number is 1-56592-347-2. Look for it in the same fine bookstores
or on the web.
of the third edition, published in March, 2005, is 0-596-00965-8. Look for
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.
Arnold Robbins and Nelson Beebe have written ``Classic Shell Scripting'',
published by O'Reilly. The first edition, with ISBN number 0-596-00595-4,
was published in May, 2005.
Chris F. A. Johnson, a frequent contributor to comp.unix.shell and
gnu.bash.bug, has written ``Shell Scripting Recipes: A Problem-Solution
Approach,'' a new book on shell scripting, concentrating on features of
the POSIX standard helpful to shell script writers. The first edition from
Apress, with ISBN number 1-59059-471-1, was published in May, 2005.
H3) What's coming in future versions?
These are features I hope to include in a future version of bash.
@@ -1788,16 +1842,15 @@ a bash programmer's guide with a chapter on creating loadable builtins
a better loadable interface to perl with access to the shell builtins and
variables (contributions gratefully accepted)
ksh93-like `nameref' variables
ksh93-like `+=' variable assignment operator
ksh93-like `xx.yy' variables (including some of the .sh.* variables) and
associated disipline functions
Some of the new ksh93 pattern matching operators, like backreferencing
H5) When will the next release appear?
The next version will appear sometime in 2005. Never make predictions.
The next version will appear sometime in 2007. Never make predictions.
This document is Copyright 1995-2004 by Chester Ramey.
This document is Copyright 1995-2006 by Chester Ramey.
Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute
+114 -61
View File
@@ -1,6 +1,6 @@
Newsgroups: comp.unix.shell,comp.unix.questions,comp.answers,news.answers
From: chet@po.cwru.edu (Chet Ramey)
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.30)
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.35)
Organization: Case Western Reserve University
Summary: A's to Q's about BASH, the Bourne-Again SHell
Reply-To: chet@po.cwru.edu
@@ -10,13 +10,13 @@ Approved: news-answers-request@MIT.EDU
Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Mon Feb 14 11:57:02 EST 2005
FAQ-Version: 3.30
Bash-Version: 3.0
Last-Modified: Thu Dec 14 11:34:54 EST 2006
FAQ-Version: 3.35
Bash-Version: 3.2
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)
This is the Bash FAQ, version 3.30, for Bash version 3.0.
This is the Bash FAQ, version 3.35, 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
@@ -27,7 +27,7 @@ Another good source of basic information about shells is the collection
of FAQ articles periodically posted to comp.unix.shell.
Questions and comments concerning this document should be sent to
chet@po.cwru.edu.
chet.ramey@case.edu.
This document is available for anonymous FTP with the URL
@@ -54,9 +54,9 @@ A10) What is the bash `posix mode'?
Section B: The latest version
B1) What's new in version 3.0?
B2) Are there any user-visible incompatibilities between bash-3.0 and
bash-1.14.7?
B1) What's new in version 3.2?
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
Section C: Differences from other Unix shells
@@ -96,6 +96,7 @@ E10) Why does `cd //' leave $PWD as `//'?
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?
Section F: Things to watch out for on certain Unix versions
@@ -158,26 +159,26 @@ of Case Western Reserve University.
A2) What's the latest version?
The latest version is 3.0, first made available on 27 July, 2004.
The latest version is 3.2, first made available on 12 October, 2006.
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 3.0:
The following URLs tell how to get version 3.2:
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-3.0.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz
Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.0.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz
Any patches for the current version are available with the URL:
ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/
ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
A4) On what machines will bash run?
@@ -208,10 +209,10 @@ of their CYGWIN project. For more information about the project, see
http://www.cygwin.com/.
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.05b to the CYGWIN environment, and it is available as
part of their current release. Bash-3.0 is currently being tested and
should be available soon.
early GNU-Win32 (the original name) releases. Cygnus has also done
ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both
are available as part of their current release. Bash-3.2 is currently
being tested and should be available soon.
Bash-2.05b and later versions should require no local Cygnus changes to
build and run under CYGWIN.
@@ -233,7 +234,8 @@ ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204s.zip source
Mark began to work with bash-2.05, but I don't know the current status.
Bash-3.0 compiles and runs with no modifications under Microsoft's Services
for Unix (SFU), once known as Interix.
for Unix (SFU), once known as Interix. I do not anticipate any problems
with building bash-3.1 or bash-3.2.
A6) How can I build bash with gcc?
@@ -402,15 +404,33 @@ They are also listed in a section in the Bash Reference Manual
Section B: The latest version
B1) What's new in version 3.0?
B1) What's new in version 3.2?
Bash-3.0 is the third major release of bash. The features introduced
in the intermediate releases following bash-2.05 have been completed.
Support for the bash debugger (a separate project) has been integrated.
Bash-3.2 is the second maintenance release of the third major release of
bash. It contains the following significant new features (see the manual
page for complete descriptions and the CHANGES and NEWS files in the
bash-3.2 distribution).
Bash-3.0 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-3.0
distribution):
o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
characters when deciding whether or not a script is a binary file.
o Quoting the string argument to the [[ command's =~ (regexp) operator now
forces string matching, as with the other pattern-matching operators.
A short feature history dating from Bash-2.0:
Bash-3.1 contained the following new features:
o Bash-3.1 may now be configured and built in a mode that enforces strict
POSIX compliance.
o The `+=' assignment operator, which appends to the value of a string or
array variable, has been implemented.
o It is now possible to ignore case when matching in contexts other than
filename generation using the new `nocasematch' shell option.
Bash-3.0 contained the following new features:
o Features to support the bash debugger have been implemented, and there
is a new `extdebug' option to turn the non-default options on
@@ -440,8 +460,6 @@ o The `jobs', `kill', and `wait' builtins now accept job control notation
o The `gettext' package and libintl have been integrated, and the shell
messages may be translated into other languages
A short feature history dating from Bash-2.0:
Bash-2.05b introduced the following new features:
o support for multibyte characters has been added to both bash and readline
@@ -649,10 +667,10 @@ 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-3.0 and
bash-1.14.7?
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
There are a few incompatibilities between version 1.14.7 and version 3.0.
There are a few incompatibilities between version 2.05b and version 3.2.
They are detailed in the file COMPAT in the bash distribution. That file
is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org
if if you find something that's not mentioned there.
@@ -706,7 +724,7 @@ Things bash has that sh does not:
read -e/-p/-a/-t/-n/-d/-s/-u,
readonly -a/-f/name=value, trap -l, set +o,
set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
unset -f/-v, ulimit -m/-p/-u,
unset -f/-v, ulimit -i/-m/-p/-q/-u/-x,
type -a/-p/-t/-f/-P, suspend -f, kill -n,
test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
@@ -735,11 +753,12 @@ Things bash has that sh does not:
case-insensitive pattern matching and globbing
variable assignments preceding commands affect only that command,
even for builtins and functions
posix mode
posix mode and strict posix conformance
redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr,
/dev/tcp/host/port, /dev/udp/host/port
debugger support, including `caller' builtin and new variables
RETURN trap
the `+=' assignment operator
Things sh has that bash does not:
@@ -801,8 +820,8 @@ Things bash has or uses that ksh88 does not:
set -o braceexpand/-o histexpand/-o interactive-comments/
-o notify/-o physical/-o posix/-o hashall/-o onecmd/
-h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt,
disown, printf, complete, compgen
typeset -a/-F/-p, ulimit -i/-q/-u/-x, umask -S, alias -p,
shopt, disown, printf, complete, compgen
`!' csh-style history expansion
POSIX.2-style globbing character classes
POSIX.2-style globbing equivalence classes
@@ -817,6 +836,7 @@ Things bash has or uses that ksh88 does not:
RETURN trap
Timestamps in history entries
{x..y} brace expansion
The `+=' assignment operator
Things ksh88 has or uses that bash does not:
tracked aliases (alias -t)
@@ -844,7 +864,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-3.0:
New things in ksh-93 not in bash-3.2:
associative arrays
floating point arithmetic and variables
math library functions
@@ -863,7 +883,6 @@ New things in ksh-93 not in bash-3.0:
`fc' has been renamed to `hist'
`.' can execute shell functions
exit statuses between 0 and 255
`+=' variable assignment operator
FPATH and PATH mixing
getopts -a
-I invocation option
@@ -871,7 +890,7 @@ New things in ksh-93 not in bash-3.0:
lexical scoping for local variables in `ksh' functions
no scoping for local variables in `POSIX' functions
New things in ksh-93 present in bash-3.0:
New things in ksh-93 present in bash-3.2:
[n]<&word- and [n]>&word- redirections (combination dup and close)
for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
?:, ++, --, `expr1 , expr2' arithmetic operators
@@ -897,6 +916,7 @@ New things in ksh-93 present in bash-3.0:
command name completion
ENV processed only for interactive shells
set -o pipefail
The `+=' assignment operator
Section D: Why does bash do some things differently than other Unix shells?
@@ -1120,9 +1140,8 @@ will try to write on a pipe without a reader. In that case, bash
will print `Broken pipe' to stderr when ps is killed by a
SIGPIPE.
You can build a version of bash that will not report SIGPIPE errors
by uncommenting the definition of DONT_REPORT_SIGPIPE in the file
config-top.h.
As of bash-3.1, bash does not report SIGPIPE errors by default. You
can build a version of bash that will report such errors.
E3) When I have terminal escape sequences in my prompt, why does bash
wrap lines at the wrong column?
@@ -1149,12 +1168,12 @@ 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
parent's environment. When the `read' command sets the variable
to the input, that variable is set only in the subshell, not the
parent shell. When the subshell exits, the value of the variable
is lost.
Each element of a pipeline, even a builtin or shell function,
runs in a separate process, a child of the shell running the
pipeline. A subprocess cannot affect its parent's environment.
When the `read' command sets the variable to the input, that
variable is set only in the subshell, not the parent shell. When
the subshell exits, the value of the variable is lost.
Many pipelines that end with `read variable' can be converted
into command substitutions, which will capture the output of
@@ -1398,6 +1417,32 @@ expanded value of param is unset or null, and $param otherwise.
To use negative offsets that begin with a minus sign, separate the
minus sign and the colon with a space.
E13) Why does filename completion misbehave if a colon appears in the filename?
Filename completion (and word completion in general) may appear to behave
improperly if there is a colon in the word to be completed.
The colon is special to readline's word completion code: it is one of the
characters that breaks words for the completer. Readline uses these characters
in sort of the same way that bash uses $IFS: they break or separate the words
the completion code hands to the application-specific or default word
completion functions. The original intent was to make it easy to edit
colon-separated lists (such as $PATH in bash) in various applications using
readline for input.
This is complicated by the fact that some versions of the popular
`bash-completion' programmable completion package have problems with the
default completion behavior in the presence of colons.
The current set of completion word break characters is available in bash as
the value of the COMP_WORDBREAKS variable. Removing `:' from that value is
enough to make the colon not special to completion:
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
You can also quote the colon with a backslash to achieve the same result
temporarily.
Section F: Things to watch out for on certain Unix versions
F1) Why can't I use command line editing in my `cmdtool'?
@@ -1583,6 +1628,9 @@ this. These variables can be set in your .inputrc or using the bash
The `set' commands between the single quotes may also be placed
in ~/.inputrc.
The script examples/scripts.noah/meta.bash encapsulates the bind
commands in a shell function.
G2) How do I write a function `x' to replace builtin command `x', but
still invoke the command from within the function?
@@ -1756,20 +1804,26 @@ ftp.cwru.edu in the `pub/bash' directory.
Cameron Newham and Bill Rosenblatt have written a book on bash, published
by O'Reilly and Associates. The book is based on Bill Rosenblatt's Korn
Shell book. The title is ``Learning the Bash Shell'', and the ISBN number
is 1-56592-147-X. Look for it in fine bookstores near you. This book
covers bash-1.14, but has an appendix describing some of the new features
in bash-2.0.
A second edition of this book is available, published in January, 1998.
The ISBN number is 1-56592-347-2. Look for it in the same fine bookstores
or on the web.
of the third edition, published in March, 2005, is 0-596-00965-8. Look for
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.
Arnold Robbins and Nelson Beebe have written ``Classic Shell Scripting'',
published by O'Reilly. The first edition, with ISBN number 0-596-00595-4,
was published in May, 2005.
Chris F. A. Johnson, a frequent contributor to comp.unix.shell and
gnu.bash.bug, has written ``Shell Scripting Recipes: A Problem-Solution
Approach,'' a new book on shell scripting, concentrating on features of
the POSIX standard helpful to shell script writers. The first edition from
Apress, with ISBN number 1-59059-471-1, was published in May, 2005.
H3) What's coming in future versions?
These are features I hope to include in a future version of bash.
@@ -1788,16 +1842,15 @@ a bash programmer's guide with a chapter on creating loadable builtins
a better loadable interface to perl with access to the shell builtins and
variables (contributions gratefully accepted)
ksh93-like `nameref' variables
ksh93-like `+=' variable assignment operator
ksh93-like `xx.yy' variables (including some of the .sh.* variables) and
associated disipline functions
Some of the new ksh93 pattern matching operators, like backreferencing
H5) When will the next release appear?
The next version will appear sometime in 2005. Never make predictions.
The next version will appear sometime in 2007. Never make predictions.
This document is Copyright 1995-2004 by Chester Ramey.
This document is Copyright 1995-2006 by Chester Ramey.
Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute

Some files were not shown because too many files have changed in this diff Show More