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