Bash 5.1 Reworks Pathname Expansion
Written by Kay Ewbank   
Monday, 04 January 2021

The fifth major release of Bash has been released with improvements including a rework of the way pathname expansion is handled.

Bash is the GNU Project's Bourne Again SHell, a complete implementation of the POSIX shell spec. It also comes with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion. 

gnu

The most significant change to the new version is the result of bash users complaining about the way the previous release handled particular varieties of pathnames. This was discussed at length on POSIX.

Bash 5.1 now handles pathname expansion in the same way bash-4.4 used to. In other words, text is not expanded as a pathname if the word contains backslashes but does not contain any unquoted globbing special characters.

The new release also has changes to trap handling when reading from the terminal such as when performing reads and selects, with several bug fixes to fix bugs that caused the shell to crash.

Another improvement is to the random number engine. There's a new variable, SRANDOM, that gets its random data from the system's entropy engine. This means it avoids being linear and cannot be reseeded to get an identical random sequence.

Array handling has also been improved, with a new array variable that can be used to run multiple commands before printing the primary prompt. You can also assign a series of key-value pairs within a compound assignment.

The developers say the most visible new feature is in Readline. There's a new `faces' option that highlights a selected region of text. The option was added to highlight the text inserted by a bracketed paste operation so you can see what was inserted. It also marks the text found by incremental and non-incremental history searches.

Bash 5.1 is available now on Git.

 

gnu

More Information

Bash On Git 

Related Articles

Bash 5 Adds New Shell Variables

Bash 4.4 Released

Google is 20, GNU is 35; Why No GNUgle?

GNU Manifesto Published Thirty Years Ago

Free Software Foundation Fun For Xmas

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Apache Fury Adds Optimized Serializers For Scala
31/10/2024

Apache Fury has been updated to add GraalVM native images and with optimized serializers for Scala collection. The update also reduces Scala collection serialization cost via the use of  encoding [ ... ]



Google Intensive AI Course - Free On Kaggle
05/11/2024

Google is offering a 5-Day Gen AI Intensive Course designed to equip data scientists with the knowledge and skills to tackle generative AI projects with confidence. It runs on the Kaggle platform from [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 04 January 2021 )