Bash 5.2 has already been released and comes with news, corrections and more

bash

Bash (Bourne Again SHell) is a GNU Project, a complete implementation of the POSIX shell specification

After almost 2 years of development (twenty months of development to be exact) the launch of the new version of the GNU shell bash 5.2, which is an update to the fifth branch (5.x) and that this release fixes several notable bugs in bash-5.1 and introduces a number of new features.

For those of you who are new to bash, you should know that this is a default shell on most Linux distributions.

Main new features of Bash 5.2

In this new version that is presented from Bash 5.2 it is noted that work was done on rewriting the code to analyze the command substitution constructs and replacing the output when executing another command, such as "$(command)" or `command`. The new implementation calls the bison parser recursively. This replaces the ad-hoc parsing used in previous versions and allows for better syntax checking and catches syntax errors much earlier.

Another change that stands out in this new version of Bash 5.2 is the improved parsing and expansion of array indices, plus the ability to use the "@" and "*" parameters in the builtin command to reset a key to a given value instead of resetting the entire array has been implemented.

In addition to this, it is also mentioned that added a new setting “patsub_replacement”, when set, the '&' character in the replaced string is used to replace the part of the string that matches the given pattern.

Also it is highlighted that there is a new framework for readline waiting times, which includes new
public functions to set timeouts and see how much time is left before it times out, plus there's a new config option: --with-shared-termcap-library, which forces the shared readline library to link to the shared termcap library (or curses/ncurses/termlib) so applications don't have to.

Of the other changes that stand out from this new version of Bash 5.2:

  • The number of situations where additional processes are not forked has been expanded, for example, forking is no longer used when using the "$(" construct
  • Implemented a new internal framework for timer and timeout calculation.
  • Provided the ability to enable at compile time (configure --enable-alt-array-implementation) an alternate array implementation that is optimized for maximum access speed at the cost of increased memory consumption.
  • Extended use of $'…' and $»…» substitutions used in localization.
  •  'printf' has a new format specifier '%Q'. This acts like "%q" but applies any specified precision to the original argument without quotes, then quotes and outputs the result.
  • Added noexpand_translations setting and "configure --enable-translatable-strings" build option to control whether support for $"..." localizable substitutions is enabled.
  • In posix mode, the `printf' can now be used long double for floating point conversion specifiers if present, otherwise it must just be double otherwise.
  • Added and enabled by default "globskipdots" to avoid "." and ".." when expanding routes..

At the same time, the readline 8.2 library was released, which is used in bash to organize command line editing.

Lastly, it should be mentioned that this version of bash can be linked with a Readline library already installed instead of the private version in lib/readline if you wish. It is only important to mention that the version of readline-8.1 and later versions can provide all the symbols that bash-5.2 requires, so earlier versions of the Readline library will not work correctly.

Finally for those who are interested in being able to know a little more and also those who want to obtain this new version now, you can visit the following link.

How to get Bash 5.2 on Linux?

Moment It only remains to wait for this new version of Bash to be incorporated within the repositories of Linux distributions, since it is the best option.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.