Skip to content

Commit a0c0a00

Browse files
author
Chet Ramey
committedSep 15, 2016
Bash-4.4 distribution sources and documentation
1 parent 30a978b commit a0c0a00

File tree

588 files changed

+109406
-59842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

588 files changed

+109406
-59842
lines changed
 

‎CHANGES

+1,034-1
Large diffs are not rendered by default.

‎COMPAT

+38-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Compatibility with previous versions
22
====================================
33

44
This document details the incompatibilities between this version of bash,
5-
bash-4.3, and the previous widely-available versions, bash-3.x (which is
6-
still the `standard' version for Mac OS X), 4.0/4.1 (which are still
7-
standard on a few Linux distributions), and bash-4.2, the current
5+
bash-4.4, and the previous widely-available versions, bash-3.x (which is
6+
still the `standard' version for Mac OS X), 4.1/4.2 (which are still
7+
standard on a few Linux distributions), and bash-4.3, the current
88
widely-available version. These were discovered by users of bash-2.x
99
through 4.x, so this list is not comprehensive. Some of these
1010
incompatibilities occur between the current version and versions 2.0 and
@@ -372,6 +372,25 @@ above.
372372
characters in the replacement string as special; if it treats them as
373373
special, then quote removal should remove them.
374374

375+
54. Bash-4.4 no longer considers a reference to ${a[@]} or ${a[*]}, where `a'
376+
is an array without any elements set, to be a reference to an unset
377+
variable. This means that such a reference will not cause the shell to
378+
exit when the `-u' option is enabled.
379+
380+
55. Bash-4.4 allows double quotes to quote the history expansion character (!)
381+
when in Posix mode, since Posix specifies the effects of double quotes.
382+
383+
56. Bash-4.4 does not inherit $PS4 from the environment if running as root.
384+
385+
57. Bash-4.4 doesn't allow a `break' or `continue' in a function to affect
386+
loop execution in the calling context.
387+
388+
58. Bash-4.4 no longer expands tildes in $PATH elements when in Posix mode.
389+
390+
59. Bash-4.4 does not attempt to perform a compound array assignment if an
391+
argument to `declare' or a similar builtin expands to a word that looks
392+
like a compound array assignment (e.g. declare w=$x where x='(foo)').
393+
375394
Shell Compatibility Level
376395
=========================
377396

@@ -389,6 +408,9 @@ to this variable (a decimal version number like 4.2, or an integer
389408
corresponding to the compatNN option, like 42) determines the compatibility
390409
level.
391410

411+
Bash-4.4 has begun deprecating older compatibility levels. Eventually, the
412+
options will be removed in favor of the BASH_COMPAT variable.
413+
392414
compat31 set
393415
- the < and > operators to the [[ command do not consider the current
394416
locale when comparing strings; they use ASCII ordering
@@ -408,7 +430,7 @@ compat40 set
408430

409431
compat41 set
410432
- interrupting a command list such as "a ; b ; c" causes the execution
411-
of the entire list to be aborted (in versions before bash-4.1,
433+
of the entire list to be aborted (in versions before bash-4.0,
412434
interrupting one command in a list caused the next to be executed)
413435
- when in posix mode, single quotes in the `word' portion of a
414436
double-quoted parameter expansion define a new quoting context and
@@ -417,6 +439,18 @@ compat41 set
417439
compat42 set
418440
- the replacement string in double-quoted pattern substitution is not
419441
run through quote removal, as in previous versions
442+
443+
compat43 set
444+
- the shell does not print a warning message if an attempt is made to
445+
use a quoted compound assignment as an argument to declare
446+
(declare -a foo='(1 2)')
447+
- word expansion errors are considered non-fatal errors that cause the
448+
current command to fail, even in Posix mode
449+
- when executing a shell function, the loop state (while/until/etc.) is
450+
not reset, so `break' or `continue' in a shell function will break or
451+
continue loops in the calling context. Bash-4.4 and later reset the
452+
loop state to prevent this.
453+
420454
-------------------------------------------------------------------------------
421455

422456
Copying and distribution of this file, with or without modification,

0 commit comments

Comments
 (0)
Please sign in to comment.