Bish, Bash... gosh! Good ol' Bourne Again Shell takes a bow as it reaches version five-point-zero
Trusty command interpreter gains some new toys and a jolly good buffing
In news that will set the hearts of shell fans all a quiver, Bash 5.0 was released this week, replete with a truckload of fixes along with a few new features.
The fifth major version in the nearly 30-year history of the GNU Project’s Bourne Again Shell (Bash – geddit?) includes some new variables
BASH_ARGV0, which returns $0 on reference and sets $0 on assignment, and
EPOCHREALTIME which expand to the time in seconds since the Unix epoch, with the latter having microsecond granularity.
Other new toys include the implementation of optional value inheritance for local variables, history deletion by range, and some handy enhancements to the
wait builtin to wait for the last process substitution created or wait for a specified job or process to terminate (rather than waiting until it changes state.)
The long list of improvements also includes the “disabled by default, undocumented” shell option to enable and disable sending history to syslog. Simplifying the process to log history is a good thing though the word "undocumented" may set one’s teeth on edge a little.
As well as the improvements, there is a swathe of bug fixes including updates to deal with the resolution of nameref variables and the handling of out-of-bounds memory conditions.
Alas, the changes do come at the expense of some backwards compatibility between the new and shiny of version 5 and the previous bash-4.4, notably around nameref variables thanks to the changes in resolution.
Bash was not alone in getting the public release treatment. The line-editing tool Readline also saw a major version bump to 8, and a truckload of fixes and improvements. While seemingly minor, we were rather pleased to see the “Insert” keypad key putting Readline into overwrite mode nestled among the history enhancements and default key bindings.
Naturally, we took the thing for a spin (using Ubuntu) and found the whole experience to be reassuringly uneventful.
Exactly as one would wish. ®