]> git.ipfire.org Git - thirdparty/bash.git/blame - NEWS
Imported from ../bash-2.03.tar.gz.
[thirdparty/bash.git] / NEWS
CommitLineData
b72432fd
JA
1This is a terse description of the new features added to bash-2.03 since
2the release of bash-2.02. As always, the manual page (doc/bash.1) is
3the place to look for complete descriptions.
4
51. New Features in Bash
6
7a. New `shopt' option, `restricted_shell', indicating whether or not the
8 shell was started in restricted mode, for use in startup files.
9
10b. Filename generation is now performed on the words between ( and ) in
11 array assignments (which it probably should have done all along).
12
13c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
14
15d. ENV and BASH_ENV are read-only variables in a restricted shell.
16
17e. A change was made to the startup file code so that any shell begun with
18 the `--login' option, even non-interactive shells, will source the login
19 shell startup files.
20
212. New Features in Readline
22
23a. Many changes to the signal handling:
24 o Readline now catches SIGQUIT and cleans up the tty before returning;
25 o A new variable, rl_catch_signals, is available to application writers
26 to indicate to readline whether or not it should install its own
27 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
28 SIGTTIN, and SIGTTOU;
29 o A new variable, rl_catch_sigwinch, is available to application
30 writers to indicate to readline whether or not it should install its
31 own signal handler for SIGWINCH, which will chain to the calling
32 applications's SIGWINCH handler, if one is installed;
33 o There is a new function, rl_free_line_state, for application signal
34 handlers to call to free up the state associated with the current
35 line after receiving a signal;
36 o There is a new function, rl_cleanup_after_signal, to clean up the
37 display and terminal state after receiving a signal;
38 o There is a new function, rl_reset_after_signal, to reinitialize the
39 terminal and display state after an application signal handler
40 returns and readline continues
41
42b. There is a new function, rl_resize_terminal, to reset readline's idea of
43 the screen size after a SIGWINCH.
44
45c. New public functions: rl_save_prompt and rl_restore_prompt. These were
46 previously private functions with a `_' prefix.
47
48d. New function hook: rl_pre_input_hook, called just before readline starts
49 reading input, after initialization.
50
51e. New function hook: rl_display_matches_hook, called when readline would
52 display the list of completion matches. The new function
53 rl_display_match_list is what readline uses internally, and is available
54 for use by application functions called via this hook.
55
56f. New bindable function, delete-char-or-list, like tcsh.
57
58g. A new variable, rl_erase_empty_line, which, if set by an application using
59 readline, will cause readline to erase, prompt and all, lines on which the
60 only thing typed was a newline.
61
62h. New bindable variable: `isearch-terminators'.
63
64i. New bindable function: `forward-backward-delete-char' (unbound by default).
65
66-------------------------------------------------------------------------------
cce855bc
JA
67This is a terse description of the new features added to bash-2.02 since
68the release of bash-2.01.1. As always, the manual page (doc/bash.1) is
69the place to look for complete descriptions.
70
711. New Features in Bash
72
73a. A new version of malloc, based on the older GNU malloc, that has many
74 changes, is more page-based, is more conservative with memory usage,
75 and does not `orphan' large blocks when they are freed.
76
77b. A new version of gmalloc, based on the old GLIBC malloc, with many
78 changes and range checking included by default.
79
80c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic
81 Regular Expression matching, including character classes, collating
82 symbols, equivalence classes, and support for case-insensitive pattern
83 matching.
84
85d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
86 implemented, controlled by a new `shopt' option, `extglob'.
87
88e. There is a new ksh-like `[[' compound command, which implements
89 extended `test' functionality.
90
91f. There is a new `printf' builtin, implemented according to the POSIX.2
92 specification.
93
94g. There is a new feature for command substitution: $(< filename) now expands
95 to the contents of `filename', with any trailing newlines removed
96 (equivalent to $(cat filename)).
97
98h. There are new tilde prefixes which expand to directories from the
99 directory stack.
100
101i. There is a new `**' arithmetic operator to do exponentiation.
102
103j. There are new configuration options to control how bash is linked:
104 `--enable-profiling', to allow bash to be profiled with gprof, and
105 `--enable-static-link', to allow bash to be linked statically.
106
107k. There is a new configuration option, `--enable-cond-command', which
108 controls whether or not the `[[' command is included. It is on by
109 default.
110
111l. There is a new configuration option, `--enable-extended-glob', which
112 controls whether or not the ksh extended globbing feature is included.
113 It is enabled by default.
114
115m. There is a new configuration #define in config.h.top that, when enabled,
116 will cause all login shells to source /etc/profile and one of the user-
117 specific login shell startup files, whether or not the shell is
118 interactive.
119
120n. There is a new invocation option, `--dump-po-strings', to dump
121 a shell script's translatable strings ($"...") in GNU `po' format.
122
123o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
124 pattern matching when globbing filenames and using the `case' construct.
125
126p. There is a new `shopt' option, `huponexit', which, when enabled, causes
127 the shell to send SIGHUP to all jobs when an interactive login shell
128 exits.
129
130q. `bind' has a new `-u' option, which takes a readline function name as an
131 argument and unbinds all key sequences bound to that function in a
132 specified keymap.
133
134r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
135 and running jobs, respectively.
136
137s. The `shopt' `-p' option now causes output to be displayed in a reusable
138 format.
139
140t. `test' has a new `-N' option, which returns true if the filename argument
141 has been modified since it was last accessed.
142
143u. `umask' now has a `-p' option to print output in a reusable format.
144
145v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
146 translation code. It expands to the character whose ascii code is NNN
147 in hexadecimal.
148
149w. The prompt string expansion code has a new `\r' escape sequence.
150
151x. The shell may now be cross-compiled for the CYGWIN32 environment on
152 a Unix machine.
153
1542. New Features in Readline
155
156a. There is now an option for `iterative' yank-last-arg handline, so a user
157 can keep entering `M-.', yanking the last argument of successive history
158 lines.
159
160b. New variable, `print-completions-horizontally', which causes completion
161 matches to be displayed across the screen (like `ls -x') rather than up
162 and down the screen (like `ls').
163
164c. New variable, `completion-ignore-case', which causes filename completion
165 and matching to be performed case-insensitively.
166
167d. There is a new bindable command, `magic-space', which causes history
168 expansion to be performed on the current readline buffer and a space to
169 be inserted into the result.
170
171e. There is a new bindable command, `menu-complete', which enables tcsh-like
172 menu completion (successive executions of menu-complete insert a single
173 completion match, cycling through the list of possible completions).
174
175f. There is a new bindable command, `paste-from-clipboard', for use on Win32
176 systems, to insert the text from the Win32 clipboard into the editing
177 buffer.
178
179g. The key sequence translation code now understands printf-style backslash
180 escape sequences, including \NNN octal escapes. These escape sequences
181 may be used in key sequence definitions or macro values.
182
183h. An `$include' inputrc file parser directive has been added.
184
185-------------------------------------------------------------------------------
d166f048
JA
186This is a terse description of the new features added to bash-2.01 since
187the release of bash-2.0. As always, the manual page (doc/bash.1) is the
188place to look for complete descriptions.
189
1901. New Features in Bash
191
192a. There is a new builtin array variable: GROUPS, the set of groups to which
193 the user belongs. This is used by the test suite.
194
1952. New Features in Readline
196
197a. If a key sequence bound to `universal-argument' is read while reading a
198 numeric argument started with `universal-argument', it terminates the
199 argument but is otherwise ignored. This provides a way to insert multiple
200 instances of a digit string, and is how GNU emacs does it.
201
202-------------------------------------------------------------------------------
ccc6cda3
JA
203This is a terse description of the new features added to bash-2.0 since
204the release of bash-1.14.7. As always, the manual page (doc/bash.1) is
205the place to look for complete descriptions.
726f6388 206
ccc6cda3 2071. New Features in Bash
726f6388 208
ccc6cda3
JA
209a. There is a new invocation option, -D, that dumps translatable strings
210 in a script.
726f6388 211
ccc6cda3
JA
212b. The `long' invocation options must now be prefixed with `--'.
213
214c. New long invocation options: --dump-strings, --help, --verbose
215
216d. The `nolineediting' invocation option was renamed to `noediting'.
217
218e. The `nobraceexpansion' and `quiet' long invocation options were removed.
219
220f. The `--help' and `--version' long options now work as the GNU coding
221 standards specify.
222
223g. If invoked as `sh', bash now enters posix mode after reading the
224 startup files, and reads and executes commands from the file named
225 by $ENV if interactive (as POSIX.2 specifies). A login shell invoked
226 as `sh' reads $ENV after /etc/profile and ~/.profile.
227
228h. There is a new reserved word, `time', for timing pipelines, builtin
229 commands, and shell functions. It uses the value of the TIMEFORMAT
230 variable as a format string describing how to print the timing
231 statistics.
232
233i. The $'...' quoting syntax expands ANSI-C escapes in ... and leaves the
234 result single-quoted.
235
236j. The $"..." quoting syntax performs locale-specific translation of ...
237 and leaves the result double-quoted.
238
239k. LINENO now works correctly in functions.
240
241l. New variables: DIRSTACK, PIPESTATUS, BASH_VERSINFO, HOSTNAME, SHELLOPTS,
242 MACHTYPE. The first three are array variables.
243
244m. The BASH_VERSION and BASH_VERSINFO variables now include the shell's
245 `release status' (alpha[N], beta[N], release).
246
247n. Some variables have been removed: MAIL_WARNING, notify, history_control,
248 command_oriented_history, glob_dot_filenames, allow_null_glob_expansion,
249 nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and
250 cdable_vars. Most of them are now implemented with the new `shopt'
251 builtin; others were already implemented by `set'.
252
253o. Bash now uses some new variables: LC_ALL, LC_MESSAGES, LC_CTYPE,
254 LC_COLLATE, LANG, GLOBIGNORE, HISTIGNORE.
255
256p. The shell now supports integer-indexed arrays of unlimited length,
257 with a new compound assignment syntax and changes to the appropriate
258 builtin commands (declare/typeset, read, readonly, etc.). The array
259 index may be an arithmetic expression.
260
261q. ${!var}: indirect variable expansion, equivalent to eval \${$var}.
262
263r. ${paramter:offset[:length]}: variable substring extraction.
264
265s. ${parameter/pattern[/[/]string]}: variable pattern substitution.
266
267t. The $[...] arithmetic expansion syntax is no longer supported, in
268 favor of $((...)).
269
270u. Aliases can now be expanded in shell scripts with a shell option
271 (shopt expand_aliases).
272
273v. History and history expansion can now be used in scripts with
274 set -o history and set -H.
275
276w. All builtins now return an exit status of 2 for incorrect usage.
277
278x. Interactive shells resend SIGHUP to all running or stopped children
279 if (and only if) they exit due to a SIGHUP.
280
281y. New prompting expansions: \a, \e, \H, \T, \@, \v, \V.
282
283z. Variable expansion in prompt strings is now controllable via a shell
284 option (shopt promptvars).
285
286aa. Bash now defaults to using command-oriented history.
287
288bb. The history file ($HISTFILE) is now truncated to $HISTFILESIZE after
289 being written.
290
291cc. The POSIX.2 conditional arithmetic evaluation syntax (expr ? expr : expr)
292 has been implemented.
293
294dd. Each builtin now accepts `--' to signify the end of the options, except
295 as documented (echo, etc.).
296
297ee. All builtins use -p to display values in a re-readable format where
298 appropriate, except as documented (echo, type, etc.).
299
300ff. The `alias' builtin has a new -p option.
301
302gg. Changes to the `bind' builtin:
303 o has new options: -psPSVr.
304 o the `-d' option was renamed to `-p'
305 o the `-v' option now dumps variables; the old `-v' is now `-P'
306
307hh. The `bye' synonym for `exit' was removed.
308
309ii. The -L and -P options to `cd' and `pwd' have been documented.
310
311jj. The `cd' builtin now does spelling correction on the directory name
312 by default. This is settable with a shell option (shopt cdspell).
313
314kk. The `declare' builtin has new options: -a, -F, -p.
315
316ll. The `dirs' builtin has new options: -c, -p, -v.
317
318mm. The new `disown' builtin removes jobs from the shell's jobs table
319 or inhibits the resending of SIGHUP when the shell receives a
320 SIGHUP.
321
322nn. The `echo' builtin has a new escape character: \e.
323
324oo. The `enable' builtin can now load new builtins dynamically from shared
325 objects on systems with the dlopen/dlsym interface. There are a number
326 of examples in the examples/loadables directory. There are also
327 new options: -d, -f, -s, -p.
328
329pp. The `-all' option to `enable' was removed in favor of `-a'.
330
331qq. The `exec' builtin has new options: -l, -c, -a.
332
333rr. The `hash' builtin has a new option: -p.
334
335ss. The `history' builtin has new options: -c, -p, -s.
336
337tt. The `jobs' builtin has new options: -r, -s.
338
339uu. The `kill' builtin has new options: -n signum, -l signame.
340
341vv. The `pushd' and `popd' builtins have a new option: -n.
342
343ww. The `read' builtin has new options: -p prompt, -e, -a.
344
345xx. The `readonly' builtin has a new -a option, and the -n option was removed.
346
347yy. Changes to the `set' builtin:
348 o new options: -B, -o keyword, -o onecmd, -o history
349 o options removed: -l, -d, -o nohash
350 o options changed: +o, -h, -o hashall
351 o now displays variables in a format that can be re-read as input
352
353zz. The new `shopt' builtin controls shell optional behavior previously
354 done by setting and unsetting certain shell variables.
355
356aaa. The `test' builtin has new operators: -o option, s1 == s2, s1 < s2,
357 and s1 > s2, where s1 and s2 are strings.
358
359bbb. There is a new trap, DEBUG, executed after every simple command.
360
361ccc. The `trap' builtin has a new -p option.
362
363ddd. The `ulimit' builtin has a new -l option on 4.4BSD-based systems.
364
365eee. The PS1, PS2, PATH, and IFS variables may now be unset.
366
367fff. The restricted shell mode has been expanded and is now documented.
368
369ggg. Security improvements:
370 o functions are not imported from the environment if running setuid
371 or with -p
372 o no startup files are sourced if running setuid or with -p
373
374hhh. The documentation has been overhauled: the texinfo manual was
375 expanded, and HTML versions of the man page and texinfo manual
376 are included.
377
378iii. Changes to Posix mode:
379 o Command lookup now finds special builtins before shell functions.
380 o Failure of a special builtin causes a non-interactive shell to
381 exit. Failures are defined in the POSIX.2 specification.
382 o If the `cd' builtin finds a directory to change to using $CDPATH,
383 the value assigned to PWD when `cd' completes does not contain
384 any symbolic links.
385 o A non-interactive shell exits if a variable assignment error
386 occurs when no command name follows the assignment statements.
387 o A non-interactive shell exits if the interation variable in a
388 `for' statement or the selection variable in a `select' statement
389 is read-only or another variable assignment error occurs.
390 o The `<>' redirection operator now opens a file for both stdin and
391 stdout by default, not just when in posix mode.
392 o Assignment statements preceding special builtins now persist in
393 the shell's environment when the builtin completes.
394
395 Posix mode is now completely POSIX.2-compliant (modulo bugs). When
396 invoked as sh, bash should be completely POSIX.2-compliant.
397
398jjj. The default value of PS1 is now "\s-\v\$ ".
399
400kkk. The ksh-like ((...)) arithmetic command syntax has been implemented.
401 This is exactly equivalent to `let "..."'.
402
403lll. Integer constants have been extended to base 64.
404
405mmm. The `ulimit' builtin now sets both hard and soft limits and reports the
406 soft limit by default.
407
4082. New Features in Readline
409
410a. New variables: enable-keypad, input-meta (new name for meta-flag),
411 mark-directories, visible-stats (now documented), disable-completion,
412 comment-begin.
413
414b. New bindable commands: kill-region, copy-region-as-kill,
415 copy-backward-word, copy-forward-word, set-mark, exchange-point-and-mark,
416 character-search, character-search-backward, insert-comment,
417 glob-expand-word, glob-list-expansions, dump-variables, dump-macros.
418
419c. New emacs keybindings: delete-horizontal-space (M-\),
420 insert-completions (M-*), possible-completions (M-=).
421
422d. The history-search-backward and history-search-forward commands were
423 modified to be the same as previous-line and next-line if point is at
424 the start of the line.
425
426e. More file types are available for the visible-stats mode.
427
4283. Changes of interest in the Bash implementation
429
430a. There is a new autoconf-based configuration mechanism.
431
432b. More things have been moved from Posix mode to standard shell behavior.
433
434c. The trace output (set -x) now inserts quotes where necessary so it can
435 be reused as input.
436
437d. There is a compile-time option for a system-wide interactive shell
438 startup file (disabled by default).
439
440e. The YACC grammar is smaller and tighter, and all 66 shift-reduce
441 conflicts are gone. Several parsing bugs have been fixed.
442
443f. Builtin option parsing has been regularized (using internal_getopt()),
444 with the exception of `echo', `type', and `set'.
445
446g. Builtins now return standard usage messages constructed from the
447 `short doc' used by the help builtin.
448
449h. Completion now quotes using backslashes by default, but honors
450 user-supplied quotes.
451
452i. The GNU libc malloc is available as a configure-time option.
453
454j. There are more internationalization features; bash uses gettext if
455 it is available. The $"..." translation syntax uses the current
456 locale and gettext.
457
458k. There is better reporting of job termination when the shell is not
459 interactive.
460
461l. The shell is somewhat more efficient: it uses a little less memory and
462 makes fewer system calls.
463
4644. Changes of interest in the Readline implementation
465
466a. There is now support for readline `callback' functions.
467
468b. There is now support for user-supplied input, redisplay, and terminal
469 preparation functions.
470
471c. Most of the shell-specific code in readline has been generalized or
472 removed.
473
474d. Most of the annoying redisplay bugs have been fixed, notably the problems
475 with incremental search and excessive redrawing when special characters
476 appear in the prompt string.
477
478e. There are new library functions and variables available to application
479 writers, most having to do with completion and quoting.
480
481f. The NEWLINE character (^J) is now treated as a search terminator by the
482 incremental search functions.