Next
Previous
Contents
Bash-2.04 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-2.04
distribution):
- Programmable word completion with the new `complete' and `compgen' builtins;
examples are provided in examples/complete/complete-examples
- `history' has a new `-d' option to delete a history entry
- `bind' has a new `-x' option to bind key sequences to shell commands
- The prompt expansion code has new `\j' and `\l' escape sequences
- The `no_empty_cmd_completion' shell option, if enabled, inhibits
command completion when TAB is typed on an empty line
- `help' has a new `-s' option to print a usage synopsis
- New arithmetic operators: var++, var--, ++var, --var, expr1,expr2 (comma)
- New ksh93-style arithmetic for command:
for ((expr1 ; expr2; expr3 )); do list; done
- `read' has new options: `-t', `-n', `-d', `-s'
- The redirection code handles several filenames specially: /dev/fd/N,
/dev/stdin, /dev/stdout, /dev/stderr
- The redirection code now recognizes /dev/tcp/HOST/PORT and
/dev/udp/HOST/PORT and tries to open a TCP or UDP socket, respectively,
to the specified port on the specified host
- The ${!prefix*} expansion has been implemented
- A new FUNCNAME variable, which expands to the name of a currently-executing
function
- The GROUPS variable is no longer readonly
- A new shopt `xpg_echo' variable, to control the behavior of echo with
respect to backslash-escape sequences at runtime
- The NON_INTERACTIVE_LOGIN_SHELLS #define has returned
The version of Readline released with Bash-2.04, Readline-4.1, has several
new features as well:
- Parentheses matching is always compiled into readline, and controllable
with the new `blink-matching-paren' variable
- The history-search-forward and history-search-backward functions now leave
point at the end of the line when the search string is empty, like
reverse-search-history, and forward-search-history
- A new function for applications: rl_on_new_line_with_prompt()
- New variables for applications: rl_already_prompted, and rl_gnu_readline_p
A short feature history dating from bash-2.0:
Bash-2.03 had very few new features, in keeping with the convention
that odd-numbered releases provide mainly bug fixes. A number of new
features were added to Readline, mostly at the request of the Cygnus
folks.
A new shopt option, `restricted_shell', so that startup files can test
whether or not the shell was started in restricted mode
Filename generation is now performed on the words between ( and ) in
compound array assignments (this is really a bug fix)
OLDPWD is now auto-exported, as POSIX.2 requires
ENV and BASH_ENV are read-only variables in a restricted shell
Bash may now be linked against an already-installed Readline library,
as long as the Readline library is version 4 or newer
All shells begun with the `--login' option will source the login shell
startup files, even if the shell is not interactive
There were lots of changes to the version of the Readline library released
along with Bash-2.03. For a complete list of the changes, read the file
CHANGES in the Bash-2.03 distribution.
Bash-2.02 contained the following new features:
a new version of malloc (based on the old GNU malloc code in previous
bash versions) that is more page-oriented, more conservative
with memory usage, does not `orphan' large blocks when they
are freed, is usable on 64-bit machines, and has allocation
checking turned on unconditionally
POSIX.2-style globbing character classes ([:alpha:], [:alnum:], etc.)
POSIX.2-style globbing equivalence classes
POSIX.2-style globbing collating symbols
the ksh [[...]] extended conditional command
the ksh egrep-style extended pattern matching operators
a new `printf' builtin
the ksh-like $( command substitution, which is equivalent to
$(cat filename)
new tilde prefixes that expand to directories from the directory stack
new `**' arithmetic operator to do exponentiation
case-insensitive globbing (filename expansion)
menu completion a la tcsh
`magic-space' history expansion function like tcsh
the readline inputrc `language' has a new file inclusion directive ($include)
Bash-2.01 contained only a few new features:
new `GROUPS' builtin array variable containing the user's group list
new bindable readline commands: history-and-alias-expand-line and
alias-expand-line
Bash-2.0 contained extensive changes and new features from bash-1.14.7.
Here's a short list:
- new `time' reserved word to time pipelines, shell builtins, and
shell functions
- one-dimensional arrays with a new compound assignment statement,
appropriate expansion constructs and modifications to some
of the builtins (read, declare, etc.) to use them
- new quoting syntaxes for ANSI-C string expansion and locale-specific
string translation
- new expansions to do substring extraction, pattern replacement, and
indirect variable expansion
- new builtins: `disown' and `shopt'
- new variables: HISTIGNORE, SHELLOPTS, PIPESTATUS, DIRSTACK, GLOBIGNORE,
MACHTYPE, BASH_VERSINFO
- special handling of many unused or redundant variables removed
(e.g., $notify, $glob_dot_filenames, $no_exit_on_failed_exec)
- dynamic loading of new builtin commands; many loadable examples provided
new prompt expansions: \a, \e, \n, \H, \T, \@, \v, \V
- history and aliases available in shell scripts
- new readline variables: enable-keypad, mark-directories, input-meta,
visible-stats, disable-completion, comment-begin
- new readline commands to manipulate the mark and operate on the region
- new readline emacs mode commands and bindings for ksh-88 compatibility
- updated and extended builtins
- new DEBUG trap
- expanded (and now documented) restricted shell mode
implementation stuff:
- autoconf-based configuration
- nearly all of the bugs reported since version 1.14 have been fixed
- most builtins converted to use builtin `getopt' for consistency
- most builtins use -p option to display output in a reusable form
(for consistency)
- grammar tighter and smaller (66 reduce-reduce conflicts gone)
- lots of code now smaller and faster
- test suite greatly expanded
bash-1.14.7?
There are a few incompatibilities between version 1.14.7 and version 2.04.
They are detailed in the file COMPAT in the bash-2.04 distribution.
Next
Previous
Contents