Bash 5.2 shell available

After twenty months of development, a new version of the GNU Bash 5.2 shell, used by default in most Linux distributions, has been published. At the same time, the release of the readline 8.2 library, which is used in bash to organize command line editing, was formed.

Key improvements include:

  • Rewritten code to parse command substitution constructs (command substitution, substitution of output from executing another command, for example, "$(command)" or `command`). The new implementation uses a recursive call to the bison parser and features better syntax checking and early detection of errors in replaced constructs.
  • Improved parsing and expansion of array indexes. Implemented the ability to use the "@" and "*" parameters in the built-in unset command to reset a key with a given value instead of resetting the entire array.
  • A new setting "patsub_replacement" has been added, when set, the "&" character in the replaced string is used to replace the part of the string that matches the specified pattern. Inserting a literal "&" requires escaping it with a backslash.
  • Expanded the number of situations in which additional processes are not forked, for example, fork is no longer applied when using the "$(
  • Implemented a new internal framework for the timer and timeout calculation.
  • Provided the ability to enable at build time (configure --enable-alt-array-implementation) an alternative implementation of arrays that is optimized to achieve maximum access speed at the cost of increased memory consumption.
  • Extended usage of $'…' and $"…" substitutions used in localization. Added the noexpand_translations setting and the "configure --enable-translatable-strings" build option to control whether support for $"…" localizable substitutions is enabled.
  • Added and enabled by default setting "globskipdots" to prevent "." and ".." when expanding paths.

Source: opennet.ru

Add a comment