Bash 3.0 released
To that end, we touched base with Bash maintainer Chet Ramey, who was kind enough to reply to our questions about the latest release. The first question on our mind, of course, was "why the version bump?"
The changes in 3.0 include support for the bash debugger and internationalization support, as well as a number of smaller features that had been requested for some time (time-stamped history entries, better brace expansion) and better POSIX compliance. To that you add the multibyte character support introduced in bash-2.05b and the code cleanups and programming improvements in bash-2.05a.
The whole set of changes deserves a major version bump.
Indeed, there are quite a few changes in this release. A look at the CHANGES file or the NEWS with the release source shows a slew of bugfixes and changes to Bash and Readline.
One interesting new addition to Bash 3.0 is new type of brace expansion. The syntax for the new brace expansion is {x..y} where x and y can be an integer or a single character in ascending or descending order. For example, the set {z..a} would match all of the letters from z to a in descending order. (z,y,x, etc.) The set {1..1000} would match the each of the integers from 1 to 1000.
Another new feature of interest is the addition of history timestamps. This allows users to see when commands were run, which can provide some useful and interesting information.
There are several new options with Bash 3.0. The "failglob" option will probably be of interest to many users. When set, this option will cause an error when a glob expression fails to match any files -- as opposed to running the command anyway. The new "pipefail" option tells Bash to return a failure status if any command in a "pipeline" fails, as opposed to the default behavior of returning the status of the last job in a pipeline.
Of course, one might wonder if all of the improvements and changes in the release will affect existing shell scripts. Many Bash users have a number of shell scripts that are vital to our day to day work, this writer included, and aren't eager to see them break on a new version of Bash. According to the release notes, there are some incompatibilities between 3.0 and Bash version 1.14, but no mention of 2.0x versions. According to Ramey:
This writer has tried a number of shell scripts against the Bash 3.0 release, and didn't find any incompatibilities or issues. In fact, a (permanent) switch to a Bash 3.0 login shell may be in my very near future.
We also asked Ramey what, if any, features were planned for future versions of Bash. Ramey said that there were already plans for future releases
I'm intrigued by zsh's loadable module system as well.
As for interactive use, I think there's room for improvement in the programmable completion system.
Readline needs better support for threaded use (multiple threads in a single process all using separate instances of readline). This is very hard to do today.
Interested users who don't want to wait for Bash to ship with their
favorite distribution can find the source on Ramey's Bash page, or
the GNU mirrors.
| Index entries for this article | |
|---|---|
| GuestArticles | Brockmeier, Joe |
