Commit c19e47e8 authored by Daniel Kahn Gillmor's avatar Daniel Kahn Gillmor

Import Upstream version 4.4~rc1

parent efce056c
This diff is collapsed.
......@@ -2,9 +2,9 @@ Compatibility with previous versions
This document details the incompatibilities between this version of bash,
bash-4.3, and the previous widely-available versions, bash-3.x (which is
still the `standard' version for Mac OS X), 4.0/4.1 (which are still
standard on a few Linux distributions), and bash-4.2, the current
bash-4.4, and the previous widely-available versions, bash-3.x (which is
still the `standard' version for Mac OS X), 4.1/4.2 (which are still
standard on a few Linux distributions), and bash-4.3, the current
widely-available version. These were discovered by users of bash-2.x
through 4.x, so this list is not comprehensive. Some of these
incompatibilities occur between the current version and versions 2.0 and
......@@ -389,6 +389,9 @@ to this variable (a decimal version number like 4.2, or an integer
corresponding to the compatNN option, like 42) determines the compatibility
Bash-4.4 has begun deprecating older compatibility levels. Eventually, the
options will be removed in favor of the BASH_COMPAT variable.
compat31 set
- the < and > operators to the [[ command do not consider the current
locale when comparing strings; they use ASCII ordering
......@@ -408,7 +411,7 @@ compat40 set
compat41 set
- interrupting a command list such as "a ; b ; c" causes the execution
of the entire list to be aborted (in versions before bash-4.1,
of the entire list to be aborted (in versions before bash-4.0,
interrupting one command in a list caused the next to be executed)
- when in posix mode, single quotes in the `word' portion of a
double-quoted parameter expansion define a new quoting context and
......@@ -417,6 +420,18 @@ compat41 set
compat42 set
- the replacement string in double-quoted pattern substitution is not
run through quote removal, as in previous versions
compat43 set
- the shell does not print a warning message if an attempt is made to
use a quoted compound assignment as an argument to declare
(declare -a foo='(1 2)')
- word expansion errors are considered non-fatal errors that cause the
current command to fail, even in Posix mode
- when executing a shell function, the loop state (while/until/etc.) is
not reset, so `break' or `continue' in a shell function will break or
continue loops in the calling context. Bash-4.4 and later reset the
loop state to prevent this.
Copying and distribution of this file, with or without modification,
This diff is collapsed.
This diff is collapsed.
......@@ -529,6 +529,8 @@ po/ja.po f
po/ f
po/lt.po f
po/ f
po/nb.po f
po/ f
po/nl.po f
po/ f
po/pl.po f
......@@ -609,6 +611,7 @@ doc/rose94.pdf f
doc/aosa-bash.pdf f
support/ f
support/ f
support/bashversion.c f
support/checkbashisms f 755
support/config.guess f
......@@ -654,11 +657,14 @@ examples/complete/complete-examples f
examples/complete/bashcc-1.0.1.tar.gz f
examples/loadables/README f
examples/loadables/template.c f
examples/loadables/loadables.h f
examples/loadables/ f
examples/loadables/ f
examples/loadables/necho.c f
examples/loadables/hello.c f
examples/loadables/print.c f
examples/loadables/realpath.c f
examples/loadables/setpgid.c f
examples/loadables/sleep.c f
examples/loadables/strftime.c f
examples/loadables/truefalse.c f
......@@ -704,6 +710,7 @@ examples/functions/basename f
examples/functions/csh-compat f
#examples/functions/dirfuncs f
examples/functions/dirname f
examples/functions/dirstack f
#examples/functions/emptydir f
examples/functions/exitstat f
examples/functions/external f
......@@ -795,8 +802,10 @@ examples/misc/aliasconv.bash f
examples/misc/cshtobash f
tests/README f
tests/test-glue-functions f
tests/alias.tests f
tests/alias1.sub f
tests/alias2.sub f
tests/alias.right f
tests/appendop.tests f
tests/appendop1.sub f
......@@ -812,6 +821,7 @@ tests/arith3.sub f
tests/arith4.sub f
tests/arith5.sub f
tests/arith6.sub f
tests/arith7.sub f
tests/array.tests f
tests/array.right f
tests/array1.sub f
......@@ -830,6 +840,11 @@ tests/array13.sub f
tests/array14.sub f
tests/array15.sub f
tests/array16.sub f
tests/array17.sub f
tests/array18.sub f
tests/array19.sub f
tests/array20.sub f
tests/array21.sub f
tests/array-at-star f
tests/array2.right f
tests/assoc.tests f
......@@ -841,6 +856,11 @@ tests/assoc4.sub f
tests/assoc5.sub f
tests/assoc6.sub f
tests/assoc7.sub f
tests/assoc8.sub f
tests/attr.tests f
tests/attr.right f
tests/attr1.sub f
tests/attr2.sub f
tests/braces.tests f
tests/braces.right f
tests/builtins.tests f
......@@ -849,6 +869,8 @@ tests/builtins1.sub f
tests/builtins2.sub f
tests/builtins3.sub f
tests/builtins4.sub f
tests/builtins5.sub f
tests/builtins6.sub f
tests/source1.sub f
tests/source2.sub f
tests/source3.sub f
......@@ -864,6 +886,7 @@ tests/casemod.right f
tests/comsub.tests f
tests/comsub.right f
tests/comsub1.sub f
tests/comsub2.sub f
tests/comsub-eof.tests f
tests/comsub-eof0.sub f
tests/comsub-eof1.sub f
......@@ -894,6 +917,12 @@ tests/dbg-support2.tests f
tests/dbg-support3.sub f
tests/dollar-at-star f
tests/dollar-at-star1.sub f
tests/dollar-at-star2.sub f
tests/dollar-at-star3.sub f
tests/dollar-at-star4.sub f
tests/dollar-at-star5.sub f
tests/dollar-at-star6.sub f
tests/dollar-at-star7.sub f
tests/dollar-at1.sub f
tests/dollar-at2.sub f
tests/dollar-at3.sub f
......@@ -917,6 +946,9 @@ tests/errors.right f
tests/errors1.sub f
tests/errors2.sub f
tests/errors3.sub f
tests/errors4.sub f
tests/errors5.sub f
tests/errors6.sub f
tests/execscript f
tests/exec.right f
tests/exec1.sub f 755
......@@ -928,6 +960,10 @@ tests/exec6.sub f
tests/exec7.sub f
tests/exec8.sub f
tests/exec9.sub f
tests/exec10.sub f
tests/exec11.sub f
tests/exec12.sub f
tests/exec13.sub f
tests/exp.tests f
tests/exp.right f
tests/exp1.sub f
......@@ -936,10 +972,18 @@ tests/exp3.sub f
tests/exp4.sub f
tests/exp5.sub f
tests/exp6.sub f
tests/exp7.sub f
tests/exp8.sub f
tests/exportfunc.tests f
tests/exportfunc.right f
tests/exportfunc1.sub f
tests/exportfunc2.sub f
tests/exportfunc3.sub f
tests/extglob.tests f
tests/extglob.right f
tests/extglob1.sub f
tests/extglob1a.sub f
tests/extglob3.sub f
tests/extglob2.tests f
tests/extglob2.right f
tests/extglob3.tests f
......@@ -959,6 +1003,8 @@ tests/getopts4.sub f
tests/getopts5.sub f
tests/getopts6.sub f
tests/getopts7.sub f
tests/getopts8.sub f
tests/getopts9.sub f
tests/glob.tests f
tests/glob1.sub f
tests/glob.right f
......@@ -973,7 +1019,12 @@ tests/heredoc2.sub f
tests/heredoc3.sub f
tests/herestr.tests f
tests/herestr.right f
tests/herestr1.sub f
tests/histexp.tests f
tests/histexp1.sub f
tests/histexp2.sub f
tests/histexp3.sub f
tests/histexp4.sub f
tests/histexp.right f
tests/history.tests f
tests/history.right f
......@@ -990,6 +1041,7 @@ tests/input.right f
tests/intl.tests f
tests/intl1.sub f
tests/intl2.sub f
tests/intl3.sub f
tests/intl.right f
tests/iquote.tests f
tests/iquote.right f
......@@ -1010,6 +1062,7 @@ tests/ f
tests/mapfile.right f
tests/mapfile.tests f
tests/mapfile1.sub f
tests/mapfile2.sub f
tests/more-exp.tests f
tests/more-exp.right f
tests/nameref.tests f
......@@ -1021,6 +1074,8 @@ tests/nameref5.sub f
tests/nameref6.sub f
tests/nameref7.sub f
tests/nameref8.sub f
tests/nameref9.sub f
tests/nameref10.sub f
tests/nameref.right f
tests/new-exp.tests f
tests/new-exp1.sub f
......@@ -1032,11 +1087,13 @@ tests/new-exp6.sub f
tests/new-exp7.sub f
tests/new-exp8.sub f
tests/new-exp9.sub f
tests/new-exp10.sub f
tests/new-exp.right f
tests/nquote.tests f
tests/nquote.right f
tests/nquote1.sub f
tests/nquote2.sub f
tests/nquote3.sub f
tests/nquote1.tests f
tests/nquote1.right f
tests/nquote2.tests f
......@@ -1047,6 +1104,9 @@ tests/nquote4.tests f
tests/nquote4.right f
tests/nquote5.tests f
tests/nquote5.right f
tests/parser.tests f
tests/parser.right f
tests/parser1.sub f
tests/posix2.tests f
tests/posix2.right f
tests/posixexp.tests f
......@@ -1093,6 +1153,8 @@ tests/redir7.sub f
tests/redir8.sub f
tests/redir9.sub f
tests/redir10.sub f
tests/redir11.sub f
tests/redir12.sub f
tests/rhs-exp.tests f
tests/rhs-exp.right f
tests/rhs-exp1.sub f
......@@ -1107,6 +1169,7 @@ tests/run-arith f
tests/run-array f
tests/run-array2 f
tests/run-assoc f
tests/run-attr f
tests/run-braces f
tests/run-builtins f
tests/run-case f
......@@ -1124,6 +1187,7 @@ tests/run-dollars f
tests/run-errors f
tests/run-execscript f
tests/run-exp-tests f
tests/run-exportfunc f
tests/run-extglob f
tests/run-extglob2 f
tests/run-extglob3 f
......@@ -1153,6 +1217,7 @@ tests/run-nquote2 f
tests/run-nquote3 f
tests/run-nquote4 f
tests/run-nquote5 f
tests/run-parser f
tests/run-posix2 f
tests/run-posixexp f
tests/run-posixexp2 f
......@@ -1220,6 +1285,8 @@ tests/varenv3.sub f
tests/varenv4.sub f
tests/varenv5.sub f
tests/varenv6.sub f
tests/varenv7.sub f
tests/varenv8.sub f
tests/version f
tests/ f
tests/vredir.tests f
......@@ -1230,6 +1297,7 @@ tests/vredir3.sub f
tests/vredir4.sub f
tests/vredir5.sub f
tests/vredir6.sub f
tests/vredir7.sub f
tests/misc/dev-tcp.tests f
tests/misc/perf-script f
tests/misc/perftest f
This diff is collapsed.
This is a terse description of the new features added to bash-4.4 since
the release of bash-4.3. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
1. New Features in Bash
a. There is now a settable configuration #define that will cause the shell
to exit if the shell is running setuid without the -p option and setuid
to the real uid fails.
b. Command and process substitutions now turn off the `-v' option when
executing, as other shells seem to do.
c. The default value for the `checkhash' shell option may now be set at
compile time with a #define.
d. The `mapfile' builtin now has a -d option to use an arbitrary character
as the record delimiter, and a -t option to strip the delimiter as
supplied with -d.
e. The maximum number of nested recursive calls to `eval' is now settable in
config-top.h; the default is no limit.
f. The `-p' option to declare and similar builtins will display attributes for
named variables even when those variables have not been assigned values
(which are technically unset).
g. The maximum number of nested recursive calls to `source' is now settable
in config-top.h; the default is no limit.
h. All builtin commands recognize the `--help' option and print a usage
i. Bash does not allow function names containing `/' and `=' to be exported.
j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
k. The shell now allows `time ; othercommand' to time null commands.
l. There is a new `--enable-function-import' configuration option to allow
importing shell functions from the environment; import is enabled by
m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
had been executed.
n. GLOBIGNORE, the pattern substitution word expansion, and programmable
completion match filtering now honor the value of the `nocasematch' option.
o. There is a new ${parameter@spec} family of operators to transform the
value of `parameter'.
p. Bash no longer attempts to perform compound assignment if a variable on the
rhs of an assignment statement argument to `declare' has the form of a
compound assignment (e.g., w='(word)' ; declare foo=$w); compound
assignments are accepted if the variable was already declared as an array,
but with a warning.
q. The declare builtin no longer displays array variables using the compound
assignment syntax with quotes; that will generate warnings when re-used as
input, and isn't necessary.
r. Executing the rhs of && and || will no longer cause the shell to fork if
it's not necessary.
s. The `local' builtin takes a new argument: `-', which will cause it to save
and the single-letter shell options and restore their previous values at
function return.
t. `complete' and `compgen' have a new `-o nosort' option, which forces
readline to not sort the completion matches.
u. Bash now allows waiting for the most recent process substitution, since it
appears as $!.
v. The `unset' builtin now unsets a scalar variable if it is subscripted with
a `0', analogous to the ${var[0]} expansion.
w. `set -i' is no longer valid, as in other shells.
x. BASH_SUBSHELL is now updated for process substitution and group commands
in pipelines, and is available with the same value when running any exit
y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
not bash is being run in a GNU Emacs shell window.
z. Bash now treats SIGINT received when running a non-builtin command in a
loop the way it has traditionally treated running a builtin command:
running any trap handler and breaking out of the loop.
aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
cause matching filenames to be ignored when searching for commands.
bb. Aliases whose value ends in a shell metacharacter now expand in a way to
allow them to be `pasted' to the next token, which can potentially change
the meaning of a command (e.g., turning `&' into `&&').
cc. `make install' now installs the example loadable builtins and a set of
bash headers to use when developing new loadable builtins.
dd. `enable -f' now attempts to call functions named BUILTIN_builtin_load when
loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows
loadable builtins to run initialization and cleanup code.
ee. There is a new BASH_LOADABLES_PATH variable containing a list of directories
where the `enable -f' command looks for shared objects containing loadable
ff. The `complete_fullquote' option to `shopt' changes filename completion to
quote all shell metacharacters in filenames and directory names.
gg. The `kill' builtin now has a `-L' option, equivalent to `-l', for
compatibility with Linux standalone versions of kill.
hh. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
ii. inherit_errexit: a new `shopt' option that, when set, causes command
substitutions to inherit the -e option. By default, those subshells disable
-e. It's enabled as part of turning on posix mode.
jj. New prompt string: PS0. Expanded and displayed by interactive shells after
reading a complete command but before executing it.
kk. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to SIG_DFL
when the shell is started, so they are set to SIG_DFL in child processes.
ll. Posix-mode shells now allow double quotes to quote the history expansion
mm. OLDPWD can be inherited from the environment if it names a directory.
nn. Shells running as root no longer inherit PS4 from the environment, closing a
security hole involving PS4 expansion performing command substitution.
oo. If executing an implicit `cd' when the `autocd' option is set, bash will now
invoke a function named `cd' if one exists before executing the `cd' builtin.
2. New Features in Readline
a. The history truncation code now uses the same error recovery mechansim as
the history writing code, and restores the old version of the history file
on error. The error recovery mechanism handles symlinked history files.
b. There is a new bindable variable, `enable-bracketed-paste', which enables
support for a terminal's bracketed paste mode.
c. The editing mode indicators can now be strings and are user-settable
(new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
variables). Mode strings can contain invisible character sequences.
Setting mode strings to null strings restores the defaults.
d. Prompt expansion adds the mode string to the last line of a multi-line
prompt (one with embedded newlines).
e. There is a new bindable variable, `colored-completion-prefix', which, if
set, causes the common prefix of a set of possible completions to be
displayed in color.
f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
mode yank-pop.
g. The redisplay code underwent several efficiency improvements for multibyte
h. The insert-char function attempts to batch-insert all pending typeahead
that maps to self-insert, as long as it is coming from the terminal.
i. rl_callback_sigcleanup: a new application function that can clean up and
unset any state set by readline's callback mode. Intended to be used
after a signal.
j. If an incremental search string has its last character removed with DEL, the
resulting empty search string no longer matches the previous line.
k. If readline reads a history file that begins with `#' (or the value of
the history comment character) and has enabled history timestamps, the history
entries are assumed to be delimited by timestamps. This allows multi-line
history entries.
l. Readline now throws an error if it parses a key binding without a terminating
`:' or whitespace.
This is a terse description of the new features added to bash-4.3 since
the release of bash-4.2. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
Platform-Specific Configuration and Operation Notes
Platform-Specific Configuration and Operation Notes [somewhat dated]
1. configure --without-gnu-malloc on:
This diff is collapsed.
6.10 The Restricted Shell
If Bash is started with the name `rbash', or the `--restricted' or `-r'
If Bash is started with the name 'rbash', or the '--restricted' or '-r'
option is supplied at invocation, the shell becomes restricted. A
restricted shell is used to set up an environment more controlled than
the standard shell. A restricted shell behaves identically to `bash'
the standard shell. A restricted shell behaves identically to 'bash'
with the exception that the following are disallowed or not performed:
* Changing directories with the `cd' builtin.
* Setting or unsetting the values of the `SHELL', `PATH', `ENV', or
`BASH_ENV' variables.
* Changing directories with the 'cd' builtin.
* Setting or unsetting the values of the 'SHELL', 'PATH', 'ENV', or
'BASH_ENV' variables.
* Specifying command names containing slashes.
* Specifying a filename containing a slash as an argument to the `.'
* Specifying a filename containing a slash as an argument to the '.'
builtin command.
* Specifying a filename containing a slash as an argument to the `-p'
option to the `hash' builtin command.
* Specifying a filename containing a slash as an argument to the '-p'
option to the 'hash' builtin command.
* Importing function definitions from the shell environment at
* Parsing the value of `SHELLOPTS' from the shell environment at