]> git.ipfire.org Git - thirdparty/bash.git/blame - CHANGES
Bash-5.2 patch 26: fix typo when specifying readline's custom color prefix
[thirdparty/bash.git] / CHANGES
CommitLineData
74091dd4
CR
1This document details the changes between this version, bash-5.2-release, and
2the previous version, bash-5.2-rc4.
3
41. Changes to Bash
5
62. Changes to Readline
7
8a. When replacing a history entry, make sure the existing entry has a non-NULL
9 timestamp before copying it; it may have been added by the application, not
10 the history library.
11
123. New Features in Bash
13
144. New Features in Readline
15
16------------------------------------------------------------------------------
17This document details the changes between this version, bash-5.2-rc4, and
18the previous version, bash-5.2-rc3.
19
201. Changes to Bash
21
22a. Changed how the compatibility mode enabling of extglob works in conjunction
23 with parsing conditional commands.
24
25b. Fixed a problem with aliases containing command substitutions.
26
272. Changes to Readline
28
293. New Features in Bash
30
314. New Features in Readline
32
33------------------------------------------------------------------------------
34This document details the changes between this version, bash-5.2-rc3, and
35the previous version, bash-5.2-rc2.
36
371. Changes to Bash
38
39a. Added a compatibility mode feature that causes the parser to parse command
40 substitutions as if extglob were enabled. If it is enabled before execution,
41 parse at execution will succeed. If not, the subsequent execution parse will
42 fail.
43
44b. Fixed an issue with handling a `return' executed in a trap action if the
45 trap is executed while running in a shell function.
46
472. Changes to Readline
48
493. New Features in Bash
50
514. New Features in Readline
52
53a. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG)
54 each time it is called, and modifies the appropriate locale-specific display
55 and key binding variables when the locale changes.
56
57------------------------------------------------------------------------------
58This document details the changes between this version, bash-5.2-rc2, and
59the previous version, bash-5.2-rc1.
60
611. Changes to Bash
62
63a. Fixed a bug that could disable history saving after a compound array
64 assignment in an interactive shell.
65
66b. Fixed a bug that could cause incorrect error messages when running a DEBUG
67 trap during a conditional or arithmetic command.
68
69c. Fixed a bug that caused test to print an error message when given ! ! arg
70 as arguments.
71
72d. Fixed a bug that resulted in incorrect error messages when completing a
73 backquoted command substitution.
74
75e. Changed command substitution parsing to reproduce the original text more
76 closely when reconsituting the command string from the parsed command.
77
78f. Fixed a bug that could cause an EXIT trap to use the wrong variable context
79 when the errexit option is set.
80
81g. Fixed a bug that could cause the parser to incorrectly delimit a token when
82 an alias expansion ended with a multibyte character.
83
842. Changes to Readline
85
863. New Features in Bash
87
88a. Since there is no `declare -' equivalent of `local -', make sure to use
89 `local -' in the output of `local -p'.
90
91b. Null anchored matches in pattern substitution now process `&' in the
92 replacement string, like sed.
93
944. New Features in Readline
95
96------------------------------------------------------------------------------
97This document details the changes between this version, bash-5.2-rc1, and
98the previous version, bash-5.2-beta.
99
1001. Changes to Bash
101
102a. Changes to `wait -p' and how it sets the variable name in the presence of
103 valid and invalid PID arguments.
104
105b. Fixed a bug that caused compgen to dump core if the completion engine was
106 not initialized.
107
108c. Fixed a memory leak in the variable name programmable completion code.
109
110d. Here-documents and here-strings use tempfiles if the shell compatibility
111 level is 50 or lower.
112
113e. Non-interactive shells exit on a syntax error encountered while parsing a
114 command substitution.
115
116f. Fixed a bug with inherited parser state while parsing a command substitution.
117
118g. Fixed a bug that caused the shell not to check for terminating signals
119 after executing the command_string supplied with `-c' and before executing
120 the exit trap.
121
122h. Changes to avoid a make race condition while generating builtins.c.
123
124i. Make it explicit that BASH_REMATCH is always a global variable, and that
125 local copies are (currently) ignored.
126
127j. Fixed a bug that caused an ambiguous redirection (>&word) to be printed
128 incorrectly (>&word) if no file descriptor was supplied.
129
1302. Changes to Readline
131
132a. Fixed a bug that caused rl_eof_found to be set prematurely while reading a
133 multi-character key sequence in callback mode.
134
1353. New Features in Bash
136
137a. In posix mode, the `printf' builtin checks for the `L' length modifier and
138 uses long double for floating point conversion specifiers if it's present,
139 double otherwise.
140
141b. The `globbing' completion code now takes the `globstar' option into account.
142
143c. `suspend -f' now forces the shell to suspend even if job control is not
144 currently enabled.
145
1464. New Features in Readline
147
148------------------------------------------------------------------------------
149This document details the changes between this version, bash-5.2-beta, and
150the previous version, bash-5.2-alpha.
151
1521. Changes to Bash
153
154a. Fixed a problem with command-oriented history and multi-line commands that
155 caused embedded blank lines to be run together.
156
157b. Changed the way `&' is quoted when performing pattern substitution and
158 `patsub_replacement' is enabled.
159
160c. Fixed some integer overflows when expanding strings or reading the output
161 of command substitution larger than 2GB.
162
163d. `wait -p' without the `-n' option now does something useful if there are no
164 jobs.
165
166e. Fixed an issue with read timeouts in posix mode.
167
168f. Changed here-document processing to process $'...' and $"..." only when they
169 appear in the WORD portion of ${PARAM OP WORD} in the here-document body
170 and the body is being expanded.
171
172g. Changed alias expansion in command substitution to be posix-conformant
173 (performed while initially parsing the command substitution) when in posix
174 mode.
175
176h. Bash optimizes away more forks in subshells.
177
178i. Here-document construction now performs quote removal on the here-document
179 delimiter only if it's marked as quoted, which prevents quote characters in
180 command substitutions from being removed.
181
182j. Prompt string expansion now gives invisible characters in the expansion of
183 the \w, \W, and \s escape sequences a visible representation to avoid
184 problems with redisplay.
185
186k. Fixed a problem with SIGINT during the execution of a command bound with
187 `bind -x' affecting the saved terminal settings.
188
189l. Fixed an inconsistency with how $@ expands in a construct like ${@:+set}
190 or ${array[@]:+set} in the presence of null positional parameters or
191 array elements.
192
1932. Changes to Readline
194
195a. Prevent some display problems when running a command as the result of a
196 trap or one bound using `bind -x' and the command generates output.
197
198b. Fixed an issue with multi-line prompt strings that have one or more
199 invisible characters at the end of a physical line.
200
201c. Fixed an issue that caused a history line's undo list to be cleared when
202 it should not have been.
203
2043. New Features in Bash
205
206a. There is a new bindable readline command name: `vi-edit-and-execute-command'.
207
2084. New Features in Readline
209
210a. Two new bindable string variables: active-region-start-color and
211 active-region-end-color. The first sets the color used to display the
212 active region; the second turns it off. If set, these are used in place
213 of terminal standout mode.
214
215b. New readline state (RL_STATE_EOF) and application-visible variable
216 (rl_eof_found) to allow applications to detect when readline reads EOF
217 before calling the deprep-terminal hook.
218
219c. There is a new configuration option: --with-shared-termcap-library, which
220 forces linking the shared readline library with the shared termcap (or
221 curses/ncurses/termlib) library so applications don't have to do it.
222
223------------------------------------------------------------------------------
224This document details the changes between this version, bash-5.2-alpha, and
225the previous version, bash-5.1-release.
226
2271. Changes to Bash
228
229a. Fixed a bug that assigned a value to the variable name supplied as an
230 argument to `wait -p' when there were no jobs.
231
232b. Fixed a bug that resulted in performing incorrect word expansion on the
233 key/value pairs in a compound array assignment.
234
235c. Fixed a bug that could put the child forked to run a command substitution
236 into the wrong process group.
237
238d. Fixed a problem that could cause the lastpipe option to work incorrectly if
239 file descriptor 0 was closed.
240
241e. Bash tries to suppress traps if a forked child receives a trapped signal
242 before it has a chance to reset its signal handlers.
243
244f. Fixed several memory leaks in compound array assignments.
245
246g. Fixed a problem with performing an assignment with `+=' to an array element
247 that was the value of a nameref.
248
249h. Fixed a bug that could cause a nameref containing an array reference using
250 `@' or `*' not to expand to multiple words.
251
252i. Fixed a bug where extended glob functions could match `.' or `..' when it
253 wasn't explicitly specified, even if dotglob was set.
254
255j. Fixed a bug that caused non-interactive posix-mode shells not to exit on a
256 variable assignment error while assigning into the temporary environment.
257
258k. Fixed a bug that caused parsing errors if an alias contained a compound
259 array assignment.
260
261l. Fixed a couple of instances where bash checked syntax too aggressively when
262 trying to determine how to add a partial command to command-oriented
263 history.
264
265m. Fixed a parser problem that caused it not to allow reserved words to follow
266 the `((' and `[[' commands.
267
268n. Fixed a bad offset calculation when using negative offsets to `history -d'.
269
270o. Fixed an off-by-one error that caused a read past the end of a buffer when
271 reading a multibyte character from the output of a command substitution.
272
273p. Fixed a problem with a failed `exec' command not setting $? to the right
274 value for an exit trap.
275
276q. Fixed a problem that caused bash not to unlink FIFOs created as part of
277 expanding redirections for an external command.
278
279r. Fixed a bug that could cause aliases not to be expanded in case statements.
280
281s. Fixed a bug that could cause word completion to attempt programmable
282 completion for the target of a redirection, instead of filename completion.
283
284t. Fixed a bug that could result in errors after rebinding a key sequence with
285 `bind -x' multiple times.
286
287u. Fixed a problem that could result in not quoting the result when performing
288 command name completion with a glob pattern in the command name.
289
290v. `mapfile' now uses fully-buffered reads in more cases, which should improve
291 bulk read performance.
292
293w. Fixed a bug that caused `wait -n' to not reset its internal state when
294 interrupted by a signal, resulting in subsequent calls failing.
295
296x. Fixed a bug with parsing numeric arguments to readline key sequences
297 installed with `bind -x'.
298
299y. Bash suppresses forking in several additional cases, including most uses
300 of $(<file).
301
302z. If there are multiple `!' tokens in a [[ command, toggle the invert state
303 instead of setting it unconditionally.
304
305aa. Fixed a bug where running `fc' on an empty history list would cause the
306 shell to crash.
307
308bb. Word completion now checks whether or not a quote character closes a
309 quoted string begun on a previous line, so readline doesn't interpret the
310 quote as starting a new quoted string.
311
312cc. Fixed a typo that translated \UNNNNNNNN characters that were not valid in
313 the current locale encoding as \uNNNNNNNN.
314
315dd. Fixed an issue that could cause bash to print timing statistics for the
316 wrong command when `set -e' causes a command to fail.
317
318ee. Bash now runs the exit trap in function context if a failed command in
319 the function causes the shell to exit.
320
321ff. Some fixes to how subshells modify $SHLVL.
322
323gg. Fixed a bug that caused `mapfile -t' not to remove the delimiter when the
324 delimiter is > 128 in the current encoding.
325
326hh. Fixed a problem that could cause the shell to attempt to free unallocated
327 memory if an expansion error occurred.
328
329ii. Fixed a bug in the bash malloc implementation of malloc_usable_size. Bash
330 did not use it, but it could cause problems with library functions that
331 did.
332
333jj. If the `exec' builtin fails, and the shell does not exit, it restores
334 trapped signals to their trapped state.
335
336kk. Fixed a bug that could cause variable assignment arguments to `declare' to
337 expand variables using attributes that the call to declare was turning off.
338
339ll. Fixed a bug with LINENO and arithmetic for commands.
340
341mm. Fixed a posix-mode bug that caused tildes not to be expanded after an
342 unquoted colon on the right side of an assignment statement.
343
344nn. Fixed a problem with `caller' and line numbers when executing an ERR trap.
345
346oo. Fixed a problem that could make the value returned by ${a:=b} not be the
347 final value assigned to a (e.g., if `a' has an attribute that modifies
348 the value on assignment).
349
350pp. Fixed a problem with saving multi-line here-documents to the history list
351 where the here-document delimiter does not appear on the first line.
352
353qq. Fixed a bug with using += to assign to dynamic variables like RANDOM.
354
355rr. Fixed a bug that caused `set -n' to modify $? if set after execution had
356 started.
357
358ss. Builtins like printf/read/wait now behave more consistently when assigning
359 arbitrary keys to associative arrays (like `]'. when appropriately quoted).
360
361tt. Fixed a problem with here-document collection printing the wrong prompt
362 when parsing a compound list in an interactive shell.
363
364uu. Fixed a problem with quoting shell expansion characters (like `$') when
365 they appear in a tab-completed word along with characters that do need
366 quoting (e.g.. $HOME/VirtualBox VMs).
367
3682. Changes to Readline
369
370a. Fixed a problem with cleaning up active marks when using callback mode.
371
372b. Fixed a problem with arithmetic comparison operators checking the version.
373
374c. Fixed a problem that could cause readline not to build on systems without
375 POSIX signal functions.
376
377d. Fixed a bug that could cause readline to crash if the application removed
378 the callback line handler before readline read all typeahead.
379
380e. Added additional checks for read errors in the middle of readline commands.
381
382f. Fixed a redisplay problem that occurred when switching from the digit-
383 argument prompt `(arg: N)' back to the regular prompt and the regular
384 prompt contained invisible characters.
385
386g. Fixed a problem with restoring the prompt when aborting an incremental
387 search.
388
389h. Fix a problem with characters > 128 not being displayed correctly in certain
390 single-byte encodings.
391
392i. Fixed a problem with unix-filename-rubout that caused it to delete too much
393 when applied to a pathname consisting only of one or more slashes.
394
395j. Fixed a display problem that caused the prompt to be wrapped incorrectly if
396 the screen changed dimensions during a call to readline() and the prompt
397 became longer than the screen width.
398
399k. Fixed a problem that caused the \r output by turning off bracketed paste
400 to overwrite the line if terminal echo was disabled.
401
402l. Fixed a bug that could cause colored-completion-prefix to not display if
403 completion-prefix-display-length was set.
404
405m. Fixed a problem with line wrapping prompts when a group of invisible
406 characters runs to the right edge of the screen and the prompt extends
407 longer then the screen width.
408
409n. Fixed a couple problems that could cause rl_end to be set incorrectly by
410 transpose-words.
411
4123. New Features in Bash
413
414a. The bash malloc returns memory that is aligned on 16-byte boundaries.
415
416b. There is a new internal timer framework used for read builtin timeouts.
417
418c. Rewrote the command substitution parsing code to call the parser recursively
419 and rebuild the command string from the parsed command. This allows better
420 syntax checking and catches errors much earlier. Along with this, if
421 command substitution parsing completes with here-documents remaining to be
422 read, the shell prints a warning message and reads the here-document bodies
423 from the current input stream.
424
425d. The `ulimit' builtin now treats an operand remaining after all of the options
426 and arguments are parsed as an argument to the last command specified by
427 an option. This is for POSIX compatibility.
428
429e. Here-document parsing now handles $'...' and $"..." quoting when reading the
430 here-document body.
431
432f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline
433 commands now understand $'...' and $"..." quoting.
434
435g. There is a new `spell-correct-word' bindable readline command to perform
436 spelling correction on the current word.
437
438h. The `unset' builtin now attempts to treat arguments as array subscripts
439 without parsing or expanding the subscript, even when `assoc_expand_once'
440 is not set.
441
442i. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
443
444j. Associative array assignment and certain instances of referencing (e.g.,
445 `test -v') now allow `@' and `*' to be used as keys.
446
447k. Bash attempts to expand indexed and associative array subscripts only
448 once when executing shell constructs and word expansions.
449
450l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with
451 that value for associative arrays instead of unsetting the entire array
452 (which you can still do with `unset arrayname'). For indexed arrays, it
453 removes all elements of the array without unsetting it (like `A=()').
454
455m. Additional builtins (printf/test/read/wait) do a better job of not
456 parsing array subscripts if array_expand_once is set.
457
458n. New READLINE_ARGUMENT variable set to numeric argument for readline commands
459 defined using `bind -x'.
460
461o. The new `varredir_close' shell option causes bash to automatically close
462 file descriptors opened with {var}<fn and other styles of varassign
463 redirection unless they're arguments to the `exec' builtin.
464
465p. The `$0' special parameter is now set to the name of the script when running
466 any (non-interactive) startup files such as $BASH_ENV.
467
468q. The `enable' builtin tries to load a loadable builtin using the default
469 search path if `enable name' (without any options) attempts to enable a
470 non-existent builtin.
471
472r. The `printf' builtin has a new format specifier: %Q. This acts like %q but
473 applies any specified precision to the original unquoted argument, then
474 quotes and outputs the result.
475
476s. The new `noexpand_translations' option controls whether or not the translated
477 output of $"..." is single-quoted.
478
479t. There is a new parameter transformation operator: @k. This is like @K, but
480 expands the result to separate words after word splitting.
481
482u. There is an alternate array implementation, selectable at `configure' time,
483 that optimizes access speed over memory use (use the new configure
484 --enable-alt-array-implementation option).
485
486v. If an [N]<&WORD- or [N]>&WORD- redirection has WORD expand to the empty
487 string, treat the redirection as [N]<&- or [N]>&- and close file descriptor
488 N (default 0).
489
490w. Invalid parameter transformation operators are now invalid word expansions,
491 and so cause fatal errors in non-interactive shells.
492
493x. New shell option: patsub_replacement. When enabled, a `&' in the replacement
494 string of the pattern substitution expansion is replaced by the portion of
495 the string that matched the pattern. Backslash will escape the `&' and
496 insert a literal `&'.
497
498y. `command -p' no longer looks in the hash table for the specified command.
499
500z. The new `--enable-translatable-strings' option to `configure' allows $"..."
501 support to be compiled in or out.
502
503aa. The new `globskipdots' shell option forces pathname expansion never to
504 return `.' or `..' unless explicitly matched. It is enabled by default.
505
506bb. Array references using `@' and `*' that are the value of nameref variables
507 (declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
508 set -u is enabled and the array (v) is unset.
509
5104. New Features in Readline
511
512a. There is now an HS_HISTORY_VERSION containing the version number of the
513 history library for applications to use.
514
515b. History expansion better understands multiple history expansions that may
516 contain strings that would ordinarily inhibit history expansion (e.g.,
517 `abc!$!$').
518
519c. There is a new framework for readline timeouts, including new public
520 functions to set timeouts and query how much time is remaining before a
521 timeout hits, and a hook function that can trigger when readline times
522 out. There is a new state value to indicate a timeout.
523
524d. Automatically bind termcap key sequences for page-up and page-down to
525 history-search-backward and history-search-forward, respectively.
526
527e. There is a new `fetch-history' bindable command that retrieves the history
528 entry corresponding to its numeric argument. Negative arguments count back
529 from the end of the history.
530
531f. `vi-undo' is now a bindable command.
532
533g. There is a new option: `enable-active-region'. This separates control of
534 the active region and bracketed-paste. It has the same default value as
535 bracketed-paste, and enabling bracketed paste enables the active region.
536 Users can now turn off the active region while leaving bracketed paste
537 enabled.
538
539h. rl_completer_word_break_characters is now `const char *' like
540 rl_basic_word_break_characters.
541
542i. Readline looks in $LS_COLORS for a custom filename extension
543 (*.readline-colored-completion-prefix) and uses that as the default color
544 for the common prefix displayed when `colored-completion-prefix' is set.
545
546------------------------------------------------------------------------------
8868edaf
CR
547This document details the changes between this version, bash-5.1-rc3, and
548the previous version, bash-5.1-rc2.
549
5501. Changes to Bash
551
552a. The `assoc_expand_once' option now affects the evaluation of the -v primary
553 to test and the [[ compound command.
554
5552. Changes to Readline
556
557a. Fixed a bug that could cause point to be set beyond the end of the line
558 buffer when aborting an incremental search.
559
5603. New Features in Bash
561
5624. New Features in Readline
563
564------------------------------------------------------------------------------
565This document details the changes between this version, bash-5.1-rc2, and
566the previous version, bash-5.1-rc1.
567
5681. Changes to Bash
569
570a. Process substitutions started from an interactive shell no longer have their
571 standard input implicitly redirected from /dev/null.
572
573b. Fixed an issue with setting the SIGINT trap handler in an interactive shell
574 when temporarily running $PROMPT_COMMAND non-interactively.
575
5762. Changes to Readline
577
578a. Terminals that are named "dumb" or unknown do not enable bracketed paste
579 by default.
580
581b. Ensure that disabling bracketed paste turns off highlighting the incremental
582 search string when the search is successful.
583
5843. New Features in Bash
585
5864. New Features in Readline
587
588------------------------------------------------------------------------------
589This document details the changes between this version, bash-5.1-rc1, and
590the previous version, bash-5.1-beta.
591
5921. Changes to Bash
593
594a. Fixed an inconsistency in the way HISTCMD is calculated when it's expanded
595 during a multi-line command.
596
597b. Modified the change to here-document expansion containing backslash-quoted
598 double quotes.
599
600c. Fixed a case where the shells's exit status could be greater than 255.
601
602d. Modified changed to process substitution so the executed command has its
603 stdin redirected from /dev/null if it was previously interactive and
604 reading commands from the terminal.
605
6062. New Features in Bash
607
608a. There is a new contributed loadable builtin: asort.
609
6103. Changes to Readline
611
612a. Fixed a bug that could cause an application with an application-specific
613 redisplay function to crash if the line data structures had not been
614 initialized.
615
6164. New Features in Readline
617
618------------------------------------------------------------------------------
619This document details the changes between this version, bash-5.1-beta, and
620the previous version, bash-5.1-alpha.
621
6221. Changes to Bash
623
624a. Fixed a bug that caused name references to variables to not update the
625 referenced variable's assignment side effects.
626
627b. Tightened up the parameter transformation error checking for invalid
628 transformation operators.
629
630c. System-specific changes for: FreeBSD
631
632d. A few minor changes to move potential uses of stdio functions out of signal
633 handling paths.
634
635e. Make sure SIGCHLD is blocked in all cases where waitchld() is not called
636 from a signal handler.
637
638f. Changed `command' builtin processing so it no longer starts an extra process
639 when run asynchronously (command x &).
640
641g. Avoid performing tilde expansion after `:' in words that look like assignment
642 statements when in posix mode.
643
644h. Slight changes to how the `complete' builtin prints out options and actions
645 for completion specifications.
646
647i. Several changes to how `local -' restores the values of options and
648 $SHELLOPTS.
649
650j. Don't treat a word in a compound assignment as an assignment statement
651 unless it has a valid subscript before the `='.
652
653k. Fixed a bug with the DEBUG trap and process substitution that caused the
654 terminal's process group to be set incorrectly.
655
656l. Fixed a bug that left readline's signal handlers installed while running a
657 shell command from a bindable readline command.
658
659m. Fixed the `fc' builtin to clamp out of range history specifications at the
660 boundaries of the history list for POSIX conformance.
661
662n. Fixed a bug that caused ${foo@a} to treat foo as an unset variable if it
663 was an array without a value for subscript 0/"0" but had other set
664 elements.
665
666o. Fixed a bug that caused the history code to attempt to parse command
667 substitutions looking for shell comments before adding them to the history,
668 even while parsing here-documents.
669
670p. Fixed a bug that could cause a syntax error in a command read by `eval' to
671 exit an interactive shell.
672
6732. New Features in Bash
674
675a. If the hash builtin is listing hashed filenames portably, don't print
676 anything if the table is empty.
677
678b. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component.
679
680c. Bash attempts to optimize away forks in the last command in a function body
681 under appropriate circumstances.
682
683d. The globbing code now uses fnmatch(3) to check collation elements (if
684 available) even in cases without multibyte characters.
685
686e. The `fg' and `bg' builtins now return an error in a command substitution
687 when asked to restart a job inherited from the parent shell.
688
689f. The shell now attempts to unlink all FIFOs on exit, whether a consuming
690 process has finished with them or not.
691
6923. Changes to Readline
693
694a. Make sure that all undo groups are closed when leaving vi insertion mode.
695
696b. Make sure that the vi-mode `C' and `c' commands enter insert mode even if
697 the motion command doesn't have any effect.
698
699c. Fixed several potential memory leaks in the callback mode context handling.
700
701d. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while
702 executing the terminal cleanup code, since it's no longer run in a signal
703 handling context.
704
7054. New Features in Readline
706
707a. The signal cleanup code now blocks SIGINT while processing after a SIGINT.
708
709------------------------------------------------------------------------------
710This document details the changes between this version, bash-5.1-alpha, and
711the previous version, bash-5.0-release.
712
7131. Changes to Bash
714
715a. Fixed a bug that caused a posix-mode shell to not exit if the return builtin
716 was executed outside a function or dot script.
717
718b. Fixed a bug where `declare +f' could potentially turn off the function
719 attribute.
720
721c. Restored bash-4.4 pathname expansion behavior when a word to be expanded had
722 only backslashes, not any of the other globbing characters. This came after
723 an extensive POSIX group discussion (interp #1234).
724
725d. There are more changes to avoid performing word expansions multiple times on
726 arithmetic expressions.
727
728e. Fixed a bug with alias expansion when the alias ends with a TAB.
729
730f. Fixed a bug that caused programmable completion to return an error if the
731 shell function name supplied as an argument to `complete -F' was invalid.
732
733g. There are several fixes to buffer overflows found as the result of fuzzing
734 with random input.
735
736h. Fixed a bug that caused the edit-and-execute-command editing command to
737 start with the previous history line if invoked on an empty line.
738
739i. Fixed a bug that potentially caused `bind --help' to change readline's
740 output stream.
741
742j. Turning off posix mode now restores the vi-insertion mode binding for TAB
743 that was in effect when posix mode was enabled.
744
745k. Restore the previous state of job control being enabled if `exec' fails in
746 an interactive shell.
747
748l. Fixed a bug that caused the terminal's process group to be set incorrectly
749 if job control was turned off before starting an interactive shell.
750
751m. Fixed a bug that caused a crash when HISTSIZE=0.
752
753n. Fixed a word expansion bug that caused null strings on the rhs of expansions
754 to be discarded incorrectly.
755
756o. History list management does a better job of handling the situation where
757 the number of history entries from the current shell session is greater than
758 the number of entries in the history list.
759
760p. Fixed a bug that caused the `fc' builtin to attempt to dereference a newly-
761 freed history entry.
762
763q. Fixed a bug that made the `Q' variable transformation not work well with
764 `set -u'.
765
766r. There are several word expansion fixes for expanding $* and $@ in contexts
767 where word splitting is not going to be performed, since each positional
768 parameter must expand to a separate word.
769
770s. Fixed a bug that could cause ^D to exit bash immediately even if there were
771 stopped jobs.
772
773t. Fixed a bug with double-quoting and backslash-quoting strings containing
774 multibyte characters for reuse.
775
776u. Fixed a bug that caused the line number to be reported incorrectly if the
777 shell executed a (command) subshell.
778
779v. Fixed a bug that caused the shell to fail to reap process substitutions
780 when they went out of scope, which had unpredictable results.
781
782w. Fixed a bug that caused null strings in arguments to [[ conditional command
783 operators to compare incorrectly.
784
785x. Changed the behavior of `wait' without arguments to only wait for background
786 processes the current shell instance started, not background children it may
787 have inherited.
788
789y. Fixed a bug that could cause command substitution to leave file descriptors
790 open if the shell received many SIGINTs.
791
792z. Bash now behaves better if the `**' filename expansion operator encounters a
793 symbolic link to a directory, avoiding more cases where it might return
794 duplicate pathnames.
795
796aa. Programmable completion now canonicalizes directory names in the same way
797 as bash word completion, so `..' is handled consistently.
798
799bb. Fixed a bug when using RETURN as the delimiter to the read builtin; it
800 caused readline to set the binding for RETURN incorrectly.
801
802cc. Fixed a bug that caused `history -d' to delay printing an out-of-range
803 error message.
804
805dd. Fixed a bug with `bash -c command' where `command' ends with an expanded
806 alias.
807
808ee. Fixed a bug that could result in `history -n' adding spurious line feeds to
809 commands in the history list.
810
811ff. The $RANDOM random number generator now XORs the top and bottom halves of
812 the internal 32-bit value to introduce more randomness. Setting the shell
813 compatibility level to 50 or lower undoes this.
814
815gg. Fixed several problems caused by running the DEBUG trap on simple commands
816 executed as part of a pipeline.
817
818ii. Fixed a bug that didn't allow `bind -r' to remove the binding for \C-@.
819
820jj. Several fixes to the bash-backward-shellword bindable readline command to
821 behave better when at the last character on the line.
822
823kk. If `set -x' is enabled, bash doesn't print a command twice if it's run by
824 the `command' builtin.
825
826ll. Fixed a bug with printing function definitions containing here documents.
827
828mm. Fixed a bug that could cause the `bind' builtin to set $? to -1.
829
830nn. Fixed a bug that didn't reset the timezone information correctly when the
831 TZ variable was unset.
832
833oo. Fixed several issues with assigning an associative array variable using a
834 compound assignment that expands the value of the same variable.
835
836pp. Fixed several places where the shell set $? without setting PIPESTATUS.
837
838qq. Fixed a problem with glob bracket expressions containing invalid character
839 classes, collating symbols, or equivalence classes -- they should not
840 require a closing right bracket.
841
842rr. Fixed a bug where running a builtin in a subshell did not run the EXIT trap.
843
844ss. Fixed several problems with posix-mode variable assignments preceding
845 shell function calls and posix special builtins, so that they create and
846 modify variables at the current scope.
847
848tt. Fix history initialization so `bash +o history' works as expected.
849
850uu. Fixed a bug in the bindable edit-and-execute-command command that could
851 interfere with the shell's parsing state.
852
853vv. Fixed an issue with nested traps running command substitutions in command
854 lines with command substitutions.
855
856ww. Fixed a bug with globbing pathnames that contain invalid multibyte
857 characters (sequences that don't correspond to a character in the current
858 locale).
859
860xx. Fixed a bug that caused the shell not to exit if a function definition
861 failed while errexit was enabled.
862
863yy. Process substitution processes now get their input from /dev/null, since
864 they are asynchronous, not interactive, and not jobs.
865
866zz. Setting nocaseglob no longer turns on case-insensitive regexp matching.
867
868aaa. Fixed a bug that resulted in extra blank lines being added to some history
869 entries containing here-documents.
870
871bbb. Fixed a bug that resulted in incorrect matching of some patterns in word
872 expansion if they expanded to the empty string.
873
874ccc. Fixed here-string expansion so it behaves the same as expansion of the
875 rhs of an assignment statement.
876
877ddd. Changed here-document parsing to no longer allow the end of the here
878 document to delimit a command substitution.
879
880eee. Several fixes to history expansion: multiple :p modifiers work, a ^ word
881 designator works as part of a range, and a `-' is treated as part of a
882 search string if it immediately follows a `!'.
883
884fff. Fixed a bug in pattern substitution with null matches in a string
885 containing multibyte characters.
886
887ggg. Unbinding a key sequence bound with `bind -x' now removes the key sequence
888 from the additional keymap `bind -x' uses.
889
890hhh. Fixed a bug with command start detection for completion so that it doesn't
891 mistake brace expansion for the start of a command.
892
893iii. Fixed a bug that caused local variables with the same name as variables
894 appearing in a function's temporary environment to not be marked as local.
895
896jjj. Fixed a bug that could cause SIGCHLD to be blocked when executing return
897 or exec in the rightmost pipeline element with lastpipe enabled.
898
899kkk. Fixed a bug that could result in commands without the execute bit set
900 being added to the command hash table.
901
902lll. Fixed a bug that allowed non-digits to follow the `#' in a `base#number'
903 integer constant.
904
905mmm. Fixed a bug that made `time -- command' attempt to execute `--'.
906
907nnn. Fixed a couple of bugs with variable transformation using arrays
908 subscripted with `*' or `@'.
909
910ooo. A failure to create a variable using `declare' in a function no longer
911 causes the function to return immediately.
912
913ppp. Fixed a bug that could cause the := word expansion to add a non-null
914 value if attempting to assign a null string when double-quoted.
915
916qqq. Fixed a bug that could cause backslashes quoting double quotes in here
917 document bodies to not be removed when expanding the body.
918
919rrr. Fixed a bug that caused commands following a subshell while the shell is
920 reading input from stdin but not interactive, while job control is
921 enabled, to be executed twice.
922
923sss. Fixed a bug where receiving SIGTERM from a different process while
924 readline was active could cause the shell to terminate.
925
926ttt. In posix mode, running a trap after the read builtin now sees the exit
927 status of the read builtin (e.g., 130 after a SIGINT) in $?.
928
929uuu. Fixed a bug with nameref variables referencing array subscripts used in
930 arithmetic expressions.
931
932vvv. Fixed a bug that caused the pipeline process group id to be reset in the
933 middle of a command list run by a shell started to run a command
934 substitution.
935
936www. Restricted shells can no longer read and write history files with pathnames
937 containing slashes.
938
939xxx. Fixed a couple of problems with 0 and -0 used as arguments to `fc' when
940 not listing commands from the history.
941
942yyy. When `test' is supplied four or more arguments, treat an argument that
943 looks like an operator (e.g., -e), but is in a place where only a string
944 is valid, as a string, as it would be when using the POSIX rules, instead
945 of an operator with a missing argument.
946
947zzz. There is no `compat50' shopt option. Changes to the shell compatibility
948 level should use the BASH_COMPAT variable.
949
950aaaa. Redirection failures with compound commands are now treated as errors
951 that cause the shell to exit if `errexit' is enabled.
952
953bbbb. Redirection failure error messages no longer expand the word in the
954 redirection again.
955
956cccc. History expansion is no longer performed while parsing a here-document
957 inside a command substitution.
958
9592. Changes to Readline
960
961a. There are a number of fixes that were found as the result of fuzzing with
962 random input.
963
964b. Changed the revert-all-at-newline behavior to make sure to start at the end
965 of the history list when doing it, instead of the line where the user hit
966 return.
967
968c. When parsing `set' commands from the inputrc file or an application, readline
969 now allows trailing whitespace.
970
971d. Fixed a bug that left a file descriptor open to the history file if the
972 file size was 0.
973
974e. Fixed a problem with binding key sequences containing meta characters.
975
976f. Fixed a bug that caused the wrong line to be displayed if the user tried to
977 move back beyond the beginning of the history list, or forward past the end
978 of the history list.
979
980g. If readline catches SIGTSTP, it now sets a hook that allows the calling
981 application to handle it if it desires.
982
983h. Fixed a redisplay problem with a prompt string containing embedded newlines.
984
985i. Fixed a problem with completing filenames containing invalid multibyte
986 sequences when case-insensitive comparisons are enabled.
987
988j. Fixed a redisplay problem with prompt strings containing invisible multibyte
989 characters.
990
991k. Fixed a problem with multibyte characters mapped to editing commands that
992 modify the search string in incremental search.
993
994l. Fixed a bug with maintaining the key sequence while resolving a bound
995 command in the presence of ambiguous sequences (sequences with a common
996 prefix), in most cases while attempting to unbind it.
997
998m. Fixed several buffer overflows found as the result of fuzzing.
999
1000n. Reworked backslash handling when translating key sequences for key binding
1001 to be more uniform and consistent, which introduces a slight backwards
1002 incompatibility.
1003
1004o. Fixed a bug with saving the history that resulted in errors not being
1005 propagated to the calling application when the history file is not writable.
1006
1007p. Readline only calls chown(2) on a newly-written history file if it really
1008 needs to, instead of having it be a no-op.
1009
1010q. Readline now behaves better when operate-and-get-next is used when the
1011 history list is `full': when there are already $HISTSIZE entries.
1012
1013r. Fixed a bug that could cause vi redo (`.') of a replace command not to work
1014 correctly in the C or POSIX locale.
1015
1016s. Fixed a bug with vi-mode digit arguments that caused the last command to be
1017 set incorrectly. This prevents yank-last-arg from working as intended, for
1018 example.
1019
10203. New Features in Bash
1021
1022a. `bind -x' now supports different bindings for different editing modes and
1023 keymaps.
1024
1025b. Bash attempts to optimize the number of times it forks when executing
1026 commands in subshells and from `bash -c'.
1027
1028c. Here documents and here strings now use pipes for the expanded document if
1029 it's smaller than the pipe buffer size, reverting to temporary files if it's
1030 larger.
1031
1032d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut
1033
1034e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL
1035 and those that were SIG_IGN when the shell starts.
1036
1037f. The shell now expands the history number (e.g., in PS1) even if it is not
1038 currently saving commands to the history list.
1039
1040g. `read -e' may now be used with arbitrary file descriptors (`read -u N').
1041
1042h. The `select' builtin now runs traps if its internal call to the read builtin
1043 is interrupted by a signal.
1044
1045i. SRANDOM: a new variable that expands to a 32-bit random number that is not
1046 produced by an LCRNG, and uses getrandom/getentropy, falling back to
1047 /dev/urandom or arc4random if available. There is a fallback generator if
1048 none of these are available.
1049
1050j. shell-transpose-words: a new bindable readline command that uses the same
1051 definition of word as shell-forward-word, etc.
1052
1053k. The shell now adds default bindings for shell-forward-word,
1054 shell-backward-word, shell-transpose-words, and shell-kill-word.
1055
1056l. Bash now allows ARGV0 appearing in the initial shell environment to set $0.
1057
1058m. If `unset' is executed without option arguments, bash tries to unset a shell
1059 function if a name argument cannot be a shell variable name because it's not
1060 an identifier.
1061
1062n. The `test -N' operator uses nanosecond timestamp granularity if it's
1063 available.
1064
1065o. Bash posix mode now treats assignment statements preceding shell function
1066 definitions the same as in its default mode, since POSIX has changed and
1067 no longer requires those assignments to persist after the function returns
1068 (POSIX interp 654).
1069
1070p. BASH_REMATCH is no longer readonly.
1071
1072q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n'
1073 or `wait' without arguments.
1074
1075r. Sorting the results of pathname expansion now uses byte-by-byte comparisons
1076 if two strings collate equally to impose a total order; the result of a
1077 POSIX interpretation (#963 and #1070).
1078
1079s. Bash now allows SIGINT trap handlers to execute recursively.
1080
1081t. Bash now saves and restores state around setting and unsetting posix mode,
1082 instead of having unsetting posix mode set a known state.
1083
1084u. Process substitution is now available in posix mode.
1085
1086v. READLINE_MARK: a new variable available while executing commands bound with
1087 `bind -x', contains the value of the mark.
1088
1089w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell
1090 startup.
1091
1092x. `test -v N' can now test whether or not positional parameter N is set.
1093
1094y. `local' now honors the `-p' option to display all local variables at the
1095 current context.
1096
1097z. The `@a' variable transformation now prints attributes for unset array
1098 variables.
1099
1100aa. The `@A' variable transformation now prints a declare command that sets a
1101 variable's attributes if the variable has attributes but is unset.
1102
1103bb. `declare' and `local' now have a -I option that inherits attributes and
1104 value from a variable with the same name at a previous scope.
1105
1106cc. When run from a -c command, `jobs' now reports the status of completed jobs.
1107
1108dd. New `U', `u', and `L' parameter transformations to convert to uppercase,
1109 convert first character to uppercase, and convert to lowercase,
1110 respectively.
1111
1112ee. PROMPT_COMMAND: can now be an array variable, each element of which can
1113 contain a command to be executed like a string PROMPT_COMMAND variable.
1114
1115ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource.
1116
1117gg. Associative arrays may be assigned using a list of key-value pairs within
1118 a compound assignment. Compound assignments where the words are not of
1119 the form [key]=value are assumed to be key-value assignments. A missing or
1120 empty key is an error; a missing value is treated as NULL. Assignments may
1121 not mix the two forms.
1122
1123hh. New `K' parameter transformation to display associative arrays as key-
1124 value pairs.
1125
1126ii. Writing history to syslog now handles messages longer than the syslog max
1127 length by writing multiple messages with a sequence number.
1128
1129jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since
1130 they are nominally integer variables. LINENO is not an integer variable.
1131
1132kk. Bash temporarily suppresses the verbose option when running the DEBUG trap
1133 while running a command from the `fc' builtin.
1134
1135ll. `wait -n' now accepts a list of job specifications as arguments and will
1136 wait for the first one in the list to change state.
1137
1138mm. The associative array implementation can now dynamically increase the
1139 size of the hash table based on insertion patterns.
1140
1141nn. HISTFILE is now readonly in a restricted shell.
1142
1143oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit
1144 systems.
1145
11464. New Features in Readline
1147
1148a. If a second consecutive completion attempt produces matches where the first
1149 did not, treat it as a new completion attempt and insert a match as
1150 appropriate.
1151
1152b. Bracketed paste mode works in more places: incremental search strings, vi
1153 overstrike mode, character search, and reading numeric arguments.
1154
1155c. Readline automatically switches to horizontal scrolling if the terminal has
1156 only one line.
1157
1158d. Unbinding all key sequences bound to a particular readline function now
1159 descends into keymaps for multi-key sequences.
1160
1161e. rl-clear-display: new bindable command that clears the screen and, if
1162 possible, the scrollback buffer (bound to emacs mode M-C-l by default).
1163
1164f. New active mark and face feature: when enabled, it will highlight the text
1165 inserted by a bracketed paste (the `active region') and the text found by
1166 incremental and non-incremental history searches. This is tied to bracketed
1167 paste and can be disabled by turning off bracketed paste.
1168
1169g. Readline sets the mark in several additional commands.
1170
1171h. Bracketed paste mode is enabled by default.
1172
1173i. Readline tries to take advantage of the more regular structure of UTF-8
1174 characters to identify the beginning and end of characters when moving
1175 through the line buffer.
1176
1177j. The bindable operate-and-get-next command (and its default bindings) are
1178 now part of readline instead of a bash-specific addition.
1179
1180------------------------------------------------------------------------------
d233b485
CR
1181This document details the changes between this version, bash-5.0-release, and
1182the previous version, bash-5.0-rc1.
1183
11841. Changes to Bash
1185
1186a. Tilde expansion isn't performed on indexed array subscripts, even for
1187 backwards compatibility.
1188
1189b. The shell doesn't exit in posix mode if the eval builtin gets a parse
1190 error when run by the command builtin.
1191
1192c. Fixed a bug that caused a shell comment in an alias to not find the end
1193 of the alias properly.
1194
1195d. Reverted a change from April, 2018 that caused strings containing
1196 backslashes to be flagged as glob patterns.
1197
11982. Changes to Readline
1199
12003. New Features in Bash
1201
12024. New Features in Readline
1203
1204------------------------------------------------------------------------------
1205This document details the changes between this version, bash-5.0-rc1, and
1206the previous version, bash-5.0-beta2.
1207
12081. Changes to Bash
1209
1210a. Fix to initial word completion detection code.
1211
1212b. Fixed a bug that caused issues with assignment statements containing ^A in
1213 the value assigned when IFS contains ^A.
1214
1215c. Added a fallback to fnmatch() when strcoll can't correctly deal with
1216 bracket expression character equivalence classes.
1217
1218d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command
1219 when running a trap handler containing [[ or (( commands.
1220
1221e. Fixed a bug that caused nameref assignments in the temporary environment
1222 to potentially create variables with invalid names.
1223
1224f. Fixed a bug that caused `local -' to turn off alias expansion in scripts.
1225
1226g. Fixed a parser issue with a command string containing EOF after an invalid
1227 command as an argument to a special builtin not causing a posix-mode shell
1228 to exit.
1229
1230h. Made a slight change to the FNV-1 string hash algorithm used for associative
1231 arrays (corrected the initial seed).
1232
12332. Changes to Readline
1234
12353. New Features in Bash
1236
1237a. The `select' command now supports command forms without a word list
1238 following `in'.
1239
12404. New Features in Readline
1241
1242------------------------------------------------------------------------------
1243This document details the changes between this version, bash-5.0-beta2, and
1244the previous version, bash-5.0-beta.
1245
12461. Changes to Bash
1247
1248a. Fixed a bug that could cause a seg fault while parsing a subshell command
1249 inside a command substitution.
1250
1251b. Fixed several small memory leaks uncovered by coverity.
1252
1253c. Fixed a problem with command substitution inside an interactive shell that
1254 could cause the parent to receive a SIGHUP.
1255
1256d. Fixed a problem with using `*' and `@' as subscripts when assigning values
1257 to an associative array with assoc_expand_once enabled.
1258
1259e. Fixed a bug that could cause a huge memory allocation when completing a
1260 word beginning with an invalid tilde expansion.
1261
8868edaf 1262f. Cleaned up some incompatibilities with bash-4.4 when expanding indexed array
d233b485
CR
1263 subscripts used in arithmetic expansions when assoc_expand_once is enabled.
1264
1265g. The ${parameter@a} expansion will display attributes even if `parameter' is
1266 unset.
1267
1268h. Fixed a bug that caused the output of `set' to cut off some variables before
1269 printing the value.
1270
1271i. Treat a failure to assign a variable when using the ${x:=value} expansion
1272 as an expansion error, so non-interactive posix-mode shells exit
1273
1274j. Fixed a problem when expanding $* in a context where word splitting is not
1275 performed when IFS is NULL.
1276
1277k. Temp files used to store here documents are forced readable, no matter what
1278 the user's umask says.
1279
1280l. Fixed a problem where an interrupted brace expansion could cause the shell
1281 to attempt to free an invalid memory location.
1282
1283m. Make sure to check for any terminating signals after running a trap
1284 handler; don't wait until the next time we process traps.
1285
1286n. Fixed a bug that caused "return" to act like a special builtin with respect
1287 to variable assignments even when preceded by "command".
1288
1289o. POSIX-mode shells now return failure if the cd builtin fails due to the
1290 absolute directory name being longer than PATH_MAX, instead of trying
1291 again with a relative pathname.
1292
1293p. Fixed a problem with FUNCNAME occasionally being visible when not executing
1294 a shell function.
1295
1296q. Fixed a problem with the expansions performed on the WORD in the case
1297 command.
1298
1299r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during
1300 word splitting and the read builtin.
1301
1302s. Fixed a problem with expanding an array with subscript `*' when all the
1303 elements expand to the empty string, and making sure the expansion honors
1304 the `:' specifier.
1305
13062. Changes to Readline
1307
1308a. Fixed a bug with adding multibyte characters to an incremental search string.
1309
1310b. Fixed a bug with redoing text insertions in vi mode.
1311
1312c. Fixed a bug with pasting text into an incremental search string if bracketed
1313 paste mode is enabled. ESC cannot be one of the incremental search
1314 terminator characters for this to work.
1315
1316d. Fixed a bug with anchored search patterns when performing searches in vi
1317 mode.
1318
13193. New Features in Bash
1320
1321a. Associative and indexed arrays now allow subscripts consisting solely of
1322 whitespace.
1323
1324b. `checkwinsize' is now enabled by default.
1325
1326c. The `localvar_unset' shopt option is now visible and documented.
1327
1328d. The `progcomp_alias' shopt option is now visible and documented.
1329
1330e. The signal name processing code now understands `SIGRTMIN+n' all the way
1331 up to SIGRTMAX.
1332
1333f. There is a new `seq' loadable builtin.
1334
1335g. Trap execution now honors the (internal) max invocations of `eval', since
1336 traps are supposed to be executed as if using `eval'.
1337
1338h. The $_ variable doesn't change when the shell executes a command that forks.
1339
1340i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though
1341 conforming applications aren't supposed to use them.
1342
1343j. POSIX mode now enables the `shift_verbose' option.
1344
13454. New Features in Readline
1346
1347a. Readline now allows application-defined keymap names; there is a new public
1348 function, rl_set_keymap_name(), to do that.
1349
1350b. The "Insert" keypad key, if available, now puts readline into overwrite
1351 mode.
1352
1353------------------------------------------------------------------------------
1354This document details the changes between this version, bash-5.0-beta, and
1355the previous version, bash-5.0-alpha.
1356
13571. Changes to Bash
1358
1359a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this
1360 is where POSIX says the subshell is not "enclosed" by the loop.
1361
1362b. Added more UTF-8-specific versions of multibyte functions, and optimized
1363 existing functions if the current locale uses UTF-8 encoding.
1364
1365c. In POSIX mode, assignments preceding regular builtins should not persist
1366 when the builtin completes.
1367
1368d. Added additional checks to special array assignment (e.g., BASH_ALIASES)
1369 so it can't be used to bypass validity checks performed in other places.
1370
1371e. The `!!' history expansion now refers to the previous history entry as
1372 expected, even if used on the second or subsequent line of a multi-line
1373 history entry.
1374
1375f. Fixed a bug that could cause the shell to dereference a NULL pointer if
1376 the environment (`environ') is set to NULL.
1377
1378g. Bash uses slightly better integer overflow handling for brace sequence
1379 expansion on systems where ints are 32 bits and intmax_t is 64 bits.
1380
1381h. Fixed a bug setting attributes for a variable named as an argument to
1382 `declare' that also appears as a nameref in the temporary environment.
1383
1384i. Fixed several bugs that could cause assignments to namerefs to create
1385 variables with invalid names.
1386
1387j. Fixed a bug that could result in the SIGINT handler being set incorrectly
1388 in asynchronous subshells.
1389
1390k. Fixed a bug that could cause `bash -t' to not execute the specified command.
1391
1392l. Fixed several bugs that caused the shell to operate on the wrong variable
1393 when using namerefs with the same name as a global variable in shell
1394 functions.
1395
1396m. Internal changes to how the shell handles variables with invalid names in
1397 the initial environment and to prevent variables with invalid names from
1398 being added to the environment instead of passing them on to children.
1399
1400n. Changes to make sure that an expansion that results in a quoted null string
1401 is reflected in the expansion, even if the word expands to nothing.
1402
1403o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand
1404 the same way after the recent changes for POSIX interpretation 888.
1405
1406p. Saving and restoring the positional parameters at function entry and exit
1407 is considerably more efficient; noticeably so when there are large numbers
1408 of positional parameters.
1409
1410q. Fixed a bug that caused `lastpipe' and `pipefail' to return an incorrect
1411 status for the pipeline if there was more than one external command in a
1412 loop body appearing in the last pipeline element.
1413
1414r. Fixed a bug that caused value conversion errors with the printf builtin's
1415 %u and %f conversion specifications and invalid constants.
1416
14172. Changes to Readline
1418
1419a. Added more UTF-8-specific versions of multibyte functions, and optimized
1420 existing functions if the current locale uses UTF-8 encoding.
1421
1422b. Fixed a problem with bracketed-paste inserting more than one character and
1423 interacting with other readline functions.
1424
1425c. Fixed a bug that caused the history library to attempt to append a history
1426 line to a non-existent history entry.
1427
1428d. If using bracketed paste mode, output a newline after the \r that is the
1429 last character of the mode disable string to avoid overwriting output.
1430
1431e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better
1432 handle multibyte characters.
1433
1434f. Fixed a redisplay problem that caused an extra newline to be generated on
1435 accept-line when the line length is exactly the screenwidth.
1436
14373. New Features in Bash
1438
1439a. Bash no longer allows variable assignments preceding a special builtin that
1440 changes variable attributes to propagate back to the calling environment
1441 unless the compatibility level is 44 or lower.
1442
1443b. You can set the default value for $HISTSIZE at build time in config-top.h.
1444
1445c. The `complete' builtin now accepts a -I option that applies the completion
1446 to the initial word on the line.
1447
1448d. The internal bash malloc now uses mmap (if available) to satisfy requests
1449 greater than 128K bytes, so free can use mfree to return the pages to the
1450 kernel.
1451
1452e. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup
1453 unless it's in debugging mode, as the documentation has always said, but
1454 will dynamically create them if a script references them at the top level
1455 without having enabled debugging mode.
1456
1457f. The localvar_inherit option will not attempt to inherit a value from a
1458 variable of an incompatible type (indexed vs. associative arrays, for
1459 example).
1460
1461g. The `globasciiranges' option is now enabled by default; it can be set to
1462 off by default at configuration time.
1463
14644. New Features in Readline
1465
1466a. The history expansion library now understands command and process
1467 substitution and extended globbing and allows them to appear anywhere in a
1468 word.
1469
1470b. The history library has a new variable that allows applications to set the
1471 initial quoting state, so quoting state can be inherited from a previous
1472 line.
1473
1474------------------------------------------------------------------------------
1475This document details the changes between this version, bash-5.0-alpha, and
1476the previous version, bash-4.4-release.
1477
14781. Changes to Bash
1479
1480a. Fixed a bug that could cause traps in background jobs to give the terminal
1481 to the wrong process group.
1482
1483b. Fixed a bug that caused `kill -l 0' to print an out-of-range error.
1484
1485c. Fixed a problem that could result in here-documents being displayed in
1486 the wrong order.
1487
1488d. Fixed a number of out-of-bounds and free memory read errors found via
1489 fuzzing.
1490
1491e. Fixed a subshell inheritance problem that could cause a subshell to wait for
1492 the wrong process.
1493
1494f. Fixed a bug that caused SHLVL to be incremented one too many times when
1495 creating subshells.
1496
1497g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with
1498 job control enabled.
1499
1500h. Fixed a spurious warning about unterminated ${ or $( constructs during
1501 word completion.
1502
1503i. The shell no longer runs traps if a signal arrives while reading command
1504 substitution output.
1505
1506j. Fixed an arithmetic expansion error that could allow ++var++ as valid
1507 syntax.
1508
1509k. Fixed an error that allowed out-of-bounds references to the directory stack.
1510
1511l. The shell does a better job of saving multi-line history entries with
1512 embedded comments.
1513
1514m. Fixed a bug that could cause quoted bracket expressions in regular expression
1515 arguments to `[[' to not match correctly.
1516
1517n. Fixed a bug that could cause an IFS character in a word to result in an
1518 extra '\001' character in the expansion.
1519
1520o. A trailing backslash in a glob pattern can match a trailing backslash in the
1521 string.
1522
1523p. Fixed a memory leak in the process creation code path when job control is
1524 enabled.
1525
1526q. Fixed a bug that caused `printf' to output broken surrogate pairs for
1527 Japanese locales.
1528
1529r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to
1530 kill an interactive shell.
1531
1532s. Fixed a bug that could cause the `read' builtin to not fully read a
1533 multibyte character.
1534
1535t. Fixed a bug that could cause identifiers to be evaluated in conditional
1536 arithmetic expressions even when evaluation is suppressed.
1537
1538u. Fixed a bug that could result in command substitution, when executed in a
1539 context where word splitting is not performed, to leave a stray '\001'
1540 character in the string.
1541
1542v. Fixed a bug that could cause history expansion to be disabled in a non-
1543 interactive shell even if `-o histexpand' is supplied at startup.
1544
1545w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters.
1546
1547x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions.
1548
1549y. If indirect expansion attempts to indirectly reference through an unset
1550 variable, report an error.
1551
1552z. Added a guard to prevent the shell from looping while receiving an endless
1553 stream of SIGTTIN at shell startup.
1554
1555aa. Fixed a bug with parsing here documents inside a command substitution when
1556 looking for the closing delimiter.
1557
1558bb. Fixed a bug that caused printf to not quote all <blank> characters in the
1559 current locale when using the `%q' format specifier.
1560
1561cc. Fixed a bug with bash's internal buffered I/O system that caused the input
1562 pointer to not be reset when read(2) returned an EOF.
1563
1564dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will
1565 not interrupt open/read/write system calls.
1566
1567ee. The ERR trap now reports line numbers more reliably.
1568
1569ff. The shell no longer tries to manipulate the terminal process group if a
1570 command or process substitution is killed by SIGTERM when job control is
1571 enabled.
1572
1573gg. Fixed a bug that caused extglob patterns to match filenames beginning with
1574 a period.
1575
1576hh. File descriptors open for writing to here documents are no longer available
1577 to subshells.
1578
1579ii. Make sure word completion doesn't perform command or process substitution.
1580
1581jj. Fixed a bug with parsing $$'...' inside a command substitution.
1582
1583kk. Fixed a bug that caused bash to remove backslash-newline pairs from the
1584 body of a here-document with a quoted delimiter inside a command
1585 substitution.
1586
1587ll. Fixed a bug that could cause the shell to hang when adding a pid to the
1588 table of background process exit statuses.
1589
1590mm. Fixed a bug that could cause 0x01 characters to be doubled in the output
1591 of process substitution.
1592
1593nn. Restricted shells now clear the hash table before making the PATH variable
1594 read-only.
1595
1596oo. There are a number of changes to the expansion of $* and $@ in contexts
1597 where word splitting does not occur (quoted and unquoted), with IFS set
1598 to NULL or a non-standard value, mostly to deal with the consequences of
1599 the behavior defined in Posix interpretation 888.
1600
1601pp. There are a number of changes to nameref variable handling to avoid
1602 creating variables with invalid names.
1603
1604qq. A non-interactive posix mode shell no longer exits when an assignment
1605 statement fails if the assignment is utimately being performed by the
1606 `command' builtin.
1607
1608rr. When using character class names for globbing, don't allow case
1609 insensitivity, even if nocaseglob is enabled.
1610
1611ss. Fixed a bug that allowed some redirections to stay in place if a later
1612 redirection failed.
1613
1614tt. Fixed a bug in how command and process substitutions are recognized within
1615 other parameter expansions.
1616
1617uu. Fixed a bug that caused bash to loop under certain circumstances when
1618 performing arithmetic expansion on a variable whose value is an invalid
1619 expression.
1620
1621vv. Fixed a bug that could cause bash to expand aliases inappropriately while
1622 parsing compound commands like `case'.
1623
1624ww. Fixed a bug that could cause `read -N' to fail to read complete multibyte
1625 characters, even when the sequences are incomplete or invalid, with or
1626 without readline.
1627
1628xx. Fixed a bug that could cause `case' to fail to match patterns containing
1629 0x01 characters.
1630
1631yy. Fixed a bug that caused exported functions to contain stray 0x01 characters.
1632
1633zz. Fixed some inconsistencies with how the history number is handled in the
1634 various prompt strings.
1635
1636aaa. Fixed a bug that could cause a core dump if READLINE_LINE was unset
1637 inside a shell function bound to a key sequence with `bind -x'.
1638
1639bbb. Fixed a bug that could cause bash to not read a token terminator correctly
1640 if a command substitution was used inside an arithmetic `for' command.
1641
1642ccc. Fixed problems that could occur with a fatal arithmetic expansion error
1643 in a context (like prompt expansion) where you can't jump back to the
1644 top level.
1645
1646ddd. Expression errors in arithmetic `for' commands are treated more like
1647 shell syntax errors.
1648
1649eee. Fixed a parser synchronization error resulting from a syntax error
1650 followed immediately by an EOF.
1651
1652fff. When executing a shell function, the first line in the function ($LINENO)
1653 is line 1 instead of line 0, as Posix requires.
1654
1655ggg. In Posix mode, bash will canonicalize the value of PWD it inherits from
1656 the environment and use that to set its idea of the current directory.
1657
1658hhh. If LINENO is exported, bash needs to regenerate its value each time it
1659 constructs the environment.
1660
1661iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'.
1662
1663jjj. Make sure the `coproc' command returns an appropriate status if the NAME
1664 argument is invalid.
1665
1666kkk. Fixed a problem with arithmetic expressions containing array references
1667 that contain arithmetic expressions with syntax errors.
1668
1669lll. The `select' command and help builtin will use $COLUMNS before the window
1670 size returned from the kernel as the terminal width.
1671
1672mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to
1673 detect file descriptor errors.
1674
1675nnn. The `read' builtin now does a better job of acting on signals that don't
1676 interrupt read(2).
1677
1678ooo. Fixed some cases where `printf -v' did not return failure status on a
1679 variable assignment error.
1680
1681ppp. Fixed temporary environment propagation back to the current environment
1682 so that it doesn't happen for special builtins run by the `command'
1683 builtin.
1684
1685qqq. Fixed a bug when searching for the end of a here-document delimiter in a
1686 command substitution.
1687
1688rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail.
1689
1690sss. Fixed a bug that could cause reserved words to not be recognized in a
1691 for statement without the `in' inside a command substitution.
1692
1693ttt. Fixed a bug that could cause a double-free in a timed command with an
1694 expansion error.
1695
1696uuu. Fixed a bug that could cause a core dump if a script switches from a UTF-8
1697 locale to a different locale after displaying a lone surrogate character.
1698
1699vvv. Fixed cases where bash prematurely removed FIFOs attached to process
1700 substitutions.
1701
1702www. Fixed a problem with calculating the size of the table that stores exit
1703 statuses from background processes when the child process resource limit
1704 is very large.
1705
1706xxx. Fixed a memory leak with functions using `return' when using FIFOs for
1707 standard input.
1708
1709yyy. `wait' without arguments attempts to wait for all active process
1710 substitution processes.
1711
1712zzz. Fixed a bug where an indirect parameter was subjected to word splitting
1713 when trying to find the indirected variable name.
1714
1715aaaa. Fixed a bug that could allow restricted shell users to add commands to
1716 the hash table.
1717
1718bbbb. When using the `!(patlist)' extended globbing operator, a filename
1719 beginning with a `.' that doesn't match any of the patterns is not
1720 returned as a match if leading dots must be matched explicitly.
1721
1722cccc. Fixed a bug that could cause line number and source file information for
1723 a function definition to be incorrect if there are multiple definitions.
1724
1725dddd. Fixed a bug that could cause builtins like `readonly' to behave
1726 differently when applied to arrays and scalar variables within functions.
1727
1728eeee. Fixed a bug that could cause alias expansion to add an extra space to
1729 a quoted string that begins outside the alias expansion.
1730
1731ffff. Fixed a bug that could result in unwanted alias expansion after timing
1732 the null command.
1733
1734gggg. Fixed a bug that could cause a core dump if a timestamp in a history
1735 file overflowed a time_t.
1736
1737hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since
1738 the kernel calls make those file descriptors read-write.
1739
1740iiii. Fixed a problem with splitting double-quoted words for programmable
1741 completion when the double quote immediately follows another word
1742 delimiter.
1743
1744jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share
1745 the same input buffer.
1746
1747kkkk. The error message resulting from ${x:?} and ${x?} now differs depending
1748 on whether the variable is null or unset.
1749
1750llll. In Posix mode, the shell exits if a variable assignment fails and precedes
1751 an empty simple command (after expansion).
1752
1753mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to
1754 drop characters.
1755
1756nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal
1757 due to Linux pid namespace peculiarities.
1758
1759oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for
1760 `bind -x' commands.
1761
1762pppp. Fixed a bug that could cause SIGINT recursion when running an external
1763 command in a trap the shell takes after a command exits due to SIGINT.
1764
1765qqqq. Make sure the shell turns off job control before running the command-
1766 not-found handle, so the command doesn't try to manipulate process
1767 groups.
1768
1769rrrr. Fixed a problem with timing process substitutions that caused the shell
1770 to print timing information for the calling command.
1771
1772ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark
1773 the delimiter as quoted (inhibiting expansion of the here-document
1774 contents).
1775
1776tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and
1777 conditional command pattern matches.
1778
1779uuuu. Fixed a bug that could cause the pattern matching engine to not recognize
1780 locale-specific character classes.
1781
1782vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently.
1783
1784wwww. The `globstar' code now skips over symbolic links to directories,
1785 preventing them from being scanned twice.
1786
1787xxxx. When running `bind -x' commands, bash now sets READLINE_POINT based on
1788 the number of characters in the readline line buffer, not the number of
1789 bytes.
1790
1791yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN
1792 trap when using `eval return'.
1793
1794zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document.
1795
1796aaaaa. The process substitution code now closes and unlinks FIFOs when the
1797 process on the other side exits, in order to prevent SIGPIPE or
1798 waiting until a FIFO opened for read has a writer.
1799
1800bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in
1801 an {id}>foo construct.
1802
1803ccccc. After a Posix discussion, the pattern matching engine just skips over
1804 invalid character classes in bracket expressions, instead of matching
1805 them like individual characters in the expression.
1806
1807ddddd. Fixed a posix-mode problem with variable scoping when creating variables
1808 from assignment statements preceding special builtins.
1809
1810eeeee. Fixed a bug that could cause patterns containing backslashes to not be
1811 run through the pattern matching engine.
1812
1813fffff. Fixed a bug that could cause redirections to compound commands to not
1814 be `undone' if the file descriptor in the redirection was closed when
1815 the redirection was initially processed.
1816
1817ggggg. Fixed a bug that could cause buffer corruption when using `bind -x' in
1818 a command execute as a result of a key binding installed by `bind -x'.
1819
18202. Changes to Readline
1821
1822a. Added a guard to prevent nested macros from causing an infinite expansion
1823 loop.
1824
1825b. Instead of allocating enough history list entries to hold the maximum list
1826 size, cap the number allocated initially.
1827
1828c. Added a strategy to avoid allocating huge amounts of memory if a block of
1829 history entries without timestamps occurs after a block with timestamps.
1830
1831d. Added support for keyboard timeouts when an ESC character is the last
1832 character in a macro.
1833
1834e. There are several performance improvements when in a UTF-8 locale.
1835
1836f. Readline does a better job of preserving the original set of blocked
1837 signals when using pselect() to wait for input.
1838
1839g. Fixed a bug that caused multibyte characters in macros to be mishandled.
1840
1841h. Fixed several bugs in the code that calculates line breaks when expanding
1842 prompts that span several lines, contain multibyte characters, and contain
1843 invisible character seqeuences.
1844
1845i. Fixed several bugs in cursor positioning when displaying lines with prompts
1846 containing invisible characters and multibyte characters.
1847
1848j. When performing case-insensitive completion, Readline no longer sorts the
1849 list of matches unless directed to do so.
1850
1851k. Fixed a problem with key sequences ending with a backslash.
1852
1853l. Fixed out-of-bounds and free memory read errors found via fuzzing.
1854
1855m. Fixed several cases where the mark was set to an invalid value.
1856
1857n. Fixed a problem with the case-changing operators in the case where the
1858 lower and upper case versions of a character do not have the same number
1859 of bytes.
1860
1861o. Handle incremental and non-incremental search character reads returning EOF.
1862
1863p. Handle the case where a failing readline command at the end of a multi-key
1864 sequence could be misinterpreted.
1865
1866q. The history library now prints a meaningful error message if the history
1867 file isn't a regular file.
1868
1869r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace
1870 a multibyte character.
1871
1872s. The key binding code now attempts to remove a keymap if a key unbinding
1873 leaves it empty.
1874
1875t. Fixed a line-wrapping issue that caused problems for some terminal
1876 emulators.
1877
1878u. If there is a key bound to the tty's VDISCARD special character, readline
1879 disables VDISCARD while it is active.
1880
1881v. Fixed a problem with exiting bracketed paste mode on terminals that assume
1882 the bracketed paste mode character sequence contains visible characters.
1883
1884w. Fixed a bug that could cause a key binding command to refer to an
1885 uninitialized variable.
1886
18873. New Features in Bash
1888
1889a. The `wait' builtin can now wait for the last process substitution created.
1890
1891b. There is an EPOCHSECONDS variable, which expands to the time in seconds
1892 since the Unix epoch.
1893
1894c. There is an EPOCHREALTIME variable, which expands to the time in seconds
1895 since the Unix epoch with microsecond granularity.
1896
1897d. New loadable builtins: rm, stat, fdflags.
1898
1899e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment.
1900
1901f. When supplied a numeric argument, the shell-expand-line bindable readline
1902 command does not perform quote removal and suppresses command and process
1903 substitution.
1904
1905g. `history -d' understands negative arguments: negative arguments offset from
1906 the end of the history list.
1907
1908h. The `name' argument to the `coproc' reserved word now undergoes word
1909 expansion, so unique coprocs can be created in loops.
1910
1911i. A nameref name resolution loop in a function now resolves to a variable by
1912 that name in the global scope.
1913
8868edaf 1914j. The `wait' builtin now has a `-f' option, which signifies to wait until the
d233b485
CR
1915 specified job or process terminates, instead of waiting until it changes
1916 state.
1917
1918k. There is a define in config-top.h that allows the shell to use a static
1919 value for $PATH, overriding whatever is in the environment at startup, for
1920 use by the restricted shell.
1921
1922l. Process substitution does not inherit the `v' option, like command
1923 substitution.
1924
1925m. If a non-interactive shell with job control enabled detects that a foreground
1926 job died due to SIGINT, it acts as if it received the SIGINT.
1927
1928n. The SIGCHLD trap is run once for each exiting child process even if job
1929 control is not enabled when the shell is in Posix mode.
1930
1931o. A new shopt option: localvar_inherit; if set, a local variable inherits the
1932 value of a variable with the same name at the nearest preceding scope.
1933
1934p. `bind -r' now checks whether a key sequence is bound before binding it to
1935 NULL, to avoid creating keymaps for a multi-key sequence.
1936
1937q. A numeric argument to the line editing `operate-and-get-next' command
1938 specifies which history entry to use.
1939
1940r. The positional parameters are now assigned before running the shell startup
1941 files, so startup files can use $@.
1942
1943s. There is a compile-time option that forces the shell to disable the check
1944 for an inherited OLDPWD being a directory.
1945
1946t. The `history' builtin can now delete ranges of history entries using
1947 `-d start-end'.
1948
1949u. The `vi-edit-and-execute-command' bindable readline command now puts readline
1950 back in vi insertion mode after executing commands from the edited file.
1951
1952v. The command completion code now matches aliases and shell function names
1953 case-insensitively if the readline completion-ignore-case variable is set.
1954
1955w. There is a new `assoc_expand_once' shell option that attempts to expand
1956 associative array subscripts only once.
1957
1958x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended
1959 debugging mode is active. The old behavior of unconditionally setting them
1960 is available as part of the shell compatibility options.
1961
1962y. The `umask' builtin now allows modes and masks greater than octal 777.
1963
1964z. The `times' builtin now honors the current locale when printing a decimal
1965 point.
1966
1967aa. There is a new (disabled by default, undocumented) shell option to enable
1968 and disable sending history to syslog at runtime.
1969
19704. New Features in Readline
1971
1972a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
1973 Posix specifies (uses fnmatch(3) if available).
1974
1975b. There are new `next-screen-line' and `previous-screen-line' bindable
1976 commands, which move the cursor to the same column in the next, or previous,
1977 physical line, respectively.
1978
1979c. There are default key bindings for control-arrow-key key combinations.
1980
1981d. A negative argument (-N) to `quoted-insert' means to insert the next N
1982 characters using quoted-insert.
1983
1984e. New public function: rl_check_signals(), which allows applications to
1985 respond to signals that readline catches while waiting for input using
1986 a custom read function.
1987
1988f. There is new support for conditionally testing the readline version in an
1989 inputrc file, with a full set of arithmetic comparison operators available.
1990
1991g. There is a simple variable comparison facility available for use within an
1992 inputrc file. Allowable operators are equality and inequality; string
1993 variables may be compared to a value; boolean variables must be compared to
1994 either `on' or `off'; variable names are separated from the operator by
1995 whitespace.
1996
1997------------------------------------------------------------------------------
a0c0a00f
CR
1998This document details the changes between this version, bash-4.4-release, and
1999the previous version, bash-4.4-rc2.
2000
20011. Changes to Bash
2002
2003a. Fixed a bug that could potentially result in a crash due to an integer
2004 overflow.
2005
2006b. Fixed a bug in where commands printed due to `set -x' could be incorrectly
2007 quoted if being printed in contexts where they haven't yet been expanded.
2008
2009c. Fixed several memory leaks.
2010
2011d. Fixed a bug that could potentially cause the terminal attributes to be
2012 set incorrectly by a command run from a programmable completion.
2013
2014e. Fixed several potential buffer overflow issues in the word expansion code.
2015
20162. Changes to Readline
2017
20183. New Features in Bash
2019
20204. New Features in Readline
a0c0a00f
CR
2021------------------------------------------------------------------------------
2022This document details the changes between this version, bash-4.4-rc2, and
2023the previous version, bash-4.4-beta2.
2024
20251. Changes to Bash
2026
2027a. Fixed an out-of-bounds read in the redirection operator completion code.
2028
2029b. Fixed execution context so `until continue' doesn't disable execution for
2030 subsequent commands.
2031
2032c. Fixed trap handling code so traps don't inherit a command's temporary
2033 environment.
2034
2035d. Fixed a bug that resulted in incorrect line numbers when a function is
2036 defined as part of another function's execution.
2037
2038e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting
2039 is not performed and $IFS is not the default.
2040
2041f. Fixed a bug that caused ''"$@" to not expand to an empty argument when
2042 there are no positional parameters.
2043
2044g. Fixed a bug that caused a shell compiled without job control to use the
2045 incorrect exit status for builtin commands preceded by a command executed
2046 from the file system that causes the shell to call waitpid().
2047
2048h. Improved word completion for quoted strings containing unterminated command
2049 substitutions with embedded double quotes.
2050
20512. Changes to Readline
2052
2053a. Fixed a bug that caused mode strings to be displayed incorrectly if the
2054 prompt was shorter than the mode string.
2055
20563. New Features in Bash
2057
2058a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
2059 the nounset option is enabled no longer throws an unbound variable error.
2060
20614. New Features in Readline
2062
2063a. New application-callable function: rl_pending_signal(): returns the signal
2064 number of any signal readline has caught but not yet handled.
2065
2066b. New application-settable variable: rl_persistent_signal_handlers: if set
2067 to a non-zero value, readline will enable the readline-6.2 signal handler
2068 behavior in callback mode: handlers are installed when
2069 rl_callback_handler_install is called and removed removed when a complete
2070 line has been read.
2071
2072------------------------------------------------------------------------------
2073This document details the changes between this version, bash-4.4-beta2, and
2074the previous version, bash-4.4-rc1.
2075
20761. Changes to Bash
2077
2078a. Fixed a memory leak when processing ${!var[@]}.
2079
2080b. Fixed a bug that caused subshells to free trap strings associated with
2081 inherited signals.
2082
2083c. Inheriting BASHOPTS from the environment now works to force actions
2084 associated with enabling an option, instead of just marking the option
2085 as enabled.
2086
2087d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
2088 restricted mode.
2089
2090e. Fixed a bug caused by an accidental omission of part of the original patch
2091 for EXECIGNORE.
2092
2093e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
2094
2095f. Fixed a bug that caused parsing errors in command substitutions with
2096 consecutive case statements separated by newlines.
2097
2098g. Updated logic used to decide whether bash is running inside an emacs
2099 terminal emulator to work with future emacs versions.
2100
2101h. Fixed two extended pattern matching bugs caused by premature short-
2102 circuiting.
2103
2104i. Fixed a memory leak in the code that removes duplicate history entries.
2105
2106j. There are a number of bug fixes to coproc, mapfile, declare, unset,
2107 and assignment statements that prevent nameref variables from creating
2108 and unsetting variables with invalid names.
2109
2110k. Fixed a bug that caused variables to be inadvertently marked as both an
2111 associative and an indexed array.
2112
2113l. Fixed a bug that caused `bash -c' to not run a trap specified in the
2114 command string.
2115
2116j. There are a number of bug fixes to coproc, mapfile, declare, and assignment
2117 statements that prevent nameref variables from overwriting or modifying
2118 attributes of readonly variables.
2119
2120k. Fixed a bug that caused command substitution to attempt to set the
2121 terminal's process group incorrectly.
2122
2123l. Fixed a bug that could cause prompt string expansion to display error
2124 messages when the `nounset' shell option is set.
2125
2126m. Fixed a bug that caused "$@" to not expand to an empty string under the
2127 circumstances when Posix says it should ("${@-${@-$@}}").
2128
2129n. Fixed several bugs caused by referencing nameref variables whose values
2130 are names of unset variables (or names that are valid for referencing
2131 but not assignment), including creating variables in the temporary
2132 environment.
2133
2134o. Function tracing and error tracing are disabled if --debugger is supplied
2135 at startup but the shell can't find the debugger start file.
2136
2137p. Fixed a bug when IFS is used as the control variable in a for statement.
2138
2139q. Fixed a bug with SIGINT received by a command substitution in an interactive
2140 shell.
2141
2142r. The checks for nameref variable self-references are more thorough.
2143
2144s. Fixed several bugs with multi-line aliases.
2145
2146t. Fixed `test' to handle the four-argument case where $1 == '(' and
2147 $4 == ')'.
2148
2149u. Fixed a bug in the expansion of $* in the cases where word splitting is
2150 not performed.
2151
2152v. Fixed a bug in execution of case statements where IFS includes the
2153 pattern matching characters.
2154
21552. Changes to Readline
2156
2157a. When refreshing the line as the result of a key sequence, Readline attempts
2158 to redraw only the last line of a multiline prompt.
2159
2160b. Fixed an issue that caused completion of git commands to display
2161 incorrectly when using colored-completion-prefix.
2162
2163c. Fixed several redisplay bugs having to do with multibyte characters and
2164 invisible characters in prompt strings.
2165
21663. New Features in Bash
2167
2168a. Value conversions (arithmetic expansions, case modification, etc.) now
2169 happen when assigning elements of an array using compound assignment.
2170
2171b. There is a new option settable in config-top.h that makes multiple
2172 directory arguments to `cd' a fatal error.
2173
2174c. Bash now uses mktemp() when creating internal temporary files; it produces
2175 a warning at build time on many Linux systems.
2176
21774. New Features in Readline
2178
2179a. The default binding for ^W in vi mode now uses word boundaries specified
2180 by Posix (vi-unix-word-rubout is bindable command name).
2181
2182b. rl_clear_visible_line: new application-callable function; clears all
2183 screen lines occupied by the current visible readline line.
2184
2185c. rl_tty_set_echoing: application-callable function that controls whether
2186 or not readline thinks it is echoing terminal output.
2187
2188d. Handle >| and strings of digits preceding and following redirection
2189 specifications as single tokens when tokenizing the line for history
2190 expansion.
2191
2192e. Fixed a bug with displaying completions when the prefix display length
2193 is greater than the length of the completions to be displayed.
2194
2195f. The :p history modifier now applies to the entire line, so any expansion
2196 specifying :p causes the line to be printed instead of expanded.
2197
2198------------------------------------------------------------------------------
2199This document details the changes between this version, bash-4.4-rc1, and
2200the previous version, bash-4.4-beta.
2201
22021. Changes to Bash
2203
2204a. Fixed several problems with bash completion not special-casing bash syntax
2205 constructs.
2206
2207b. Fixed a bug that caused the mapfile builtin to not create array variables
2208 when a variable of the same name appears in the temporary environment.
2209
2210c. Fixed a bug that caused prompt expansion to loop when PS1 contained a
2211 syntax error.
2212
2213d. Fixed a bug that caused the ${array[@]@A} expansion to split the results
2214 even when double-quoted.
2215
2216e. There is a new implementation of the code that saves the last CHILD_MAX
2217 exited background pids so their status can be queried later.
2218
2219f. Bash-4.4 can now be configured and built on very old versions of Solaris 2.
2220
2221g. Fixed problems with --help support for several builtins.
2222
2223h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited
2224 from the environment.
2225
2226i. Fixed a bug that caused background processes run from non-interactive shells
2227 with job control enabled to place the terminal in the wrong process group
2228 under certain circumstances.
2229
2230j. Fixed a bug that caused `fc' to return an incorrect exit status when
2231 executing commands from the history list.
2232
2233k. Fixed a bug that caused the shell to exit when a process substitution
2234 received a SIGINT when run in certain terminal emulators.
2235
2236l. EXECIGNORE now honors the setting of `extglob' when attempting to match
2237 executable names.
2238
2239m. Fixed a bug where `return' used the wrong exit status when executed in a
2240 DEBUG trap.
2241
2242n. Fixed a bug that caused a command containing a here-document and an escaped
2243 newline to be stored in the history list incorrectly.
2244
2245o. Fixed a bug that caused set -e to be honored in cases of builtins invoking
2246 other builtins when it should be ignored.
2247
2248p. Fixed a bug that caused `readonly' and `export' to create local array
2249 variables when used within shell functions.
2250
2251q. Fixed a bug that allowed subshells begun to execute process substitutions
2252 to have access to the command's temporary environment.
2253
2254r. Fixed a bug that could cause the shell to dump core when receiving a
2255 SIGCHLD for which a trap has been set while running in posix mode.
2256
2257s. Fixed a bug that caused bash to not restore BASH_ARGC, BASH_ARGV,
2258 BASH_SOURCE, BASH_LINENO, and FUNCNAME if the shell received a SIGINT
2259 while reading commands from a file while executing `.'.
2260
2261t. Fixed a bug that caused the `-o history' option to have no effect when
2262 supplied on the command line when starting a new shell.
2263
2264u. Fixed a bug that caused history expansions occurring in command
2265 substitutions to not be performed.
2266
2267v. Fixed a bug that caused `eval' run in a non-interactive shell to disable
2268 history expansion for the remainder of the shell script, even if the script
2269 had previously enabled it.
2270
2271w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set
2272 to the empty string.
2273
2274x. Fixed a bug that caused process and command substitution to inherit output
2275 buffered in the stdio library but not written.
2276
2277y. Fixed a bug that caused a terminating signal received during `echo' to run
2278 an exit trap in a signal handler context.
2279
2280z. Fixed a bug that caused a builtin command containing a process substitution
2281 to return the wrong exit status.
2282
2283aa. Fixed a bug that caused `()' subshells with piped input to incorrectly
2284 redirect the standard input of some of the commands in the subshell from
2285 /dev/null.
2286
2287bb. The history builtin now uses more descriptive error messages for missing or
2288 invalid timestamps.
2289
22902. Changes to Readline
2291
2292a. The history file writing functions only attempt to create and use a backup
2293 history file if the history file exists and is a regular file.
2294
2295b. Fixed an out-of-bounds read in readline's internal tilde expansion
2296 interface.
2297
2298c. Fixed several redisplay bugs with prompt strings containing multibyte
2299 and non-visible characters whose physical length is longer than the screen
2300 width.
2301
2302d. Fixed a redisplay bug with prompt strings containing invisible characters
2303 whose physical length exceeds the screen width and using incremental search.
2304
2305e. Readline prints more descriptive error messages when it encounters errors
2306 while reading an inputrc file.
2307
2308f. Fixed a bug in the character insertion code that attempts to optimize
2309 typeahead when it reads a character that is not bound to self-insert and
2310 resets the key sequence state.
2311
23123. New Features in Bash
2313
2314a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
2315 environment.
2316
2317b. inherit_errexit: a new `shopt' option that, when set, causes command
2318 substitutions to inherit the -e option. By default, those subshells disable
2319 -e. It's enabled as part of turning on posix mode.
2320
2321c. New prompt string: PS0. Expanded and displayed by interactive shells after
2322 reading a complete command but before executing it.
2323
2324d. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to
2325 SIG_DFL when the shell is started, so they are set to SIG_DFL in child
2326 processes.
2327
2328e. Posix-mode shells now allow double quotes to quote the history expansion
2329 character.
2330
2331f. OLDPWD can be inherited from the environment if it names a directory.
2332
2333g. Shells running as root no longer inherit PS4 from the environment, closing
2334 a security hole involving PS4 expansion performing command substitution.
2335
2336h. If executing an implicit `cd' when the `autocd' option is set, bash will
2337 now invoke a function named `cd' if one exists before executing the `cd'
2338 builtin.
2339
23404. New Features in Readline
2341
2342a. If an incremental search string has its last character removed with DEL,
2343 the resulting empty search string no longer matches the previous line.
2344
2345b. If readline reads a history file that begins with `#' (or the value of
2346 the history comment character) and has enabled history timestamps, the
2347 history entries are assumed to be delimited by timestamps. This allows
2348 multi-line history entries.
2349
2350c. Readline now throws an error if it parses a key binding without a
2351 terminating `:' or whitespace.
2352
2353------------------------------------------------------------------------------
2354This document details the changes between this version, bash-4.4-beta, and
2355the previous version, bash-4.4-alpha.
2356
23571. Changes to Bash
2358
2359a. Fixed two bugs that caused out-of-bounds reads when skipping over assignment
2360 statements while finding the word on which to perform programmable
2361 completion.
2362
2363b. Fixed a memory leak in programmable completion.
2364
2365c. Fixed a bug that could cause the shell to crash when interrupting the
2366 wait builtin.
2367
2368d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new
2369 `@' operator.
2370
2371e. Fixed a bug that caused the && and || operators to be incorrectly optimized.
2372
2373f. The shell now undoes redirections before exiting the shell when the `-e'
2374 option is enabled, and a shell function fails.
2375
2376g. History expansion now skips over the history expansion character in command
2377 and process substitution.
2378
2379h. Fixed a bug that caused stray '\001' characters to be added to the output
2380 of `declare -p'.
2381
2382i. Fixed a memory leak when processing declare commands that perform compound
2383 array assignments.
2384
2385j. Fixed a bug that could cause the shell to crash when reading input from a
2386 file and the limit on open file descriptors is high.
2387
2388k. Fixed a bug that caused the ERR and RETURN traps to be unset if they were
2389 set in a shell function but unset previously.
2390
2391l. Fixed a bug that caused several signals to be ignored if `exec' failed in
2392 an interactive shell.
2393
2394m. A posix-mode non-interactive shell now considers a parameter expansion error
2395 to be a fatal error.
2396
2397n. The `time' command now prints timing statistics for failed commands when
2398 the -e option is enabled.
2399
2400o. Fixed a bug that caused the shell to crash when attempting to indirectly
2401 expand a shell variable with an invalid name.
2402
2403p. Fixed a bug that caused the shell to crash when running a trap containing
2404 a process substitution.
2405
2406q. Bash now prints the keyword `function' before a function with the same name
2407 as a reserved word when using `declare -f' to avoid parse errors when
2408 reusing the output as input.
2409
2410r. Fixed a bug that caused the shell to crash when using declare -g to attempt
2411 to redefine an existing global indexed array variable as an associative
2412 array.
2413
2414s. Fixed a memory leak that occurred when interrupting brace expansions
2415 generating a sequence.
2416
2417t. Fixed a bug that resulted in alias expansion in redirections.
2418
2419u. The `declare -a' and `declare -A' commands now print fewer warnings when
2420 attempting to create and initialize an array at the same time, but
2421 relying on word expansions to construct the compound assignment.
2422
2423v. The `help' builtin now behaves better in locales where each wide
2424 character occupies more than one display column.
2425
2426w. The `read' builtin no longer has a possible race condition when a timeout
2427 occurs.
2428
2429x. Fixed several expansion problems encountered when IFS="'".
2430
2431y. Fixed a problem with the expansion of $'\c?'.
2432
2433z. Bash no longer splits the expansion of here-strings, as the documentation
2434 has always said.
2435
2436aa. Bash now puts `s' in the value of $- if the shell is reading from standard
2437 input, as Posix requires.
2438
2439bb. Fixed a bug that caused the shell to crash if invoked with a NULL
2440 environment.
2441
2442cc. The shell now only trusts an inherited value for $PWD if it begins with a
2443 `/'.
2444
2445dd. Fixed a memory leak when creating local array variables and assigning to
2446 them using compound assignment with the `declare' builtin.
2447
2448ee. Fixed a bug that could cause the shell to crash when processing nested here
2449 documents inside a command substitution.
2450
2451ff. Array keys and values are now displayed using $'...' quoting where
2452 appropriate.
2453
2454gg. Fixed a bug that could cause the shell to crash if the replacement string
2455 in pattern substitution was NULL.
2456
2457hh. Fixed a bug that could cause the shell to crash if a command substitution
2458 contained a non-fatal syntax error.
2459
2460ii. Fixed a bug that could cause the shell to crash if variable indirection
2461 resulted in a NULL variable.
2462
2463jj. Fixed a bug that could cause the shell to crash if a long string contained
2464 multiple unterminated parameter expansion constructs.
2465
2466kk. Improved the code that acts on SIGINT received while waiting for a child
2467 process only if the child exits due to SIGINT.
2468
2469ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple
2470 commands.
2471
24722. Changes to Readline
2473
2474a. Colored completion prefixes are now displayed using a different color, less
2475 likely to collide with files.
2476
2477b. Fixed a bug that caused vi-mode character search to misbehave when
2478 running in callback mode.
2479
2480c. Fixed a bug that caused output to be delayed when input is coming from a
2481 macro in vi-mode.
2482
2483d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
2484 a multi-key key sequence via a macro.
2485
2486e. Fixed a bug that caused problems with applications that supply their own
2487 input function when performing completion.
2488
2489f. When read returns -1/EIO when attempting to read a key, return an error
2490 instead of line termination back to the caller.
2491
2492g. Updated tty auditing feature based on patch from Red Hat.
2493
2494h. Fixed a bug that could cause the history library to crash on overflows
2495 introduced by malicious editing of timestamps in the history file.
2496
24973. New Features in Bash
2498
2499a. `make install' now installs the example loadable builtins and a set of
2500 bash headers to use when developing new loadable builtins.
2501
2502b. `enable -f' now attempts to call functions named BUILTIN_builtin_load when
2503 loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows
2504 loadable builtins to run initialization and cleanup code.
2505
2506c. There is a new BASH_LOADABLES_PATH variable containing a list of directories
2507 where the `enable -f' command looks for shared objects containing loadable
2508 builtins.
2509
2510d. The `complete_fullquote' option to `shopt' changes filename completion to
2511 quote all shell metacharacters in filenames and directory names.
2512
2513e. The `kill' builtin now has a `-L' option, equivalent to `-l', for
2514 compatibility with Linux standalone versions of kill.
2515
25164. New Features in Readline
2517------------------------------------------------------------------------------
2518This document details the changes between this version, bash-4.4-alpha, and
2519the previous version, bash-4.3-release.
2520
25211. Changes to Bash
2522
2523a. A bug that caused pipelines to be corrupted while running the DEBUG trap
2524 was fixed.
2525
2526b. A bug that accidentally omitted the `-R' unary operator from `test' was
2527 fixed.
2528
2529c. A bug that could cause the shell to not restore the terminal's process
2530 group on shell exit was fixed.
2531
2532d. Several changes were made to programmable completion to accommodate
2533 assumptions made by the bash-completion package.
2534
2535e. Bash no longer inhibits C-style escape processing ($'...') while performing
2536 pattern substitution word expansions.
2537
2538f. Fixed a bug that caused `return' executed from a trap handler to use the
2539 wrong return status when one was not supplied as an argument.
2540
2541g. In Posix mode, defining a function with the same name as a special
2542 builtin is now an error, fatal only when the shell is not interactive.
2543
2544h. Fixed a bug that caused compound array assignments to discard unset or null
2545 variables used as subscripts, thereby making it appear as if the index was
2546 not present.
2547
2548i. Fixed a bug that caused extended glob patterns to incorrectly match
2549 filenames with a leading `.'.
2550
2551j. Fixed a bug involving sign extension when reallocating the input line
2552 after a history expansion, causing segmentation faults.
2553
2554k. Bash now does a better job at identifying syntax errors during word
2555 completion and tailoring completion appropriately.
2556
8868edaf 2557l. Bash now uses the current locale's decimal point in command timing output.
a0c0a00f
CR
2558
2559m. Fixed a bug that caused segmentation faults while reading here documents if
2560 PS2 contains a command substitution.
2561
2562n. There are several changes to how $@ is expanded when unquoted but in a
2563 context where word splitting is not performed (e.g., on the rhs of an
2564 assignment or in a conditional command).
2565
2566o. Bash now quotes command hash table entries that contain shell metacharacters
2567 when displaying hash table contents.
2568
2569p. Fixed a potential file descriptor leak when dup2() fails while performing a
2570 redirection.
2571
2572q. Fixed a bug that caused directory names evaluated during word completion to
2573 be dequoted twice.
2574
2575r. Fixed several bugs which could result in indirect variable expansion and
2576 namerefs creating variables with invalid names or referencing variables
2577 set to the empty string.
2578
2579s. Fixed a bug that caused bash to not expand $0 in word expansions where it
2580 should.
2581
2582t. Fixed a bug that caused bash to perform process substitution if <(
2583 appeared inside an arithmetic context.
2584
2585u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern
2586 to be confused as directory names.
2587
2588v. Fixed several bugs with treatment of invisible variables (variables with
2589 attributes that are unset because they have never been assigned values).
2590
2591w. Fixed a bug that caused the `read' builtin to not clean up readline's
2592 state when using the -e and -t options together and the read timed out.
2593
2594x. Fixed a bug that caused the shell to exit with the wrong (but non-zero)
2595 value if a command was not found or was not executable.
2596
2597y. Fixed a bug that caused the `time' reserved word to not be recognized as
2598 such in all contexts where it should have been.
2599
8868edaf 2600z. Fixed a bug that caused the shell to close process substitution file
a0c0a00f
CR
2601 descriptors when executing a script without the `#!' leading line.
2602
2603aa. Fixed a typo that caused the `compat42' shell option to set the wrong
2604 compatibility level.
2605
2606bb. The shell now handles process substitution commands with embedded
2607 parentheses the same way as it does when parsing command substitution.
2608
2609cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option
2610 to produce core dumps.
2611
2612dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases
2613 where slashes must be matched explicitly.
2614
2615ee. Fixed a problem with patterns containing `:' in colon-separated variables
2616 like GLOBIGNORE.
2617
2618ff. Fixed a bug that caused indirect variable expansion using indexed arrays to
2619 always use index 0.
2620
2621gg. Fixed a parsing problem that caused quoted newlines immediately following a
2622 command substitution to be mishandled in certain cases.
2623
2624hh. Fixed a potential buffer overflow on systems without locale_charset or the
2625 bash replacement.
2626
2627ii. Fixed a bug that caused background processes to modify the terminal's
2628 process group under certain circumstances.
2629
2630jj. Asynchronous commands now always set $? to 0 and are not affected by
2631 whether or not the command's exit status is being inverted.
2632
2633kk. Fixed a problem that caused a line ending with an escaped newline and
2634 containingh a prior `eval' to be incorrectly parsed.
2635
2636ll. Fixed an issue with programmable completion and `!' in extglob patterns
2637 used as arguments to `compgen -X'.
2638
2639mm. Word completion now treats the two-character token `>|' as requiring
2640 filename expansion.
2641
2642nn. Bash no longer expands tildes in $PATH elements while in Posix mode.
2643
2644oo. Fixed a bug that caused bash to not clean up readline's state, including
2645 the terminal settings, if it received a fatal signal while in a readline()
2646 call (including `read -e' and `read -s').
2647
2648pp. Fixed bug that caused importing shell functions from the environment to
2649 execute additional commands following the function.
2650
2651qq. Fixed a bug that caused the parser to return a lookahead character pushed
2652 back by a previous call, even when on another line.
2653
2654rr. Fixed a bug that caused many here-documents or many nested case statements
2655 to overflow an internal stack.
2656
2657ss. Changed the way bash encodes exported functions for inclusion in the
2658 environment to avoid name collisions with valid variable names and to
2659 indicate that they are exported functions.
2660
2661tt. Fixed a bug that could result in an invalid memory access when processing
2662 a here document delimited by end of file or end of string.
2663
2664uu. Fixed a bug that could cause an invalid memory access if a command was run
2665 before initializing the job control framework.
2666
2667vv. When in Posix mode, bash prints shell function definitions as Posix
2668 specifies them, without the leading `function' keyword.
2669
2670ww. The variable attribute display builtins no longer display variables with
2671 invalid names that were imported from the environment.
2672
2673xx. Fixed a bug that could allow `break' or `continue' executed from shell
2674 functions to affect loops running outside of the function.
2675
2676yy. Fixed a bug that could cause a restricted shell to attempt to import shell
2677 functions from the environment.
2678
2679zz. The shell now allows double-quoted identifiers in arithmetic expressions.
2680
2681aaa. Fixed a bug that could allow scalar variables subscripted using [@] in
2682 word expansions to be incorrectly quoted.
2683
2684bbb. The shell now makes sure to ignore SIGTSTP/SIGTTIN/SIGTTOU in child
2685 processes if they were ignored at shell startup, even if job control is
2686 in effect.
2687
2688ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to
2689 the empty string.
2690
2691ddd. Posix says that expanding $* in a pattern context where the expansion is
2692 double-quoted should not treat $* as if it were double quoted.
2693
2694eee. Bash now restores getopts' internal state between calls to getopts even if
2695 a shell function declares a local copy of OPTIND.
2696
2697fff. Fixed a bug that could cause `history -r' or `history -n' to read identical
2698 lines from the history file more than once.
2699
2700ggg. The commands executed by `bind -x' now redisplay at most the final line
2701 of a multi-line prompt, and those commands may return 124 to indicate that
2702 the entire prompt should be redrawn.
2703
2704hhh. Fixed a bug that could cause `mapfile' to create variables with invalid
2705 names.
2706
2707iii. The shell only goes into debugging mode when --debugger is supplied if
2708 the debugger initialization file is present.
2709
2710jjj. Fixed a bug that disallowed an assignment to (implicit) subscript 0 of an
2711 existing array in a declare command that set the readonly attribute.
2712
2713kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable
2714 its special status.
2715
2716lll. Appending to an existing array variable using the compound assignment
2717 syntax (var+=(aaa)) should not affect assignments to existing subscripts
2718 appearing in the compound assignment.
2719
2720mmm. Fixed a bug that could cause the shell to crash when a variable with a
2721 null value was passed in the temporary environment and the variable's
2722 attributes are modified using `declare' while performing a redirection.
2723
2724nnn. Fixed a bug in printf so that a missing precision specifier after a `.'
2725 is treated as 0.
2726
2727ooo. Fixed a bug that attempted to use the internal command timing to time
2728 pipeline components if the pipeline elements are separated by newlines.
2729
2730ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase
2731 the values on assignment.
2732
2733qqq. Bash does a better job of determining whether or not files are executable
2734 when running on Windows, since the X_OK flag to access(2) is not supported.
2735
2736rrr. Fixed a bug that caused some of the shell's internal traps (e.g., ERR) to
2737 be interrupted (and leave incorrect state) by pending SIGINTs.
2738
2739sss. Fixed a bug in the bash interface to history expansion to avoid attempting
2740 expansion if the history expansion character occurs in a command
2741 substitution.
2742
2743ttt. Fixed a bug that caused the select command to crash if the REPLY variable
2744 ends up empty (e.g., if it's made readonly)
2745
2746uuu. Bash handles backslash-quoting of multibyte characters better when quoting
2747 output that is intended to be reused.
2748
2749vvv. System-specific changes for: Windows, Cygwin.
2750
2751www. Fixes for upper and lower-casing multibyte characters, some locales have
2752 characters whose upper and lowercase versions have different numbers of
2753 bytes.
2754
2755xxx. Fixed a bug that caused the ERR trap in a shell function to have the
2756 wrong value for $LINENO.
2757
2758yyy. Fixed a bug that resulted in incorrect quoting of regexps for the =~
2759 operator when an open brace appears without a close brace.
2760
2761zzz. Fixed a bug in the array unset operation that caused it to attempt to
2762 parse embedded single and double quotes.
2763
2764aaaa. Fixed a bug that caused $* to not expand with the first character of
2765 $IFS as a separator in a context where word splitting will not take
2766 place.
2767
2768bbbb. Fixed two bugs that could cause the shell to dereference a null pointer
2769 while attempting to print an error message from arithmetic expansion.
2770
2771cccc. Fixed a bug that resulted in short-circuited evaluation when reading
2772 commands from a string ending in an unquoted backslash, or when sourcing
2773 a file that ends with an unquoted backslash.
2774
2775dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up
2776 any FIFOs created by process substitution.
2777
2778eeee. If the -T option is not set, allow the source builtin and shell functions
2779 to set a DEBUG trap that persists after the sourced file or function
2780 returns, instead of restoring the old (unset) value unconditionally.
2781
2782ffff. Fixed a bug that caused redirections to not be undone on some syntax
2783 errors, e.g., when parsing a command substitution.
2784
2785gggg. Bash only adds asynchronous commands to the table of background pids
2786 whose status it remembers, to avoid it growing too large during scripts
2787 that create and reap large numbers of child processes. This means that
2788 `wait' no longer works on synchronous jobs, but $? can be used to get
2789 the exit status in those cases.
2790
2791hhhh. Bash now checks whether or not a shell script argument is a directory
2792 before trying to open it; Posix says implementations may allow open(2)
2793 on a directory.
2794
2795iiii. Fixed a bug that could cause the shell to set the terminal's process
2796 group to a background process group when running as part of a pipeline.
2797
2798jjjj. Made a few changes to strings to avoid possible potential negative effects
2799 caused by malicious translations.
2800
2801kkkk. Fixed a bug that caused the `unset' builtin to continue to treat its
2802 arguments as functions after unsetting a function when invoked with no
2803 options.
2804
2805llll. Fixed a bug that would not replace empty strings using pattern
2806 substitution even if the pattern matched the empty string.
2807
2808mmmm. Fixed a bug with word completion that prevented some characters from
2809 being backslash-quoted (backquote, dollar sign).
2810
2811nnnn. Fixed a bug that prevented a command from the history re-executed by the
2812 `fc' builtin from setting verbose mode.
2813
2814oooo. Fixed a bug that caused the shell to not enable and disable function
2815 tracing with changes to the `extdebug' shell option.
2816
2817pppp. Fixed a bug that caused assignments to nameref variables pointing to
2818 unset variables with attributes but no values to create variables with
2819 incorrect names.
2820
2821qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to
2822 unset the wrong variable under certain circumstances.
2823
2824rrrr. Fixed a bug that caused close braces occurring in brace expansions within
2825 command substitutions to incorrectly terminate parameter expansions.
2826
2827ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH.
2828
2829tttt. Fixed a bug that caused interactive shells compiled without job control
2830 to return incorrect status values for child processes when running a
2831 single command that creates enough children to use the entire PID space.
2832
2833uuuu. `esac' should not be recognized as a reserved word when it appears as the
2834 second or later pattern in a case statement pattern list.
2835
2836vvvv. Fixed a bug that caused the completion code to read past the end of the
2837 readline line buffer while skipping assignment statements to find the
2838 command name.
2839
2840wwww. Fixed a bug that caused case statements within loops contained in a
2841 command substitution to be parsed incorrectly.
2842
2843xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after
2844 running `wait' with no arguments and interrupting it with ^C without
2845 a trap handler installed.
2846
28472. Changes to Readline
2848
2849a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
2850 commands with modifiers was fixed.
2851
2852b. Fixed a bug that caused callback mode to dump core when reading a
2853 multiple-key sequence (e.g., arrow keys).
2854
2855c. Fixed a bug that caused the redisplay code to erase some of the line when
2856 using horizontal scrolling with incremental search.
2857
2858d. Readline's input handler now performs signal processing if read(2) is
2859 interrupted by SIGALRM or SIGVTALRM.
2860
2861e. Fixed a problem with revert-all-at-newline freeing freed memory.
2862
2863f. Clarified the documentation for the history_quotes_inhibit_expansion
2864 variable to note that it inhibits scanning for the history comment
2865 character and that it only affects double-quoted strings.
2866
2867g. Fixed an off-by-one error in the prompt printed when performing searches.
2868
2869h. Use pselect(2), if available, to wait for input before calling read(2), so
2870 a SIGWINCH can interrupt it, since it doesn't interrupt read(2).
2871
2872i. Some memory leaks caused by signals interrupting filename completion have
2873 been fixed.
2874
2875j. Reading EOF twice on a non-empty line causes EOF to be returned, rather
2876 than the partial line. This can cause partial lines to be executed on
2877 SIGHUP, for example.
2878
2879k. Fixed a bug concerning deleting multibyte characters from the search
2880 string while performing an incremental search.
2881
2882l. Fixed a bug with tilde expanding directory names in filename completion.
2883
2884m. Fixed a bug that did not allow binding sequences beginning with a `\'.
2885
2886n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
2887 contains a multibyte character in the last screen column.
2888
2889o. Fixed a bug that caused history expansion to disregard characters that are
2890 documented to delimit a history event specifier without requiring `:'.
2891
2892p. Fixed a bug that could cause reading past the end of a string when reading
2893 the value when binding the set of isearch terminators.
2894
2895q. Fixed a bug that caused readline commands that depend on knowing which
2896 key invoked them to misbehave when dispatching key sequences that are
2897 prefixes of other key bindings.
2898
2899r. Paren matching now works in vi insert mode.
2900
29013. New Features in Bash
2902
2903a. There is now a settable configuration #define that will cause the shell
2904 to exit if the shell is running setuid without the -p option and setuid
2905 to the real uid fails.
2906
2907b. Command and process substitutions now turn off the `-v' option when
2908 executing, as other shells seem to do.
2909
2910c. The default value for the `checkhash' shell option may now be set at
2911 compile time with a #define.
2912
2913d. The `mapfile' builtin now has a -d option to use an arbitrary character
2914 as the record delimiter, and a -t option to strip the delimiter as
2915 supplied with -d.
2916
2917e. The maximum number of nested recursive calls to `eval' is now settable in
2918 config-top.h; the default is no limit.
2919
2920f. The `-p' option to declare and similar builtins will display attributes for
2921 named variables even when those variables have not been assigned values
2922 (which are technically unset).
2923
2924g. The maximum number of nested recursive calls to `source' is now settable
2925 in config-top.h; the default is no limit.
2926
2927h. All builtin commands recognize the `--help' option and print a usage
2928 summary.
2929
2930i. Bash does not allow function names containing `/' and `=' to be exported.
2931
2932j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
2933
2934k. The shell now allows `time ; othercommand' to time null commands.
2935
2936l. There is a new `--enable-function-import' configuration option to allow
2937 importing shell functions from the environment; import is enabled by
2938 default.
2939
2940m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
2941 had been executed.
2942
2943n. GLOBIGNORE, the pattern substitution word expansion, and programmable
2944 completion match filtering now honor the value of the `nocasematch' option.
2945
2946o. There is a new ${parameter@spec} family of operators to transform the
2947 value of `parameter'.
2948
2949p. Bash no longer attempts to perform compound assignment if a variable on the
2950 rhs of an assignment statement argument to `declare' has the form of a
2951 compound assignment (e.g., w='(word)' ; declare foo=$w); compound
2952 assignments are accepted if the variable was already declared as an array,
2953 but with a warning.
2954
2955q. The declare builtin no longer displays array variables using the compound
2956 assignment syntax with quotes; that will generate warnings when re-used as
2957 input, and isn't necessary.
2958
2959r. Executing the rhs of && and || will no longer cause the shell to fork if
2960 it's not necessary.
2961
2962s. The `local' builtin takes a new argument: `-', which will cause it to save
2963 the single-letter shell options and restore their previous values at
2964 function return.
2965
2966t. `complete' and `compgen' have a new `-o nosort' option, which forces
2967 readline to not sort the completion matches.
2968
2969u. Bash now allows waiting for the most recent process substitution, since it
2970 appears as $!.
2971
2972v. The `unset' builtin now unsets a scalar variable if it is subscripted with
2973 a `0', analogous to the ${var[0]} expansion.
2974
2975w. `set -i' is no longer valid, as in other shells.
2976
2977x. BASH_SUBSHELL is now updated for process substitution and group commands
2978 in pipelines, and is available with the same value when running any exit
2979 trap.
2980
2981y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
2982 not bash is being run in a GNU Emacs shell window.
2983
2984z. Bash now treats SIGINT received when running a non-builtin command in a
2985 loop the way it has traditionally treated running a builtin command:
2986 running any trap handler and breaking out of the loop.
2987
2988aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
2989 cause matching filenames to be ignored when searching for commands.
2990
2991bb. Aliases whose value ends in a shell metacharacter now expand in a way to
2992 allow them to be `pasted' to the next token, which can potentially change
2993 the meaning of a command (e.g., turning `&' into `&&').
2994
29954. New Features in Readline
2996
8868edaf 2997a. The history truncation code now uses the same error recovery mechanism as
a0c0a00f
CR
2998 the history writing code, and restores the old version of the history file
2999 on error. The error recovery mechanism handles symlinked history files.
3000
3001b. There is a new bindable variable, `enable-bracketed-paste', which enables
3002 support for a terminal's bracketed paste mode.
3003
3004c. The editing mode indicators can now be strings and are user-settable
3005 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
3006 variables). Mode strings can contain invisible character sequences.
3007 Setting mode strings to null strings restores the defaults.
3008
3009d. Prompt expansion adds the mode string to the last line of a multi-line
3010 prompt (one with embedded newlines).
3011
3012e. There is a new bindable variable, `colored-completion-prefix', which, if
3013 set, causes the common prefix of a set of possible completions to be
3014 displayed in color.
3015
3016f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
3017 mode yank-pop.
3018
3019g. The redisplay code underwent several efficiency improvements for multibyte
3020 locales.
3021
3022h. The insert-char function attempts to batch-insert all pending typeahead
3023 that maps to self-insert, as long as it is coming from the terminal.
3024
3025i. rl_callback_sigcleanup: a new application function that can clean up and
3026 unset any state set by readline's callback mode. Intended to be used
3027 after a signal.
3028
3029------------------------------------------------------------------------------
ac50fbac
CR
3030This document details the changes between this version, bash-4.3-release, and
3031the previous version, bash-4.3-rc2.
3032
30331. Changes to Bash
3034
3035a. Only Posix-mode shells should exit on an assignment failure in the
3036 temporary environment preceding a special builtin. This is how it's been
3037 documented.
3038
3039b. Fixed a bug that caused a failed special builtin to not exit a posix-mode
3040 shell if the failing builtin was on the LHS of a && or ||.
3041
3042c. Changed the handling of unquoted backslashes in regular expressions to be
3043 closer to bash-4.2.
3044
3045d. globstar (**) no longer traverses symbolic links that resolve to
3046 directories. This eliminates some duplicate entries.
3047
3048e. Fixed a bug that caused a SIGCHLD trap handler to not be able to change the
3049 SIGCHLD disposition.
3050
3051f. Fixed a bug that caused a crash when -x was enabled and a command
3052 contained a printable multibyte (wide) character.
3053
3054g. Fixed a bug that caused an interactive shell without line editing enabled
3055 to read invalid data after receiving a SIGINT.
3056
3057h. Fixed a bug that caused command word completion to fail if the directory in
3058 $PATH where the completion would be found contained single or double quotes.
3059
3060i. Fixed a bug that caused a shell with -v enabled to print commands in $()
3061 multiple times.
3062
30632. Changes to Readline
3064
3065a. Fixed a bug that caused `undo' to reference freed memory or null pointers.
3066
30673. New Features in Bash
3068
3069a. The [[ -v ]] option now understands array references (foo[1]) and returns
3070 success if the referenced element has a value.
3071
3072------------------------------------------------------------------------------
3073This document details the changes between this version, bash-4.3-rc2, and the
3074previous version, bash-4.3-rc1.
3075
30761. Changes to Bash
3077
3078a. Fixed a bug that left variables set by printf -v marked as invisible.
3079
3080b. Fixed an off-by-one error in a job control warning message.
3081
3082c. Fixed a bug that caused the shell to crash after declaring a nameref variable
3083 without a value.
3084
3085d. Fixed a bug that caused asynchronous commands to not set $? correctly.
3086
3087e. Fixed a bug that caused out-of-order execution when executing aliases with
3088 embedded newlines containing `.' commands.
3089
3090f. Fixed a bug that caused error messages generated by expansion errors in
3091 `for' commands to have the wrong line number.
3092
3093g. Fixed a bug that caused the `wait' builtin to not be interruptible in an
3094 interactive shell with job control enabled.
3095
3096h. Fixed a bug that caused SIGINT and SIGQUIT to not be trappable in
3097 asynchronous subshell commands.
3098
3099i. Bash now requires that the value assigned to a nameref variable be a valid
3100 shell identifier (variable name or array reference).
3101
3102j. Converting an existing variable to a nameref variable now turns off the
3103 -i/-l/-u/-c attributes.
3104
3105k. Displaying a nameref variable with `declare -p' now displays the nameref
3106 variable and its value rather than following the nameref chain.
3107
3108l. Fixed a problem with interrupt handling that caused a second and subsequent
3109 SIGINT to be ignored by interactive shells.
3110
3111m. Fixed a bug that caused certain positional parameter and array expansions
3112 to mishandle (discard) null positional parameters and array elements.
3113
3114n. The shell no longer blocks receipt of signals while running trap handlers
3115 for those signals, and allows most trap handlers to be run recursively
3116 (running trap handlers while a trap handler is executing).
3117
3118o. The shell now handles backslashes in regular expression arguments to the
3119 [[ command's =~ operator slightly differently, resulting in more
3120 consistent behavior.
3121
31222. Changes to Readline
3123
3124a. Fixed a bug that could cause readline to crash and seg fault attempting to
3125 expand an empty history entry.
3126
3127b. Fixed a bug that caused a bad entry in the $LS_COLORS variable to abort all
3128 color processing but leave color enabled.
3129
3130c. Fixed a bug that caused display problems with multi-line prompts containing
3131 invisible characters on multiple lines.
3132
3133d. Fixed a bug that caused effects made by undoing changes to a history line to
3134 be discarded.
3135
31363. New Features in Bash
3137
31384. New Features in Readline
3139
3140a. When creating shared libraries on Mac OS X, the pathname written into the
3141 library (install_name) no longer includes the minor version number.
3142------------------------------------------------------------------------------
3143This document details the changes between this version, bash-4.3-rc1, and the
3144previous version, bash-4.3-beta2.
3145
31461. Changes to Bash
3147
3148a. Fixed a bug in bash completion that caused a tilde to be expanded even if
3149 the `direxpand' option was not enabled.
3150
3151b. Fixed a potential bug that could cause corrupted input in interactive shells
3152 running without line editing and with `ignoreeof' enabled.
3153
3154c. Fixed a bug that could cause failures when opening pipes back to shells
3155 created to run process substitutions.
3156
3157d. Fixed a bug that caused an assignment to TEXTDOMAIN to require TEXTDOMAINDIR
3158 to be set in order to actually change the current text domain.
3159
3160e. Changed the way redirections are printed to avoid confusion when the target
3161 of an output redirection is a process substitution beginning with `>'.
3162
31632. Changes to Readline
3164
3165a. Shared library building is now supported on Mac OS X 10.9 (Darwin 13).
3166
31673. New Features in Bash
3168
3169a. `cd' has a new `-@' option to browse a file's extended attributes on
3170 systems that support O_XATTR.
3171
31724. New Features in Readline
3173
3174a. There are additional default key bindings for MinGW32
3175
3176------------------------------------------------------------------------------
3177This document details the changes between this version, bash-4.3-beta2, and the
3178previous version, bash-4.3-beta.
3179
31801. Changes to Bash
3181
3182a. Fixed a bug that caused assignment to an unset variable using a negative
3183 subscript to result in a segmentation fault.
3184
3185b. Fixed a bug that caused assignment to a string variable using a negative
3186 subscript to use the incorrect index.
3187
3188c. Fixed a bug that caused some strings to be interpreted as invalid
3189 extended globbing expressions when used with the help builtin.
3190
3191d. Fixed a bug that caused an attempt to trap a signal whose disposition
3192 cannot be changed to reference uninitialized memory.
3193
3194e. Command completion now skips assignment statements preceding a command
3195 name and completes the command.
3196
3197f. Fixed a bug that caused `compgen -f' in a non-interactive shell to dump
3198 core under certain circumstances.
3199
3200g. Fixed a bug that caused the `read -N' to misbehave when the input stream
3201 contains 0xff.
3202
32032. Changes to Readline
3204
3205a. Changed message when an incremental search fails to include "failed" in
3206 the prompt and display the entire search string instead of just the last
3207 matching portion.
3208
3209b. Fixed a bug that caused an arrow key typed to an incremental search prompt
3210 to process the key sequence incorrectly.
3211
3212c. Additional key bindings for arrow keys on MinGW.
3213
32143. New Features in Bash
3215
3216a. The help builtin now attempts substring matching (as it did through
3217 bash-4.2) if exact string matching fails.
3218
3219b. The fc builtin now interprets -0 as the current command line.
3220
3221c. Completing directory names containing shell variables now adds a trailing
3222 slash if the expanded result is a directory.
3223
32244. New Features in Readline
3225
3226a. rl_change_environment: new application-settable variable that controls
3227 whether or not Readline modifies the environment (currently readline
3228 modifies only LINES and COLUMNS).
3229
3230------------------------------------------------------------------------------
3231This document details the changes between this version, bash-4.3-beta, and the
3232previous version, bash-4.3-alpha.
3233
32341. Changes to Bash
3235
3236a. Fixed a bug in the prompt directory name "trimming" code that caused
3237 memory corruption and garbled the results.
3238
3239b. Fixed a bug that caused single quotes that resulted from $'...' quoting
3240 in the replacement portion of a double-quoted ${word/pat/rep} expansion
3241 to be treated as quote characters.
3242
3243c. Fixed a bug that caused assignment statements preceding a command word to
3244 result in assignment statements following a declaration command to not be
3245 expanded like assignment statements.
3246
3247d. Fixed a bug with variable search order in the presence of local variables
3248 with the same name as variables in the temporary environment supplied to
3249 a shell function.
3250
3251e. Fixed a bug that caused constructs like 1<(2) to be interpreted as process
3252 substitutions even in an arithmetic context.
3253
3254f. Fixed several cases where `invisible' variables (variables with attributes
3255 but no values, which are technically unset) were treated incorrectly.
3256
3257g. Fixed a bug that caused group commands in pipelines that were not the
3258 last element to not run the EXIT trap.
3259
3260h. Fixed a bug that caused `unset -n' to not unset a nameref variable in
3261 certain cases.
3262
3263i. Fixed the nameref circular reference checking to be less strict and only
3264 disallow a nameref variable with the same value as its name at the global
3265 scope.
3266
3267j. Fixed a bug that caused trap handlers to be executed recursively,
3268 corrupting internal data structures.
3269
3270k. Fixed a bug that could result in bash not compiling if certain options were
3271 not enabled.
3272
3273l. Fixed a bug that caused the arithmetic expansion code to attempt variable
3274 assignments when operator precedence prohibited them.
3275
3276m. Word expansions like ${foo##bar} now understand indirect variable references.
3277
3278n. Fixed a bug that caused `declare -fp name' to not display a function
3279 definition.
3280
3281o. Fixed a bug that caused asynchronous child processes to modify the stdin
3282 file pointer when bash was using it to read a script, which modified the
3283 parent's value as well.
3284
32852. Changes to Readline
3286
3287a. Fixed a bug in vi mode that caused the arrow keys to set the saved last
3288 vi-mode command to the wrong value.
3289
3290b. Fixed a bug that caused double-quoted strings to be scanned incorrectly
3291 when being used as the value of a readline variable assignment.
3292
3293c. Fixed a bug with vi mode that prevented `.' from repeating a command
3294 entered on a previous line (command).
3295
3296d. Fixed a bug that could cause completion to core dump if it was interrupted
3297 by a signal.
3298
3299e. Readline now sends the meta-key enable string to the terminal if the
3300 terminal has been successfully initialized.
3301
3302f. Readline now calls the signal hook after resizing the terminal when it
3303 receives a SIGWINCH.
3304
3305g. Fixed a bug that could cause the history list code to perform an out-of-
3306 bounds array reference if the history list is empty.
3307
33083. New Features in Bash
3309
3310a. Shells started to run process substitutions now run any trap set on EXIT.
3311
3312b. There is now a configure-time option to enable the globasciiranges option
3313 by default.
3314
3315c. The read builtin now checks its first variable argument for validity before
3316 trying to read any input.
3317
3318------------------------------------------------------------------------------
3319This document details the changes between this version, bash-4.3-alpha,
3320and the previous version, bash-4.2-release.
3321
33221. Changes to Bash
3323
3324a. Fixed several bugs concerning incomplete bracket expressions in filename
3325 generation (globbing) patterns.
3326
3327b. Fixed a bug with single quotes and WORD in ${param op WORD} when running
3328 in Posix mode.
3329
3330c. Fixed a bug that caused the pattern removal and pattern substitution word
3331 expansions and case statement word expansion to not match the empty string.
3332
3333d. Fixed a bug that caused the tzset() function to not work after changing
8868edaf 3334 the TZ environment variable.
ac50fbac
CR
3335
3336e. Fixed a bug that caused the RHS of an assignment statement to undergo
3337 word splitting when it contained an unquoted $@.
3338
3339f. Fixed bugs that caused the shell to not react to a SIGINT sent while
3340 waiting for a child process to exit.
3341
3342g. Bash doesn't try to run things in a signal handler context when it gets a
3343 signal (SIGINT/SIGHUP/etc) while reading input using readline but still
3344 be responsive to terminating signals.
3345
3346h. Fixed a bug that caused bash to go into an infinite loop if a filename
3347 to be matched contained an invalid multibyte character.
3348
3349i. Fixed a bug that caused PS4 to end up being truncated if it is longer
3350 than 128 bytes.
3351
3352j. Fixed a bug that caused brace expansion to not skip over double-quoted
3353 command substitution.
3354
3355k. System-specific updates for: DJGPP, HP/UX, Mac OS X
3356
3357l. Fixed a bug in displaying commands that caused redirections to be associated
3358 with the wrong part of the command.
3359
3360m. Fixed the coproc cleanup to unset the appropriate shell variables when a
3361 coproc terminates.
3362
3363n. Fixed a bug that caused `fc' to dump core due to incorrect calculation of
3364 the last history entry.
3365
3366o. Added workarounds for FreeBSD's implementation of faccessat/eaccess and
3367 `test -x'.
3368
3369p. Fixed a bug that caused the shell to not match patterns containing
3370 control-A.
3371
3372q. Fixed a bug that could result in doubled error messages when the `printf'
3373 builtin got a write error.
3374
3375r. Fixed a bug that caused the shell to not correctly expand words containing
3376 multiple consecutive quoted empty strings (""""""aa).
3377
3378s. Fixed a bug that caused the shell to not correctly parse multi-line
3379 process substitutions containing comments and quoted strings.
3380
3381t. Fixed a problem with the bash malloc's internal idea of the top of the
3382 memory heap that resulted in incorrect decisions to try to reduce the
3383 break and give memory back to the kernel.
3384
8868edaf 3385u. There are changes to the expansions performed on compound array assignments,
ac50fbac
CR
3386 in an effort to make foo=( [ind1]=bar [ind2]=baz ) identical to
3387 foo[ind1]=bar foo[ind2]=baz.
3388
3389v. Bash now reports an error if `read -a name' is used when `name' is an
3390 existing associative array.
3391
3392w. Fixed a bug that allowed an attempted assignment to a readonly variable
3393 in an arithmetic expression to not return failure.
3394
3395x. Fixed several bugs that caused completion functions to be invoked even when
3396 the cursor was before the first word in the command.
3397
3398y. Fixed a bug that caused parsing a command substitution to overwrite the
3399 parsing state associated with the complete input line.
3400
3401z. Fixed several bugs with the built-in snprintf replacement and field widths
3402 and floating point.
3403
3404aa. Fixed a bug that caused incorrect offset calculations and input buffer
3405 corruption when reading files longer than 2^31 bytes.
3406
3407bb. Fixed several bugs where bash performed arithmetic evaluation in contexts
3408 where evaluation is suppressed.
3409
3410cc. Fixed a bug that caused bash to close FIFOs used for process substitution
3411 too early when a shell function was executing, but protect against using
3412 all file descriptors when the shell functions are invoked inside loops.
3413
3414dd. Added checks for printable (and non-printable) multibyte characters for
3415 use in error messages.
3416
3417ee. Fixed a bug that caused ^O (operate-and-get-next) to not work correctly
3418 at the end of the history list.
3419
3420ff. Fixed a bug that caused command-oriented history to incorrectly combine
3421 here documents into one line.
3422
3423gg. Fixed a bug that caused importing SHELLOPTS from the environment into a
3424 Posix-mode shell to print an error message and refuse to parse it.
3425
3426hh. Fixed a bug that caused the shell to delete an extra history entry when
3427 using `history -s'.
3428
3429ii. Fixed a bug that caused floating-point exceptions and overflow errors
3430 for the / and % arithmetic operators when using INTMAX_MIN and -1.
3431
3432jj. Fixed a bug that caused parsing errors when reading an arithmetic for
3433 loop inside a command substitution.
3434
3435kk. Fixed a bug that caused a readonly function to be unset when unset was
3436 called without the -f or -v option.
3437
3438ll. Fixed several bugs in the code that quotes characters special to regular
3439 expressions when used in a quoted string on the RHS of the =~ operator
3440 to the [[ command.
3441
3442mm. Fixed a bug that caused redirections to fail because the file descriptor
3443 limit was set to a value less than 10.
3444
3445nn. Fixed a bug that caused the `read' builtin to execute code in a signal
3446 handler context if read timed out.
3447
3448oo. Fixed a bug that caused extended globbing patterns to not match files
3449 beginning with `.' correctly when a `.' was explicitly supplied in the
3450 pattern.
3451
3452pp. Fixed a bug that caused key sequences longer than two characters to not
3453 work when used with `bind -x'.
3454
3455qq. Fixed a bug that resulted in redefined functions having the wrong source
3456 file names in BASH_SOURCE.
3457
3458rr. Fixed a bug that caused the read builtin to assign null strings to variables
3459 when using `read -N', which caused core dumps when referenced
3460
3461ss. Fixed a bug that caused `bash -m script' to not enable job control while
3462 running the script.
3463
3464tt. Fixed a bug that caused `printf -v var' to dump core when used with the
3465 %b format code.
3466
3467uu. Fixed a bug that caused the shell to exit with the wrong status if -e was
3468 active and the shell exited on a substitution error.
3469
3470vv. Fixed a bug that caused the shell to seg fault if an array variable with
3471 the same name as an existing associative array was implicitly created by
3472 an assignment (declare a[n]=b).
3473
3474ww. Fixed a bug that caused a redirection to misbehave if the number specified
3475 for a file descriptor overflows an intmax_t.
3476
3477xx. Fixed several bugs with the handling of valid and invalid unicode character
3478 values when used with the \u and \U escape sequences to printf and $'...'.
3479
3480yy. Fixed a bug that caused tildes to not be escaped in expanded filenames,
3481 making them subject to later expansion.
3482
3483zz. When using the pattern substitution word expansion, bash now runs the
3484 replacement string through quote removal, since it allows quotes in that
3485 string to act as escape characters. This is not backwards compatible, so
3486 it can be disabled by setting the bash compatibility mode to 4.2.
3487
3488aaa. Fixed the rest of the cases where the shell runs non-allowed code in a
3489 signal handler context.
3490
3491bbb. Fixed a bug that caused spurious DEL characters (\177) to appear in
3492 double-quoted expansion where the RHS is evaluated to the empty string.
3493
3494ccc. Fixed a bug that caused the use of the shell's internal random number
3495 generator for temporary file names to perturb the random number
3496 sequence.
3497
3498ddd. Fixed several bugs that caused `declare -g' to not set the right global
3499 variables or to misbehave when declaring global indexed arrays.
3500
3501eee. Fixed a logic bug that caused extended globbing in a multibyte locale to
3502 cause failures when using the pattern substititution word expansions.
3503
3504fff. Fixed a bug that caused the `lastpipe' option to corrupt the file
3505 descriptor used to read the script.
3506
3507ggg. Fixed a bug that causes the shell to delete DEL characters in the
3508 expanded value of variables used in the same quoted string as variables
3509 that expand to nothing.
3510
3511hhh. Fixed a bug that caused the shell to assign the wrong value from an
3512 assignment like (( x=7 )) when `x' was an existing array variable.
3513
3514iii. Fixed a bug that caused the shell to misbehave when generating sequences
3515 and the boundary values overflow an intmax_t.
3516
3517jjj. Fixed a bug caused expansion errors if an expansion of "$@" appeared
3518 next to another expansion (e.g.. "${@}${x}").
3519
3520kkk. Fixed a potential buffer overflow bug when performing /dev/fd expansion.
3521
3522lll. Fixed a bug that resulted in an extra semicolon being added to compound
3523 assignments when they were added to the history list.
3524
3525mmm. Fixed a bug that caused mapfile to read one extra line from the input.
3526
3527nnn. Fixed a bug that caused the mail checking code to use uninitialized
3528 values.
3529
3530ooo. Fixed a bug that prevented history timestamps from being saved if the
3531 history comment character is unset.
3532
3533ppp. Fixed a bug that caused the case-modifying expansions to not work with
3534 multibyte characters.
3535
3536qqq. Fixed a bug that caused the edit-and-execute bindable readline command
3537 to see the wrong data if invoked in the middle of a multi-line quoted
3538 string.
3539
3540rrr. Fixed a bug that resulted in the shell returning the wrong exit status
3541 for a background command on systems that recycle PIDs very quickly.
3542
3543sss. Fixed a bug that caused asynchronous group commands to not run any EXIT
3544 trap defined in the body of the command.
3545
3546ttt. Fixed a bug that caused `eval "... ; return"' to not clean up properly.
3547
3548uuu. Fixed a bug that caused the shell to dump core if `read' reads an escaped
3549 IFS whitespace character.
3550
3551vvv. Fixed a bug that caused BASH_COMMAND to be set to an incorrect value when
3552 executing a (...) subshell.
3553
3554www. Fixed a couple of pointer aliasing bugs with the token string in arithmetic
3555 evaluation.
3556
3557xxx. Fixed a bug with parsing multi-line command substitutions when reading
3558 the `do' keyword followed by whitespace.
3559
3560yyy. Fixed a bug that caused the shell to seg fault if the time given to the
3561 printf %(...)T format overflowed the value accepted by localtime(3).
3562
3563zzz. Fixed a problem with displaying help topics in two columns when the
3564 translated text contained multibyte characters.
3565
3566aaaa. Fixed a bug with the extended globbing pattern matcher where a `*' was
3567 followed by a negated extended glob pattern.
3568
3569bbbb. Fixed a race condition with short-lived coproc creation and reaping that
3570 caused the child process to be reaped before the various coproc shell
3571 variables were initialized.
3572
3573cccc. Fixed a bug where turning off `errexit' in command substitution subshells
3574 was not reflected in $SHELLOPTS.
3575
3576dddd. Partially fixed an inconsistency in how the shell treated shell
3577 functions run from an EXIT trap.
3578
3579eeee. Fixed a bug in how the shell invalidated FIFOs used for process
3580 substitution when executing a pipeline (once rather than in every child).
3581
3582ffff. Fixed a bug that occurred when expanding a special variable ($@, $*)
3583 within double quotes and the expansion resulted in an empty string.
3584
3585gggg. Fixed bugs with executing a SIGCHLD trap handler to make sure that it's
3586 executed once per exited child.
3587
3588hhhh. Fixed a bug that caused `declare' and `test' to find variables that
3589 had been given attributes but not assigned values. Such variables are
3590 not set.
3591
3592iiii. Fixed a bug that caused commands in process substitutions to not look in
3593 the local temporary environment when performing word expansions.
3594
3595jjjj. Fixed several problems with globstar expansions (**/**) returning null
3596 filenames and multiple instances of the same pathname.
3597
3598kkkk. Fixed an oversight that did not allow the exit status of `coproc' to
3599 be inverted using `!'.
3600
3601llll. Fixed a bug that caused the -e option to be re-enabled using `set -e'
3602 even when executing in a context where -e is ignored.
3603
3604mmmm. Fixed a (mostly theoretical) bug with input lines longer than SIZE_MAX.
3605
3606nnnn. Fixed a bug that could result in double evaluation of command
3607 substitutions when they appear in failed redirections.
3608
3609oooo. Fixed a bug that could cause seg faults during `mapfile' callbacks if
3610 the callback unsets the array variable mapfile is using.
3611
3612pppp. Fixed several problems with variable assignments using ${var:=value}
3613 when the variable assignment is supposed to have side effects.
3614
3615qqqq. Fixed a bug that caused a failure of an assignment statement preceding a
3616 builtin caused the next invocation of a special builtin to exit the shell.
3617
3618rrrr. Fixed several problems with IFS when it appears in the temporary environment
3619 and is used in redirections.
3620
3621ssss. Fixed a problem that caused IFS changes using ${IFS:=value} to modify
3622 how preceding expansions were split.
3623
3624tttt. Fixed a problem that caused subshells to not run an EXIT trap they set.
3625
3626uuuu. Fixed a problem that caused shells started in posix mode to attempt to
3627 import shell functions with invalid names from the environment. We now
3628 print a warning.
3629
3630vvvv. Worked around a kernel problem that caused SIGCHLD to interrupt open(2)
3631 on a FIFO used for process substitution, even if the SIGCHLD handler was
3632 installed with the SA_RESTART flag.
3633
3634wwww. Fixed a problem that resulted in inconsistent expansion of $* and ${a[*]}.
3635
3636xxxx. Fixed a problem that caused `read -t' to crash when interrupted by
3637 SIGINT.
3638
3639yyyy. Fixed a problem that caused pattern removal to fail randomly because the
3640 pattern matcher read beyond the end of a string.
3641
3642zzzz. Fixed a bug that caused core dumps when shell functions tried to create
3643 local shadow copies of special variables like GROUPS.
3644
3645aaaaa. Fixed a bug that caused SIGTERM to be occasionally lost by children of
3646 interactive shells when it arrived before the child process reset the
3647 handler from SIG_DFL.
3648
3649bbbbb. Fixed a bug that caused redirections like <&n- to leave file descriptor
3650 n closed if executed with a builtin command.
3651
3652ccccc. Fixed a bug that caused incorrect completion quoting when completing a
3653 word containing a globbing character with `show-all-if-ambiguous' set.
3654
3655ddddd. Fixed a bug that caused printf's %q format specifier not to quote a
3656 tilde even if it appeared in a location where it would be subject to
3657 tilde expansion.
3658
36592. Changes to Readline
3660
3661a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode
3662 commands to work on the entire line.
3663
3664b. Fixed a bug that caused redisplay problems with prompts longer than 128
3665 characters and history searches.
3666
3667c. Fixed a bug that caused readline to try and run code to modify its idea
3668 of the screen size in a signal handler context upon receiving a SIGWINCH.
3669
3670d. Fixed a bug that caused the `meta' key to be enabled beyond the duration
3671 of an individual call top readline().
3672
3673e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's
3674 redisplay to mishandle zero-width combining characters.
3675
3676f. Fixed a bug that caused readline to `forget' part of a key sequence when
3677 a multiple-key sequence caused it to break out of an incremental search.
3678
3679g. Fixed bugs that caused readline to execute code in a signal handler
3680 context if interrupted while reading from the file system during completion.
3681
3682h. Fixed a bug that caused readline to `forget' part of a key sequence when
3683 reading an unbound multi-character key sequence.
3684
3685i. Fixed a bug that caused Readline's signal handlers to be installed beyond
3686 the bounds of a single call to readline().
3687
3688j. Fixed a bug that caused the `.' command to not redo the most recent `R'
3689 command in vi mode.
3690
3691k. Fixed a bug that caused ignoring case in completion matches to result in
3692 readline using the wrong match.
3693
3694l. Paren matching now works in vi insert mode.
3695
3696m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix
3697 work together.
3698
3699n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone
3700 in vi editing mode.
3701
3702o. Fixed a bug that caused the filename comparison code to not compare
3703 multibyte characters correctly when using case-sensitive or case-mapping
3704 comparisons.
3705
3706p. Fixed the input reading loop to call the input hook function only when there
3707 is no terminal input available.
3708
3709q. Fixed a bug that caused binding a macro to a multi-character key sequence
3710 where the sequence and macro value share a common prefix to not perform
3711 the macro replacement.
3712
3713r. Fixed several redisplay errors with multibyte characters and prompts
3714 containing invisible characters when using horizontal scrolling.
3715
3716s. Fixed a bug that caused redisplay errors when trying to overwrite
3717 existing characters using multibyte characters.
3718
37193. New Features in Bash
3720
3721a. The `helptopic' completion action now maps to all the help topics, not just
3722 the shell builtins.
3723
3724b. The `help' builtin no longer does prefix substring matching, so `help read'
3725 does not match `readonly'.
3726
3727c. The shell can be compiled to not display a message about processes that
3728 terminate due to SIGTERM.
3729
3730d. Non-interactive shells now react to the setting of checkwinsize and set
3731 LINES and COLUMNS after a foreground job exits.
3732
3733e. There is a new shell option, `globasciiranges', which, when set to on,
3734 forces globbing range comparisons to use character ordering as if they
3735 were run in the C locale.
3736
3737f. There is a new shell option, `direxpand', which makes filename completion
3738 expand variables in directory names in the way bash-4.1 did.
3739
3740g. In Posix mode, the `command' builtin does not change whether or not a
3741 builtin it shadows is treated as an assignment builtin.
3742
3743h. The `return' and `exit' builtins accept negative exit status arguments.
3744
3745i. The word completion code checks whether or not a filename containing a
3746 shell variable expands to a directory name and appends `/' to the word
3747 as appropriate. The same code expands shell variables in command names
3748 when performing command completion.
3749
3750j. In Posix mode, it is now an error to attempt to define a shell function
3751 with the same name as a Posix special builtin.
3752
3753k. When compiled for strict Posix conformance, history expansion is disabled
3754 by default.
3755
3756l. The history expansion character (!) does not cause history expansion when
3757 followed by the closing quote in a double-quoted string.
3758
3759m. `complete' and its siblings compgen/compopt now takes a new `-o noquote'
3760 option to inhibit quoting of the completions.
3761
3762n. Setting HISTSIZE to a value less than zero causes the history list to be
3763 unlimited (setting it 0 zero disables the history list).
3764
3765o. Setting HISTFILESIZE to a value less than zero causes the history file size
3766 to be unlimited (setting it to 0 causes the history file to be truncated
3767 to zero size).
3768
3769p. The `read' builtin now skips NUL bytes in the input.
3770
3771q. There is a new `bind -X' option to print all key sequences bound to Unix
3772 commands.
3773
3774r. When in Posix mode, `read' is interruptible by a trapped signal. After
3775 running the trap handler, read returns 128+signal and throws away any
3776 partially-read input.
3777
3778s. The command completion code skips whitespace and assignment statements
3779 before looking for the command name word to be completed.
3780
3781t. The build process has a new mechanism for constructing separate help files
3782 that better reflects the current set of compilation options.
3783
3784u. The -nt and -ot options to test now work with files with nanosecond
3785 timestamp resolution.
3786
3787v. The shell saves the command history in any shell for which history is
3788 enabled and HISTFILE is set, not just interactive shells.
3789
3790w. The shell has `nameref' variables and new -n(/+n) options to declare and
3791 unset to use them, and a `test -R' option to test for them.
3792
3793x. The shell now allows assigning, referencing, and unsetting elements of
3794 indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which
3795 count back from the last element of the array.
3796
3797y. The {x}<word redirection feature now allows words like {array[ind]} and
3798 can use variables with special meanings to the shell (e.g., BASH_XTRACEFD).
3799
3800z. There is a new CHILD_MAX special shell variable; its value controls the
a0c0a00f 3801 number of exited child statuses the shell remembers.
ac50fbac
CR
3802
3803aa. There is a new configuration option (--enable-direxpand-default) that
3804 causes the `direxpand' shell option to be enabled by default.
3805
3806bb. Bash does not do anything special to ensure that the file descriptor
3807 assigned to X in {x}<foo remains open after the block containing it
3808 completes.
3809
3810cc. The `wait' builtin has a new `-n' option to wait for the next child to
3811 change status.
3812
3813dd. The `printf' %(...)T format specifier now uses the current time if no
3814 argument is supplied.
3815
3816ee. There is a new variable, BASH_COMPAT, that controls the current shell
3817 compatibility level.
3818
3819ff. The `popd' builtin now treats additional arguments as errors.
3820
3821gg. The brace expansion code now treats a failed sequence expansion as a
3822 simple string and will continue to expand brace terms in the remainder
3823 of the word.
3824
38254. New Features in Readline
3826
3827a. Readline is now more responsive to SIGHUP and other fatal signals when
3828 reading input from the terminal or performing word completion but no
3829 longer attempts to run any not-allowable functions from a signal handler
3830 context.
3831
3832b. There are new bindable commands to search the history for the string of
3833 characters between the beginning of the line and the point
3834 (history-substring-search-forward, history-substring-search-backward)
3835
3836c. Readline allows quoted strings as the values of variables when setting
3837 them with `set'. As a side effect, trailing spaces and tabs are ignored
3838 when setting a string variable's value.
3839
3840d. The history library creates a backup of the history file when writing it
3841 and restores the backup on a write error.
3842
3843e. New application-settable variable: rl_filename_stat_hook: a function called
3844 with a filename before using it in a call to stat(2). Bash uses it to
3845 expand shell variables so things like $HOME/Downloads have a slash
3846 appended.
3847
3848f. New bindable function `print-last-kbd-macro', prints the most-recently-
3849 defined keyboard macro in a reusable format.
3850
3851g. New user-settable variable `colored-stats', enables use of colored text
3852 to denote file types when displaying possible completions (colored analog
3853 of visible-stats).
3854
3855h. New user-settable variable `keyseq-timout', acts as an inter-character
3856 timeout when reading input or incremental search strings.
3857
3858i. New application-callable function: rl_clear_history. Clears the history list
3859 and frees all readline-associated private data.
3860
3861j. New user-settable variable, show-mode-in-prompt, adds a characters to the
3862 beginning of the prompt indicating the current editing mode.
3863
3864k. New application-settable variable: rl_input_available_hook; function to be
3865 called when readline needs to check whether there is data available on its
3866 input source. The default hook checks rl_instream.
3867
3868l. Readline calls an application-set event hook (rl_signal_event_hook) after
3869 it gets a signal while reading input (read returns -1/EINTR but readline
3870 does not handle the signal immediately) to allow the application to handle
3871 or otherwise note it. Not currently called for SIGHUP or SIGTERM.
3872
3873m. If the user-settable variable `history-size' is set to a value less than
3874 0, the history list size is unlimited.
3875
3876------------------------------------------------------------------------------
495aee44
CR
3877This document details the changes between this version, bash-4.2-release,
3878and the previous version, bash-4.2-rc2.
3879
38801. Changes to Bash
3881
3882a. Fixed a bug that caused some variables to be clobbered by a longjmp,
3883 resulting in stack corruption.
3884
3885------------------------------------------------------------------------------
3886This document details the changes between this version, bash-4.2-rc2,
3887and the previous version, bash-4.2-rc1.
3888
38891. Changes to Bash
3890
3891a. Changes to bash_directory_completion_hook so that it's assigned to the
3892 readline rl_directory_rewrite_hook variable, which modifies the directory
3893 name passed to opendir without modifying the directory name the user
3894 typed.
3895
3896b. Fixed bug in select builtin that caused it to not terminate correctly if
3897 the read timed out due to $TMOUT.
3898
3899c. Fixed a problem that resulted in non-repeatable sequences of random
3900 numbers when RANDOM=0.
3901
3902------------------------------------------------------------------------------
3903This document details the changes between this version, bash-4.2-rc1,
3904and the previous version, bash-4.2-beta.
3905
39061. Changes to Bash
3907
3908a. Fixed a bug that caused some redirection errors to leak file descriptors.
3909
3910b. Fixed a bug that caused unary `+' and `-' arithmetic operators to have a
3911 higher precedence than unary `!' and `~'.
3912
3913c. Fixed a bug that caused simple commands in a pipeline to affect the exit
3914 status ($?) seen by subsequent pipeline commands.
3915
3916d. A number of cygwin-specific changes to avoid the use of text-mode files
3917 and file access, and to make sure that \r is handled correctly.
3918
3919e. Fixed a bug that caused the read builtin to not return failure if an
3920 attempt is made to assign to a readonly variable.
3921
3922f. Fixed a bug that caused some builtin usage messages to not be translated.
3923
3924g. Fixed a bug that caused the getopts builtin to not return failure if an
3925 attempt is made to assign to a readonly variable. Now it returns 2.
3926
3927h. Fixed the cd and pwd builtins to return failure if PWD is readonly and
3928 cannot be assigned to.
3929
3930i. Added code to check the return value of access(2) on Solaris systems,
3931 since it returns success for executable tests (e.g., `test -x') when
3932 run by root, even if the file permissions don't allow execution.
3933
39342. Changes to Readline
3935
3936a. Fixed a bug that caused directory names in words to be completed to not
3937 be dequoted correctly.
3938
39393. New Features in Bash
3940
39414. New Features in Readline
3942
3943------------------------------------------------------------------------------
3944This document details the changes between this version, bash-4.2-beta,
3945and the previous version, bash-4.2-alpha.
3946
39471. Changes to Bash
3948
3949a. Fixed a bug that caused the \W prompt string escape to not add a closing
3950 NULL.
3951
3952b. Fixed a bug that caused partially-quoted words that were not subject to
3953 word splitting to retained quoted NULLs.
3954
3955c. Added considerable efficiency speedups when pattern matching in multibyte
3956 locales by skipping multibyte character functions where possible.
3957
3958d. Added considerable speedups to variable expansion when in multibyte locales.
3959
3960e. Fixed a bug that caused the expansion of $* when there are no positional
3961 parameters to cause the shell to dump core when used in a pattern
3962 matching context.
3963
3964f. Fixed a bug that caused variable expansions preceding regular builtins to
3965 not change the shell environment during their execution.
3966
39672. Changes to Readline
3968
3969a. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave
3970 as if it were a negative argument.
3971
3972------------------------------------------------------------------------------
3973This document details the changes between this version, bash-4.2-alpha,
3974and the previous version, bash-4.1-release.
3975
39761. Changes to Bash
3977
3978a. Fixed a bug in the parser when processing alias expansions containing
3979 quoted newlines.
3980
3981b. Fixed a memory leak in associative array expansion.
3982
3983c. Fixed a bug that caused quoted here-strings to be requoted when printed.
3984
3985d. Fixed a bug in arithmetic expansion that caused the index in an array
3986 expansion to be evaluated twice under certain circumstances.
3987
3988e. Fixed several bugs with the expansion and display of variables that have
3989 been given attributes but not values and are technically unset.
3990
3991f. Fixed a bug that caused core dumps when using filename completion that
3992 expands to a filename containing a globbing character.
3993
3994g. Fixed a bug that caused assignment statements preceding a special builtin
3995 when running in Posix mode to not persist after the builtin completed
3996 when the special builtin was executed in a shell function without any
3997 local variables.
3998
3999h. Fixed a bug that caused a command to remain in the hash table even after
4000 `hash command' did not find anything if there was already an existing
4001 hashed pathname.
4002
4003i. Fixed several bugs caused by executing unsafe functions from a signal
4004 handler in the cases where a signal handler is executed immediately
4005 rather than setting a flag for later execution.
4006
4007j. Fixed a bug that caused some internal flag variables to be set
4008 incorrectly if `read -t' timed out.
4009
4010k. Fixed a Posix compatibility issue by making sure that a backslash escaping
4011 a `}' within a double-quoted ${...} parameter expansion is removed as part
4012 of the parameter expansion.
4013
4014l. Fixed a bug that caused execution of a trap to overwrite PIPESTATUS.
4015
4016m. Fixed a bug that caused here documents to not be displayed correctly
4017 when attached to commands inside compound commands.
4018
4019n. Fixed a bug that caused the printf builtin to use the wrong precision
4020 when using the `*' modifier.
4021
4022o. Fixed a bug that caused an arriving SIGCHLD to interrupt output functions
4023 like those invoked by echo or printf.
4024
4025p. Changed to use a more robust mechanism than eaccess(2) when test is
4026 checking filenames for execution permission.
4027
4028q. Fixed a bug that caused spurious semicolons to be added into the command
4029 history in certain cases.
4030
4031r. Fixed a bug that caused the shell to free non-allocated memory when
4032 unsetting element 0 of an associative array after it was assigned
4033 implicitly.
4034
4035s. Fixed a bug that could cause the shell to dump core if using the `v'
4036 vi editing command on a multi-line command.
4037
4038t. Fixed a bug that left FIFOs opened by process substitutions open long
4039 enough to potentially cause file descriptor exhaustion when running a
4040 shell function or shell builtin.
4041
4042u. Fixed a bug that caused the history expansion functions to not recognize
4043 process substitution or extended glob patterns as single words.
4044
4045v. Fixed a bug that caused restricted shells to set a restricted command's
4046 exit status incorrectly.
4047
4048w. Fixed a bug that caused bash to ignore the wrong set of filenames when
4049 completing a command using the `complete-filename' readline command.
4050
4051x. Fixed a bug that caused a -PID argument following a -s sig or -n sig to
4052 not be interpreted as a signal specification.
4053
4054y. Changed posix-mode behavior of a parse error in a `.' script or `eval'
4055 command to exit the shell under Posix-specified conditions. Previous
4056 versions printed a warning.
4057
4058z. Fixed a bug in \W prompt expansion that resulted in incorrect expansion
4059 in the event of overlapping strings.
4060
4061aa. Fixed a bug that caused the := parameter expansion operator to return the
4062 wrong value as the result of the expansion.
4063
4064bb. When in Posix mode, a single quote is not treated specially in a
4065 double-quoted ${...} expansion, unless the expansion operator is
4066 # or % or the non-Posix `//', `^', and `,'. In particular, it does
4067 not define a new quoting context. This is from Posix interpretation 221.
4068
4069cc. Fixed a bug that inadvertently allowed program names containing slashes
4070 to be entered into the command hash table.
4071
4072dd. Fixed a bug that caused the select builtin to incorrectly compute the
4073 display width of the arguments in the presence of multibyte characters.
4074
4075ee. Fixed a bug that caused bash to not change the xtrace file descriptor if
4076 BASH_XTRACEFD was found in the shell environment at startup.
4077
4078ff. Fixed a memory leak in the pattern removal parameter expansion.
4079
4080gg. Fixed a bug that caused SIGINT to fail to interrupt a nested loop if the
4081 loop was in a pipeline.
4082
4083hh. Fixed a problem in $(...) parsing that caused the parser to add an extra
4084 space to a here-document delimiter if the first word contained a `/'.
4085
4086ii. Fixed a bug that caused functions defined with the `function' reserved
4087 word to require braces around the function body.
4088
4089jj. Fixed a bug that caused bash to dump core when a variable expansion being
4090 used as an array subscript failed.
4091
4092kk. Fixed a bug that caused bash to dump core if the case-modification
4093 expansions were used on a variable with a null value.
4094
4095ll. Fixed a bug that caused partially-quoted strings to be split incorrectly
4096 if a variable with a null value was expanded within double quotes.
4097
4098mm. The pattern substitution word expansion has been sped up dramatically
4099 when running in a locale with multibyte characters.
4100
4101nn. Fixed a bug that caused history -a to not write the correct lines to
4102 the history file if all the new lines in the history list were added
4103 since the last time the history file was read or written.
4104
4105oo. Fixed a bug that caused completion of a word with an unclosed `` command
4106 substitution to set the prompt incorrectly.
4107
4108pp. Fixed a bug that caused extended globbing patterns in $HISTIGNORE or
4109 $GLOBIGNORE to be incorrectly scanned.
4110
4111qq. Fixed a bug caused by closing file descriptors 3-20 on shell startup. The
4112 shell now sets them to close-on-exec.
4113
4114rr. Fixed a bug that caused the exit status of `exec file' to be set incorrectly
4115 if `file' was a directory.
4116
4117ss. Fixed a bug in the `.' builtin to make a non-interactive posix-mode shell
4118 exit if the file argument to `.' is not found. Prefixing exec with
4119 `command' makes the shell not exit. Posix requires this behavior.
4120
4121tt. Fixed a bug that caused `sh -c 'command exec; exit 1' to hang.
4122
4123uu. Fixed a bug in $(...) command substitution parsing that caused the shell
4124 to treat backslash-newline incorrectly when parsing a comment.
4125
4126vv. Fixed bug that caused brace expansion sequence generation to misbehave
4127 when supplied integers greater than 2**31 - 1.
4128
4129ww. Fixed a bug that caused failure to save file descriptors for redirections
4130 to corrupt shell file descriptors.
4131
4132xx. Fixed a bug that caused bash-forward-shellword to not correctly handle
4133 quoted strings.
4134
41352. Changes to Readline
4136
4137a. Fixed a bug that caused the unconverted filename to be added to the list of
4138 completions when the application specified filename conversion functions.
4139
4140b. Fixed a bug that caused the wrong filename to be passed to opendir when the
4141 application has specified a filename dequoting function.
4142
4143c. Fixed a bug when repeating a character search in vi mode in the case where
4144 there was no search to repeat.
4145
4146d. When show-all-if-ambiguous is set, the completion routines no longer insert
4147 a common match prefix that is shorter than the text being completed.
4148
4149e. The full set of vi editing commands may now be used in callback mode.
4150
4151f. Fixed a bug that caused readline to not update its idea of the terminal
4152 dimensions while running in `no-echo' mode.
4153
4154h. Fixed a bug that caused readline to dump core if an application called
4155 rl_prep_terminal without setting rl_instream.
4156
4157i. Fixed a bug that caused meta-prefixed characters bound to incremental
4158 search forward or backward to not be recognized if they were typed
4159 subsequently.
4160
4161j. The incremental search code treats key sequences that map to the same
4162 functions as (default) ^G, ^W, and ^Y as equivalent to those characters.
4163
4164k. Fixed a bug in menu-complete that caused it to misbehave with large
4165 negative argument.
4166
4167l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked
4168 at the end of the line.
4169
41703. New Features in Bash
4171
4172a. `exec -a foo' now sets $0 to `foo' in an executable shell script without a
4173 leading #!.
4174
4175b. Subshells begun to execute command substitutions or run shell functions or
4176 builtins in subshells do not reset trap strings until a new trap is
4177 specified. This allows $(trap) to display the caller's traps and the
4178 trap strings to persist until a new trap is set.
4179
4180c. `trap -p' will now show signals ignored at shell startup, though their
4181 disposition still cannot be modified.
4182
4183d. $'...', echo, and printf understand \uXXXX and \UXXXXXXXX escape sequences.
4184
4185e. declare/typeset has a new `-g' option, which creates variables in the
4186 global scope even when run in a shell function.
4187
4188f. test/[/[[ have a new -v variable unary operator, which returns success if
4189 `variable' has been set.
4190
4191g. Posix parsing changes to allow `! time command' and multiple consecutive
4192 instances of `!' (which toggle) and `time' (which have no cumulative
4193 effect).
4194
4195h. Posix change to allow `time' as a command by itself to print the elapsed
4196 user, system, and real times for the shell and its children.
4197
4198j. $((...)) is always parsed as an arithmetic expansion first, instead of as
4199 a potential nested command substitution, as Posix requires.
4200
4201k. A new FUNCNEST variable to allow the user to control the maximum shell
4202 function nesting (recursive execution) level.
4203
4204l. The mapfile builtin now supplies a third argument to the callback command:
4205 the line about to be assigned to the supplied array index.
4206
4207m. The printf builtin has a new %(fmt)T specifier, which allows time values
4208 to use strftime-like formatting.
4209
4210n. There is a new `compat41' shell option.
4211
4212o. The cd builtin has a new Posix-mandated `-e' option.
4213
4214p. Negative subscripts to indexed arrays, previously errors, now are treated
4215 as offsets from the maximum assigned index + 1.
4216
4217q. Negative length specifications in the ${var:offset:length} expansion,
4218 previously errors, are now treated as offsets from the end of the variable.
4219
4220r. Parsing change to allow `time -p --'.
4221
4222s. Posix-mode parsing change to not recognize `time' as a keyword if the
4223 following token begins with a `-'. This means no more Posix-mode
4224 `time -p'. Posix interpretation 267.
4225
4226t. There is a new `lastpipe' shell option that runs the last command of a
4227 pipeline in the current shell context. The lastpipe option has no
4228 effect if job control is enabled.
4229
4230u. History expansion no longer expands the `$!' variable expansion.
4231
4232v. Posix mode shells no longer exit if a variable assignment error occurs
4233 with an assignment preceding a command that is not a special builtin.
4234
4235w. Non-interactive mode shells exit if -u is enabled and an attempt is made
4236 to use an unset variable with the % or # expansions, the `//', `^', or
4237 `,' expansions, or the parameter length expansion.
4238
4239x. Posix-mode shells use the argument passed to `.' as-is if a $PATH search
4240 fails, effectively searching the current directory. Posix-2008 change.
4241
42424. New Features in Readline
4243
4244a. The history library does not try to write the history filename in the
4245 current directory if $HOME is unset. This closes a potential security
4246 problem if the application does not specify a history filename.
4247
4248b. New bindable variable `completion-display-width' to set the number of
4249 columns used when displaying completions.
4250
4251c. New bindable variable `completion-case-map' to cause case-insensitive
4252 completion to treat `-' and `_' as identical.
4253
4254d. There are new bindable vi-mode command names to avoid readline's case-
4255 insensitive matching not allowing them to be bound separately.
4256
4257e. New bindable variable `menu-complete-display-prefix' causes the menu
4258 completion code to display the common prefix of the possible completions
4259 before cycling through the list, instead of after.
4260
4261------------------------------------------------------------------------------
0001803f
CR
4262This document details the changes between this version, bash-4.1-rc,
4263and the previous version, bash-4.1-beta.
4264
42651. Changes to Bash
4266
4267a. Fixed a bug that caused printf to not return a partial value when it
4268 encountered an error while converting an integer argument.
4269
4270b. Fixed a bug that caused setting one of the compatNN options to not
4271 turn off the others.
4272
4273c. The (undocumented) --wordexp option is no longer included by default.
4274
4275d. Fixed a bug in conditional command execution that caused it to not
4276 correctly ignore the exit status under certain circumstances.
4277
4278e. Added a configure-time check for correctly-working asprintf/snprintf.
4279
4280f. Fixed some problems with line number calculation and display when sourcing
4281 a file in an interactive shell.
4282
4283g. Fixed a bug that caused the shell to crash when using `declare -A foo=bar'.
4284
4285h. Fixed a bug that caused an off-by-one error when calculating the directories
4286 to display with the PROMPT_DIRTRIM option.
4287
42882. Changes to Readline
4289
4290a. Fixed a bug that caused applications using the callback interface to not
4291 react to SIGINT (or other signals) until another character arrived.
4292
4293------------------------------------------------------------------------------
4294This document details the changes between this version, bash-4.1-beta,
4295and the previous version, bash-4.1-alpha.
4296
42971. Changes to Bash
4298
4299a. Fixed a bug in mapfile that caused the shell to crash if it was passed the
4300 name of an associative array.
4301
4302b. Fixed a bug that caused the shell to incorrectly split case patterns if
4303 they contained characters in $IFS.
4304
4305c. Fixed a bug that caused the shell to set $? to the wrong value when using
4306 a construct ending with a variable assignment with set -x enabled and PS4
4307 containing a command substitution.
4308
4309d. Fixed a bug that caused the shell to read commands incorrectly if an
4310 expansion error occurred under certain conditions in a user-specified
4311 subshell.
4312
4313e. Fixed a bug that caused the shell to set $? incorrectly if a parse error
4314 occurred in an evaluation context ("eval", trap command, dot script, etc.)
4315
4316f. Fixed a bug that caused the shell to attempt command substitution
4317 completion within a single-quoted string.
4318
4319g. Fixed a bug that caused the shell to insert an extra single quote during
4320 word completion.
4321
4322h. Fixed a bug that caused the shell to crash if invoked with the environment
4323 variable EMACS having a null value.
4324
4325i. Fixed a bug that caused bash to incorrectly report the presence of new
4326 mail in a `maildir' environment.
4327
4328j. Fixed a bug that caused the shell to not recognize a here-document ending
4329 delimiter inside a command substitution.
4330
4331k. Fixed a bug that caused the shell to crash when a a dynamic array variable
4332 was assigned a scalar value.
4333
43342. Changes to Readline
4335
43363. New Features in Bash
4337
4338a. The mapfile/readarray builtin no longer stores the commands it invokes via
4339 callbacks in the history list.
4340
4341b. There is a new `compat40' shopt option.
4342
4343c. The < and > operators to [[ do string comparisons using the current locale
4344 only if the compatibility level is greater than 40 (set to 41 by default).
4345
43464. New Features in Readline
4347
4348------------------------------------------------------------------------------
4349This document details the changes between this version, bash-4.1-alpha,
4350and the previous version, bash-4.0-release.
4351
43521. Changes to Bash
4353
4354a. Fixed bugs in the parser involving new parsing of the commands contained
4355 in command substitution when the substitution is read.
4356
4357b. Fixed a bug that caused the shell to dump core when performing programmable
4358 completion using a shell function.
4359
4360c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong
4361 time.
4362
4363d. Fixed a bug that caused the shell to dump core when listing jobs in the
4364 `exit' builtin.
4365
4366e. Fixed several bugs encountered when reading subscripts in associative
4367 array assignments and expansions.
4368
4369f. Fixed a bug that under some circumstances caused an associative array to
4370 be converted to an indexed array.
4371
4372g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set
4373 $? to a value > 128.
4374
4375h. Fixed a bug that caused the shell to remove FIFOs associated with process
4376 substitution inside shell functions.
4377
4378i. Fixed a bug that caused terminal attributes to not be reset when the
4379 `read' builtin timed out.
4380
4381j. Fixed a bug in brace expansion that caused unwanted zero padding of the
4382 expanded terms.
4383
4384k. Fixed a bug that prevented the |& construct from working as intended when
4385 used with a simple command with additional redirections.
4386
8868edaf 4387l. Fixed a bug with the case statement ;& terminator that caused the shell to
0001803f
CR
4388 dereference a NULL pointer.
4389
4390m. Fixed a bug that caused assignment statements or redirections preceding
4391 a simple command name to inhibit alias expansion.
4392
4393n. Fixed the behavior of `set -u' to conform to the latest Posix interpretation:
4394 every expansion of an unset variable except $@ and $* will cause the
4395 shell to exit.
4396
4397o. Fixed a bug that caused double-quoted expansions of $* inside word
4398 expansions like ${x#$*} to not expand properly when $IFS is empty.
4399
4400p. Fixed a bug that caused traps to set $LINENO to the wrong value when they
4401 execute.
4402
4403q. Fixed a bug that caused off-by-one errors when computing history lines in
4404 the `fc' builtin.
4405
4406r. Fixed a bug that caused some terminating signals to not exit the shell
4407 quickly enough, forcing the kernel to send the signal (e.g., SIGSEGV)
4408 multiple times.
4409
4410s. Fixed a bug that caused the shell to attempt to add empty lines to the
4411 history list when reading here documents.
4412
4413t. Made some internal changes that dramatically speeds up sequential indexed
4414 array access.
4415
4416u. Fixed a bug that caused the shell to write past the end of a string when
4417 completing a double-quoted string ending in a backslash.
4418
4419v. Fixed a bug that caused the shell to replace too many characters when a
4420 pattern match was null in a ${foo//bar} expansion.
4421
4422w. Fixed bugs in the expansion of ** that caused duplicate directory names
4423 and the contents of the current directory to be omitted.
4424
4425x. Fixed a bug that caused $? to not be set correctly when referencing an
4426 unset variable with set -u and set -e enabled.
4427
4428y. Fixed a bug caused by executing an external program from the DEBUG trap
4429 while a pipeline was running. The effect was to disturb the pipeline
4430 state, occasionally causing it to hang.
4431
4432z. Fixed a bug that caused the ** glob expansion to dump core if it
4433 encountered an unsearchable directory.
4434
4435aa. Fixed a bug that caused `command -v' and `command -V' to not honor the
4436 path set by the -p option.
4437
4438bb. Fixed a bug that caused brace expansion to take place too soon in some
4439 compound array assignments.
4440
4441cc. Fixed a bug that caused programmable completion functions' changes to
4442 READLINE_POINT to not be reflected back to readline.
4443
4444dd. Fixed a bug that caused the shell to dump core if a trap was executed
4445 during a shell assignment statement.
4446
4447ee. Fixed an off-by-one error when computing the number of positional
4448 parameters for the ${@:0:n} expansion.
4449
4450ff. Fixed a problem with setting COMP_CWORD for programmable completion
4451 functions that could leave it set to -1.
4452
4453gg. Fixed a bug that caused the ERR trap to be triggered in some cases where
4454 `set -e' would not have caused the shell to exit.
4455
4456hh. Fixed a bug that caused changes made by `compopt' to not persist past the
4457 completion function in which compopt was executed.
4458
4459ii. Fixed a bug that caused the list of hostname completions to not be cleared
4460 when HOSTNAME was unset.
4461
4462jj. Fixed a bug that caused variable expansion in here documents to look in
4463 any temporary environment.
4464
4465kk. Bash and readline can now convert file names between precomposed and
4466 decomposed Unicode on Mac OS X ("keyboard" and file system forms,
4467 respectively). This affects filename completion (using new
4468 rl_filename_rewrite_hook), globbing, and readline redisplay.
4469
4470ll. The ERR and EXIT traps now see a non-zero value for $? when a parser
4471 error after set -e has been enabled causes the shell to exit.
4472
4473mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to
4474 not contain the correct number of digits.
4475
4476nn. Fixed a bug that caused the shell to free non-allocated memory when
4477 unsetting an associative array which had had a value implicitly assigned
4478 to index "0".
4479
4480oo. Fixed a memory leak in the ${!prefix@} expansion.
4481
4482pp. Fixed a bug that caused printf to not correctly report all write errors.
4483
4484qq. Fixed a bug that caused single and double quotes to act as delimiters
4485 when splitting a command line into words for programmable completion.
4486
4487rr. Fixed a bug that caused ** globbing that caused **/path/* to match every
4488 directory, not just those matching `path'.
4489
4490ss. Fixed a bug that caused the shell to dump core when running `help' without
4491 arguments if the terminal width was fewer than 7 characters.
4492
44932. Changes to Readline
4494
4495a. The SIGWINCH signal handler now avoids calling the redisplay code if
4496 one arrives while in the middle of redisplay.
4497
4498b. Changes to the timeout code to make sure that timeout values greater
4499 than one second are handled better.
4500
4501c. Fixed a bug in the redisplay code that was triggered by a prompt
4502 containing invisible characters exactly the width of the screen.
4503
4504d. Fixed a bug in the redisplay code encountered when running in horizontal
4505 scroll mode.
4506
4507e. Fixed a bug that prevented menu completion from properly completing
4508 filenames.
4509
4510f. Fixed a redisplay bug caused by a multibyte character causing a line to
4511 wrap.
4512
4513g. Fixed a bug that caused key sequences of two characters to not be
4514 recognized when a longer sequence identical in the first two characters
4515 was bound.
4516
4517h. Fixed a bug that caused history expansion to be attempted on $'...'
4518 single-quoted strings.
4519
4520i. Fixed a bug that caused incorrect redisplay when the prompt contained
4521 multibyte characters in an `invisible' sequence bracketed by \[ and
4522 \].
4523
4524j. Fixed a bug that caused history expansion to short-circuit after
4525 encountering a multibyte character.
4526
45273. New Features in Bash
4528
4529a. Here-documents within $(...) command substitutions may once more be
4530 delimited by the closing right paren, instead of requiring a newline.
4531
4532b. Bash's file status checks (executable, readable, etc.) now take file
4533 system ACLs into account on file systems that support them.
4534
4535c. Bash now passes environment variables with names that are not valid
4536 shell variable names through into the environment passed to child
4537 processes.
4538
4539d. The `execute-unix-command' readline function now attempts to clear and
4540 reuse the current line rather than move to a new one after the command
4541 executes.
4542
4543e. `printf -v' can now assign values to array indices.
4544
4545f. New `complete -E' and `compopt -E' options that work on the "empty"
4546 completion: completion attempted on an empty command line.
4547
4548g. New complete/compgen/compopt -D option to define a `default' completion:
4549 a completion to be invoked on command for which no completion has been
4550 defined. If this function returns 124, programmable completion is
4551 attempted again, allowing a user to dynamically build a set of completions
4552 as completion is attempted by having the default completion function
4553 install individual completion functions each time it is invoked.
4554
4555h. When displaying associative arrays, subscripts are now quoted.
4556
4557i. Changes to dabbrev-expand to make it more `emacs-like': no space appended
4558 after matches, completions are not sorted, and most recent history entries
4559 are presented first.
4560
4561j. The [[ and (( commands are now subject to the setting of `set -e' and the
4562 ERR trap.
4563
4564k. The source/. builtin now removes NUL bytes from the file before attempting
4565 to parse commands.
4566
4567l. There is a new configuration option (in config-top.h) that forces bash to
4568 forward all history entries to syslog.
4569
4570m. A new variable $BASHOPTS to export shell options settable using `shopt' to
4571 child processes.
4572
74091dd4 4573n. There is a new configure option that forces the extglob option to be
0001803f
CR
4574 enabled by default.
4575
4576o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
4577 output to that file descriptor.
4578
4579p. If the optional left-hand-side of a redirection is of the form {var}, the
4580 shell assigns the file descriptor used to $var or uses $var as the file
4581 descriptor to move or close, depending on the redirection operator.
4582
4583q. The < and > operators to the [[ conditional command now do string
4584 comparison according to the current locale.
4585
4586r. Programmable completion now uses the completion for `b' instead of `a'
4587 when completion is attempted on a line like: a $(b c.
4588
4589s. Force extglob on temporarily when parsing the pattern argument to
4590 the == and != operators to the [[ command, for compatibility.
4591
4592t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is
4593 received and a trap on SIGCHLD is set to be Posix-mode only.
4594
4595u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS
4596 characters, ignoring delimiters like newline.
4597
45984. New Features in Readline
4599
4600a. New bindable function: menu-complete-backward.
4601
4602b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
4603 and C-p to menu-complete-backward.
4604
4605c. When in vi command mode, repeatedly hitting ESC now does nothing, even
4606 when ESC introduces a bound key sequence. This is closer to how
4607 historical vi behaves.
4608
4609d. New bindable function: skip-csi-sequence. Can be used as a default to
4610 consume key sequences generated by keys like Home and End without having
4611 to bind all keys.
4612
4613e. New application-settable function: rl_filename_rewrite_hook. Can be used
74091dd4 4614 to rewrite or modify filenames read from the file system before they are
0001803f
CR
4615 compared to the word to be completed.
4616
4617f. New bindable variable: skip-completed-text, active when completing in the
4618 middle of a word. If enabled, it means that characters in the completion
4619 that match characters in the remainder of the word are "skipped" rather
4620 than inserted into the line.
4621
4622g. The pre-readline-6.0 version of menu completion is available as
4623 "old-menu-complete" for users who do not like the readline-6.0 version.
4624
4625h. New bindable variable: echo-control-characters. If enabled, and the
4626 tty ECHOCTL bit is set, controls the echoing of characters corresponding
4627 to keyboard-generated signals.
4628
4629i. New bindable variable: enable-meta-key. Controls whether or not readline
4630 sends the smm/rmm sequences if the terminal indicates it has a meta key
4631 that enables eight-bit characters.
4632
4633------------------------------------------------------------------------------
17345e5a
JA
4634This document details the changes between this version, bash-4.0-release,
4635and the previous version, bash-4.0-rc1.
4636
46371. Changes to Bash
4638
4639a. Changed the message printed when setlocale(3) fails to only include the
4640 strerror error text if the call changes errno.
4641
4642b. Changed trap command execution to reset the line number before running a
4643 trap (except DEBUG and RETURN traps).
4644
4645c. Fixed behavior of case-modifiying word expansions to not work on
4646 individual words within a variable's value.
4647
4648d. Fixed a bug that caused mapfile to not be interruptible when run in an
4649 interactive shell.
4650
4651e. Fixed a bug that caused mapfile to not run callbacks for the first line
4652 read.
4653
4654f. Fixed a bug that caused mapfile to not honor EOF typed in an interactive
4655 shell.
4656
4657g. Fixed the coprocess reaping code to not run straight from a signal handler.
4658
4659h. Fixed a bug that caused printf -b to ignore the first % conversion specifier
4660 in the format string on 64-bit systems.
4661
4662i. Fixed a bug that caused incorrect word splitting when `:', `=', or `~'
4663 appeared in $IFS.
4664
4665j. Fixed a bug that caused data corruption in the programmable completion code
4666 when a shell function called from a completion aborted execution.
4667
4668k. Fixed a bug that caused the CPU usage reported by the `time' builtin to be
4669 capped at 100%.
4670
4671l. Changed behavior of shell when -e option is in effect to reflect consensus
4672 of Posix shell standardization working group.
4673
4674m. Fixed a bug introduced in bash-4.0-alpha that caused redirections to not
4675 be displayed by `type' or `declare' when appearing in functions under
4676 certain circumstances.
4677
46782. Changes to Readline
4679
4680a. Fixed a bug that caused !(...) extended glob patterns to inhibit later
4681 history expansion.
4682
4683b. Reworked the signal handling to avoid calling disallowed functions from a
4684 signal handler.
4685
46863. New Features in Bash
4687
4688a. `readarray' is now a synonym for `mapfile'.
4689------------------------------------------------------------------------------
3185942a
JA
4690This document details the changes between this version, bash-4.0-rc1,
4691and the previous version, bash-4.0-beta2.
4692
46931. Changes to Bash
4694
4695a. Fixed a bug that caused parsing errors when a $()-style command
74091dd4 4696 substitution was followed immediately by a quoted newline.
3185942a
JA
4697
4698b. Fixed a bug that caused extended shell globbing patterns beginning with
4699 `*(' to not work when used with pattern substitution word expansions.
4700
4701------------------------------------------------------------------------------
4702This document details the changes between this version, bash-4.0-beta2,
4703and the previous version, bash-4.0-beta.
4704
47051. Changes to Bash
4706
4707a. Fixed a bug that caused failed word expansions to set $? but not
4708 PIPESTATUS.
4709
4710b. Changed filename completion to quote the tilde in a filename with a
4711 leading tilde that exists in the current directory.
4712
4713c. Fixed a bug that caused a file descriptor leak when performing
4714 redirections attached to a compound command.
4715
4716d. Fixed a bug that caused expansions of $@ and $* to not exit the shell if
4717 the -u option was enabled and there were no posititional parameters.
4718
4719e. Fixed a bug that resulted in bash not terminating immediately if a
4720 terminating signal was received while performing output.
4721
4722f. Fixed a bug that caused the shell to crash after creating 256 process
4723 substitutions during word completion.
4724
47252. Changes to Readline
4726
4727a. Fixed a bug that caused redisplay errors when using prompts with invisible
4728 characters and numeric arguments to a command in a multibyte locale.
4729
4730b. Fixed a bug that caused redisplay errors when using prompts with invisible
4731 characters spanning more than two physical screen lines.
4732
4733------------------------------------------------------------------------------
4734This document details the changes between this version, bash-4.0-beta,
17345e5a 4735and the previous version, bash-4.0-alpha.
3185942a
JA
4736
47371. Changes to Bash
4738
4739a. Fixed a typo that caused a variable to be used before initialization
4740 while parsing Posix-style command substitutions.
4741
4742b. Fixed a bug that caused stray ^? when the expansion of a parameter used
4743 as part of a pattern removal expansion is empty, but part of a non-
4744 empty string.
4745
4746c. Fixed a bug that could cause strings not converted to numbers by strtol
4747 to be treated as if the conversion had been successful.
4748
4749d. The `return' builtin now accepts no options and requires a `--' before
4750 a negative return value, as Posix requires.
4751
4752e. Fixed a bug that caused local variables to be created with the empty
4753 string for a value rather than no value.
4754
4755f. Changed behavior so the shell now acts as if it received an interrupt
4756 when a pipeline is killed by SIGINT while executing a list.
4757
4758g. Fixed a bug that caused `declare var' and `typeset var' to initialize
4759 `var' to the empty string.
4760
4761h. Changed `bind' builtin to print a warning but proceed if invoked when
4762 line editing is not active.
4763
4764i. Fixed a bug that caused the shell to exit when the `errexit' option is
4765 set and a command in a pipeline returns a non-zero exit status.
4766
4767j. Fixed a bug that caused the shell to not run the exit trap in a command
4768 run with `bash -c' under some circumstances.
4769
4770k. Fixed a bug that caused parser errors to occasionally not set $? when
4771 running commands with `eval'.
4772
4773l. Fixed a bug that caused stray control characters when evaluating compound
4774 array assignments containing $'\x7f' escapes.
4775
4776m. Fixed a bug that caused redirections involving file descriptor 10 as the
4777 target to behave incorrectly.
4778
4779n. Fixed a bug that could cause memory to be freed multiple times when
4780 assigning to COMP_WORDBREAKS.
4781
4782o. Fixed a bug that could cause NULL pointer dereferences when COMP_WORDBREAKS
4783 was unset.
4784
47852. Changes to Readline
4786
47873. New Features in Bash
4788
4789a. A value of 0 for the -t option to `read' now returns success if there is
4790 input available to be read from the specified file descriptor.
4791
4792b. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
4793 mode.
4794
4795c. New bindable readline functions shell-forward-word and shell-backward-word,
4796 which move forward and backward words delimited by shell metacharacters
4797 and honor shell quoting.
4798
4799d. New bindable readline functions shell-backward-kill-word and shell-kill-word
4800 which kill words backward and forward, but use the same word boundaries
4801 as shell-forward-word and shell-backward-word.
4802
48034. New Features in Readline
4804
4805a. If the kernel supports it, readline displays special characters
4806 corresponding to a keyboard-generated signal when the signal is received.
4807
4808------------------------------------------------------------------------------
4809This document details the changes between this version, bash-4.0-alpha,
4810and the previous version, bash-3.2-release.
4811
48121. Changes to Bash
4813
4814a. Fixed several bugs in old-style `` command substitution parsing, including
4815 comment parsing and quoted string handling.
4816
4817b. Fixed problems parsing arguments to the [[ command's =~ regular expression
4818 matching operator: metacharacter and whitespace parsing.
4819
4820c. Fixed a bug that caused the shell to inappropriately reuse high-numbered
4821 file descriptors it used internally.
4822
4823d. Fixed a bug in pattern replacement word expansions that caused a `/' as
4824 the first character of an expanded pattern to be mistaken for a global
4825 replacement specifier.
4826
4827e. Fixed several problems with the asprintf and snprintf replacement functions
4828 that caused hangs and crashes.
4829
4830f. Fixed a bug in the calculation of the current and previous job that caused
4831 it to refer to incorrect jobs.
4832
4833g. Fixed a bug in the check for the validity of a hashed command pathname that
4834 caused unnecessary hash table deletions and additions.
4835
4836h. Fixed a bug that caused child processes to inherit the wrong value for $!.
4837
4838i. Fixed a bug that caused `.' to fail to read and execute commands from non-
4839 regular files such as devices or named pipes.
4840
4841j. Fixed a bug in printf formatting for the %x and %X expansions that occurred
4842 on some systems.
4843
4844k. Fixed a bug that caused the shell to crash when creating temporary files if
4845 $TMPDIR named a non-writable directory.
4846
4847l. Fixed a bug that caused the shell to ignore $TMPDIR when creating temporary
4848 files under some circumstances.
4849
4850m. Fixed a bug that caused named pipes created by process substitution to not
4851 be cleaned up.
4852
4853n. Fixed a bug that caused HISTTIMEFORMAT to not be honored when it appeared
4854 in the initial shell environment.
4855
4856o. Fixed several bugs in the expansion of $* and $@ (quoted and unquoted)
4857 when IFS is null or contains non-whitespace characters; the same changes
4858 apply to arrays subscripted with * or @.
4859
4860p. Fixed several problems with pattern substitution expansions on the
4861 positional parameters and arrays subscripted with * or @ that occurred
4862 when $IFS was set to the empty string.
4863
4864q. Made a change to the default locale initialization code that should
4865 result in better behavior from the locale-aware library functions.
4866
4867r. Fixed a bug that caused compacting the jobs list to drop jobs.
4868
4869s. Fixed a bug that caused jumps back to the top-level processing loop from
4870 a builtin command to leave the shell in an inconsistent state.
4871
4872t. Fixed a bug that caused characters that would be escaped internally to be
4873 doubled when escaped with a backslash.
4874
4875u. Fixed the initialization of mailboxes to not cause maildirs to be read
4876 (and stat(2) called for every message file) at shell startup.
4877
4878v. Fixed a bug that caused the shell to not display $PS2 when the read builtin
4879 reads a line continued with a backslash.
4880
4881w. Fixed a bug that caused errors in word splitting when $IFS contained
4882 characters used for internal quoting.
4883
4884x. Fixed bugs that caused problems with output from shell builtins not being
4885 completely displayed on some systems.
4886
4887y. Fixed a bug that caused output to be lost when a redirection is acting on
4888 the shell's output file descriptor.
4889
4890z. Fixed bugs caused by shell builtins not checking for all write errors.
4891
4892aa. Fixed a problem that caused the shell to dump core if expansions on the
4893 pattern passed to the pattern removal word expansions resulted in expansion
4894 errors.
4895
4896bb. Fixed a bug that caused bash to loop infinitely after creating and
4897 waiting for 4096 jobs.
4898
4899cc. Fixed a bug that caused bash to lose the status of a background job under
4900 certain circumstances.
4901
4902dd. Fixed a bug that caused bash to not look in the temporary environment
4903 when performing variable lookup under certain circumstances.
4904
4905ee. Fixed a bug that caused bash to close file descriptors greater than 10
4906 when they were used in redirections.
4907
4908ff. Fixed a problem that caused the shell to attempt to read from the standard
4909 input when called as `bash -i script'.
4910
4911gg. Fixed a memory leak and variable initialization problems when the -v option
4912 was supplied to `printf' that could cause incorrect results.
4913
4914hh. Fixed a bug that caused the `read' builtin to count bytes when the -n option
4915 was supplied, rather than (possibly multibyte) characters.
4916
4917ii. Fixed a bug when displaying a function due to not converting the function
4918 to an external form.
4919
4920jj. Changed job control initialization to ensure that the shell has a tty
4921 as its controlling terminal before enabling job control.
4922
4923kk. Fixed a bug with the `test' builtin that caused it to misinterpret
4924 arguments beginning with `-' but containing more than one character.
4925
4926ll. Fixed bug that could cause the shell to dump core in certain cases where
4927 a command sets the SIGINT disposition to the default.
4928
4929mm. Fixed a bug in the pattern replacement (affecting both word expansion
4930 and the `fc' builtin) that occurred when the pattern and replacement
4931 strings were empty.
4932
4933nn. Fixed a bug that caused an arithmetic evaluation error to disable all
4934 further evaluation.
4935
4936oo. Fixed a bug in pathname expansion that caused it to interpret backslashes
4937 in the pathname as quoting characters.
4938
4939pp. Fixed a bug in the replacement getcwd() implementation that could cause
4940 memory to be overwritten.
4941
4942qq. When in Posix mode, the `ulimit' builtin now uses a block size of 512 for
4943 the `-c' and `-f' options.
4944
4945rr. Brace expansion now allows process substitutions to pass through unchanged.
4946
4947ss. Fixed a problem in the command name completion code to avoid quoting
4948 escaped special characters twice when the command name begins with a tilde.
4949
4950tt. Fixed a problem in the printf builtin that resulted in single-byte
4951 output for the "'" escape, even when using multibyte characters.
4952
4953uu. Fixed a bug that caused the failure exit status to be lost when redirections
4954 attached to a compound command failed.
4955
4956vv. Fixed a bug that caused the internal random number generator to not be
4957 re-seeded correctly when creating a subshell.
4958
4959ww. Fixed a bug that could cause the bash replacement getcwd to overwrite
4960 memory.
4961
4962xx. Fixed a bug that caused the shell to not receive SIGINT if it was sent
4963 while the shell was waiting for a command substitution to terminate, and
4964 make sure the exit status is correct when it does.
4965
4966yy. Fixed a bug that resulted in the second and subsequent children spawned
4967 by a shell begun to run a command substitution being placed into the
4968 wrong process group.
4969
4970zz. Fixed a bug that caused the results of successful tilde expansion to be
4971 subject to pathname expansion and word splitting.
4972
4973aaa. Fixed a bug that could cause the shell to hang if it encountered an
4974 error that caused it to jump back to the top processing loop during a
4975 command substitution or `eval' command.
4976
4977bbb. Fixed a bug that caused the `read' builtin to use the tty's attributes
4978 instead of those of the file descriptor passed with the -u option when
4979 processing the -n and -d options.
4980
4981ccc. Fixed a bug that caused incorrect expansion of ${array[@]:foo} if the
4982 first character of $IFS was not whitespace.
4983
4984ddd. Fixed a bug that occurred when scanning for the ending delimiter of a
4985 ${parameter/pat/sub} expansion.
4986
4987eee. Fixed a bug that caused the shell to inappropriately expand command
4988 substitutions in words when expanding directory names for completion.
4989
4990fff. Fixed a bug that caused the `fc' builtin to look too far back in the
4991 history list under certain circumstances.
4992
4993ggg. Fixed a bug that caused a shell running in Posix mode to search $PWD for
4994 a file specified as an argument to source/. when the file was not found
4995 in $PATH.
4996
4997hhh. Fixed a bug that caused the shell to modify the case of a command word
4998 found via command completion when the shell was performing case-
4999 insensitive completion.
5000
5001iii. Fixed a bug that caused the shell to search $PATH for an argument to
5002 source/. even when it contained a `/'.
5003
5004jjj. Fixed a bug that caused brace expansion to misorder expansions when the
5005 locale did not have a collating order like aAbBcC...zZ.
5006
5007kkk. Fixed a bug that did not allow `set +o history' to have any effect when
5008 run in a startup file or from a sourced file.
5009
5010lll. Fixed a bug with the precedence of the ?: conditional arithmetic operator.
5011
5012mmm. Fixed a bug that caused side effects of temporary variable assignments
5013 to persist in the shell environment.
5014
5015nnn. Fixed a bug that caused the terminal to be left in non-canonical mode
5016 when using editing commands that invoke the an editor on the current
5017 command line.
5018
5019ooo. Fixed a bug that caused globbing characters and characters in $IFS to not
5020 be quoted appropriately when displaying assignment statements.
5021
5022ppp. Fixed a bug that caused the `-e' option to be inherited when sourcing a
5023 file or evaluating a command with `eval' even if the return value of the
5024 command was supposed to be ignored.
5025
5026qqq. Fixed a bug that caused the shell to attempt to created variables with
5027 invalid names if such names appeared in the initial environment.
5028
5029rrr. Fixed a bug with quote removal in strings where the final character is a
5030 backslash.
5031
5032sss. Fixed a bug that caused the effects of special variables to persist even
5033 when the variables were unset as part of the shell reinitializing itself
5034 to execute a shell script.
5035
5036ttt. Fixed a bug that caused the history to not be saved after `history -c' or
5037 `history -d' was executed until a sufficient number of commands had been
5038 saved to the history.
5039
5040uuu. Bash now parses command substitutions according to Posix rules: parsing
5041 the command contained in $() to find the closing delimiter.
5042
5043vvv. Fixed a bug that caused traps on SIGCHLD set in a SIGCHLD handler to
5044 not persist.
5045
5046www. Fixed a bug that didn't allow SIGCHLD to interrupt the `wait' builtin
5047 as Posix specifies.
5048
5049xxx. Invalid numeric arguments to shell builtins no longer cause the shell to
5050 short-circuit any executing compound command.
5051
5052yyy. Fixed a bug that caused the exit status to be lost when `break' was
5053 used to short-circuit a loop's execution.
5054
5055zzz. Fixed a bug that caused stray ^? characters to be left in expansions of
5056 "${array[*]}".
5057
5058aaaa. Bash now prints better error messages for here documents terminated by
5059 EOF and for identifying the incorrect token in an invalid arithmetic
5060 expression.
5061
5062bbbb. Fixed a bug in the variable length word expansion that caused it to
5063 incorrectly calculate the number of multibyte characters.
5064
5065cccc. Fixed a race condition that could result in the top-level shell setting
5066 the terminal's process group to an incorrect value if the process
5067 group was changed by a child of a child of the shell.
5068
5069dddd. Fixed a bug that caused here documents belonging to commands within a
5070 compound command to be displayed in a syntactially-incorrect form, which
5071 prevented them from being re-read as input.
5072
5073eeee. The shell displays more warnings about failures to set the locale.
5074
5075ffff. Fixed a bug that caused the body of a here-document to not be saved to
5076 the history list.
5077
5078gggg. Fixed a bug that caused configure to incorrectly conclude that FreeBSD
5079 had /dev/fd available, resulting in problems with process substitution.
5080
50812. Changes to Readline
5082
5083a. Fixed a number of redisplay errors in environments supporting multibyte
5084 characters.
5085
5086b. Fixed bugs in vi command mode that caused motion commands to inappropriately
5087 set the mark.
5088
5089c. When using the arrow keys in vi insertion mode, readline allows movement
5090 beyond the current end of the line (unlike command mode).
5091
5092d. Fixed bugs that caused readline to loop when the terminal has been taken
5093 away and reads return -1/EIO.
5094
5095e. Fixed bugs in redisplay occurring when displaying prompts containing
5096 invisible characters.
5097
5098f. Fixed a bug that caused the completion append character to not be reset to
5099 the default after an application-specified completion function changed it.
5100
5101g. Fixed a problem that caused incorrect positioning of the cursor while in
5102 emacs editing mode when moving forward at the end of a line while using
5103 a locale supporting multibyte characters.
5104
5105h. Fixed an off-by-one error that caused readline to drop every 511th
5106 character of buffered input.
5107
5108i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up.
5109
5110j. Fixed redisplay bugs caused by multiline prompts with invisible characters
5111 or no characters following the final newline.
5112
5113k. Fixed redisplay bug caused by prompts consisting solely of invisible
5114 characters.
5115
5116l. Fixed a bug in the code that buffers characters received very quickly in
5117 succession which caused characters to be dropped.
5118
5119m. Fixed a bug that caused readline to reference uninitialized data structures
8868edaf 5120 if it received a SIGWINCH before completing initialization.
3185942a
JA
5121
5122n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly
5123 and therefore unrepeatable.
5124
5125o. Fixed a bug that caused readline to disable echoing when it was being used
5126 with an output file descriptor that was not a terminal.
5127
5128p. Readline now blocks SIGINT while manipulating internal data structures
5129 during redisplay.
5130
5131q. Fixed a bug in redisplay that caused readline to segfault when pasting a
5132 very long line (over 130,000 characters).
5133
5134r. Fixed bugs in redisplay when using prompts with no visible printing
5135 characters.
5136
51373. New Features in Bash
5138
5139a. When using substring expansion on the positional parameters, a starting
5140 index of 0 now causes $0 to be prefixed to the list.
5141
5142b. The `help' builtin now prints its columns with entries sorted vertically
5143 rather than horizontally.
5144
5145c. There is a new variable, $BASHPID, which always returns the process id of
5146 the current shell.
5147
5148d. There is a new `autocd' option that, when enabled, causes bash to attempt
5149 to `cd' to a directory name that is supplied as the first word of a
5150 simple command.
5151
5152e. There is a new `checkjobs' option that causes the shell to check for and
5153 report any running or stopped jobs at exit.
5154
5155f. The programmable completion code exports a new COMP_TYPE variable, set to
5156 a character describing the type of completion being attempted.
5157
5158g. The programmable completion code exports a new COMP_KEY variable, set to
5159 the character that caused the completion to be invoked (e.g., TAB).
5160
5161h. If creation of a child process fails due to insufficient resources, bash
5162 will try again several times before reporting failure.
5163
5164i. The programmable completion code now uses the same set of characters as
5165 readline when breaking the command line into a list of words.
5166
5167j. The block multiplier for the ulimit -c and -f options is now 512 when in
5168 Posix mode, as Posix specifies.
5169
5170k. Changed the behavior of the read builtin to save any partial input received
5171 in the specified variable when the read builtin times out. This also
5172 results in variables specified as arguments to read to be set to the empty
5173 string when there is no input available. When the read builtin times out,
5174 it returns an exit status greater than 128.
5175
5176l. The shell now has the notion of a `compatibility level', controlled by
5177 new variables settable by `shopt'. Setting this variable currently
5178 restores the bash-3.1 behavior when processing quoted strings on the rhs
5179 of the `=~' operator to the `[[' command.
5180
5181m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number
5182 of threads) options.
5183
5184n. The -p option to `declare' now displays all variable values and attributes
5185 (or function values and attributes if used with -f).
5186
5187o. There is a new `compopt' builtin that allows completion functions to modify
5188 completion options for existing completions or the completion currently
5189 being executed.
5190
5191p. The `read' builtin has a new -i option which inserts text into the reply
5192 buffer when using readline.
5193
5194q. A new `-E' option to the complete builtin allows control of the default
5195 behavior for completion on an empty line.
5196
5197r. There is now limited support for completing command name words containing
5198 globbing characters.
5199
5200s. Changed format of internal help documentation for all builtins to roughly
5201 follow man page format.
5202
5203t. The `help' builtin now has a new -d option, to display a short description,
5204 and a -m option, to print help information in a man page-like format.
5205
5206u. There is a new `mapfile' builtin to populate an array with lines from a
5207 given file.
5208
5209v. If a command is not found, the shell attempts to execute a shell function
5210 named `command_not_found_handle', supplying the command words as the
5211 function arguments.
5212
5213w. There is a new shell option: `globstar'. When enabled, the globbing code
5214 treats `**' specially -- it matches all directories (and files within
5215 them, when appropriate) recursively.
5216
5217x. There is a new shell option: `dirspell'. When enabled, the filename
5218 completion code performs spelling correction on directory names during
5219 completion.
5220
5221y. The `-t' option to the `read' builtin now supports fractional timeout
5222 values.
5223
5224z. Brace expansion now allows zero-padding of expanded numeric values and
5225 will add the proper number of zeroes to make sure all values contain the
5226 same number of digits.
5227
5228aa. There is a new bash-specific bindable readline function: `dabbrev-expand'.
5229 It uses menu completion on a set of words taken from the history list.
5230
5231bb. The command assigned to a key sequence with `bind -x' now sets two new
5232 variables in the environment of the executed command: READLINE_LINE_BUFFER
5233 and READLINE_POINT. The command can change the current readline line
5234 and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT,
5235 respectively.
5236
0001803f 5237cc. There is a new &>> redirection operator, which appends the standard output
3185942a
JA
5238 and standard error to the named file.
5239
5240dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects
5241 the standard error for a command through a pipe.
5242
5243ee. The new `;&' case statement action list terminator causes execution to
5244 continue with the action associated with the next pattern in the
5245 statement rather than terminating the command.
5246
5247ff. The new `;;&' case statement action list terminator causes the shell to
5248 test the next set of patterns after completing execution of the current
5249 action, rather than terminating the command.
5250
5251gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an
5252 integer value greater than zero, prompt expansion of \w and \W will
5253 retain only that number of trailing pathname components and replace
5254 the intervening characters with `...'.
5255
5256hh. There are new case-modifying word expansions: uppercase (^[^]) and
5257 lowercase (,[,]). They can work on either the first character or
5258 array element, or globally. They accept an optional shell pattern
5259 that determines which characters to modify. There is an optionally-
5260 configured feature to include capitalization operators.
5261
5262ii. The shell provides associative array variables, with the appropriate
5263 support to create, delete, assign values to, and expand them.
5264
5265jj. The `declare' builtin now has new -l (convert value to lowercase upon
5266 assignment) and -u (convert value to uppercase upon assignment) options.
5267 There is an optionally-configurable -c option to capitalize a value at
5268 assignment.
5269
5270kk. There is a new `coproc' reserved word that specifies a coprocess: an
5271 asynchronous command run with two pipes connected to the creating shell.
5272 Coprocs can be named. The input and output file descriptors and the
5273 PID of the coprocess are available to the calling shell in variables
5274 with coproc-specific names.
5275
52764. New Features in Readline
5277
5278a. A new variable, rl_sort_completion_matches; allows applications to inhibit
5279 match list sorting (but beware: some things don't work right if
5280 applications do this).
5281
5282b. A new variable, rl_completion_invoking_key; allows applications to discover
5283 the key that invoked rl_complete or rl_menu_complete.
5284
5285c. The functions rl_block_sigint and rl_release_sigint are now public and
5286 available to calling applications who want to protect critical sections
5287 (like redisplay).
5288
5289d. The functions rl_save_state and rl_restore_state are now public and
5290 available to calling applications; documented rest of readline's state
5291 flag values.
5292
5293e. A new user-settable variable, `history-size', allows setting the maximum
5294 number of entries in the history list.
5295
5296f. There is a new implementation of menu completion, with several improvements
5297 over the old; the most notable improvement is a better `completions
5298 browsing' mode.
5299
5300g. The menu completion code now uses the rl_menu_completion_entry_function
5301 variable, allowing applications to provide their own menu completion
5302 generators.
5303
5304h. There is support for replacing a prefix of a pathname with a `...' when
5305 displaying possible completions. This is controllable by setting the
5306 `completion-prefix-display-length' variable. Matches with a common prefix
5307 longer than this value have the common prefix replaced with `...'.
5308
5309i. There is a new `revert-all-at-newline' variable. If enabled, readline will
5310 undo all outstanding changes to all history lines when `accept-line' is
5311 executed.
5312
5313------------------------------------------------------------------------------
0628567a
JA
5314This document details the changes between this version, bash-3.2-release,
5315and the previous version, bash-3.2-beta.
5316
53171. Changes to Bash
5318
5319a. Fixed a bug that caused the temporary environment passed to a command to
5320 affect the shell's environment under certain circumstances.
5321
5322b. Fixed a bug in the printf builtin that caused the %q format specifier to
5323 ignore empty string arguments.
5324
5325c. Improved multibyte character environment detection at configuration time.
5326
5327d. Fixed a bug in the read builtin that left spurious escape characters in the
5328 input after processing backslashes when assigning to an array variable.
5329
53302. Changes to Readline
5331
5332a. Fixed a redisplay bug that occurred in multibyte-capable locales when the
5333 prompt was one character longer than the screen width.
5334------------------------------------------------------------------------------
5335This document details the changes between this version, bash-3.2-beta,
5336and the previous version, bash-3.2-alpha.
5337
53381. Changes to Bash
5339
5340a. Changed the lexical analyzer to treat locale-specific blank characters as
5341 white space.
5342
5343b. Fixed a bug in command printing to avoid confusion between redirections and
5344 process substitution.
5345
5346c. Fixed problems with cross-compiling originating from inherited environment
5347 variables.
5348
5349d. Added write error reporting to printf builtin.
5350
5351e. Fixed a bug in the variable expansion code that could cause a core dump in
5352 a multi-byte locale.
5353
5354f. Fixed a bug that caused substring expansion of a null string to return
5355 incorrect results.
5356
5357g. BASH_COMMAND now retains its previous value while executing commands as the
5358 result of a trap, as the documentation states.
5359
53602. Changes to Readline
5361
5362a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
5363 the prompt and input line multiple times.
5364
5365b. Fixed history expansion to not be confused by here-string redirection.
5366
5367c. Readline no longer treats read errors by converting them to newlines, as
5368 it does with EOF. This caused partial lines to be returned from readline().
5369
5370------------------------------------------------------------------------------
5371This document details the changes between this version, bash-3.2-alpha,
5372and the previous version, bash-3.1-release.
5373
53741. Changes to Bash
5375
5376a. Fixed a source bug that caused the minimal configuration to not compile.
5377
5378b. Fixed memory leaks in error handling for the `read' builtin.
5379
5380c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit
5381 status.
5382
5383d. Fixed some parsing problems with compound array assignments.
5384
5385e. Added additional configuration changes for: NetBSD (incomplete multibyte
5386 character support)
5387
5388f. Fixed two bugs with local array variable creation when shadowing a variable
5389 of the same name from a previous context.
5390
5391g. Fixed the `read' builtin to restore the correct set of completion functions
5392 if a timeout occurs.
5393
5394h. Added code to defer the initialization of HISTSIZE (and its stifling of the
5395 history list) until the history file is loaded, allowing a startup file to
5396 override the default value.
5397
5398i. Tightened up the arithmetic expression parsing to produce better error
5399 messages when presented with invalid operators.
5400
5401j. Fixed the cross-compilation support to build the signal list at shell
5402 invocation rather than compile time if cross-compiling.
5403
5404k. Fixed multibyte support for non-gcc compilers (or compilers that do not
5405 allow automatic array variable sizing based on a non-constant value).
5406
5407l. Several fixes to the code that manages the list of terminated jobs and
5408 their exit statuses, and the list of active and recently-terminated jobs
5409 to avoid pid aliasing/wraparound and allocation errors.
5410
5411m. Fixed a problem that allowed scripts to die due to SIGINT while waiting
5412 for children, even when started in the background or otherwise ignoring
5413 SIGINT.
5414
5415n. Fixed a bug that caused shells invoked as -/bin/bash from not being
5416 recognized as login shells.
5417
5418o. Fixed a problem that caused shells in the background to give the terminal
5419 to a process group other than the foreground shell process group.
5420
5421p. Fixed a problem with extracting the `varname' in ${#varname}.
5422
5423q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby
5424 calling functions that may not be called in a signal handler context --
5425 but set a flag and exit afterward (like SIGINT).
5426
5427r. Changed the brace expansion code to skip over braces that don't begin a
5428 valid matched brace expansion construct.
5429
5430s. Fixed `typeset' and `declare' to not require that their shell function
5431 operands to be valid shell identifiers.
5432
5433t. Changed `test' to use access(2) with a temporary uid/euid swap when testing
5434 file attributes and running setuid, and access(2) in most other cases.
5435
5436u. Changed completion code to not attempt command name completion on a line
5437 consisting solely of whitespace when no_empty_command_completion is set.
5438
5439v. The `hash' builtin now prints nothing in posix mode when the hash table is
5440 empty, and prints a message to that effect to stdout instead of stderr
5441 when not in posix mode.
5442
5443w. Fixed a bug in the extended pattern matching code that caused it to fail to
5444 match periods with certain patterns.
5445
5446x. Fixed a bug that caused the shell to dump core when performing filename
5447 generation in directories with thousands of files.
5448
5449y. Returned to the original Bourne shell rules for parsing ``: no recursive
5450 parsing of embedded quoted strings or ${...} constructs.
5451
8868edaf 5452z. The inheritance of the DEBUG, RETURN, and ERR traps is now dependent only
0628567a
JA
5453 on the settings of the `functrace' and `errtrace' shell options, rather
5454 than whether or not the shell is in debugging mode.
5455
5456aa. Fixed a problem with $HOME being converted to ~ in the expansion of
5457 members of the DIRSTACK array.
5458
5459bb. Fixed a problem with quoted arguments to arithmetic expansions in certain
5460 constructs.
5461
5462cc. The command word completion code now no longer returns matching directories
5463 while searching $PATH.
5464
5465dd. Fixed a bug with zero-padding and precision handling in snprintf()
5466 replacement.
5467
5468ee. Fixed a bug that caused the command substitution code not to take embedded
5469 shell comments into account.
5470
5471ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an
5472 arithmetic substitution.
5473
5474gg. Fixed a bug in the prompt expansion code that inappropriately added a
5475 \001 before a \002 under certain circumstances.
5476
5477hh. Fixed a bug that caused `unset LANG' to not properly reset the locale
5478 (previous versions would set the locale back to what it was when bash
5479 was started rather than the system's "native" locale).
5480
5481ii. Fixed a bug that could cause file descriptors > 10 to not be closed even
5482 when closed explicitly by a script.
5483
5484jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting
5485 inside double-quoted command substitutions.
5486
5487kk. Fixed a bug that could cause core dumps when `return' was executed as the
5488 last element of a pipeline inside a shell function.
5489
5490ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in
5491 the jobs list.
5492
54932. Changes to Readline
5494
5495a. Fixed a problem that caused segmentation faults when using readline in
5496 callback mode and typing consecutive DEL characters on an empty line.
5497
5498b. Fixed several redisplay problems with multibyte characters, all having to
5499 do with the different code paths and variable meanings between single-byte
5500 and multibyte character redisplay.
5501
5502c. Fixed a problem with key sequence translation when presented with the
5503 sequence \M-\C-x.
5504
5505d. Fixed a problem that prevented the `a' command in vi mode from being
5506 undone and redone properly.
5507
5508e. Fixed a problem that prevented empty inserts in vi mode from being undone
5509 properly.
5510
5511f. Fixed a problem that caused readline to initialize with an incorrect idea
5512 of whether or not the terminal can autowrap.
5513
5514g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
5515 convert-meta and use \e where appropriate.
5516
5517h. Changed the default filename completion function to call the filename
5518 dequoting function if the directory completion hook isn't set. This means
5519 that any directory completion hooks need to dequote the directory name,
5520 since application-specific hooks need to know how the word was quoted,
5521 even if no other changes are made.
5522
5523i. Fixed a bug with creating the prompt for a non-interactive search string
5524 when there are non-printing characters in the primary prompt.
5525
5526j. Fixed a bug that caused prompts with invisible characters to be redrawn
5527 multiple times in a multibyte locale.
5528
5529k. Fixed a bug that could cause the key sequence scanning code to return the
5530 wrong function.
5531
5532l. Fixed a problem with the callback interface that caused it to fail when
5533 using multi-character keyboard macros.
5534
5535m. Fixed a bug that could cause a core dump when an edited history entry was
5536 re-executed under certain conditions.
5537
5538n. Fixed a bug that caused readline to reference freed memory when attmpting
5539 to display a portion of the prompt.
5540
55413. New Features in Bash
5542
5543a. Changed the parameter pattern replacement functions to not anchor the
5544 pattern at the beginning of the string if doing global replacement - that
5545 combination doesn't make any sense.
5546
5547b. When running in `word expansion only' mode (--wordexp option), inhibit
5548 process substitution.
5549
5550c. Loadable builtins now work on MacOS X 10.[34].
5551
5552d. Shells running in posix mode no longer set $HOME, as POSIX requires.
5553
5554e. The code that checks for binary files being executed as shell scripts now
5555 checks only for NUL rather than any non-printing character.
5556
5557f. Quoting the string argument to the [[ command's =~ operator now forces
5558 string matching, as with the other pattern-matching operators.
5559
55604. New Features in Readline
5561
5562a. Calling applications can now set the keyboard timeout to 0, allowing
5563 poll-like behavior.
5564
5565b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
5566 the default last-ditch startup file.
5567
5568c. The history file reading functions now allow windows-like \r\n line
5569 terminators.
5570
5571------------------------------------------------------------------------------
95732b49
JA
5572This document details the changes between this version, bash-3.1-release,
5573and the previous version, bash-3.1-rc2.
5574
55751. Changes to Readline
5576
5577a. Several changes to the multibyte redisplay code to fix problems with
5578 prompts containing invisible characters.
5579
5580------------------------------------------------------------------------------
5581This document details the changes between this version, bash-3.1-rc2,
5582and the previous version, bash-3.1-rc1.
5583
55841. Changes to Bash
5585
5586a. Fixed a bug that caused a DEBUG trap to overwrite a command string that's
5587 eventually attached to a background job.
5588
5589b. Changed some code so that filenames with leading tildes with spaces in the
5590 name aren't tilde-expanded by the bash completion code.
5591
5592c. Fixed a bug that caused the pushd builtin to fail to change to
5593 directories with leading `-'.
5594
5595d. Fixed a small memory leak in the programmable completion code.
5596
55972. Changes to Readline
5598
5599a. Fixed a redisplay bug caused by moving the cursor vertically to a line
5600 with invisible characters in the prompt in a multibyte locale.
5601
5602b. Fixed a bug that could cause the terminal special chars to be bound in the
5603 wrong keymap in vi mode.
5604
56053. New Features in Bash
5606
5607a. If compiled for strict POSIX conformance, LINES and COLUMNS may now
5608 override the true terminal size.
5609
56104. New Features in Readline
5611
5612a. A new external application-controllable variable that allows the LINES
5613 and COLUMNS environment variables to set the window size regardless of
5614 what the kernel returns.
5615
5616------------------------------------------------------------------------------
5617This document details the changes between this version, bash-3.1-rc1,
5618and the previous version, bash-3.1-beta1.
5619
56201. Changes to Bash
5621
0628567a 5622a. Fixed a bug that could cause core dumps due to accessing the current
95732b49
JA
5623 pipeline while in the middle of modifying it.
5624
5625b. Fixed a bug that caused pathnames with backslashes still quoting characters
5626 to be passed to opendir().
5627
5628c. Command word completion now obeys the setting of completion-ignore-case.
5629
5630d. Fixed a problem with redirection that caused file descriptors greater than
5631 2 to be inappropriately marked as close-on-exec.
5632
5633e. In Posix mode, after `wait' is called to wait for a particular process
5634 explicitly, that process is removed from the list of processes known to
5635 the shell, and subsequent attempts to wait for it return errors.
5636
5637f. Fixed a bug that caused extended pattern matching to incorrectly scan
5638 backslash-escaped pattern characters.
5639
5640g. Fixed a synchronization problem that could cause core dumps when handling
5641 a SIGWINCH.
5642
5643h. Fixed a bug that caused an unmatched backquote to be accepted without an
5644 error when processing here documents.
5645
5646i. Fixed a small memory leak in the `cd' builtin.
5647
5648j. Fix for MacOS X so it gets the values for the HOSTTYPE, MACHTYPE, and
5649 OSTYPE variables at build time, to support universal binaries.
5650
5651k. Fixed a bug that could cause an exit trap to return the exit status of
5652 the trap command rather than the status as it was before the trap was
5653 run as the shell's exit status.
5654
56552. New Features in Bash
5656
56573. Changes to Readline
5658
5659a. Fixed a bug that caused reversing the incremental search direction to
5660 not work correctly.
5661
5662b. Fixed the vi-mode `U' command to only undo up to the first time insert mode
5663 was entered, as Posix specifies.
5664
5665c. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
5666 place.
5667
56684. New Features in Readline
5669
5670a. New application-callable auxiliary function, rl_variable_value, returns
5671 a string corresponding to a readline variable's value.
5672
5673b. When parsing inputrc files and variable binding commands, the parser
5674 strips trailing whitespace from values assigned to boolean variables
5675 before checking them.
5676
5677
5678------------------------------------------------------------------------------
5679This document details the changes between this version, bash-3.1-beta1,
5680and the previous version, bash-3.1-alpha1.
5681
56821. Changes to Bash
5683
5684a. Added some system-specific signal names.
5685
5686b. Fixed a typo in the ulimit builtin to make `x' the right option to
8868edaf 5687 manipulate the limit on file locks.
95732b49
JA
5688
5689c. Fixed a problem with using += to append to index 0 of an array variable
5690 when not using subscript syntax.
5691
5692d. A few changes to configure.in to remove calls to obsolete or outdated
5693 macros.
5694
5695e. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
5696 made when the variable is set in the temporary environment to a command.
5697
5698f. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
5699 made when the variable is modified using `printf -v'.
5700
5701g. The export environment is now remade on cygwin when HOME is changed, so
5702 DLLs bash is linked against pick up the new value. This fixes problems
5703 with tilde expansion when linking against and already-installed readline.
5704
5705h. Small fix to the logic for performing tilde expansion in posix mode, so
5706 expansion on the right-hand side of an assignment statement takes place.
5707
5708i. Fixed a bug that prevented redirections associated with a shell function
5709 from being executed when in a subshell.
5710
5711j. Fixed `source' and `.' builtins to not require an executable file when
5712 searching $PATH for a file to source.
5713
5714k. Fixed a bug that caused incorrect word splitting in a function when IFS
5715 was declared local, then unset.
5716
5717l. Fixed a problem with the `kill' builtin that prevented sending signals
5718 to a process group under certain circumstances when providing a pid < 0.
5719
5720m. When in POSIX mode, `pwd' now checks that the value it prints is the same
5721 directory as `.', even when displaying $PWD.
5722
5723n. Fixed a problem with the `read' builtin when reading a script from standard
5724 input and reading data from the same file.
5725
5726o. Fixed a problem with the `type' and `command' builtins that caused absolute
5727 pathnames to be displayed incorrectly.
5728
5729p. Some changes to the `bg' builtin for POSIX conformance.
5730
5731q. The `fc' builtin now removes the `fc' command that caused it to invoke an
5732 editor on specified history entries from the history entirely, rather than
5733 simply ignoring it.
5734
5735r. When in POSIX mode, the `v' command in vi editing mode simply invokes vi
5736 on the current command, rather than checking $FCEDIT and $EDITOR.
5737
5738s. Fixed a small memory leak in the pathname canonicalization code.
5739
5740t. Fixed a bug that caused the expanded value of a $'...' string to be
5741 incorrectly re-quoted if it occurred within a double-quoted ${...}
5742 parameter expansion.
5743
5744u. Restored default emacs-mode key binding of M-TAB to dynamic-complete-history.
5745
5746v. Fixed a bug that caused core dumps when interrupting loops running builtins
5747 on some systems.
5748
5749w. Make sure that some of the functions bash provides replacements for are
5750 not cpp defines.
5751
5752x. The code that scans embedded commands for the parser (`...` and $(...)) is
5753 now more aware of embedded comments and their effect on quoted strings.
5754
5755y. Changed the `-n' option to the `history' builtin to not reset the number of
5756 history lines read in the current session after reading the new lines from
5757 the history file if the history is being appended when it is written to
5758 the file, since the appending takes care of the problem that the adjustment
5759 was intended to solve.
5760
5761z. Improved the error message displayed when a shell script fails to execute
5762 because the environment and size of command line arguments are too large.
5763
5764aa. A small fix to make sure that $HISTCMD is evaluated whenever the shell is
5765 saving commands to the history list, not just when HISTSIZE is defined.
5766
57672. Changes to Readline
5768
5769a. The `change-case' command now correctly changes the case of multibyte
5770 characters.
5771
5772b. Changes to the shared library construction scripts to deal with Windows
5773 DLL naming conventions for Cygwin.
5774
5775c. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
5776 SIGWINCH.
5777
5778d. Fixed the non-incremental search code in vi mode to dispose of any current
5779 undo list when copying a line from the history into the current editing
5780 buffer.
5781
5782e. The variable assignment code now ignores whitespace at the end of lines
5783 when assigning to boolean variables.
5784
5785f. The `C-w' binding in incremental search now understands multibyte
5786 characters.
5787
57883. New Features in Bash
5789
5790a. A new configuration option, `--enable-strict-posix-default', which will
5791 build bash to be POSIX conforming by default.
5792
57934. New Features in Readline
5794
5795a. If the rl_completion_query_items is set to a value < 0, readline never
5796 asks the user whether or not to view the possible completions.
5797
5798------------------------------------------------------------------------------
5799This document details the changes between this version, bash-3.1-alpha1,
5800and the previous version, bash-3.0-release.
5801
58021. Changes to Bash
5803
5804a. Fixed a bug that caused bash to crash if referencing an unset local array.
5805
5806b. Fixed a problem that caused tilde expansion to not be performed before
5807 attempting globbing word completion.
5808
5809c. Fixed an incompatibility so that a first argument to trap that's a valid
5810 signal number will be trated as a signal rather than a command to execute.
5811
5812d. Fixed ${#word} expansion to correctly compute the length of a string
5813 containing multibyte characters.
5814
5815e. Fixed a bug that caused bash to not pass the correct flags for signal
5816 disposition to child processes.
5817
5818f. Fixed a bug that caused `fc -l' to list one too many history entries.
5819
5820g. Some fixes to `fc' for POSIX conformance.
5821
5822h. Some fixes to job status display for POSIX conformance.
5823
5824i. Fixed a bug that caused `command -v' to display output if a command was not
5825 found -- it should be silent.
5826
5827j. In POSIX mode, `type' and `command -[vV]' do not report non-executable
5828 files, even if the shell will attempt to execute them.
5829
5830k. Fixed a bug that caused the `==' operator to the [[ command to not attempt
5831 extended pattern matching.
5832
5833l. Fixed the brace expansion code to handle characters whose value exceeds 128.
5834
5835m. Fixed `printf' to handle strings with a leading `\0' whose length is
5836 non-zero.
5837
5838n. Fixed a couple of problems with brace expansion where `${' was handled
5839 incorrectly.
5840
5841o. Fixed off-by-one error when calculating the upper bound of `offset' when
5842 processing the ${array[@]:offset:length} expansion.
5843
5844p. System-specific configuration changes for: FreeBSD 5.x, Interix, MacOS X
5845 10.4, Linux 2.4+ kernels, Linux 3.x kernels, Dragonfly BSD, QNX 6.x,
5846 Cygwin
5847
5848q. Fixed a bug that caused the shell to ignore the status of the rightmost
5849 command in a pipeline when the `pipefail' option was enabled.
5850
5851r. Fixed a completion bug that caused core dumps when expanding a directory
5852 name.
5853
5854s. Fixed a bug that prevented `hash -d' from removing commands from the hash
5855 table.
5856
5857t. Fixed word splitting to avoid really bad quadratic performance when
5858 expanding long lists.
5859
5860u. Fixed a bug that caused negative offsets in substring expansion to use the
5861 wrong values.
5862
5863v. Fixed a bug in printf that caused it to not return failure on write errors.
5864
5865w. Fixed a bug that caused commands in subshells to not be properly timed.
5866
5867x. The shell parser no longer attempts to parse a compound assignment specially
5868 unless in a position where an assignment statement is acceptable or parsing
5869 arguments to a builtin that accepts assignment statements.
5870
5871y. Fixed a problem that caused a `case' statement to be added to the history
5872 incorrectly as a single command if the `case word' was on one line and the
5873 `in' on another.
5874
5875z. Fixed a problem that caused internal shell quoting characters to be
5876 incorrectly quoted with backslashes under some circumstances.
5877
5878aa. The shell now performs correct word splitting when IFS contains multibyte
5879 characters.
5880
5881bb. The mail checking code now resets the cached file information if the size
5882 drops to 0, even if the times don't change.
5883
5884cc. A completed command name that is found in $PATH as well as the name of a
5885 directory in the current directory no longer has a slash appended in certain
5886 circumstances: a single instance found in $PATH when `.' is not in $PATH,
5887 and multiple instances found in $PATH, even when `.' is in $PATH.
5888
5889dd. Incorporated tilde expansion into the word expansion code rather than as a
5890 separately-called function, fixing some cases where it was performed
5891 inappropriately (e.g., after the second `=' in an assignment statement or
5892 in a double-quoted parameter expansion).
5893
5894ee. Fixed several bugs encountered when parsing compound assignment statements,
5895 so that compound assignments appearing as arguments to builtins are no
5896 longer double-expanded.
5897
5898ff. Fixed a bug in the command execution code that caused asynchronous commands
5899 containing command substitutions to not put the terminal in the wrong
5900 process group.
5901
5902gg. Bash now handles the case where the WCONTINUED flag causes waitpid() to
5903 return -1/EINVAL at runtime as well as configuration time.
5904
5905hh. Fixed parser to generate an error when the pipeline `argument' to `!' or
5906 `time' is NULL.
5907
5908ii. The shell now takes a little more care when manipulating file descriptors
5909 greater than 9 with the `exec' builtin.
5910
5911jj. Fixed a bug that caused variable assignments preceding the `command' builtin
5912 preceding a special builtin to be preserved after the command completed in
5913 POSIX mode.
5914
5915kk. Fixed a bug that allowed variables beginning with a digit to be created.
5916
5917ll. Fixed a bug that caused a \<newline> to be removed when parsing a $'...'
5918 construct.
5919
5920mm. A shell whose name begins with `-' will now be a restricted shell if the
5921 remainder of the name indicates it should be restricted.
5922
5923nn. Fixed a bug that could cause a core dump if FUNCNAME were changed or unset
5924 during a function's execution.
5925
5926oo. Fixed a bug that caused executing a `return' in a function to not execute
5927 a RETURN trap. The RETURN trap is inherited by shell functions only if
5928 function tracing is globally enabled or has been enabled for that function.
5929
5930pp. Fixed cases where var[@] was not handled exactly like var, when var is a
5931 scalar variable.
5932
5933qq. Fixed a bug that caused the first character after a SIGINT to be discarded
5934 under certain circumstances.
5935
5936rr. Fixed exit status code so that a suspended job returns 128+signal as its
5937 exit status (preventing commands after it in `&&' lists from being
5938 executed).
5939
5940ss. Fixed a bug that caused the shell parser state to be changed by executing
5941 a shell function as a result of word completion.
5942
5943tt. Fixed a long-standing bug that caused '\177' characters in variable
5944 values to be discarded when expanded in double-quoted strings.
5945
5946uu. Fixed a bug that caused $RANDOM to be re-seeded multiple times in a
5947 subshell environment.
5948
5949vv. Extensive changes to the job management code to avoid the pid-reuse and
5950 pid-aliasing problems caused by retaining the exit status of too many jobs,
5951 but still retain as many background job statuses as POSIX requires.
5952
5953ww. Fixed a parser bug in processing \<newline> that caused things like
5954
5955 ((echo 5) \
5956 (echo 6))
5957
5958 to not work correctly.
5959
5960xx. `pwd -P' now sets $PWD to a directory name containing no symbolic links
5961 when in posix mode, as POSIX requires.
5962
5963yy. In posix mode, bash no longer sets $PWD to a name containing no symbolic
5964 links if a directory is chosen from $CDPATH.
5965
5966zz. The word splitting code now treats an IFS character that is not space,
5967 tab, or newline and any adjacent IFS white space as a single delimiter, as
5968 SUSv3/XPG6 require.
5969
5970aaa. The `read' builtin now checks whether or not the number of fields read is
5971 exactly the same as the number of variables instead of just assigning the
5972 rest of the line (minus any trailing IFS white space) to the last
5973 variable. This is what POSIX/SUS/XPG all require.
5974
5975bbb. Fixed a bug that caused `read' to always check whether or not fd 0 was a
5976 pipe, even when reading from another file descriptor.
5977
5978ccc. Fixed a bug that caused short-circuiting of execution even if the return
5979 value was being inverted.
5980
5981ddd. Fixed a bug that caused a core dump while decoding \W escapes in PS1 if
5982 PWD was unset.
5983
5984eee. Fixed a bug in `read' that counted internal quoting characters for the
5985 purposes of `read -n'.
5986
5987fff. Fixed a bug so that a function definition in a pipeline causes a child
5988 process to be forked at the right time.
5989
5990ggg. Bash will not attempt to link against a readline library that doesn't
5991 have rl_gnu_readline_p == 1.
5992
5993hhh. Fixed a bug that caused `read' to consume one too many characters when
5994 reading a fixed number of characters and the Nth character is a backslash.
5995
5996iii. Fixed a bug that caused `unset' on variables in the temporary environment
5997 to leave them set when `unset' completed.
5998
5999jjj. Fixed a bug that caused bash to close fd 2 if an `exec' failed and the
6000 shell didn't exit.
6001
6002kkk. The completion code is more careful to not turn `/' or `///' into `//',
6003 for those systems on which `//' has special meaning.
6004
6005lll. Fixed a bug that caused command substitution in asynchronous commands to
6006 close the wrong file descriptors.
6007
6008mmm. The shell no longer prints status messages about terminated background
6009 processes unless job control is active.
6010
6011nnn. Fixed a bug that prevented multiple consecutive invocations of `history -s'
6012 from adding all the commands to the history list.
6013
6014ooo. Added a couple of changes to make arithmetic expansion more consistent in
6015 all its contexts (still not perfect).
6016
6017ppp. Fixed a bug that caused the parser to occasionally not find the right
6018 terminating "`" in an old-style command substitution.
6019
6020qqq. Fixed a bug that caused core dumps when the shell was reading its non-
6021 interactive input from fd 0 and fd 0 was duplicated and restored using a
6022 combination of `exec' (to save) and redirection (to restore).
6023
6024rrr. Fixed a problem that caused loops in sourced scripts to not be cleaned
6025 up properly when a `return' is executed.
6026
6027sss. Change internal command substitution completion function to append a slash
6028 to directory names in the command.
6029
60302. Changes to Readline
6031
6032a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
6033 incorrectly.
6034
6035b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
6036 line correctly.
6037
6038c. Fixed a problem in computing the number of invisible characters on the first
6039 line of a prompt whose length exceeds the screen width.
6040
6041d. Fixed vi-mode searching so that failure preserves the current line rather
6042 than the last line in the history list.
6043
6044e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
6045 end-of-line when manipulating multibyte characters.
6046
6047f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
6048 end-of-line when manipulating multibyte characters.
6049
6050g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
6051 prompts longer than the screen width containing multibyte characters,
6052
6053h. Fix the calculation of the number of physical characters in the prompt
6054 string when it contains multibyte characters.
6055
6056i. A non-zero value for the `rl_complete_suppress_append' variable now causes
6057 no `/' to be appended to a directory name.
6058
6059j. Fixed forward-word and backward-word to work when words contained
6060 multibyte characters.
6061
6062k. Fixed a bug in finding the delimiter of a `?' substring when performing
6063 history expansion in a locale that supports multibyte characters.
6064
6065l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
6066
6067m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
6068 of the `convert-meta' variable.
6069
6070n. Fixed saving and restoring primary prompt when prompting for incremental
6071 and non-incremental searches; search prompts now display multibyte
6072 characters correctly.
6073
6074o. Fixed a bug that caused keys originally bound to self-insert but shadowed
6075 by a multi-character key sequence to not be inserted.
6076
6077p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
6078 dereferenced if NULL (matching the documentation).
6079
6080q. Extensive changes to readline to add enough state so that commands
6081 requiring additional characters (searches, multi-key sequences, numeric
6082 arguments, commands requiring an additional specifier character like
6083 vi-mode change-char, etc.) work without synchronously waiting for
6084 additional input.
6085
6086r. Lots of changes so readline builds and runs on MinGW.
6087
6088s. Readline no longer tries to modify the terminal settings when running in
6089 callback mode.
6090
6091t. The Readline display code no longer sets the location of the last invisible
6092 character in the prompt if the \[\] sequence is empty.
6093
60943. New Features in Bash
6095
6096a. Bash now understands LC_TIME as a special variable so that time display
6097 tracks the current locale.
6098
6099b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created
6100 as `invisible' variables and may not be unset.
6101
6102c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't
6103 try to interpret any options at all, as POSIX requires.
6104
6105d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.
6106
6107e. Fixed vi-mode word completion and glob expansion to perform tilde
6108 expansion.
6109
6110f. The `**' mathematic exponentiation operator is now right-associative.
6111
6112g. The `ulimit' builtin has new options: -i (max number of pending signals),
6113 -q (max size of POSIX message queues), and -x (max number of file locks).
6114
6115h. A bare `%' once again expands to the current job when used as a job
6116 specifier.
6117
6118i. The `+=' assignment operator (append to the value of a string or array) is
6119 now supported for assignment statements and arguments to builtin commands
6120 that accept assignment statements.
6121
6122j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.
6123
6124k. The `gnu_errfmt' option is enabled automatically if the shell is running
6125 in an emacs terminal window.
6126
6127l. New configuration option: --single-help-strings. Causes long help text
6128 to be written as a single string; intended to ease translation.
6129
6130m. The COMP_WORDBREAKS variable now causes the list of word break characters
6131 to be emptied when the variable is unset.
6132
6133n. An unquoted expansion of $* when $IFS is empty now causes the positional
6134 parameters to be concatenated if the expansion doesn't undergo word
6135 splitting.
6136
6137o. Bash now inherits $_ from the environment if it appears there at startup.
6138
6139p. New shell option: nocasematch. If non-zero, shell pattern matching ignores
6140 case when used by `case' and `[[' commands.
6141
6142q. The `printf' builtin takes a new option: -v var. That causes the output
6143 to be placed into var instead of on stdout.
6144
6145r. By default, the shell no longer reports processes dying from SIGPIPE.
6146
6147s. Bash now sets the extern variable `environ' to the export environment it
6148 creates, so C library functions that call getenv() (and can't use the
6149 shell-provided replacement) get current values of environment variables.
6150
61514. New Features in Readline
6152
6153a. The key sequence sent by the keypad `delete' key is now automatically
6154 bound to delete-char.
6155
6156b. A negative argument to menu-complete now cycles backward through the
6157 completion list.
6158
6159c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
6160 readline will bind the terminal special characters to their readline
6161 equivalents when it's called (on by default).
6162
6163d. New bindable command: vi-rubout. Saves deleted text for possible
6164 reinsertion, as with any vi-mode `text modification' command; `X' is bound
6165 to this in vi command mode.
6166
6167------------------------------------------------------------------------------
b80f6443
JA
6168This document details the changes between this version, bash-3.0-release,
6169and the previous version, bash-3.0-rc1.
6170
61711. Changes to Bash
6172
6173a. Fixed a boundary overrun that could cause segmentation faults when the
6174 completion code hands an incomplete construct to the word expansion
6175 functions.
6176
6177b. Changed posix mode behavior so that an error in a variable assignment
6178 preceding a special builtin causes a non-interactive shell to exit.
6179
6180c. Change the directory expansion portion of the completion code to not
6181 expand embedded command substitutions if the directory name appears in
6182 the file system.
6183
6184d. Fixed a problem that caused `bash -r' to turn on restrictions before
6185 reading the startup files.
6186
6187e. Fixed a problem with the default operation of the `umask' builtin.
6188
61892. Changes to Readline
6190
6191a. Fixed a problem with readline saving the contents of the current line
6192 before beginning a non-interactive search.
6193
6194b. Fixed a problem with EOF detection when using rl_event_hook.
6195
6196c. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
6197 arguments.
6198
6199------------------------------------------------------------------------------
6200This document details the changes between this version, bash-3.0-rc1,
6201and the previous version, bash-3.0-beta1.
6202
62031. Changes to Bash
6204
6205a. Fixed a bug that caused incorrect behavior when referecing element 0 of
6206 an array using $array, element 0 was unset, and `set -u' was enabled.
6207
6208b. System-specific changes for: SCO Unix 3.2, Tandem.
6209
6210c. Fixed a bug that caused inappropriate word splitting when a variable was
6211 expanded within a double-quoted string that also included $@.
6212
6213d. Fixed a bug that caused `pwd' to not display anything in physical mode
6214 when the file system had changed underneath the shell.
6215
6216e. Fixed a bug in the pre- and post- increment and decrement parsing in the
6217 expression evaluator that caused errors when the operands and corresponding
6218 operators were separated by whitespace.
6219
6220f. Fixed a bug that caused `history -p' to add an entry to the history list,
6221 counter to the documentation. (Keeps the history expansions invoked by
6222 emacs-mode command line editing from doing that as well.)
6223
6224g. Fixed a bug that could cause a core dump if `cd' is asked to print out a
6225 pathname longer than PATH_MAX characters.
6226
6227h. Fixed a bug that caused jobs to be put into the wrong process group under
6228 some circumstances after enabling job control with `set -m'.
6229
6230i. `unalias' now returns failure if no alias name arguments are supplied.
6231
6232j. Documented the characters not allowed to appear in an alias name.
6233
6234k. $* is no longer expanded as if in double quotes when it appears in the
6235 body of a here document, as the SUS seems to require.
6236
6237l. The `bashbug' script now uses a directory in $TMPDIR for exclusive
6238 access rather than trying to guess how the underlying OS provides for
6239 secure temporary file creation.
6240
6241m. Fixed a few problems with `cd' and `pwd' when asked to operate on pathnames
6242 longer than PATH_MAX characters.
6243
6244n. Fixed a memory leak caused when creating multiple local array variables
6245 with identical names.
6246
6247o. Fixed a problem with calls to getcwd() so that bash now operates better
6248 when the full pathname to the current directory is longer than PATH_MAX
6249 bytes.
6250
6251p. The `trap' builtin now reports an error if a single non-signal argument
6252 is specified.
6253
6254q. Fixed a bug that caused `umask' to not work correctly when presented
6255 with a mask of all 0s.
6256
6257r. When `getopts' reaches the end of options, OPTARG is unset, as POSIX
6258 appears to specify.
6259
6260s. Interactive mode now depends on whether or not stdin and stderr are
6261 connected to a tty; formerly it was stdin and stdout. POSIX requires
6262 this.
6263
6264t. Fixed vi-mode completion to work more as POSIX specifies (e.g., doing the
6265 right kind of filename generation).
6266
62672. Changes to Readline
6268
6269a. Fixed a problem that could cause readline to refer to freed memory when
6270 moving between history lines while doing searches.
6271
6272b. Improvements to the code that expands and displays prompt strings
6273 containing multibyte characters.
6274
6275c. Fixed a problem with vi-mode not correctly remembering the numeric argument
6276 to the last `c'hange command for later use with `.'.
6277
6278d. Fixed a bug in vi-mode that caused multi-digit count arguments to work
6279 incorrectly.
6280
6281e. Fixed a problem in vi-mode that caused the last text modification command
6282 to not be remembered across different command lines.
6283
6284f. Fixed problems with changing characters and changing case at the end of
6285 the line.
6286
62873. New Features in Bash
6288
6289a. The `jobs', `kill', and `wait' builtins now accept job control notation
6290 even if job control is not enabled.
6291
6292b. The historical behavior of `trap' that allows a missing `action' argument
6293 to cause each specified signal's handling to be reset to its default is
6294 now only supported when `trap' is given a single non-option argument.
6295
62964. New Features in Readline
6297
6298a. When listing completions, directories have a `/' appended if the
6299 `mark-directories' option has been enabled.
6300
6301------------------------------------------------------------------------------
6302This document details the changes between this version, bash-3.0-beta1,
6303and the previous version, bash-3.0-alpha.
6304
63051. Changes to Bash
6306
6307a. Fixes to build correctly when arrays are not compiled into the shell.
6308
6309b. Fixed command substitution to run any exit trap defined in the command
6310 substitution before returning; the exit trap is not inherited from the
6311 calling shell.
6312
6313c. Fixes to process group synchronization code so that every child process
6314 attempts to set the terminal's process group; fixes some synchronization
6315 problems on Linux kernels that schedule the child to always run before
6316 the parent.
6317
6318d. Fixed processing of octal and hex constants in printf builtin for POSIX.2
6319 compliance.
6320
6321e. Fixed a couple of core dumps in the pattern removal code.
6322
6323f. Fixes to the array subrange extraction code to deal better with sparse
6324 arrays.
6325
6326g. Parser errors and other errors that result in the shell exiting now cause
6327 the exit trap to be run.
6328
6329h. Change the command substitution completion functions to not append any
6330 closing quote, because it would be inserted a closing "`" or ")".
6331
6332i. Fix history initialization so assignments to $histchars made in startup
6333 files are honored.
6334
6335j. If an exit trap does not contain a call to `exit', the shell now uses
6336 the exit status of the last command executed before the trap as the exit
6337 status of the shell.
6338
6339k. The parser now prompts with $PS2 if it reads a newline while parsing a
6340 compound array assignment statement.
6341
6342l. When performing a compound array assignment, the parser doesn't treat
6343 words of the form [index]=value as assignments if they're the result of
6344 expansions.
6345
6346m. Fixed a bug that caused `return' executed in a trap command to make the
6347 shell think it was still running the trap.
6348
6349n. Fixed the value of errno set by the pathname canonicalization functions.
6350
6351o. Changed the grammar so that `time' alone on a line times a null command
6352 rather than being a syntax error.
6353
95732b49 6354p. The pattern substitution code no longer performs quote removal on the
b80f6443
JA
6355 pattern before trying to match it, as the pattern removal functions do.
6356
6357q. Fixed a bug that could cause core dumps when checking whether a quoted
6358 command name was being completed.
6359
6360r. Fixes to the pattern removal and pattern replacement expansions to deal
6361 with multibyte characters better (and faster).
6362
6363s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly
6364 multibyte) characters instead of raw bytes.
6365
6366t. Fixed a bug that caused some key bindings set in an inputrc to be ignored
6367 at shell startup.
6368
6369u. Fixed a bug that caused unsetting a local variable within a function to
6370 not work correctly.
6371
6372v. Fixed a bug that caused invalid variables to be created when using
6373 `read -a'.
6374
6375w. Fixed a bug that caused "$@" to expand incorrectly when used as the right
6376 hand side of a parameter expansion such as ${word:="$@"} if the first
6377 character of $IFS was not a space.
6378
6379x. Fixed a slight cosmetic problem when printing commands containing a
6380 `>&word' redirection.
6381
6382y. Fixed a problem that could cause here documents to not be created correctly
6383 if the system temporary directory did not allow writing.
6384
63852. Changes to Readline
6386
6387a. Change to history expansion functions to treat `^' as equivalent to word
8868edaf 6388 one, as the documentation states.
b80f6443
JA
6389
6390b. Some changes to the display code to improve display and redisplay of
6391 multibyte characters.
6392
6393c. Changes to speed up the multibyte character redisplay code.
6394
6395d. Fixed a bug in the vi-mode `E' command that caused it to skip over the
6396 last character of a word if invoked while point was on the word's
6397 next-to-last character.
6398
6399e. Fixed a bug that could cause incorrect filename quoting when
6400 case-insensitive completion was enabled and the word being completed
6401 contained backslashes quoting word break characters.
6402
6403f. Fixed a bug in redisplay triggered when the prompt string contains
6404 invisible characters.
6405
6406g. Fixed some display (and other) bugs encountered in multibyte locales
6407 when a non-ascii character was the last character on a line.
6408
6409h. Fixed some display bugs caused by multibyte characters in prompt strings.
6410
6411i. Fixed a problem with history expansion caused by non-whitespace characters
6412 used as history word delimiters.
6413
64143. New Features in Bash
6415
6416a. printf builtin understands two new escape sequences: \" and \?.
6417
6418b. `echo -e' understands two new escape sequences: \" and \?.
6419
6420c. The GNU `gettext' package and libintl have been integrated; the shell's
6421 messages can be translated into different languages.
6422
6423d. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.
6424
6425e. The error message printed when bash cannot open a shell script supplied
6426 as argument 1 now includes the name of the shell, to better identify
6427 the error as coming from bash.
6428
64294. New Features in Readline
6430
6431a. New application variable, rl_completion_quote_character, set to any
6432 quote character readline finds before it calls the application completion
6433 function.
6434
6435b. New application variable, rl_completion_suppress_quote, settable by an
6436 application completion function. If set to non-zero, readline does not
6437 attempt to append a closing quote to a completed word.
6438
6439c. New application variable, rl_completion_found_quote, set to a non-zero
6440 value if readline determines that the word to be completed is quoted.
6441 Set before readline calls any application completion function.
6442
6443d. New function hook, rl_completion_word_break_hook, called when readline
6444 needs to break a line into words when completion is attempted. Allows
6445 the word break characters to vary based on position in the line.
6446
6447e. New bindable command: unix-filename-rubout. Does the same thing as
6448 unix-word-rubout, but adds `/' to the set of word delimiters.
6449
6450------------------------------------------------------------------------------
6451This document details the changes between this version, bash-3.0-alpha,
6452and the previous version, bash-2.05b-release.
6453
64541. Changes to Bash
6455
6456a. Fixes so that the shell will compile without some of the default options
6457 defined.
6458
6459b. Fixed an error message that did not pass enough arguments to printf.
6460
6461c. Fixed a bug that caused input redirection to a builtin inside a script
6462 being read from standard input to result in the rest of the already-
6463 read and buffered script to be discarded.
6464
6465d. Fixed a bug that caused subshell initialization to close the file
6466 descriptor from which the shell was reading a script under certain
6467 circumstances.
6468
6469e. Fixed a bug that caused the shell to not advance a string pointer over
6470 a null wide character when doing string operations.
6471
6472f. Fixed the internal logout code so that shells that time out waiting for
6473 input (using $TMOUT) run ~/.bash_logout.
6474
6475g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD.
6476
6477h. The parser no longer adds implicit double quotes to ((...)) arithmetic
6478 commands.
6479
6480i. The ((...)) arithmetic command evaluation code was fixed to not dump core
6481 when the expanded string is null.
6482
6483j. The ((...)) arithmetic command evaluation code was fixed to not perform
6484 variable assignments while expanding the expression.
6485
6486k. Fixed a bug that caused word splitting to be performed incorrectly when
6487 IFS is set, but null.
6488
6489l. Fixed a bug in brace expansion that caused a quoted `$' preceding an
6490 open brace to inhibit brace expansion.
6491
6492m. Fixed a bug that caused a leading `-' in the shell's name to cause it to
6493 not be recognized as a restricted shell.
6494
6495n. Fixed a bug in the arithmetic evaluation code that could cause longjmps
6496 to an invalid location and result in a core dump.
6497
6498o. Fixed a bug in the calculation of how many history lines are new in a
6499 single shell session when reading new history lines from a file with
6500 `history -n'.
6501
6502p. Fixed a bug in pathname canonicalization that caused the shell to dump
6503 core when presented with a pathname longer than PATH_MAX.
6504
6505q. Fixed the parser so that it doesn't try to compare a char variable to
6506 EOF, which fails when chars are unsigned.
6507
6508r. Fixed a bug in the simple command execution code that caused occasional
6509 core dumps.
6510
6511s. The shell does a better job of saving any partial parsing state during
6512 operations which cause a command to be executed while a line is being
6513 entered and parsed.
6514
6515t. The completion code now splits words more like the expansion code when
6516 $IFS is used to split.
6517
6518u. The locale code does a better job of recomputing the various locale
6519 variable values when LC_ALL is unset.
6520
6521v. The programmable completion code does a better job of dequoting expanded
6522 word lists before comparing them against the word to be matched.
6523
6524w. The shell no longer seg faults if the expanded value of $PS4 is null
6525 and `set -x' is enabled.
6526
6527x. Fixed a bug that caused core dumps when a here string expanded to NULL.
6528
6529y. The mail checking code now makes sure the mailbox is bigger before
6530 reporting the existence of new mail.
6531
6532z. The parser does not try to expand $'...' and $"..." when the appear
6533 within double quotes unless the `extquote' option has been enabled with
6534 `shopt'. For backwards compatibility, it is enabled by default.
6535
6536aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use
6537 $@ instead of "$@" for the implicit list of arguments.
6538
6539bb. Fixed a bug that caused a subshell of a restricted shell (e.g., one
6540 spawned to execute a pipeline) to not exit immediately if attempting
6541 to use a command containing a slash.
6542
6543cc. Fixed a problem with empty replacements for a pattern that doesn't match
6544 when performing ${param/word/} expansion.
6545
6546dd. Word expansions performed while expanding redirections no longer search
6547 a command's temporary environment to expand variable values.
6548
6549ee. Improvements to the alias expansion code when expanding subsequent words
6550 because an aliase's value ends with a space.
6551
6552ff. `cd -' now prints the current working directory after a successful chdir
6553 even when the shell is not interactive, as the standard requires.
6554
6555gg. The shell does a better job of ensuring a child process dies of SIGINT
6556 before resending SIGINT to itself.
6557
6558hh. The arithmetic expansion variable assignment code now does the right
6559 thing when assigning to `special' variables like OPTIND.
6560
6561ii. When history expansion verification is enabled, the bash readline helper
6562 functions that do history expansion on the current line don't print
6563 the results.
6564
6565jj. Fixed bugs with multiple consecutive alias expansion when one of the
6566 expansions ends with a space.
6567
6568kk. Fixed a problem in the programmable completion code that could cause core
6569 dumps when trying to initialize a set of possible completions from a
6570 list of variables.
6571
6572ll. The \[ and \] escape characters are now ignored when decoding the prompt
6573 string if the shell is started with editing disabled.
6574
6575mm. Fixed a bug that could leave extra characters in a string when doing
6576 quoted null character removal.
6577
6578nn. Command substitution and other subshell operations no longer reset the
6579 line number (aids the bash debugger).
6580
6581oo. Better line number management when executing simple commands, conditional
6582 commands, for commands, and select commands.
6583
6584pp. The globbing code now uses malloc, with its better failure properties,
6585 rather than alloca().
6586
6587qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the
6588 appropriate array element instead of a variable named `a[2]'.
6589
6590rr. Fixed a bug in the handling of a `?(...)' pattern immediately following
6591 a `*' when extglob is enabled.
6592
6593ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is
6594 invoked in a function to misbehave.
6595
6596tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped
6597 by the internal shell string quoting functions.
6598
6599uu. Fixed a bug that caused quoted null characters in an expanded word list
6600 to be inappropriately assigned to an array variable when using `read -a'.
6601
6602vv. Fixed a bug that caused redirections accompanying a null command to persist
6603 in the current shell.
6604
6605ww. Fixed a bug that caused the prompt to be printed when the shell was
6606 expanding a multiline alias.
6607
6608xx. Fixed a bug that resulted in core dumps when the completion for a command
6609 changed the compspec.
6610
6611yy. Fixed a bug that caused evaluation of programmable completions to print
6612 notifications of completed jobs.
6613
6614zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb'
6615 (which is what emacs shell windows do).
6616
6617aaa. In posix mode, `kill -l' causes signal names to be displayed without
6618 a leading `SIG'.
6619
6620bbb. Clear error flag on standard output so it doesn't persist across multiple
6621 builtin commands.
6622
6623ccc. In posix mode, `alias' displays alias values without the leading `alias',
6624 so the output cannot be used as subsequent input.
6625
6626ddd. In posix mode, the `trap' builtin doesn't check whether or not its
6627 first argument is a signal specification and revert the signal handling
6628 to its original disposition if it is.
6629
6630eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the
6631 pattern substitution and removal expansions.
6632
6633fff. Fixed several problems with the handling of ${array[@]}, ${array[*]},
6634 $@, and $* by the indirect variable expansion code.
6635
6636ggg. Fixed a bug that did not allow `time' to be aliased.
6637
6638hhh. Improved the mail checking code so it won't check (and possibly cause an
6639 NFS file system mount) until MAILPATH or MAIL is given a value -- there
6640 is no default if DEFAULT_MAIL_DIRECTORY is not defined at compile time.
6641 (It is computed by configure, but can be #undef'd in config-bot.h.)
6642
6643iii. If the `chkwinsize' option is enabled, the shell checks for window size
6644 changes if a child process exits due to a signal.
6645
6646jjj. Removed the attempts to avoid adding a slash at the end of a completed
6647 executable name if there was a directory with the same name in the
6648 current directory.
6649
6650kkk. Fixed PATH lookup code so it treats the permission bits separately for
6651 owner, group, and other, rather than checking them all.
6652
6653lll. Fixed the locale code to reset the parser's idea of the character class
6654 <blank>, which controls how it splits tokens, when the locale changes.
6655
6656mmm. The shell now binds its special readline functions and key bindings only
6657 if the user's inputrc file has not already bound them.
6658
6659nnn. The shell now reports on processes that dump core due to signals when
6660 invoked as `-c command'.
6661
66622. Changes to Readline
6663
6664a. Fixes to avoid core dumps because of null pointer references in the
6665 multibyte character code.
6666
6667b. Fix to avoid infinite recursion caused by certain key combinations.
6668
6669c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
6670
6671d. Readline no longer tries to read ahead more than one line of input, even
6672 when more is available.
6673
6674e. Fixed the code that adjusts the point to not mishandle null wide
6675 characters.
6676
6677f. Fixed a bug in the history expansion `g' modifier that caused it to skip
6678 every other match.
6679
6680g. Fixed a bug that caused the prompt to overwrite previous output when the
6681 output doesn't contain a newline and the locale supports multibyte
6682 characters. This same change fixes the problem of readline redisplay
6683 slowing down dramatically as the line gets longer in multibyte locales.
6684
6685h. History traversal with arrow keys in vi insertion mode causes the cursor
6686 to be placed at the end of the new line, like in emacs mode.
6687
6688i. The locale initialization code does a better job of using the right
6689 precedence and defaulting when checking the appropriate environment
6690 variables.
6691
6692j. Fixed the history word tokenizer to handle <( and >( better when used as
6693 part of bash.
6694
6695k. The overwrite mode code received several bug fixes to improve undo.
6696
6697l. Many speedups to the multibyte character redisplay code.
6698
6699m. The callback character reading interface should not hang waiting to read
6700 keyboard input.
6701
6702n. Fixed a bug with redoing vi-mode `s' command.
6703
6704o. The code that initializes the terminal tracks changes made to the terminal
6705 special characters with stty(1) (or equivalent), so that these changes
6706 are reflected in the readline bindings. New application-callable function
6707 to make it work: rl_tty_unset_default_bindings().
6708
6709p. Fixed a bug that could cause garbage to be inserted in the buffer when
6710 changing character case in vi mode when using a multibyte locale.
6711
6712q. Fixed a bug in the redisplay code that caused problems on systems
6713 supporting multibyte characters when moving between history lines when the
6714 new line has more glyphs but fewer bytes.
6715
6716r. Undo and redo now work better after exiting vi insertion mode.
6717
6718s. Make sure system calls are restarted after a SIGWINCH is received using
6719 SA_RESTART.
6720
6721t. Improvements to the code that displays possible completions when using
6722 multibyte characters.
6723
6724u. Fixed a problem when parsing nested if statements in inputrc files.
6725
6726v. The completer now takes multibyte characters into account when looking for
6727 quoted substrings on which to perform completion.
6728
6729w. The history search functions now perform better bounds checking on the
6730 history list.
6731
67323. New Features in Bash
6733
6734a. ANSI string expansion now implements the \x{hexdigits} escape.
6735
6736b. There is a new loadable `strftime' builtin.
6737
6738c. New variable, COMP_WORDBREAKS, which controls the readline completer's
6739 idea of word break characters.
6740
6741d. The `type' builtin no longer reports on aliases unless alias expansion
6742 will actually be performed.
6743
6744e. HISTCONTROL is now a colon-separated list of values, which permits
6745 more extensibility and backwards compatibility.
6746
6747f. HISTCONTROL may now include the `erasedups' option, which causes all lines
6748 matching a line being added to be removed from the history list.
6749
6750g. `configure' has a new `--enable-multibyte' argument that permits multibyte
6751 character support to be disabled even on systems that support it.
6752
6753h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
6754 BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
6755 BASH_COMMAND
6756
6757i. FUNCNAME has been changed to support the debugger: it's now an array
6758 variable.
6759
6760j. for, case, select, arithmetic commands now keep line number information
6761 for the debugger.
6762
6763k. There is a new `RETURN' trap executed when a function or sourced script
6764 returns (not inherited child processes; inherited by command substitution
6765 if function tracing is enabled and the debugger is active).
6766
6767l. New invocation option: --debugger. Enables debugging and turns on new
6768 `extdebug' shell option.
6769
6770m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR
6771 traps, respectively, to be inherited by shell functions. Equivalent to
6772 `set -T' and `set -E' respectively. The `functrace' option also controls
6773 whether or not the DEBUG trap is inherited by sourced scripts.
6774
6775n. The DEBUG trap is run before binding the variable and running the action
6776 list in a `for' command, binding the selection variable and running the
6777 query in a `select' command, and before attempting a match in a `case'
6778 command.
6779
6780o. New `--enable-debugger' option to `configure' to compile in the debugger
6781 support code.
6782
6783p. `declare -F' now prints out extra line number and source file information
6784 if the `extdebug' option is set.
6785
6786q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes
6787 the next command to be skipped, and a return value of 2 while in a
6788 function or sourced script forces a `return'.
6789
6790r. New `caller' builtin to provide a call stack for the bash debugger.
6791
6792s. The DEBUG trap is run just before the first command in a function body is
6793 executed, for the debugger.
6794
6795t. `for', `select', and `case' command heads are printed when `set -x' is
6796 enabled.
6797
6798u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1,
6799 x+2,...,y}. x and y can be integers or single characters; the sequence
6800 may ascend or descend; the increment is always 1.
6801
6802v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
6803 of array.
6804
6805w. New `force_fignore' shopt option; if enabled, suffixes specified by
6806 FIGNORE cause words to be ignored when performing word completion even
6807 if they're the only possibilities.
6808
6809x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
6810 style' (filename:lineno:message) format.
6811
6812y. New `-o bashdefault' option to complete and compgen; if set, causes the
6813 whole set of bash completions to be performed if the compspec doesn't
6814 result in a match.
6815
6816z. New `-o plusdirs' option to complete and compgen; if set, causes directory
6817 name completion to be performed and the results added to the rest of the
6818 possible completions.
6819
6820aa. `kill' is available as a builtin even when the shell is built without
6821 job control.
6822
6823bb. New HISTTIMEFORMAT variable; value is a format string to pass to
6824 strftime(3). If set and not null, the `history' builtin prints out
6825 timestamp information according to the specified format when displaying
6826 history entries. If set, bash tells the history library to write out
6827 timestamp information when the history file is written.
6828
6829cc. The [[ ... ]] command has a new binary `=~' operator that performs
6830 extended regular expression (egrep-like) matching.
6831
6832dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
6833 to enable the =~ operator and regexp matching in [[ ... ]].
6834
6835ee. Subexpressions matched by the =~ operator are placed in the new
6836 BASH_REMATCH array variable.
6837
6838ff. New `failglob' option that causes an expansion error when pathname
6839 expansion fails to produce a match.
6840
6841gg. New `set -o pipefail' option that causes a pipeline to return a failure
6842 status if any of the processes in the pipeline fail, not just the last
6843 one.
6844
68454. New Features in Readline
6846
6847a. History expansion has a new `a' modifier equivalent to the `g' modifier
6848 for compatibility with the BSD csh.
6849
6850b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
6851 modifier, which performs a substitution once per word.
6852
6853c. All non-incremental search operations may now undo the operation of
6854 replacing the current line with the history line.
6855
6856d. The text inserted by an `a' command in vi mode can be reinserted with
6857 `.'.
6858
6859e. New bindable variable, `show-all-if-unmodified'. If set, the readline
6860 completer will list possible completions immediately if there is more
6861 than one completion and partial completion cannot be performed.
6862
6863f. There is a new application-callable `free_history_entry()' function.
6864
6865g. History list entries now contain timestamp information; the history file
6866 functions know how to read and write timestamp information associated
6867 with each entry.
6868
6869h. Four new key binding functions have been added:
6870
6871 rl_bind_key_if_unbound()
6872 rl_bind_key_if_unbound_in_map()
6873 rl_bind_keyseq_if_unbound()
6874 rl_bind_keyseq_if_unbound_in_map()
6875
6876------------------------------------------------------------------------------
7117c2d2
JA
6877This document details the changes between this version, bash-2.05b-release,
6878and the previous version, bash-2.05b-beta2.
6879
68801. Changes to Bash
6881
6882a. Fixed an off-by-one error in the function that translates job
6883 specifications.
6884
6885b. Note that we're running under Emacs and disable line editing if
6886 $EMACS == `t'.
6887
6888------------------------------------------------------------------------------
6889This document details the changes between this version, bash-2.05b-beta2,
6890and the previous version, bash-2.05b-beta1.
6891
68921. Changes to Bash
6893
6894a. Fixed the /= and %= arithmetic operators to catch division by zero.
6895
6896b. Added putenv, setenv, unsetenv to getenv replacement for completeness.
6897
6898c. Fixed a bug that could cause the -O expand_aliases invocation option
6899 to not take effect.
6900
6901d. Fixed a problem with process substitution that resulted in incorrect
6902 behavior when the number of process substitutions in an individual
6903 command approached 64.
6904
69052. Changes to Readline
6906
6907a. Fixed a problem with backward-char-search when on a system with support
6908 for multibyte characters when running in a locale without any multibyte
6909 characters.
6910
6911------------------------------------------------------------------------------
6912This document details the changes between this version, bash-2.05b-beta1,
6913and the previous version, bash-2.05b-alpha1.
6914
69151. Changes to Bash
6916
6917a. Fixed a problem when parsing a POSIX.2 character class name while
6918 evaluating a bracket expression containing multibyte characters.
6919
6920b. Changed the help text for `bind' to make it clear that any command
6921 that may be placed in ~/.inputrc is a valid argument to `bind'.
6922
6923c. Added `help' builtin entries for `((', `[[', and arithmetic for.
6924
6925d. malloc updated again:
6926 o slightly better overflow and underflow detection by putting the
6927 chunk size at the beginning and end of the chunk and making
6928 sure they match in free/realloc
6929 o partial page allocated to make things page-aligned no longer
6930 completely wasted
6931 o block coalescing now enabled by default
6932 o splitting and coalescing enabled for 32-byte chunks, the most
6933 common size requested
6934 o fixed a problem that resulted in spurious underflow messages and
6935 aborts
6936 o bin sizes are precomputed and stored in an array rather than
6937 being computed at run time
6938 o malloc will return memory blocks back to the system if the block
6939 being freed is at the top of the heap and of sufficient size to
6940 make it worthwhile
6941 o malloc/free/realloc now inline memset instead of calling the
6942 libc function; uses Duff's device for good performance
6943
6944e. Check for getservent(); make the service name completion code dependent
6945 on its presence.
6946
6947f. Changed the readline callback that executes a command bound to a key
6948 sequence to not save the executed command on the history list and to
6949 save and restore the parsing state.
6950
6951g. Changes to lib/sh/snprintf.c: fixed some bugs in the `g' and `G'
6952 floating point format display; implemented the "'" flag character
6953 that turns on thousands' grouping; fixed behavior on systems where
6954 MB_CUR_MAX does not evaluate to a constant.
6955
6956h. The `unset' builtin no longer returns a failure status when asked to
6957 unset a previously-unset variable or function.
6958
6959i. Changes to the build system to make it easier to cross-compile bash
6960 for different systems.
6961
6962j. Added `,' to the characters that are backslash-escaped during filename
6963 completion, to avoid problems with complete-into-braces and RCS filenames
6964 containing commas.
6965
6966k. Some changes to the multibyte character support code to avoid many calls
6967 to strlen().
6968
6969l. Bash now correctly honors setting LANG to some value when LC_ALL does not
6970 already have a value.
6971
6972m. Fixed a bug that could cause SIGSEGV when processing nested traps with
6973 trap handlers.
6974
6975n. The `source/.' builtin now restores the positional parameters when it
6976 returns unless they were changed using the `set' builtin during the file's
6977 execution.
6978
6979o. Fixed a bug that caused a syntax error when a command was terminated by
6980 EOF.
6981
69822. New Features in Bash
6983
6984a. There is now support for placing the long help text into separate files
6985 installed into ${datadir}/bash. Not enabled by default; can be turned
6986 on with `--enable-separate-helpfiles' option to configure.
6987
6988b. All builtins that take operands accept a `--' pseudo-option, except
6989 `echo'.
6990
6991c. The `echo' builtin now accepts \0xxx (zero to three octal digits following
6992 the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
6993 POSIX.1-2001 compliance.
6994
69953. Changes to Readline
6996
6997a. Fixed a small problem in _rl_insert_char with multibyte characters.
6998
6999b. Fixes from IBM for line wrapping problems when using multibyte characters.
7000
7001c. Fixed a problem which caused the display to be messed up when the last
7002 line of a multi-line prompt (possibly containing invisible characters)
7003 was longer than the screen width.
7004
8868edaf 7005d. Fixed a problem with the vi-mode `r' command that occurred on systems with
7117c2d2
JA
7006 support for multibyte characters when running in a locale without any
7007 multibyte characters.
7008
7009------------------------------------------------------------------------------
7010This document details the changes between this version, bash-2.05b-alpha1,
7011and the previous version, bash-2.05a-release.
7012
70131. Changes to Bash
7014
7015a. Some changes to work around inlining differences between compilers.
7016
7017b. Added more prototypes for internal shell typedefs, to catch argument
7018 passing errors when using pointers to functions.
7019
7020c. The `cd' builtin now fails in posix mode when a valid directory cannot be
7021 constructed from a relative pathname argument and the $PWD using pathname
7022 canonicalization, and the -P option has not been supplied. Previously,
7023 the shell would attempt to use what the user typed, leading to weird
7024 values for $PWD and discrepancies between the value of $PWD and the
7025 actual working directory.
7026
7027d. The `cd' builtin now resets $PWD when canonicalization fails but a chdir
7028 to the pathname passed as an argument succeeds (when not in posix mode).
7029
7030e. The `fc' builtin has been fixed, as POSIX requires, to use the closest
7031 history position in range when given an out-of-range argument.
7032
7033f. The history file loading code was changed to allow lines to be saved in
7034 the history list from the shell startup files.
7035
b80f6443 7036g. `history -s args' now works better in compound commands.
7117c2d2
JA
7037
7038h. The tilde expansion code was fixed to better recognize when it's being
7039 invoked in an assignment context, which enables expansion after `='
7040 and `:'.
7041
7042i. Fixed the command name completion code so a slash is no longer appended
7043 to a single match if there happens to be a directory with that name in
7044 $PWD.
7045
7046j. Fixed compound array assignment to no longer perform alias expansion, to
7047 allow reserved words as array members, and to not produce extra output
7048 when the `-v' option had been enabled.
7049
7050k. Fixed the programmable completion code to better handle newlines in lists
7051 of possible completions (e.g., `complete -W').
7052
7053l. Removed the reserved words from the `bash-builtins' manual page.
7054
7055m. Parser error reporting now attempts to do a better job of identifying the
7056 token in error rather than doing straight textual analysis.
7057
7058n. Fixes for Inf/NaN, locales, wide/multibyte characters and zero-length
7059 arguments in the library snprintf(3) replacement.
7060
7061o. `read -e' no longer does command name completion on the first word on
7062 the line being read.
7063
7064p. `select' now returns failure if the read of the user's selection fails.
7065
7066q. Fixed a bug that could cause a core dump when setting $PIPESTATUS.
7067
7068r. Fixes to not allocate so many job slots when the shell is running a loop
7069 with job control enabled in a subshell of an interactive shell.
7070
7071s. Fixed a bug in the trap code that caused traps to be inherited by
7072 command substitutions in some cases.
7073
7074t. Fixed a bug that could cause alias expansion to inappropriately expand
7075 the word following the alias.
7076
7077u. Fixed a bug in the `kill' builtin that mishandled negative pid arguments.
7078
7079v. The parser is less lenient when parsing assignment statements where the
7080 characters before the `=' don't comprise a valid identifier.
7081
7082w. The arithmetic expression evaluation code now honors the setting of the
7083 `-u' option when expanding variable names.
7084
7085x. Fixed the arithmetic evaluation code to allow array subscripts to be
7086 assigned (`let b[7]=42') and auto-incremented and auto-decremented
7087 (e.g., b[7]++).
7088
7089y. Reimplemented the existing prompt string date and time expansions using
7090 strftime(3), which changed the output of \@ in some locales.
7091
7092z. Fixed a bug that could cause a core dump when a special shell variable
7093 (like RANDOM) was converted to an array with a variable assignment.
7094
7095aa. Fixed a bug that would reset the handler for a signal the user had
7096 trapped to a function that would exit the shell when setting the exit
7097 trap in a non-interactive shell.
7098
7099bb. Changed the execve(2) wrapper code to check whether or not a failing
7100 command is a directory before looking at whether a `#!' interpreter
7101 failed for some reason.
7102
7103cc. Fixed a bug in the command printing code so it no longer inserts a `;'
7104 after a newline, which produces a syntax error when reused as input.
7105
7106dd. The code that expands $PS4 no longer inherits the `-x' flag.
7107
7108ee. The bash-specific completion functions may now take advantage of the
7109 double-TAB and M-? features of the standard readline completion
7110 functions.
7111
7112ff. The mail checking code no longer prints a message if the checked file's
7113 size has not increased, even if the access time is less than the modification time.
7114
7115gg. Rewrote the variable symbol table code: there is now a stack of
7116 contexts, each possibly including a separate symbol table; there can
7117 be more than one temporary environment supplied to nested invocations
7118 of `./source'; the temporary environments no longer require so much
7119 special-case code; shell functions now handle the temporary environment
7120 and local variables more consistently; function scope exit is faster now
7121 that the entire symbol table does not have to be traversed to dispose of
7122 local variables; it is now easier to push vars from the temporary
7123 environment to the shell's variable table in posix mode; some duplicated
7124 code has been removed.
7125
7126hh. Regularized the error message printing code; builtin_error is now called
7127 more consistently, and common error message strings are handled by small
7128 functions. This should make eventual message translation easier.
7129
7130ii. Error messages now include the line number in a script when the shell
7131 is not interactive.
7132
7133jj. Array subscript expansion now takes place even when the array variable is
7134 unset, so side effects will take place.
7135
7136kk. Fixed a bug in the SICGHLD child-reaping code so that it won't find
7137 jobs already marked as terminated if the OS reuses pids quickly enough.
7138
7139ll. Fixed a bug that could cause a signal to not interrupt the `wait'
7140 builtin while it was waiting for a background process to terminate.
7141
7142mm. A couple of changes to make it easier for multiple shells to share history
7143 files using `history -n', `history -r', and `history -w'.
7144
7145nn. The `getopts' builtin always increments OPTIND to point to the next
7146 option to be handled when an option is returned, whether it's valid
7147 or not, as POSIX 1003.x-2001 requires.
7148
7149oo. Changed some parts of the expansion code to avoid allocating and
7150 immediately freeing memory without using the results for anything.
7151
7152pp. The shell now keeps track of $IFS internally, updating its internal map
7153 each time the variable is assigned a new value (or at local scope exit).
7154 This saves thousands of hash lookups for IFS, which, while individually
7155 cheap, add up.
7156
7157qq. Rewrote the hash table code: searching and insertion are much faster now,
7158 and it uses a better string hashing function; augmented the function
7159 interface to simplify other parts of the code and remove duplicated code
7160
7161rr. The shell now uses a simple, generic `object cache' for allocating and
7162 caching words and word lists, which were the major users of
7163 malloc/free.
7164
7165ss. Fixed the assignment statement parsing code to allow whitespace and
7166 newlines in subscripts when performing array element assignment.
7167
7168tt. The shell now issues many fewer calls to sigprocmask and other signal
7169 masking system calls.
7170
7171uu. Fixed the `test' and conditional command file comparison operators to
7172 work right when one file has a non-positive timestamp and the other
7173 does not exist.
7174
7175vv. Fixed some cases where the special characters '\001' and '\177' in the
7176 values of variables or positional parameters caused incorrect expansion
7177 results.
7178
71792. Changes to Readline
7180
7181a. Fixed output of comment-begin character when listing variable values.
7182
7183b. Added some default key bindings for common escape sequences produced by
7184 HOME and END keys.
7185
7186c. Fixed the mark handling code to be more emacs-compatible.
7187
7188d. A bug was fixed in the code that prints possible completions to keep it
7189 from printing empty strings in certain circumstances.
7190
7191e. Change the key sequence printing code to print ESC as M\- if ESC is a
7192 meta-prefix character -- it's easier for users to understand than \e.
7193
7194f. Fixed unstifle_history() to return values that match the documentation.
7195
7196g. Fixed the event loop (rl_event_hook) to handle the case where the input
7197 file descriptor is invalidated.
7198
7199h. Fixed the prompt display code to work better when the application has a
7200 custom redisplay function.
7201
7202i. Changes to make reading and writing the history file a little faster, and
7203 to cope with huge history files without calling abort(3) from xmalloc.
7204
7205j. The vi-mode `S' and `s' commands are now undone correctly.
7206
72073. New Features in Bash
7208
7209a. If set, TMOUT is the default timeout for the `read' builtin.
7210
7211b. `type' has two new options: `-f' suppresses shell function lookup, and
7212 `-P' forces a $PATH search.
7213
7214c. New code to handle multibyte characters.
7215
7216d. `select' was changed to be more ksh-compatible, in that the menu is
7217 reprinted each time through the loop only if REPLY is set to NULL.
7218 The previous behavior is available as a compile-time option.
7219
7220e. `complete -d' and `complete -o dirnames' now force a slash to be
7221 appended to names which are symlinks to directories.
7222
7223f. There is now a bindable edit-and-execute-command readline command,
7224 like the vi-mode `v' command, bound to C-xC-e in emacs mode.
7225
7226g. Added support for ksh93-like [:word:] character class in pattern matching.
7227
7228h. The $'...' quoting construct now expands \cX to Control-X.
7229
7230i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
7231 the result into the expanded prompt.
7232
7233j. The shell now performs arithmetic in the largest integer size the
7234 machine supports (intmax_t), instead of long.
7235
7236k. If a numeric argument is supplied to one of the bash globbing completion
7237 functions, a `*' is appended to the word before expansion is attempted.
7238
7239l. The bash globbing completion functions now allow completions to be listed
7240 with double tabs or if `show-all-if-ambiguous' is set.
7241
7242m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
7243 readline's appending a space to the completed word.
7244
7245n. New `here-string' redirection operator: <<< word.
7246
7247o. When displaying variables, function attributes and definitions are shown
7248 separately, allowing them to be re-used as input (attempting to re-use
7249 the old output would result in syntax errors).
7250
7251p. There is a new configuration option `--enable-mem-scramble', controls
7252 bash malloc behavior of writing garbage characters into memory at
7253 allocation and free time.
7254
7255q. The `complete' and `compgen' builtins now have a new `-s/-A service'
7256 option to complete on names from /etc/services.
7257
7258r. `read' has a new `-u fd' option to read from a specified file descriptor.
7259
7260s. Fix the completion code so that expansion errors in a directory name
7261 don't cause a longjmp back to the command loop.
7262
7263t. Fixed word completion inside command substitution to work a little more
7264 intuitively.
7265
7266u. The `printf' %q format specifier now uses $'...' quoting to print the
7267 argument if it contains non-printing characters.
7268
7269v. The `declare' and `typeset' builtins have a new `-t' option. When applied
7270 to functions, it causes the DEBUG trap to be inherited by the named
7271 function. Currently has no effect on variables.
7272
7273w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
7274 [[...]] conditional commands, and for ((...)) loops.
7275
7276x. The expansion of $LINENO inside a shell function is only relative to the
7277 function start if the shell is interactive -- if the shell is running a
7278 script, $LINENO expands to the line number in the script. This is as
7279 POSIX-2001 requires.
7280
7281y. The bash debugger in examples/bashdb has been modified to work with the
7282 new DEBUG trap semantics, the command set has been made more gdb-like,
7283 and the changes to $LINENO make debugging functions work better. Code
7284 from Gary Vaughan.
7285
7286z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
7287 and close).
7288
7289aa. There is a new `-l' invocation option, equivalent to `--login'.
7290
7291bb. The `hash' builtin has a new `-l' option to list contents in a reusable
7292 format, and a `-d' option to remove a name from the hash table.
7293
72944. New Features in Readline
7295
7296a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
7297 be bound to readline functions. Now the arrow keys may be used in vi
7298 insert mode.
7299
7300b. When listing completions, and the number of lines displayed is more than
7301 the screen length, readline uses an internal pager to display the results.
7302 This is controlled by the `page-completions' variable (default on).
7303
7304c. New code to handle editing and displaying multibyte characters.
7305
7306d. The behavior introduced in bash-2.05a of deciding whether or not to
7307 append a slash to a completed name that is a symlink to a directory has
7308 been made optional, controlled by the `mark-symlinked-directories'
7309 variable (default is the 2.05a behavior).
7310
7311e. The `insert-comment' command now acts as a toggle if given a numeric
7312 argument: if the first characters on the line don't specify a
7313 comment, insert one; if they do, delete the comment text
7314
7315f. New application-settable completion variable:
7316 rl_completion_mark_symlink_dirs, allows an application's completion
7317 function to temporarily override the user's preference for appending
7318 slashes to names which are symlinks to directories.
7319
7320g. New function available to application completion functions:
7321 rl_completion_mode, to tell how the completion function was invoked
7322 and decide which argument to supply to rl_complete_internal (to list
7323 completions, etc.).
7324
7325h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
7326 bindable command, which could be bound to `Insert'.
7327
7328i. New application-settable completion variable:
7329 rl_completion_suppress_append, inhibits appending of
7330 rl_completion_append_character to completed words.
7331
7332j. New key bindings when reading an incremental search string: ^W yanks
7333 the currently-matched word out of the current line into the search
7334 string; ^Y yanks the rest of the current line into the search string,
7335 DEL or ^H deletes characters from the search string.
7336
7337------------------------------------------------------------------------------
f73dda09
JA
7338This document details the changes between this version, bash-2.05a-release,
7339and the previous version, bash-2.05a-rc1.
7340
73411. Changes to Bash
7342
7343a. Fixed the `printf' builtin so that the variable name supplied as an
7344 argument to a %n conversion must be a valid shell identifier.
7345
7346b. Improved the random number generator slightly.
7347
7348c. Changes to configuration to not put -I/usr/include into $CFLAGS, since
7349 it messes up some includes.
7350
7351d. Corrected description of POSIXLY_CORRECT in man page and info manual.
7352
7353e. Fixed a couple of cases of incorrect function prototypes that sneaked
7354 through and caused compilation problems.
7355
7356f. A few changes to avoid potential core dumps in the programmable completion
7357 code.
7358
7359g. Fixed a configure problem that could cause a non-existent file to show
7360 up in LIBOBJS.
7361
7362h. Fixed a configure problem that could cause siglist.o to not be built when
7363 required.
7364
7365i. Changes to the strtoimax and strtoumax replacement functions to work
7366 around buggy compilers.
7367
7368j. Fixed a problem with the snprintf replacement function that could
7369 potentially cause a core dump.
7370
73712. Changes to Readline
7372
7373a. Fixed a locale-specific problem in the vi-mode `goto mark' command.
7374
7375b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
7376 include file problems.
7377
7378------------------------------------------------------------------------------
7379This document details the changes between this version, bash-2.05a-rc1,
7380and the previous version, bash-2.05a-beta1.
7381
73821. Changes to Bash
7383
7384a. Fixed the snprintf replacement to correctly implement the `alternate form'
7385 of the %g and %G conversions.
7386
7387b. Fixed snprintf to correctly handle the optional precision with the %g and
7388 %G conversions.
7389
7390c. Fixed the arithmetic evaluation code to correct the values of `@' and `_'
7391 when translating base-64 constants (they were backwards).
7392
7393d. New library functions for formatting long and long long ints.
7394
7395e. Fixed a few places where negative array subscripts could have occurred,
7396 mostly as the result of systems using signed characters.
7397
7398f. Fixed a few places that assumed a pid_t was no wider than an int.
7399
7400g. Fixed the `maildir' mail checking code to work on systems where a
7401 `struct stat' doesn't include an `st_blocks' member.
7402
7403h. Fixed snprintf to make `unsigned long long' conversion formats (%llu)
7404 work better.
7405
7406i. Fixed snprintf to not print a sign when asked to do an unsigned conversion.
7407
7408j. Made configure changes to avoid compiling empty source files in lib/sh.
7409
7410k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax,
7411 strtoumax.
7412
7413l. The `printf' builtin now handles the `ll' and `j' length modifiers
7414 directly, since they can affect the type and width of the argument
7415 passed to printf(3).
7416
7417m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to
8868edaf 7418 have more systematic naming, with accompanying changes to configure.in.
f73dda09
JA
7419
7420n. Fixed snprintf to handle long doubles and the %a/%A conversions by
7421 falling back to sprintf, as long as sprintf supports them.
7422
7423o. Fixed return value from vsnprintf/snprintf to be the number of characters
7424 that would have been printed, even if that number exceeds the buffer
7425 size passed as an argument.
7426
7427p. Bash no longer attempts to define its own versions of some ctype macros
7428 if they are implemented as functions in libc but not as macros in
7429 <ctype.h>.
7430
7431q. Changed the variable printing code (used by `set', `export', etc.) to
7432 not use the $'...' syntax when in posix mode, since that caused
7433 interoperability problems with other shells (most notably with autoconf).
7434 When not in posix mode, it uses $'...' if the string to be printed
7435 contains non-printing characters and regular single quotes otherwise.
7436
7437r. snprintf now recognizes the %F conversion.
7438
7439s. Fixed a bug that could cause the wrong status to be returned by a shell
7440 function when the shell is compiled without job control and a null
7441 command containing a command substutition was executed in the function.
7442
7443t. When in posix mode, the default value for MAILCHECK is 600.
7444
7445u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables
7446 if they're not in the initial environment.
7447
7448v. If SECONDS appears in the initial environment with a valid integer value,
7449 bash uses that as the starting value, as if an assignment had been
7450 performed.
7451
7452w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it
7453 gives them default values if they don't appear in the initial environment.
7454
7455x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE,
7456 even if it assigns them default values.
7457
7458y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT
7459 if they appear in the initial environment.
7460
7461z. Bash no longer attempts to discover if it's being run by sshd in order to
7462 run the startup files. If the SSH_SOURCE_BASHRC is uncommented in
7463 config-top.h it will attempt to do so as previously, but that's commented
7464 out in the distributed version.
7465
7466aa. Fixed a typo in the code that tests for LC_NUMERIC.
7467
7468bb. The POSIXLY_CORRECT shell variable and its effects are now documented.
7469
7470cc. Some changes to several of the support shell scripts included in the
7471 definitions to try to avoid race conditions and attacks.
7472
7473dd. Several changes to avoid warnings from `gcc -Wall'.
7474
7475ee. Fixed a problem with the `unset' builtin that could cause incorrect
7476 results if asked to unset a variable and an array subscript in the
7477 same command.
7478
7479ff. A few changes to the shell's temporary file creation code to avoid
7480 potential file descriptor leaks and to prefer the system's idea of
7481 the temporary directory to use.
7482
7483gg. Fixes to build with the C alloca in lib/malloc/alloca.c if the system
7484 requires it but the shell has been configured --without-bash-malloc.
7485
7486hh. Updated the documentation to note that only interactive shells resend
7487 SIGHUP to all jobs before exiting.
7488
7489ii. Fixes to only pass unquoted tilde words to tilde_expand, rather than
7490 rely on tilde_expand or getpwnam(3) to handle the quotes (MacOS 10.x
7491 will remove backslashes in any login name passed to getpwnam(3)).
7492
7493jj. Small change from Paul Eggert to make LINENO right in commands run with
7494 `bash -c'.
7495
74962. New Features in Bash
7497
7498a. The `printf' builtin now handles the %a and %A conversions if they're
7499 implemented by printf(3).
7500
7501b. The `printf' builtin now handles the %F conversion (just about like %f).
7502
7503c. The `printf' builtin now handles the %n conversion like printf(3). The
7504 corresponding argument is the name of a shell variable to which the
7505 value is assigned.
7506
75073. Changes to Readline
7508
7509a. Fixed a few places where negative array subscripts could have occurred.
7510
7511b. Fixed the vi-mode code to use a better method to determine the bounds of
7512 the array used to hold the marks.
7513
7514c. Fixed the defines in chardefs.h to work better when chars are signed.
7515
7516d. Fixed configure.in to use the new names for bash autoconf macros.
7517
7518e. Readline no longer attempts to define its own versions of some ctype
7519 macros if they are implemented as functions in libc but not as macros in
7520 <ctype.h>.
7521
7522f. Fixed a problem where rl_backward could possibly set point to before
7523 the beginning of the line.
7524
7525------------------------------------------------------------------------------
7526This document details the changes between this version, bash-2.05a-beta1,
7527and the previous version, bash-2.05a-alpha1.
7528
75291. Changes to Bash
7530
8868edaf 7531a. Fixed a bug in the evaluation of arithmetic `for' statements when the
f73dda09
JA
7532 expanded expression is NULL.
7533
7534b. Fixed an unassigned variable problem in the redirection printing code.
7535
7536c. Added more prototypes to extern function declarations in the header
7537 files and to static function declarations in C source files.
7538
7539d. Make sure called functions have a prototype in scope, to get the arguments
7540 and return values right instead of casting. Removed extern function
7541 declarations from C source files that were already included in header
7542 files.
7543
7544e. Changed some function arguments to use function typedefs in general.h so
7545 the prototypes can be checked. The only use of Function and VFunction
7546 now is for unwind-protects.
7547
7548f. More const changes to function arguments and appropriate variables.
7549
7550g. Changed the mail checking support to handle `maildir'-style mail
7551 directories.
7552
7553h. Augmented the bash malloc to pass in the file and line number information
7554 for each malloc, realloc, and free. This should result in better error
7555 messages.
7556
7557i. The `old' gnu malloc is no longer a configuration option.
7558
7559j. Augmented the bash malloc with optional tracing and registering allocated
7560 and freed memory.
7561
7562k. Prompt string decoding now saves and restores the value of $? when it
7563 expands the prompt string, so command substitutions don't change $?.
7564
7565i. Array indices are now `long', since shell arithmetic is performed as long,
7566 and the internal arrayind_t type is used consistently.
7567
7568j. Some more `unsigned char *' fixes from Paul Eggert.
7569
7570k. Fixed a bad call to builtin_error that could cause core dumps when making
7571 local variables.
7572
7573l. `return' may no longer be used to terminate a `select' command, for
7574 compatibility with ksh.
7575
7576m. Changed code that reads octal numbers to do a better job of detecting
7577 overflows.
7578
7579n. The time formatting code no longer uses absolute indices into a buffer,
7580 because the buffer size changes depending on the size of a `time_t'.
7581
7582o. `umask' now prints four digits when printing in octal mode, for
7583 compatibility with other shells.
7584
7585p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L'
7586 formats and long doubles better, and internal functions have been
8868edaf 7587 simplified where appropriate.
f73dda09
JA
7588
7589q. Some `time_t' fixes for machines were a time_t is bigger than a long.
7590
7591r. Replaced some bash-specific autoconf macros with standard equivalents.
7592
7593s. Improvmed the code that constructs temporary filenames to make the
7594 generated names a bit more random.
7595
7596t. Added code that checks for ascii before calling any of the is* ctype
7597 functions.
7598
7599u. Changed some places where a `char' was used as an array subscript to use
7600 `unsigned char', since a `char' can be negative if it's signed by default.
7601
7602v. Lots of changes to the `ulimit' builtin from Paul Eggert to add support
7603 for the new POSIX-200x RLIM_SAVED_CUR and RLIM_SAVED_MAX values and
7604 simplify the code.
7605
7606w. `ulimit' now prints the description of a resource in any error message
7607 relating to fetching or setting that resource's limits.
7608
7609x. The `snprintf' replacement now computes maximum values at compile
7610 time rather than using huge constants for things like long long.
7611
7612y. Interactive shells now ignore `set -n'.
7613
7614z. Changed the malloc bookkeeping information so that it's now 8 bytes
7615 instead of 12 on most 32-bit machines (saving 4 bytes per allocation),
7616 restoring 8-byte alignment.
7617
7618aa. The malloc error reporting code now attempts to print the file and line
7619 number of the call that caused the error.
7620
7621bb. Changed the redirection error reporting code to catch EBADF errors and
7622 report the file descriptor number rather than the file being redirected
7623 to or from (e.g., things like `exec 4242<x' where 4242 is an out-of-range
7624 file descriptor).
7625
7626cc. `printf', `echo -e', and the $'...' code now process only two hex digits
7627 after a `\x' escape sequence for compatibility with other shells, and
7628 the documentation was changed to note that the octal and hex escape
7629 sequences result in an eight-bit value rather than strict ASCII.
7630
76312. Changes to Readline
7632
7633a. The completion code now attempts to do a better job of preserving the
7634 case of the word the user typed if ignoring case in completions.
7635
7636b. Readline defaults to not echoing the input and lets the terminal
7637 initialization code enable echoing if there is a controlling terminal.
7638
7639c. The key binding code now processes only two hex digits after a `\x'
7640 escape sequence, and the documentation was changed to note that the
7641 octal and hex escape sequences result in an eight-bit value rather
7642 than strict ASCII.
7643
76443. New Features in Bash
7645
7646a. The builtin `ulimit' now takes two new non-numeric arguments: `hard',
7647 meaning the current hard limit, and `soft', meaning the current soft
7648 limit, in addition to `unlimited'
7649
7650b. `ulimit' now prints the option letter associated with a particular
7651 resource when printing more than one limit.
7652
7653c. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
7654 one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
7655
76564. New Features in Readline
7657
7658a. New bindable variable `history-preserve-point'. If set, the history
7659 code attempts to place the user at the same location on each history
8868edaf 7660 line retrieved with previous-history or next-history.
f73dda09
JA
7661
7662------------------------------------------------------------------------------
7663This document details the changes between this version, bash-2.05a-alpha1,
7664and the previous version, bash-2.05-release.
7665
76661. Changes to Bash
7667
7668a. Better checks in the redirection code for write errors.
7669
7670b. bashbug now uses $TMPDIR, defaulting to /tmp, and uses mktemp(1) more
7671 portably.
7672
7673c. System-specific configuration changes for: Interix, OpenBSD, FreeBSD,
7674 MacOS X.
7675
7676d. Some more `const' cleanups through the code.
7677
7678e. Fixed a typo in the /dev/fd redirection code, better checks for valid
7679 numeric fds in /dev/fd.
7680
7681f. Fixed many parts of the shell to handle integer overflow more gracefully
7682 and to do more stringent checks for valid numbers.
7683
7684g. Fixed mksignames to include config.h.
7685
7686h. Fixed an uninitialized variable problem that could cause the shell to core
7687 dump when replacing characters in a string.
7688
7689i. New mechanism for updating the patch level when official patches are
7690 released (patchlevel.h).
7691
7692j. configure.in changed to no longer require external files _distribution and
7693 _patchlevel.
7694
7695k. Fixed non-interactive shell initialization problem when bash started as
7696 `bash -i filename'.
7697
7698l. Fixed printf builtin conversion error handling to be POSIX.2-conformant.
7699
7700m. autoconf-2.52 is now used to build configure; autoconf-2.50 or newer is
7701 required. Some of the bash-specific macros were removed, since they are
7702 now standard.
7703
7704n. Startup files and files read with source or `.' are no longer required to
7705 be regular files.
7706
7707o. Fixed core dump in builtin printf when user-supplied precision or field
7708 width is 0.
7709
7710p. Fixed builtin printf to treat a negative field width as a positive field
7711 width with left-justification.
7712
7713r. New unwind-protect implementation from Paul Eggert.
7714
7715s. Fixed an inadvertently-unclosed comment in the bash completion code that
7716 caused programmable completions to not add trailing slashes or spaces to
7717 completions.
7718
7719t. Fixed the process substitution code to cope better when stdin is closed.
7720
7721v. Fixes, mostly from Paul Eggert, for a few possible buffer overflows in
7722 the shell.
7723
7724w. Fixes from Paul Eggert to avoid most of the type casts in the shell code,
7725 and use more appropriate types for a number of variables.
7726
8868edaf 7727x. Command substitution no longer inherits the DEBUG trap.
f73dda09 7728
8868edaf 7729y. Some fixes to the process substitution code on machines without /dev/fd so
f73dda09
JA
7730 that named pipes are not removed inappropriately.
7731
7732z. The loadable `getconf' builtin is now much more complete, and will become
7733 part of the shell in the future.
7734
7735aa. The select command no longer terminates on a `return', so it can be used
7736 to return from an enclosing function (as ksh does it).
7737
7738bb. Fixed the extended pattern matching code to behave better when presented
7739 with incorrectly-formed patterns.
7740
7741cc. Some changes were made with the intent of making cross-compilation easier.
7742
7743dd. The network code (/dev/tcp and /dev/udp redirections) uses getaddrinfo(3)
7744 if it's available, which adds support for IPv6.
7745
7746ee. Subshells of login shells no longer source ~/.bash_logout when they exit.
7747
7748ff. Fixes so that subshells don't exit inappropriately if the -e option has
7749 been set.
7750
7751gg. Restricted shells no longer allow functions to be exported.
7752
7753hh. Changes to the pattern matching code so extended pattern matching works
7754 on systems with deficient shared library implementations, like MacOS X.
7755
7756ii. Better error messages when a script with a leading `#!interp' fails
7757 to execute because of problems with `interp'.
7758
7759jj. Fixed `compgen' to handle the `-o default' option better.
7760
7761kk. Fixed the job control code to force an asynchronous process's standard
7762 input to /dev/null only if job control is not active.
7763
7764ll. Fixed a possible infinite recursion problem when `fc ""=abc' (a null
7765 pattern) is used to re-execute a previous command.
7766
7767mm. Fixed `declare [-a] var=value' to assign VALUE to element 0 if VAR is an
7768 array variable. Similarly for `declare [-a] var[N]=value'. This is like
7769 ksh93.
7770
7771nn. Fixed a bug that caused `read -a aname' to work even if ANAME had been
7772 declared readonly.
7773
7774oo. Fixed a possible integer overflow problem when constructing names for
7775 temporary files.
7776
77772. New Features in Bash
7778
7779a. Added support for DESTDIR installation root prefix, so you can do a
7780 `make install DESTDIR=bash-root' and do easier binary packaging.
7781
7782b. Added support for builtin printf "'" flag character as per latest POSIX
7783 drafts.
7784
7785c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
7786 ISO C99).
7787
7788d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
7789 (bash doesn't use very much of what it returns).
7790
7791e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
7792 but ignored.
7793
7794f. New read-only `shopt' option: login_shell. Set to non-zero value if the
7795 shell is a login shell.
7796
7797g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
7798
7799h. New `-A group/-g' option to complete and compgen; does group name
7800 completion.
7801
7802i. New `-t' option to `hash' to list hash values for each filename argument.
7803
7804j. New [-+]O invocation option to set and unset `shopt' options at startup.
7805
7806k. configure's `--with-installed-readline' option now takes an optional
7807 `=PATH' suffix to set the root of the tree where readline is installed
7808 to PATH.
7809
7810l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run
7811 whenever the shell would have exited if the -e option were enabled.
7812 It is not inherited by shell functions.
7813
7814m. `readonly', `export', and `declare' now print variables which have been
7815 given attributes but not set by assigning a value as just a command and
7816 a variable name (like `export foo') when listing, as the latest POSIX
7817 drafts require.
7818
7819n. `bashbug' now requires that the subject be changed from the default.
7820
7821o. configure has a new `--enable-largefile' option, like other GNU utilities.
7822
7823p. `for' loops now allow empty word lists after `in', like the latest POSIX
7824 drafts require.
7825
78263. Changes to Readline
7827
7828a. More `const' and type casting fixes.
7829
7830b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
7831 overflow problems.
7832
7833c. The completion code no longer appends a `/' or ` ' to a match when
7834 completing a symbolic link that resolves to a directory name, unless
7835 the match does not add anything to the word being completed. This
7836 means that a tab will complete the word up to the full name, but not
7837 add anything, and a subsequent tab will add a slash.
7838
7839d. Fixed a trivial typo that made the vi-mode `dT' command not work.
7840
7841e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
7842
7843f. Fixed the tty code so that ^V works more than once.
7844
7845g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
7846 because the use of __P in typedefs conflicted g++ and glibc.
7847
78484. New Features in Readline
7849
7850a. Added extern declaration for rl_get_termcap to readline.h, making it a
7851 public function (it was always there, just not in readline.h).
7852
7853b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
7854 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
7855
7856c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
7857
7858d. New bindable boolean readline variable: match-hidden-files. Controls
7859 completion of files beginning with a `.' (on Unix). Enabled by default.
7860
7861e. The history expansion code now allows any character to terminate a
7862 `:first-' modifier, like csh.
7863
7864f. The incremental search code remembers the last search string and uses
7865 it if ^R^R is typed without a search string.
7866
7867------------------------------------------------------------------------------
28ef6c31
JA
7868This document details the changes between this version, bash-2.05-release,
7869and the previous version, bash-2.05-beta2.
7870
78711. Changes to Bash
7872
7873a. Make sure we note that the first line of a multi-line command was not
7874 saved in the history if the tests for HISTCONTROL succeed, but the
7875 HISTIGNORE check fails.
7876
7877b. Fixed a bug in the pattern matching code that caused `[' to be treated
7878 as a special character inside a `[...]' bracket expression.
7879
7880c. Fixed a bug in the pattern matching code that caused `]' to terminate
7881 a bracket expression even if it was the first character after the `['
7882 (or a leading `!' or `^').
7883
7884d. Made a small change to report a more user-friendly error message if
7885 execve(2) fails because of an error with the interpreter in a script
7886 with a leading `#! interpreter'.
7887
7888e. If the OS does not support an exec(2) magic number of `#!', make sure we
7889 have a non-null interpreter name before attempting to execute it.
7890
7891f. Fixed a bug that caused the shell process to end up in a different
7892 process group than the controlling terminal if a job-control shell was
7893 run with `exec' in the startup files.
7894
7895g. When started in POSIX mode, either by `bash --posix', `bash -o posix', or
7896 `sh', $SHELLOPTS includes `posix' and POSIXLY_CORRECT is set.
7897
7898h. Fixed a problem that caused the `\W' prompt string escape sequence to
7899 expand to nothing when $PWD was `//'.
7900
7901i. The `bashbug' shell script no longer uses $(...) command substitution.
7902
7903j. When `set' is invoked without options in POSIX mode, it no longer prints
7904 the names and definitions of shell functions.
7905
79062. Changes to Readline
7907
7908a. rl_set_paren_blink_timeout() is now documented.
7909
7910b. Corrected history.3 man page: `$' is not in the default value of
7911 history_word_delimiters.
7912
7913c. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
7914 value, rl_read_key() now immediately returns '\n' (which is assumed to
7915 be bound to accept-line).
7916
79173. New Features in Bash
7918
7919a. The `>&word' redirection now works in POSIX mode as it does by default,
7920 since POSIX.2 leaves it unspecified.
7921
7922------------------------------------------------------------------------------
7923This document details the changes between this version, bash-2.05-beta2,
7924and the previous version, bash-2.05-beta1.
7925
79261. Changes to Bash
7927
7928a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported.
7929
7930b. Fixed startup so posixly_correct is retained across subshells begun to
7931 execute scripts without a leading `#!'.
7932
7933c. Fixed a bug that caused $(< file) to not work in a (...) subshell.
7934
7935d. Added config support for Linux running on the IBM S390.
7936
7937e. Fixed a bug that caused bash to get its input pointer out of sync when
7938 reading commands through a pipe and running a command with standard
7939 input redirected from a file.
7940
7941f. Made a change so that command completion now makes about half as many
7942 stat(2) calls when searching the $PATH.
7943
7944g. Fixed a bug that caused variable assignments preceding `return' to not
7945 be propagated to the shell environment in POSIX mode.
7946
7947h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed
7948 on `word'.
7949
7950i. In POSIX mode, `break' and `continue' do not complain and return success
7951 if called when the shell is not executing a loop.
7952
7953j. Fixed `bash -o posix' to work the same as `bash --posix'.
7954
7955k. Fixed a bug where variable assignments preceding `eval' or `source/.'
7956 would not show up in the environment exported to subshells run by the
7957 commands.
7958
7959l. In POSIX mode, shells started to execute command substitutions inherit
7960 the value of the `-e' option from their parent shell.
7961
7962m. In POSIX mode, aliases are expanded even in non-interactive shells.
7963
7964n. Changed some of the job control messages to display the text required by
7965 POSIX.2 when the shell is in POSIX mode.
7966
7967o. Fixed a bug in `test' that caused it to occasionally return incorrect
7968 results when non-numeric arguments were supplied to `-t'.
7969
79702. Changes to Readline
7971
7972a. Some changes were made to avoid gcc warnings with -Wall.
7973
7974b. rl_get_keymap_by_name now finds keymaps case-insensitively, so
7975 `set keymap EMACS' works.
7976
7977c. The history file writing and truncation functions now return a useful
7978 status on error.
7979
7980d. Fixed a bug that could cause applications to dereference a NULL pointer
7981 if a NULL second argument was passed to history_expand().
7982
79833. New Features in Bash
7984
7985a. doc/readline.3 has been moved to the readline distribution.
7986
79874. New Features in Readline
7988
7989a. New function, rl_get_screen_size (int *rows, int *columns), returns
7990 readline's idea of the screen dimensions.
7991
7992b. The timeout in rl_gather_tyi (readline keyboard input polling function)
7993 is now settable via a function (rl_set_keyboard_input_timeout()).
7994
7995c. Renamed the max_input_history variable to history_max_entries; the old
7996 variable is maintained for backwards compatibility.
7997
7998d. The list of characters that separate words for the history tokenizer is
7999 now settable with a variable: history_word_delimiters. The default
8000 value is as before.
8001
8002------------------------------------------------------------------------------
8003This document details the changes between this version, bash-2.05-beta1,
8004and the previous version, bash-2.05-alpha1.
8005
80061. Changes to Bash
8007
8008a. Changes to allow shared library and object building on the GNU Hurd.
8009
8010b. Fixes to the way exported functions are placed into the environment and
8011 cached.
8012
8013c. The globbing library once again respects locales when processing ranges
8014 in bracket expressions while doing pattern matching.
8015
8016d. System-specific configuration changes for: Tru 64, Interix
8017
8018e. Bashbug now uses /usr/bin/editor as one of the editing alternatives, and
8019 will use mktemp(1) or tempfile(1), if present, for temporary file creation.
8020
8021f. Bash no longer performs a binary file check on a script argument that's
8022 really a tty (like /dev/fd/0 or /dev/stdin).
8023
8024g. Fixed a bug in the execution of shell scripts that caused the effects of
8025 $BASH_ENV to be undone in some cases.
8026
8027h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly.
8028
8029i. Several changes to the job control code to avoid some signal state
8030 manipulation.
8031
8032j. The Bash malloc no longer blocks signals as often, which should make it
8033 faster.
8034
8035k. Fixed a parsing bug that did not allow backslash to escape a single quote
8036 inside a $'...' construct.
8037
8038l. Fixed a bug that caused things like ${var:=$'value'} to be parsed
8039 incorrectly. This showed up in newer versions of autoconf.
8040
8041m. Fixed a bug in the bash-specific readline initialization that caused
8042 key bindings to bash-specific function names appearing in .inputrc to
8043 not be honored.
8044
8045n. Bash now sets the file descriptor it uses to save the file descriptor
8046 opened on a shell script to close on exec.
8047
8048o. Fixed a bug in the prompt string decoding that caused it to misbehave
8049 when presented an octal sequence of fewer than three characters.
8050
8051p. Fixed the `test' builtin to return an error if `[' is supplied a single
8052 argument that is not `]'.
8053
8054q. Fixed a bug that caused subshells started to run executable shell scripts
8055 without a leading `#!' to incorrectly inherit an argument list preceding
8056 a shell builtin (like such a script called from a script sourced with `.',
8057 where there were variable assignments preceding the `.' command)
8058
8059r. Fixed a bug that caused changes to variables supplied in an assignment
8060 statement preceding a shell builtin to not be honored (like a script
8061 run with `.').
8062
8063s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values
8064 when the shell is started.
8065
8066t. Fixed a bug that caused SIGINT to kill shell scripts after the script
8067 called `wait'.
8068
8069u. The `fc' builtin now tries to create its temporary files in the directory
8070 named by $TMPDIR.
8071
8072v. Bash no longer calls any Readline functions or uses any Readline variables
8073 not declared in readline.h.
8074
8075w. Fixed a bug that caused some substitutions involving $@ to not be split
8076 correctly, especially expansions of the form ${paramterOPword}.
8077
8078x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it
8079 appears in the initial environment.
8080
8081y. Fixed a couple of problems with shell scripts without a leading `#!'
8082 being executed out of shell functions that could cause core dumps if
8083 such a script attempted to execute `return'.
8084
8085z. Fixed a problem with the `-nt' and `-ot' binary operators for the
8086 `test/[' builtin and the `[[' conditional command that caused wrong
8087 return values if one of the file arguments did not exist.
8088
8089aa. Fixed a bug that caused non-interactive shells which had previously
8090 executed `shopt -s expand_aliases' to fail to expand aliases in a
8091 command like `(command) &'.
8092
80932. Changes to Readline
8094
8095a. Changes to make most (but not yet all -- there is still crlf()) of the
8096 exported readline functions declared in readline.h have an rl_ prefix.
8097
8098b. More `const' changes in function arguments, mostly for completion
8099 functions.
8100
8101c. Fixed a bug in rl_forward that could cause the point to be set to before
8102 the beginning of the line in vi mode.
8103
8104d. Fixed a bug in the callback read-char interface to make it work when a
8105 readline function pushes some input onto the input stream with
8106 rl_execute_next (like the incremental search functions).
8107
8108e. Fixed a file descriptor leak in the history file manipulation code that
8109 was tripped when attempting to truncate a non-regular file (like
8110 /dev/null).
8111
8112f. Some existing variables are now documented and part of the public
8113 interface (declared in readline.h): rl_explict_arg, rl_numeric_arg,
8114 rl_editing_mode, rl_last_func.
8115
8116g. Renamed rltty_set_default_bindings to rl_tty_set_default_bindings and
8117 crlf to rl_crlf, so there are no public functions declared in readline.h
8118 without an `rl_' prefix. The old functions still exist for backwards
8119 compatibility.
8120
81213. New Features in Bash
8122
8123a. A new loadable builtin, realpath, which canonicalizes and expands symlinks
8124 in pathname arguments.
8125
8868edaf 8126b. When `set' is called without options, it prints function definitions in a
28ef6c31
JA
8127 way that allows them to be reused as input. This affects `declare' and
8128 `declare -p' as well.
8129
81304. New Features in Readline
8131
8132a. New application-callable function rl_set_prompt(const char *prompt):
8133 expands its prompt string argument and sets rl_prompt to the result.
8134
8135b. New application-callable function rl_set_screen_size(int rows, int cols):
8136 public method for applications to set readline's idea of the screen
8137 dimensions.
8138
8139c. The history example program (examples/histexamp.c) is now built as one
8140 of the examples.
8141
8142------------------------------------------------------------------------------
8143This document details the changes between this version, bash-2.05-alpha1,
8144and the previous version, bash-2.04-release.
8145
81461. Changes to Bash
8147
8148a. A fix was made to allow newlines in compond array assignments.
8149
8150b. configure now checks for real-time signals with unusable values.
8151
8152c. Interactive shells no longer exit if a substitution fails because of an
8153 unset variable within a sourced file.
8154
8155d. Fixed a problem with incorrect matching of extended glob patterns when
8156 doing pattern substitution.
8157
8158e. `{' is now quoted by the completion code when it appears in a filename.
8159
8160f. Fixed an error in pattern matching that caused the matcher to not
8161 correctly skip the rest of a bracket expression after a character
8162 matched.
8163
8164g. Fixed a bug in the IFS word splitting code to make a non-whitespace IFS
8165 character preceded by IFS whitespace part of the current delimiter rather
8166 than generating a separate field.
8167
8168h. The {!prefix@} expansion now generates separate words, analogous to $@,
8169 when double-quoted.
8170
8171i. Command substitution now ignores NUL bytes in the command output, and the
8172 parser ignores them on input.
8173
8174j. A fix was made to the job control code to prevent hanging processes when
8175 the shell thinks background processes are running but the kernel returns
8176 -1/ECHILD from waitpid().
8177
8178k. `pwd' now prints an error message if the write fails when displaying the
8179 current directory.
8180
8181l. When in POSIX mode, the shell prints trap dispostions without a leading
8182 `SIG' in the signal specification.
8183
8184m. Fixed a parser bug that caused the current command's line count to be
8185 messed up by a compound array assignment.
8186
8187n. Fixed a bug in the unwind-protect code that caused bad behavior on machines
8188 where ints and pointers are not the same size.
8189
8190o. System-specific configure changes for: MacOS X.
8191
8192p. Changes for Cygwin to translate \r\n and \r to \n and to set file
8193 descriptors used for reading input to text mode in various places.
8194
8195q. Fixed a bug that caused `!' to occasionally not be honored when in
8196 a (...) subshell.
8197
8198r. Bash no longer assumes that getcwd() will return any useful error message
8199 in the buffer passed as an argument if the call fails.
8200
8201s. The `source', `.', and `fc' builtins no longer check whether a file is
8202 binary before reading commands from it.
8203
8204t. Subshells no longer turn off job control when they exit, since that
8205 sometimes resulted in the terminal being reset to the wrong process
8206 group.
8207
8208u. The history code no longer tries to save the second and subsequent lines
8209 of a multi-line command if the first line was not saved.
8210
8211v. The history saving code now does a better job of saving blank lines in a
8212 multi-line command.
8213
8214w. Removed a `feature' that made `ulimit' silently translate `unlimited' to
8215 the current hard limit, which obscured some kernel error returns.
8216
8217x. Fixed the grammar so that `}' is recognized as a reserved word after
8218 another reserved word, rather than requiring a `;' or newline. This
8219 means that constructs like
8220
8221 { { echo a b c ; } }
8222
8223 work as expected.
8224
8225y. Conditional commands ([[...]]) now perform tilde expansion on their
8226 arguments.
8227
8228z. Noted in the documentation that `set -a' will cause functions to be
8229 exported if they are defined after `set -a' is executed.
8230
8231aa. When an interactive login shell starts, if $PWD and $HOME refer to the
8232 same directory but are not the same string, $PWD is set to $HOME.
8233
8234bb. Fixed `printf' to handle invalid floating point numbers better.
8235
8236cc. Temporary files are now created with random filenames, to improve security.
8237
8238dd. The readline initialization code now binds the custom bash functions and
8239 key bindings after the readline defaults are set up.
8240
8241ee. Fixed the `source' builtin to no longer overwrite a shell function's
8242 argument list, even if the sourced file changes the positional parameters.
8243
8244ff. A bug fix was made in the expansion of `$*' in contexts where it should
8245 not be split, like assignment statements.
8246
8247gg. Fixed a bug in the parameter substring expansion to handle conditional
8248 arithmetic expressions ( exp ? val1 : val2 ) without cutting the expression
8249 off at the wrong `:'.
8250
8251hh. The `<>' redirection is no longer subject to the current setting of
8252 `noclobber', as POSIX.2 specifies.
8253
8254ii. Fixed a bug in the conditional command parsing code that caused expressions
8255 in parentheses to occasionally be parsed incorrectly.
8256
8257jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or
8258 {...} to follow the )) without an intervening list terminator.
8259
8260kk. `printf' now treats `\E' the same as `\e' when performing backslash escape
8261 expansion for the `%b' format specifier.
8262
8263ll. When in POSIX mode, the shell no longer searches the current directory for
8264 a file to be sourced with `.' or `source' if `.' is not in $PATH.
8265
8266mm. Interactive comments are no longer turned off when POSIX mode is disabled.
8267
8268nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's
8269 environment when it starts up.
8270
8271oo. Fixed a bug in the `command' builtin so the effect of a command like
8272 `command exec 4<file' is as if the `command' had been omitted.
8273
8274pp. ${foo[@]} and ${foo[*]} now work as in ksh93 if `foo' is not an array
8275 variable.
8276
8277qq. ${#foo[X]}, where X is 0, @, or *, now work as in ksh93 if `foo' is not
8278 an array variable.
8279
8280rr. The shell's idea of an absolute pathname now takes into account a
8281 possible drive specification on Cygwin and other Windows systems.
8282
8283ss. Fixed a bug which caused incorrect parsing of some multi-character
8284 constructs if they were split across input lines with backslash-newline
8285 line continuation.
8286
8287tt. Fixed a bug that caused restricted shell mode to be set inappropriately
8288 when trying to execute a shell script without a leading `#!'.
8289
8290uu. Shell function definitions no longer require that the body be a group
8291 command ( {...} ), as POSIX.2 requires.
8292
8293vv. The `cd' and `pwd' builtins now process symlinks in pathnames internally
8294 and should require many fewer calls to getcwd().
8295
8296ww. Fixed a bug that caused a pipeline's process group to be set incorrectly
8297 if one of the pipeline elements contained a command substitution.
8298
8299xx. Fixed a bug that caused core dumps when expanding the value of HISTIGNORE.
8300
8301yy. The output of `set' is now quoted using $'...' so invisible characters are
8302 displayed as escape sequences.
8303
8304zz. Fixed the help text for `unset', since PATH and IFS may both be unset.
8305
8306aaa. The shell no longer puts directory names into the command hash table.
8307
8308bbb. Fixed a bug in `read' that caused it to occasionally free memory twice if
8309 it was interrupted after reading a large amount of data.
8310
8311ccc. Assignment statements that attempt to assign values to readonly variables
8312 now cause the command to return an error status.
8313
8314ddd. Fixed a bug that could cause incorrect output if a $(<file) construct was
8315 interrupted.
8316
8317eee. GROUPS and FUNCNAME now return an error status when assignment is
8318 attempted, but may be unset (in which case they lose their special
8319 properties). In all respects except unsetting, they are readonly.
8320
8321fff. The string-to-integer conversion code now ignores trailing whitespace in
8322 the string, even if strtol(3) does not.
8323
8324ggg. The tcsh magic-space function now does a better job of inserting the
8325 space close to where the point was before the history expansion, rather
8326 than just appending it.
8327
8328hhh. Fixed a bug which caused a file sourced from an interactive shell to
8329 fill up the jobs table if it ran lots of jobs.
8330
8331iii. Fixed a bug in the parameter pattern substitution code to avoid infinite
8332 recursion on zero-length matches.
8333
83342. Changes to Readline
8335
8336a. When setting the terminal attributes on systems using `struct termio',
8337 readline waits for output to drain before changing the attributes.
8338
8339b. A fix was made to the history word tokenization code to avoid attempts to
8340 dereference a null pointer.
8341
8342c. Readline now defaults rl_terminal_name to $TERM if the calling application
8343 has left it unset, and tries to initialize with the resultant value.
8344
8345d. Instead of calling (*rl_getc_function)() directly to get input in certain
8346 places, readline now calls rl_read_key() consistently.
8347
8348e. Fixed a bug in the completion code that allowed a backslash to quote a
8349 single quote inside a single-quoted string.
8350
8351f. rl_prompt is no longer assigned directly from the argument to readline(),
8352 but uses memory allocated by readline. This allows constant strings to
8353 be passed to readline without problems arising when the prompt processing
8354 code wants to modify the string.
8355
8356g. Fixed a bug that caused non-interactive history searches to return the
8357 wrong line when performing multiple searches backward for the same string.
8358
8359h. Many variables, function arguments, and function return values are now
8360 declared `const' where appropriate, to improve behavior when linking with
8361 C++ code.
8362
8363i. The control character detection code now works better on systems where
8364 `char' is unsigned by default.
8365
8366j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
8367
8368k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been
8369 replaced with a set of specific prototyped typedefs, though they are
8370 still in the readline header files for backwards compatibility.
8371
8372m. Nearly all of the (undocumented) internal global variables in the library
8373 now have an _rl_ prefix -- there were a number that did not, like
8374 screenheight, screenwidth, alphabetic, etc.
8375
8376n. The ding() convenience function has been renamed to rl_ding(), though the
8377 old function is still defined for backwards compatibility.
8378
8379o. The completion convenience functions filename_completion_function,
8380 username_completion_function, and completion_matches now have an rl_
8381 prefix, though the old names are still defined for backwards compatibility.
8382
8383p. The functions shared by readline and bash (linkage is satisfied from bash
8384 when compiling with bash, and internally otherwise) now have an sh_ prefix.
8385
8386q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so
8387 that the `soname' contains only the major version number rather than the
8388 major and minor numbers.
8389
8390r. Fixed a redisplay bug that occurred when the prompt spanned more than one
8391 physical line and contained invisible characters.
8392
83933. New Features in Bash
8394
8395a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
8396 per the new GNU coding standards.
8397
8398b. The /dev/tcp and /dev/udp redirections now accept service names as well as
8399 port numbers.
8400
8401c. `complete' and `compgen' now take a `-o value' option, which controls some
8402 of the aspects of that compspec. Valid values are:
8403
8404 default - perform bash default completion if programmable
8405 completion produces no matches
8406 dirnames - perform directory name completion if programmable
8407 completion produces no matches
8408 filenames - tell readline that the compspec produces filenames,
8409 so it can do things like append slashes to
8410 directory names and suppress trailing spaces
8411
84124. New Features in Readline
8413
8414a. The blink timeout for paren matching is now settable by applications.
8415
8416b. _rl_executing_macro has been renamed to rl_executing_macro, which means
8417 it's now part of the public interface.
8418
8419c. Readline has a new variable, rl_readline_state, which is a bitmap that
8420 encapsulates the current state of the library; intended for use by
8421 callbacks and hook functions.
8422
8423------------------------------------------------------------------------------
bb70624e
JA
8424This document details the changes between this version, bash-2.04-release,
8425and the previous version, bash-2.04-beta5.
8426
84271. Changes to Bash
8428
8429a. Better compile-time and configure-time checks for the necessity of
8430 inet_aton().
8431
8432b. A bug was fixed in the expansion of "${@:-}" when there are positional
8433 parameters.
8434
8435c. A typo was fixed in the output of `complete'.
8436
8437d. The matches generated for a word by the `-W' argument to complete and
8438 compgen are now matched against the word being completed, and only
8439 matches are returned as the result.
8440
8441e. Some fixes were made for systems which do not restart read(2) when a
8442 signal caught by bash is received.
8443
8444f. A bug was fixed which caused the umask to be set to 0 when an invalid
8445 symbolic mode mask was parsed.
8446
8447g. Fixed a bug that could cause a core dump if a SIGCHLD was received while
8448 performing an assignment statement using command substitution.
8449
8450h. Changed the word splitting function for programmable completion so cases
8451 in which the cursor is between words are handled a bit better.
8452
84532. Changes to Readline
8454
8455a. rl_funmap_names() is now documented.
8456
84573. New Features in Bash
8458
8459a. The LC_NUMERIC variable is now treated specially, and used to set the
8460 LC_NUMERIC locale category for number formatting, e.g., when `printf'
8461 displays floating-point numbers.
8462
8463------------------------------------------------------------------------------
8464This document details the changes between this version, bash-2.04-beta5,
8465and the previous version, bash-2.04-beta4.
8466
84671. Changes to Bash
8468
8469a. A couple of changes were made to the Makefiles for easier building on
8470 non-Unix systems.
8471
8472b. Fixed a bug where the current prompt would be set to $PS2 at startup.
8473
8474c. The shell script that tests an already-installed version was changed to
8475 remove the directory it created its test programs in at exit.
8476
8477d. Several changes were made to the code that tokenizes an input line for
8478 the programmable completion code. Shell metacharacters will now appear
8479 as individual words in the word list passed to the completion functions.
8480 Some of the example completion shell functions were changed to understand
8481 redirection operators.
8482
8483e. A bug was fixed that, under obscure circumstances, could confuse the
8484 parser when a shell function was run by the programmable completion code.
8485
8486f. A bug was fixed in the ulimit builtin for systems not using getrlimit().
8487
8488g. The execution code now propagates the correct exit status back to the rest
8489 of the code if the return value of a subshell command was being inverted.
8490 Some new test cases for inverting return values with the `!' reserved
8491 word have been added.
8492
8493h. Negative exponents in the arithmetic evaluation of v**e now return an
8494 evaluation error.
8495
8496i. A bug that caused bash to check the wrong process in a pipeline for
8497 abnormal termination (and consequently resetting the terminal attributes)
8498 was fixed.
8499
8500j. Fixed a bug that caused $PS2 to be displayed after PROMPT_COMMAND was
8501 executed.
8502
85032. Changes to Readline
8504
85051. Fixed a bug in a C preprocessor define that caused the keypad control
8506 functions to be compiled out for all platforms except DJGPP.
8507
8508------------------------------------------------------------------------------
8509This document details the changes between this version, bash-2.04-beta4,
8510and the previous version, bash-2.04-beta3.
8511
85121. Changes to Bash
8513
8514a. A couple of changes were made to the redirection to attempt to avoid
8515 race conditions and malicious file replacement.
8516
85172. A change was made to the string evaluation code (used for command
8518 substitution, `eval', and the `.' builtin) to fix an obscure core
8519 dump on alpha machines.
8520
85213. A bug that caused $LINENO to be wrong when executing arithmetic for
8522 commands was fixed.
8523
85244. A couple of memory leaks in the programmable completion code were fixed.
8525
85265. A bug that could cause a core dump by freeing memory twice during a call
8527 to `eval' if `set -u' had been enabled and an undefined variable was
8528 referenced was fixed.
8529
8530------------------------------------------------------------------------------
8531This document details the changes between this version, bash-2.04-beta3,
8532and the previous version, bash-2.04-beta2.
8533
85341. Changes to Bash
8535
8536a. Bash should run the appropriate startup files when invoked by ssh2.
8537
8538b. Fixed a bug in the parsing of conditional commands that could cause a
8539 core dump.
8540
8541c. Fixed a bug in parsing job specifications that occasionally caused
8542 core dumps when an out-of-range job was referenced.
8543
8544d. Fixed the `type' and `command' builtins to do better reporting of
8545 commands that are not found in $PATH or the hash table.
8546
8547e. Fixed a POSIX.2 compliance problem in the command builtin -- commands
8548 are supposed to be reported as full pathnames.
8549
8550f. The `echo' builtin now returns failure if a write error occurs.
8551
8552g. Fixed a bug which caused the locale to not be reset correctly when
8553 LC_ALL was unset.
8554
8555h. Changed description of `getopts' in man page and reference manual to make
8556 it clear that option characters may be characters other than letters.
8557
8558i. If the shell exits while in a function, make sure that any trap on EXIT
8559 doesn't think the function is still executing.
8560
8561j. Bashbug now tries harder to find a usable editor if $EDITOR is not set,
8562 rather than simply defaulting to `emacs'.
8563
8564k. Changes to the scripts that guess and canonicalize the system type, from
8565 the latest `automake' distribution via Debian.
8566
8567l. When using named pipes for process substitution, make sure the file
8568 descriptors opened for reading are set to non-blocking mode.
8569
8570m. Fixed a bug that caused termination of pipelines that are killed by a
8571 signal to not be reported in some cases.
8572
8573n. When not in literal-history mode, shell comment lines are not added to
8574 the history list.
8575
8576o. When running in POSIX.2 mode, bash no longer performs word splitting on
8577 the expanded value of the word supplied as the filename argument to
8578 redirection operators.
8579
8580p. The prompt string decoding code now backslash-quotes only characters that
8581 are special within double quotes when expanding the \w and \W escape
8582 sequences.
8583
8584q. Fixed a bug in the prompt decoding code that could cause a non-interactive
8585 shell to seg fault if `\u' was used in PS4 and the shell was in xtrace
8586 mode.
8587
8588r. Fixed a bug that caused function definitions to be printed with any
8589 redirections that should be attached to the entire function before the
8590 closing brace.
8591
8592s. Changed the tilde expansion code for Cygwin systems to avoid creating
8593 pathnames beginning with `//' if $HOME == `/'.
8594
8595t. Fixed a couple of autoconf tests to avoid creating files with fixed names
8596 in /tmp.
8597
8598u. The `trap' and `kill' builtins now know the names of the POSIX.1b real-
8599 time signals on systems which support them.
8600
86012. Changes to Readline
8602
8603a. Fixed a problem with the single-quote quoting function that could cause
8604 buffer overflows.
8605
8606b. Fixed a bug that caused incorrect `stat characters' to be printed if
8607 the files being completed were in the root directory and visible-stats
8608 was enabled.
8609
86103. New Features in Bash
8611
8612a. There is a new `rbash.1' manual page, from the Debian release.
8613
8614b. The `--enable-usg-echo-default' option to `configure' has been renamed to
8615 `--enable-xpg-echo-default'. The old option is still there for backwards
8616 compatibility.
8617
8618------------------------------------------------------------------------------
8619This document details the changes between this version, bash-2.04-beta2,
8620and the previous version, bash-2.04-beta1.
8621
86221. Changes to Bash
8623
8624a. Fixed a bug that could cause pipes to be closed inappropriately in
8625 some obscure cases.
8626
8627b. Fixed a bug that caused creation of the exported environment to clobber
8628 the current command string if there were any exported shell functions.
8629
8630c. Some changes were made to reduce bash's memory usage.
8631
8632d. Fixed a problem with programmable completion and filenames to be
8633 completed containing quote characters.
8634
8635e. Changed the code the removes named pipes created for the <(...) and >(...)
8636 expansions to defer removal until after any current shell function has
8637 finished executing.
8638
8639f. Fixed a bug in `select' which caused it to not handle the `continue'
8640 builtin correctly.
8641
8642g. Autoconf tests added for cygwin32 and mingw32.
8643
86442. New Features in Bash
8645
8646a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc'
8647 (which is still there for backwards compatibility).
8648
8649------------------------------------------------------------------------------
8650This document details the changes between this version, bash-2.04-beta1,
8651and the previous version, bash-2.04-alpha1.
8652
86531. Changes to Bash
8654
8655a. Fixed a bug in the programmable completion code that occurred when
8656 trying to complete command lines containing a `;' or `@'.
8657
8658b. The file descriptor from which the shell is reading a script is now
8659 moved to a file descriptor above the user-addressible range.
8660
8661c. Changes to `printf' so that it can handle integers beginning with 0
8662 or 0x as octal and hex, respectively.
8663
8664d. Fixes to the programmable completion code so it handles nonsense like
8665 `compgen -C xyz' gracefully.
8666
8667e. The shell no longer modifies the signal handler for SIGPROF, allowing
8668 profiling again on certain systems.
8669
8670f. The shell checks for a new window size, if the user has requested it,
8671 after a process exits due to a signal.
8672
8673g. Fixed a bug with variables with null values in a program's temporary
8674 environment and the bash getenv() replacement.
8675
8676h. `declare' and the other builtins that take variable assignments as
8677 arguments now honor `set -a' and mark modified variables for export.
8678
8679i. Some changes were made for --dump-po-strings mode when writing strings
8680 with embedded newlines.
8681
8682j. The code that caches export strings from the initial environment now
8683 duplicates the string rather than just pointing into the environment.
8684
8685k. The filename completion quoting code now uses single quotes by default
8686 if the filename being completed contains newlines, since \<newline>
8687 has a special meaning to the parser.
8688
8689l. Bash now uses typedefs bits32_t and u_bits32_t instead of int32_t and
8690 u_int32_t, respectively to avoid conflicts on certain Unix versions.
8691
8692m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x.
8693
8694n. Fixed a problem with hostname-to-ip-address translation in the
8695 /dev/(tcp|udp)/hostname/port redirection code.
8696
8697o. The texinfo manual has been reorganized slightly.
8698
8699p. Filename generation (globbing) range comparisons in bracket expressions
8700 no longer use strcoll(3) even if it is available, since it has unwanted
8701 effects in certain locales.
8702
8703q. Fixed a cosmetic problem in the source that caused the shell to not
8704 compile if DPAREN_ARITHMETIC was not defined but ARITH_FOR_COMMAND was.
8705
8706r. Fixed a bug in the here-document code tripped when the file descriptor
8707 opened to the file containing the text of the here document was the
8708 same as a redirector specified by the user.
8709
8710s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline'
8711 in `time ! pipeline'.
8712
8713t. Fixed a bug with the `wait' builtin which manifested itself when an
8714 interrupt was received while the shell was waiting for asynchronous
8715 processes in a shell script.
8716
8717u. Fixed the DEBUG trap code so that it has the correct value of $?.
8718
8719v. Fixed a bug in the parameter pattern substitution code that could cause
8720 the shell to attempt to free unallocated memory if the pattern started
8721 with `/' and an expansion error occurs.
8722
8723w. Fixed a bug in the positional parameter substring code that could
8724 cause the shell to loop freeing freed memory.
8725
8726x. Fixed a bug in the positional parameter pattern substitution code so
8727 that it correctly handles null replacement strings with a pattern
8728 string prefixed with `%' or `#'.
8729
8730y. The shell no longer attempts to import functions from the environment if
8731 started with `-n'.
8732
8733z. Fixed a bug that caused `return' in a command substitution executed in
8734 a shell function to return from the function in a subshell and continue
8735 execution.
8736
8737aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell
8738 is restricted.
8739
8740bb. The wait* job control functions now behave better if called when there
8741 are no unwaited-for children.
8742
8743cc. Command substitution no longer unconditionally disables job control in
8744 the subshell started to run the command.
8745
8746dd. A bug was fixed that occasionally caused traps to mess up the parser
8747 state.
8748
8749ee. `bashbug' now honors user headers in the mail message it sends.
8750
8751ff. A bug was fixed that caused the `:p' history modifier to not print the
8752 history expansion if the `histverify' option was set.
8753
87542. Changes to Readline
8755
8756a. Fixed a bug in the redisplay code for lines with more than 256 line
8757 breaks.
8758
8759b. A bug was fixed which caused invisible character markers to not be
8760 stripped from the prompt string if the terminal was in no-echo mode.
8761
8762c. Readline no longer tries to get the variables it needs for redisplay
8763 from the termcap entry if the calling application has specified its
8764 own redisplay function. Readline treats the terminal as `dumb' in
8765 this case.
8766
8767d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
8768 sequences is redrawn correctly.
8769
87703. New Features in Bash
8771
8772a. `bashbug' now accepts `--help' and `--version' options.
8773
8774b. There is a new `xpg_echo' option to `shopt' that controls the behavior
8775 of echo with respect to backslash-escaped characters at runtime.
8776
8777------------------------------------------------------------------------------
8778This document details the changes between this version, bash-2.04-alpha1,
8779and the previous version, bash-2.04-devel.
8780
87811. Changes to Bash
8782
8783a. Fixed a bug that could cause core dumps when performing substring
8784 expansion.
8785
8786b. Shared object configuration changes for: Solaris, OSF/1
8787
8788c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities
8789 for pathname expansion now understands GLOBIGNORE.
8790
8791d. The code that implements `eval' was changed to save the value of the
8792 current prompt, so an eval in a shell function called by the programmable
8793 completion code will not change the prompt to $PS2.
8794
8795e. Restored the undocumented NON_INTERACTIVE_LOGIN_SHELLS #define to
8796 config-top.h. If this is defined, all login shells will read the
8797 startup files, not just interactive and non-interactive started with
8798 the `--login' option.
8799
8800f. Fixed a bug that caused the expansion code to occasionally dump core if
8801 IFS contained characters > 128.
8802
8803g. Fixed a problem with the grammar so that a newline is not required
8804 after the `))' in the new-style arithmetic for statement; a semicolon
8805 may be used as expected.
8806
8807h. Variable indirection may now reference the shell's special variables.
8808
8809i. The $'...' and $"..." constructs are now added to the history correctly
8810 if they contain newlines and command-oriented history is enabled.
8811
8812j. It is now an error to try to assign a value to a function-local copy
8813 of a readonly shell variable (declared with the `local' builtin).
8814
88152. Changes to Readline
8816
8817a. The history file code now uses O_BINARY mode when reading and writing
8818 the history file on cygwin32.
8819
88203. New Features in Bash
8821
8822a. A new programmable completion facility, with two new builtin commands:
8823 complete and compgen.
8824
8825b. configure has a new option, `--enable-progcomp', to compile in the
8826 programmable completion features (enabled by default).
8827
8828c. `shopt' has a new option, `progcomp', to enable and disable programmable
8829 completion at runtime.
8830
8831d. Unsetting HOSTFILE now clears the list of hostnames used for completion.
8832
88334. New Features in Readline
8834
8835a. A new variable, rl_gnu_readline_p, always 1. The intent is that an
8836 application can verify whether or not it is linked with the `real'
8837 readline library or some substitute.
8838
8839------------------------------------------------------------------------------
8840This document details the changes between this version, bash-2.04-devel,
8841and the previous version, bash-2.03-release.
8842
88431. Changes to Bash
8844
8845a. System-specific configuration and source changes for: Interix, Rhapsody
8846
8847b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if
8848 JOB_CONTROL was not defined.
8849
8850c. An obscure race condition in the trap code was fixed.
8851
8852d. The string resulting from $'...' is now requoted to avoid any further
8853 expansion.
8854
8855e. The $'...' quoting syntax now allows backslash to escape a single quote,
8856 for ksh-93 compatibility.
8857
8858f. The $"..." quoting syntax now escapes backslashes and double quotes in
8859 the translated string when displaying them with the --dump-po-strings
8860 option.
8861
8862g. `echo -e' no longer converts \' to '.
8863
8864h. Fixes were made to the extended globbing code to handle embedded (...)
8865 patterns better.
8866
8867i. Some improvements were made to the code that unsets `nodelay' mode on
8868 the file descriptor from which bash is reading input.
8869
8870j. Some changes were made to the replacement termcap library for better
8871 operation on MS-DOS.
8872
8873k. Some changes were made to the tilde expansion code to handle backslash
8874 as a pathname separator on MS-DOS.
8875
8876l. The source has been reorganized a little bit -- there is now an `include'
8877 subdirectory, and lib/posixheaders has been removed.
8878
8879m. Improvements were made to the `read' builtin so that it makes many
8880 fewer read(2) system calls.
8881
8882n. The expansion of $- will include `c' and `s' when those options are
8883 supplied at shell invocation.
8884
8868edaf 8885o. Several improvements were made to the completion code: variable completion
bb70624e
JA
8886 now works better when there are unterminated expansions, command
8887 completion understands quotes better, and completion now works in certain
8888 unclosed $(... constructs.
8889
8890p. The arithmetic expansion code was fixed to not need the value of a
8891 variable being assigned a value (fixes the "ss=09; let ss=10" bug).
8892
8893q. Some changes were made to make exported environment creation faster.
8894
8895r. The html documentation will be installed into $(htmldir) if that variable
8896 has a value when `make install' is run.
8897
8898s. Fixed a bug that would cause the bashrc file to be sourced inappropriately
8899 when bash is started by sshd.
8900
8901t. The SSH_CLIENT environment variable is no longer auto-exported.
8902
8903u. A bug that caused redirections with (...) subshells to be performed in
8904 the wrong order was fixed.
8905
28ef6c31 8906v. A bug that occasionally caused inappropriate expansion of assignment
bb70624e
JA
8907 statements in compound array assignments was fixed.
8908
8909w. The code that parses the words in a compound array assignment was
8910 simplified considerably and should work better now.
8911
8912x. Fixes to the non-job-control code in nojobs.c to make it POSIX.2-compliant
8913 when a user attempts to retrieve the status of a terminated background
8914 process.
8915
8916y. Fixes to the `printf' builtin so that it doesn't try to expand all
8917 backslash escape sequences in the format string before parsing it for
8918 % format specifiers.
8919
89202. Changes to Readline
8921
8922a. The history library tries to truncate the history file only if it is a
8923 regular file.
8924
8925b. A bug that caused _rl_dispatch to address negative array indices on
8926 systems with signed chars was fixed.
8927
8928c. rl-yank-nth-arg now leaves the history position the same as when it was
8929 called.
8930
8931d. Changes to the completion code to handle MS-DOS drive-letter:pathname
8932 filenames.
8933
8934e. Completion is now case-insensitive by default on MS-DOS.
8935
8936f. Fixes to the history file manipulation code for MS-DOS.
8937
8938g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
8939
8940h. Some fixes were made to the redisplay code for better operation on MS-DOS.
8941
8942i. The quoted-insert code will now insert tty special chars like ^C.
8943
8944j. A bug was fixed that caused the display code to reference memory before
8945 the start of the prompt string.
8946
8947k. More support for __EMX__ (OS/2).
8948
8949l. A bug was fixed in readline's signal handling that could cause infinite
8950 recursion in signal handlers.
8951
8952m. A bug was fixed that caused the point to be less than zero when rl_forward
8953 was given a very large numeric argument.
8954
8955n. The vi-mode code now gets characters via the application-settable value
8956 of rl_getc_function rather than calling rl_getc directly.
8957
89583. New Features in Bash
8959
8960a. The history builtin has a `-d offset' option to delete the history entry
8961 at position `offset'.
8962
8963b. The prompt expansion code has two new escape sequences: \j, the number of
8964 active jobs; and \l, the basename of the shell's tty device name.
8965
8966c. The `bind' builtin has a new `-x' option to bind key sequences to shell
8967 commands.
8968
8969d. There is a new shell option, no_empty_command_completion, which, when
8970 enabled, disables command completion when TAB is typed on an empty line.
8971
8972e. The `help' builtin has a `-s' option to just print a builtin's usage
8868edaf 8973 synopsis.
bb70624e
JA
8974
8975f. There are several new arithmetic operators: id++, id-- (variable
8976 post-increment/decrement), ++id, --id (variabl pre-increment/decrement),
8977 expr1 , expr2 (comma operator).
8978
8979g. There is a new ksh-93 style arithmetic for command:
8980 for ((expr1 ; expr2; expr3 )); do list; done
8981
8982h. The `read' builtin has a number of new options:
8983 -t timeout only wait timeout seconds for input
8984 -n nchars only read nchars from input instead of a full line
8985 -d delim read until delim rather than newline
8986 -s don't echo input chars as they are read
8987
8988i. The redirection code now handles several filenames specially:
8989 /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
8990 not they are present in the file system.
8991
8992j. The redirection code now recognizes pathnames of the form
8993 /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
8994 of the appropriate type to the specified port on the specified host.
8995
8996k. The ksh-93 ${!prefix*} expansion, which expands to the names of all
8997 shell variables whose names start with prefix, has been implemented.
8998
8999l. There is a new dynamic variable, FUNCNAME, which expands to the name of
9000 a currently-executing function. Assignments to FUNCNAME have no effect.
9001
9002m. The GROUPS variable is no longer readonly; assignments to it are silently
9003 discarded. This means it can be unset.
9004
90054. New Features in Readline
9006
9007a. Parentheses matching is now always compiled into readline, and enabled
9008 or disabled when the value of the `blink-matching-paren' variable is
9009 changed.
9010
9011b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
9012
9013c. MS-DOS systems now use ~/_history as the default history file.
9014
9015d. history-search-{forward,backward} now leave the point at the end of the
9016 line when the string to search for is empty, like
9017 {reverse,forward}-search-history.
9018
9019e. history-search-{forward,backward} now leave the last history line found
9020 in the readline buffer if the second or subsequent search fails.
9021
9022f. New function for use by applications: rl_on_new_line_with_prompt, used
9023 when an application displays the prompt itself before calling readline().
9024
9025g. New variable for use by applications: rl_already_prompted. An application
9026 that displays the prompt itself before calling readline() must set this to
9027 a non-zero value.
9028
9029------------------------------------------------------------------------------
b72432fd
JA
9030This document details the changes between this version, bash-2.03-release,
9031and the previous version, bash-2.03-beta2.
9032
90331. Changes to Bash
9034
9035a. A file descriptor leak in the `fc' builtin was fixed.
9036
9037b. A bug was fixed in the `read' builtin that caused occasional spurious
9038 failures when using `read -e'.
9039
9040c. The version code needed to use the value of the cpp variable
9041 CONF_MACHTYPE rather than MACHTYPE.
9042
9043d. A new test was added to exercise the command printing and copying code.
9044
9045e. A bug was fixed that caused `time' to be recognized as a reserved word
9046 if it was the first pattern in a `case' statement pattern list.
9047
9048------------------------------------------------------------------------------
9049This document details the changes between this version, bash-2.03-beta2,
9050and the previous version, bash-2.03-beta1.
9051
90521. Changes to Bash
9053
9054a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2.
9055
9056b. config.{guess,sub} support added for the NEC SX4.
9057
9058c. Changed some of the cross-compiling sections of the configure macros in
9059 aclocal.m4 so that configure won't abort.
9060
9061d. Slight changes to how the HTML versions of the bash and readline manuals
9062 are generated.
9063
9064e. Fixed conditional command printing to avoid interpreting printf `%'-escapes
9065 in arguments to [[.
9066
9067f. Don't include the bash malloc on all variants of the alpha processor.
9068
9069g. Changes to configure to make --enable-profiling work on Solaris 2.x.
9070
9071h. Fixed a bug that manifested itself when shell functions were called
9072 between calls to `getopts'.
9073
9074i. Fixed pattern substitution so that a bare `#'as a pattern causes the
9075 replacement string to be prefixed to the search string, and a bare
9076 `%' causes the replacement string to be appended to the search string.
9077
9078j. Fixed a bug in the command execution code that caused child processes
9079 to occasionally have the wrong value for $!.
9080
90812. Changes to Readline
9082
9083a. Added code to the history library to catch history substitutions using
9084 `&' without a previous history substitution or search having been
9085 performed.
9086
90873. New Features in Bash
9088
90894. New Features in Readline
9090
9091a. New bindable variable: `isearch-terminators'.
9092
9093b. New bindable function: `forward-backward-delete-char' (unbound by default).
9094
9095------------------------------------------------------------------------------
9096This document details the changes between this version, bash-2.03-beta1,
9097and the previous version, bash-2.03-alpha.
9098
90991. Changes to Bash
9100
9101a. A change was made to the help text for `{...}' to make it clear that a
9102 semicolon is required before the closing brace.
9103
9104b. A fix was made to the `test' builtin so that syntax errors cause test
9105 to return an exit status > 1.
9106
9107c. Globbing is no longer performed on assignment statements that appear as
9108 arguments to `assignment builtins' such as `export'.
9109
9110d. System-specific configuration changes were made for: Rhapsody,
9111 AIX 4.2/gcc, BSD/OS 4.0.
9112
9113e. New loadable builtins: ln, unlink.
9114
9115f. Some fixes were made to the globbing code to handle extended glob patterns
9116 which immediately follow a `*'.
9117
9118g. A fix was made to the command printing code to ensure that redirections
9119 following compound commands have a space separating them from the rest
9120 of the command.
9121
9122h. The pathname canonicalization code was changed to produce fewer leading
9123 `//' sequences, since those are interpreted as network file system
9124 pathnames on some systems.
9125
9126i. A fix was made so that loops containing `eval' commands in commands passed
9127 to `bash -c' would not exit prematurely.
9128
9129j. Some changes were made to the job reaping code when the shell is not
9130 interactive, so the shell will retain exit statuses longer for examination
9131 by `wait'.
9132
9133k. A fix was made so that `jobs | command' works again.
9134
9135l. The erroneous compound array assignment var=((...)) is now a syntax error.
9136
9137m. A change was made to the dynamic loading code in `enable' to support
9138 Tenon's MachTen.
9139
9140n. A fix was made to the globbing code so that extended globbing patterns
9141 will correctly match `.' in a bracket expression.
9142
91432. Changes to Readline
9144
9145a. A fix was made to the completion code in which a typo caused the wrong
9146 value to be passed to the function that computed the longest common
9147 prefix of the list of matches.
9148
9149b. The completion code now checks the value of rl_filename_completion_desired,
9150 which is set by application-supplied completion functions to indicate
9151 that filename completion is being performed, to decide whether or not to
9152 call an application-supplied `ignore completions' function.
9153
91543. New Features in Bash
9155
9156a. A change was made to the startup file code so that any shell begun with
9157 the `--login' option, even non-interactive shells, will source the login
9158 shell startup files.
9159
91604. New Features in Readline
9161
9162a. A new variable, rl_erase_empty_line, which, if set by an application using
9163 readline, will cause readline to erase, prompt and all, lines on which the
9164 only thing typed was a newline.
9165
9166------------------------------------------------------------------------------
9167This document details the changes between this version, bash-2.03-alpha,
9168and the previous version, bash-2.02.1-release.
9169
91701. Changes to Bash
9171
9172a. System-specific configuration changes were made for: Irix 6.x, Unixware 7.
9173
9174b. The texi2dvi and texi2html scripts were updated to the latest versions
9175 from the net.
9176
9177c. The configure tests that determine which native type is 32 bits were
9178 changed to not require a compiled program.
9179
9180d. Fixed a bug in shell_execve that could cause memory to be freed twice
9181 after a failed exec.
9182
9183e. The `printf' test uses `diff -a' if it's available to prevent confusion
9184 due to the non-ascii output.
9185
9186f. Shared object configuration is now performed by a shell script,
9187 support/shobj-conf, which generates values to be substituted into
9188 makefiles by configure.
9189
9190g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a
9191 return value.
9192
9193h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar
9194 handling of RLIMIT_FILESIZE.
9195
9196i. Some new loadable builtins were added: id, printenv, sync, whoami, push,
9197 mkdir. `pushd', `popd', and `dirs' can now be built as regular or
9198 loadable builtins from the same source file.
9199
9200j. Changes were made to `printf' to handle NUL bytes in the expanded format
9201 string.
9202
9203k. The various `make clean' Makefile targets now descend into lib/sh.
9204
9205l. The `type' builtin was changed to use the internal `getopt' so that things
9206 like `type -ap' work as expected.
9207
9208m. There is a new configuration option, --with-installed-readline, to link
9209 bash with a locally-installed version of readline. Only readline version
9210 4.0 and later releases can support this. Shared and static libraries
9211 are supported. The installed include files are used.
9212
9213n. There is a new autoconf macro used to find which basic type is 64 bits.
9214
9215o. Dynamic linking and loadable builtins should now work on SCO 3.2v5*,
9216 AIX 4.2 with gcc, Unixware 7, and many other systems using gcc, where
9217 the `-shared' options works correctly.
9218
9219p. A bug was fixed in the bash filename completion code that caused memory to
9220 be freed twice if a directory name containing an unset variable was
9221 completed and the -u option was set.
9222
9223q. The prompt expansion code now quotes the `$' in the `\$' expansion so it
9224 is not processed by subsequent parameter expansion.
9225
9226r. Fixed a parsing bug that caused a single or double quote after a `$$' to
9227 trigger ANSI C expansion or locale translation.
9228
9229s. Fixed a bug in the globbing code that caused quoted filenames containing
9230 no globbing characters to sometimes be incorrectly expanded.
9231
9232t. Changes to the default prompt strings if prompt string decoding is not
9233 compiled into the shell.
9234
9235u. Added `do', `then', `else', `{', and `(' to the list of keywords that may
9236 precede the `time' reserved word.
9237
9238v. The shell may now be cross-built for BeOS as well as cygwin32.
9239
9240w. The conditional command execution code now treats `=' the same as `=='
9241 for deciding when to perform pattern matching.
9242
9243x. The `-e' option no longer causes the shell to exit if a command exits
9244 with a non-zero status while running the startup files.
9245
9246y. The `printf' builtin no longer dumps core if a modifier is supplied in
9247 the format string without a conversion character (e.g. `%h').
9248
9249z. Array assignments of the form a=(...) no longer show up in the history
9250 list.
9251
9252aa. The parser was fixed to obey the POSIX.2 rules for finding the closing
9253 `}' in a ${...} expression.
9254
9255bb. The history file is now opened with mode 0600 rather than 0666, so bash
9256 no longer relies on the user's umask being set appropriately.
9257
9258cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now
9259 relies on proper behavior from the C library.
9260
9261dd. Minor changes were made to allow quoted variable expansions using
9262 ${...} to be completed correctly if there is no closing `"'.
9263
9264ee. Changes were made to builtins/Makefile.in so that configuring the shell
9265 with `--enable-profiling' works right and builtins/mkbuiltins is
9266 generated.
9267
92682. Changes to Readline
9269
9270a. The version number is now 4.0.
9271
9272b. There is no longer any #ifdef SHELL code in the source files.
9273
9274c. Some changes were made to the key binding code to fix memory leaks and
9275 better support Win32 systems.
9276
9277d. Fixed a silly typo in the paren matching code -- it's microseconds, not
9278 milliseconds.
9279
9280e. The readline library should be compilable by C++ compilers.
9281
9282f. The readline.h public header file now includes function prototypes for
9283 all readline functions, and some changes were made to fix errors in the
9284 source files uncovered by the use of prototypes.
9285
9286g. The maximum numeric argument is now clamped at 1000000.
9287
9288h. Fixes to rl_yank_last_arg to make it behave better.
9289
9290i. Fixed a bug in the display code that caused core dumps if the prompt
9291 string length exceeded 1024 characters.
9292
9293j. The menu completion code was fixed to properly insert a single completion
9294 if there is only one match.
9295
9296k. A bug was fixed that caused the display code to improperly display tabs
9297 after newlines.
9298
92993. New Features in Bash
9300
9301a. New `shopt' option, `restricted_shell', indicating whether or not the
9302 shell was started in restricted mode, for use in startup files.
9303
9304b. Filename generation is now performed on the words between ( and ) in
9305 array assignments (which it probably should have done all along).
9306
9307c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
9308
9309d. ENV and BASH_ENV are read-only variables in a restricted shell.
9310
93114. New Features in Readline
9312
9313a. Many changes to the signal handling:
9314 o Readline now catches SIGQUIT and cleans up the tty before returning;
9315 o A new variable, rl_catch_signals, is available to application writers
9316 to indicate to readline whether or not it should install its own
9317 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
9318 SIGTTIN, and SIGTTOU;
9319 o A new variable, rl_catch_sigwinch, is available to application
9320 writers to indicate to readline whether or not it should install its
9321 own signal handler for SIGWINCH, which will chain to the calling
9322 applications's SIGWINCH handler, if one is installed;
9323 o There is a new function, rl_free_line_state, for application signal
9324 handlers to call to free up the state associated with the current
9325 line after receiving a signal;
9326 o There is a new function, rl_cleanup_after_signal, to clean up the
9327 display and terminal state after receiving a signal;
9328 o There is a new function, rl_reset_after_signal, to reinitialize the
9329 terminal and display state after an application signal handler
9330 returns and readline continues
9331
9332b. There is a new function, rl_resize_terminal, to reset readline's idea of
9333 the screen size after a SIGWINCH.
9334
9335c. New public functions: rl_save_prompt and rl_restore_prompt. These were
9336 previously private functions with a `_' prefix.
9337
9338d. New function hook: rl_pre_input_hook, called just before readline starts
9339 reading input, after initialization.
9340
9341e. New function hook: rl_display_matches_hook, called when readline would
9342 display the list of completion matches. The new function
9343 rl_display_match_list is what readline uses internally, and is available
9344 for use by application functions called via this hook.
9345
9346f. New bindable function, delete-char-or-list, like tcsh.
9347
9348------------------------------------------------------------------------------
bc4cd23c
JA
9349This document details the changes between this version, bash-2.02.1-release,
9350and the previous version, bash-2.02-release.
9351
93521. Changes to Bash
9353
9354a. A bug that caused the bash readline support to not compile unless aliases
9355 and csh-style history were configured into the shell was fixed.
9356
9357b. Fixed a bug that could cause a core dump when here documents contained
9358 more than 1000 characters.
9359
9360c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same
9361 as the current directory when in POSIX mode.
9362
9363d. Fixed an alignment problem with the memory returned by the bash malloc,
9364 so returned memory is now 64-bit aligned.
9365
9366e. Fixed a bug that caused command substitutions executed within pipelines
9367 to put the terminal in the wrong process group.
9368
9369f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop,
9370 Unixware 2, and Unixware 7.
9371
9372g. Fixes to the pattern matching code to make it work correctly for eight-bit
9373 characters.
9374
9375h. Fixed a problem that occasionally caused the shell to display the wrong
9376 value for the new working directory when changing to a directory found
9377 in $CDPATH when in physical mode.
9378
9379i. Fixed a bug that caused core dumps when using conditional commands in
9380 shell functions.
9381
9382j. Fixed a bug that caused the printf builtin to loop forever if the format
9383 string did not consume any of the arguments.
9384
9385k. Fixed a bug in the parameter expansion code that caused "$@" to be
9386 incorrectly split if $IFS did not contain a space character.
9387
9388l. Fixed a bug that could cause a core dump when completing hostnames if
9389 the number of matching hostnames was an exact multiple of 16.
9390
9391m. Fixed a bug that caused the shell to fork too early when a command
9392 such as `%2 &' was given.
9393
93942. Changes to Readline
9395
9396a. Fixed a problem with redisplay that showed up when the prompt string was
9397 longer than the screen width and the prompt contained invisible characters.
9398
9399------------------------------------------------------------------------------
9400This document details the changes between this version, bash-2.02-release,
9401and the previous version, bash-2.02-beta2.
cce855bc
JA
9402
94031. Changes to Bash
9404
9405a. A bug was fixed that caused the terminal process group to be set
9406 incorrectly when performing command substitution of builtins in a
9407 pipeline.
9408
9409------------------------------------------------------------------------------
9410This document details the changes between this version, bash-2.02-beta2,
9411and the previous version, bash-2.02-beta1.
9412
94131. Changes to Bash
9414
9415a. Attempting to `wait' for stopped jobs now generates a warning message.
9416
9417b. Pipelines which exit due to SIGPIPE in non-interactive shells are now
9418 not reported if the shell is compiled -DDONT_REPORT_SIGPIPE.
9419
9420c. Some changes were made to builtins/psize.sh and support/bashbug.sh to
9421 attempt to avoid some /tmp file races and surreptitious file
9422 substitutions.
9423
9424d. Fixed a bug that caused the shell not to compile if configured with
9425 dparen arithmetic but without aliases.
9426
9427e. Fixed a bug that caused the input stream to be switched when assigning
9428 empty arrays with `bash -c'.
9429
9430f. A bug was fixed in the readline expansion glue code that caused bash to
9431 dump core when expanding lines with an unclosed single quote.
9432
9433g. A fix was made to the `cd' builtin so that using a non-empty directory
9434 from $CDPATH results in an absolute pathname of the new current working
9435 directory to be displayed after the current directory is changed.
9436
9437h. Fixed a bug in the variable assignment code that caused the shell to
9438 dump core when referencing an unset variable with `set -u' enabled in
9439 an assignment statement preceding a command.
9440
9441i. Fixed a bug in the exit trap code that caused reserved words to not be
9442 recognized under certain circumstances.
9443
9444j. Fixed a bug in the parameter pattern substitution code so that quote
9445 removal is performed.
9446
9447k. The shell should now configure correctly on Apple Rhapsody systems.
9448
9449l. The `kill' builtin now prints a usage message if it is not passed any
9450 arguments.
9451
9452------------------------------------------------------------------------------
9453This document details the changes between this version, bash-2.02-beta1,
9454and the previous version, bash-2.02-alpha1.
9455
94561. Changes to Bash
9457
9458a. A few compilation bugs were fixed in the new extended globbing code.
9459
9460b. Executing arithmetic commands now sets the command name to `((' so
9461 error messages look right.
9462
9463c. Fixed some build problems with various configuration options.
9464
9465d. The `printf' builtin now aborts immediately if an illegal format
9466 character is encountered.
9467
9468e. The code that creates here-documents now behaves better if the file it's
9469 trying to create already exists for some reason.
9470
9471f. Fixed a problem with the extended globbing code that made patterns like
9472 `x+*' expand incorrectly.
9473
9474g. The prompt string expansion code no longer quotes tildes with backslashes.
9475
9476h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in
9477 the presence of lstat(2) failures.
9478
9479i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'.
9480
9481j. The mail checking code now ensures that it has a valid default mailpath.
9482
9483k. A bug was fixed that caused local variables to be unset inappropriately
9484 when sourcing a script from within another sourced script.
9485
9486l. A bug was fixed in the history saving code so that functions are saved
9487 in the history list correctly if `cmdhist' is enabled, but `lithist'
9488 is not.
9489
9490m. A bug was fixed that caused printf overflows when displaying error
9491 messages.
9492
9493n. It should be easier to build the loadble builtins in examples/loadables,
9494 though some manual editing of the generated Makefile is still required.
9495
9496o. The user's primary group is now always ${GROUPS[0]}.
9497
9498p. Some updates were made to support/config.guess from the GNU master copy.
9499
9500q. Some changes were made to the autoconf support for Solaris 2.6 large
9501 files.
9502
9503r. The `command' builtins now does the right thing when confstr(3) cannot
9504 find a value for _CS_PATH.
9505
9506s. Extended globbing expressions like `*.!(c)' are not history expanded if
9507 `extglob' is enabled.
9508
9509t. Using the `-P' option to `cd' will force the value that is assigned to
9510 PWD to not contain any symbolic links.
9511
95122. Changes to Readline
9513
9514a. The code that prints completion listings now behaves better if one or
9515 more of the filenames contains non-printable characters.
9516
9517b. The time delay when showing matching parentheses is now 0.5 seconds.
9518
9519------------------------------------------------------------------------------
9520This document details the changes between this version, bash-2.02-alpha1,
9521and the previous version, bash-2.01.1-release.
9522
95231. Changes to Bash
9524
9525a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x,
9526 Solaris 2.6, SINIX SVR4.
9527
9528b. Changes were made to the generated `info' files so that `install-info'
9529 works correctly.
9530
9531c. PWD is now auto-exported.
9532
9533d. A fix was made to the pipeline code to make sure that the shell forks
9534 to execute simple commands consisting solely of assignment statements.
9535
9536e. Changes to the test suite for systems with 14-character filenames.
9537
9538f. The default sizes of some internal hash tables have been made smaller
9539 to reduce the shell's memory footprint.
9540
9541g. The `((...))' arithmetic command is now executed directly instead of
9542 being translated into `let "..."'.
9543
9544h. Fixes were made to the expansion code so that "$*", "$@", "${array[@]}",
9545 and "${array[@]}" expand correctly when IFS does not contain a space
9546 character, is unset, or is set to NULL.
9547
9548i. The indirect expansion code (${!var}) was changed so that the only
9549 valid values of `var' are variable names, positional parameters, `#',
9550 `@', and `*'.
9551
9552j. An arithmetic expression error in a $((...)) expansion now causes a
9553 non-interactive shell running in posix mode to exit.
9554
9555k. Compound array assignment now splits the words within the parentheses
9556 on shell metacharacters like the parser would before expansing them
9557 and performing the assignment. This is for compatibility with ksh-93.
9558
9559l. The internal shell backslash-quoting code (used in the output of `set'
9560 and completion) now quotes tildes if they appear at the start of the
9561 string or after a `=' or `:'.
9562
9563m. A couple of bugs with `shopt -o' were fixed.
9564
9565n. `bash +o' now displays the same output as `set +o' before starting an
9566 interactive shell.
9567
9568o. A bug that caused command substitution and the `eval' builtin to
9569 occasionally free memory twice when an error was encountered was fixed.
9570
9571p. The filename globbing code no longer requires read permission for a
9572 directory when the filename to be matched does not contain any globbing
9573 characters, as POSIX.2 specifies.
9574
9575q. A bug was fixed so that the job containing the last asynchronous
9576 process is not removed from the job table until a `wait' is executed
9577 for that process or another asynchronous process is started. This
9578 satisfies a POSIX.2 requirement.
9579
9580r. A `select' bug was fixed so that a non-numeric user response is treated
9581 the same as a numeric response that is out of range.
9582
9583s. The shell no longer parses the value of SHELLOPTS from the environment
9584 if it is restricted, running setuid, or running in `privileged mode'.
9585
9586t. Fixes were made to enable large file support on systems such as
9587 Solaris 2.6, where the size of a file may be larger than can be held
9588 in an `int'.
9589
9590u. The filename hashing code was fixed to not add `./' to the beginning of
9591 filenames which already begin with `./'.
9592
9593v. The configure script was changed so that the GNU termcap library is not
9594 compiled in if `prefer-curses' has been specified.
9595
9596w. HISTCONTROL and HISTIGNORE are no longer applied to the second and
9597 subsequent lines of a multi-line command.
9598
9599x. A fix was made to `disown' so that it does a better job of catching
9600 out-of-range jobs.
9601
9602y. Non-interactive shells no longer report the status of processes terminated
9603 due to SIGINT, even if the standard output is a terminal.
9604
9605z. A bug that caused the output of `jobs' to have extra carriage returns
9606 was fixed.
9607
9608aa. A bug that caused PIPESTATUS to not be set when builtins or shell
9609 functions were executed in the foreground was fixed.
9610
9611bb. Bash now attempts to detect when it is being run by sshd, and treats
9612 that case identically to being run by rshd.
9613
9614cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell
9615 options was changed was fixed.
9616
9617dd. The `kill' builtin now disallows empty or missing process id arguments
9618 instead of treating them as identical to `0', which means the current
9619 process.
9620
9621ee. `var=value declare -x var' now behaves identically to
9622 `var=value export var'. Similarly for `var=value declare -r var' and
9623 `var=value readonly var'.
9624
9625ff. A few memory leaks were fixed.
9626
9627gg. `alias' and `unalias' now print error messages when passed an argument
9628 that is not an alias for printing or deletion, even when the shell is
9629 not interactive, as POSIX.2 specifies.
9630
9631hh. `alias' and `alias -p' now return a status of 0 when no aliases are
74091dd4 9632 defined, as POSIX.2 specifies.
cce855bc
JA
9633
9634ii. `cd -' now prints the pathname of the new working directory if the shell
9635 is interactive.
9636
9637jj. A fix was made so that the code that binds $PWD now copes with getcwd()
9638 returning NULL.
9639
9640kk. `unset' now checks whether or not a function name it's trying to unset
9641 is a valid shell identifier only when the shell is running in posix mode.
9642
9643ll. A change was made to the code that generates filenames for here documents
9644 to make them less prone to name collisions.
9645
9646mm. The parser was changed so that `time' is recognized as a reserved word
9647 only at the beginning of a pipeline.
9648
9649nn. The pathname canonicalization code was changed so that `//' is converted
9650 into `/', but all other pathnames beginning with `//' are left alone, as
9651 POSIX.2 specifies.
9652
9653oo. The `logout' builtin will no longer exit a non-interactive non-login
9654 shell.
9655
96562. Changes to Readline
9657
9658a. Fixed a problem in the readline test program rltest.c that caused a core
9659 dump.
9660
9661b. The code that handles parser directives in inputrc files now displays
9662 more error messages.
9663
9664c. The history expansion code was fixed so that the appearance of the
9665 history comment character at the beginning of a word inhibits history
9666 expansion for that word and the rest of the input line.
9667
96683. New Features in Bash
9669
9670a. A new version of malloc, based on the older GNU malloc, that has many
9671 changes, is more page-based, is more conservative with memory usage,
9672 and does not `orphan' large blocks when they are freed.
9673
9674b. A new version of gmalloc, based on the old GLIBC malloc, with many
9675 changes and range checking included by default.
9676
9677c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic
9678 Regular Expression matching, including character classes, collating
9679 symbols, equivalence classes, and support for case-insensitive pattern
9680 matching.
9681
9682d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
9683 implemented, controlled by a new `shopt' option, `extglob'.
9684
9685e. There is a new ksh-like `[[' compound command, which implements
9686 extended `test' functionality.
9687
9688f. There is a new `printf' builtin, implemented according to the POSIX.2
9689 specification.
9690
9691g. There is a new feature for command substitution: $(< filename) now expands
9692 to the contents of `filename', with any trailing newlines removed
9693 (equivalent to $(cat filename)).
9694
9695h. There are new tilde prefixes which expand to directories from the
9696 directory stack.
9697
9698i. There is a new `**' arithmetic operator to do exponentiation.
9699
9700j. There are new configuration options to control how bash is linked:
9701 `--enable-profiling', to allow bash to be profiled with gprof, and
9702 `--enable-static-link', to allow bash to be linked statically.
9703
9704k. There is a new configuration option, `--enable-cond-command', which
9705 controls whether or not the `[[' command is included. It is on by
9706 default.
9707
9708l. There is a new configuration option, `--enable-extended-glob', which
9709 controls whether or not the ksh extended globbing feature is included.
9710 It is enabled by default.
9711
9712m. There is a new configuration #define in config.h.top that, when enabled,
9713 will cause all login shells to source /etc/profile and one of the user-
9714 specific login shell startup files, whether or not the shell is
9715 interactive.
9716
9717n. There is a new invocation option, `--dump-po-strings', to dump
9718 a shell script's translatable strings ($"...") in GNU `po' format.
9719
9720o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
9721 pattern matching when globbing filenames and using the `case' construct.
9722
9723p. There is a new `shopt' option, `huponexit', which, when enabled, causes
9724 the shell to send SIGHUP to all jobs when an interactive login shell
9725 exits.
9726
9727q. `bind' has a new `-u' option, which takes a readline function name as an
9728 argument and unbinds all key sequences bound to that function in a
9729 specified keymap.
9730
9731r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
9732 and running jobs, respectively.
9733
9734s. The `shopt' `-p' option now causes output to be displayed in a reusable
9735 format.
9736
9737t. `test' has a new `-N' option, which returns true if the filename argument
9738 has been modified since it was last accessed.
9739
9740u. `umask' now has a `-p' option to print output in a reusable format.
9741
9742v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
9743 translation code. It expands to the character whose ascii code is NNN
9744 in hexadecimal.
9745
9746w. The prompt string expansion code has a new `\r' escape sequence.
9747
9748x. The shell may now be cross-compiled for the CYGWIN32 environment on
9749 a Unix machine.
9750
97514. New Features in Readline
9752
9753a. There is now an option for `iterative' yank-last-arg handline, so a user
9754 can keep entering `M-.', yanking the last argument of successive history
9755 lines.
9756
9757b. New variable, `print-completions-horizontally', which causes completion
9758 matches to be displayed across the screen (like `ls -x') rather than up
9759 and down the screen (like `ls').
9760
9761c. New variable, `completion-ignore-case', which causes filename completion
9762 and matching to be performed case-insensitively.
9763
9764d. There is a new bindable command, `magic-space', which causes history
9765 expansion to be performed on the current readline buffer and a space to
9766 be inserted into the result.
9767
9768e. There is a new bindable command, `menu-complete', which enables tcsh-like
9769 menu completion (successive executions of menu-complete insert a single
9770 completion match, cycling through the list of possible completions).
9771
9772f. There is a new bindable command, `paste-from-clipboard', for use on Win32
9773 systems, to insert the text from the Win32 clipboard into the editing
9774 buffer.
9775
9776g. The key sequence translation code now understands printf-style backslash
9777 escape sequences, including \NNN octal escapes. These escape sequences
9778 may be used in key sequence definitions or macro values.
9779
9780h. An `$include' inputrc file parser directive has been added.
9781
9782------------------------------------------------------------------------------
e8ce775d
JA
9783This document details the changes between this version, bash-2.01.1-release,
9784and the previous version, bash-2.01-release.
9785
97861. Changes to Bash
9787
9788a. The select command was fixed to check the validity of the user's
9789 input more strenuously.
9790
9791b. A bug was fixed that prevented `time' from timing commands correctly
9792 when supplied as an argument to `bash -c'.
9793
9794c. A fix was made to the mail checking code to keep from adding the same
9795 mail file to the list of files to check multiple times when parsing
9796 $MAILPATH.
9797
9798d. Fixed an off-by-one error in the tilde expansion library.
9799
9800e. When using the compound array assignment syntax, the old value of
9801 the array is cleared before assigning the new value.
9802
9803f. Fixed a bug that could cause a core dump when a trap handler was reset
9804 to the default in the trap command associated with that signal.
9805
9806g. Fixed a bug in the locale code that occurred when assigning a value
9807 to LC_ALL.
9808
9809h. A change was made to the parser so that words of the form xxx=(...)
9810 are not considered compound assignment statements unless there are
9811 characters before the `='.
9812
9813i. A fix was made to the command tracing code to correctly quote each
9814 word of output.
9815
9816j. Some changes were made to the bash-specific autoconf tests to make them
9817 more portable.
9818
9819k. Completion of words with globbing characters now correctly quotes the
9820 result.
9821
9822l. The directory /var/spool/mail is now preferred to /usr/spool/mail when
9823 configure is deciding on the default mail directory.
9824
9825m. The brace completion code was fixed to not quote the `{' and `}'.
9826
9827n. Some fixes were made to make $RANDOM more random in subshells.
9828
9829o. System-specific changes were made to configure for: SVR4.2
9830
9831p. Changes were made so that completion of words containing globbing chars
9832 substitutes the result only if a single filename was matched.
9833
9834q. The window size is now recomputed after a job is stopped with SIGTSTP if
9835 the user has set `checkwinsize' with `shopt'.
9836
9837r. When doing substring expansion, out-of-range substring specifiers now
9838 cause nothing to be substituted rather than an expansion error.
9839
9840s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' --
9841 only `EXIT' and `DEBUG' are accepted.
9842
9843t. The display of trapped signals now uses the signal number if signals
9844 for which bash does not know the name are trapped.
9845
9846u. A fix was made so that `bash -r' does not turn on restricted mode until
9847 after the startup files are executed.
9848
9849v. A bug was fixed that occasionally caused a core dump when a variable
9850 found in the temporary environment of export/declare/readonly had a
9851 null value.
9852
9853w. A bug that occasionally caused unallocated memory to be passed to free()
9854 when doing arithmetic substitution was fixed.
9855
9856x. A bug that caused a buffer overrun when expanding a prompt string
9857 containing `\w' and ${#PWD} exceeded PATH_MAX was fixed.
9858
9859y. A problem with the completion code that occasionally caused it to
9860 refer to a character before the beginning of the readline line buffer
9861 was fixed.
9862
9863z. A bug was fixed so that the `read' builtin restarts reads when
9864 interrupted by signals other than SIGINT.
9865
9866aa. Fixed a bug that caused a command to be freed twice when there was
9867 an evaluation error in the `eval' command.
9868
98692. Changes to Readline
9870
9871a. Added a missing `extern' to a declaration in readline.h that kept
9872 readline from compiling cleanly on some systems.
9873
9874b. The history file is now opened with mode 0600 when it is written for
9875 better security.
9876
9877c. Changes were made to the SIGWINCH handling code so that prompt redisplay
9878 is done better.
9879
9880d. ^G now interrupts incremental searches correctly.
9881
9882e. A bug that caused a core dump when the set of characters to be quoted
9883 when completing words was empty was fixed.
9884
9885------------------------------------------------------------------------------
d166f048
JA
9886This document details the changes between this version, bash-2.01-release,
9887and the previous version, bash-2.01-beta2.
9888
98891. Changes to Bash
9890
9891a. The `distclean' target should remove the `printenv' executable if it
9892 has been created.
9893
9894b. The test suite was changed slightly to ensure that the error messages
9895 are printed in English.
9896
9897c. A bug that caused the shell to dump core when a filename containing a
9898 `/' was passed to `hash' was fixed.
9899
9900d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1
9901 requires.
9902
9903e. A memory leak when completing commands was fixed.
9904
9905f. A memory leak that occurred when checking the hash table for commands
9906 with relative paths was fixed.
9907
9908------------------------------------------------------------------------------
9909This document details the changes between this version, bash-2.01-beta2,
9910and the previous version, bash-2.01-beta1.
9911
99121. Changes to Bash
9913
9914a. The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if
9915 the current (soft) limit is less than or equal to the hard limit.
9916
9917b. Fixed a bug that caused the bash emulation of strcasecmp to produce
9918 incorrect results.
9919
9920c. A bug that caused memory to be freed twice when a trap handler resets
9921 the trap more than once was fixed.
9922
9923d. A bug that caused machines where sizeof (pointer) > sizeof (int) to
9924 fail (and possibly dump core) when trying to unwind-protect a null
9925 pointer was fixed.
9926
9927e. The startup files should not be run with job control enabled. This fix
9928 allows SIGINT to once again interrupt startup file execution.
9929
9930f. Bash should not change the SIGPROF handler if it is set to something
9931 other than SIG_DFL.
9932
9933g. The completion code that provides bash-specific completions for readline
9934 now quotes characters that the readline code would treat as word break
9935 characters if they appear in a file name.
9936
9937h. The completion code now correctly quotes filenames containing a `!',
9938 even if the user attempted to use double quotes when attempting
9939 completion.
9940
9941i. A bug that caused the shell to dump core when `disown' was called without
9942 arguments and there was no current job was fixed.
9943
9944j. A construct like $((foo);bar) is now processed as a command substitution
9945 rather than as a bad arithmetic substitution.
9946
9947k. A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist'
9948 shell options when editing and re-executing a series of commands were
9949 fixed.
9950
9951l. A fix was made to the grammar -- the list of commands between `do' and
9952 `done' in the body of a `for' command should be treated the same as a
9953 while loop.
9954
99552. Changes to Readline
9956
9957a. A couple of bugs that caused the history search functions to attempt to
9958 free a NULL pointer were fixed.
9959
9960b. If the C library provides setlocale(3), readline does not need to look
9961 at various environment variables to decide whether or not to go into
9962 eight-bit mode automatically -- just check whether the current locale
9963 is not `C' or `POSIX'.
9964
9965c. If the filename completion function finds that a directory was not closed
9966 by a previous (interrupted) completion, it closes the directory with
9967 closedir().
9968
99693. New Features in Bash
9970
9971a. New bindable readline commands: history-and-alias-expand-line and
9972 alias-expand-line. The code was always in there, there was just no
9973 way to execute it.
9974
9975------------------------------------------------------------------------------
9976This document details the changes between this version, bash-2.01-beta1,
9977and the previous version, bash-2.01-alpha1.
9978
99791. Changes to Bash
9980
9981a. Fixed a problem that could cause file descriptors used for process
9982 substitution to conflict with those used explicitly in redirections.
9983
9984b. Made it easier to regenerate configure if the user changes configure.in.
9985
9986c. ${GROUPS[0]} should always be the primary group, even on systems without
9987 multiple groups.
9988
9989d. Spelling correction is no longer enabled by default.
9990
9991e. Fixes to quoting problems in `bashbug'.
9992
9993f. OS-specific configuration changes were made for: Irix 6.
9994
9995g. OS-specific code changes were made for: QNX.
9996
9997h. A more meaningful message is now printed when the file in /tmp for a
9998 here document cannot be created.
9999
10000i. Many changes to the shell's variable initialization code to speed
10001 non-interactive startup.
10002
10003j. Changes to the non-job-control code so that it does not try to open
10004 /dev/tty.
10005
10006k. The output of `set' and `export' is once again sorted, as POSIX wants.
10007
10008l. Fixed a problem caused by a recursive call reparsing the value of
10009 $SHELLOPTS.
10010
10011m. The tilde code no longer calls getenv() when it's compiled as part of
10012 the shell, which should eliminate problems on systems that cannot
10013 redefine getenv(), like the NeXT OS.
10014
10015n. Fixed a problem that caused `bash -o' or `bash +o' to not list all
10016 the shell options.
10017
10018o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit
10019 only if the hard limit is greater than the current (soft) limit.
10020
10021p. Fixed a problem that arose when building bash in a different directory
10022 than the source and y.tab.[ch] were remade with something other than
10023 bison. This came up most often on NetBSD.
10024
10025q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated
10026 an unfinished command completion (`/), which generated errors.
10027
10028r. The bash special tilde expansions (~-, ~+) are now attempted before
10029 calling the standard tilde expansion code, which should eliminate the
10030 problems people have been seeing with this on Solaris 2.5.1.
10031
10032s. Added support for <stdarg.h> to places where it was missing.
10033
10034t. Changed the code that reads the output of a command substitution to not
10035 go through stdio. This reduces the memory requirements and is faster.
10036
10037u. A number of changes to speed up export environment creation were made.
10038
10039v. A number of memory leaks were fixed as the result of running the test
10040 scripts through Purify.
10041
10042w. Fixed a bug that caused subshells forked to interpret executable
10043 scripts without a leading `#!' to not reinitialize the values of
10044 the shell options.
10045
100462. Changes to Readline
10047
10048a. History library has less `#ifdef SHELL' code -- abstracted stuff out
10049 into application-specific function hooks.
10050
10051b. Readline no longer calls getenv() if it's compiled as part of the shell,
10052 which should eliminate problems on systems that cannot redefine getenv(),
10053 like the NeXT OS.
10054
10055c. Fixed translation of ESC when `untranslating' macro values.
10056
10057d. The region kill operation now fixes the mark if it ends up beyond the
10058 boundaries of the line after the region is deleted.
10059
100603. New Features in Bash
10061
10062a. New argument for `configure': `--with-curses'. This can be used to
10063 override the selection of the termcap library on systems where it is
10064 deficient.
10065
10066------------------------------------------------------------------------------
10067This document details the changes between this version, bash-2.01-alpha1,
10068and the previous version, bash-2.0-release.
10069
100701. Changes to Bash
10071
10072a. System-specific configuration changes for: FreeBSD, SunOS4, Irix,
10073 MachTen, QNX 4.2, Harris Night Hawk, SunOS5.
10074
10075b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2,
10076 HP-UX, AIX 4.2.
10077
10078c. A bug that caused the exec builtin to fail because the full pathname of
10079 the command could not be found was fixed.
10080
10081d. The code that performs output redirections is now more resistant to
10082 race conditions and possible security exploits.
10083
10084e. A bug that caused the shell to dump core when performing pattern
10085 substitutions on variable values was fixed.
10086
10087f. More hosts are now recognized by the auto-configuration mechanism
10088 (OpenBSD, QNX, others).
10089
10090g. Assignments to read-only variables that attempt to convert them to
10091 arrays are now errors.
10092
10093h. A bug that caused shell scripts using array assignments in POSIX mode
10094 to exit after the assignment was performed was fixed.
10095
10096i. The substring expansion code is now more careful about running off the
10097 ends of the expanded variable value.
10098
10099j. A bug that caused completion to fail if a backquoted command substitution
10100 appeared anywhere on the line was fixed.
10101
10102k. The `source' builtin no longer turns off history if it has been enabled
10103 in a non-interactive shell.
10104
10105l. A bug that caused the shell to crash when `disown' was given a pid
10106 instead of a job number was fixed.
10107
10108m. The `cd' spelling correction code will not try to change to `.' if no
10109 directory entries match a single-character argument.
10110
10111n. A bad variable name supplied to `declare', `export', or `readonly' no
10112 longer causes a non-interactive shell in POSIX mode to exit.
10113
10114o. Some fixes were made to the test suite to handle peculiarities of
10115 various Unix versions.
10116
10117p. The bash completion code now quotes characters that readline would
10118 treat as word breaks for completion but are not shell metacharacters.
10119
10120q. Bad options supplied at invocation now cause a usage message to be
10121 displayed.
10122
10123r. Fixes were made to the code that handles DEBUG traps so that the trap
10124 string is not freed inappropriately.
10125
10126s. Some changes were made to the bash debugger in examples/bashdb -- it
10127 should be closer to working now.
10128
10129t. A problem that caused the default filename used for mail checking to be
10130 wrong was fixed.
10131
10132u. A fix was made to the `echo' builtin so that NUL characters printed with
10133 `echo -e' do not cause the output to be truncated.
10134
10135v. A fix was made to the job control code so that the shell behaves better
10136 when monitor mode is enabled in a non-interactive shell.
10137
10138w. Bash no longer catches all of the terminating signals in a non-
10139 interactive shell until a trap is set on EXIT, which should result in
10140 quicker startup.
10141
10142x. A fix was made to the command timing code so that `time' can be used in
10143 a loop.
10144
10145y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as
b72432fd 10146 a nested subshell rather than strictly as an (erroneous) arithmetic
d166f048
JA
10147 command.
10148
10149z. A fix was made to the globbing code so that it correctly matches quoted
10150 filenames beginning with a `.'.
10151
10152aa. A bug in `fc' that caused some multi-line commands to not be stored as
10153 one command in the history when they were re-executed after editing
10154 (with `fc -e') was fixed.
10155
10156bb. The `ulimit' builtin now attempts to catch some classes of integer
10157 overflows.
10158
10159cc. The command-oriented-history code no longer attempts to add `;'
10160 inappropriately when a newline appears while reading a $(...) command
10161 substitution.
10162
10163dd. A bug that caused the shell to dump core when `help --' was executed
10164 was fixed.
10165
10166ee. A bug that caused the shell to crash when an unset variable appeared
10167 in the body of a here document after `set -u' had been executed was
10168 fixed.
10169
10170ff. Implicit input redirections from /dev/null for asynchronous commands
10171 are now handled better.
10172
10173gg. A bug that caused the shell to fail to compile when configured with
10174 `--disable-readline' was fixed.
10175
10176hh. The globbing code should now be interruptible.
10177
10178ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a
10179 stopped job and adjusts the data structures accordingly, as if `bg' had
10180 been executed instead.
10181
10182jj. A bug that caused the shell to crash when mixing calls to `getopts'
10183 and `shift' on the same set of positional parameters was fixed.
10184
10185kk. The command printing code now preserves the `-p' flag to `time'.
10186
10187ll. The command printing code now handles here documents better when there
10188 are other redirections associated with the command.
10189
10190mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_)
10191 is no longer placed into the environment of executed commands -- users
10192 of glibc had too many problems with it.
10193
10194nn. Reorganized the code that generates signames.h. The signal_names list
10195 is now more complete but may be slightly different (SIGABRT is favored
10196 over SIGIOT, for example). The preferred signal names are those
10197 listed in the POSIX.2 standard.
10198
10199oo. `bashbug' now uses a filename shorter than 14 characters for its
10200 temporary file, and asks for confirmation before sending the bug
10201 report.
10202
10203pp. A bug that caused TAB completion in vi editing mode to not be turned
10204 off when `set -o posix' was executed or back on when `set +o posix'
10205 was executed was fixed.
10206
10207qq. A bug in the brace expansion code that caused brace expansions appearing
10208 in new-style $(...) command substitutions to be inappropriately expanded
10209 was fixed.
10210
10211rr. A bug in the readline hook shell-expand-line that could cause memory to
10212 be inappropriately freed was fixed.
10213
10214ss. A bug that caused some arithmetic expressions containing `&&' and `||'
10215 to be parsed with the wrong precedence has been fixed.
10216
10217tt. References to unbound variables after `set -u' has been executed now
10218 cause the shell to exit immediately, as they should.
10219
10220uu. A bug that caused the shell to exit inappropriately when `set -e' had
10221 been executed and a command's return status was being inverted with the
10222 `!' reserved word was fixed.
10223
10224vv. A bug that could occasionally cause the shell to crash with a
10225 divide-by-zero error when timing a command was fixed.
10226
10227ww. A bug that caused parameter pattern substitution to leave stray
10228 backslashes in the replacement string when the expression is in
10229 double quotes was fixed.
10230
10231xx. The `break' and `continue' builtins now break out of all loops when an
10232 invalid count argument is supplied.
10233
10234yy. Fixed a bug that caused PATH to be set to the empty string if
10235 `command -p' is executed with PATH unset.
10236
10237zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix,
10238 as POSIX specifies.
10239
10240aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS
10241 if there were no shell options set.
10242
10243bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX
10244 mode, their output is as POSIX.2 specifies.
10245
10246ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually
10247 creates an array variable.
10248
10249ddd. Fixed a bug that prevented `time' from correctly timing background
10250 pipelines.
10251
102522. Changes to Readline
10253
10254a. A bug that caused an extra newline to be printed when the cursor was on
10255 an otherwise empty line was fixed.
10256
10257b. An instance of memory being used after it was freed was corrected.
10258
10259c. The redisplay code now works when the prompt is longer than the screen
10260 width.
10261
10262d. `dump-macros' is now a bindable name, as it should have been all along.
10263
10264e. Non-printable characters are now expanded when displaying macros and
10265 their values.
10266
10267f. The `dump-variables' and `dump-macros' commands now output a leading
10268 newline if they're called as the result of a key sequence, rather
10269 than directly by an application.
10270
102713. New Features in Bash
10272
10273a. There is a new builtin array variable: GROUPS, the set of groups to which
10274 the user belongs. This is used by the test suite.
10275
102764. New Features in Readline
10277
10278a. If a key sequence bound to `universal-argument' is read while reading a
10279 numeric argument started with `universal-argument', it terminates the
10280 argument but is otherwise ignored. This provides a way to insert multiple
10281 instances of a digit string, and is how GNU emacs does it.
10282
10283------------------------------------------------------------------------------
ccc6cda3
JA
10284This document details the changes between this version, bash-2.0-release,
10285and the previous version, bash-2.0-beta3.
10286
102871. Changes to Bash
10288
10289a. Fix to the `getopts' builtin so that it does the right thing when a
10290 required option argument is not present.
10291
10292b. The completion code now updates the common prefix of matched names
10293 after FIGNORE processing is done, since any names that were removed
10294 may have changed the common prefix.
10295
10296c. Fixed a bug that made messages in MAILPATH entries not work correctly.
10297
10298d. Fixed a serious documentation error in the description of the new
10299 ${parameter:offset[:length]} expansion.
10300
10301e. Fixes to make parameter substring expansion ({$param:offset[:length]})
10302 work when within double quotes.
10303
10304f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional
10305 parameters.
10306
10307g. Corrected a misspelling of `unlimited' in the output of `ulimit'.
10308
10309h. Fixed a bug that caused executable scripts without a leading `#!' to
10310 occasionally pick up the wrong set of positional parameters.
10311
10312i. Linux systems now have a working `ulimit -v', using RLIMIT_AS.
10313
10314j. Updated config.guess so that many more machine types are recognized.
10315
10316k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]}
10317 expansion.
10318
10319l. If the shell is named `-su', and `-c command' is supplied, read and
10320 execute the login shell startup files even though the shell is not
10321 interactive. This is to support the `-' option to `su'.
10322
10323m. Fixed a bug that caused core dumps when the DEBUG trap was ignored
10324 with `trap "" DEBUG' and a shell function was subsequently executed.
10325
10326n. Fixed a bug that caused core dumps in the read builtin when IFS was
10327 set to the null string and the input had leading whitespace.
10328
103292. Changes to Readline
10330
10331a. Fixed a bug that caused a numeric argument of 1024 to be ignored when
10332 inserting text.
10333
10334b. Fixed the display code so that the numeric argument is displayed as it's
10335 being entered.
10336
10337c. Fixed the numeric argument reading code so that `M-- command' is
10338 equivalent to `M--1 command', as the prompt implies.
10339
103403. New Features in Bash
10341
10342a. `ulimit' now sets both hard and soft limits and reports the soft limit
10343 by default (when neither -H nor -S is specified). This is compatible
10344 with versions of sh and ksh that implement `ulimit'.
10345
10346b. Integer constants have been extended to base 64.
10347
103484. New Features in Readline
10349
10350a. The `home' and `end' keys are now bound to beginning-of-line and
10351 end-of-line, respectively, if the corresponding termcap capabilities
10352 are present.
10353
10354------------------------------------------------------------------------------
10355This document details the changes between this version, bash-2.0-beta3,
10356and the previous version, bash-2.0-beta2.
10357
103581. Changes to Bash
10359
10360a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX.
10361
10362b. When in POSIX mode, variable assignments preceding a special builtin
10363 persist in the shell environment after the builtin completes.
10364
10365c. Changed all calls to getwd() to getcwd(). Improved check for systems
10366 where the libc getcwd() calls popen(), since that breaks on some
10367 systems when job control is being used.
10368
10369d. Fixed a bug that caused seg faults when executing scripts with the
10370 execute bit set but without a leading `#!'.
10371
10372e. The environment passed to executed commands is never sorted.
10373
10374f. A bug was fixed in the code that expands ${name[@]} to the number of
10375 elements in an array variable.
10376
10377g. A bug was fixed in the array compound assignment code ( A=( ... ) ).
10378
10379h. Window size changes now correctly propagate down to readline if
10380 the shopt `checkwinsize' option is enabled.
10381
10382i. A fix was made in the code that expands to the length of a variable
10383 value (${#var}).
10384
10385j. A fix was made to the command builtin so that it did not turn on the
10386 `no fork' flag inappropriately.
10387
10388k. A fix was made to make `set -n' work more reliably.
10389
10390l. A fix was made to the job control initialization code so that the
10391 terminal process group is set to the shell's process group if the
10392 shell changes its own process group.
10393
103942. Changes to Readline
10395
10396a. System-specific changes for: SCO 3.2v[45].
10397
10398b. The behavior of the vi-mode `.' when redoing an `i' command was changed
10399 to insert the text previously inserted by the `i' command rather than
10400 simply entering insert mode.
10401
104023. New features in Bash
10403
10404a. There is a new version of the autoload function package, in
10405 examples/functions/autoload.v2, that uses arrays and provides more
10406 functionality.
10407
10408b. Support for LC_COLLATE and locale-specific sorting of the results of
10409 pathname expansion if strcoll() is available.
10410
104114. New Features in Readline
10412
10413a. Support for locale-specific sorting of completion possibilities if
10414 strcoll() is available.
10415
10416------------------------------------------------------------------------------
10417This document details the changes between this version, bash-2.0-beta2,
10418and the previous version, bash-2.0-beta1.
10419
104201. Changes to Bash
10421
10422a. `pushd -' is once again equivalent to `pushd $OLDPWD'.
10423
10424b. OS-specific changes for: SCO 3.2v[45].
10425
10426c. A change was made to the fix for the recently-reported security hole
10427 when reading characters with octal value 255 to make it work better on
10428 systems with restartable system calls when not using readline.
10429
10430d. Some changes were made to the test suite so that it works if you
10431 configure bash with --enable-usg-echo-default.
10432
10433e. A fix was made to the parsing of conditional arithmetic expressions.
10434
10435f. Illegal arithmetic bases now cause an arithmetic evaluation error rather
10436 than being silently reset.
10437
10438g. Multiple arithmetic bases now cause an arithmetic evaluation error
10439 instead of being ignored.
10440
10441h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2.
10442
10443i. A bug that sometimes caused array indices to be evaluated twice (which
10444 would cause errors when they contained assignment statements) was fixed.
10445
10446j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning
10447 unsigned values and to simplify the code.
10448
10449k. A bug in the command-oriented-history code that caused it to sometimes
10450 put semicolons after right parens inappropriately was fixed.
10451
10452l. The values inserted into the prompt by the \w and \W escape sequences
10453 are now quoted to prevent further expansion.
10454
10455m. An interactive shell invoked as `sh' now reads and executes commands
10456 from the file named by $ENV when it starts up. If it's a login shell,
10457 it does this after reading /etc/profile and ~/.profile.
10458
10459n. The file named by $ENV is never read by non-interactive shells.
10460
104612. Changes to Readline
10462
10463a. A few changes were made to hide some macros and functions that should not
10464 be public.
10465
10466b. An off-by-one error that caused seg faults in the history expansion code
10467 was fixed.
10468
104693. New Features in Bash
10470
10471a. The ksh-style ((...)) arithmetic command was implemented. It is exactly
10472 identical to let "...". This is controlled by a new option to configure,
10473 `--enable-dparen-arithmetic', which is on by default.
10474
10475b. There is a new #define available in config.h.top: SYS_BASH_LOGOUT. If
10476 defined to a filename, bash reads and executes commands from that file
10477 when a login shell exits. It's commented out by default.
10478
10479c. `ulimit' has a `-l' option that reports the maximum amount of data that
10480 may be locked into memory on 4.4BSD-based systems.
10481
10482------------------------------------------------------------------------------
10483This document details the changes between this version, bash-2.0-beta1,
10484and the previous version, bash-2.0-alpha4.
10485
104861. Changes to Bash
10487
10488a. A bug that sometimes caused traps to be ignored on signals the
10489 shell treats specially was fixed.
10490
10491b. The internationalization code was changed to track the values of
10492 LC_* variables and call setlocale() as appropriate. The TEXTDOMAIN
10493 and TEXTDOMAINDIR variables are also tracked; changes cause calls
10494 to textdomain() and bindtextdomain(), if available.
10495
10496c. A bug was fixed that sometimes caused double-quoted strings to be
10497 parsed incorrectly.
10498
10499d. Changes were made so that the siglist code compiles correctly on
10500 Solaris 2.5.
10501
10502e. Added `:' to the set of characters that cause word breaks for the
10503 completion code so that pathnames in assignments to $PATH can be
10504 completed.
10505
10506f. The `select' command was fixed to print $PS3 to stderr.
10507
10508g. Fixed an error in the manual page section describing the effect that
10509 setting and unsetting GLOBIGNORE has on the setting of the `dotglob'
10510 option.
10511
10512h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC
10513 on systems without gettimeofday() and resources.
10514
10515i. The getopt static variables are now initialized each time a subshell
10516 is started, so subshells using `getopts' work right.
10517
10518j. A sign-extension bug that caused a possible security hole was fixed.
10519
10520k. The parser now reads characters between backquotes within a double-
10521 quoted string as a single word, so double quotes in the backquoted
10522 string don't terminate the enclosing double-quoted string.
10523
10524l. A bug that caused `^O' to work incorrectly when typed as the first
10525 thing to an interactive shell was fixed.
10526
10527m. A rarely-exercised off-by-one error in the code that quotes variable
10528 values was fixed.
10529
10530n. Some memory and file descriptor leaks encountered when running a
10531 shell script that is executable but does not have a leading `#!'
10532 were plugged.
10533
105342. Changes to Readline
10535
10536a. A bug that sometimes caused incorrect results when trying to read
10537 typeahead on systems without FIONREAD was fixed.
10538
105393. New Features in Bash
10540
10541a. The command timing code now uses the value of the TIMEFORMAT variable
10542 to format and display timing statistics.
10543
10544b. The `time' reserved word now accepts a `-p' option to force the
10545 POSIX.2 output format.
10546
10547c. There are a couple of new and updated scripts to convert csh startup
10548 files to bash format.
10549
10550d. There is a new builtin array variable: BASH_VERSINFO. The various
10551 members hold the parts of the version information in BASH_VERSION,
10552 plus the value of MACHTYPE.
10553
105544. New Features in Readline
10555
10556a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter
10557 eight-bit mode.
10558
10559------------------------------------------------------------------------------
10560This document details the changes between this version, bash-2.0-alpha4,
10561and the previous version, bash-2.0-alpha3.
10562
105631. Changes to Bash
10564
10565a. There is better detection of rsh connections on Solaris 2.
10566
10567b. Assignments to read-only variables preceding a command name are now
10568 variable assignment errors. Variable assignment errors cause
10569 non-interactive shells running in posix mode to exit.
10570
10571c. The word tokenizer was rewritten to handle nested quotes and pairs
10572 ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...))
10573 correctly. Some of the parameter expansion code was updated as a
10574 consequence.
10575
10576d. A fix was made to `test' when given three arguments so that a binary
10577 operator is checked for first, before checking that the first argument
10578 is `!'.
10579
10580e. 2''>/dev/null is no longer equivalent to 2>/dev/null.
10581
10582f. Parser error messages were regularized, and in most cases the name of
10583 the shell script being read by a non-interactive shell is not printed
10584 twice.
10585
10586g. A fix was made to the completion code so that it no longer removes the
10587 text the user typed in some cases.
10588
10589h. The special glibc `getopt' environment variable is no longer put into
10590 the environment on machines with small values of ARG_MAX.
10591
10592i. The expansion of ${...} now follows the POSIX.2 rules for finding the
10593 closing `}'.
10594
10595j. The shell no longer displays spurious status messages for background
10596 jobs in shell scripts that complete successfully when the script is
10597 run from a terminal.
10598
10599k. `shopt -o' now correctly updates $SHELLOPTS.
10600
10601l. A bug that caused the $PATH searching code to return a non-executable
10602 file even when an executable file with the same name appeared later in
10603 $PATH was fixed.
10604
10605m. The shell now does tilde expansions on unquoted `:~' in assignment
10606 statements when not in posix mode.
10607
10608n. Variable assignment errors when a command consists only of assignments
10609 now cause non-interactive shells to exit when in posix mode.
10610
10611o. If the variable in a `for' or `select' command is read-only, or not a
10612 legal shell identifier, a variable assignment error occurs.
10613
10614p. `test' now handles `-a' and `-o' as binary operators when three arguments
10615 are supplied, and correctly parses `( word )' as equivalent to `word'.
10616
10617q. `test' was fixed so that file names of the form /dev/fd/NN mean the same
10618 thing on all systems, even Linux.
10619
10620r. Fixed a bug in the globbing code that caused patterns with multiple
10621 consecutive `*'s to not be matched correctly.
10622
10623s. Fixed a bug that caused $PS2 to not be printed when an interactive shell
10624 not using readline is reading a here document.
10625
10626t. Fixed a bug that caused history expansion to be performed inappropriately
10627 when a single-quoted string spanned more than one line.
10628
10629u. `getopts' now checks that the variable name passed by the user as the
10630 second argument is a legal shell identifier and that the variable is
10631 not read-only.
10632
10633v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it
10634 encounters an error.
10635
10636w. Fixed `set' to display variable values in a form that can be re-read.
10637
10638x. Fixed a bug in the code that keeps track of whether or not local variables
10639 have been declared at the current level of function nesting.
10640
10641y. Non-interactive shells in posix mode now exit if the name in a function
10642 declaration is not a legal identifier.
10643
10644z. The job control code now ignores stopped children when the shell is not
10645 interactive.
10646
10647aa. The `cd' builtin no longer attempts spelling correction on the directory
10648 name if the shell is not interactive, regardless of the setting of the
10649 `cdspell' option.
10650
10651bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2.
10652
10653cc. `time' now prints its output to stderr, as POSIX.2 specifies.
10654
106552. Fixes to Readline
10656
10657a. After printing possible completions, all lines of a multi-line prompt
10658 are redisplayed.
10659
10660b. Some changes were made to the terminal handling code in rltty.c to
10661 work around AIX 4.2 bugs.
10662
106633. New Features in Bash
10664
10665a. There is a new loadable builtin: sprintf, with calling syntax
10666 sprintf var format [args]
10667 This provides an easy way to simulate ksh left- and right-justified
10668 variable values.
10669
10670b. The expansions of \h and \H in prompt strings were swapped. \h now
10671 expands to the hostname up to the first `.', as in bash-1.14.
10672
106734. New Features in Readline
10674
10675a. The bash-1.14 behavior when ^M is typed while doing an incremental
10676 search was restored. ^J may now be used to terminate the search without
10677 accepting the line.
10678
10679b. There is a new bindable variable: disable-completion. This inhibits
10680 word completion and causes the completion character to be inserted as
10681 if it had been bound to self-insert.
10682
10683------------------------------------------------------------------------------
10684This document details the changes between this version, bash-2.0-alpha3,
10685and the previous version, bash-2.0-alpha2.
10686
10687There is now a file `COMPAT' included in the distribution that lists the
10688user-visible incompatibilities between 1.14 and 2.0.
10689
106901. Changes to Bash
10691
10692a. Some work was done so that word splitting of the rhs of assignment
10693 statements conforms more closely to historical practice.
10694
10695b. A couple of errant memory frees were fixed.
10696
10697c. A fix was made to the test builtin so it recognizes `<' and `>' as
10698 binary operators.
10699
10700d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's
10701 allocated and freed. This is to catch callers that refer to freed
10702 memory or assume something about newly-allocated memory.
10703
10704e. Fixed a problem with conversion to 12-hour time in the prompt
10705 expansion code.
10706
10707f. Fixed a problem with configure's argument parsing order. Now you can
10708 correctly turn on specific options after using --enable-minimal-config.
10709
10710g. The configure script now automatically disables the use of GNU malloc
10711 on systems where it's appropriate (better than having people read the
10712 NOTES file and do it manually).
10713
10714h. There are new prompt expansions (\v and \V) to insert version information
10715 into the prompt strings.
10716
10717i. The default prompt string now includes the version number.
10718
10719j. Most of the builtins that take no options were changed to use the
10720 internal getopt so they can produce proper error messages for -?
10721 and incorrect options.
10722
10723k. Some system-specific changes were made for SVR4.2 and Solaris 2.5.
10724
10725l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of
10726 MAXNAMLEN.
10727
10728m. A couple of problems caused by uninitialized variables were fixed.
10729
10730n. There are a number of new loadable builtin examples: logname, basename,
10731 dirname, tty, pathchk, tee, head, and rmdir. All of these conform to
10732 POSIX.2.
10733
10734o. Bash now notices changes in TZ and calls tzset() if present, so
10735 changing TZ will alter the time printed by prompt expansions.
10736
10737p. The source was reorganized a bit so I don't have to wait so long for
10738 some files to compile, and to facilitate the creation of a `shell
10739 library' at some future point.
10740
10741q. Bash no longer turns off job control if called as `sh', since the
10742 POSIX.2 spec includes job control as a standard feature.
10743
10744r. `bash -o posix' now works as intended.
10745
10746s. Fixed a problem with the completion code: when completing a filename
10747 that contained globbing characters, if show-all-if-ambiguous was set,
10748 the completion code would remove the user's text.
10749
10750t. Fixed ulimit so that (hopefully) the full range of limits is available
10751 on HPUX systems.
10752
10753u. A new `shopt' option (`hostcomplete') enables and disables hostname
10754 completion.
10755
10756v. The shell no longer attempts to save the history on an abort(),
10757 which is usually called by programming_error().
10758
10759w. The `-s' option to `fc' was changed to echo the command to be executed
10760 to stderr instead of stdout.
10761
10762x. If the editor invoked by `fc -e' exits with a non-zero status, no
10763 commands are executed.
10764
10765y. Fixed a bug that made the shopt `histverify' option work incorrectly.
10766
10767z. There is a new variable `MACHTYPE' whose value is the GNU-style
10768 `cpu-company-system' system description as set by configure. (The
10769 values of MACHTYPE and HOSTTYPE should really be swapped.)
10770
10771aa. The `ulimit' builtin now allows the maximum virtual memory size to be
10772 set via setrlimit(2) if RLIMIT_VMEM is defined.
10773
10774bb. `bash -nc 'command'' no longer runs `command'.
10775
107762. Changes to Readline
10777
10778a. Fixed a typo in the code that checked for FIONREAD in input.c.
10779
10780b. Fixed a bug in the code that outputs keybindings, so things like C-\
10781 are quoted properly.
10782
10783c. Fixed a bug in the inputrc file parsing code to handle the problems
10784 caused by inputrc files created from the output of `bind -p' in
10785 previous versions of bash. The problem was due to the bug fixed
10786 in item b above.
10787
10788d. Readline no longer turns off the terminal's meta key, and turns it on
10789 once the first time it's called.
10790
10791------------------------------------------------------------------------------
10792This file documents the changes between this version, bash-2.0-alpha2,
10793and the previous version, bash-2.0-alpha.
10794
107951. Changes to Bash
10796
10797a. The shell no longer thinks directories are executable.
10798
10799b. `disown' has a new option, `h', which inhibits the resending of SIGHUP
10800 but does not remove the job from the jobs table.
10801
10802c. The varargs functions in error.c now use ANSI-C `stdarg' if available.
10803
10804d. The build process now treats the `build version' in .build as local to
10805 the build directory, so different versions built from the same source
10806 tree have different `build versions'.
10807
10808e. Some problems with the grammar have been fixed. (It used `list' in a few
10809 productions where `compound_list' was needed. A `list' must be terminated
10810 with a newline or semicolon; a `compound_list' need not be.)
10811
10812f. A fix was made to keep `wait' from hanging when waiting for all background
10813 jobs.
10814
10815g. `bash --help' now writes its output to stdout, like the GNU Coding Standards
10816 specify, and includes the machine type (the value of MACHTYPE).
10817
10818h. `bash --version' now prints more information and exits successfully, like
10819 the GNU Coding Standards specify.
10820
10821i. The output of `time' and `times' now prints fractional seconds with three
10822 places after the decimal point.
10823
10824j. A bug that caused process substitutions to screw up the pipeline printed
10825 by `jobs' was fixed.
10826
10827k. Fixes were made to the code that implements $'...' and $"..." so they
10828 work as documented.
10829
10830l. The process substitution code now opens named pipes for reading with
10831 O_NONBLOCK to avoid hanging.
10832
10833m. Fixes were made to the trap code so the shell cleans up correctly if the
10834 trap command contains a `return' and we're executing a function or
10835 sourcing a script with `.'.
10836
10837n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the
10838 documentation (ps, dvi, etc.) on a `make install'.
10839
10840o. Fixed an auto-increment error that caused bash -c args to sometimes dump
10841 core.
10842
10843p. Fixed a bug that caused $HISTIGNORE to fail when the history line
10844 contained globbing characters.
10845
108462. Changes to Readline
10847
10848a. There is a new string variable, rl_library_version, available for use by
10849 applications. The current value is "2.1".
10850
10851b. A bug encountered when expand-tilde was enabled and file completion was
10852 attempted on a word beginning with `~/' was fixed.
10853
10854c. A slight change was made to the incremental search termination behavior.
10855 ESC still terminates the search, but if input is pending or arrives
10856 within 0.1 seconds (on systems with select(2)), it is used as a prefix
8868edaf 10857 character. This is intended to allow users to terminate searches with
ccc6cda3 10858 the arrow keys and get the behavior they expect.