27fd87a575a0f9fee8cb5bb4e492170748f69567
[platform/upstream/bash.git] / NEWS
1 This is a terse description of the new features added to bash-2.05a since
2 the release of bash-2.05.  As always, the manual page (doc/bash.1) is
3 the place to look for complete descriptions.
4
5 1.  New Features in Bash
6
7 a.  Added support for DESTDIR installation root prefix, so you can do a
8     `make install DESTDIR=bash-root' and do easier binary packaging.
9
10 b.  Added support for builtin printf "'" flag character as per latest POSIX
11     drafts.
12
13 c.  Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
14     ISO C99).
15
16 d.  New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
17     (bash doesn't use very much of what it returns).
18
19 e.  `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
20     but ignored.
21
22 f.  New read-only `shopt' option:  login_shell.  Set to non-zero value if the
23     shell is a login shell.
24
25 g.  New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
26
27 h.  New `-A group/-g' option to complete and compgen; does group name
28     completion.
29
30 i.  New `-t' option to `hash' to list hash values for each filename argument.
31
32 j.  New [-+]O invocation option to set and unset `shopt' options at startup.
33
34 k.  configure's `--with-installed-readline' option now takes an optional
35     `=PATH' suffix to set the root of the tree where readline is installed
36     to PATH.
37
38 l.  The ksh-like `ERR' trap has been added.  The `ERR' trap will be run
39     whenever the shell would have exited if the -e option were enabled.
40     It is not inherited by shell functions.
41
42 m.  `readonly', `export', and `declare' now print variables which have been
43     given attributes but not set by assigning a value as just a command and
44     a variable name (like `export foo') when listing, as the latest POSIX
45     drafts require.
46
47 n.  `bashbug' now requires that the subject be changed from the default.
48
49 o.  configure has a new `--enable-largefile' option, like other GNU utilities.
50
51 p.  `for' loops now allow empty word lists after `in', like the latest POSIX
52     drafts require.
53
54 q.  The builtin `ulimit' now takes two new non-numeric arguments:  `hard',
55     meaning the current hard limit, and `soft', meaning the current soft  
56     limit, in addition to `unlimited'
57     
58 r.  `ulimit' now prints the option letter associated with a particular
59     resource when printing more than one limit.
60
61 s.  `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
62     one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
63
64 t.  The `printf' builtin now handles the %a and %A conversions if they're
65     implemented by printf(3).
66
67 u.  The `printf' builtin now handles the %F conversion (just about like %f).
68
69 v.  The `printf' builtin now handles the %n conversion like printf(3).  The
70     corresponding argument is the name of a shell variable to which the
71     value is assigned.
72
73 2.  New Features in Readline
74
75 a.  Added extern declaration for rl_get_termcap to readline.h, making it a
76     public function (it was always there, just not in readline.h).
77
78 b.  New #defines in readline.h:  RL_READLINE_VERSION, currently 0x0402,
79     RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
80
81 c.  New readline variable:  rl_readline_version, mirrors RL_READLINE_VERSION.
82
83 d.  New bindable boolean readline variable:  match-hidden-files.  Controls
84     completion of files beginning with a `.' (on Unix).  Enabled by default.
85
86 e.  The history expansion code now allows any character to terminate a
87     `:first-' modifier, like csh.
88
89 f.  New bindable variable `history-preserve-point'.  If set, the history
90     code attempts to place the user at the same location on each history
91     line retrived with previous-history or next-history.
92
93 -------------------------------------------------------------------------------
94 This is a terse description of the new features added to bash-2.05 since
95 the release of bash-2.04.  As always, the manual page (doc/bash.1) is
96 the place to look for complete descriptions.
97
98 1.  New Features in Bash
99
100 a.  Added a new `--init-file' invocation argument as a synonym for `--rcfile',
101     per the new GNU coding standards.
102
103 b.  The /dev/tcp and /dev/udp redirections now accept service names as well as
104     port numbers.
105
106 c.  `complete' and `compgen' now take a `-o value' option, which controls some
107     of the aspects of that compspec.  Valid values are:
108
109         default - perform bash default completion if programmable
110                   completion produces no matches
111         dirnames - perform directory name completion if programmable
112                    completion produces no matches
113         filenames - tell readline that the compspec produces filenames,
114                     so it can do things like append slashes to
115                     directory names and suppress trailing spaces
116
117 d.  A new loadable builtin, realpath, which canonicalizes and expands symlinks
118     in pathname arguments.
119     
120 e.  When `set' is called without options, it prints function defintions in a
121     way that allows them to be reused as input.  This affects `declare' and 
122     `declare -p' as well.  This only happens when the shell is not in POSIX
123     mode, since POSIX.2 forbids this behavior.
124
125 f.  Bash-2.05 once again honors the current locale setting when processing
126     ranges within pattern matching bracket expressions (e.g., [A-Z]).
127
128 2.  New Features in Readline
129
130 a.  The blink timeout for paren matching is now settable by applications,
131     via the rl_set_paren_blink_timeout() function.
132
133 b.  _rl_executing_macro has been renamed to rl_executing_macro, which means
134     it's now part of the public interface.
135
136 c.  Readline has a new variable, rl_readline_state, which is a bitmap that
137     encapsulates the current state of the library; intended for use by
138     callbacks and hook functions.
139
140 d.  New application-callable function rl_set_prompt(const char *prompt):
141     expands its prompt string argument and sets rl_prompt to the result.
142
143 e.  New application-callable function rl_set_screen_size(int rows, int cols):
144     public method for applications to set readline's idea of the screen
145     dimensions.
146
147 f.  New function, rl_get_screen_size (int *rows, int *columns), returns
148     readline's idea of the screen dimensions.
149
150 g.  The timeout in rl_gather_tyi (readline keyboard input polling function)
151     is now settable via a function (rl_set_keyboard_input_timeout()).
152
153 h.  Renamed the max_input_history variable to history_max_entries; the old
154     variable is maintained for backwards compatibility.
155
156 i.  The list of characters that separate words for the history tokenizer is
157     now settable with a variable:  history_word_delimiters.  The default
158     value is as before.
159
160 -------------------------------------------------------------------------------
161 This is a terse description of the new features added to bash-2.04 since
162 the release of bash-2.03.  As always, the manual page (doc/bash.1) is
163 the place to look for complete descriptions.
164
165 1.  New Features in Bash
166
167 a.  The history builtin has a `-d offset' option to delete the history entry
168     at position `offset'.
169
170 b.  The prompt expansion code has two new escape sequences: \j, the number of
171     active jobs; and \l, the basename of the shell's tty device name.
172
173 c.  The `bind' builtin has a new `-x' option to bind key sequences to shell   
174     commands.
175
176 d.  There is a new shell option, no_empty_command_completion, which, when
177     enabled, disables command completion when TAB is typed on an empty line.
178
179 e.  The `help' builtin has a `-s' option to just print a builtin's usage
180     synopsis.
181
182 f.  There are several new arithmetic operators:  id++, id-- (variable
183     post-increment/decrement), ++id, --id (variable pre-increment/decrement),
184     expr1 , expr2 (comma operator).
185
186 g.  There is a new ksh-93 style arithmetic for command:
187         for ((expr1 ; expr2; expr3 )); do list; done
188
189 h.  The `read' builtin has a number of new options:
190         -t timeout      only wait timeout seconds for input
191         -n nchars       only read nchars from input instead of a full line
192         -d delim        read until delim rather than newline
193         -s              don't echo input chars as they are read
194
195 i.  The redirection code now handles several filenames specially:
196     /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
197     not they are present in the file system.
198
199 j.  The redirection code now recognizes pathnames of the form
200     /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
201     of the appropriate type to the specified port on the specified host.
202
203 k.  The ksh-93 ${!prefix*} expansion, which expands to the names of all
204     shell variables with prefix PREFIX, has been implemented.
205
206 l.  There is a new dynamic variable, FUNCNAME, which expands to the name of
207     a currently-executing function.  Assignments to FUNCNAME have no effect.
208
209 m.  The GROUPS variable is no longer readonly; assignments to it are silently
210     discarded.  This means it can be unset.
211
212 n.  A new programmable completion facility, with two new builtin commands:
213     complete and compgen.
214
215 o.  configure has a new option, `--enable-progcomp', to compile in the
216     programmable completion features (enabled by default).
217
218 p.  `shopt' has a new option, `progcomp', to enable and disable programmable
219     completion at runtime.
220
221 q.  Unsetting HOSTFILE now clears the list of hostnames used for completion.
222
223 r.  configure has a new option, `--enable-bash-malloc', replacing the old
224     `--with-gnu-malloc' (which is still present for backwards compatibility).
225
226 s.  There is a new manual page describing rbash, the restricted shell.
227
228 t.  `bashbug' has new `--help' and `--version' options.
229
230 u.  `shopt' has a new `xpg_echo' option, which controls the behavior of
231     `echo' with respect to backslash-escaped characters at runtime.
232
233 v.  If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
234     startup files, even if they are not interactive.
235
236 w.  The LC_NUMERIC variable is now treated specially, and used to set the
237     LC_NUMERIC locale category for number formatting, e.g., when `printf'
238     displays floating-point numbers.
239
240 2.  New features in Readline
241
242 a.  Parentheses matching is now always compiled into readline, and enabled
243     or disabled when the value of the `blink-matching-paren' variable is
244     changed.
245
246 b.  MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
247
248 c.  MS-DOS systems now use ~/_history as the default history file.
249
250 d.  history-search-{forward,backward} now leave the point at the end of the
251     line when the string to search for is empty, like
252     {reverse,forward}-search-history.
253
254 e.  history-search-{forward,backward} now leave the last history line found
255     in the readline buffer if the second or subsequent search fails.
256
257 f.  New function for use by applications:  rl_on_new_line_with_prompt, used
258     when an application displays the prompt itself before calling readline().
259
260 g.  New variable for use by applications:  rl_already_prompted.  An application
261     that displays the prompt itself before calling readline() must set this to
262     a non-zero value.
263
264 h.  A new variable, rl_gnu_readline_p, always 1.  The intent is that an
265     application can verify whether or not it is linked with the `real'
266     readline library or some substitute.
267
268 -------------------------------------------------------------------------------
269 This is a terse description of the new features added to bash-2.03 since
270 the release of bash-2.02.  As always, the manual page (doc/bash.1) is
271 the place to look for complete descriptions.
272
273 1.  New Features in Bash
274
275 a.  New `shopt' option, `restricted_shell', indicating whether or not the
276     shell was started in restricted mode, for use in startup files.
277
278 b.  Filename generation is now performed on the words between ( and ) in
279     array assignments (which it probably should have done all along).
280
281 c.  OLDPWD is now auto-exported, as POSIX.2 seems to require.
282
283 d.  ENV and BASH_ENV are read-only variables in a restricted shell.
284
285 e.  A change was made to the startup file code so that any shell begun with
286     the `--login' option, even non-interactive shells, will source the login
287     shell startup files.
288
289 2.  New Features in Readline
290
291 a.  Many changes to the signal handling:
292         o Readline now catches SIGQUIT and cleans up the tty before returning;
293         o A new variable, rl_catch_signals, is available to application writers 
294           to indicate to readline whether or not it should install its own
295           signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
296           SIGTTIN, and SIGTTOU;
297         o A new variable, rl_catch_sigwinch, is available to application
298           writers to indicate to readline whether or not it should install its
299           own signal handler for SIGWINCH, which will chain to the calling
300           applications's SIGWINCH handler, if one is installed;
301         o There is a new function, rl_free_line_state, for application signal
302           handlers to call to free up the state associated with the current
303           line after receiving a signal;
304         o There is a new function, rl_cleanup_after_signal, to clean up the
305           display and terminal state after receiving a signal;
306         o There is a new function, rl_reset_after_signal, to reinitialize the
307           terminal and display state after an application signal handler
308           returns and readline continues
309
310 b.  There is a new function, rl_resize_terminal, to reset readline's idea of
311     the screen size after a SIGWINCH.
312
313 c.  New public functions: rl_save_prompt and rl_restore_prompt.  These were
314     previously private functions with a `_' prefix.
315
316 d.  New function hook: rl_pre_input_hook, called just before readline starts
317     reading input, after initialization.
318
319 e.  New function hook: rl_display_matches_hook, called when readline would
320     display the list of completion matches.  The new function
321     rl_display_match_list is what readline uses internally, and is available
322     for use by application functions called via this hook.
323
324 f.  New bindable function, delete-char-or-list, like tcsh.
325
326 g.  A new variable, rl_erase_empty_line, which, if set by an application using
327     readline, will cause readline to erase, prompt and all, lines on which the
328     only thing typed was a newline.
329
330 h.  New bindable variable: `isearch-terminators'.
331
332 i.  New bindable function: `forward-backward-delete-char' (unbound by default).
333
334 -------------------------------------------------------------------------------
335 This is a terse description of the new features added to bash-2.02 since
336 the release of bash-2.01.1.  As always, the manual page (doc/bash.1) is
337 the place to look for complete descriptions.
338
339 1. New Features in Bash
340
341 a.  A new version of malloc, based on the older GNU malloc, that has many
342     changes, is more page-based, is more conservative with memory usage,
343     and does not `orphan' large blocks when they are freed.
344
345 b.  A new version of gmalloc, based on the old GLIBC malloc, with many
346     changes and range checking included by default.
347
348 c.  A new implementation of fnmatch(3) that includes full POSIX.2 Basic
349     Regular Expression matching, including character classes, collating
350     symbols, equivalence classes, and support for case-insensitive pattern
351     matching.
352
353 d.  ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
354     implemented, controlled by a new `shopt' option, `extglob'.  
355     
356 e.  There is a new ksh-like `[[' compound command, which implements   
357     extended `test' functionality.
358     
359 f.  There is a new `printf' builtin, implemented according to the POSIX.2
360     specification.
361     
362 g.  There is a new feature for command substitution: $(< filename) now expands
363     to the contents of `filename', with any trailing newlines removed
364     (equivalent to $(cat filename)).
365
366 h.  There are new tilde prefixes which expand to directories from the
367     directory stack.
368
369 i.  There is a new `**' arithmetic operator to do exponentiation.
370
371 j.  There are new configuration options to control how bash is linked:
372     `--enable-profiling', to allow bash to be profiled with gprof, and
373     `--enable-static-link', to allow bash to be linked statically.
374
375 k.  There is a new configuration option, `--enable-cond-command', which
376     controls whether or not the `[[' command is included.  It is on by
377     default. 
378
379 l.  There is a new configuration option, `--enable-extended-glob', which
380     controls whether or not the ksh extended globbing feature is included.
381     It is enabled by default.
382
383 m.  There is a new configuration #define in config.h.top that, when enabled,
384     will cause all login shells to source /etc/profile and one of the user-
385     specific login shell startup files, whether or not the shell is
386     interactive.  
387     
388 n.  There is a new invocation option, `--dump-po-strings', to dump
389     a shell script's translatable strings ($"...") in GNU `po' format. 
390     
391 o.  There is a new `shopt' option, `nocaseglob', to enable case-insensitive
392     pattern matching when globbing filenames and using the `case' construct.
393
394 p.  There is a new `shopt' option, `huponexit', which, when enabled, causes
395     the shell to send SIGHUP to all jobs when an interactive login shell
396     exits.
397
398 q.  `bind' has a new `-u' option, which takes a readline function name as an
399     argument and unbinds all key sequences bound to that function in a
400     specified keymap.
401     
402 r.  `disown' now has `-a' and `-r' options, to limit operation to all jobs
403     and running jobs, respectively.
404
405 s.  The `shopt' `-p' option now causes output to be displayed in a reusable
406     format.
407     
408 t.  `test' has a new `-N' option, which returns true if the filename argument
409     has been modified since it was last accessed.
410
411 u.  `umask' now has a `-p' option to print output in a reusable format.
412     
413 v.  A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
414     translation code.  It expands to the character whose ascii code is NNN
415     in hexadecimal.
416     
417 w.  The prompt string expansion code has a new `\r' escape sequence.
418
419 x.  The shell may now be cross-compiled for the CYGWIN32 environment on
420     a Unix machine.
421
422 2. New Features in Readline
423
424 a.  There is now an option for `iterative' yank-last-arg handline, so a user
425     can keep entering `M-.', yanking the last argument of successive history
426     lines.
427
428 b.  New variable, `print-completions-horizontally', which causes completion
429     matches to be displayed across the screen (like `ls -x') rather than up
430     and down the screen (like `ls').
431
432 c.  New variable, `completion-ignore-case', which causes filename completion
433     and matching to be performed case-insensitively.
434
435 d.  There is a new bindable command, `magic-space', which causes history
436     expansion to be performed on the current readline buffer and a space to
437     be inserted into the result.
438
439 e.  There is a new bindable command, `menu-complete', which enables tcsh-like
440     menu completion (successive executions of menu-complete insert a single
441     completion match, cycling through the list of possible completions).
442
443 f.  There is a new bindable command, `paste-from-clipboard', for use on Win32
444     systems, to insert the text from the Win32 clipboard into the editing
445     buffer.
446
447 g.  The key sequence translation code now understands printf-style backslash
448     escape sequences, including \NNN octal escapes.  These escape sequences
449     may be used in key sequence definitions or macro values.
450
451 h.  An `$include' inputrc file parser directive has been added.
452
453 -------------------------------------------------------------------------------
454 This is a terse description of the new features added to bash-2.01 since
455 the release of bash-2.0.  As always, the manual page (doc/bash.1) is the
456 place to look for complete descriptions.
457
458 1. New Features in Bash
459
460 a.  There is a new builtin array variable: GROUPS, the set of groups to which
461     the user belongs.  This is used by the test suite.
462
463 2.  New Features in Readline
464
465 a.  If a key sequence bound to `universal-argument' is read while reading a
466     numeric argument started with `universal-argument', it terminates the
467     argument but is otherwise ignored.  This provides a way to insert multiple
468     instances of a digit string, and is how GNU emacs does it.
469
470 -------------------------------------------------------------------------------
471 This is a terse description of the new features added to bash-2.0 since
472 the release of bash-1.14.7.  As always, the manual page (doc/bash.1) is
473 the place to look for complete descriptions.
474
475 1.  New Features in Bash
476
477 a.  There is a new invocation option, -D, that dumps translatable strings
478     in a script.
479
480 b.  The `long' invocation options must now be prefixed with `--'.
481
482 c.  New long invocation options:  --dump-strings, --help, --verbose
483
484 d.  The `nolineediting' invocation option was renamed to `noediting'.
485
486 e.  The `nobraceexpansion' and `quiet' long invocation options were removed.
487
488 f.  The `--help' and `--version' long options now work as the GNU coding
489     standards specify.
490
491 g.  If invoked as `sh', bash now enters posix mode after reading the
492     startup files, and reads and executes commands from the file named
493     by $ENV if interactive (as POSIX.2 specifies).  A login shell invoked
494     as `sh' reads $ENV after /etc/profile and ~/.profile.
495
496 h.  There is a new reserved word, `time', for timing pipelines, builtin
497     commands, and shell functions.  It uses the value of the TIMEFORMAT
498     variable as a format string describing how to print the timing
499     statistics.
500
501 i.  The $'...' quoting syntax expands ANSI-C escapes in ... and leaves the
502     result single-quoted.
503
504 j.  The $"..." quoting syntax performs locale-specific translation of ...
505     and leaves the result double-quoted.
506
507 k.  LINENO now works correctly in functions.
508
509 l.  New variables: DIRSTACK, PIPESTATUS, BASH_VERSINFO, HOSTNAME, SHELLOPTS,
510     MACHTYPE.  The first three are array variables.
511
512 m.  The BASH_VERSION and BASH_VERSINFO variables now include the shell's
513     `release status' (alpha[N], beta[N], release).
514
515 n.  Some variables have been removed:  MAIL_WARNING, notify, history_control,
516     command_oriented_history, glob_dot_filenames, allow_null_glob_expansion,
517     nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and
518     cdable_vars.  Most of them are now implemented with the new `shopt'
519     builtin; others were already implemented by `set'.
520
521 o.  Bash now uses some new variables:  LC_ALL, LC_MESSAGES, LC_CTYPE,
522     LC_COLLATE, LANG, GLOBIGNORE, HISTIGNORE.
523
524 p.  The shell now supports integer-indexed arrays of unlimited length,
525     with a new compound assignment syntax and changes to the appropriate
526     builtin commands (declare/typeset, read, readonly, etc.).  The array
527     index may be an arithmetic expression.
528
529 q.  ${!var}: indirect variable expansion, equivalent to eval \${$var}.
530
531 r.  ${paramter:offset[:length]}: variable substring extraction.
532
533 s.  ${parameter/pattern[/[/]string]}: variable pattern substitution.
534
535 t.  The $[...] arithmetic expansion syntax is no longer supported, in
536     favor of $((...)).
537
538 u.  Aliases can now be expanded in shell scripts with a shell option
539     (shopt expand_aliases).
540
541 v.  History and history expansion can now be used in scripts with
542     set -o history and set -H.
543
544 w.  All builtins now return an exit status of 2 for incorrect usage.
545
546 x.  Interactive shells resend SIGHUP to all running or stopped children
547     if (and only if) they exit due to a SIGHUP.
548
549 y.  New prompting expansions: \a, \e, \H, \T, \@, \v, \V.
550
551 z.  Variable expansion in prompt strings is now controllable via a shell
552     option (shopt promptvars).
553
554 aa. Bash now defaults to using command-oriented history.
555
556 bb. The history file ($HISTFILE) is now truncated to $HISTFILESIZE after
557     being written.
558
559 cc. The POSIX.2 conditional arithmetic evaluation syntax (expr ? expr : expr)
560     has been implemented.
561
562 dd. Each builtin now accepts `--' to signify the end of the options, except
563     as documented (echo, etc.).
564
565 ee. All builtins use -p to display values in a re-readable format where
566     appropriate, except as documented (echo, type, etc.).
567
568 ff. The `alias' builtin has a new -p option.
569
570 gg. Changes to the `bind' builtin:
571         o has new options: -psPSVr.
572         o the `-d' option was renamed to `-p'
573         o the `-v' option now dumps variables; the old `-v' is now `-P'
574
575 hh. The `bye' synonym for `exit' was removed.
576
577 ii. The -L and -P options to `cd' and `pwd' have been documented.
578
579 jj. The `cd' builtin now does spelling correction on the directory name
580     by default.  This is settable with a shell option (shopt cdspell).
581
582 kk. The `declare' builtin has new options: -a, -F, -p.
583
584 ll. The `dirs' builtin has new options: -c, -p, -v.
585
586 mm. The new `disown' builtin removes jobs from the shell's jobs table
587     or inhibits the resending of SIGHUP when the shell receives a
588     SIGHUP.
589
590 nn. The `echo' builtin has a new escape character: \e.
591
592 oo. The `enable' builtin can now load new builtins dynamically from shared
593     objects on systems with the dlopen/dlsym interface.  There are a number
594     of examples in the examples/loadables directory.  There are also
595     new options: -d, -f, -s, -p.
596
597 pp. The `-all' option to `enable' was removed in favor of `-a'.
598
599 qq. The `exec' builtin has new options: -l, -c, -a.
600
601 rr. The `hash' builtin has a new option: -p.
602
603 ss. The `history' builtin has new options: -c, -p, -s.
604
605 tt. The `jobs' builtin has new options: -r, -s.
606
607 uu. The `kill' builtin has new options: -n signum, -l signame.
608
609 vv. The `pushd' and `popd' builtins have a new option: -n.
610
611 ww. The `read' builtin has new options: -p prompt, -e, -a.
612
613 xx. The `readonly' builtin has a new -a option, and the -n option was removed.
614
615 yy. Changes to the `set' builtin:
616         o new options: -B, -o keyword, -o onecmd, -o history
617         o options removed: -l, -d, -o nohash
618         o options changed: +o, -h, -o hashall
619         o now displays variables in a format that can be re-read as input
620
621 zz. The new `shopt' builtin controls shell optional behavior previously
622     done by setting and unsetting certain shell variables.
623
624 aaa. The `test' builtin has new operators: -o option, s1 == s2, s1 < s2,
625      and s1 > s2, where s1 and s2 are strings.
626
627 bbb. There is a new trap, DEBUG, executed after every simple command.
628
629 ccc. The `trap' builtin has a new -p option.
630
631 ddd. The `ulimit' builtin has a new -l option on 4.4BSD-based systems.
632
633 eee. The PS1, PS2, PATH, and IFS variables may now be unset.
634
635 fff. The restricted shell mode has been expanded and is now documented.
636
637 ggg. Security improvements:
638         o functions are not imported from the environment if running setuid
639           or with -p
640         o no startup files are sourced if running setuid or with -p
641
642 hhh. The documentation has been overhauled:  the texinfo manual was
643      expanded, and HTML versions of the man page and texinfo manual
644      are included.
645
646 iii. Changes to Posix mode:
647         o Command lookup now finds special builtins before shell functions.
648         o Failure of a special builtin causes a non-interactive shell to
649           exit.  Failures are defined in the POSIX.2 specification.
650         o If the `cd' builtin finds a directory to change to using $CDPATH,
651           the value assigned to PWD when `cd' completes does not contain
652           any symbolic links.
653         o A non-interactive shell exits if a variable assignment error
654           occurs when no command name follows the assignment statements.
655         o A non-interactive shell exits if the interation variable in a
656           `for' statement or the selection variable in a `select' statement
657           is read-only or another variable assignment error occurs.
658         o The `<>' redirection operator now opens a file for both stdin and
659           stdout by default, not just when in posix mode.
660         o Assignment statements preceding special builtins now persist in
661           the shell's environment when the builtin completes.
662
663      Posix mode is now completely POSIX.2-compliant (modulo bugs).  When
664      invoked as sh, bash should be completely POSIX.2-compliant.
665
666 jjj. The default value of PS1 is now "\s-\v\$ ".
667
668 kkk. The ksh-like ((...)) arithmetic command syntax has been implemented.
669      This is exactly equivalent to `let "..."'.
670
671 lll. Integer constants have been extended to base 64.
672
673 mmm. The `ulimit' builtin now sets both hard and soft limits and reports the
674      soft limit by default.
675
676 2.  New Features in Readline
677
678 a.  New variables:  enable-keypad, input-meta (new name for meta-flag),
679     mark-directories, visible-stats (now documented), disable-completion,
680     comment-begin.
681
682 b.  New bindable commands:  kill-region, copy-region-as-kill,
683     copy-backward-word, copy-forward-word, set-mark, exchange-point-and-mark,
684     character-search, character-search-backward, insert-comment,
685     glob-expand-word, glob-list-expansions, dump-variables, dump-macros.
686
687 c.  New emacs keybindings:  delete-horizontal-space (M-\),
688     insert-completions (M-*), possible-completions (M-=).
689
690 d.  The history-search-backward and history-search-forward commands were
691     modified to be the same as previous-line and next-line if point is at
692     the start of the line.
693
694 e.  More file types are available for the visible-stats mode.
695
696 3.  Changes of interest in the Bash implementation
697
698 a.  There is a new autoconf-based configuration mechanism.
699
700 b.  More things have been moved from Posix mode to standard shell behavior.
701
702 c.  The trace output (set -x) now inserts quotes where necessary so it can
703     be reused as input.
704
705 d.  There is a compile-time option for a system-wide interactive shell
706     startup file (disabled by default).
707
708 e.  The YACC grammar is smaller and tighter, and all 66 shift-reduce
709     conflicts are gone.  Several parsing bugs have been fixed.
710
711 f.  Builtin option parsing has been regularized (using internal_getopt()),
712     with the exception of `echo', `type', and `set'.
713
714 g.  Builtins now return standard usage messages constructed from the
715     `short doc' used by the help builtin.
716
717 h.  Completion now quotes using backslashes by default, but honors
718     user-supplied quotes.
719
720 i.  The GNU libc malloc is available as a configure-time option.
721
722 j.  There are more internationalization features; bash uses gettext if
723     it is available.  The $"..." translation syntax uses the current
724     locale and gettext.
725
726 k.  There is better reporting of job termination when the shell is not
727     interactive.
728
729 l.  The shell is somewhat more efficient: it uses a little less memory and
730     makes fewer system calls.
731
732 4.  Changes of interest in the Readline implementation
733
734 a.  There is now support for readline `callback' functions.
735
736 b.  There is now support for user-supplied input, redisplay, and terminal
737     preparation functions.
738
739 c.  Most of the shell-specific code in readline has been generalized or
740     removed.
741
742 d.  Most of the annoying redisplay bugs have been fixed, notably the problems
743     with incremental search and excessive redrawing when special characters
744     appear in the prompt string.
745
746 e.  There are new library functions and variables available to application
747     writers, most having to do with completion and quoting.
748
749 f.  The NEWLINE character (^J) is now treated as a search terminator by the
750     incremental search functions.