]>
Commit | Line | Data |
---|---|---|
b80f6443 JA |
1 | This is a terse description of the new features added to bash-3.0 since |
2 | the release of bash-2.05b. 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. ANSI string expansion now implements the \x{hexdigits} escape. | |
8 | ||
9 | b. There is a new loadable `strftime' builtin. | |
10 | ||
11 | c. New variable, COMP_WORDBREAKS, which controls the readline completer's | |
12 | idea of word break characters. | |
13 | ||
14 | d. The `type' builtin no longer reports on aliases unless alias expansion | |
15 | will actually be performed. | |
16 | ||
17 | e. HISTCONTROL is now a colon-separated list of values, which permits | |
18 | more extensibility and backwards compatibility. | |
19 | ||
20 | f. HISTCONTROL may now include the `erasedups' option, which causes all lines | |
21 | matching a line being added to be removed from the history list. | |
22 | ||
23 | g. `configure' has a new `--enable-multibyte' argument that permits multibyte | |
24 | character support to be disabled even on systems that support it. | |
25 | ||
26 | h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV, | |
27 | BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING, | |
28 | BASH_COMMAND | |
29 | ||
30 | i. FUNCNAME has been changed to support the debugger: it's now an array | |
31 | variable. | |
32 | ||
33 | j. for, case, select, arithmetic commands now keep line number information | |
34 | for the debugger. | |
35 | ||
36 | k. There is a new `RETURN' trap executed when a function or sourced script | |
37 | returns (not inherited child processes; inherited by command substitution | |
38 | if function tracing is enabled and the debugger is active). | |
39 | ||
40 | l. New invocation option: --debugger. Enables debugging and turns on new | |
41 | `extdebug' shell option. | |
42 | ||
43 | m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR | |
44 | traps, respectively, to be inherited by shell functions. Equivalent to | |
45 | `set -T' and `set -E' respectively. The `functrace' option also controls | |
46 | whether or not the DEBUG trap is inherited by sourced scripts. | |
47 | ||
48 | n. The DEBUG trap is run before binding the variable and running the action | |
49 | list in a `for' command, binding the selection variable and running the | |
50 | query in a `select' command, and before attempting a match in a `case' | |
51 | command. | |
52 | ||
53 | o. New `--enable-debugger' option to `configure' to compile in the debugger | |
54 | support code. | |
55 | ||
56 | p. `declare -F' now prints out extra line number and source file information | |
57 | if the `extdebug' option is set. | |
58 | ||
59 | q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes | |
60 | the next command to be skipped, and a return value of 2 while in a | |
61 | function or sourced script forces a `return'. | |
62 | ||
63 | r. New `caller' builtin to provide a call stack for the bash debugger. | |
64 | ||
65 | s. The DEBUG trap is run just before the first command in a function body is | |
66 | executed, for the debugger. | |
67 | ||
68 | t. `for', `select', and `case' command heads are printed when `set -x' is | |
69 | enabled. | |
70 | ||
71 | u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1, | |
72 | x+2,...,y}. x and y can be integers or single characters; the sequence | |
73 | may ascend or descend; the increment is always 1. | |
74 | ||
75 | v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices) | |
76 | of array. | |
77 | ||
78 | w. New `force_fignore' shopt option; if enabled, suffixes specified by | |
79 | FIGNORE cause words to be ignored when performing word completion even | |
80 | if they're the only possibilities. | |
81 | ||
82 | x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu | |
83 | style' (filename:lineno:message) format. | |
84 | ||
85 | y. New `-o bashdefault' option to complete and compgen; if set, causes the | |
86 | whole set of bash completions to be performed if the compspec doesn't | |
87 | result in a match. | |
88 | ||
89 | z. New `-o plusdirs' option to complete and compgen; if set, causes directory | |
90 | name completion to be performed and the results added to the rest of the | |
91 | possible completions. | |
92 | ||
93 | aa. `kill' is available as a builtin even when the shell is built without | |
94 | job control. | |
95 | ||
96 | bb. New HISTTIMEFORMAT variable; value is a format string to pass to | |
97 | strftime(3). If set and not null, the `history' builtin prints out | |
98 | timestamp information according to the specified format when displaying | |
99 | history entries. If set, bash tells the history library to write out | |
100 | timestamp information when the history file is written. | |
101 | ||
102 | cc. The [[ ... ]] command has a new binary `=~' operator that performs | |
103 | extended regular expression (egrep-like) matching. | |
104 | ||
105 | dd. `configure' has a new `--enable-cond-regexp' option (enabled by default) | |
106 | to enable the =~ operator and regexp matching in [[ ... ]]. | |
107 | ||
108 | ee. Subexpressions matched by the =~ operator are placed in the new | |
109 | BASH_REMATCH array variable. | |
110 | ||
111 | ff. New `failglob' option that causes an expansion error when pathname | |
112 | expansion fails to produce a match. | |
113 | ||
114 | gg. New `set -o pipefail' option that causes a pipeline to return a failure | |
115 | status if any of the processes in the pipeline fail, not just the last | |
116 | one. | |
117 | ||
118 | hh. printf builtin understands two new escape sequences: \" and \?. | |
119 | ||
120 | ii. `echo -e' understands two new escape sequences: \" and \?. | |
121 | ||
122 | jj. The GNU `gettext' package and libintl have been integrated; the shell's | |
123 | messages can be translated into different languages. | |
124 | ||
125 | kk. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'. | |
126 | ||
127 | ll. The error message printed when bash cannot open a shell script supplied | |
128 | as argument 1 now includes the name of the shell, to better identify | |
129 | the error as coming from bash. | |
130 | ||
131 | mm. The parameter pattern removal and substitution expansions are now much | |
132 | faster and more efficient when using multibyte characters. | |
133 | ||
134 | nn. The `jobs', `kill', and `wait' builtins now accept job control notation | |
135 | even if job control is not enabled. | |
136 | ||
137 | oo. The historical behavior of `trap' that allows a missing `action' argument | |
138 | to cause each specified signal's handling to be reset to its default is | |
139 | now only supported when `trap' is given a single non-option argument. | |
140 | ||
141 | 2. New Features in Readline | |
142 | ||
143 | a. History expansion has a new `a' modifier equivalent to the `g' modifier | |
144 | for compatibility with the BSD csh. | |
145 | ||
146 | b. History expansion has a new `G' modifier equivalent to the BSD csh `g' | |
147 | modifier, which performs a substitution once per word. | |
148 | ||
149 | c. All non-incremental search operations may now undo the operation of | |
150 | replacing the current line with the history line. | |
151 | ||
152 | d. The text inserted by an `a' command in vi mode can be reinserted with | |
153 | `.'. | |
154 | ||
155 | e. New bindable variable, `show-all-if-unmodified'. If set, the readline | |
156 | completer will list possible completions immediately if there is more | |
157 | than one completion and partial completion cannot be performed. | |
158 | ||
159 | f. There is a new application-callable `free_history_entry()' function. | |
160 | ||
161 | g. History list entries now contain timestamp information; the history file | |
162 | functions know how to read and write timestamp information associated | |
163 | with each entry. | |
164 | ||
165 | h. Four new key binding functions have been added: | |
166 | ||
167 | rl_bind_key_if_unbound() | |
168 | rl_bind_key_if_unbound_in_map() | |
169 | rl_bind_keyseq_if_unbound() | |
170 | rl_bind_keyseq_if_unbound_in_map() | |
171 | ||
172 | i. New application variable, rl_completion_quote_character, set to any | |
173 | quote character readline finds before it calls the application completion | |
174 | function. | |
175 | ||
176 | j. New application variable, rl_completion_suppress_quote, settable by an | |
177 | application completion function. If set to non-zero, readline does not | |
178 | attempt to append a closing quote to a completed word. | |
179 | ||
180 | k. New application variable, rl_completion_found_quote, set to a non-zero | |
181 | value if readline determines that the word to be completed is quoted. | |
182 | Set before readline calls any application completion function. | |
183 | ||
184 | l. New function hook, rl_completion_word_break_hook, called when readline | |
185 | needs to break a line into words when completion is attempted. Allows | |
186 | the word break characters to vary based on position in the line. | |
187 | ||
188 | m. New bindable command: unix-filename-rubout. Does the same thing as | |
189 | unix-word-rubout, but adds `/' to the set of word delimiters. | |
190 | ||
191 | n. When listing completions, directories have a `/' appended if the | |
192 | `mark-directories' option has been enabled. | |
193 | ||
194 | ------------------------------------------------------------------------------- | |
7117c2d2 JA |
195 | This is a terse description of the new features added to bash-2.05b since |
196 | the release of bash-2.05a. As always, the manual page (doc/bash.1) is | |
197 | the place to look for complete descriptions. | |
198 | ||
199 | 1. New Features in Bash | |
200 | ||
201 | a. If set, TMOUT is the default timeout for the `read' builtin. | |
202 | ||
203 | b. `type' has two new options: `-f' suppresses shell function lookup, and | |
204 | `-P' forces a $PATH search. | |
205 | ||
206 | c. New code to handle multibyte characters. | |
207 | ||
208 | d. `select' was changed to be more ksh-compatible, in that the menu is | |
209 | reprinted each time through the loop only if REPLY is set to NULL. | |
210 | The previous behavior is available as a compile-time option. | |
211 | ||
212 | e. `complete -d' and `complete -o dirnames' now force a slash to be | |
213 | appended to names which are symlinks to directories. | |
214 | ||
215 | f. There is now a bindable edit-and-execute-command readline command, | |
216 | like the vi-mode `v' command, bound to C-xC-e in emacs mode. | |
217 | ||
218 | g. Added support for ksh93-like [:word:] character class in pattern matching. | |
219 | ||
220 | h. The $'...' quoting construct now expands \cX to Control-X. | |
221 | ||
222 | i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts | |
223 | the result into the expanded prompt. | |
224 | ||
225 | j. The shell now performs arithmetic in the largest integer size the | |
226 | machine supports (intmax_t), instead of long. | |
227 | ||
228 | k. If a numeric argument is supplied to one of the bash globbing completion | |
229 | functions, a `*' is appended to the word before expansion is attempted. | |
230 | ||
231 | l. The bash globbing completion functions now allow completions to be listed | |
232 | with double tabs or if `show-all-if-ambiguous' is set. | |
233 | ||
234 | m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses | |
235 | readline's appending a space to the completed word. | |
236 | ||
237 | n. New `here-string' redirection operator: <<< word. | |
238 | ||
239 | o. When displaying variables, function attributes and definitions are shown | |
240 | separately, allowing them to be re-used as input (attempting to re-use | |
241 | the old output would result in syntax errors). | |
242 | ||
243 | p. There is a new configuration option `--enable-mem-scramble', controls | |
244 | bash malloc behavior of writing garbage characters into memory at | |
245 | allocation and free time. | |
246 | ||
247 | q. The `complete' and `compgen' builtins now have a new `-s/-A service' | |
248 | option to complete on names from /etc/services. | |
249 | ||
250 | r. `read' has a new `-u fd' option to read from a specified file descriptor. | |
251 | ||
252 | s. Fix the completion code so that expansion errors in a directory name | |
253 | don't cause a longjmp back to the command loop. | |
254 | ||
255 | t. Fixed word completion inside command substitution to work a little more | |
256 | intuitively. | |
257 | ||
258 | u. The `printf' %q format specifier now uses $'...' quoting to print the | |
259 | argument if it contains non-printing characters. | |
260 | ||
261 | v. The `declare' and `typeset' builtins have a new `-t' option. When applied | |
262 | to functions, it causes the DEBUG trap to be inherited by the named | |
263 | function. Currently has no effect on variables. | |
264 | ||
265 | w. The DEBUG trap is now run *before* simple commands, ((...)) commands, | |
266 | [[...]] conditional commands, and for ((...)) loops. | |
267 | ||
268 | x. The expansion of $LINENO inside a shell function is only relative to the | |
269 | function start if the shell is interactive -- if the shell is running a | |
270 | script, $LINENO expands to the line number in the script. This is as | |
271 | POSIX-2001 requires. | |
272 | ||
273 | y. The bash debugger in examples/bashdb has been modified to work with the | |
274 | new DEBUG trap semantics, the command set has been made more gdb-like, | |
275 | and the changes to $LINENO make debugging functions work better. Code | |
276 | from Gary Vaughan. | |
277 | ||
278 | z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup | |
279 | and close). | |
280 | ||
281 | aa. There is a new `-l' invocation option, equivalent to `--login'. | |
282 | ||
283 | bb. The `hash' builtin has a new `-l' option to list contents in a reusable | |
284 | format, and a `-d' option to remove a name from the hash table. | |
285 | ||
286 | cc. There is now support for placing the long help text into separate files | |
287 | installed into ${datadir}/bash. Not enabled by default; can be turned | |
288 | on with `--enable-separate-helpfiles' option to configure. | |
289 | ||
290 | dd. All builtins that take operands accept a `--' pseudo-option, except | |
291 | `echo'. | |
292 | ||
293 | ee. The `echo' builtin now accepts \0xxx (zero to three octal digits following | |
294 | the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/ | |
295 | POSIX.1-2001 compliance. | |
296 | ||
297 | ||
298 | 2. New Features in Readline | |
299 | ||
300 | a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both | |
301 | be bound to readline functions. Now the arrow keys may be used in vi | |
302 | insert mode. | |
303 | ||
304 | b. When listing completions, and the number of lines displayed is more than | |
305 | the screen length, readline uses an internal pager to display the results. | |
306 | This is controlled by the `page-completions' variable (default on). | |
307 | ||
308 | c. New code to handle editing and displaying multibyte characters. | |
309 | ||
310 | d. The behavior introduced in bash-2.05a of deciding whether or not to | |
311 | append a slash to a completed name that is a symlink to a directory has | |
312 | been made optional, controlled by the `mark-symlinked-directories' | |
313 | variable (default is the 2.05a behavior). | |
314 | ||
315 | e. The `insert-comment' command now acts as a toggle if given a numeric | |
316 | argument: if the first characters on the line don't specify a | |
317 | comment, insert one; if they do, delete the comment text | |
318 | ||
319 | f. New application-settable completion variable: | |
320 | rl_completion_mark_symlink_dirs, allows an application's completion | |
321 | function to temporarily override the user's preference for appending | |
322 | slashes to names which are symlinks to directories. | |
323 | ||
324 | g. New function available to application completion functions: | |
325 | rl_completion_mode, to tell how the completion function was invoked | |
326 | and decide which argument to supply to rl_complete_internal (to list | |
327 | completions, etc.). | |
328 | ||
329 | h. Readline now has an overwrite mode, toggled by the `overwrite-mode' | |
330 | bindable command, which could be bound to `Insert'. | |
331 | ||
332 | i. New application-settable completion variable: | |
333 | rl_completion_suppress_append, inhibits appending of | |
334 | rl_completion_append_character to completed words. | |
335 | ||
336 | j. New key bindings when reading an incremental search string: ^W yanks | |
337 | the currently-matched word out of the current line into the search | |
338 | string; ^Y yanks the rest of the current line into the search string, | |
339 | DEL or ^H deletes characters from the search string. | |
340 | ||
341 | ------------------------------------------------------------------------------- | |
f73dda09 JA |
342 | This is a terse description of the new features added to bash-2.05a since |
343 | the release of bash-2.05. As always, the manual page (doc/bash.1) is | |
344 | the place to look for complete descriptions. | |
345 | ||
346 | 1. New Features in Bash | |
347 | ||
348 | a. Added support for DESTDIR installation root prefix, so you can do a | |
349 | `make install DESTDIR=bash-root' and do easier binary packaging. | |
350 | ||
351 | b. Added support for builtin printf "'" flag character as per latest POSIX | |
352 | drafts. | |
353 | ||
354 | c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from | |
355 | ISO C99). | |
356 | ||
357 | d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications | |
358 | (bash doesn't use very much of what it returns). | |
359 | ||
360 | e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts, | |
361 | but ignored. | |
362 | ||
363 | f. New read-only `shopt' option: login_shell. Set to non-zero value if the | |
364 | shell is a login shell. | |
365 | ||
366 | g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format. | |
367 | ||
368 | h. New `-A group/-g' option to complete and compgen; does group name | |
369 | completion. | |
370 | ||
371 | i. New `-t' option to `hash' to list hash values for each filename argument. | |
372 | ||
373 | j. New [-+]O invocation option to set and unset `shopt' options at startup. | |
374 | ||
375 | k. configure's `--with-installed-readline' option now takes an optional | |
376 | `=PATH' suffix to set the root of the tree where readline is installed | |
377 | to PATH. | |
378 | ||
379 | l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run | |
380 | whenever the shell would have exited if the -e option were enabled. | |
381 | It is not inherited by shell functions. | |
382 | ||
383 | m. `readonly', `export', and `declare' now print variables which have been | |
384 | given attributes but not set by assigning a value as just a command and | |
385 | a variable name (like `export foo') when listing, as the latest POSIX | |
386 | drafts require. | |
387 | ||
388 | n. `bashbug' now requires that the subject be changed from the default. | |
389 | ||
390 | o. configure has a new `--enable-largefile' option, like other GNU utilities. | |
391 | ||
392 | p. `for' loops now allow empty word lists after `in', like the latest POSIX | |
393 | drafts require. | |
394 | ||
395 | q. The builtin `ulimit' now takes two new non-numeric arguments: `hard', | |
396 | meaning the current hard limit, and `soft', meaning the current soft | |
397 | limit, in addition to `unlimited' | |
398 | ||
399 | r. `ulimit' now prints the option letter associated with a particular | |
400 | resource when printing more than one limit. | |
401 | ||
402 | s. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is | |
403 | one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively. | |
404 | ||
405 | t. The `printf' builtin now handles the %a and %A conversions if they're | |
406 | implemented by printf(3). | |
407 | ||
408 | u. The `printf' builtin now handles the %F conversion (just about like %f). | |
409 | ||
410 | v. The `printf' builtin now handles the %n conversion like printf(3). The | |
411 | corresponding argument is the name of a shell variable to which the | |
412 | value is assigned. | |
413 | ||
414 | 2. New Features in Readline | |
415 | ||
416 | a. Added extern declaration for rl_get_termcap to readline.h, making it a | |
417 | public function (it was always there, just not in readline.h). | |
418 | ||
419 | b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402, | |
420 | RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2. | |
421 | ||
422 | c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION. | |
423 | ||
424 | d. New bindable boolean readline variable: match-hidden-files. Controls | |
425 | completion of files beginning with a `.' (on Unix). Enabled by default. | |
426 | ||
427 | e. The history expansion code now allows any character to terminate a | |
428 | `:first-' modifier, like csh. | |
429 | ||
430 | f. New bindable variable `history-preserve-point'. If set, the history | |
431 | code attempts to place the user at the same location on each history | |
432 | line retrived with previous-history or next-history. | |
433 | ||
434 | ------------------------------------------------------------------------------- | |
28ef6c31 JA |
435 | This is a terse description of the new features added to bash-2.05 since |
436 | the release of bash-2.04. As always, the manual page (doc/bash.1) is | |
437 | the place to look for complete descriptions. | |
438 | ||
439 | 1. New Features in Bash | |
440 | ||
441 | a. Added a new `--init-file' invocation argument as a synonym for `--rcfile', | |
442 | per the new GNU coding standards. | |
443 | ||
444 | b. The /dev/tcp and /dev/udp redirections now accept service names as well as | |
445 | port numbers. | |
446 | ||
447 | c. `complete' and `compgen' now take a `-o value' option, which controls some | |
448 | of the aspects of that compspec. Valid values are: | |
449 | ||
450 | default - perform bash default completion if programmable | |
451 | completion produces no matches | |
452 | dirnames - perform directory name completion if programmable | |
453 | completion produces no matches | |
454 | filenames - tell readline that the compspec produces filenames, | |
455 | so it can do things like append slashes to | |
456 | directory names and suppress trailing spaces | |
457 | ||
458 | d. A new loadable builtin, realpath, which canonicalizes and expands symlinks | |
459 | in pathname arguments. | |
460 | ||
461 | e. When `set' is called without options, it prints function defintions in a | |
462 | way that allows them to be reused as input. This affects `declare' and | |
463 | `declare -p' as well. This only happens when the shell is not in POSIX | |
464 | mode, since POSIX.2 forbids this behavior. | |
465 | ||
466 | f. Bash-2.05 once again honors the current locale setting when processing | |
467 | ranges within pattern matching bracket expressions (e.g., [A-Z]). | |
468 | ||
469 | 2. New Features in Readline | |
470 | ||
471 | a. The blink timeout for paren matching is now settable by applications, | |
472 | via the rl_set_paren_blink_timeout() function. | |
473 | ||
474 | b. _rl_executing_macro has been renamed to rl_executing_macro, which means | |
475 | it's now part of the public interface. | |
476 | ||
477 | c. Readline has a new variable, rl_readline_state, which is a bitmap that | |
478 | encapsulates the current state of the library; intended for use by | |
479 | callbacks and hook functions. | |
480 | ||
481 | d. New application-callable function rl_set_prompt(const char *prompt): | |
482 | expands its prompt string argument and sets rl_prompt to the result. | |
483 | ||
484 | e. New application-callable function rl_set_screen_size(int rows, int cols): | |
485 | public method for applications to set readline's idea of the screen | |
486 | dimensions. | |
487 | ||
488 | f. New function, rl_get_screen_size (int *rows, int *columns), returns | |
489 | readline's idea of the screen dimensions. | |
490 | ||
491 | g. The timeout in rl_gather_tyi (readline keyboard input polling function) | |
492 | is now settable via a function (rl_set_keyboard_input_timeout()). | |
493 | ||
494 | h. Renamed the max_input_history variable to history_max_entries; the old | |
495 | variable is maintained for backwards compatibility. | |
496 | ||
497 | i. The list of characters that separate words for the history tokenizer is | |
498 | now settable with a variable: history_word_delimiters. The default | |
499 | value is as before. | |
500 | ||
501 | ------------------------------------------------------------------------------- | |
bb70624e JA |
502 | This is a terse description of the new features added to bash-2.04 since |
503 | the release of bash-2.03. As always, the manual page (doc/bash.1) is | |
504 | the place to look for complete descriptions. | |
505 | ||
506 | 1. New Features in Bash | |
507 | ||
508 | a. The history builtin has a `-d offset' option to delete the history entry | |
509 | at position `offset'. | |
510 | ||
511 | b. The prompt expansion code has two new escape sequences: \j, the number of | |
512 | active jobs; and \l, the basename of the shell's tty device name. | |
513 | ||
514 | c. The `bind' builtin has a new `-x' option to bind key sequences to shell | |
515 | commands. | |
516 | ||
517 | d. There is a new shell option, no_empty_command_completion, which, when | |
518 | enabled, disables command completion when TAB is typed on an empty line. | |
519 | ||
520 | e. The `help' builtin has a `-s' option to just print a builtin's usage | |
521 | synopsis. | |
522 | ||
523 | f. There are several new arithmetic operators: id++, id-- (variable | |
f73dda09 | 524 | post-increment/decrement), ++id, --id (variable pre-increment/decrement), |
bb70624e JA |
525 | expr1 , expr2 (comma operator). |
526 | ||
527 | g. There is a new ksh-93 style arithmetic for command: | |
528 | for ((expr1 ; expr2; expr3 )); do list; done | |
529 | ||
530 | h. The `read' builtin has a number of new options: | |
531 | -t timeout only wait timeout seconds for input | |
532 | -n nchars only read nchars from input instead of a full line | |
533 | -d delim read until delim rather than newline | |
534 | -s don't echo input chars as they are read | |
535 | ||
536 | i. The redirection code now handles several filenames specially: | |
537 | /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or | |
538 | not they are present in the file system. | |
539 | ||
540 | j. The redirection code now recognizes pathnames of the form | |
541 | /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket | |
542 | of the appropriate type to the specified port on the specified host. | |
543 | ||
544 | k. The ksh-93 ${!prefix*} expansion, which expands to the names of all | |
545 | shell variables with prefix PREFIX, has been implemented. | |
546 | ||
547 | l. There is a new dynamic variable, FUNCNAME, which expands to the name of | |
548 | a currently-executing function. Assignments to FUNCNAME have no effect. | |
549 | ||
550 | m. The GROUPS variable is no longer readonly; assignments to it are silently | |
551 | discarded. This means it can be unset. | |
552 | ||
553 | n. A new programmable completion facility, with two new builtin commands: | |
554 | complete and compgen. | |
555 | ||
556 | o. configure has a new option, `--enable-progcomp', to compile in the | |
557 | programmable completion features (enabled by default). | |
558 | ||
559 | p. `shopt' has a new option, `progcomp', to enable and disable programmable | |
560 | completion at runtime. | |
561 | ||
562 | q. Unsetting HOSTFILE now clears the list of hostnames used for completion. | |
563 | ||
564 | r. configure has a new option, `--enable-bash-malloc', replacing the old | |
565 | `--with-gnu-malloc' (which is still present for backwards compatibility). | |
566 | ||
567 | s. There is a new manual page describing rbash, the restricted shell. | |
568 | ||
569 | t. `bashbug' has new `--help' and `--version' options. | |
570 | ||
571 | u. `shopt' has a new `xpg_echo' option, which controls the behavior of | |
572 | `echo' with respect to backslash-escaped characters at runtime. | |
573 | ||
574 | v. If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the | |
575 | startup files, even if they are not interactive. | |
576 | ||
577 | w. The LC_NUMERIC variable is now treated specially, and used to set the | |
578 | LC_NUMERIC locale category for number formatting, e.g., when `printf' | |
579 | displays floating-point numbers. | |
580 | ||
581 | 2. New features in Readline | |
582 | ||
583 | a. Parentheses matching is now always compiled into readline, and enabled | |
584 | or disabled when the value of the `blink-matching-paren' variable is | |
585 | changed. | |
586 | ||
587 | b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename. | |
588 | ||
589 | c. MS-DOS systems now use ~/_history as the default history file. | |
590 | ||
591 | d. history-search-{forward,backward} now leave the point at the end of the | |
592 | line when the string to search for is empty, like | |
593 | {reverse,forward}-search-history. | |
594 | ||
595 | e. history-search-{forward,backward} now leave the last history line found | |
596 | in the readline buffer if the second or subsequent search fails. | |
597 | ||
598 | f. New function for use by applications: rl_on_new_line_with_prompt, used | |
599 | when an application displays the prompt itself before calling readline(). | |
600 | ||
601 | g. New variable for use by applications: rl_already_prompted. An application | |
602 | that displays the prompt itself before calling readline() must set this to | |
603 | a non-zero value. | |
604 | ||
605 | h. A new variable, rl_gnu_readline_p, always 1. The intent is that an | |
606 | application can verify whether or not it is linked with the `real' | |
607 | readline library or some substitute. | |
608 | ||
609 | ------------------------------------------------------------------------------- | |
b72432fd JA |
610 | This is a terse description of the new features added to bash-2.03 since |
611 | the release of bash-2.02. As always, the manual page (doc/bash.1) is | |
612 | the place to look for complete descriptions. | |
613 | ||
614 | 1. New Features in Bash | |
615 | ||
616 | a. New `shopt' option, `restricted_shell', indicating whether or not the | |
617 | shell was started in restricted mode, for use in startup files. | |
618 | ||
619 | b. Filename generation is now performed on the words between ( and ) in | |
620 | array assignments (which it probably should have done all along). | |
621 | ||
622 | c. OLDPWD is now auto-exported, as POSIX.2 seems to require. | |
623 | ||
624 | d. ENV and BASH_ENV are read-only variables in a restricted shell. | |
625 | ||
626 | e. A change was made to the startup file code so that any shell begun with | |
627 | the `--login' option, even non-interactive shells, will source the login | |
628 | shell startup files. | |
629 | ||
630 | 2. New Features in Readline | |
631 | ||
632 | a. Many changes to the signal handling: | |
633 | o Readline now catches SIGQUIT and cleans up the tty before returning; | |
634 | o A new variable, rl_catch_signals, is available to application writers | |
635 | to indicate to readline whether or not it should install its own | |
636 | signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, | |
637 | SIGTTIN, and SIGTTOU; | |
638 | o A new variable, rl_catch_sigwinch, is available to application | |
639 | writers to indicate to readline whether or not it should install its | |
640 | own signal handler for SIGWINCH, which will chain to the calling | |
641 | applications's SIGWINCH handler, if one is installed; | |
642 | o There is a new function, rl_free_line_state, for application signal | |
643 | handlers to call to free up the state associated with the current | |
644 | line after receiving a signal; | |
645 | o There is a new function, rl_cleanup_after_signal, to clean up the | |
646 | display and terminal state after receiving a signal; | |
647 | o There is a new function, rl_reset_after_signal, to reinitialize the | |
648 | terminal and display state after an application signal handler | |
649 | returns and readline continues | |
650 | ||
651 | b. There is a new function, rl_resize_terminal, to reset readline's idea of | |
652 | the screen size after a SIGWINCH. | |
653 | ||
654 | c. New public functions: rl_save_prompt and rl_restore_prompt. These were | |
655 | previously private functions with a `_' prefix. | |
656 | ||
657 | d. New function hook: rl_pre_input_hook, called just before readline starts | |
658 | reading input, after initialization. | |
659 | ||
660 | e. New function hook: rl_display_matches_hook, called when readline would | |
661 | display the list of completion matches. The new function | |
662 | rl_display_match_list is what readline uses internally, and is available | |
663 | for use by application functions called via this hook. | |
664 | ||
665 | f. New bindable function, delete-char-or-list, like tcsh. | |
666 | ||
667 | g. A new variable, rl_erase_empty_line, which, if set by an application using | |
668 | readline, will cause readline to erase, prompt and all, lines on which the | |
669 | only thing typed was a newline. | |
670 | ||
671 | h. New bindable variable: `isearch-terminators'. | |
672 | ||
673 | i. New bindable function: `forward-backward-delete-char' (unbound by default). | |
674 | ||
675 | ------------------------------------------------------------------------------- | |
cce855bc JA |
676 | This is a terse description of the new features added to bash-2.02 since |
677 | the release of bash-2.01.1. As always, the manual page (doc/bash.1) is | |
678 | the place to look for complete descriptions. | |
679 | ||
680 | 1. New Features in Bash | |
681 | ||
682 | a. A new version of malloc, based on the older GNU malloc, that has many | |
683 | changes, is more page-based, is more conservative with memory usage, | |
684 | and does not `orphan' large blocks when they are freed. | |
685 | ||
686 | b. A new version of gmalloc, based on the old GLIBC malloc, with many | |
687 | changes and range checking included by default. | |
688 | ||
689 | c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic | |
690 | Regular Expression matching, including character classes, collating | |
691 | symbols, equivalence classes, and support for case-insensitive pattern | |
692 | matching. | |
693 | ||
694 | d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been | |
695 | implemented, controlled by a new `shopt' option, `extglob'. | |
696 | ||
697 | e. There is a new ksh-like `[[' compound command, which implements | |
698 | extended `test' functionality. | |
699 | ||
700 | f. There is a new `printf' builtin, implemented according to the POSIX.2 | |
701 | specification. | |
702 | ||
703 | g. There is a new feature for command substitution: $(< filename) now expands | |
704 | to the contents of `filename', with any trailing newlines removed | |
705 | (equivalent to $(cat filename)). | |
706 | ||
707 | h. There are new tilde prefixes which expand to directories from the | |
708 | directory stack. | |
709 | ||
710 | i. There is a new `**' arithmetic operator to do exponentiation. | |
711 | ||
712 | j. There are new configuration options to control how bash is linked: | |
713 | `--enable-profiling', to allow bash to be profiled with gprof, and | |
714 | `--enable-static-link', to allow bash to be linked statically. | |
715 | ||
716 | k. There is a new configuration option, `--enable-cond-command', which | |
717 | controls whether or not the `[[' command is included. It is on by | |
718 | default. | |
719 | ||
720 | l. There is a new configuration option, `--enable-extended-glob', which | |
721 | controls whether or not the ksh extended globbing feature is included. | |
722 | It is enabled by default. | |
723 | ||
724 | m. There is a new configuration #define in config.h.top that, when enabled, | |
725 | will cause all login shells to source /etc/profile and one of the user- | |
726 | specific login shell startup files, whether or not the shell is | |
727 | interactive. | |
728 | ||
729 | n. There is a new invocation option, `--dump-po-strings', to dump | |
730 | a shell script's translatable strings ($"...") in GNU `po' format. | |
731 | ||
732 | o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive | |
733 | pattern matching when globbing filenames and using the `case' construct. | |
734 | ||
735 | p. There is a new `shopt' option, `huponexit', which, when enabled, causes | |
736 | the shell to send SIGHUP to all jobs when an interactive login shell | |
737 | exits. | |
738 | ||
739 | q. `bind' has a new `-u' option, which takes a readline function name as an | |
740 | argument and unbinds all key sequences bound to that function in a | |
741 | specified keymap. | |
742 | ||
743 | r. `disown' now has `-a' and `-r' options, to limit operation to all jobs | |
744 | and running jobs, respectively. | |
745 | ||
746 | s. The `shopt' `-p' option now causes output to be displayed in a reusable | |
747 | format. | |
748 | ||
749 | t. `test' has a new `-N' option, which returns true if the filename argument | |
750 | has been modified since it was last accessed. | |
751 | ||
752 | u. `umask' now has a `-p' option to print output in a reusable format. | |
753 | ||
754 | v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...' | |
755 | translation code. It expands to the character whose ascii code is NNN | |
756 | in hexadecimal. | |
757 | ||
758 | w. The prompt string expansion code has a new `\r' escape sequence. | |
759 | ||
760 | x. The shell may now be cross-compiled for the CYGWIN32 environment on | |
761 | a Unix machine. | |
762 | ||
763 | 2. New Features in Readline | |
764 | ||
765 | a. There is now an option for `iterative' yank-last-arg handline, so a user | |
766 | can keep entering `M-.', yanking the last argument of successive history | |
767 | lines. | |
768 | ||
769 | b. New variable, `print-completions-horizontally', which causes completion | |
770 | matches to be displayed across the screen (like `ls -x') rather than up | |
771 | and down the screen (like `ls'). | |
772 | ||
773 | c. New variable, `completion-ignore-case', which causes filename completion | |
774 | and matching to be performed case-insensitively. | |
775 | ||
776 | d. There is a new bindable command, `magic-space', which causes history | |
777 | expansion to be performed on the current readline buffer and a space to | |
778 | be inserted into the result. | |
779 | ||
780 | e. There is a new bindable command, `menu-complete', which enables tcsh-like | |
781 | menu completion (successive executions of menu-complete insert a single | |
782 | completion match, cycling through the list of possible completions). | |
783 | ||
784 | f. There is a new bindable command, `paste-from-clipboard', for use on Win32 | |
785 | systems, to insert the text from the Win32 clipboard into the editing | |
786 | buffer. | |
787 | ||
788 | g. The key sequence translation code now understands printf-style backslash | |
789 | escape sequences, including \NNN octal escapes. These escape sequences | |
790 | may be used in key sequence definitions or macro values. | |
791 | ||
792 | h. An `$include' inputrc file parser directive has been added. | |
793 | ||
794 | ------------------------------------------------------------------------------- | |
d166f048 JA |
795 | This is a terse description of the new features added to bash-2.01 since |
796 | the release of bash-2.0. As always, the manual page (doc/bash.1) is the | |
797 | place to look for complete descriptions. | |
798 | ||
799 | 1. New Features in Bash | |
800 | ||
801 | a. There is a new builtin array variable: GROUPS, the set of groups to which | |
802 | the user belongs. This is used by the test suite. | |
803 | ||
804 | 2. New Features in Readline | |
805 | ||
806 | a. If a key sequence bound to `universal-argument' is read while reading a | |
807 | numeric argument started with `universal-argument', it terminates the | |
808 | argument but is otherwise ignored. This provides a way to insert multiple | |
809 | instances of a digit string, and is how GNU emacs does it. | |
810 | ||
811 | ------------------------------------------------------------------------------- | |
ccc6cda3 JA |
812 | This is a terse description of the new features added to bash-2.0 since |
813 | the release of bash-1.14.7. As always, the manual page (doc/bash.1) is | |
814 | the place to look for complete descriptions. | |
726f6388 | 815 | |
ccc6cda3 | 816 | 1. New Features in Bash |
726f6388 | 817 | |
ccc6cda3 JA |
818 | a. There is a new invocation option, -D, that dumps translatable strings |
819 | in a script. | |
726f6388 | 820 | |
ccc6cda3 JA |
821 | b. The `long' invocation options must now be prefixed with `--'. |
822 | ||
823 | c. New long invocation options: --dump-strings, --help, --verbose | |
824 | ||
825 | d. The `nolineediting' invocation option was renamed to `noediting'. | |
826 | ||
827 | e. The `nobraceexpansion' and `quiet' long invocation options were removed. | |
828 | ||
829 | f. The `--help' and `--version' long options now work as the GNU coding | |
830 | standards specify. | |
831 | ||
832 | g. If invoked as `sh', bash now enters posix mode after reading the | |
833 | startup files, and reads and executes commands from the file named | |
834 | by $ENV if interactive (as POSIX.2 specifies). A login shell invoked | |
835 | as `sh' reads $ENV after /etc/profile and ~/.profile. | |
836 | ||
837 | h. There is a new reserved word, `time', for timing pipelines, builtin | |
838 | commands, and shell functions. It uses the value of the TIMEFORMAT | |
839 | variable as a format string describing how to print the timing | |
840 | statistics. | |
841 | ||
842 | i. The $'...' quoting syntax expands ANSI-C escapes in ... and leaves the | |
843 | result single-quoted. | |
844 | ||
845 | j. The $"..." quoting syntax performs locale-specific translation of ... | |
846 | and leaves the result double-quoted. | |
847 | ||
848 | k. LINENO now works correctly in functions. | |
849 | ||
850 | l. New variables: DIRSTACK, PIPESTATUS, BASH_VERSINFO, HOSTNAME, SHELLOPTS, | |
851 | MACHTYPE. The first three are array variables. | |
852 | ||
853 | m. The BASH_VERSION and BASH_VERSINFO variables now include the shell's | |
854 | `release status' (alpha[N], beta[N], release). | |
855 | ||
856 | n. Some variables have been removed: MAIL_WARNING, notify, history_control, | |
857 | command_oriented_history, glob_dot_filenames, allow_null_glob_expansion, | |
858 | nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and | |
859 | cdable_vars. Most of them are now implemented with the new `shopt' | |
860 | builtin; others were already implemented by `set'. | |
861 | ||
862 | o. Bash now uses some new variables: LC_ALL, LC_MESSAGES, LC_CTYPE, | |
863 | LC_COLLATE, LANG, GLOBIGNORE, HISTIGNORE. | |
864 | ||
865 | p. The shell now supports integer-indexed arrays of unlimited length, | |
866 | with a new compound assignment syntax and changes to the appropriate | |
867 | builtin commands (declare/typeset, read, readonly, etc.). The array | |
868 | index may be an arithmetic expression. | |
869 | ||
870 | q. ${!var}: indirect variable expansion, equivalent to eval \${$var}. | |
871 | ||
872 | r. ${paramter:offset[:length]}: variable substring extraction. | |
873 | ||
874 | s. ${parameter/pattern[/[/]string]}: variable pattern substitution. | |
875 | ||
876 | t. The $[...] arithmetic expansion syntax is no longer supported, in | |
877 | favor of $((...)). | |
878 | ||
879 | u. Aliases can now be expanded in shell scripts with a shell option | |
880 | (shopt expand_aliases). | |
881 | ||
882 | v. History and history expansion can now be used in scripts with | |
883 | set -o history and set -H. | |
884 | ||
885 | w. All builtins now return an exit status of 2 for incorrect usage. | |
886 | ||
887 | x. Interactive shells resend SIGHUP to all running or stopped children | |
888 | if (and only if) they exit due to a SIGHUP. | |
889 | ||
890 | y. New prompting expansions: \a, \e, \H, \T, \@, \v, \V. | |
891 | ||
892 | z. Variable expansion in prompt strings is now controllable via a shell | |
893 | option (shopt promptvars). | |
894 | ||
895 | aa. Bash now defaults to using command-oriented history. | |
896 | ||
897 | bb. The history file ($HISTFILE) is now truncated to $HISTFILESIZE after | |
898 | being written. | |
899 | ||
900 | cc. The POSIX.2 conditional arithmetic evaluation syntax (expr ? expr : expr) | |
901 | has been implemented. | |
902 | ||
903 | dd. Each builtin now accepts `--' to signify the end of the options, except | |
904 | as documented (echo, etc.). | |
905 | ||
906 | ee. All builtins use -p to display values in a re-readable format where | |
907 | appropriate, except as documented (echo, type, etc.). | |
908 | ||
909 | ff. The `alias' builtin has a new -p option. | |
910 | ||
911 | gg. Changes to the `bind' builtin: | |
912 | o has new options: -psPSVr. | |
913 | o the `-d' option was renamed to `-p' | |
914 | o the `-v' option now dumps variables; the old `-v' is now `-P' | |
915 | ||
916 | hh. The `bye' synonym for `exit' was removed. | |
917 | ||
918 | ii. The -L and -P options to `cd' and `pwd' have been documented. | |
919 | ||
920 | jj. The `cd' builtin now does spelling correction on the directory name | |
921 | by default. This is settable with a shell option (shopt cdspell). | |
922 | ||
923 | kk. The `declare' builtin has new options: -a, -F, -p. | |
924 | ||
925 | ll. The `dirs' builtin has new options: -c, -p, -v. | |
926 | ||
927 | mm. The new `disown' builtin removes jobs from the shell's jobs table | |
928 | or inhibits the resending of SIGHUP when the shell receives a | |
929 | SIGHUP. | |
930 | ||
931 | nn. The `echo' builtin has a new escape character: \e. | |
932 | ||
933 | oo. The `enable' builtin can now load new builtins dynamically from shared | |
934 | objects on systems with the dlopen/dlsym interface. There are a number | |
935 | of examples in the examples/loadables directory. There are also | |
936 | new options: -d, -f, -s, -p. | |
937 | ||
938 | pp. The `-all' option to `enable' was removed in favor of `-a'. | |
939 | ||
940 | qq. The `exec' builtin has new options: -l, -c, -a. | |
941 | ||
942 | rr. The `hash' builtin has a new option: -p. | |
943 | ||
944 | ss. The `history' builtin has new options: -c, -p, -s. | |
945 | ||
946 | tt. The `jobs' builtin has new options: -r, -s. | |
947 | ||
948 | uu. The `kill' builtin has new options: -n signum, -l signame. | |
949 | ||
950 | vv. The `pushd' and `popd' builtins have a new option: -n. | |
951 | ||
952 | ww. The `read' builtin has new options: -p prompt, -e, -a. | |
953 | ||
954 | xx. The `readonly' builtin has a new -a option, and the -n option was removed. | |
955 | ||
956 | yy. Changes to the `set' builtin: | |
957 | o new options: -B, -o keyword, -o onecmd, -o history | |
958 | o options removed: -l, -d, -o nohash | |
959 | o options changed: +o, -h, -o hashall | |
960 | o now displays variables in a format that can be re-read as input | |
961 | ||
962 | zz. The new `shopt' builtin controls shell optional behavior previously | |
963 | done by setting and unsetting certain shell variables. | |
964 | ||
965 | aaa. The `test' builtin has new operators: -o option, s1 == s2, s1 < s2, | |
966 | and s1 > s2, where s1 and s2 are strings. | |
967 | ||
968 | bbb. There is a new trap, DEBUG, executed after every simple command. | |
969 | ||
970 | ccc. The `trap' builtin has a new -p option. | |
971 | ||
972 | ddd. The `ulimit' builtin has a new -l option on 4.4BSD-based systems. | |
973 | ||
974 | eee. The PS1, PS2, PATH, and IFS variables may now be unset. | |
975 | ||
976 | fff. The restricted shell mode has been expanded and is now documented. | |
977 | ||
978 | ggg. Security improvements: | |
979 | o functions are not imported from the environment if running setuid | |
980 | or with -p | |
981 | o no startup files are sourced if running setuid or with -p | |
982 | ||
983 | hhh. The documentation has been overhauled: the texinfo manual was | |
984 | expanded, and HTML versions of the man page and texinfo manual | |
985 | are included. | |
986 | ||
987 | iii. Changes to Posix mode: | |
988 | o Command lookup now finds special builtins before shell functions. | |
989 | o Failure of a special builtin causes a non-interactive shell to | |
990 | exit. Failures are defined in the POSIX.2 specification. | |
991 | o If the `cd' builtin finds a directory to change to using $CDPATH, | |
992 | the value assigned to PWD when `cd' completes does not contain | |
993 | any symbolic links. | |
994 | o A non-interactive shell exits if a variable assignment error | |
995 | occurs when no command name follows the assignment statements. | |
996 | o A non-interactive shell exits if the interation variable in a | |
997 | `for' statement or the selection variable in a `select' statement | |
998 | is read-only or another variable assignment error occurs. | |
999 | o The `<>' redirection operator now opens a file for both stdin and | |
1000 | stdout by default, not just when in posix mode. | |
1001 | o Assignment statements preceding special builtins now persist in | |
1002 | the shell's environment when the builtin completes. | |
1003 | ||
1004 | Posix mode is now completely POSIX.2-compliant (modulo bugs). When | |
1005 | invoked as sh, bash should be completely POSIX.2-compliant. | |
1006 | ||
1007 | jjj. The default value of PS1 is now "\s-\v\$ ". | |
1008 | ||
1009 | kkk. The ksh-like ((...)) arithmetic command syntax has been implemented. | |
1010 | This is exactly equivalent to `let "..."'. | |
1011 | ||
1012 | lll. Integer constants have been extended to base 64. | |
1013 | ||
1014 | mmm. The `ulimit' builtin now sets both hard and soft limits and reports the | |
1015 | soft limit by default. | |
1016 | ||
1017 | 2. New Features in Readline | |
1018 | ||
1019 | a. New variables: enable-keypad, input-meta (new name for meta-flag), | |
1020 | mark-directories, visible-stats (now documented), disable-completion, | |
1021 | comment-begin. | |
1022 | ||
1023 | b. New bindable commands: kill-region, copy-region-as-kill, | |
1024 | copy-backward-word, copy-forward-word, set-mark, exchange-point-and-mark, | |
1025 | character-search, character-search-backward, insert-comment, | |
1026 | glob-expand-word, glob-list-expansions, dump-variables, dump-macros. | |
1027 | ||
1028 | c. New emacs keybindings: delete-horizontal-space (M-\), | |
1029 | insert-completions (M-*), possible-completions (M-=). | |
1030 | ||
1031 | d. The history-search-backward and history-search-forward commands were | |
1032 | modified to be the same as previous-line and next-line if point is at | |
1033 | the start of the line. | |
1034 | ||
1035 | e. More file types are available for the visible-stats mode. | |
1036 | ||
1037 | 3. Changes of interest in the Bash implementation | |
1038 | ||
1039 | a. There is a new autoconf-based configuration mechanism. | |
1040 | ||
1041 | b. More things have been moved from Posix mode to standard shell behavior. | |
1042 | ||
1043 | c. The trace output (set -x) now inserts quotes where necessary so it can | |
1044 | be reused as input. | |
1045 | ||
1046 | d. There is a compile-time option for a system-wide interactive shell | |
1047 | startup file (disabled by default). | |
1048 | ||
1049 | e. The YACC grammar is smaller and tighter, and all 66 shift-reduce | |
1050 | conflicts are gone. Several parsing bugs have been fixed. | |
1051 | ||
1052 | f. Builtin option parsing has been regularized (using internal_getopt()), | |
1053 | with the exception of `echo', `type', and `set'. | |
1054 | ||
1055 | g. Builtins now return standard usage messages constructed from the | |
1056 | `short doc' used by the help builtin. | |
1057 | ||
1058 | h. Completion now quotes using backslashes by default, but honors | |
1059 | user-supplied quotes. | |
1060 | ||
1061 | i. The GNU libc malloc is available as a configure-time option. | |
1062 | ||
1063 | j. There are more internationalization features; bash uses gettext if | |
1064 | it is available. The $"..." translation syntax uses the current | |
1065 | locale and gettext. | |
1066 | ||
1067 | k. There is better reporting of job termination when the shell is not | |
1068 | interactive. | |
1069 | ||
1070 | l. The shell is somewhat more efficient: it uses a little less memory and | |
1071 | makes fewer system calls. | |
1072 | ||
1073 | 4. Changes of interest in the Readline implementation | |
1074 | ||
1075 | a. There is now support for readline `callback' functions. | |
1076 | ||
1077 | b. There is now support for user-supplied input, redisplay, and terminal | |
1078 | preparation functions. | |
1079 | ||
1080 | c. Most of the shell-specific code in readline has been generalized or | |
1081 | removed. | |
1082 | ||
1083 | d. Most of the annoying redisplay bugs have been fixed, notably the problems | |
1084 | with incremental search and excessive redrawing when special characters | |
1085 | appear in the prompt string. | |
1086 | ||
1087 | e. There are new library functions and variables available to application | |
1088 | writers, most having to do with completion and quoting. | |
1089 | ||
1090 | f. The NEWLINE character (^J) is now treated as a search terminator by the | |
1091 | incremental search functions. |