Almost three years after Bash 5.2, and following a year-long cycle of beta and release candidate builds, the most popular command-line shell and scripting language used in Unix-like operating systems has released version 5.3.
The headline feature is a pair of new substitution forms, ${ command; }
and ${|command;}
, that run in the current shell context rather than in a child process. That change means scripts can capture output (or let the command write to REPLY
) without paying the usual fork-and-pipe overhead—handy for tight loops and embedded systems.
Another welcome addition is GLOBSORT
, a shell variable that lets users dictate how pathname expansions are ordered—by name, size, various timestamps, or even unsorted—and whether the list is ascending or descending.
Power users who live in tab completion will appreciate compgen -V
, which can stuff generated completions directly into a variable, and read -E
, which now borrows Readline’s programmable completion when grabbing interactive input. Meanwhile, source -p PATH
allows scripts to “dot in” companion files from an explicit search path instead of $PATH
.
Under the hood, the codebase has been updated to ensure conformance with C23 (the latest revision of the C programming language standard). As a consequence, Bash will no longer build with K&R-era compilers—a footnote for most distributions but a signal that legacy toolchains need to move on.
Last but not least, Bash 5.3’s twin, Readline 8.3, was released the same day. The standalone library now offers case-insensitive searching (search-ignore-case
), a callable execute-named-command
, and an export-completions
facility for feeding completion data to external programs.
For more information, see the announcement.