This article is an **incomplete overview** of changes to Bash over time. Not all changes are listed, just the ones most likely to be useful for normal scripting. The overviews are categorized by topic and ordered by version.
A useful starting point is the [[https://github.com/bminor/bash/blob/master/NEWS|NEWS file]] in bash sources. If you have more detailed information, or historical information about Bash versions earlier than V2, feel free to mail me, or use the discussion below.
Status: 5.1 (alpha)
===== Shell options =====
Note that the ''shopt'' builtin command first appeared in Bash 2.0.
For this topic, see also
* [[internals:shell_options]]
* [[commands:builtin:set]]
^ Feature or change description ^ Appeared in Bash version ^ See also/remarks ^
| ''posix'' (for ''set -o'') | 1.14.0 | |
| ''hostcomplete'' | 2.0-alpha3 | |
| ''expand_aliases'' | 2.0 | |
| ''huponexit'' | 2.02-alpha1 | |
| ''nocaseglob'' | 2.02-alpha1 | |
| ''extglob'' | 2.02-alpha1 | together with extended globbing, KSH88 |
| ''restricted_shell'' | 2.03-alpha | |
| ''xpg_echo'' | 2.04-beta1 | |
| ''progcomp'' | 2.04-alpha1 | |
| ''no_empty_command_completion'' | 2.04 | |
| ''login_shell'' | 2.05a-alpha1 | |
| ''nolog'' (for ''set -o'') | 2.05a | |
| ''gnu_errfmt'' | 3.0-alpha | |
| ''force_fignore'' | 3.0-alpha | |
| ''failglob'' | 3.0-alpha | |
| ''extquote'' | 3.0-alpha | unsure -- verify! |
| ''extdebug'' | 3.0-alpha | |
| ''pipefail'' (for ''set -o'') | 3.0 | |
| ''functrace'' (for ''set -o'') | 3.0 | |
| ''errtrace'' (for ''set -o'') | 3.0 | |
| ''nocasematch'' | 3.1-alpha1 | |
| ''dirspell'' | 4.0-alpha | |
| ''globstar'' | 4.0-alpha | |
| ''checkjobs'' | 4.0-alpha | |
| ''autocd'' | 4.0-alpha | |
| ''set -e'' effects more intuitive | 4.0 | not directly specified by POSIX, but in consensus with POSIX WG |
| ''compat40'' | 4.1-beta | |
| ''lastpipe'' | 4.2-alpha | only works with job control disabled |
| ''compat41'' | 4.2-alpha | |
| ''globasciiranges'' | 4.3-alpha | enable "character range globbing" to always act as if in ''C'' locale |
| ''compat42'' | 4.3-alpha | |
| ''compat43'' | 4.4-alpha | |
| ''compat44'' | 5.0-alpha | |
| ''localvar_inherit'' | 5.0-alpha | local variables inherit preceeding scope values if they have the same name |
| ''syslog_history'' | 5.0-alpha | send history lines to syslog (undocumented, default off) if syslog is supported |
| ''assoc_expand_once'' | 5.0-alpha | expand associative array subscripts only one |
| ''globasciiranges'' | 5.0-beta | New default: on (default may be configured at compile time) |
| ''localvar_inherit'' | 5.0-beta | guard code against inheriting from an incompatible data type |
| ''checkwinsize'' | 5.0-beta2 | New default: on |
| ''shift_verbose'' | 5.0-beta2 | Default on when in POSIX mode |
==== General (all/many builtins) ====
^Feature or change description ^Appeared in Bash version ^See also/remarks ^
| ''%%[[...]]%%'': ''<'' and ''>'' operators respect locale | 4.1-alpha | for consistency, since 4.1-beta: ensure you have set compatiblity to >4.0 (default) |
| ''case'' | new action list terminators ''%%;;&%% and ''%%;&%% | 4.0-alpha | ksh93: only '';&''. zsh and mksh: '';|''. mksh: all 4, ('';;&'' is undocumented Bash compatibility) |
| ''declare'' | new option ''-n''/''+n'' to support nameref variable type | 4.3-alpha | |
| ''wait'' | new option ''-n'' to wait for the next background job to finish, returning its exit status. | 4.3-alpha | |
| ''read'' | ''read'' checks first variable argument for validity before trying to read inout | 4.3-beta | |
| ''help'' | attempts substring matching (as it did through bash-4.2) if exact string matching fails | 4.3-beta2 | |
| ''fc'' | interprets option ''-0'' (zero) as the current command line | 4.3-beta2 | |
| ''cd'' | new option ''-@'' to browse a file's extended attributes (on systems that support ''O_XATTR'') | 4.3-rc1 | |
| ''kill'' | new option ''-L'' (upper case ell) to list signals like the normal lowercase option ''-l'' (compatiblity with some standalone ''kill'' commands) | 4.4-beta | |
| ''mapfile'' | new option ''-d'' | 4.4-alpha | |
| ''wait'' | new option ''-f'' | 5.0-alpha | |
| ''history'' | option ''-d'' allows negative numbers to index from the end of the history list | 5.0-alpha | |
| ''+='' operator for arrays and strings | 3.1-alpha1 | |
| ''%%${PARAMETER//PATTERN/REPLACEMENT}%%'' behaviour changed | 3.2-alpha | anchoring for global substitution is no longer allowed, changes the way old syntax may work |
| ''${@:0:x}'' includes ''$0'' | 4.0-alpha | |
| Support for associative arrays | 4.0-alpha | relevant builtins also got associative array support |
| case modification operators for expansions | 4.0-alpha | |
| numerically indexed arrays can be accessed (on expansion time) from the end using negative indexes | 4.1-alpha | |
| ''%%\uNNNN%%'' and ''%%\uNNNNNNNN%%'' in ''%%$'...'%%'' | 4.2-alpha | for: ''printf'', ''echo -e'', ''%%$'...'%%'' |
| ''%%${PARAMETER:OFFSET:LENGTH}%%'': Negative ''LENGTH'' values are used as offset from the end of the string | 4.2-alpha | Substrings only for Bash and ksh93. Works also for argument expansions in zsh. ksh93 can use ''${arr[n..-m]}''. |
| Word expansions like ''${foo##bar}'' understand indirect variable references | 4.3-beta | |
| Transformations | 4.4 | |
| Process substitution now works in POSIX mode | 5.1-alpha | |
^ Feature or change description ^ Appeared in Bash version ^ See also/remarks ^
| ''DEBUG'' trap | 2.0 | |
| ''ERR'' trap | 2.05a | KSH93 |
| Support for multibyte characters: Unicode / UTF8 | 2.05b | |
| ''RETURN'' trap | 3.0 | ksh93 ''EXIT'' trap evaluates in caller scope (for ''function name {''). Bash ''RETURN'' in same scope. |
| ''command_not_found_handle'' handler function | 4.0-alpha | |
| official introduction of switchable "compatiblity levels" | 4.0-alpha | ''compat31'' was introduced in a 3.2 version, mainly because of the incompatibilities that were introduced by the changed ''=~'' operator |
| ''%%[[...]]%%'' and ''%%((...))%%'' conditional commands are subject to the ''ERR'' trap and ''set -e'' feature | 4.1-alpha | |
| ACL support for file status checks | 4.1-alpha | |
| Assignment to negative array indices | 4.3-alpha | ksh93, zsh |
| ''declare''/''typeset -n'' | 4.3-alpha | Support for nameref variable type, a variable referencing another one by name |
| shells started to run process substitutions now run any trap set on ''EXIT'' | 4.3-beta | |
| process substitution does not inherit the ''v'' flag | 5.0-alpha | |
| ''ERR'' trap | 5.0-alpha | Reports more reliable line numbers |
| Variable assignment | 5.0-beta | Assignments preceeding a special builtin that chages variable attributes are not propagated back unless compatiblity mode is 44 or lower |