@@ -2,9 +2,9 @@ Compatibility with previous versions
2
2
====================================
3
3
4
4
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
8
8
widely-available version. These were discovered by users of bash-2.x
9
9
through 4.x, so this list is not comprehensive. Some of these
10
10
incompatibilities occur between the current version and versions 2.0 and
@@ -372,6 +372,25 @@ above.
372
372
characters in the replacement string as special; if it treats them as
373
373
special, then quote removal should remove them.
374
374
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
+
375
394
Shell Compatibility Level
376
395
=========================
377
396
@@ -389,6 +408,9 @@ to this variable (a decimal version number like 4.2, or an integer
389
408
corresponding to the compatNN option, like 42) determines the compatibility
390
409
level.
391
410
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
+
392
414
compat31 set
393
415
- the < and > operators to the [[ command do not consider the current
394
416
locale when comparing strings; they use ASCII ordering
@@ -408,7 +430,7 @@ compat40 set
408
430
409
431
compat41 set
410
432
- 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 ,
412
434
interrupting one command in a list caused the next to be executed)
413
435
- when in posix mode, single quotes in the `word' portion of a
414
436
double-quoted parameter expansion define a new quoting context and
@@ -417,6 +439,18 @@ compat41 set
417
439
compat42 set
418
440
- the replacement string in double-quoted pattern substitution is not
419
441
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
+
420
454
-------------------------------------------------------------------------------
421
455
422
456
Copying and distribution of this file, with or without modification,
0 commit comments