1 This document details the changes between this version, bash-5.2-release, and
2 the previous version, bash-5.2-rc4.
8 a. 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
12 3. New Features in Bash
14 4. New Features in Readline
16 ------------------------------------------------------------------------------
17 This document details the changes between this version, bash-5.2-rc4, and
18 the previous version, bash-5.2-rc3.
22 a. Changed how the compatibility mode enabling of extglob works in conjunction
23 with parsing conditional commands.
25 b. Fixed a problem with aliases containing command substitutions.
27 2. Changes to Readline
29 3. New Features in Bash
31 4. New Features in Readline
33 ------------------------------------------------------------------------------
34 This document details the changes between this version, bash-5.2-rc3, and
35 the previous version, bash-5.2-rc2.
39 a. 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
44 b. Fixed an issue with handling a `return' executed in a trap action if the
45 trap is executed while running in a shell function.
47 2. Changes to Readline
49 3. New Features in Bash
51 4. New Features in Readline
53 a. 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.
57 ------------------------------------------------------------------------------
58 This document details the changes between this version, bash-5.2-rc2, and
59 the previous version, bash-5.2-rc1.
63 a. Fixed a bug that could disable history saving after a compound array
64 assignment in an interactive shell.
66 b. Fixed a bug that could cause incorrect error messages when running a DEBUG
67 trap during a conditional or arithmetic command.
69 c. Fixed a bug that caused test to print an error message when given ! ! arg
72 d. Fixed a bug that resulted in incorrect error messages when completing a
73 backquoted command substitution.
75 e. Changed command substitution parsing to reproduce the original text more
76 closely when reconsituting the command string from the parsed command.
78 f. Fixed a bug that could cause an EXIT trap to use the wrong variable context
79 when the errexit option is set.
81 g. Fixed a bug that could cause the parser to incorrectly delimit a token when
82 an alias expansion ended with a multibyte character.
84 2. Changes to Readline
86 3. New Features in Bash
88 a. Since there is no `declare -' equivalent of `local -', make sure to use
89 `local -' in the output of `local -p'.
91 b. Null anchored matches in pattern substitution now process `&' in the
92 replacement string, like sed.
94 4. New Features in Readline
96 ------------------------------------------------------------------------------
97 This document details the changes between this version, bash-5.2-rc1, and
98 the previous version, bash-5.2-beta.
102 a. Changes to `wait -p' and how it sets the variable name in the presence of
103 valid and invalid PID arguments.
105 b. Fixed a bug that caused compgen to dump core if the completion engine was
108 c. Fixed a memory leak in the variable name programmable completion code.
110 d. Here-documents and here-strings use tempfiles if the shell compatibility
111 level is 50 or lower.
113 e. Non-interactive shells exit on a syntax error encountered while parsing a
114 command substitution.
116 f. Fixed a bug with inherited parser state while parsing a command substitution.
118 g. 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
122 h. Changes to avoid a make race condition while generating builtins.c.
124 i. Make it explicit that BASH_REMATCH is always a global variable, and that
125 local copies are (currently) ignored.
127 j. Fixed a bug that caused an ambiguous redirection (>&word) to be printed
128 incorrectly (>&word) if no file descriptor was supplied.
130 2. Changes to Readline
132 a. Fixed a bug that caused rl_eof_found to be set prematurely while reading a
133 multi-character key sequence in callback mode.
135 3. New Features in Bash
137 a. 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,
141 b. The `globbing' completion code now takes the `globstar' option into account.
143 c. `suspend -f' now forces the shell to suspend even if job control is not
146 4. New Features in Readline
148 ------------------------------------------------------------------------------
149 This document details the changes between this version, bash-5.2-beta, and
150 the previous version, bash-5.2-alpha.
154 a. Fixed a problem with command-oriented history and multi-line commands that
155 caused embedded blank lines to be run together.
157 b. Changed the way `&' is quoted when performing pattern substitution and
158 `patsub_replacement' is enabled.
160 c. Fixed some integer overflows when expanding strings or reading the output
161 of command substitution larger than 2GB.
163 d. `wait -p' without the `-n' option now does something useful if there are no
166 e. Fixed an issue with read timeouts in posix mode.
168 f. 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.
172 g. Changed alias expansion in command substitution to be posix-conformant
173 (performed while initially parsing the command substitution) when in posix
176 h. Bash optimizes away more forks in subshells.
178 i. 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.
182 j. 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.
186 k. Fixed a problem with SIGINT during the execution of a command bound with
187 `bind -x' affecting the saved terminal settings.
189 l. Fixed an inconsistency with how $@ expands in a construct like ${@:+set}
190 or ${array[@]:+set} in the presence of null positional parameters or
193 2. Changes to Readline
195 a. 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.
198 b. Fixed an issue with multi-line prompt strings that have one or more
199 invisible characters at the end of a physical line.
201 c. Fixed an issue that caused a history line's undo list to be cleared when
202 it should not have been.
204 3. New Features in Bash
206 a. There is a new bindable readline command name: `vi-edit-and-execute-command'.
208 4. New Features in Readline
210 a. 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.
215 b. 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.
219 c. 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.
223 ------------------------------------------------------------------------------
224 This document details the changes between this version, bash-5.2-alpha, and
225 the previous version, bash-5.1-release.
229 a. Fixed a bug that assigned a value to the variable name supplied as an
230 argument to `wait -p' when there were no jobs.
232 b. Fixed a bug that resulted in performing incorrect word expansion on the
233 key/value pairs in a compound array assignment.
235 c. Fixed a bug that could put the child forked to run a command substitution
236 into the wrong process group.
238 d. Fixed a problem that could cause the lastpipe option to work incorrectly if
239 file descriptor 0 was closed.
241 e. Bash tries to suppress traps if a forked child receives a trapped signal
242 before it has a chance to reset its signal handlers.
244 f. Fixed several memory leaks in compound array assignments.
246 g. Fixed a problem with performing an assignment with `+=' to an array element
247 that was the value of a nameref.
249 h. Fixed a bug that could cause a nameref containing an array reference using
250 `@' or `*' not to expand to multiple words.
252 i. Fixed a bug where extended glob functions could match `.' or `..' when it
253 wasn't explicitly specified, even if dotglob was set.
255 j. 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.
258 k. Fixed a bug that caused parsing errors if an alias contained a compound
261 l. 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
265 m. Fixed a parser problem that caused it not to allow reserved words to follow
266 the `((' and `[[' commands.
268 n. Fixed a bad offset calculation when using negative offsets to `history -d'.
270 o. 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.
273 p. Fixed a problem with a failed `exec' command not setting $? to the right
274 value for an exit trap.
276 q. Fixed a problem that caused bash not to unlink FIFOs created as part of
277 expanding redirections for an external command.
279 r. Fixed a bug that could cause aliases not to be expanded in case statements.
281 s. Fixed a bug that could cause word completion to attempt programmable
282 completion for the target of a redirection, instead of filename completion.
284 t. Fixed a bug that could result in errors after rebinding a key sequence with
285 `bind -x' multiple times.
287 u. 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.
290 v. `mapfile' now uses fully-buffered reads in more cases, which should improve
291 bulk read performance.
293 w. Fixed a bug that caused `wait -n' to not reset its internal state when
294 interrupted by a signal, resulting in subsequent calls failing.
296 x. Fixed a bug with parsing numeric arguments to readline key sequences
297 installed with `bind -x'.
299 y. Bash suppresses forking in several additional cases, including most uses
302 z. If there are multiple `!' tokens in a [[ command, toggle the invert state
303 instead of setting it unconditionally.
305 aa. Fixed a bug where running `fc' on an empty history list would cause the
308 bb. 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.
312 cc. Fixed a typo that translated \UNNNNNNNN characters that were not valid in
313 the current locale encoding as \uNNNNNNNN.
315 dd. Fixed an issue that could cause bash to print timing statistics for the
316 wrong command when `set -e' causes a command to fail.
318 ee. Bash now runs the exit trap in function context if a failed command in
319 the function causes the shell to exit.
321 ff. Some fixes to how subshells modify $SHLVL.
323 gg. Fixed a bug that caused `mapfile -t' not to remove the delimiter when the
324 delimiter is > 128 in the current encoding.
326 hh. Fixed a problem that could cause the shell to attempt to free unallocated
327 memory if an expansion error occurred.
329 ii. 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
333 jj. If the `exec' builtin fails, and the shell does not exit, it restores
334 trapped signals to their trapped state.
336 kk. 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.
339 ll. Fixed a bug with LINENO and arithmetic for commands.
341 mm. 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.
344 nn. Fixed a problem with `caller' and line numbers when executing an ERR trap.
346 oo. 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).
350 pp. 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.
353 qq. Fixed a bug with using += to assign to dynamic variables like RANDOM.
355 rr. Fixed a bug that caused `set -n' to modify $? if set after execution had
358 ss. Builtins like printf/read/wait now behave more consistently when assigning
359 arbitrary keys to associative arrays (like `]'. when appropriately quoted).
361 tt. Fixed a problem with here-document collection printing the wrong prompt
362 when parsing a compound list in an interactive shell.
364 uu. 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).
368 2. Changes to Readline
370 a. Fixed a problem with cleaning up active marks when using callback mode.
372 b. Fixed a problem with arithmetic comparison operators checking the version.
374 c. Fixed a problem that could cause readline not to build on systems without
375 POSIX signal functions.
377 d. Fixed a bug that could cause readline to crash if the application removed
378 the callback line handler before readline read all typeahead.
380 e. Added additional checks for read errors in the middle of readline commands.
382 f. 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.
386 g. Fixed a problem with restoring the prompt when aborting an incremental
389 h. Fix a problem with characters > 128 not being displayed correctly in certain
390 single-byte encodings.
392 i. 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.
395 j. 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.
399 k. Fixed a problem that caused the \r output by turning off bracketed paste
400 to overwrite the line if terminal echo was disabled.
402 l. Fixed a bug that could cause colored-completion-prefix to not display if
403 completion-prefix-display-length was set.
405 m. 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.
409 n. Fixed a couple problems that could cause rl_end to be set incorrectly by
412 3. New Features in Bash
414 a. The bash malloc returns memory that is aligned on 16-byte boundaries.
416 b. There is a new internal timer framework used for read builtin timeouts.
418 c. 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.
425 d. 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.
429 e. Here-document parsing now handles $'...' and $"..." quoting when reading the
432 f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline
433 commands now understand $'...' and $"..." quoting.
435 g. There is a new `spell-correct-word' bindable readline command to perform
436 spelling correction on the current word.
438 h. The `unset' builtin now attempts to treat arguments as array subscripts
439 without parsing or expanding the subscript, even when `assoc_expand_once'
442 i. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
444 j. Associative array assignment and certain instances of referencing (e.g.,
445 `test -v') now allow `@' and `*' to be used as keys.
447 k. Bash attempts to expand indexed and associative array subscripts only
448 once when executing shell constructs and word expansions.
450 l. 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=()').
455 m. Additional builtins (printf/test/read/wait) do a better job of not
456 parsing array subscripts if array_expand_once is set.
458 n. New READLINE_ARGUMENT variable set to numeric argument for readline commands
459 defined using `bind -x'.
461 o. 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.
465 p. 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.
468 q. 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.
472 r. 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.
476 s. The new `noexpand_translations' option controls whether or not the translated
477 output of $"..." is single-quoted.
479 t. There is a new parameter transformation operator: @k. This is like @K, but
480 expands the result to separate words after word splitting.
482 u. 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).
486 v. 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
490 w. Invalid parameter transformation operators are now invalid word expansions,
491 and so cause fatal errors in non-interactive shells.
493 x. 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 `&'.
498 y. `command -p' no longer looks in the hash table for the specified command.
500 z. The new `--enable-translatable-strings' option to `configure' allows $"..."
501 support to be compiled in or out.
503 aa. The new `globskipdots' shell option forces pathname expansion never to
504 return `.' or `..' unless explicitly matched. It is enabled by default.
506 bb. 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.
510 4. New Features in Readline
512 a. There is now an HS_HISTORY_VERSION containing the version number of the
513 history library for applications to use.
515 b. History expansion better understands multiple history expansions that may
516 contain strings that would ordinarily inhibit history expansion (e.g.,
519 c. 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.
524 d. Automatically bind termcap key sequences for page-up and page-down to
525 history-search-backward and history-search-forward, respectively.
527 e. 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.
531 f. `vi-undo' is now a bindable command.
533 g. 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
539 h. rl_completer_word_break_characters is now `const char *' like
540 rl_basic_word_break_characters.
542 i. 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.
546 ------------------------------------------------------------------------------
547 This document details the changes between this version, bash-5.1-rc3, and
548 the previous version, bash-5.1-rc2.
552 a. The `assoc_expand_once' option now affects the evaluation of the -v primary
553 to test and the [[ compound command.
555 2. Changes to Readline
557 a. Fixed a bug that could cause point to be set beyond the end of the line
558 buffer when aborting an incremental search.
560 3. New Features in Bash
562 4. New Features in Readline
564 ------------------------------------------------------------------------------
565 This document details the changes between this version, bash-5.1-rc2, and
566 the previous version, bash-5.1-rc1.
570 a. Process substitutions started from an interactive shell no longer have their
571 standard input implicitly redirected from /dev/null.
573 b. Fixed an issue with setting the SIGINT trap handler in an interactive shell
574 when temporarily running $PROMPT_COMMAND non-interactively.
576 2. Changes to Readline
578 a. Terminals that are named "dumb" or unknown do not enable bracketed paste
581 b. Ensure that disabling bracketed paste turns off highlighting the incremental
582 search string when the search is successful.
584 3. New Features in Bash
586 4. New Features in Readline
588 ------------------------------------------------------------------------------
589 This document details the changes between this version, bash-5.1-rc1, and
590 the previous version, bash-5.1-beta.
594 a. Fixed an inconsistency in the way HISTCMD is calculated when it's expanded
595 during a multi-line command.
597 b. Modified the change to here-document expansion containing backslash-quoted
600 c. Fixed a case where the shells's exit status could be greater than 255.
602 d. 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.
606 2. New Features in Bash
608 a. There is a new contributed loadable builtin: asort.
610 3. Changes to Readline
612 a. 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
616 4. New Features in Readline
618 ------------------------------------------------------------------------------
619 This document details the changes between this version, bash-5.1-beta, and
620 the previous version, bash-5.1-alpha.
624 a. Fixed a bug that caused name references to variables to not update the
625 referenced variable's assignment side effects.
627 b. Tightened up the parameter transformation error checking for invalid
628 transformation operators.
630 c. System-specific changes for: FreeBSD
632 d. A few minor changes to move potential uses of stdio functions out of signal
635 e. Make sure SIGCHLD is blocked in all cases where waitchld() is not called
636 from a signal handler.
638 f. Changed `command' builtin processing so it no longer starts an extra process
639 when run asynchronously (command x &).
641 g. Avoid performing tilde expansion after `:' in words that look like assignment
642 statements when in posix mode.
644 h. Slight changes to how the `complete' builtin prints out options and actions
645 for completion specifications.
647 i. Several changes to how `local -' restores the values of options and
650 j. Don't treat a word in a compound assignment as an assignment statement
651 unless it has a valid subscript before the `='.
653 k. Fixed a bug with the DEBUG trap and process substitution that caused the
654 terminal's process group to be set incorrectly.
656 l. Fixed a bug that left readline's signal handlers installed while running a
657 shell command from a bindable readline command.
659 m. Fixed the `fc' builtin to clamp out of range history specifications at the
660 boundaries of the history list for POSIX conformance.
662 n. 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
666 o. 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.
670 p. Fixed a bug that could cause a syntax error in a command read by `eval' to
671 exit an interactive shell.
673 2. New Features in Bash
675 a. If the hash builtin is listing hashed filenames portably, don't print
676 anything if the table is empty.
678 b. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component.
680 c. Bash attempts to optimize away forks in the last command in a function body
681 under appropriate circumstances.
683 d. The globbing code now uses fnmatch(3) to check collation elements (if
684 available) even in cases without multibyte characters.
686 e. 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.
689 f. The shell now attempts to unlink all FIFOs on exit, whether a consuming
690 process has finished with them or not.
692 3. Changes to Readline
694 a. Make sure that all undo groups are closed when leaving vi insertion mode.
696 b. Make sure that the vi-mode `C' and `c' commands enter insert mode even if
697 the motion command doesn't have any effect.
699 c. Fixed several potential memory leaks in the callback mode context handling.
701 d. 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
705 4. New Features in Readline
707 a. The signal cleanup code now blocks SIGINT while processing after a SIGINT.
709 ------------------------------------------------------------------------------
710 This document details the changes between this version, bash-5.1-alpha, and
711 the previous version, bash-5.0-release.
715 a. 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.
718 b. Fixed a bug where `declare +f' could potentially turn off the function
721 c. 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).
725 d. There are more changes to avoid performing word expansions multiple times on
726 arithmetic expressions.
728 e. Fixed a bug with alias expansion when the alias ends with a TAB.
730 f. 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.
733 g. There are several fixes to buffer overflows found as the result of fuzzing
736 h. 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.
739 i. Fixed a bug that potentially caused `bind --help' to change readline's
742 j. Turning off posix mode now restores the vi-insertion mode binding for TAB
743 that was in effect when posix mode was enabled.
745 k. Restore the previous state of job control being enabled if `exec' fails in
746 an interactive shell.
748 l. 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.
751 m. Fixed a bug that caused a crash when HISTSIZE=0.
753 n. Fixed a word expansion bug that caused null strings on the rhs of expansions
754 to be discarded incorrectly.
756 o. 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.
760 p. Fixed a bug that caused the `fc' builtin to attempt to dereference a newly-
763 q. Fixed a bug that made the `Q' variable transformation not work well with
766 r. 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.
770 s. Fixed a bug that could cause ^D to exit bash immediately even if there were
773 t. Fixed a bug with double-quoting and backslash-quoting strings containing
774 multibyte characters for reuse.
776 u. Fixed a bug that caused the line number to be reported incorrectly if the
777 shell executed a (command) subshell.
779 v. Fixed a bug that caused the shell to fail to reap process substitutions
780 when they went out of scope, which had unpredictable results.
782 w. Fixed a bug that caused null strings in arguments to [[ conditional command
783 operators to compare incorrectly.
785 x. Changed the behavior of `wait' without arguments to only wait for background
786 processes the current shell instance started, not background children it may
789 y. Fixed a bug that could cause command substitution to leave file descriptors
790 open if the shell received many SIGINTs.
792 z. Bash now behaves better if the `**' filename expansion operator encounters a
793 symbolic link to a directory, avoiding more cases where it might return
796 aa. Programmable completion now canonicalizes directory names in the same way
797 as bash word completion, so `..' is handled consistently.
799 bb. Fixed a bug when using RETURN as the delimiter to the read builtin; it
800 caused readline to set the binding for RETURN incorrectly.
802 cc. Fixed a bug that caused `history -d' to delay printing an out-of-range
805 dd. Fixed a bug with `bash -c command' where `command' ends with an expanded
808 ee. Fixed a bug that could result in `history -n' adding spurious line feeds to
809 commands in the history list.
811 ff. 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.
815 gg. Fixed several problems caused by running the DEBUG trap on simple commands
816 executed as part of a pipeline.
818 ii. Fixed a bug that didn't allow `bind -r' to remove the binding for \C-@.
820 jj. Several fixes to the bash-backward-shellword bindable readline command to
821 behave better when at the last character on the line.
823 kk. If `set -x' is enabled, bash doesn't print a command twice if it's run by
824 the `command' builtin.
826 ll. Fixed a bug with printing function definitions containing here documents.
828 mm. Fixed a bug that could cause the `bind' builtin to set $? to -1.
830 nn. Fixed a bug that didn't reset the timezone information correctly when the
831 TZ variable was unset.
833 oo. Fixed several issues with assigning an associative array variable using a
834 compound assignment that expands the value of the same variable.
836 pp. Fixed several places where the shell set $? without setting PIPESTATUS.
838 qq. 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.
842 rr. Fixed a bug where running a builtin in a subshell did not run the EXIT trap.
844 ss. 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.
848 tt. Fix history initialization so `bash +o history' works as expected.
850 uu. Fixed a bug in the bindable edit-and-execute-command command that could
851 interfere with the shell's parsing state.
853 vv. Fixed an issue with nested traps running command substitutions in command
854 lines with command substitutions.
856 ww. Fixed a bug with globbing pathnames that contain invalid multibyte
857 characters (sequences that don't correspond to a character in the current
860 xx. Fixed a bug that caused the shell not to exit if a function definition
861 failed while errexit was enabled.
863 yy. Process substitution processes now get their input from /dev/null, since
864 they are asynchronous, not interactive, and not jobs.
866 zz. Setting nocaseglob no longer turns on case-insensitive regexp matching.
868 aaa. Fixed a bug that resulted in extra blank lines being added to some history
869 entries containing here-documents.
871 bbb. Fixed a bug that resulted in incorrect matching of some patterns in word
872 expansion if they expanded to the empty string.
874 ccc. Fixed here-string expansion so it behaves the same as expansion of the
875 rhs of an assignment statement.
877 ddd. Changed here-document parsing to no longer allow the end of the here
878 document to delimit a command substitution.
880 eee. 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 `!'.
884 fff. Fixed a bug in pattern substitution with null matches in a string
885 containing multibyte characters.
887 ggg. Unbinding a key sequence bound with `bind -x' now removes the key sequence
888 from the additional keymap `bind -x' uses.
890 hhh. Fixed a bug with command start detection for completion so that it doesn't
891 mistake brace expansion for the start of a command.
893 iii. 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.
896 jjj. Fixed a bug that could cause SIGCHLD to be blocked when executing return
897 or exec in the rightmost pipeline element with lastpipe enabled.
899 kkk. Fixed a bug that could result in commands without the execute bit set
900 being added to the command hash table.
902 lll. Fixed a bug that allowed non-digits to follow the `#' in a `base#number'
905 mmm. Fixed a bug that made `time -- command' attempt to execute `--'.
907 nnn. Fixed a couple of bugs with variable transformation using arrays
908 subscripted with `*' or `@'.
910 ooo. A failure to create a variable using `declare' in a function no longer
911 causes the function to return immediately.
913 ppp. 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.
916 qqq. Fixed a bug that could cause backslashes quoting double quotes in here
917 document bodies to not be removed when expanding the body.
919 rrr. 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.
923 sss. Fixed a bug where receiving SIGTERM from a different process while
924 readline was active could cause the shell to terminate.
926 ttt. 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 $?.
929 uuu. Fixed a bug with nameref variables referencing array subscripts used in
930 arithmetic expressions.
932 vvv. 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
936 www. Restricted shells can no longer read and write history files with pathnames
939 xxx. Fixed a couple of problems with 0 and -0 used as arguments to `fc' when
940 not listing commands from the history.
942 yyy. 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.
947 zzz. There is no `compat50' shopt option. Changes to the shell compatibility
948 level should use the BASH_COMPAT variable.
950 aaaa. Redirection failures with compound commands are now treated as errors
951 that cause the shell to exit if `errexit' is enabled.
953 bbbb. Redirection failure error messages no longer expand the word in the
956 cccc. History expansion is no longer performed while parsing a here-document
957 inside a command substitution.
959 2. Changes to Readline
961 a. There are a number of fixes that were found as the result of fuzzing with
964 b. 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
968 c. When parsing `set' commands from the inputrc file or an application, readline
969 now allows trailing whitespace.
971 d. Fixed a bug that left a file descriptor open to the history file if the
974 e. Fixed a problem with binding key sequences containing meta characters.
976 f. 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
980 g. If readline catches SIGTSTP, it now sets a hook that allows the calling
981 application to handle it if it desires.
983 h. Fixed a redisplay problem with a prompt string containing embedded newlines.
985 i. Fixed a problem with completing filenames containing invalid multibyte
986 sequences when case-insensitive comparisons are enabled.
988 j. Fixed a redisplay problem with prompt strings containing invisible multibyte
991 k. Fixed a problem with multibyte characters mapped to editing commands that
992 modify the search string in incremental search.
994 l. 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.
998 m. Fixed several buffer overflows found as the result of fuzzing.
1000 n. Reworked backslash handling when translating key sequences for key binding
1001 to be more uniform and consistent, which introduces a slight backwards
1004 o. 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.
1007 p. 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.
1010 q. Readline now behaves better when operate-and-get-next is used when the
1011 history list is `full': when there are already $HISTSIZE entries.
1013 r. Fixed a bug that could cause vi redo (`.') of a replace command not to work
1014 correctly in the C or POSIX locale.
1016 s. 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
1020 3. New Features in Bash
1022 a. `bind -x' now supports different bindings for different editing modes and
1025 b. Bash attempts to optimize the number of times it forks when executing
1026 commands in subshells and from `bash -c'.
1028 c. 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
1032 d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut
1034 e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL
1035 and those that were SIG_IGN when the shell starts.
1037 f. The shell now expands the history number (e.g., in PS1) even if it is not
1038 currently saving commands to the history list.
1040 g. `read -e' may now be used with arbitrary file descriptors (`read -u N').
1042 h. The `select' builtin now runs traps if its internal call to the read builtin
1043 is interrupted by a signal.
1045 i. 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.
1050 j. shell-transpose-words: a new bindable readline command that uses the same
1051 definition of word as shell-forward-word, etc.
1053 k. The shell now adds default bindings for shell-forward-word,
1054 shell-backward-word, shell-transpose-words, and shell-kill-word.
1056 l. Bash now allows ARGV0 appearing in the initial shell environment to set $0.
1058 m. 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
1062 n. The `test -N' operator uses nanosecond timestamp granularity if it's
1065 o. 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
1070 p. BASH_REMATCH is no longer readonly.
1072 q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n'
1073 or `wait' without arguments.
1075 r. 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).
1079 s. Bash now allows SIGINT trap handlers to execute recursively.
1081 t. Bash now saves and restores state around setting and unsetting posix mode,
1082 instead of having unsetting posix mode set a known state.
1084 u. Process substitution is now available in posix mode.
1086 v. READLINE_MARK: a new variable available while executing commands bound with
1087 `bind -x', contains the value of the mark.
1089 w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell
1092 x. `test -v N' can now test whether or not positional parameter N is set.
1094 y. `local' now honors the `-p' option to display all local variables at the
1097 z. The `@a' variable transformation now prints attributes for unset array
1100 aa. The `@A' variable transformation now prints a declare command that sets a
1101 variable's attributes if the variable has attributes but is unset.
1103 bb. `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.
1106 cc. When run from a -c command, `jobs' now reports the status of completed jobs.
1108 dd. New `U', `u', and `L' parameter transformations to convert to uppercase,
1109 convert first character to uppercase, and convert to lowercase,
1112 ee. 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.
1115 ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource.
1117 gg. 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.
1123 hh. New `K' parameter transformation to display associative arrays as key-
1126 ii. Writing history to syslog now handles messages longer than the syslog max
1127 length by writing multiple messages with a sequence number.
1129 jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since
1130 they are nominally integer variables. LINENO is not an integer variable.
1132 kk. Bash temporarily suppresses the verbose option when running the DEBUG trap
1133 while running a command from the `fc' builtin.
1135 ll. `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.
1138 mm. The associative array implementation can now dynamically increase the
1139 size of the hash table based on insertion patterns.
1141 nn. HISTFILE is now readonly in a restricted shell.
1143 oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit
1146 4. New Features in Readline
1148 a. 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
1152 b. Bracketed paste mode works in more places: incremental search strings, vi
1153 overstrike mode, character search, and reading numeric arguments.
1155 c. Readline automatically switches to horizontal scrolling if the terminal has
1158 d. Unbinding all key sequences bound to a particular readline function now
1159 descends into keymaps for multi-key sequences.
1161 e. 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).
1164 f. 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.
1169 g. Readline sets the mark in several additional commands.
1171 h. Bracketed paste mode is enabled by default.
1173 i. 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.
1177 j. The bindable operate-and-get-next command (and its default bindings) are
1178 now part of readline instead of a bash-specific addition.
1180 ------------------------------------------------------------------------------
1181 This document details the changes between this version, bash-5.0-release, and
1182 the previous version, bash-5.0-rc1.
1186 a. Tilde expansion isn't performed on indexed array subscripts, even for
1187 backwards compatibility.
1189 b. The shell doesn't exit in posix mode if the eval builtin gets a parse
1190 error when run by the command builtin.
1192 c. Fixed a bug that caused a shell comment in an alias to not find the end
1193 of the alias properly.
1195 d. Reverted a change from April, 2018 that caused strings containing
1196 backslashes to be flagged as glob patterns.
1198 2. Changes to Readline
1200 3. New Features in Bash
1202 4. New Features in Readline
1204 ------------------------------------------------------------------------------
1205 This document details the changes between this version, bash-5.0-rc1, and
1206 the previous version, bash-5.0-beta2.
1210 a. Fix to initial word completion detection code.
1212 b. Fixed a bug that caused issues with assignment statements containing ^A in
1213 the value assigned when IFS contains ^A.
1215 c. Added a fallback to fnmatch() when strcoll can't correctly deal with
1216 bracket expression character equivalence classes.
1218 d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command
1219 when running a trap handler containing [[ or (( commands.
1221 e. Fixed a bug that caused nameref assignments in the temporary environment
1222 to potentially create variables with invalid names.
1224 f. Fixed a bug that caused `local -' to turn off alias expansion in scripts.
1226 g. 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
1230 h. Made a slight change to the FNV-1 string hash algorithm used for associative
1231 arrays (corrected the initial seed).
1233 2. Changes to Readline
1235 3. New Features in Bash
1237 a. The `select' command now supports command forms without a word list
1240 4. New Features in Readline
1242 ------------------------------------------------------------------------------
1243 This document details the changes between this version, bash-5.0-beta2, and
1244 the previous version, bash-5.0-beta.
1248 a. Fixed a bug that could cause a seg fault while parsing a subshell command
1249 inside a command substitution.
1251 b. Fixed several small memory leaks uncovered by coverity.
1253 c. Fixed a problem with command substitution inside an interactive shell that
1254 could cause the parent to receive a SIGHUP.
1256 d. Fixed a problem with using `*' and `@' as subscripts when assigning values
1257 to an associative array with assoc_expand_once enabled.
1259 e. Fixed a bug that could cause a huge memory allocation when completing a
1260 word beginning with an invalid tilde expansion.
1262 f. Cleaned up some incompatibilities with bash-4.4 when expanding indexed array
1263 subscripts used in arithmetic expansions when assoc_expand_once is enabled.
1265 g. The ${parameter@a} expansion will display attributes even if `parameter' is
1268 h. Fixed a bug that caused the output of `set' to cut off some variables before
1271 i. 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
1274 j. Fixed a problem when expanding $* in a context where word splitting is not
1275 performed when IFS is NULL.
1277 k. Temp files used to store here documents are forced readable, no matter what
1278 the user's umask says.
1280 l. Fixed a problem where an interrupted brace expansion could cause the shell
1281 to attempt to free an invalid memory location.
1283 m. Make sure to check for any terminating signals after running a trap
1284 handler; don't wait until the next time we process traps.
1286 n. Fixed a bug that caused "return" to act like a special builtin with respect
1287 to variable assignments even when preceded by "command".
1289 o. 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.
1293 p. Fixed a problem with FUNCNAME occasionally being visible when not executing
1296 q. Fixed a problem with the expansions performed on the WORD in the case
1299 r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during
1300 word splitting and the read builtin.
1302 s. 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
1306 2. Changes to Readline
1308 a. Fixed a bug with adding multibyte characters to an incremental search string.
1310 b. Fixed a bug with redoing text insertions in vi mode.
1312 c. 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.
1316 d. Fixed a bug with anchored search patterns when performing searches in vi
1319 3. New Features in Bash
1321 a. Associative and indexed arrays now allow subscripts consisting solely of
1324 b. `checkwinsize' is now enabled by default.
1326 c. The `localvar_unset' shopt option is now visible and documented.
1328 d. The `progcomp_alias' shopt option is now visible and documented.
1330 e. The signal name processing code now understands `SIGRTMIN+n' all the way
1333 f. There is a new `seq' loadable builtin.
1335 g. Trap execution now honors the (internal) max invocations of `eval', since
1336 traps are supposed to be executed as if using `eval'.
1338 h. The $_ variable doesn't change when the shell executes a command that forks.
1340 i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though
1341 conforming applications aren't supposed to use them.
1343 j. POSIX mode now enables the `shift_verbose' option.
1345 4. New Features in Readline
1347 a. Readline now allows application-defined keymap names; there is a new public
1348 function, rl_set_keymap_name(), to do that.
1350 b. The "Insert" keypad key, if available, now puts readline into overwrite
1353 ------------------------------------------------------------------------------
1354 This document details the changes between this version, bash-5.0-beta, and
1355 the previous version, bash-5.0-alpha.
1359 a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this
1360 is where POSIX says the subshell is not "enclosed" by the loop.
1362 b. Added more UTF-8-specific versions of multibyte functions, and optimized
1363 existing functions if the current locale uses UTF-8 encoding.
1365 c. In POSIX mode, assignments preceding regular builtins should not persist
1366 when the builtin completes.
1368 d. 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.
1371 e. 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
1375 f. Fixed a bug that could cause the shell to dereference a NULL pointer if
1376 the environment (`environ') is set to NULL.
1378 g. 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.
1381 h. 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.
1384 i. Fixed several bugs that could cause assignments to namerefs to create
1385 variables with invalid names.
1387 j. Fixed a bug that could result in the SIGINT handler being set incorrectly
1388 in asynchronous subshells.
1390 k. Fixed a bug that could cause `bash -t' to not execute the specified command.
1392 l. 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
1396 m. 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.
1400 n. 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.
1403 o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand
1404 the same way after the recent changes for POSIX interpretation 888.
1406 p. 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.
1410 q. 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.
1414 r. Fixed a bug that caused value conversion errors with the printf builtin's
1415 %u and %f conversion specifications and invalid constants.
1417 2. Changes to Readline
1419 a. Added more UTF-8-specific versions of multibyte functions, and optimized
1420 existing functions if the current locale uses UTF-8 encoding.
1422 b. Fixed a problem with bracketed-paste inserting more than one character and
1423 interacting with other readline functions.
1425 c. Fixed a bug that caused the history library to attempt to append a history
1426 line to a non-existent history entry.
1428 d. 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.
1431 e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better
1432 handle multibyte characters.
1434 f. Fixed a redisplay problem that caused an extra newline to be generated on
1435 accept-line when the line length is exactly the screenwidth.
1437 3. New Features in Bash
1439 a. 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.
1443 b. You can set the default value for $HISTSIZE at build time in config-top.h.
1445 c. The `complete' builtin now accepts a -I option that applies the completion
1446 to the initial word on the line.
1448 d. 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
1452 e. 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.
1457 f. The localvar_inherit option will not attempt to inherit a value from a
1458 variable of an incompatible type (indexed vs. associative arrays, for
1461 g. The `globasciiranges' option is now enabled by default; it can be set to
1462 off by default at configuration time.
1464 4. New Features in Readline
1466 a. The history expansion library now understands command and process
1467 substitution and extended globbing and allows them to appear anywhere in a
1470 b. 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
1474 ------------------------------------------------------------------------------
1475 This document details the changes between this version, bash-5.0-alpha, and
1476 the previous version, bash-4.4-release.
1480 a. Fixed a bug that could cause traps in background jobs to give the terminal
1481 to the wrong process group.
1483 b. Fixed a bug that caused `kill -l 0' to print an out-of-range error.
1485 c. Fixed a problem that could result in here-documents being displayed in
1488 d. Fixed a number of out-of-bounds and free memory read errors found via
1491 e. Fixed a subshell inheritance problem that could cause a subshell to wait for
1494 f. Fixed a bug that caused SHLVL to be incremented one too many times when
1497 g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with
1498 job control enabled.
1500 h. Fixed a spurious warning about unterminated ${ or $( constructs during
1503 i. The shell no longer runs traps if a signal arrives while reading command
1504 substitution output.
1506 j. Fixed an arithmetic expansion error that could allow ++var++ as valid
1509 k. Fixed an error that allowed out-of-bounds references to the directory stack.
1511 l. The shell does a better job of saving multi-line history entries with
1514 m. Fixed a bug that could cause quoted bracket expressions in regular expression
1515 arguments to `[[' to not match correctly.
1517 n. Fixed a bug that could cause an IFS character in a word to result in an
1518 extra '\001' character in the expansion.
1520 o. A trailing backslash in a glob pattern can match a trailing backslash in the
1523 p. Fixed a memory leak in the process creation code path when job control is
1526 q. Fixed a bug that caused `printf' to output broken surrogate pairs for
1529 r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to
1530 kill an interactive shell.
1532 s. Fixed a bug that could cause the `read' builtin to not fully read a
1533 multibyte character.
1535 t. Fixed a bug that could cause identifiers to be evaluated in conditional
1536 arithmetic expressions even when evaluation is suppressed.
1538 u. 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.
1542 v. 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.
1545 w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters.
1547 x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions.
1549 y. If indirect expansion attempts to indirectly reference through an unset
1550 variable, report an error.
1552 z. Added a guard to prevent the shell from looping while receiving an endless
1553 stream of SIGTTIN at shell startup.
1555 aa. Fixed a bug with parsing here documents inside a command substitution when
1556 looking for the closing delimiter.
1558 bb. Fixed a bug that caused printf to not quote all <blank> characters in the
1559 current locale when using the `%q' format specifier.
1561 cc. 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.
1564 dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will
1565 not interrupt open/read/write system calls.
1567 ee. The ERR trap now reports line numbers more reliably.
1569 ff. 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
1573 gg. Fixed a bug that caused extglob patterns to match filenames beginning with
1576 hh. File descriptors open for writing to here documents are no longer available
1579 ii. Make sure word completion doesn't perform command or process substitution.
1581 jj. Fixed a bug with parsing $$'...' inside a command substitution.
1583 kk. 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
1587 ll. Fixed a bug that could cause the shell to hang when adding a pid to the
1588 table of background process exit statuses.
1590 mm. Fixed a bug that could cause 0x01 characters to be doubled in the output
1591 of process substitution.
1593 nn. Restricted shells now clear the hash table before making the PATH variable
1596 oo. 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.
1601 pp. There are a number of changes to nameref variable handling to avoid
1602 creating variables with invalid names.
1604 qq. A non-interactive posix mode shell no longer exits when an assignment
1605 statement fails if the assignment is utimately being performed by the
1608 rr. When using character class names for globbing, don't allow case
1609 insensitivity, even if nocaseglob is enabled.
1611 ss. Fixed a bug that allowed some redirections to stay in place if a later
1614 tt. Fixed a bug in how command and process substitutions are recognized within
1615 other parameter expansions.
1617 uu. Fixed a bug that caused bash to loop under certain circumstances when
1618 performing arithmetic expansion on a variable whose value is an invalid
1621 vv. Fixed a bug that could cause bash to expand aliases inappropriately while
1622 parsing compound commands like `case'.
1624 ww. 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
1628 xx. Fixed a bug that could cause `case' to fail to match patterns containing
1631 yy. Fixed a bug that caused exported functions to contain stray 0x01 characters.
1633 zz. Fixed some inconsistencies with how the history number is handled in the
1634 various prompt strings.
1636 aaa. 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'.
1639 bbb. 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.
1642 ccc. 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
1646 ddd. Expression errors in arithmetic `for' commands are treated more like
1647 shell syntax errors.
1649 eee. Fixed a parser synchronization error resulting from a syntax error
1650 followed immediately by an EOF.
1652 fff. When executing a shell function, the first line in the function ($LINENO)
1653 is line 1 instead of line 0, as Posix requires.
1655 ggg. 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.
1658 hhh. If LINENO is exported, bash needs to regenerate its value each time it
1659 constructs the environment.
1661 iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'.
1663 jjj. Make sure the `coproc' command returns an appropriate status if the NAME
1664 argument is invalid.
1666 kkk. Fixed a problem with arithmetic expressions containing array references
1667 that contain arithmetic expressions with syntax errors.
1669 lll. The `select' command and help builtin will use $COLUMNS before the window
1670 size returned from the kernel as the terminal width.
1672 mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to
1673 detect file descriptor errors.
1675 nnn. The `read' builtin now does a better job of acting on signals that don't
1678 ooo. Fixed some cases where `printf -v' did not return failure status on a
1679 variable assignment error.
1681 ppp. Fixed temporary environment propagation back to the current environment
1682 so that it doesn't happen for special builtins run by the `command'
1685 qqq. Fixed a bug when searching for the end of a here-document delimiter in a
1686 command substitution.
1688 rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail.
1690 sss. Fixed a bug that could cause reserved words to not be recognized in a
1691 for statement without the `in' inside a command substitution.
1693 ttt. Fixed a bug that could cause a double-free in a timed command with an
1696 uuu. 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.
1699 vvv. Fixed cases where bash prematurely removed FIFOs attached to process
1702 www. Fixed a problem with calculating the size of the table that stores exit
1703 statuses from background processes when the child process resource limit
1706 xxx. Fixed a memory leak with functions using `return' when using FIFOs for
1709 yyy. `wait' without arguments attempts to wait for all active process
1710 substitution processes.
1712 zzz. Fixed a bug where an indirect parameter was subjected to word splitting
1713 when trying to find the indirected variable name.
1715 aaaa. Fixed a bug that could allow restricted shell users to add commands to
1718 bbbb. 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.
1722 cccc. 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.
1725 dddd. Fixed a bug that could cause builtins like `readonly' to behave
1726 differently when applied to arrays and scalar variables within functions.
1728 eeee. Fixed a bug that could cause alias expansion to add an extra space to
1729 a quoted string that begins outside the alias expansion.
1731 ffff. Fixed a bug that could result in unwanted alias expansion after timing
1734 gggg. Fixed a bug that could cause a core dump if a timestamp in a history
1735 file overflowed a time_t.
1737 hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since
1738 the kernel calls make those file descriptors read-write.
1740 iiii. Fixed a problem with splitting double-quoted words for programmable
1741 completion when the double quote immediately follows another word
1744 jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share
1745 the same input buffer.
1747 kkkk. The error message resulting from ${x:?} and ${x?} now differs depending
1748 on whether the variable is null or unset.
1750 llll. In Posix mode, the shell exits if a variable assignment fails and precedes
1751 an empty simple command (after expansion).
1753 mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to
1756 nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal
1757 due to Linux pid namespace peculiarities.
1759 oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for
1762 pppp. 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.
1765 qqqq. 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
1769 rrrr. Fixed a problem with timing process substitutions that caused the shell
1770 to print timing information for the calling command.
1772 ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark
1773 the delimiter as quoted (inhibiting expansion of the here-document
1776 tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and
1777 conditional command pattern matches.
1779 uuuu. Fixed a bug that could cause the pattern matching engine to not recognize
1780 locale-specific character classes.
1782 vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently.
1784 wwww. The `globstar' code now skips over symbolic links to directories,
1785 preventing them from being scanned twice.
1787 xxxx. 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
1791 yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN
1792 trap when using `eval return'.
1794 zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document.
1796 aaaaa. 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.
1800 bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in
1801 an {id}>foo construct.
1803 ccccc. 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.
1807 ddddd. Fixed a posix-mode problem with variable scoping when creating variables
1808 from assignment statements preceding special builtins.
1810 eeeee. Fixed a bug that could cause patterns containing backslashes to not be
1811 run through the pattern matching engine.
1813 fffff. 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.
1817 ggggg. 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'.
1820 2. Changes to Readline
1822 a. Added a guard to prevent nested macros from causing an infinite expansion
1825 b. Instead of allocating enough history list entries to hold the maximum list
1826 size, cap the number allocated initially.
1828 c. 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.
1831 d. Added support for keyboard timeouts when an ESC character is the last
1832 character in a macro.
1834 e. There are several performance improvements when in a UTF-8 locale.
1836 f. Readline does a better job of preserving the original set of blocked
1837 signals when using pselect() to wait for input.
1839 g. Fixed a bug that caused multibyte characters in macros to be mishandled.
1841 h. 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.
1845 i. Fixed several bugs in cursor positioning when displaying lines with prompts
1846 containing invisible characters and multibyte characters.
1848 j. When performing case-insensitive completion, Readline no longer sorts the
1849 list of matches unless directed to do so.
1851 k. Fixed a problem with key sequences ending with a backslash.
1853 l. Fixed out-of-bounds and free memory read errors found via fuzzing.
1855 m. Fixed several cases where the mark was set to an invalid value.
1857 n. 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
1861 o. Handle incremental and non-incremental search character reads returning EOF.
1863 p. Handle the case where a failing readline command at the end of a multi-key
1864 sequence could be misinterpreted.
1866 q. The history library now prints a meaningful error message if the history
1867 file isn't a regular file.
1869 r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace
1870 a multibyte character.
1872 s. The key binding code now attempts to remove a keymap if a key unbinding
1875 t. Fixed a line-wrapping issue that caused problems for some terminal
1878 u. If there is a key bound to the tty's VDISCARD special character, readline
1879 disables VDISCARD while it is active.
1881 v. Fixed a problem with exiting bracketed paste mode on terminals that assume
1882 the bracketed paste mode character sequence contains visible characters.
1884 w. Fixed a bug that could cause a key binding command to refer to an
1885 uninitialized variable.
1887 3. New Features in Bash
1889 a. The `wait' builtin can now wait for the last process substitution created.
1891 b. There is an EPOCHSECONDS variable, which expands to the time in seconds
1892 since the Unix epoch.
1894 c. There is an EPOCHREALTIME variable, which expands to the time in seconds
1895 since the Unix epoch with microsecond granularity.
1897 d. New loadable builtins: rm, stat, fdflags.
1899 e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment.
1901 f. When supplied a numeric argument, the shell-expand-line bindable readline
1902 command does not perform quote removal and suppresses command and process
1905 g. `history -d' understands negative arguments: negative arguments offset from
1906 the end of the history list.
1908 h. The `name' argument to the `coproc' reserved word now undergoes word
1909 expansion, so unique coprocs can be created in loops.
1911 i. A nameref name resolution loop in a function now resolves to a variable by
1912 that name in the global scope.
1914 j. The `wait' builtin now has a `-f' option, which signifies to wait until the
1915 specified job or process terminates, instead of waiting until it changes
1918 k. 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.
1922 l. Process substitution does not inherit the `v' option, like command
1925 m. 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.
1928 n. 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.
1931 o. 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.
1934 p. `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.
1937 q. A numeric argument to the line editing `operate-and-get-next' command
1938 specifies which history entry to use.
1940 r. The positional parameters are now assigned before running the shell startup
1941 files, so startup files can use $@.
1943 s. There is a compile-time option that forces the shell to disable the check
1944 for an inherited OLDPWD being a directory.
1946 t. The `history' builtin can now delete ranges of history entries using
1949 u. 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.
1952 v. The command completion code now matches aliases and shell function names
1953 case-insensitively if the readline completion-ignore-case variable is set.
1955 w. There is a new `assoc_expand_once' shell option that attempts to expand
1956 associative array subscripts only once.
1958 x. 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.
1962 y. The `umask' builtin now allows modes and masks greater than octal 777.
1964 z. The `times' builtin now honors the current locale when printing a decimal
1967 aa. There is a new (disabled by default, undocumented) shell option to enable
1968 and disable sending history to syslog at runtime.
1970 4. New Features in Readline
1972 a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
1973 Posix specifies (uses fnmatch(3) if available).
1975 b. 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.
1979 c. There are default key bindings for control-arrow-key key combinations.
1981 d. A negative argument (-N) to `quoted-insert' means to insert the next N
1982 characters using quoted-insert.
1984 e. 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.
1988 f. There is new support for conditionally testing the readline version in an
1989 inputrc file, with a full set of arithmetic comparison operators available.
1991 g. 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
1997 ------------------------------------------------------------------------------
1998 This document details the changes between this version, bash-4.4-release, and
1999 the previous version, bash-4.4-rc2.
2003 a. Fixed a bug that could potentially result in a crash due to an integer
2006 b. 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.
2009 c. Fixed several memory leaks.
2011 d. Fixed a bug that could potentially cause the terminal attributes to be
2012 set incorrectly by a command run from a programmable completion.
2014 e. Fixed several potential buffer overflow issues in the word expansion code.
2016 2. Changes to Readline
2018 3. New Features in Bash
2020 4. New Features in Readline
2021 ------------------------------------------------------------------------------
2022 This document details the changes between this version, bash-4.4-rc2, and
2023 the previous version, bash-4.4-beta2.
2027 a. Fixed an out-of-bounds read in the redirection operator completion code.
2029 b. Fixed execution context so `until continue' doesn't disable execution for
2030 subsequent commands.
2032 c. Fixed trap handling code so traps don't inherit a command's temporary
2035 d. Fixed a bug that resulted in incorrect line numbers when a function is
2036 defined as part of another function's execution.
2038 e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting
2039 is not performed and $IFS is not the default.
2041 f. Fixed a bug that caused ''"$@" to not expand to an empty argument when
2042 there are no positional parameters.
2044 g. 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().
2048 h. Improved word completion for quoted strings containing unterminated command
2049 substitutions with embedded double quotes.
2051 2. Changes to Readline
2053 a. Fixed a bug that caused mode strings to be displayed incorrectly if the
2054 prompt was shorter than the mode string.
2056 3. New Features in Bash
2058 a. 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.
2061 4. New Features in Readline
2063 a. New application-callable function: rl_pending_signal(): returns the signal
2064 number of any signal readline has caught but not yet handled.
2066 b. 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
2072 ------------------------------------------------------------------------------
2073 This document details the changes between this version, bash-4.4-beta2, and
2074 the previous version, bash-4.4-rc1.
2078 a. Fixed a memory leak when processing ${!var[@]}.
2080 b. Fixed a bug that caused subshells to free trap strings associated with
2083 c. Inheriting BASHOPTS from the environment now works to force actions
2084 associated with enabling an option, instead of just marking the option
2087 d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
2090 e. Fixed a bug caused by an accidental omission of part of the original patch
2093 e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
2095 f. Fixed a bug that caused parsing errors in command substitutions with
2096 consecutive case statements separated by newlines.
2098 g. Updated logic used to decide whether bash is running inside an emacs
2099 terminal emulator to work with future emacs versions.
2101 h. Fixed two extended pattern matching bugs caused by premature short-
2104 i. Fixed a memory leak in the code that removes duplicate history entries.
2106 j. 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.
2110 k. Fixed a bug that caused variables to be inadvertently marked as both an
2111 associative and an indexed array.
2113 l. Fixed a bug that caused `bash -c' to not run a trap specified in the
2116 j. 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.
2120 k. Fixed a bug that caused command substitution to attempt to set the
2121 terminal's process group incorrectly.
2123 l. Fixed a bug that could cause prompt string expansion to display error
2124 messages when the `nounset' shell option is set.
2126 m. Fixed a bug that caused "$@" to not expand to an empty string under the
2127 circumstances when Posix says it should ("${@-${@-$@}}").
2129 n. 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
2134 o. Function tracing and error tracing are disabled if --debugger is supplied
2135 at startup but the shell can't find the debugger start file.
2137 p. Fixed a bug when IFS is used as the control variable in a for statement.
2139 q. Fixed a bug with SIGINT received by a command substitution in an interactive
2142 r. The checks for nameref variable self-references are more thorough.
2144 s. Fixed several bugs with multi-line aliases.
2146 t. Fixed `test' to handle the four-argument case where $1 == '(' and
2149 u. Fixed a bug in the expansion of $* in the cases where word splitting is
2152 v. Fixed a bug in execution of case statements where IFS includes the
2153 pattern matching characters.
2155 2. Changes to Readline
2157 a. When refreshing the line as the result of a key sequence, Readline attempts
2158 to redraw only the last line of a multiline prompt.
2160 b. Fixed an issue that caused completion of git commands to display
2161 incorrectly when using colored-completion-prefix.
2163 c. Fixed several redisplay bugs having to do with multibyte characters and
2164 invisible characters in prompt strings.
2166 3. New Features in Bash
2168 a. Value conversions (arithmetic expansions, case modification, etc.) now
2169 happen when assigning elements of an array using compound assignment.
2171 b. There is a new option settable in config-top.h that makes multiple
2172 directory arguments to `cd' a fatal error.
2174 c. Bash now uses mktemp() when creating internal temporary files; it produces
2175 a warning at build time on many Linux systems.
2177 4. New Features in Readline
2179 a. The default binding for ^W in vi mode now uses word boundaries specified
2180 by Posix (vi-unix-word-rubout is bindable command name).
2182 b. rl_clear_visible_line: new application-callable function; clears all
2183 screen lines occupied by the current visible readline line.
2185 c. rl_tty_set_echoing: application-callable function that controls whether
2186 or not readline thinks it is echoing terminal output.
2188 d. Handle >| and strings of digits preceding and following redirection
2189 specifications as single tokens when tokenizing the line for history
2192 e. Fixed a bug with displaying completions when the prefix display length
2193 is greater than the length of the completions to be displayed.
2195 f. 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.
2198 ------------------------------------------------------------------------------
2199 This document details the changes between this version, bash-4.4-rc1, and
2200 the previous version, bash-4.4-beta.
2204 a. Fixed several problems with bash completion not special-casing bash syntax
2207 b. 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.
2210 c. Fixed a bug that caused prompt expansion to loop when PS1 contained a
2213 d. Fixed a bug that caused the ${array[@]@A} expansion to split the results
2214 even when double-quoted.
2216 e. 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.
2219 f. Bash-4.4 can now be configured and built on very old versions of Solaris 2.
2221 g. Fixed problems with --help support for several builtins.
2223 h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited
2224 from the environment.
2226 i. 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.
2230 j. Fixed a bug that caused `fc' to return an incorrect exit status when
2231 executing commands from the history list.
2233 k. Fixed a bug that caused the shell to exit when a process substitution
2234 received a SIGINT when run in certain terminal emulators.
2236 l. EXECIGNORE now honors the setting of `extglob' when attempting to match
2239 m. Fixed a bug where `return' used the wrong exit status when executed in a
2242 n. Fixed a bug that caused a command containing a here-document and an escaped
2243 newline to be stored in the history list incorrectly.
2245 o. Fixed a bug that caused set -e to be honored in cases of builtins invoking
2246 other builtins when it should be ignored.
2248 p. Fixed a bug that caused `readonly' and `export' to create local array
2249 variables when used within shell functions.
2251 q. Fixed a bug that allowed subshells begun to execute process substitutions
2252 to have access to the command's temporary environment.
2254 r. 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.
2257 s. 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 `.'.
2261 t. 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.
2264 u. Fixed a bug that caused history expansions occurring in command
2265 substitutions to not be performed.
2267 v. 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.
2271 w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set
2272 to the empty string.
2274 x. Fixed a bug that caused process and command substitution to inherit output
2275 buffered in the stdio library but not written.
2277 y. Fixed a bug that caused a terminating signal received during `echo' to run
2278 an exit trap in a signal handler context.
2280 z. Fixed a bug that caused a builtin command containing a process substitution
2281 to return the wrong exit status.
2283 aa. 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
2287 bb. The history builtin now uses more descriptive error messages for missing or
2290 2. Changes to Readline
2292 a. 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.
2295 b. Fixed an out-of-bounds read in readline's internal tilde expansion
2298 c. Fixed several redisplay bugs with prompt strings containing multibyte
2299 and non-visible characters whose physical length is longer than the screen
2302 d. Fixed a redisplay bug with prompt strings containing invisible characters
2303 whose physical length exceeds the screen width and using incremental search.
2305 e. Readline prints more descriptive error messages when it encounters errors
2306 while reading an inputrc file.
2308 f. 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.
2312 3. New Features in Bash
2314 a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
2317 b. 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.
2321 c. New prompt string: PS0. Expanded and displayed by interactive shells after
2322 reading a complete command but before executing it.
2324 d. 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
2328 e. Posix-mode shells now allow double quotes to quote the history expansion
2331 f. OLDPWD can be inherited from the environment if it names a directory.
2333 g. Shells running as root no longer inherit PS4 from the environment, closing
2334 a security hole involving PS4 expansion performing command substitution.
2336 h. 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'
2340 4. New Features in Readline
2342 a. If an incremental search string has its last character removed with DEL,
2343 the resulting empty search string no longer matches the previous line.
2345 b. 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.
2350 c. Readline now throws an error if it parses a key binding without a
2351 terminating `:' or whitespace.
2353 ------------------------------------------------------------------------------
2354 This document details the changes between this version, bash-4.4-beta, and
2355 the previous version, bash-4.4-alpha.
2359 a. Fixed two bugs that caused out-of-bounds reads when skipping over assignment
2360 statements while finding the word on which to perform programmable
2363 b. Fixed a memory leak in programmable completion.
2365 c. Fixed a bug that could cause the shell to crash when interrupting the
2368 d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new
2371 e. Fixed a bug that caused the && and || operators to be incorrectly optimized.
2373 f. The shell now undoes redirections before exiting the shell when the `-e'
2374 option is enabled, and a shell function fails.
2376 g. History expansion now skips over the history expansion character in command
2377 and process substitution.
2379 h. Fixed a bug that caused stray '\001' characters to be added to the output
2382 i. Fixed a memory leak when processing declare commands that perform compound
2385 j. 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.
2388 k. 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.
2391 l. Fixed a bug that caused several signals to be ignored if `exec' failed in
2392 an interactive shell.
2394 m. A posix-mode non-interactive shell now considers a parameter expansion error
2395 to be a fatal error.
2397 n. The `time' command now prints timing statistics for failed commands when
2398 the -e option is enabled.
2400 o. Fixed a bug that caused the shell to crash when attempting to indirectly
2401 expand a shell variable with an invalid name.
2403 p. Fixed a bug that caused the shell to crash when running a trap containing
2404 a process substitution.
2406 q. 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.
2410 r. 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
2414 s. Fixed a memory leak that occurred when interrupting brace expansions
2415 generating a sequence.
2417 t. Fixed a bug that resulted in alias expansion in redirections.
2419 u. 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.
2423 v. The `help' builtin now behaves better in locales where each wide
2424 character occupies more than one display column.
2426 w. The `read' builtin no longer has a possible race condition when a timeout
2429 x. Fixed several expansion problems encountered when IFS="'".
2431 y. Fixed a problem with the expansion of $'\c?'.
2433 z. Bash no longer splits the expansion of here-strings, as the documentation
2436 aa. Bash now puts `s' in the value of $- if the shell is reading from standard
2437 input, as Posix requires.
2439 bb. Fixed a bug that caused the shell to crash if invoked with a NULL
2442 cc. The shell now only trusts an inherited value for $PWD if it begins with a
2445 dd. Fixed a memory leak when creating local array variables and assigning to
2446 them using compound assignment with the `declare' builtin.
2448 ee. Fixed a bug that could cause the shell to crash when processing nested here
2449 documents inside a command substitution.
2451 ff. Array keys and values are now displayed using $'...' quoting where
2454 gg. Fixed a bug that could cause the shell to crash if the replacement string
2455 in pattern substitution was NULL.
2457 hh. Fixed a bug that could cause the shell to crash if a command substitution
2458 contained a non-fatal syntax error.
2460 ii. Fixed a bug that could cause the shell to crash if variable indirection
2461 resulted in a NULL variable.
2463 jj. Fixed a bug that could cause the shell to crash if a long string contained
2464 multiple unterminated parameter expansion constructs.
2466 kk. Improved the code that acts on SIGINT received while waiting for a child
2467 process only if the child exits due to SIGINT.
2469 ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple
2472 2. Changes to Readline
2474 a. Colored completion prefixes are now displayed using a different color, less
2475 likely to collide with files.
2477 b. Fixed a bug that caused vi-mode character search to misbehave when
2478 running in callback mode.
2480 c. Fixed a bug that caused output to be delayed when input is coming from a
2483 d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
2484 a multi-key key sequence via a macro.
2486 e. Fixed a bug that caused problems with applications that supply their own
2487 input function when performing completion.
2489 f. When read returns -1/EIO when attempting to read a key, return an error
2490 instead of line termination back to the caller.
2492 g. Updated tty auditing feature based on patch from Red Hat.
2494 h. Fixed a bug that could cause the history library to crash on overflows
2495 introduced by malicious editing of timestamps in the history file.
2497 3. New Features in Bash
2499 a. `make install' now installs the example loadable builtins and a set of
2500 bash headers to use when developing new loadable builtins.
2502 b. `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.
2506 c. 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
2510 d. The `complete_fullquote' option to `shopt' changes filename completion to
2511 quote all shell metacharacters in filenames and directory names.
2513 e. The `kill' builtin now has a `-L' option, equivalent to `-l', for
2514 compatibility with Linux standalone versions of kill.
2516 4. New Features in Readline
2517 ------------------------------------------------------------------------------
2518 This document details the changes between this version, bash-4.4-alpha, and
2519 the previous version, bash-4.3-release.
2523 a. A bug that caused pipelines to be corrupted while running the DEBUG trap
2526 b. A bug that accidentally omitted the `-R' unary operator from `test' was
2529 c. A bug that could cause the shell to not restore the terminal's process
2530 group on shell exit was fixed.
2532 d. Several changes were made to programmable completion to accommodate
2533 assumptions made by the bash-completion package.
2535 e. Bash no longer inhibits C-style escape processing ($'...') while performing
2536 pattern substitution word expansions.
2538 f. 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.
2541 g. 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.
2544 h. 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
2548 i. Fixed a bug that caused extended glob patterns to incorrectly match
2549 filenames with a leading `.'.
2551 j. Fixed a bug involving sign extension when reallocating the input line
2552 after a history expansion, causing segmentation faults.
2554 k. Bash now does a better job at identifying syntax errors during word
2555 completion and tailoring completion appropriately.
2557 l. Bash now uses the current locale's decimal point in command timing output.
2559 m. Fixed a bug that caused segmentation faults while reading here documents if
2560 PS2 contains a command substitution.
2562 n. 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).
2566 o. Bash now quotes command hash table entries that contain shell metacharacters
2567 when displaying hash table contents.
2569 p. Fixed a potential file descriptor leak when dup2() fails while performing a
2572 q. Fixed a bug that caused directory names evaluated during word completion to
2575 r. 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.
2579 s. Fixed a bug that caused bash to not expand $0 in word expansions where it
2582 t. Fixed a bug that caused bash to perform process substitution if <(
2583 appeared inside an arithmetic context.
2585 u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern
2586 to be confused as directory names.
2588 v. Fixed several bugs with treatment of invisible variables (variables with
2589 attributes that are unset because they have never been assigned values).
2591 w. 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.
2594 x. 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.
2597 y. Fixed a bug that caused the `time' reserved word to not be recognized as
2598 such in all contexts where it should have been.
2600 z. Fixed a bug that caused the shell to close process substitution file
2601 descriptors when executing a script without the `#!' leading line.
2603 aa. Fixed a typo that caused the `compat42' shell option to set the wrong
2604 compatibility level.
2606 bb. The shell now handles process substitution commands with embedded
2607 parentheses the same way as it does when parsing command substitution.
2609 cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option
2610 to produce core dumps.
2612 dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases
2613 where slashes must be matched explicitly.
2615 ee. Fixed a problem with patterns containing `:' in colon-separated variables
2618 ff. Fixed a bug that caused indirect variable expansion using indexed arrays to
2621 gg. Fixed a parsing problem that caused quoted newlines immediately following a
2622 command substitution to be mishandled in certain cases.
2624 hh. Fixed a potential buffer overflow on systems without locale_charset or the
2627 ii. Fixed a bug that caused background processes to modify the terminal's
2628 process group under certain circumstances.
2630 jj. Asynchronous commands now always set $? to 0 and are not affected by
2631 whether or not the command's exit status is being inverted.
2633 kk. Fixed a problem that caused a line ending with an escaped newline and
2634 containingh a prior `eval' to be incorrectly parsed.
2636 ll. Fixed an issue with programmable completion and `!' in extglob patterns
2637 used as arguments to `compgen -X'.
2639 mm. Word completion now treats the two-character token `>|' as requiring
2642 nn. Bash no longer expands tildes in $PATH elements while in Posix mode.
2644 oo. 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').
2648 pp. Fixed bug that caused importing shell functions from the environment to
2649 execute additional commands following the function.
2651 qq. Fixed a bug that caused the parser to return a lookahead character pushed
2652 back by a previous call, even when on another line.
2654 rr. Fixed a bug that caused many here-documents or many nested case statements
2655 to overflow an internal stack.
2657 ss. 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.
2661 tt. 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.
2664 uu. Fixed a bug that could cause an invalid memory access if a command was run
2665 before initializing the job control framework.
2667 vv. When in Posix mode, bash prints shell function definitions as Posix
2668 specifies them, without the leading `function' keyword.
2670 ww. The variable attribute display builtins no longer display variables with
2671 invalid names that were imported from the environment.
2673 xx. Fixed a bug that could allow `break' or `continue' executed from shell
2674 functions to affect loops running outside of the function.
2676 yy. Fixed a bug that could cause a restricted shell to attempt to import shell
2677 functions from the environment.
2679 zz. The shell now allows double-quoted identifiers in arithmetic expressions.
2681 aaa. Fixed a bug that could allow scalar variables subscripted using [@] in
2682 word expansions to be incorrectly quoted.
2684 bbb. 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
2688 ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to
2691 ddd. Posix says that expanding $* in a pattern context where the expansion is
2692 double-quoted should not treat $* as if it were double quoted.
2694 eee. Bash now restores getopts' internal state between calls to getopts even if
2695 a shell function declares a local copy of OPTIND.
2697 fff. Fixed a bug that could cause `history -r' or `history -n' to read identical
2698 lines from the history file more than once.
2700 ggg. 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.
2704 hhh. Fixed a bug that could cause `mapfile' to create variables with invalid
2707 iii. The shell only goes into debugging mode when --debugger is supplied if
2708 the debugger initialization file is present.
2710 jjj. 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.
2713 kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable
2716 lll. 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.
2720 mmm. 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.
2724 nnn. Fixed a bug in printf so that a missing precision specifier after a `.'
2727 ooo. Fixed a bug that attempted to use the internal command timing to time
2728 pipeline components if the pipeline elements are separated by newlines.
2730 ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase
2731 the values on assignment.
2733 qqq. 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.
2736 rrr. 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.
2739 sss. Fixed a bug in the bash interface to history expansion to avoid attempting
2740 expansion if the history expansion character occurs in a command
2743 ttt. 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)
2746 uuu. Bash handles backslash-quoting of multibyte characters better when quoting
2747 output that is intended to be reused.
2749 vvv. System-specific changes for: Windows, Cygwin.
2751 www. Fixes for upper and lower-casing multibyte characters, some locales have
2752 characters whose upper and lowercase versions have different numbers of
2755 xxx. Fixed a bug that caused the ERR trap in a shell function to have the
2756 wrong value for $LINENO.
2758 yyy. Fixed a bug that resulted in incorrect quoting of regexps for the =~
2759 operator when an open brace appears without a close brace.
2761 zzz. Fixed a bug in the array unset operation that caused it to attempt to
2762 parse embedded single and double quotes.
2764 aaaa. 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
2768 bbbb. Fixed two bugs that could cause the shell to dereference a null pointer
2769 while attempting to print an error message from arithmetic expansion.
2771 cccc. 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.
2775 dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up
2776 any FIFOs created by process substitution.
2778 eeee. 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.
2782 ffff. Fixed a bug that caused redirections to not be undone on some syntax
2783 errors, e.g., when parsing a command substitution.
2785 gggg. 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.
2791 hhhh. 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)
2795 iiii. 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.
2798 jjjj. Made a few changes to strings to avoid possible potential negative effects
2799 caused by malicious translations.
2801 kkkk. 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
2805 llll. Fixed a bug that would not replace empty strings using pattern
2806 substitution even if the pattern matched the empty string.
2808 mmmm. Fixed a bug with word completion that prevented some characters from
2809 being backslash-quoted (backquote, dollar sign).
2811 nnnn. Fixed a bug that prevented a command from the history re-executed by the
2812 `fc' builtin from setting verbose mode.
2814 oooo. Fixed a bug that caused the shell to not enable and disable function
2815 tracing with changes to the `extdebug' shell option.
2817 pppp. Fixed a bug that caused assignments to nameref variables pointing to
2818 unset variables with attributes but no values to create variables with
2821 qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to
2822 unset the wrong variable under certain circumstances.
2824 rrrr. Fixed a bug that caused close braces occurring in brace expansions within
2825 command substitutions to incorrectly terminate parameter expansions.
2827 ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH.
2829 tttt. 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.
2833 uuuu. `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.
2836 vvvv. 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
2840 wwww. Fixed a bug that caused case statements within loops contained in a
2841 command substitution to be parsed incorrectly.
2843 xxxx. 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.
2847 2. Changes to Readline
2849 a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
2850 commands with modifiers was fixed.
2852 b. Fixed a bug that caused callback mode to dump core when reading a
2853 multiple-key sequence (e.g., arrow keys).
2855 c. Fixed a bug that caused the redisplay code to erase some of the line when
2856 using horizontal scrolling with incremental search.
2858 d. Readline's input handler now performs signal processing if read(2) is
2859 interrupted by SIGALRM or SIGVTALRM.
2861 e. Fixed a problem with revert-all-at-newline freeing freed memory.
2863 f. 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.
2867 g. Fixed an off-by-one error in the prompt printed when performing searches.
2869 h. 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).
2872 i. Some memory leaks caused by signals interrupting filename completion have
2875 j. 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.
2879 k. Fixed a bug concerning deleting multibyte characters from the search
2880 string while performing an incremental search.
2882 l. Fixed a bug with tilde expanding directory names in filename completion.
2884 m. Fixed a bug that did not allow binding sequences beginning with a `\'.
2886 n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
2887 contains a multibyte character in the last screen column.
2889 o. Fixed a bug that caused history expansion to disregard characters that are
2890 documented to delimit a history event specifier without requiring `:'.
2892 p. 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.
2895 q. 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.
2899 r. Paren matching now works in vi insert mode.
2901 3. New Features in Bash
2903 a. 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.
2907 b. Command and process substitutions now turn off the `-v' option when
2908 executing, as other shells seem to do.
2910 c. The default value for the `checkhash' shell option may now be set at
2911 compile time with a #define.
2913 d. 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
2917 e. The maximum number of nested recursive calls to `eval' is now settable in
2918 config-top.h; the default is no limit.
2920 f. 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).
2924 g. The maximum number of nested recursive calls to `source' is now settable
2925 in config-top.h; the default is no limit.
2927 h. All builtin commands recognize the `--help' option and print a usage
2930 i. Bash does not allow function names containing `/' and `=' to be exported.
2932 j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
2934 k. The shell now allows `time ; othercommand' to time null commands.
2936 l. There is a new `--enable-function-import' configuration option to allow
2937 importing shell functions from the environment; import is enabled by
2940 m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
2943 n. GLOBIGNORE, the pattern substitution word expansion, and programmable
2944 completion match filtering now honor the value of the `nocasematch' option.
2946 o. There is a new ${parameter@spec} family of operators to transform the
2947 value of `parameter'.
2949 p. 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,
2955 q. 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.
2959 r. Executing the rhs of && and || will no longer cause the shell to fork if
2962 s. 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
2966 t. `complete' and `compgen' have a new `-o nosort' option, which forces
2967 readline to not sort the completion matches.
2969 u. Bash now allows waiting for the most recent process substitution, since it
2972 v. The `unset' builtin now unsets a scalar variable if it is subscripted with
2973 a `0', analogous to the ${var[0]} expansion.
2975 w. `set -i' is no longer valid, as in other shells.
2977 x. 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
2981 y. 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.
2984 z. 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.
2988 aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
2989 cause matching filenames to be ignored when searching for commands.
2991 bb. 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 `&&').
2995 4. New Features in Readline
2997 a. The history truncation code now uses the same error recovery mechanism as
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.
3001 b. There is a new bindable variable, `enable-bracketed-paste', which enables
3002 support for a terminal's bracketed paste mode.
3004 c. 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.
3009 d. Prompt expansion adds the mode string to the last line of a multi-line
3010 prompt (one with embedded newlines).
3012 e. 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
3016 f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
3019 g. The redisplay code underwent several efficiency improvements for multibyte
3022 h. 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.
3025 i. 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
3029 ------------------------------------------------------------------------------
3030 This document details the changes between this version, bash-4.3-release, and
3031 the previous version, bash-4.3-rc2.
3035 a. 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
3039 b. 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 ||.
3042 c. Changed the handling of unquoted backslashes in regular expressions to be
3045 d. globstar (**) no longer traverses symbolic links that resolve to
3046 directories. This eliminates some duplicate entries.
3048 e. Fixed a bug that caused a SIGCHLD trap handler to not be able to change the
3049 SIGCHLD disposition.
3051 f. Fixed a bug that caused a crash when -x was enabled and a command
3052 contained a printable multibyte (wide) character.
3054 g. Fixed a bug that caused an interactive shell without line editing enabled
3055 to read invalid data after receiving a SIGINT.
3057 h. 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.
3060 i. Fixed a bug that caused a shell with -v enabled to print commands in $()
3063 2. Changes to Readline
3065 a. Fixed a bug that caused `undo' to reference freed memory or null pointers.
3067 3. New Features in Bash
3069 a. The [[ -v ]] option now understands array references (foo[1]) and returns
3070 success if the referenced element has a value.
3072 ------------------------------------------------------------------------------
3073 This document details the changes between this version, bash-4.3-rc2, and the
3074 previous version, bash-4.3-rc1.
3078 a. Fixed a bug that left variables set by printf -v marked as invisible.
3080 b. Fixed an off-by-one error in a job control warning message.
3082 c. Fixed a bug that caused the shell to crash after declaring a nameref variable
3085 d. Fixed a bug that caused asynchronous commands to not set $? correctly.
3087 e. Fixed a bug that caused out-of-order execution when executing aliases with
3088 embedded newlines containing `.' commands.
3090 f. Fixed a bug that caused error messages generated by expansion errors in
3091 `for' commands to have the wrong line number.
3093 g. Fixed a bug that caused the `wait' builtin to not be interruptible in an
3094 interactive shell with job control enabled.
3096 h. Fixed a bug that caused SIGINT and SIGQUIT to not be trappable in
3097 asynchronous subshell commands.
3099 i. Bash now requires that the value assigned to a nameref variable be a valid
3100 shell identifier (variable name or array reference).
3102 j. Converting an existing variable to a nameref variable now turns off the
3103 -i/-l/-u/-c attributes.
3105 k. Displaying a nameref variable with `declare -p' now displays the nameref
3106 variable and its value rather than following the nameref chain.
3108 l. Fixed a problem with interrupt handling that caused a second and subsequent
3109 SIGINT to be ignored by interactive shells.
3111 m. Fixed a bug that caused certain positional parameter and array expansions
3112 to mishandle (discard) null positional parameters and array elements.
3114 n. 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).
3118 o. The shell now handles backslashes in regular expression arguments to the
3119 [[ command's =~ operator slightly differently, resulting in more
3120 consistent behavior.
3122 2. Changes to Readline
3124 a. Fixed a bug that could cause readline to crash and seg fault attempting to
3125 expand an empty history entry.
3127 b. Fixed a bug that caused a bad entry in the $LS_COLORS variable to abort all
3128 color processing but leave color enabled.
3130 c. Fixed a bug that caused display problems with multi-line prompts containing
3131 invisible characters on multiple lines.
3133 d. Fixed a bug that caused effects made by undoing changes to a history line to
3136 3. New Features in Bash
3138 4. New Features in Readline
3140 a. 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 ------------------------------------------------------------------------------
3143 This document details the changes between this version, bash-4.3-rc1, and the
3144 previous version, bash-4.3-beta2.
3148 a. Fixed a bug in bash completion that caused a tilde to be expanded even if
3149 the `direxpand' option was not enabled.
3151 b. Fixed a potential bug that could cause corrupted input in interactive shells
3152 running without line editing and with `ignoreeof' enabled.
3154 c. Fixed a bug that could cause failures when opening pipes back to shells
3155 created to run process substitutions.
3157 d. 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.
3160 e. Changed the way redirections are printed to avoid confusion when the target
3161 of an output redirection is a process substitution beginning with `>'.
3163 2. Changes to Readline
3165 a. Shared library building is now supported on Mac OS X 10.9 (Darwin 13).
3167 3. New Features in Bash
3169 a. `cd' has a new `-@' option to browse a file's extended attributes on
3170 systems that support O_XATTR.
3172 4. New Features in Readline
3174 a. There are additional default key bindings for MinGW32
3176 ------------------------------------------------------------------------------
3177 This document details the changes between this version, bash-4.3-beta2, and the
3178 previous version, bash-4.3-beta.
3182 a. Fixed a bug that caused assignment to an unset variable using a negative
3183 subscript to result in a segmentation fault.
3185 b. Fixed a bug that caused assignment to a string variable using a negative
3186 subscript to use the incorrect index.
3188 c. Fixed a bug that caused some strings to be interpreted as invalid
3189 extended globbing expressions when used with the help builtin.
3191 d. Fixed a bug that caused an attempt to trap a signal whose disposition
3192 cannot be changed to reference uninitialized memory.
3194 e. Command completion now skips assignment statements preceding a command
3195 name and completes the command.
3197 f. Fixed a bug that caused `compgen -f' in a non-interactive shell to dump
3198 core under certain circumstances.
3200 g. Fixed a bug that caused the `read -N' to misbehave when the input stream
3203 2. Changes to Readline
3205 a. 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
3209 b. Fixed a bug that caused an arrow key typed to an incremental search prompt
3210 to process the key sequence incorrectly.
3212 c. Additional key bindings for arrow keys on MinGW.
3214 3. New Features in Bash
3216 a. The help builtin now attempts substring matching (as it did through
3217 bash-4.2) if exact string matching fails.
3219 b. The fc builtin now interprets -0 as the current command line.
3221 c. Completing directory names containing shell variables now adds a trailing
3222 slash if the expanded result is a directory.
3224 4. New Features in Readline
3226 a. 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).
3230 ------------------------------------------------------------------------------
3231 This document details the changes between this version, bash-4.3-beta, and the
3232 previous version, bash-4.3-alpha.
3236 a. Fixed a bug in the prompt directory name "trimming" code that caused
3237 memory corruption and garbled the results.
3239 b. 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.
3243 c. 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.
3247 d. 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
3251 e. Fixed a bug that caused constructs like 1<(2) to be interpreted as process
3252 substitutions even in an arithmetic context.
3254 f. Fixed several cases where `invisible' variables (variables with attributes
3255 but no values, which are technically unset) were treated incorrectly.
3257 g. Fixed a bug that caused group commands in pipelines that were not the
3258 last element to not run the EXIT trap.
3260 h. Fixed a bug that caused `unset -n' to not unset a nameref variable in
3263 i. 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
3267 j. Fixed a bug that caused trap handlers to be executed recursively,
3268 corrupting internal data structures.
3270 k. Fixed a bug that could result in bash not compiling if certain options were
3273 l. Fixed a bug that caused the arithmetic expansion code to attempt variable
3274 assignments when operator precedence prohibited them.
3276 m. Word expansions like ${foo##bar} now understand indirect variable references.
3278 n. Fixed a bug that caused `declare -fp name' to not display a function
3281 o. 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.
3285 2. Changes to Readline
3287 a. Fixed a bug in vi mode that caused the arrow keys to set the saved last
3288 vi-mode command to the wrong value.
3290 b. Fixed a bug that caused double-quoted strings to be scanned incorrectly
3291 when being used as the value of a readline variable assignment.
3293 c. Fixed a bug with vi mode that prevented `.' from repeating a command
3294 entered on a previous line (command).
3296 d. Fixed a bug that could cause completion to core dump if it was interrupted
3299 e. Readline now sends the meta-key enable string to the terminal if the
3300 terminal has been successfully initialized.
3302 f. Readline now calls the signal hook after resizing the terminal when it
3303 receives a SIGWINCH.
3305 g. 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.
3308 3. New Features in Bash
3310 a. Shells started to run process substitutions now run any trap set on EXIT.
3312 b. There is now a configure-time option to enable the globasciiranges option
3315 c. The read builtin now checks its first variable argument for validity before
3316 trying to read any input.
3318 ------------------------------------------------------------------------------
3319 This document details the changes between this version, bash-4.3-alpha,
3320 and the previous version, bash-4.2-release.
3324 a. Fixed several bugs concerning incomplete bracket expressions in filename
3325 generation (globbing) patterns.
3327 b. Fixed a bug with single quotes and WORD in ${param op WORD} when running
3330 c. 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.
3333 d. Fixed a bug that caused the tzset() function to not work after changing
3334 the TZ environment variable.
3336 e. Fixed a bug that caused the RHS of an assignment statement to undergo
3337 word splitting when it contained an unquoted $@.
3339 f. Fixed bugs that caused the shell to not react to a SIGINT sent while
3340 waiting for a child process to exit.
3342 g. 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.
3346 h. Fixed a bug that caused bash to go into an infinite loop if a filename
3347 to be matched contained an invalid multibyte character.
3349 i. Fixed a bug that caused PS4 to end up being truncated if it is longer
3352 j. Fixed a bug that caused brace expansion to not skip over double-quoted
3353 command substitution.
3355 k. System-specific updates for: DJGPP, HP/UX, Mac OS X
3357 l. Fixed a bug in displaying commands that caused redirections to be associated
3358 with the wrong part of the command.
3360 m. Fixed the coproc cleanup to unset the appropriate shell variables when a
3363 n. Fixed a bug that caused `fc' to dump core due to incorrect calculation of
3364 the last history entry.
3366 o. Added workarounds for FreeBSD's implementation of faccessat/eaccess and
3369 p. Fixed a bug that caused the shell to not match patterns containing
3372 q. Fixed a bug that could result in doubled error messages when the `printf'
3373 builtin got a write error.
3375 r. Fixed a bug that caused the shell to not correctly expand words containing
3376 multiple consecutive quoted empty strings (""""""aa).
3378 s. Fixed a bug that caused the shell to not correctly parse multi-line
3379 process substitutions containing comments and quoted strings.
3381 t. 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.
3385 u. There are changes to the expansions performed on compound array assignments,
3386 in an effort to make foo=( [ind1]=bar [ind2]=baz ) identical to
3387 foo[ind1]=bar foo[ind2]=baz.
3389 v. Bash now reports an error if `read -a name' is used when `name' is an
3390 existing associative array.
3392 w. Fixed a bug that allowed an attempted assignment to a readonly variable
3393 in an arithmetic expression to not return failure.
3395 x. Fixed several bugs that caused completion functions to be invoked even when
3396 the cursor was before the first word in the command.
3398 y. Fixed a bug that caused parsing a command substitution to overwrite the
3399 parsing state associated with the complete input line.
3401 z. Fixed several bugs with the built-in snprintf replacement and field widths
3404 aa. Fixed a bug that caused incorrect offset calculations and input buffer
3405 corruption when reading files longer than 2^31 bytes.
3407 bb. Fixed several bugs where bash performed arithmetic evaluation in contexts
3408 where evaluation is suppressed.
3410 cc. 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.
3414 dd. Added checks for printable (and non-printable) multibyte characters for
3415 use in error messages.
3417 ee. Fixed a bug that caused ^O (operate-and-get-next) to not work correctly
3418 at the end of the history list.
3420 ff. Fixed a bug that caused command-oriented history to incorrectly combine
3421 here documents into one line.
3423 gg. 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.
3426 hh. Fixed a bug that caused the shell to delete an extra history entry when
3429 ii. Fixed a bug that caused floating-point exceptions and overflow errors
3430 for the / and % arithmetic operators when using INTMAX_MIN and -1.
3432 jj. Fixed a bug that caused parsing errors when reading an arithmetic for
3433 loop inside a command substitution.
3435 kk. Fixed a bug that caused a readonly function to be unset when unset was
3436 called without the -f or -v option.
3438 ll. 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
3442 mm. Fixed a bug that caused redirections to fail because the file descriptor
3443 limit was set to a value less than 10.
3445 nn. Fixed a bug that caused the `read' builtin to execute code in a signal
3446 handler context if read timed out.
3448 oo. Fixed a bug that caused extended globbing patterns to not match files
3449 beginning with `.' correctly when a `.' was explicitly supplied in the
3452 pp. Fixed a bug that caused key sequences longer than two characters to not
3453 work when used with `bind -x'.
3455 qq. Fixed a bug that resulted in redefined functions having the wrong source
3456 file names in BASH_SOURCE.
3458 rr. 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
3461 ss. Fixed a bug that caused `bash -m script' to not enable job control while
3464 tt. Fixed a bug that caused `printf -v var' to dump core when used with the
3467 uu. 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.
3470 vv. 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).
3474 ww. Fixed a bug that caused a redirection to misbehave if the number specified
3475 for a file descriptor overflows an intmax_t.
3477 xx. 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 $'...'.
3480 yy. Fixed a bug that caused tildes to not be escaped in expanded filenames,
3481 making them subject to later expansion.
3483 zz. 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.
3488 aaa. Fixed the rest of the cases where the shell runs non-allowed code in a
3489 signal handler context.
3491 bbb. 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.
3494 ccc. 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
3498 ddd. Fixed several bugs that caused `declare -g' to not set the right global
3499 variables or to misbehave when declaring global indexed arrays.
3501 eee. Fixed a logic bug that caused extended globbing in a multibyte locale to
3502 cause failures when using the pattern substititution word expansions.
3504 fff. Fixed a bug that caused the `lastpipe' option to corrupt the file
3505 descriptor used to read the script.
3507 ggg. 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.
3511 hhh. 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.
3514 iii. Fixed a bug that caused the shell to misbehave when generating sequences
3515 and the boundary values overflow an intmax_t.
3517 jjj. Fixed a bug caused expansion errors if an expansion of "$@" appeared
3518 next to another expansion (e.g.. "${@}${x}").
3520 kkk. Fixed a potential buffer overflow bug when performing /dev/fd expansion.
3522 lll. Fixed a bug that resulted in an extra semicolon being added to compound
3523 assignments when they were added to the history list.
3525 mmm. Fixed a bug that caused mapfile to read one extra line from the input.
3527 nnn. Fixed a bug that caused the mail checking code to use uninitialized
3530 ooo. Fixed a bug that prevented history timestamps from being saved if the
3531 history comment character is unset.
3533 ppp. Fixed a bug that caused the case-modifying expansions to not work with
3534 multibyte characters.
3536 qqq. 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
3540 rrr. 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.
3543 sss. Fixed a bug that caused asynchronous group commands to not run any EXIT
3544 trap defined in the body of the command.
3546 ttt. Fixed a bug that caused `eval "... ; return"' to not clean up properly.
3548 uuu. Fixed a bug that caused the shell to dump core if `read' reads an escaped
3549 IFS whitespace character.
3551 vvv. Fixed a bug that caused BASH_COMMAND to be set to an incorrect value when
3552 executing a (...) subshell.
3554 www. Fixed a couple of pointer aliasing bugs with the token string in arithmetic
3557 xxx. Fixed a bug with parsing multi-line command substitutions when reading
3558 the `do' keyword followed by whitespace.
3560 yyy. 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).
3563 zzz. Fixed a problem with displaying help topics in two columns when the
3564 translated text contained multibyte characters.
3566 aaaa. Fixed a bug with the extended globbing pattern matcher where a `*' was
3567 followed by a negated extended glob pattern.
3569 bbbb. 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.
3573 cccc. Fixed a bug where turning off `errexit' in command substitution subshells
3574 was not reflected in $SHELLOPTS.
3576 dddd. Partially fixed an inconsistency in how the shell treated shell
3577 functions run from an EXIT trap.
3579 eeee. Fixed a bug in how the shell invalidated FIFOs used for process
3580 substitution when executing a pipeline (once rather than in every child).
3582 ffff. Fixed a bug that occurred when expanding a special variable ($@, $*)
3583 within double quotes and the expansion resulted in an empty string.
3585 gggg. Fixed bugs with executing a SIGCHLD trap handler to make sure that it's
3586 executed once per exited child.
3588 hhhh. Fixed a bug that caused `declare' and `test' to find variables that
3589 had been given attributes but not assigned values. Such variables are
3592 iiii. Fixed a bug that caused commands in process substitutions to not look in
3593 the local temporary environment when performing word expansions.
3595 jjjj. Fixed several problems with globstar expansions (**/**) returning null
3596 filenames and multiple instances of the same pathname.
3598 kkkk. Fixed an oversight that did not allow the exit status of `coproc' to
3599 be inverted using `!'.
3601 llll. 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.
3604 mmmm. Fixed a (mostly theoretical) bug with input lines longer than SIZE_MAX.
3606 nnnn. Fixed a bug that could result in double evaluation of command
3607 substitutions when they appear in failed redirections.
3609 oooo. Fixed a bug that could cause seg faults during `mapfile' callbacks if
3610 the callback unsets the array variable mapfile is using.
3612 pppp. Fixed several problems with variable assignments using ${var:=value}
3613 when the variable assignment is supposed to have side effects.
3615 qqqq. 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.
3618 rrrr. Fixed several problems with IFS when it appears in the temporary environment
3619 and is used in redirections.
3621 ssss. Fixed a problem that caused IFS changes using ${IFS:=value} to modify
3622 how preceding expansions were split.
3624 tttt. Fixed a problem that caused subshells to not run an EXIT trap they set.
3626 uuuu. 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
3630 vvvv. 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.
3634 wwww. Fixed a problem that resulted in inconsistent expansion of $* and ${a[*]}.
3636 xxxx. Fixed a problem that caused `read -t' to crash when interrupted by
3639 yyyy. Fixed a problem that caused pattern removal to fail randomly because the
3640 pattern matcher read beyond the end of a string.
3642 zzzz. Fixed a bug that caused core dumps when shell functions tried to create
3643 local shadow copies of special variables like GROUPS.
3645 aaaaa. 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.
3649 bbbbb. Fixed a bug that caused redirections like <&n- to leave file descriptor
3650 n closed if executed with a builtin command.
3652 ccccc. Fixed a bug that caused incorrect completion quoting when completing a
3653 word containing a globbing character with `show-all-if-ambiguous' set.
3655 ddddd. 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
3659 2. Changes to Readline
3661 a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode
3662 commands to work on the entire line.
3664 b. Fixed a bug that caused redisplay problems with prompts longer than 128
3665 characters and history searches.
3667 c. 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.
3670 d. Fixed a bug that caused the `meta' key to be enabled beyond the duration
3671 of an individual call top readline().
3673 e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's
3674 redisplay to mishandle zero-width combining characters.
3676 f. 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.
3679 g. Fixed bugs that caused readline to execute code in a signal handler
3680 context if interrupted while reading from the file system during completion.
3682 h. Fixed a bug that caused readline to `forget' part of a key sequence when
3683 reading an unbound multi-character key sequence.
3685 i. Fixed a bug that caused Readline's signal handlers to be installed beyond
3686 the bounds of a single call to readline().
3688 j. Fixed a bug that caused the `.' command to not redo the most recent `R'
3691 k. Fixed a bug that caused ignoring case in completion matches to result in
3692 readline using the wrong match.
3694 l. Paren matching now works in vi insert mode.
3696 m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix
3699 n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone
3702 o. Fixed a bug that caused the filename comparison code to not compare
3703 multibyte characters correctly when using case-sensitive or case-mapping
3706 p. Fixed the input reading loop to call the input hook function only when there
3707 is no terminal input available.
3709 q. 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.
3713 r. Fixed several redisplay errors with multibyte characters and prompts
3714 containing invisible characters when using horizontal scrolling.
3716 s. Fixed a bug that caused redisplay errors when trying to overwrite
3717 existing characters using multibyte characters.
3719 3. New Features in Bash
3721 a. The `helptopic' completion action now maps to all the help topics, not just
3724 b. The `help' builtin no longer does prefix substring matching, so `help read'
3725 does not match `readonly'.
3727 c. The shell can be compiled to not display a message about processes that
3728 terminate due to SIGTERM.
3730 d. Non-interactive shells now react to the setting of checkwinsize and set
3731 LINES and COLUMNS after a foreground job exits.
3733 e. 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.
3737 f. There is a new shell option, `direxpand', which makes filename completion
3738 expand variables in directory names in the way bash-4.1 did.
3740 g. In Posix mode, the `command' builtin does not change whether or not a
3741 builtin it shadows is treated as an assignment builtin.
3743 h. The `return' and `exit' builtins accept negative exit status arguments.
3745 i. 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.
3750 j. 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.
3753 k. When compiled for strict Posix conformance, history expansion is disabled
3756 l. The history expansion character (!) does not cause history expansion when
3757 followed by the closing quote in a double-quoted string.
3759 m. `complete' and its siblings compgen/compopt now takes a new `-o noquote'
3760 option to inhibit quoting of the completions.
3762 n. Setting HISTSIZE to a value less than zero causes the history list to be
3763 unlimited (setting it 0 zero disables the history list).
3765 o. 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
3769 p. The `read' builtin now skips NUL bytes in the input.
3771 q. There is a new `bind -X' option to print all key sequences bound to Unix
3774 r. 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.
3778 s. The command completion code skips whitespace and assignment statements
3779 before looking for the command name word to be completed.
3781 t. The build process has a new mechanism for constructing separate help files
3782 that better reflects the current set of compilation options.
3784 u. The -nt and -ot options to test now work with files with nanosecond
3785 timestamp resolution.
3787 v. The shell saves the command history in any shell for which history is
3788 enabled and HISTFILE is set, not just interactive shells.
3790 w. 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.
3793 x. 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.
3797 y. 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).
3800 z. There is a new CHILD_MAX special shell variable; its value controls the
3801 number of exited child statuses the shell remembers.
3803 aa. There is a new configuration option (--enable-direxpand-default) that
3804 causes the `direxpand' shell option to be enabled by default.
3806 bb. 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
3810 cc. The `wait' builtin has a new `-n' option to wait for the next child to
3813 dd. The `printf' %(...)T format specifier now uses the current time if no
3814 argument is supplied.
3816 ee. There is a new variable, BASH_COMPAT, that controls the current shell
3817 compatibility level.
3819 ff. The `popd' builtin now treats additional arguments as errors.
3821 gg. 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
3825 4. New Features in Readline
3827 a. 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
3832 b. 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)
3836 c. 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.
3840 d. The history library creates a backup of the history file when writing it
3841 and restores the backup on a write error.
3843 e. 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
3848 f. New bindable function `print-last-kbd-macro', prints the most-recently-
3849 defined keyboard macro in a reusable format.
3851 g. New user-settable variable `colored-stats', enables use of colored text
3852 to denote file types when displaying possible completions (colored analog
3855 h. New user-settable variable `keyseq-timout', acts as an inter-character
3856 timeout when reading input or incremental search strings.
3858 i. New application-callable function: rl_clear_history. Clears the history list
3859 and frees all readline-associated private data.
3861 j. New user-settable variable, show-mode-in-prompt, adds a characters to the
3862 beginning of the prompt indicating the current editing mode.
3864 k. 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.
3868 l. 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.
3873 m. If the user-settable variable `history-size' is set to a value less than
3874 0, the history list size is unlimited.
3876 ------------------------------------------------------------------------------
3877 This document details the changes between this version, bash-4.2-release,
3878 and the previous version, bash-4.2-rc2.
3882 a. Fixed a bug that caused some variables to be clobbered by a longjmp,
3883 resulting in stack corruption.
3885 ------------------------------------------------------------------------------
3886 This document details the changes between this version, bash-4.2-rc2,
3887 and the previous version, bash-4.2-rc1.
3891 a. 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
3896 b. Fixed bug in select builtin that caused it to not terminate correctly if
3897 the read timed out due to $TMOUT.
3899 c. Fixed a problem that resulted in non-repeatable sequences of random
3900 numbers when RANDOM=0.
3902 ------------------------------------------------------------------------------
3903 This document details the changes between this version, bash-4.2-rc1,
3904 and the previous version, bash-4.2-beta.
3908 a. Fixed a bug that caused some redirection errors to leak file descriptors.
3910 b. Fixed a bug that caused unary `+' and `-' arithmetic operators to have a
3911 higher precedence than unary `!' and `~'.
3913 c. Fixed a bug that caused simple commands in a pipeline to affect the exit
3914 status ($?) seen by subsequent pipeline commands.
3916 d. 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.
3919 e. Fixed a bug that caused the read builtin to not return failure if an
3920 attempt is made to assign to a readonly variable.
3922 f. Fixed a bug that caused some builtin usage messages to not be translated.
3924 g. 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.
3927 h. Fixed the cd and pwd builtins to return failure if PWD is readonly and
3928 cannot be assigned to.
3930 i. 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.
3934 2. Changes to Readline
3936 a. Fixed a bug that caused directory names in words to be completed to not
3937 be dequoted correctly.
3939 3. New Features in Bash
3941 4. New Features in Readline
3943 ------------------------------------------------------------------------------
3944 This document details the changes between this version, bash-4.2-beta,
3945 and the previous version, bash-4.2-alpha.
3949 a. Fixed a bug that caused the \W prompt string escape to not add a closing
3952 b. Fixed a bug that caused partially-quoted words that were not subject to
3953 word splitting to retained quoted NULLs.
3955 c. Added considerable efficiency speedups when pattern matching in multibyte
3956 locales by skipping multibyte character functions where possible.
3958 d. Added considerable speedups to variable expansion when in multibyte locales.
3960 e. 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
3964 f. Fixed a bug that caused variable expansions preceding regular builtins to
3965 not change the shell environment during their execution.
3967 2. Changes to Readline
3969 a. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave
3970 as if it were a negative argument.
3972 ------------------------------------------------------------------------------
3973 This document details the changes between this version, bash-4.2-alpha,
3974 and the previous version, bash-4.1-release.
3978 a. Fixed a bug in the parser when processing alias expansions containing
3981 b. Fixed a memory leak in associative array expansion.
3983 c. Fixed a bug that caused quoted here-strings to be requoted when printed.
3985 d. Fixed a bug in arithmetic expansion that caused the index in an array
3986 expansion to be evaluated twice under certain circumstances.
3988 e. Fixed several bugs with the expansion and display of variables that have
3989 been given attributes but not values and are technically unset.
3991 f. Fixed a bug that caused core dumps when using filename completion that
3992 expands to a filename containing a globbing character.
3994 g. 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
3999 h. 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
4003 i. 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.
4007 j. Fixed a bug that caused some internal flag variables to be set
4008 incorrectly if `read -t' timed out.
4010 k. 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.
4014 l. Fixed a bug that caused execution of a trap to overwrite PIPESTATUS.
4016 m. Fixed a bug that caused here documents to not be displayed correctly
4017 when attached to commands inside compound commands.
4019 n. Fixed a bug that caused the printf builtin to use the wrong precision
4020 when using the `*' modifier.
4022 o. Fixed a bug that caused an arriving SIGCHLD to interrupt output functions
4023 like those invoked by echo or printf.
4025 p. Changed to use a more robust mechanism than eaccess(2) when test is
4026 checking filenames for execution permission.
4028 q. Fixed a bug that caused spurious semicolons to be added into the command
4029 history in certain cases.
4031 r. 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
4035 s. Fixed a bug that could cause the shell to dump core if using the `v'
4036 vi editing command on a multi-line command.
4038 t. 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.
4042 u. Fixed a bug that caused the history expansion functions to not recognize
4043 process substitution or extended glob patterns as single words.
4045 v. Fixed a bug that caused restricted shells to set a restricted command's
4046 exit status incorrectly.
4048 w. Fixed a bug that caused bash to ignore the wrong set of filenames when
4049 completing a command using the `complete-filename' readline command.
4051 x. Fixed a bug that caused a -PID argument following a -s sig or -n sig to
4052 not be interpreted as a signal specification.
4054 y. 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.
4058 z. Fixed a bug in \W prompt expansion that resulted in incorrect expansion
4059 in the event of overlapping strings.
4061 aa. Fixed a bug that caused the := parameter expansion operator to return the
4062 wrong value as the result of the expansion.
4064 bb. 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.
4069 cc. Fixed a bug that inadvertently allowed program names containing slashes
4070 to be entered into the command hash table.
4072 dd. Fixed a bug that caused the select builtin to incorrectly compute the
4073 display width of the arguments in the presence of multibyte characters.
4075 ee. 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.
4078 ff. Fixed a memory leak in the pattern removal parameter expansion.
4080 gg. Fixed a bug that caused SIGINT to fail to interrupt a nested loop if the
4081 loop was in a pipeline.
4083 hh. 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 `/'.
4086 ii. Fixed a bug that caused functions defined with the `function' reserved
4087 word to require braces around the function body.
4089 jj. Fixed a bug that caused bash to dump core when a variable expansion being
4090 used as an array subscript failed.
4092 kk. Fixed a bug that caused bash to dump core if the case-modification
4093 expansions were used on a variable with a null value.
4095 ll. 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.
4098 mm. The pattern substitution word expansion has been sped up dramatically
4099 when running in a locale with multibyte characters.
4101 nn. 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.
4105 oo. Fixed a bug that caused completion of a word with an unclosed `` command
4106 substitution to set the prompt incorrectly.
4108 pp. Fixed a bug that caused extended globbing patterns in $HISTIGNORE or
4109 $GLOBIGNORE to be incorrectly scanned.
4111 qq. Fixed a bug caused by closing file descriptors 3-20 on shell startup. The
4112 shell now sets them to close-on-exec.
4114 rr. Fixed a bug that caused the exit status of `exec file' to be set incorrectly
4115 if `file' was a directory.
4117 ss. 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.
4121 tt. Fixed a bug that caused `sh -c 'command exec; exit 1' to hang.
4123 uu. Fixed a bug in $(...) command substitution parsing that caused the shell
4124 to treat backslash-newline incorrectly when parsing a comment.
4126 vv. Fixed bug that caused brace expansion sequence generation to misbehave
4127 when supplied integers greater than 2**31 - 1.
4129 ww. Fixed a bug that caused failure to save file descriptors for redirections
4130 to corrupt shell file descriptors.
4132 xx. Fixed a bug that caused bash-forward-shellword to not correctly handle
4135 2. Changes to Readline
4137 a. Fixed a bug that caused the unconverted filename to be added to the list of
4138 completions when the application specified filename conversion functions.
4140 b. Fixed a bug that caused the wrong filename to be passed to opendir when the
4141 application has specified a filename dequoting function.
4143 c. Fixed a bug when repeating a character search in vi mode in the case where
4144 there was no search to repeat.
4146 d. 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.
4149 e. The full set of vi editing commands may now be used in callback mode.
4151 f. Fixed a bug that caused readline to not update its idea of the terminal
4152 dimensions while running in `no-echo' mode.
4154 h. Fixed a bug that caused readline to dump core if an application called
4155 rl_prep_terminal without setting rl_instream.
4157 i. Fixed a bug that caused meta-prefixed characters bound to incremental
4158 search forward or backward to not be recognized if they were typed
4161 j. 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.
4164 k. Fixed a bug in menu-complete that caused it to misbehave with large
4167 l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked
4168 at the end of the line.
4170 3. New Features in Bash
4172 a. `exec -a foo' now sets $0 to `foo' in an executable shell script without a
4175 b. 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.
4180 c. `trap -p' will now show signals ignored at shell startup, though their
4181 disposition still cannot be modified.
4183 d. $'...', echo, and printf understand \uXXXX and \UXXXXXXXX escape sequences.
4185 e. declare/typeset has a new `-g' option, which creates variables in the
4186 global scope even when run in a shell function.
4188 f. test/[/[[ have a new -v variable unary operator, which returns success if
4189 `variable' has been set.
4191 g. Posix parsing changes to allow `! time command' and multiple consecutive
4192 instances of `!' (which toggle) and `time' (which have no cumulative
4195 h. 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.
4198 j. $((...)) is always parsed as an arithmetic expansion first, instead of as
4199 a potential nested command substitution, as Posix requires.
4201 k. A new FUNCNEST variable to allow the user to control the maximum shell
4202 function nesting (recursive execution) level.
4204 l. The mapfile builtin now supplies a third argument to the callback command:
4205 the line about to be assigned to the supplied array index.
4207 m. The printf builtin has a new %(fmt)T specifier, which allows time values
4208 to use strftime-like formatting.
4210 n. There is a new `compat41' shell option.
4212 o. The cd builtin has a new Posix-mandated `-e' option.
4214 p. Negative subscripts to indexed arrays, previously errors, now are treated
4215 as offsets from the maximum assigned index + 1.
4217 q. Negative length specifications in the ${var:offset:length} expansion,
4218 previously errors, are now treated as offsets from the end of the variable.
4220 r. Parsing change to allow `time -p --'.
4222 s. 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.
4226 t. 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.
4230 u. History expansion no longer expands the `$!' variable expansion.
4232 v. 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.
4235 w. 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.
4239 x. Posix-mode shells use the argument passed to `.' as-is if a $PATH search
4240 fails, effectively searching the current directory. Posix-2008 change.
4242 4. New Features in Readline
4244 a. 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.
4248 b. New bindable variable `completion-display-width' to set the number of
4249 columns used when displaying completions.
4251 c. New bindable variable `completion-case-map' to cause case-insensitive
4252 completion to treat `-' and `_' as identical.
4254 d. There are new bindable vi-mode command names to avoid readline's case-
4255 insensitive matching not allowing them to be bound separately.
4257 e. 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.
4261 ------------------------------------------------------------------------------
4262 This document details the changes between this version, bash-4.1-rc,
4263 and the previous version, bash-4.1-beta.
4267 a. Fixed a bug that caused printf to not return a partial value when it
4268 encountered an error while converting an integer argument.
4270 b. Fixed a bug that caused setting one of the compatNN options to not
4271 turn off the others.
4273 c. The (undocumented) --wordexp option is no longer included by default.
4275 d. Fixed a bug in conditional command execution that caused it to not
4276 correctly ignore the exit status under certain circumstances.
4278 e. Added a configure-time check for correctly-working asprintf/snprintf.
4280 f. Fixed some problems with line number calculation and display when sourcing
4281 a file in an interactive shell.
4283 g. Fixed a bug that caused the shell to crash when using `declare -A foo=bar'.
4285 h. Fixed a bug that caused an off-by-one error when calculating the directories
4286 to display with the PROMPT_DIRTRIM option.
4288 2. Changes to Readline
4290 a. Fixed a bug that caused applications using the callback interface to not
4291 react to SIGINT (or other signals) until another character arrived.
4293 ------------------------------------------------------------------------------
4294 This document details the changes between this version, bash-4.1-beta,
4295 and the previous version, bash-4.1-alpha.
4299 a. Fixed a bug in mapfile that caused the shell to crash if it was passed the
4300 name of an associative array.
4302 b. Fixed a bug that caused the shell to incorrectly split case patterns if
4303 they contained characters in $IFS.
4305 c. 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.
4309 d. Fixed a bug that caused the shell to read commands incorrectly if an
4310 expansion error occurred under certain conditions in a user-specified
4313 e. 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.)
4316 f. Fixed a bug that caused the shell to attempt command substitution
4317 completion within a single-quoted string.
4319 g. Fixed a bug that caused the shell to insert an extra single quote during
4322 h. Fixed a bug that caused the shell to crash if invoked with the environment
4323 variable EMACS having a null value.
4325 i. Fixed a bug that caused bash to incorrectly report the presence of new
4326 mail in a `maildir' environment.
4328 j. Fixed a bug that caused the shell to not recognize a here-document ending
4329 delimiter inside a command substitution.
4331 k. Fixed a bug that caused the shell to crash when a a dynamic array variable
4332 was assigned a scalar value.
4334 2. Changes to Readline
4336 3. New Features in Bash
4338 a. The mapfile/readarray builtin no longer stores the commands it invokes via
4339 callbacks in the history list.
4341 b. There is a new `compat40' shopt option.
4343 c. 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).
4346 4. New Features in Readline
4348 ------------------------------------------------------------------------------
4349 This document details the changes between this version, bash-4.1-alpha,
4350 and the previous version, bash-4.0-release.
4354 a. Fixed bugs in the parser involving new parsing of the commands contained
4355 in command substitution when the substitution is read.
4357 b. Fixed a bug that caused the shell to dump core when performing programmable
4358 completion using a shell function.
4360 c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong
4363 d. Fixed a bug that caused the shell to dump core when listing jobs in the
4366 e. Fixed several bugs encountered when reading subscripts in associative
4367 array assignments and expansions.
4369 f. Fixed a bug that under some circumstances caused an associative array to
4370 be converted to an indexed array.
4372 g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set
4373 $? to a value > 128.
4375 h. Fixed a bug that caused the shell to remove FIFOs associated with process
4376 substitution inside shell functions.
4378 i. Fixed a bug that caused terminal attributes to not be reset when the
4379 `read' builtin timed out.
4381 j. Fixed a bug in brace expansion that caused unwanted zero padding of the
4384 k. Fixed a bug that prevented the |& construct from working as intended when
4385 used with a simple command with additional redirections.
4387 l. Fixed a bug with the case statement ;& terminator that caused the shell to
4388 dereference a NULL pointer.
4390 m. Fixed a bug that caused assignment statements or redirections preceding
4391 a simple command name to inhibit alias expansion.
4393 n. 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
4397 o. Fixed a bug that caused double-quoted expansions of $* inside word
4398 expansions like ${x#$*} to not expand properly when $IFS is empty.
4400 p. Fixed a bug that caused traps to set $LINENO to the wrong value when they
4403 q. Fixed a bug that caused off-by-one errors when computing history lines in
4406 r. 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)
4410 s. Fixed a bug that caused the shell to attempt to add empty lines to the
4411 history list when reading here documents.
4413 t. Made some internal changes that dramatically speeds up sequential indexed
4416 u. 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.
4419 v. Fixed a bug that caused the shell to replace too many characters when a
4420 pattern match was null in a ${foo//bar} expansion.
4422 w. Fixed bugs in the expansion of ** that caused duplicate directory names
4423 and the contents of the current directory to be omitted.
4425 x. Fixed a bug that caused $? to not be set correctly when referencing an
4426 unset variable with set -u and set -e enabled.
4428 y. 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.
4432 z. Fixed a bug that caused the ** glob expansion to dump core if it
4433 encountered an unsearchable directory.
4435 aa. Fixed a bug that caused `command -v' and `command -V' to not honor the
4436 path set by the -p option.
4438 bb. Fixed a bug that caused brace expansion to take place too soon in some
4439 compound array assignments.
4441 cc. Fixed a bug that caused programmable completion functions' changes to
4442 READLINE_POINT to not be reflected back to readline.
4444 dd. Fixed a bug that caused the shell to dump core if a trap was executed
4445 during a shell assignment statement.
4447 ee. Fixed an off-by-one error when computing the number of positional
4448 parameters for the ${@:0:n} expansion.
4450 ff. Fixed a problem with setting COMP_CWORD for programmable completion
4451 functions that could leave it set to -1.
4453 gg. 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.
4456 hh. Fixed a bug that caused changes made by `compopt' to not persist past the
4457 completion function in which compopt was executed.
4459 ii. Fixed a bug that caused the list of hostname completions to not be cleared
4460 when HOSTNAME was unset.
4462 jj. Fixed a bug that caused variable expansion in here documents to look in
4463 any temporary environment.
4465 kk. 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.
4470 ll. 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.
4473 mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to
4474 not contain the correct number of digits.
4476 nn. 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
4480 oo. Fixed a memory leak in the ${!prefix@} expansion.
4482 pp. Fixed a bug that caused printf to not correctly report all write errors.
4484 qq. Fixed a bug that caused single and double quotes to act as delimiters
4485 when splitting a command line into words for programmable completion.
4487 rr. Fixed a bug that caused ** globbing that caused **/path/* to match every
4488 directory, not just those matching `path'.
4490 ss. 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.
4493 2. Changes to Readline
4495 a. The SIGWINCH signal handler now avoids calling the redisplay code if
4496 one arrives while in the middle of redisplay.
4498 b. Changes to the timeout code to make sure that timeout values greater
4499 than one second are handled better.
4501 c. Fixed a bug in the redisplay code that was triggered by a prompt
4502 containing invisible characters exactly the width of the screen.
4504 d. Fixed a bug in the redisplay code encountered when running in horizontal
4507 e. Fixed a bug that prevented menu completion from properly completing
4510 f. Fixed a redisplay bug caused by a multibyte character causing a line to
4513 g. 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
4517 h. Fixed a bug that caused history expansion to be attempted on $'...'
4518 single-quoted strings.
4520 i. Fixed a bug that caused incorrect redisplay when the prompt contained
4521 multibyte characters in an `invisible' sequence bracketed by \[ and
4524 j. Fixed a bug that caused history expansion to short-circuit after
4525 encountering a multibyte character.
4527 3. New Features in Bash
4529 a. Here-documents within $(...) command substitutions may once more be
4530 delimited by the closing right paren, instead of requiring a newline.
4532 b. Bash's file status checks (executable, readable, etc.) now take file
4533 system ACLs into account on file systems that support them.
4535 c. Bash now passes environment variables with names that are not valid
4536 shell variable names through into the environment passed to child
4539 d. 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
4543 e. `printf -v' can now assign values to array indices.
4545 f. New `complete -E' and `compopt -E' options that work on the "empty"
4546 completion: completion attempted on an empty command line.
4548 g. 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.
4555 h. When displaying associative arrays, subscripts are now quoted.
4557 i. 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.
4561 j. The [[ and (( commands are now subject to the setting of `set -e' and the
4564 k. The source/. builtin now removes NUL bytes from the file before attempting
4567 l. There is a new configuration option (in config-top.h) that forces bash to
4568 forward all history entries to syslog.
4570 m. A new variable $BASHOPTS to export shell options settable using `shopt' to
4573 n. There is a new configure option that forces the extglob option to be
4576 o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
4577 output to that file descriptor.
4579 p. 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.
4583 q. The < and > operators to the [[ conditional command now do string
4584 comparison according to the current locale.
4586 r. Programmable completion now uses the completion for `b' instead of `a'
4587 when completion is attempted on a line like: a $(b c.
4589 s. Force extglob on temporarily when parsing the pattern argument to
4590 the == and != operators to the [[ command, for compatibility.
4592 t. 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.
4595 u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS
4596 characters, ignoring delimiters like newline.
4598 4. New Features in Readline
4600 a. New bindable function: menu-complete-backward.
4602 b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
4603 and C-p to menu-complete-backward.
4605 c. 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.
4609 d. 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
4613 e. New application-settable function: rl_filename_rewrite_hook. Can be used
4614 to rewrite or modify filenames read from the file system before they are
4615 compared to the word to be completed.
4617 f. 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.
4622 g. 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.
4625 h. 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.
4629 i. 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.
4633 ------------------------------------------------------------------------------
4634 This document details the changes between this version, bash-4.0-release,
4635 and the previous version, bash-4.0-rc1.
4639 a. Changed the message printed when setlocale(3) fails to only include the
4640 strerror error text if the call changes errno.
4642 b. Changed trap command execution to reset the line number before running a
4643 trap (except DEBUG and RETURN traps).
4645 c. Fixed behavior of case-modifiying word expansions to not work on
4646 individual words within a variable's value.
4648 d. Fixed a bug that caused mapfile to not be interruptible when run in an
4651 e. Fixed a bug that caused mapfile to not run callbacks for the first line
4654 f. Fixed a bug that caused mapfile to not honor EOF typed in an interactive
4657 g. Fixed the coprocess reaping code to not run straight from a signal handler.
4659 h. Fixed a bug that caused printf -b to ignore the first % conversion specifier
4660 in the format string on 64-bit systems.
4662 i. Fixed a bug that caused incorrect word splitting when `:', `=', or `~'
4665 j. Fixed a bug that caused data corruption in the programmable completion code
4666 when a shell function called from a completion aborted execution.
4668 k. Fixed a bug that caused the CPU usage reported by the `time' builtin to be
4671 l. Changed behavior of shell when -e option is in effect to reflect consensus
4672 of Posix shell standardization working group.
4674 m. 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.
4678 2. Changes to Readline
4680 a. Fixed a bug that caused !(...) extended glob patterns to inhibit later
4683 b. Reworked the signal handling to avoid calling disallowed functions from a
4686 3. New Features in Bash
4688 a. `readarray' is now a synonym for `mapfile'.
4689 ------------------------------------------------------------------------------
4690 This document details the changes between this version, bash-4.0-rc1,
4691 and the previous version, bash-4.0-beta2.
4695 a. Fixed a bug that caused parsing errors when a $()-style command
4696 substitution was followed immediately by a quoted newline.
4698 b. Fixed a bug that caused extended shell globbing patterns beginning with
4699 `*(' to not work when used with pattern substitution word expansions.
4701 ------------------------------------------------------------------------------
4702 This document details the changes between this version, bash-4.0-beta2,
4703 and the previous version, bash-4.0-beta.
4707 a. Fixed a bug that caused failed word expansions to set $? but not
4710 b. Changed filename completion to quote the tilde in a filename with a
4711 leading tilde that exists in the current directory.
4713 c. Fixed a bug that caused a file descriptor leak when performing
4714 redirections attached to a compound command.
4716 d. 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.
4719 e. Fixed a bug that resulted in bash not terminating immediately if a
4720 terminating signal was received while performing output.
4722 f. Fixed a bug that caused the shell to crash after creating 256 process
4723 substitutions during word completion.
4725 2. Changes to Readline
4727 a. Fixed a bug that caused redisplay errors when using prompts with invisible
4728 characters and numeric arguments to a command in a multibyte locale.
4730 b. Fixed a bug that caused redisplay errors when using prompts with invisible
4731 characters spanning more than two physical screen lines.
4733 ------------------------------------------------------------------------------
4734 This document details the changes between this version, bash-4.0-beta,
4735 and the previous version, bash-4.0-alpha.
4739 a. Fixed a typo that caused a variable to be used before initialization
4740 while parsing Posix-style command substitutions.
4742 b. 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-
4746 c. Fixed a bug that could cause strings not converted to numbers by strtol
4747 to be treated as if the conversion had been successful.
4749 d. The `return' builtin now accepts no options and requires a `--' before
4750 a negative return value, as Posix requires.
4752 e. Fixed a bug that caused local variables to be created with the empty
4753 string for a value rather than no value.
4755 f. 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.
4758 g. Fixed a bug that caused `declare var' and `typeset var' to initialize
4759 `var' to the empty string.
4761 h. Changed `bind' builtin to print a warning but proceed if invoked when
4762 line editing is not active.
4764 i. 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.
4767 j. Fixed a bug that caused the shell to not run the exit trap in a command
4768 run with `bash -c' under some circumstances.
4770 k. Fixed a bug that caused parser errors to occasionally not set $? when
4771 running commands with `eval'.
4773 l. Fixed a bug that caused stray control characters when evaluating compound
4774 array assignments containing $'\x7f' escapes.
4776 m. Fixed a bug that caused redirections involving file descriptor 10 as the
4777 target to behave incorrectly.
4779 n. Fixed a bug that could cause memory to be freed multiple times when
4780 assigning to COMP_WORDBREAKS.
4782 o. Fixed a bug that could cause NULL pointer dereferences when COMP_WORDBREAKS
4785 2. Changes to Readline
4787 3. New Features in Bash
4789 a. 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.
4792 b. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
4795 c. 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.
4799 d. 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.
4803 4. New Features in Readline
4805 a. If the kernel supports it, readline displays special characters
4806 corresponding to a keyboard-generated signal when the signal is received.
4808 ------------------------------------------------------------------------------
4809 This document details the changes between this version, bash-4.0-alpha,
4810 and the previous version, bash-3.2-release.
4814 a. Fixed several bugs in old-style `` command substitution parsing, including
4815 comment parsing and quoted string handling.
4817 b. Fixed problems parsing arguments to the [[ command's =~ regular expression
4818 matching operator: metacharacter and whitespace parsing.
4820 c. Fixed a bug that caused the shell to inappropriately reuse high-numbered
4821 file descriptors it used internally.
4823 d. 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.
4827 e. Fixed several problems with the asprintf and snprintf replacement functions
4828 that caused hangs and crashes.
4830 f. Fixed a bug in the calculation of the current and previous job that caused
4831 it to refer to incorrect jobs.
4833 g. Fixed a bug in the check for the validity of a hashed command pathname that
4834 caused unnecessary hash table deletions and additions.
4836 h. Fixed a bug that caused child processes to inherit the wrong value for $!.
4838 i. Fixed a bug that caused `.' to fail to read and execute commands from non-
4839 regular files such as devices or named pipes.
4841 j. Fixed a bug in printf formatting for the %x and %X expansions that occurred
4844 k. Fixed a bug that caused the shell to crash when creating temporary files if
4845 $TMPDIR named a non-writable directory.
4847 l. Fixed a bug that caused the shell to ignore $TMPDIR when creating temporary
4848 files under some circumstances.
4850 m. Fixed a bug that caused named pipes created by process substitution to not
4853 n. Fixed a bug that caused HISTTIMEFORMAT to not be honored when it appeared
4854 in the initial shell environment.
4856 o. 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 @.
4860 p. 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.
4864 q. Made a change to the default locale initialization code that should
4865 result in better behavior from the locale-aware library functions.
4867 r. Fixed a bug that caused compacting the jobs list to drop jobs.
4869 s. 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.
4872 t. Fixed a bug that caused characters that would be escaped internally to be
4873 doubled when escaped with a backslash.
4875 u. Fixed the initialization of mailboxes to not cause maildirs to be read
4876 (and stat(2) called for every message file) at shell startup.
4878 v. Fixed a bug that caused the shell to not display $PS2 when the read builtin
4879 reads a line continued with a backslash.
4881 w. Fixed a bug that caused errors in word splitting when $IFS contained
4882 characters used for internal quoting.
4884 x. Fixed bugs that caused problems with output from shell builtins not being
4885 completely displayed on some systems.
4887 y. Fixed a bug that caused output to be lost when a redirection is acting on
4888 the shell's output file descriptor.
4890 z. Fixed bugs caused by shell builtins not checking for all write errors.
4892 aa. 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
4896 bb. Fixed a bug that caused bash to loop infinitely after creating and
4897 waiting for 4096 jobs.
4899 cc. Fixed a bug that caused bash to lose the status of a background job under
4900 certain circumstances.
4902 dd. Fixed a bug that caused bash to not look in the temporary environment
4903 when performing variable lookup under certain circumstances.
4905 ee. Fixed a bug that caused bash to close file descriptors greater than 10
4906 when they were used in redirections.
4908 ff. Fixed a problem that caused the shell to attempt to read from the standard
4909 input when called as `bash -i script'.
4911 gg. Fixed a memory leak and variable initialization problems when the -v option
4912 was supplied to `printf' that could cause incorrect results.
4914 hh. Fixed a bug that caused the `read' builtin to count bytes when the -n option
4915 was supplied, rather than (possibly multibyte) characters.
4917 ii. Fixed a bug when displaying a function due to not converting the function
4918 to an external form.
4920 jj. Changed job control initialization to ensure that the shell has a tty
4921 as its controlling terminal before enabling job control.
4923 kk. Fixed a bug with the `test' builtin that caused it to misinterpret
4924 arguments beginning with `-' but containing more than one character.
4926 ll. Fixed bug that could cause the shell to dump core in certain cases where
4927 a command sets the SIGINT disposition to the default.
4929 mm. Fixed a bug in the pattern replacement (affecting both word expansion
4930 and the `fc' builtin) that occurred when the pattern and replacement
4933 nn. Fixed a bug that caused an arithmetic evaluation error to disable all
4936 oo. Fixed a bug in pathname expansion that caused it to interpret backslashes
4937 in the pathname as quoting characters.
4939 pp. Fixed a bug in the replacement getcwd() implementation that could cause
4940 memory to be overwritten.
4942 qq. When in Posix mode, the `ulimit' builtin now uses a block size of 512 for
4943 the `-c' and `-f' options.
4945 rr. Brace expansion now allows process substitutions to pass through unchanged.
4947 ss. 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.
4950 tt. Fixed a problem in the printf builtin that resulted in single-byte
4951 output for the "'" escape, even when using multibyte characters.
4953 uu. Fixed a bug that caused the failure exit status to be lost when redirections
4954 attached to a compound command failed.
4956 vv. Fixed a bug that caused the internal random number generator to not be
4957 re-seeded correctly when creating a subshell.
4959 ww. Fixed a bug that could cause the bash replacement getcwd to overwrite
4962 xx. 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.
4966 yy. 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.
4970 zz. Fixed a bug that caused the results of successful tilde expansion to be
4971 subject to pathname expansion and word splitting.
4973 aaa. 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.
4977 bbb. 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.
4981 ccc. Fixed a bug that caused incorrect expansion of ${array[@]:foo} if the
4982 first character of $IFS was not whitespace.
4984 ddd. Fixed a bug that occurred when scanning for the ending delimiter of a
4985 ${parameter/pat/sub} expansion.
4987 eee. Fixed a bug that caused the shell to inappropriately expand command
4988 substitutions in words when expanding directory names for completion.
4990 fff. Fixed a bug that caused the `fc' builtin to look too far back in the
4991 history list under certain circumstances.
4993 ggg. 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
4997 hhh. 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.
5001 iii. Fixed a bug that caused the shell to search $PATH for an argument to
5002 source/. even when it contained a `/'.
5004 jjj. Fixed a bug that caused brace expansion to misorder expansions when the
5005 locale did not have a collating order like aAbBcC...zZ.
5007 kkk. 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.
5010 lll. Fixed a bug with the precedence of the ?: conditional arithmetic operator.
5012 mmm. Fixed a bug that caused side effects of temporary variable assignments
5013 to persist in the shell environment.
5015 nnn. 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
5019 ooo. Fixed a bug that caused globbing characters and characters in $IFS to not
5020 be quoted appropriately when displaying assignment statements.
5022 ppp. 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.
5026 qqq. Fixed a bug that caused the shell to attempt to created variables with
5027 invalid names if such names appeared in the initial environment.
5029 rrr. Fixed a bug with quote removal in strings where the final character is a
5032 sss. 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.
5036 ttt. 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.
5040 uuu. Bash now parses command substitutions according to Posix rules: parsing
5041 the command contained in $() to find the closing delimiter.
5043 vvv. Fixed a bug that caused traps on SIGCHLD set in a SIGCHLD handler to
5046 www. Fixed a bug that didn't allow SIGCHLD to interrupt the `wait' builtin
5049 xxx. Invalid numeric arguments to shell builtins no longer cause the shell to
5050 short-circuit any executing compound command.
5052 yyy. Fixed a bug that caused the exit status to be lost when `break' was
5053 used to short-circuit a loop's execution.
5055 zzz. Fixed a bug that caused stray ^? characters to be left in expansions of
5058 aaaa. Bash now prints better error messages for here documents terminated by
5059 EOF and for identifying the incorrect token in an invalid arithmetic
5062 bbbb. Fixed a bug in the variable length word expansion that caused it to
5063 incorrectly calculate the number of multibyte characters.
5065 cccc. 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.
5069 dddd. 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.
5073 eeee. The shell displays more warnings about failures to set the locale.
5075 ffff. Fixed a bug that caused the body of a here-document to not be saved to
5078 gggg. Fixed a bug that caused configure to incorrectly conclude that FreeBSD
5079 had /dev/fd available, resulting in problems with process substitution.
5081 2. Changes to Readline
5083 a. Fixed a number of redisplay errors in environments supporting multibyte
5086 b. Fixed bugs in vi command mode that caused motion commands to inappropriately
5089 c. When using the arrow keys in vi insertion mode, readline allows movement
5090 beyond the current end of the line (unlike command mode).
5092 d. Fixed bugs that caused readline to loop when the terminal has been taken
5093 away and reads return -1/EIO.
5095 e. Fixed bugs in redisplay occurring when displaying prompts containing
5096 invisible characters.
5098 f. 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.
5101 g. 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.
5105 h. Fixed an off-by-one error that caused readline to drop every 511th
5106 character of buffered input.
5108 i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up.
5110 j. Fixed redisplay bugs caused by multiline prompts with invisible characters
5111 or no characters following the final newline.
5113 k. Fixed redisplay bug caused by prompts consisting solely of invisible
5116 l. Fixed a bug in the code that buffers characters received very quickly in
5117 succession which caused characters to be dropped.
5119 m. Fixed a bug that caused readline to reference uninitialized data structures
5120 if it received a SIGWINCH before completing initialization.
5122 n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly
5123 and therefore unrepeatable.
5125 o. 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.
5128 p. Readline now blocks SIGINT while manipulating internal data structures
5131 q. Fixed a bug in redisplay that caused readline to segfault when pasting a
5132 very long line (over 130,000 characters).
5134 r. Fixed bugs in redisplay when using prompts with no visible printing
5137 3. New Features in Bash
5139 a. When using substring expansion on the positional parameters, a starting
5140 index of 0 now causes $0 to be prefixed to the list.
5142 b. The `help' builtin now prints its columns with entries sorted vertically
5143 rather than horizontally.
5145 c. There is a new variable, $BASHPID, which always returns the process id of
5148 d. 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
5152 e. There is a new `checkjobs' option that causes the shell to check for and
5153 report any running or stopped jobs at exit.
5155 f. The programmable completion code exports a new COMP_TYPE variable, set to
5156 a character describing the type of completion being attempted.
5158 g. 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).
5161 h. If creation of a child process fails due to insufficient resources, bash
5162 will try again several times before reporting failure.
5164 i. The programmable completion code now uses the same set of characters as
5165 readline when breaking the command line into a list of words.
5167 j. The block multiplier for the ulimit -c and -f options is now 512 when in
5168 Posix mode, as Posix specifies.
5170 k. 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.
5176 l. 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.
5181 m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number
5182 of threads) options.
5184 n. The -p option to `declare' now displays all variable values and attributes
5185 (or function values and attributes if used with -f).
5187 o. There is a new `compopt' builtin that allows completion functions to modify
5188 completion options for existing completions or the completion currently
5191 p. The `read' builtin has a new -i option which inserts text into the reply
5192 buffer when using readline.
5194 q. A new `-E' option to the complete builtin allows control of the default
5195 behavior for completion on an empty line.
5197 r. There is now limited support for completing command name words containing
5198 globbing characters.
5200 s. Changed format of internal help documentation for all builtins to roughly
5201 follow man page format.
5203 t. 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.
5206 u. There is a new `mapfile' builtin to populate an array with lines from a
5209 v. 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
5213 w. 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.
5217 x. There is a new shell option: `dirspell'. When enabled, the filename
5218 completion code performs spelling correction on directory names during
5221 y. The `-t' option to the `read' builtin now supports fractional timeout
5224 z. 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.
5228 aa. 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.
5231 bb. 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,
5237 cc. There is a new &>> redirection operator, which appends the standard output
5238 and standard error to the named file.
5240 dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects
5241 the standard error for a command through a pipe.
5243 ee. 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.
5247 ff. 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.
5251 gg. 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 `...'.
5256 hh. 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.
5262 ii. The shell provides associative array variables, with the appropriate
5263 support to create, delete, assign values to, and expand them.
5265 jj. 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
5270 kk. 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.
5276 4. New Features in Readline
5278 a. 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).
5282 b. A new variable, rl_completion_invoking_key; allows applications to discover
5283 the key that invoked rl_complete or rl_menu_complete.
5285 c. The functions rl_block_sigint and rl_release_sigint are now public and
5286 available to calling applications who want to protect critical sections
5289 d. The functions rl_save_state and rl_restore_state are now public and
5290 available to calling applications; documented rest of readline's state
5293 e. A new user-settable variable, `history-size', allows setting the maximum
5294 number of entries in the history list.
5296 f. There is a new implementation of menu completion, with several improvements
5297 over the old; the most notable improvement is a better `completions
5300 g. The menu completion code now uses the rl_menu_completion_entry_function
5301 variable, allowing applications to provide their own menu completion
5304 h. 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 `...'.
5309 i. 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
5313 ------------------------------------------------------------------------------
5314 This document details the changes between this version, bash-3.2-release,
5315 and the previous version, bash-3.2-beta.
5319 a. Fixed a bug that caused the temporary environment passed to a command to
5320 affect the shell's environment under certain circumstances.
5322 b. Fixed a bug in the printf builtin that caused the %q format specifier to
5323 ignore empty string arguments.
5325 c. Improved multibyte character environment detection at configuration time.
5327 d. 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.
5330 2. Changes to Readline
5332 a. Fixed a redisplay bug that occurred in multibyte-capable locales when the
5333 prompt was one character longer than the screen width.
5334 ------------------------------------------------------------------------------
5335 This document details the changes between this version, bash-3.2-beta,
5336 and the previous version, bash-3.2-alpha.
5340 a. Changed the lexical analyzer to treat locale-specific blank characters as
5343 b. Fixed a bug in command printing to avoid confusion between redirections and
5344 process substitution.
5346 c. Fixed problems with cross-compiling originating from inherited environment
5349 d. Added write error reporting to printf builtin.
5351 e. Fixed a bug in the variable expansion code that could cause a core dump in
5352 a multi-byte locale.
5354 f. Fixed a bug that caused substring expansion of a null string to return
5357 g. BASH_COMMAND now retains its previous value while executing commands as the
5358 result of a trap, as the documentation states.
5360 2. Changes to Readline
5362 a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
5363 the prompt and input line multiple times.
5365 b. Fixed history expansion to not be confused by here-string redirection.
5367 c. 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().
5370 ------------------------------------------------------------------------------
5371 This document details the changes between this version, bash-3.2-alpha,
5372 and the previous version, bash-3.1-release.
5376 a. Fixed a source bug that caused the minimal configuration to not compile.
5378 b. Fixed memory leaks in error handling for the `read' builtin.
5380 c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit
5383 d. Fixed some parsing problems with compound array assignments.
5385 e. Added additional configuration changes for: NetBSD (incomplete multibyte
5388 f. Fixed two bugs with local array variable creation when shadowing a variable
5389 of the same name from a previous context.
5391 g. Fixed the `read' builtin to restore the correct set of completion functions
5392 if a timeout occurs.
5394 h. 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.
5398 i. Tightened up the arithmetic expression parsing to produce better error
5399 messages when presented with invalid operators.
5401 j. Fixed the cross-compilation support to build the signal list at shell
5402 invocation rather than compile time if cross-compiling.
5404 k. Fixed multibyte support for non-gcc compilers (or compilers that do not
5405 allow automatic array variable sizing based on a non-constant value).
5407 l. 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.
5411 m. 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
5415 n. Fixed a bug that caused shells invoked as -/bin/bash from not being
5416 recognized as login shells.
5418 o. 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.
5421 p. Fixed a problem with extracting the `varname' in ${#varname}.
5423 q. 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).
5427 r. Changed the brace expansion code to skip over braces that don't begin a
5428 valid matched brace expansion construct.
5430 s. Fixed `typeset' and `declare' to not require that their shell function
5431 operands to be valid shell identifiers.
5433 t. 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.
5436 u. Changed completion code to not attempt command name completion on a line
5437 consisting solely of whitespace when no_empty_command_completion is set.
5439 v. 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.
5443 w. Fixed a bug in the extended pattern matching code that caused it to fail to
5444 match periods with certain patterns.
5446 x. Fixed a bug that caused the shell to dump core when performing filename
5447 generation in directories with thousands of files.
5449 y. Returned to the original Bourne shell rules for parsing ``: no recursive
5450 parsing of embedded quoted strings or ${...} constructs.
5452 z. The inheritance of the DEBUG, RETURN, and ERR traps is now dependent only
5453 on the settings of the `functrace' and `errtrace' shell options, rather
5454 than whether or not the shell is in debugging mode.
5456 aa. Fixed a problem with $HOME being converted to ~ in the expansion of
5457 members of the DIRSTACK array.
5459 bb. Fixed a problem with quoted arguments to arithmetic expansions in certain
5462 cc. The command word completion code now no longer returns matching directories
5463 while searching $PATH.
5465 dd. Fixed a bug with zero-padding and precision handling in snprintf()
5468 ee. Fixed a bug that caused the command substitution code not to take embedded
5469 shell comments into account.
5471 ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an
5472 arithmetic substitution.
5474 gg. Fixed a bug in the prompt expansion code that inappropriately added a
5475 \001 before a \002 under certain circumstances.
5477 hh. 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).
5481 ii. Fixed a bug that could cause file descriptors > 10 to not be closed even
5482 when closed explicitly by a script.
5484 jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting
5485 inside double-quoted command substitutions.
5487 kk. Fixed a bug that could cause core dumps when `return' was executed as the
5488 last element of a pipeline inside a shell function.
5490 ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in
5493 2. Changes to Readline
5495 a. Fixed a problem that caused segmentation faults when using readline in
5496 callback mode and typing consecutive DEL characters on an empty line.
5498 b. 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.
5502 c. Fixed a problem with key sequence translation when presented with the
5505 d. Fixed a problem that prevented the `a' command in vi mode from being
5506 undone and redone properly.
5508 e. Fixed a problem that prevented empty inserts in vi mode from being undone
5511 f. Fixed a problem that caused readline to initialize with an incorrect idea
5512 of whether or not the terminal can autowrap.
5514 g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
5515 convert-meta and use \e where appropriate.
5517 h. 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.
5523 i. Fixed a bug with creating the prompt for a non-interactive search string
5524 when there are non-printing characters in the primary prompt.
5526 j. Fixed a bug that caused prompts with invisible characters to be redrawn
5527 multiple times in a multibyte locale.
5529 k. Fixed a bug that could cause the key sequence scanning code to return the
5532 l. Fixed a problem with the callback interface that caused it to fail when
5533 using multi-character keyboard macros.
5535 m. Fixed a bug that could cause a core dump when an edited history entry was
5536 re-executed under certain conditions.
5538 n. Fixed a bug that caused readline to reference freed memory when attmpting
5539 to display a portion of the prompt.
5541 3. New Features in Bash
5543 a. 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.
5547 b. When running in `word expansion only' mode (--wordexp option), inhibit
5548 process substitution.
5550 c. Loadable builtins now work on MacOS X 10.[34].
5552 d. Shells running in posix mode no longer set $HOME, as POSIX requires.
5554 e. The code that checks for binary files being executed as shell scripts now
5555 checks only for NUL rather than any non-printing character.
5557 f. Quoting the string argument to the [[ command's =~ operator now forces
5558 string matching, as with the other pattern-matching operators.
5560 4. New Features in Readline
5562 a. Calling applications can now set the keyboard timeout to 0, allowing
5565 b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
5566 the default last-ditch startup file.
5568 c. The history file reading functions now allow windows-like \r\n line
5571 ------------------------------------------------------------------------------
5572 This document details the changes between this version, bash-3.1-release,
5573 and the previous version, bash-3.1-rc2.
5575 1. Changes to Readline
5577 a. Several changes to the multibyte redisplay code to fix problems with
5578 prompts containing invisible characters.
5580 ------------------------------------------------------------------------------
5581 This document details the changes between this version, bash-3.1-rc2,
5582 and the previous version, bash-3.1-rc1.
5586 a. Fixed a bug that caused a DEBUG trap to overwrite a command string that's
5587 eventually attached to a background job.
5589 b. Changed some code so that filenames with leading tildes with spaces in the
5590 name aren't tilde-expanded by the bash completion code.
5592 c. Fixed a bug that caused the pushd builtin to fail to change to
5593 directories with leading `-'.
5595 d. Fixed a small memory leak in the programmable completion code.
5597 2. Changes to Readline
5599 a. Fixed a redisplay bug caused by moving the cursor vertically to a line
5600 with invisible characters in the prompt in a multibyte locale.
5602 b. Fixed a bug that could cause the terminal special chars to be bound in the
5603 wrong keymap in vi mode.
5605 3. New Features in Bash
5607 a. If compiled for strict POSIX conformance, LINES and COLUMNS may now
5608 override the true terminal size.
5610 4. New Features in Readline
5612 a. 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.
5616 ------------------------------------------------------------------------------
5617 This document details the changes between this version, bash-3.1-rc1,
5618 and the previous version, bash-3.1-beta1.
5622 a. Fixed a bug that could cause core dumps due to accessing the current
5623 pipeline while in the middle of modifying it.
5625 b. Fixed a bug that caused pathnames with backslashes still quoting characters
5626 to be passed to opendir().
5628 c. Command word completion now obeys the setting of completion-ignore-case.
5630 d. Fixed a problem with redirection that caused file descriptors greater than
5631 2 to be inappropriately marked as close-on-exec.
5633 e. 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.
5637 f. Fixed a bug that caused extended pattern matching to incorrectly scan
5638 backslash-escaped pattern characters.
5640 g. Fixed a synchronization problem that could cause core dumps when handling
5643 h. Fixed a bug that caused an unmatched backquote to be accepted without an
5644 error when processing here documents.
5646 i. Fixed a small memory leak in the `cd' builtin.
5648 j. Fix for MacOS X so it gets the values for the HOSTTYPE, MACHTYPE, and
5649 OSTYPE variables at build time, to support universal binaries.
5651 k. 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.
5655 2. New Features in Bash
5657 3. Changes to Readline
5659 a. Fixed a bug that caused reversing the incremental search direction to
5662 b. Fixed the vi-mode `U' command to only undo up to the first time insert mode
5663 was entered, as Posix specifies.
5665 c. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
5668 4. New Features in Readline
5670 a. New application-callable auxiliary function, rl_variable_value, returns
5671 a string corresponding to a readline variable's value.
5673 b. When parsing inputrc files and variable binding commands, the parser
5674 strips trailing whitespace from values assigned to boolean variables
5675 before checking them.
5678 ------------------------------------------------------------------------------
5679 This document details the changes between this version, bash-3.1-beta1,
5680 and the previous version, bash-3.1-alpha1.
5684 a. Added some system-specific signal names.
5686 b. Fixed a typo in the ulimit builtin to make `x' the right option to
5687 manipulate the limit on file locks.
5689 c. Fixed a problem with using += to append to index 0 of an array variable
5690 when not using subscript syntax.
5692 d. A few changes to configure.in to remove calls to obsolete or outdated
5695 e. 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.
5698 f. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
5699 made when the variable is modified using `printf -v'.
5701 g. 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.
5705 h. 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.
5708 i. Fixed a bug that prevented redirections associated with a shell function
5709 from being executed when in a subshell.
5711 j. Fixed `source' and `.' builtins to not require an executable file when
5712 searching $PATH for a file to source.
5714 k. Fixed a bug that caused incorrect word splitting in a function when IFS
5715 was declared local, then unset.
5717 l. Fixed a problem with the `kill' builtin that prevented sending signals
5718 to a process group under certain circumstances when providing a pid < 0.
5720 m. When in POSIX mode, `pwd' now checks that the value it prints is the same
5721 directory as `.', even when displaying $PWD.
5723 n. Fixed a problem with the `read' builtin when reading a script from standard
5724 input and reading data from the same file.
5726 o. Fixed a problem with the `type' and `command' builtins that caused absolute
5727 pathnames to be displayed incorrectly.
5729 p. Some changes to the `bg' builtin for POSIX conformance.
5731 q. 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
5735 r. 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.
5738 s. Fixed a small memory leak in the pathname canonicalization code.
5740 t. 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.
5744 u. Restored default emacs-mode key binding of M-TAB to dynamic-complete-history.
5746 v. Fixed a bug that caused core dumps when interrupting loops running builtins
5749 w. Make sure that some of the functions bash provides replacements for are
5752 x. The code that scans embedded commands for the parser (`...` and $(...)) is
5753 now more aware of embedded comments and their effect on quoted strings.
5755 y. 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.
5761 z. 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.
5764 aa. 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.
5767 2. Changes to Readline
5769 a. The `change-case' command now correctly changes the case of multibyte
5772 b. Changes to the shared library construction scripts to deal with Windows
5773 DLL naming conventions for Cygwin.
5775 c. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
5778 d. 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
5782 e. The variable assignment code now ignores whitespace at the end of lines
5783 when assigning to boolean variables.
5785 f. The `C-w' binding in incremental search now understands multibyte
5788 3. New Features in Bash
5790 a. A new configuration option, `--enable-strict-posix-default', which will
5791 build bash to be POSIX conforming by default.
5793 4. New Features in Readline
5795 a. 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.
5798 ------------------------------------------------------------------------------
5799 This document details the changes between this version, bash-3.1-alpha1,
5800 and the previous version, bash-3.0-release.
5804 a. Fixed a bug that caused bash to crash if referencing an unset local array.
5806 b. Fixed a problem that caused tilde expansion to not be performed before
5807 attempting globbing word completion.
5809 c. 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.
5812 d. Fixed ${#word} expansion to correctly compute the length of a string
5813 containing multibyte characters.
5815 e. Fixed a bug that caused bash to not pass the correct flags for signal
5816 disposition to child processes.
5818 f. Fixed a bug that caused `fc -l' to list one too many history entries.
5820 g. Some fixes to `fc' for POSIX conformance.
5822 h. Some fixes to job status display for POSIX conformance.
5824 i. Fixed a bug that caused `command -v' to display output if a command was not
5825 found -- it should be silent.
5827 j. In POSIX mode, `type' and `command -[vV]' do not report non-executable
5828 files, even if the shell will attempt to execute them.
5830 k. Fixed a bug that caused the `==' operator to the [[ command to not attempt
5831 extended pattern matching.
5833 l. Fixed the brace expansion code to handle characters whose value exceeds 128.
5835 m. Fixed `printf' to handle strings with a leading `\0' whose length is
5838 n. Fixed a couple of problems with brace expansion where `${' was handled
5841 o. Fixed off-by-one error when calculating the upper bound of `offset' when
5842 processing the ${array[@]:offset:length} expansion.
5844 p. 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,
5848 q. 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.
5851 r. Fixed a completion bug that caused core dumps when expanding a directory
5854 s. Fixed a bug that prevented `hash -d' from removing commands from the hash
5857 t. Fixed word splitting to avoid really bad quadratic performance when
5858 expanding long lists.
5860 u. Fixed a bug that caused negative offsets in substring expansion to use the
5863 v. Fixed a bug in printf that caused it to not return failure on write errors.
5865 w. Fixed a bug that caused commands in subshells to not be properly timed.
5867 x. 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.
5871 y. 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
5875 z. Fixed a problem that caused internal shell quoting characters to be
5876 incorrectly quoted with backslashes under some circumstances.
5878 aa. The shell now performs correct word splitting when IFS contains multibyte
5881 bb. The mail checking code now resets the cached file information if the size
5882 drops to 0, even if the times don't change.
5884 cc. 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.
5889 dd. 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).
5894 ee. 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.
5898 ff. Fixed a bug in the command execution code that caused asynchronous commands
5899 containing command substitutions to not put the terminal in the wrong
5902 gg. Bash now handles the case where the WCONTINUED flag causes waitpid() to
5903 return -1/EINVAL at runtime as well as configuration time.
5905 hh. Fixed parser to generate an error when the pipeline `argument' to `!' or
5908 ii. The shell now takes a little more care when manipulating file descriptors
5909 greater than 9 with the `exec' builtin.
5911 jj. Fixed a bug that caused variable assignments preceding the `command' builtin
5912 preceding a special builtin to be preserved after the command completed in
5915 kk. Fixed a bug that allowed variables beginning with a digit to be created.
5917 ll. Fixed a bug that caused a \<newline> to be removed when parsing a $'...'
5920 mm. A shell whose name begins with `-' will now be a restricted shell if the
5921 remainder of the name indicates it should be restricted.
5923 nn. Fixed a bug that could cause a core dump if FUNCNAME were changed or unset
5924 during a function's execution.
5926 oo. 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.
5930 pp. Fixed cases where var[@] was not handled exactly like var, when var is a
5933 qq. Fixed a bug that caused the first character after a SIGINT to be discarded
5934 under certain circumstances.
5936 rr. 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
5940 ss. Fixed a bug that caused the shell parser state to be changed by executing
5941 a shell function as a result of word completion.
5943 tt. Fixed a long-standing bug that caused '\177' characters in variable
5944 values to be discarded when expanded in double-quoted strings.
5946 uu. Fixed a bug that caused $RANDOM to be re-seeded multiple times in a
5947 subshell environment.
5949 vv. 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.
5953 ww. Fixed a parser bug in processing \<newline> that caused things like
5958 to not work correctly.
5960 xx. `pwd -P' now sets $PWD to a directory name containing no symbolic links
5961 when in posix mode, as POSIX requires.
5963 yy. In posix mode, bash no longer sets $PWD to a name containing no symbolic
5964 links if a directory is chosen from $CDPATH.
5966 zz. 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
5970 aaa. 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.
5975 bbb. 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.
5978 ccc. Fixed a bug that caused short-circuiting of execution even if the return
5979 value was being inverted.
5981 ddd. Fixed a bug that caused a core dump while decoding \W escapes in PS1 if
5984 eee. Fixed a bug in `read' that counted internal quoting characters for the
5985 purposes of `read -n'.
5987 fff. Fixed a bug so that a function definition in a pipeline causes a child
5988 process to be forked at the right time.
5990 ggg. Bash will not attempt to link against a readline library that doesn't
5991 have rl_gnu_readline_p == 1.
5993 hhh. 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.
5996 iii. Fixed a bug that caused `unset' on variables in the temporary environment
5997 to leave them set when `unset' completed.
5999 jjj. Fixed a bug that caused bash to close fd 2 if an `exec' failed and the
6002 kkk. The completion code is more careful to not turn `/' or `///' into `//',
6003 for those systems on which `//' has special meaning.
6005 lll. Fixed a bug that caused command substitution in asynchronous commands to
6006 close the wrong file descriptors.
6008 mmm. The shell no longer prints status messages about terminated background
6009 processes unless job control is active.
6011 nnn. Fixed a bug that prevented multiple consecutive invocations of `history -s'
6012 from adding all the commands to the history list.
6014 ooo. Added a couple of changes to make arithmetic expansion more consistent in
6015 all its contexts (still not perfect).
6017 ppp. Fixed a bug that caused the parser to occasionally not find the right
6018 terminating "`" in an old-style command substitution.
6020 qqq. 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).
6024 rrr. Fixed a problem that caused loops in sourced scripts to not be cleaned
6025 up properly when a `return' is executed.
6027 sss. Change internal command substitution completion function to append a slash
6028 to directory names in the command.
6030 2. Changes to Readline
6032 a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
6035 b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
6038 c. Fixed a problem in computing the number of invisible characters on the first
6039 line of a prompt whose length exceeds the screen width.
6041 d. Fixed vi-mode searching so that failure preserves the current line rather
6042 than the last line in the history list.
6044 e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
6045 end-of-line when manipulating multibyte characters.
6047 f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
6048 end-of-line when manipulating multibyte characters.
6050 g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
6051 prompts longer than the screen width containing multibyte characters,
6053 h. Fix the calculation of the number of physical characters in the prompt
6054 string when it contains multibyte characters.
6056 i. A non-zero value for the `rl_complete_suppress_append' variable now causes
6057 no `/' to be appended to a directory name.
6059 j. Fixed forward-word and backward-word to work when words contained
6060 multibyte characters.
6062 k. Fixed a bug in finding the delimiter of a `?' substring when performing
6063 history expansion in a locale that supports multibyte characters.
6065 l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
6067 m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
6068 of the `convert-meta' variable.
6070 n. Fixed saving and restoring primary prompt when prompting for incremental
6071 and non-incremental searches; search prompts now display multibyte
6072 characters correctly.
6074 o. Fixed a bug that caused keys originally bound to self-insert but shadowed
6075 by a multi-character key sequence to not be inserted.
6077 p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
6078 dereferenced if NULL (matching the documentation).
6080 q. 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
6086 r. Lots of changes so readline builds and runs on MinGW.
6088 s. Readline no longer tries to modify the terminal settings when running in
6091 t. The Readline display code no longer sets the location of the last invisible
6092 character in the prompt if the \[\] sequence is empty.
6094 3. New Features in Bash
6096 a. Bash now understands LC_TIME as a special variable so that time display
6097 tracks the current locale.
6099 b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created
6100 as `invisible' variables and may not be unset.
6102 c. 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.
6105 d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.
6107 e. Fixed vi-mode word completion and glob expansion to perform tilde
6110 f. The `**' mathematic exponentiation operator is now right-associative.
6112 g. 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).
6115 h. A bare `%' once again expands to the current job when used as a job
6118 i. 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.
6122 j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.
6124 k. The `gnu_errfmt' option is enabled automatically if the shell is running
6125 in an emacs terminal window.
6127 l. New configuration option: --single-help-strings. Causes long help text
6128 to be written as a single string; intended to ease translation.
6130 m. The COMP_WORDBREAKS variable now causes the list of word break characters
6131 to be emptied when the variable is unset.
6133 n. An unquoted expansion of $* when $IFS is empty now causes the positional
6134 parameters to be concatenated if the expansion doesn't undergo word
6137 o. Bash now inherits $_ from the environment if it appears there at startup.
6139 p. New shell option: nocasematch. If non-zero, shell pattern matching ignores
6140 case when used by `case' and `[[' commands.
6142 q. The `printf' builtin takes a new option: -v var. That causes the output
6143 to be placed into var instead of on stdout.
6145 r. By default, the shell no longer reports processes dying from SIGPIPE.
6147 s. 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.
6151 4. New Features in Readline
6153 a. The key sequence sent by the keypad `delete' key is now automatically
6154 bound to delete-char.
6156 b. A negative argument to menu-complete now cycles backward through the
6159 c. 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).
6163 d. 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.
6167 ------------------------------------------------------------------------------
6168 This document details the changes between this version, bash-3.0-release,
6169 and the previous version, bash-3.0-rc1.
6173 a. Fixed a boundary overrun that could cause segmentation faults when the
6174 completion code hands an incomplete construct to the word expansion
6177 b. Changed posix mode behavior so that an error in a variable assignment
6178 preceding a special builtin causes a non-interactive shell to exit.
6180 c. Change the directory expansion portion of the completion code to not
6181 expand embedded command substitutions if the directory name appears in
6184 d. Fixed a problem that caused `bash -r' to turn on restrictions before
6185 reading the startup files.
6187 e. Fixed a problem with the default operation of the `umask' builtin.
6189 2. Changes to Readline
6191 a. Fixed a problem with readline saving the contents of the current line
6192 before beginning a non-interactive search.
6194 b. Fixed a problem with EOF detection when using rl_event_hook.
6196 c. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
6199 ------------------------------------------------------------------------------
6200 This document details the changes between this version, bash-3.0-rc1,
6201 and the previous version, bash-3.0-beta1.
6205 a. 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.
6208 b. System-specific changes for: SCO Unix 3.2, Tandem.
6210 c. Fixed a bug that caused inappropriate word splitting when a variable was
6211 expanded within a double-quoted string that also included $@.
6213 d. Fixed a bug that caused `pwd' to not display anything in physical mode
6214 when the file system had changed underneath the shell.
6216 e. 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.
6220 f. 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.)
6224 g. Fixed a bug that could cause a core dump if `cd' is asked to print out a
6225 pathname longer than PATH_MAX characters.
6227 h. 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'.
6230 i. `unalias' now returns failure if no alias name arguments are supplied.
6232 j. Documented the characters not allowed to appear in an alias name.
6234 k. $* 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.
6237 l. 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.
6241 m. Fixed a few problems with `cd' and `pwd' when asked to operate on pathnames
6242 longer than PATH_MAX characters.
6244 n. Fixed a memory leak caused when creating multiple local array variables
6245 with identical names.
6247 o. 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
6251 p. The `trap' builtin now reports an error if a single non-signal argument
6254 q. Fixed a bug that caused `umask' to not work correctly when presented
6255 with a mask of all 0s.
6257 r. When `getopts' reaches the end of options, OPTARG is unset, as POSIX
6260 s. 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
6264 t. Fixed vi-mode completion to work more as POSIX specifies (e.g., doing the
6265 right kind of filename generation).
6267 2. Changes to Readline
6269 a. Fixed a problem that could cause readline to refer to freed memory when
6270 moving between history lines while doing searches.
6272 b. Improvements to the code that expands and displays prompt strings
6273 containing multibyte characters.
6275 c. Fixed a problem with vi-mode not correctly remembering the numeric argument
6276 to the last `c'hange command for later use with `.'.
6278 d. Fixed a bug in vi-mode that caused multi-digit count arguments to work
6281 e. Fixed a problem in vi-mode that caused the last text modification command
6282 to not be remembered across different command lines.
6284 f. Fixed problems with changing characters and changing case at the end of
6287 3. New Features in Bash
6289 a. The `jobs', `kill', and `wait' builtins now accept job control notation
6290 even if job control is not enabled.
6292 b. 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.
6296 4. New Features in Readline
6298 a. When listing completions, directories have a `/' appended if the
6299 `mark-directories' option has been enabled.
6301 ------------------------------------------------------------------------------
6302 This document details the changes between this version, bash-3.0-beta1,
6303 and the previous version, bash-3.0-alpha.
6307 a. Fixes to build correctly when arrays are not compiled into the shell.
6309 b. Fixed command substitution to run any exit trap defined in the command
6310 substitution before returning; the exit trap is not inherited from the
6313 c. 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
6318 d. Fixed processing of octal and hex constants in printf builtin for POSIX.2
6321 e. Fixed a couple of core dumps in the pattern removal code.
6323 f. Fixes to the array subrange extraction code to deal better with sparse
6326 g. Parser errors and other errors that result in the shell exiting now cause
6327 the exit trap to be run.
6329 h. Change the command substitution completion functions to not append any
6330 closing quote, because it would be inserted a closing "`" or ")".
6332 i. Fix history initialization so assignments to $histchars made in startup
6335 j. 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.
6339 k. The parser now prompts with $PS2 if it reads a newline while parsing a
6340 compound array assignment statement.
6342 l. 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
6346 m. Fixed a bug that caused `return' executed in a trap command to make the
6347 shell think it was still running the trap.
6349 n. Fixed the value of errno set by the pathname canonicalization functions.
6351 o. Changed the grammar so that `time' alone on a line times a null command
6352 rather than being a syntax error.
6354 p. The pattern substitution code no longer performs quote removal on the
6355 pattern before trying to match it, as the pattern removal functions do.
6357 q. Fixed a bug that could cause core dumps when checking whether a quoted
6358 command name was being completed.
6360 r. Fixes to the pattern removal and pattern replacement expansions to deal
6361 with multibyte characters better (and faster).
6363 s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly
6364 multibyte) characters instead of raw bytes.
6366 t. Fixed a bug that caused some key bindings set in an inputrc to be ignored
6369 u. Fixed a bug that caused unsetting a local variable within a function to
6372 v. Fixed a bug that caused invalid variables to be created when using
6375 w. 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.
6379 x. Fixed a slight cosmetic problem when printing commands containing a
6380 `>&word' redirection.
6382 y. Fixed a problem that could cause here documents to not be created correctly
6383 if the system temporary directory did not allow writing.
6385 2. Changes to Readline
6387 a. Change to history expansion functions to treat `^' as equivalent to word
6388 one, as the documentation states.
6390 b. Some changes to the display code to improve display and redisplay of
6391 multibyte characters.
6393 c. Changes to speed up the multibyte character redisplay code.
6395 d. 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.
6399 e. 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.
6403 f. Fixed a bug in redisplay triggered when the prompt string contains
6404 invisible characters.
6406 g. Fixed some display (and other) bugs encountered in multibyte locales
6407 when a non-ascii character was the last character on a line.
6409 h. Fixed some display bugs caused by multibyte characters in prompt strings.
6411 i. Fixed a problem with history expansion caused by non-whitespace characters
6412 used as history word delimiters.
6414 3. New Features in Bash
6416 a. printf builtin understands two new escape sequences: \" and \?.
6418 b. `echo -e' understands two new escape sequences: \" and \?.
6420 c. The GNU `gettext' package and libintl have been integrated; the shell's
6421 messages can be translated into different languages.
6423 d. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.
6425 e. 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.
6429 4. New Features in Readline
6431 a. New application variable, rl_completion_quote_character, set to any
6432 quote character readline finds before it calls the application completion
6435 b. 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.
6439 c. 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.
6443 d. 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.
6447 e. New bindable command: unix-filename-rubout. Does the same thing as
6448 unix-word-rubout, but adds `/' to the set of word delimiters.
6450 ------------------------------------------------------------------------------
6451 This document details the changes between this version, bash-3.0-alpha,
6452 and the previous version, bash-2.05b-release.
6456 a. Fixes so that the shell will compile without some of the default options
6459 b. Fixed an error message that did not pass enough arguments to printf.
6461 c. 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.
6465 d. Fixed a bug that caused subshell initialization to close the file
6466 descriptor from which the shell was reading a script under certain
6469 e. Fixed a bug that caused the shell to not advance a string pointer over
6470 a null wide character when doing string operations.
6472 f. Fixed the internal logout code so that shells that time out waiting for
6473 input (using $TMOUT) run ~/.bash_logout.
6475 g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD.
6477 h. The parser no longer adds implicit double quotes to ((...)) arithmetic
6480 i. The ((...)) arithmetic command evaluation code was fixed to not dump core
6481 when the expanded string is null.
6483 j. The ((...)) arithmetic command evaluation code was fixed to not perform
6484 variable assignments while expanding the expression.
6486 k. Fixed a bug that caused word splitting to be performed incorrectly when
6487 IFS is set, but null.
6489 l. Fixed a bug in brace expansion that caused a quoted `$' preceding an
6490 open brace to inhibit brace expansion.
6492 m. Fixed a bug that caused a leading `-' in the shell's name to cause it to
6493 not be recognized as a restricted shell.
6495 n. Fixed a bug in the arithmetic evaluation code that could cause longjmps
6496 to an invalid location and result in a core dump.
6498 o. 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
6502 p. Fixed a bug in pathname canonicalization that caused the shell to dump
6503 core when presented with a pathname longer than PATH_MAX.
6505 q. Fixed the parser so that it doesn't try to compare a char variable to
6506 EOF, which fails when chars are unsigned.
6508 r. Fixed a bug in the simple command execution code that caused occasional
6511 s. 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
6515 t. The completion code now splits words more like the expansion code when
6516 $IFS is used to split.
6518 u. The locale code does a better job of recomputing the various locale
6519 variable values when LC_ALL is unset.
6521 v. The programmable completion code does a better job of dequoting expanded
6522 word lists before comparing them against the word to be matched.
6524 w. The shell no longer seg faults if the expanded value of $PS4 is null
6525 and `set -x' is enabled.
6527 x. Fixed a bug that caused core dumps when a here string expanded to NULL.
6529 y. The mail checking code now makes sure the mailbox is bigger before
6530 reporting the existence of new mail.
6532 z. 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.
6536 aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use
6537 $@ instead of "$@" for the implicit list of arguments.
6539 bb. 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.
6543 cc. Fixed a problem with empty replacements for a pattern that doesn't match
6544 when performing ${param/word/} expansion.
6546 dd. Word expansions performed while expanding redirections no longer search
6547 a command's temporary environment to expand variable values.
6549 ee. Improvements to the alias expansion code when expanding subsequent words
6550 because an aliase's value ends with a space.
6552 ff. `cd -' now prints the current working directory after a successful chdir
6553 even when the shell is not interactive, as the standard requires.
6555 gg. The shell does a better job of ensuring a child process dies of SIGINT
6556 before resending SIGINT to itself.
6558 hh. The arithmetic expansion variable assignment code now does the right
6559 thing when assigning to `special' variables like OPTIND.
6561 ii. When history expansion verification is enabled, the bash readline helper
6562 functions that do history expansion on the current line don't print
6565 jj. Fixed bugs with multiple consecutive alias expansion when one of the
6566 expansions ends with a space.
6568 kk. 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
6572 ll. The \[ and \] escape characters are now ignored when decoding the prompt
6573 string if the shell is started with editing disabled.
6575 mm. Fixed a bug that could leave extra characters in a string when doing
6576 quoted null character removal.
6578 nn. Command substitution and other subshell operations no longer reset the
6579 line number (aids the bash debugger).
6581 oo. Better line number management when executing simple commands, conditional
6582 commands, for commands, and select commands.
6584 pp. The globbing code now uses malloc, with its better failure properties,
6585 rather than alloca().
6587 qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the
6588 appropriate array element instead of a variable named `a[2]'.
6590 rr. Fixed a bug in the handling of a `?(...)' pattern immediately following
6591 a `*' when extglob is enabled.
6593 ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is
6594 invoked in a function to misbehave.
6596 tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped
6597 by the internal shell string quoting functions.
6599 uu. 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'.
6602 vv. Fixed a bug that caused redirections accompanying a null command to persist
6603 in the current shell.
6605 ww. Fixed a bug that caused the prompt to be printed when the shell was
6606 expanding a multiline alias.
6608 xx. Fixed a bug that resulted in core dumps when the completion for a command
6609 changed the compspec.
6611 yy. Fixed a bug that caused evaluation of programmable completions to print
6612 notifications of completed jobs.
6614 zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb'
6615 (which is what emacs shell windows do).
6617 aaa. In posix mode, `kill -l' causes signal names to be displayed without
6620 bbb. Clear error flag on standard output so it doesn't persist across multiple
6623 ccc. In posix mode, `alias' displays alias values without the leading `alias',
6624 so the output cannot be used as subsequent input.
6626 ddd. 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.
6630 eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the
6631 pattern substitution and removal expansions.
6633 fff. Fixed several problems with the handling of ${array[@]}, ${array[*]},
6634 $@, and $* by the indirect variable expansion code.
6636 ggg. Fixed a bug that did not allow `time' to be aliased.
6638 hhh. 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.)
6643 iii. If the `chkwinsize' option is enabled, the shell checks for window size
6644 changes if a child process exits due to a signal.
6646 jjj. 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
6650 kkk. Fixed PATH lookup code so it treats the permission bits separately for
6651 owner, group, and other, rather than checking them all.
6653 lll. 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.
6656 mmm. The shell now binds its special readline functions and key bindings only
6657 if the user's inputrc file has not already bound them.
6659 nnn. The shell now reports on processes that dump core due to signals when
6660 invoked as `-c command'.
6662 2. Changes to Readline
6664 a. Fixes to avoid core dumps because of null pointer references in the
6665 multibyte character code.
6667 b. Fix to avoid infinite recursion caused by certain key combinations.
6669 c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
6671 d. Readline no longer tries to read ahead more than one line of input, even
6672 when more is available.
6674 e. Fixed the code that adjusts the point to not mishandle null wide
6677 f. Fixed a bug in the history expansion `g' modifier that caused it to skip
6680 g. 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.
6685 h. 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.
6688 i. The locale initialization code does a better job of using the right
6689 precedence and defaulting when checking the appropriate environment
6692 j. Fixed the history word tokenizer to handle <( and >( better when used as
6695 k. The overwrite mode code received several bug fixes to improve undo.
6697 l. Many speedups to the multibyte character redisplay code.
6699 m. The callback character reading interface should not hang waiting to read
6702 n. Fixed a bug with redoing vi-mode `s' command.
6704 o. 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().
6709 p. 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.
6712 q. 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.
6716 r. Undo and redo now work better after exiting vi insertion mode.
6718 s. Make sure system calls are restarted after a SIGWINCH is received using
6721 t. Improvements to the code that displays possible completions when using
6722 multibyte characters.
6724 u. Fixed a problem when parsing nested if statements in inputrc files.
6726 v. The completer now takes multibyte characters into account when looking for
6727 quoted substrings on which to perform completion.
6729 w. The history search functions now perform better bounds checking on the
6732 3. New Features in Bash
6734 a. ANSI string expansion now implements the \x{hexdigits} escape.
6736 b. There is a new loadable `strftime' builtin.
6738 c. New variable, COMP_WORDBREAKS, which controls the readline completer's
6739 idea of word break characters.
6741 d. The `type' builtin no longer reports on aliases unless alias expansion
6742 will actually be performed.
6744 e. HISTCONTROL is now a colon-separated list of values, which permits
6745 more extensibility and backwards compatibility.
6747 f. HISTCONTROL may now include the `erasedups' option, which causes all lines
6748 matching a line being added to be removed from the history list.
6750 g. `configure' has a new `--enable-multibyte' argument that permits multibyte
6751 character support to be disabled even on systems that support it.
6753 h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
6754 BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
6757 i. FUNCNAME has been changed to support the debugger: it's now an array
6760 j. for, case, select, arithmetic commands now keep line number information
6763 k. 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).
6767 l. New invocation option: --debugger. Enables debugging and turns on new
6768 `extdebug' shell option.
6770 m. 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.
6775 n. 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'
6780 o. New `--enable-debugger' option to `configure' to compile in the debugger
6783 p. `declare -F' now prints out extra line number and source file information
6784 if the `extdebug' option is set.
6786 q. 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'.
6790 r. New `caller' builtin to provide a call stack for the bash debugger.
6792 s. The DEBUG trap is run just before the first command in a function body is
6793 executed, for the debugger.
6795 t. `for', `select', and `case' command heads are printed when `set -x' is
6798 u. 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.
6802 v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
6805 w. 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.
6809 x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
6810 style' (filename:lineno:message) format.
6812 y. 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
6816 z. 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.
6820 aa. `kill' is available as a builtin even when the shell is built without
6823 bb. 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.
6829 cc. The [[ ... ]] command has a new binary `=~' operator that performs
6830 extended regular expression (egrep-like) matching.
6832 dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
6833 to enable the =~ operator and regexp matching in [[ ... ]].
6835 ee. Subexpressions matched by the =~ operator are placed in the new
6836 BASH_REMATCH array variable.
6838 ff. New `failglob' option that causes an expansion error when pathname
6839 expansion fails to produce a match.
6841 gg. 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
6845 4. New Features in Readline
6847 a. History expansion has a new `a' modifier equivalent to the `g' modifier
6848 for compatibility with the BSD csh.
6850 b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
6851 modifier, which performs a substitution once per word.
6853 c. All non-incremental search operations may now undo the operation of
6854 replacing the current line with the history line.
6856 d. The text inserted by an `a' command in vi mode can be reinserted with
6859 e. 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.
6863 f. There is a new application-callable `free_history_entry()' function.
6865 g. History list entries now contain timestamp information; the history file
6866 functions know how to read and write timestamp information associated
6869 h. Four new key binding functions have been added:
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()
6876 ------------------------------------------------------------------------------
6877 This document details the changes between this version, bash-2.05b-release,
6878 and the previous version, bash-2.05b-beta2.
6882 a. Fixed an off-by-one error in the function that translates job
6885 b. Note that we're running under Emacs and disable line editing if
6888 ------------------------------------------------------------------------------
6889 This document details the changes between this version, bash-2.05b-beta2,
6890 and the previous version, bash-2.05b-beta1.
6894 a. Fixed the /= and %= arithmetic operators to catch division by zero.
6896 b. Added putenv, setenv, unsetenv to getenv replacement for completeness.
6898 c. Fixed a bug that could cause the -O expand_aliases invocation option
6901 d. 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.
6905 2. Changes to Readline
6907 a. 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
6911 ------------------------------------------------------------------------------
6912 This document details the changes between this version, bash-2.05b-beta1,
6913 and the previous version, bash-2.05b-alpha1.
6917 a. Fixed a problem when parsing a POSIX.2 character class name while
6918 evaluating a bracket expression containing multibyte characters.
6920 b. 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'.
6923 c. Added `help' builtin entries for `((', `[[', and arithmetic for.
6925 d. 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
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
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
6941 o malloc/free/realloc now inline memset instead of calling the
6942 libc function; uses Duff's device for good performance
6944 e. Check for getservent(); make the service name completion code dependent
6947 f. 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.
6951 g. 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.
6956 h. The `unset' builtin no longer returns a failure status when asked to
6957 unset a previously-unset variable or function.
6959 i. Changes to the build system to make it easier to cross-compile bash
6960 for different systems.
6962 j. Added `,' to the characters that are backslash-escaped during filename
6963 completion, to avoid problems with complete-into-braces and RCS filenames
6966 k. Some changes to the multibyte character support code to avoid many calls
6969 l. Bash now correctly honors setting LANG to some value when LC_ALL does not
6970 already have a value.
6972 m. Fixed a bug that could cause SIGSEGV when processing nested traps with
6975 n. The `source/.' builtin now restores the positional parameters when it
6976 returns unless they were changed using the `set' builtin during the file's
6979 o. Fixed a bug that caused a syntax error when a command was terminated by
6982 2. New Features in Bash
6984 a. 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.
6988 b. All builtins that take operands accept a `--' pseudo-option, except
6991 c. 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.
6995 3. Changes to Readline
6997 a. Fixed a small problem in _rl_insert_char with multibyte characters.
6999 b. Fixes from IBM for line wrapping problems when using multibyte characters.
7001 c. 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.
7005 d. Fixed a problem with the vi-mode `r' command that occurred on systems with
7006 support for multibyte characters when running in a locale without any
7007 multibyte characters.
7009 ------------------------------------------------------------------------------
7010 This document details the changes between this version, bash-2.05b-alpha1,
7011 and the previous version, bash-2.05a-release.
7015 a. Some changes to work around inlining differences between compilers.
7017 b. Added more prototypes for internal shell typedefs, to catch argument
7018 passing errors when using pointers to functions.
7020 c. 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.
7027 d. 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).
7030 e. 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.
7033 f. The history file loading code was changed to allow lines to be saved in
7034 the history list from the shell startup files.
7036 g. `history -s args' now works better in compound commands.
7038 h. The tilde expansion code was fixed to better recognize when it's being
7039 invoked in an assignment context, which enables expansion after `='
7042 i. 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
7046 j. 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.
7050 k. Fixed the programmable completion code to better handle newlines in lists
7051 of possible completions (e.g., `complete -W').
7053 l. Removed the reserved words from the `bash-builtins' manual page.
7055 m. Parser error reporting now attempts to do a better job of identifying the
7056 token in error rather than doing straight textual analysis.
7058 n. Fixes for Inf/NaN, locales, wide/multibyte characters and zero-length
7059 arguments in the library snprintf(3) replacement.
7061 o. `read -e' no longer does command name completion on the first word on
7062 the line being read.
7064 p. `select' now returns failure if the read of the user's selection fails.
7066 q. Fixed a bug that could cause a core dump when setting $PIPESTATUS.
7068 r. 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.
7071 s. Fixed a bug in the trap code that caused traps to be inherited by
7072 command substitutions in some cases.
7074 t. Fixed a bug that could cause alias expansion to inappropriately expand
7075 the word following the alias.
7077 u. Fixed a bug in the `kill' builtin that mishandled negative pid arguments.
7079 v. The parser is less lenient when parsing assignment statements where the
7080 characters before the `=' don't comprise a valid identifier.
7082 w. The arithmetic expression evaluation code now honors the setting of the
7083 `-u' option when expanding variable names.
7085 x. Fixed the arithmetic evaluation code to allow array subscripts to be
7086 assigned (`let b[7]=42') and auto-incremented and auto-decremented
7089 y. Reimplemented the existing prompt string date and time expansions using
7090 strftime(3), which changed the output of \@ in some locales.
7092 z. 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.
7095 aa. 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.
7099 bb. 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.
7103 cc. 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.
7106 dd. The code that expands $PS4 no longer inherits the `-x' flag.
7108 ee. The bash-specific completion functions may now take advantage of the
7109 double-TAB and M-? features of the standard readline completion
7112 ff. 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.
7115 gg. 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.
7126 hh. 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.
7130 ii. Error messages now include the line number in a script when the shell
7133 jj. Array subscript expansion now takes place even when the array variable is
7134 unset, so side effects will take place.
7136 kk. 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.
7139 ll. 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.
7142 mm. A couple of changes to make it easier for multiple shells to share history
7143 files using `history -n', `history -r', and `history -w'.
7145 nn. 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.
7149 oo. Changed some parts of the expansion code to avoid allocating and
7150 immediately freeing memory without using the results for anything.
7152 pp. 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
7157 qq. 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
7161 rr. The shell now uses a simple, generic `object cache' for allocating and
7162 caching words and word lists, which were the major users of
7165 ss. Fixed the assignment statement parsing code to allow whitespace and
7166 newlines in subscripts when performing array element assignment.
7168 tt. The shell now issues many fewer calls to sigprocmask and other signal
7169 masking system calls.
7171 uu. Fixed the `test' and conditional command file comparison operators to
7172 work right when one file has a non-positive timestamp and the other
7175 vv. Fixed some cases where the special characters '\001' and '\177' in the
7176 values of variables or positional parameters caused incorrect expansion
7179 2. Changes to Readline
7181 a. Fixed output of comment-begin character when listing variable values.
7183 b. Added some default key bindings for common escape sequences produced by
7186 c. Fixed the mark handling code to be more emacs-compatible.
7188 d. A bug was fixed in the code that prints possible completions to keep it
7189 from printing empty strings in certain circumstances.
7191 e. 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.
7194 f. Fixed unstifle_history() to return values that match the documentation.
7196 g. Fixed the event loop (rl_event_hook) to handle the case where the input
7197 file descriptor is invalidated.
7199 h. Fixed the prompt display code to work better when the application has a
7200 custom redisplay function.
7202 i. 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.
7205 j. The vi-mode `S' and `s' commands are now undone correctly.
7207 3. New Features in Bash
7209 a. If set, TMOUT is the default timeout for the `read' builtin.
7211 b. `type' has two new options: `-f' suppresses shell function lookup, and
7212 `-P' forces a $PATH search.
7214 c. New code to handle multibyte characters.
7216 d. `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.
7220 e. `complete -d' and `complete -o dirnames' now force a slash to be
7221 appended to names which are symlinks to directories.
7223 f. 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.
7226 g. Added support for ksh93-like [:word:] character class in pattern matching.
7228 h. The $'...' quoting construct now expands \cX to Control-X.
7230 i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
7231 the result into the expanded prompt.
7233 j. The shell now performs arithmetic in the largest integer size the
7234 machine supports (intmax_t), instead of long.
7236 k. 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.
7239 l. The bash globbing completion functions now allow completions to be listed
7240 with double tabs or if `show-all-if-ambiguous' is set.
7242 m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
7243 readline's appending a space to the completed word.
7245 n. New `here-string' redirection operator: <<< word.
7247 o. 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).
7251 p. 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.
7255 q. The `complete' and `compgen' builtins now have a new `-s/-A service'
7256 option to complete on names from /etc/services.
7258 r. `read' has a new `-u fd' option to read from a specified file descriptor.
7260 s. Fix the completion code so that expansion errors in a directory name
7261 don't cause a longjmp back to the command loop.
7263 t. Fixed word completion inside command substitution to work a little more
7266 u. The `printf' %q format specifier now uses $'...' quoting to print the
7267 argument if it contains non-printing characters.
7269 v. 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.
7273 w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
7274 [[...]] conditional commands, and for ((...)) loops.
7276 x. 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.
7281 y. 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
7286 z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
7289 aa. There is a new `-l' invocation option, equivalent to `--login'.
7291 bb. 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.
7294 4. New Features in Readline
7296 a. 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
7300 b. 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).
7304 c. New code to handle editing and displaying multibyte characters.
7306 d. 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).
7311 e. 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
7315 f. 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.
7320 g. 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
7325 h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
7326 bindable command, which could be bound to `Insert'.
7328 i. New application-settable completion variable:
7329 rl_completion_suppress_append, inhibits appending of
7330 rl_completion_append_character to completed words.
7332 j. 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.
7337 ------------------------------------------------------------------------------
7338 This document details the changes between this version, bash-2.05a-release,
7339 and the previous version, bash-2.05a-rc1.
7343 a. Fixed the `printf' builtin so that the variable name supplied as an
7344 argument to a %n conversion must be a valid shell identifier.
7346 b. Improved the random number generator slightly.
7348 c. Changes to configuration to not put -I/usr/include into $CFLAGS, since
7349 it messes up some includes.
7351 d. Corrected description of POSIXLY_CORRECT in man page and info manual.
7353 e. Fixed a couple of cases of incorrect function prototypes that sneaked
7354 through and caused compilation problems.
7356 f. A few changes to avoid potential core dumps in the programmable completion
7359 g. Fixed a configure problem that could cause a non-existent file to show
7362 h. Fixed a configure problem that could cause siglist.o to not be built when
7365 i. Changes to the strtoimax and strtoumax replacement functions to work
7366 around buggy compilers.
7368 j. Fixed a problem with the snprintf replacement function that could
7369 potentially cause a core dump.
7371 2. Changes to Readline
7373 a. Fixed a locale-specific problem in the vi-mode `goto mark' command.
7375 b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
7376 include file problems.
7378 ------------------------------------------------------------------------------
7379 This document details the changes between this version, bash-2.05a-rc1,
7380 and the previous version, bash-2.05a-beta1.
7384 a. Fixed the snprintf replacement to correctly implement the `alternate form'
7385 of the %g and %G conversions.
7387 b. Fixed snprintf to correctly handle the optional precision with the %g and
7390 c. Fixed the arithmetic evaluation code to correct the values of `@' and `_'
7391 when translating base-64 constants (they were backwards).
7393 d. New library functions for formatting long and long long ints.
7395 e. Fixed a few places where negative array subscripts could have occurred,
7396 mostly as the result of systems using signed characters.
7398 f. Fixed a few places that assumed a pid_t was no wider than an int.
7400 g. Fixed the `maildir' mail checking code to work on systems where a
7401 `struct stat' doesn't include an `st_blocks' member.
7403 h. Fixed snprintf to make `unsigned long long' conversion formats (%llu)
7406 i. Fixed snprintf to not print a sign when asked to do an unsigned conversion.
7408 j. Made configure changes to avoid compiling empty source files in lib/sh.
7410 k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax,
7413 l. 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).
7417 m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to
7418 have more systematic naming, with accompanying changes to configure.in.
7420 n. Fixed snprintf to handle long doubles and the %a/%A conversions by
7421 falling back to sprintf, as long as sprintf supports them.
7423 o. 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.
7427 p. 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
7431 q. 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.
7437 r. snprintf now recognizes the %F conversion.
7439 s. 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.
7443 t. When in posix mode, the default value for MAILCHECK is 600.
7445 u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables
7446 if they're not in the initial environment.
7448 v. 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
7452 w. 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.
7455 x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE,
7456 even if it assigns them default values.
7458 y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT
7459 if they appear in the initial environment.
7461 z. 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.
7466 aa. Fixed a typo in the code that tests for LC_NUMERIC.
7468 bb. The POSIXLY_CORRECT shell variable and its effects are now documented.
7470 cc. Some changes to several of the support shell scripts included in the
7471 definitions to try to avoid race conditions and attacks.
7473 dd. Several changes to avoid warnings from `gcc -Wall'.
7475 ee. 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
7479 ff. 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.
7483 gg. 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.
7486 hh. Updated the documentation to note that only interactive shells resend
7487 SIGHUP to all jobs before exiting.
7489 ii. 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)).
7493 jj. Small change from Paul Eggert to make LINENO right in commands run with
7496 2. New Features in Bash
7498 a. The `printf' builtin now handles the %a and %A conversions if they're
7499 implemented by printf(3).
7501 b. The `printf' builtin now handles the %F conversion (just about like %f).
7503 c. 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
7507 3. Changes to Readline
7509 a. Fixed a few places where negative array subscripts could have occurred.
7511 b. Fixed the vi-mode code to use a better method to determine the bounds of
7512 the array used to hold the marks.
7514 c. Fixed the defines in chardefs.h to work better when chars are signed.
7516 d. Fixed configure.in to use the new names for bash autoconf macros.
7518 e. 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
7522 f. Fixed a problem where rl_backward could possibly set point to before
7523 the beginning of the line.
7525 ------------------------------------------------------------------------------
7526 This document details the changes between this version, bash-2.05a-beta1,
7527 and the previous version, bash-2.05a-alpha1.
7531 a. Fixed a bug in the evaluation of arithmetic `for' statements when the
7532 expanded expression is NULL.
7534 b. Fixed an unassigned variable problem in the redirection printing code.
7536 c. Added more prototypes to extern function declarations in the header
7537 files and to static function declarations in C source files.
7539 d. 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
7544 e. 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.
7548 f. More const changes to function arguments and appropriate variables.
7550 g. Changed the mail checking support to handle `maildir'-style mail
7553 h. 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
7557 i. The `old' gnu malloc is no longer a configuration option.
7559 j. Augmented the bash malloc with optional tracing and registering allocated
7562 k. Prompt string decoding now saves and restores the value of $? when it
7563 expands the prompt string, so command substitutions don't change $?.
7565 i. Array indices are now `long', since shell arithmetic is performed as long,
7566 and the internal arrayind_t type is used consistently.
7568 j. Some more `unsigned char *' fixes from Paul Eggert.
7570 k. Fixed a bad call to builtin_error that could cause core dumps when making
7573 l. `return' may no longer be used to terminate a `select' command, for
7574 compatibility with ksh.
7576 m. Changed code that reads octal numbers to do a better job of detecting
7579 n. 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'.
7582 o. `umask' now prints four digits when printing in octal mode, for
7583 compatibility with other shells.
7585 p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L'
7586 formats and long doubles better, and internal functions have been
7587 simplified where appropriate.
7589 q. Some `time_t' fixes for machines were a time_t is bigger than a long.
7591 r. Replaced some bash-specific autoconf macros with standard equivalents.
7593 s. Improvmed the code that constructs temporary filenames to make the
7594 generated names a bit more random.
7596 t. Added code that checks for ascii before calling any of the is* ctype
7599 u. 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.
7602 v. 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
7606 w. `ulimit' now prints the description of a resource in any error message
7607 relating to fetching or setting that resource's limits.
7609 x. The `snprintf' replacement now computes maximum values at compile
7610 time rather than using huge constants for things like long long.
7612 y. Interactive shells now ignore `set -n'.
7614 z. 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.
7618 aa. The malloc error reporting code now attempts to print the file and line
7619 number of the call that caused the error.
7621 bb. 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
7626 cc. `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.
7631 2. Changes to Readline
7633 a. 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.
7636 b. Readline defaults to not echoing the input and lets the terminal
7637 initialization code enable echoing if there is a controlling terminal.
7639 c. 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
7644 3. New Features in Bash
7646 a. 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'
7650 b. `ulimit' now prints the option letter associated with a particular
7651 resource when printing more than one limit.
7653 c. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
7654 one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
7656 4. New Features in Readline
7658 a. New bindable variable `history-preserve-point'. If set, the history
7659 code attempts to place the user at the same location on each history
7660 line retrieved with previous-history or next-history.
7662 ------------------------------------------------------------------------------
7663 This document details the changes between this version, bash-2.05a-alpha1,
7664 and the previous version, bash-2.05-release.
7668 a. Better checks in the redirection code for write errors.
7670 b. bashbug now uses $TMPDIR, defaulting to /tmp, and uses mktemp(1) more
7673 c. System-specific configuration changes for: Interix, OpenBSD, FreeBSD,
7676 d. Some more `const' cleanups through the code.
7678 e. Fixed a typo in the /dev/fd redirection code, better checks for valid
7679 numeric fds in /dev/fd.
7681 f. Fixed many parts of the shell to handle integer overflow more gracefully
7682 and to do more stringent checks for valid numbers.
7684 g. Fixed mksignames to include config.h.
7686 h. Fixed an uninitialized variable problem that could cause the shell to core
7687 dump when replacing characters in a string.
7689 i. New mechanism for updating the patch level when official patches are
7690 released (patchlevel.h).
7692 j. configure.in changed to no longer require external files _distribution and
7695 k. Fixed non-interactive shell initialization problem when bash started as
7698 l. Fixed printf builtin conversion error handling to be POSIX.2-conformant.
7700 m. 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
7704 n. Startup files and files read with source or `.' are no longer required to
7707 o. Fixed core dump in builtin printf when user-supplied precision or field
7710 p. Fixed builtin printf to treat a negative field width as a positive field
7711 width with left-justification.
7713 r. New unwind-protect implementation from Paul Eggert.
7715 s. Fixed an inadvertently-unclosed comment in the bash completion code that
7716 caused programmable completions to not add trailing slashes or spaces to
7719 t. Fixed the process substitution code to cope better when stdin is closed.
7721 v. Fixes, mostly from Paul Eggert, for a few possible buffer overflows in
7724 w. 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.
7727 x. Command substitution no longer inherits the DEBUG trap.
7729 y. Some fixes to the process substitution code on machines without /dev/fd so
7730 that named pipes are not removed inappropriately.
7732 z. The loadable `getconf' builtin is now much more complete, and will become
7733 part of the shell in the future.
7735 aa. 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).
7738 bb. Fixed the extended pattern matching code to behave better when presented
7739 with incorrectly-formed patterns.
7741 cc. Some changes were made with the intent of making cross-compilation easier.
7743 dd. The network code (/dev/tcp and /dev/udp redirections) uses getaddrinfo(3)
7744 if it's available, which adds support for IPv6.
7746 ee. Subshells of login shells no longer source ~/.bash_logout when they exit.
7748 ff. Fixes so that subshells don't exit inappropriately if the -e option has
7751 gg. Restricted shells no longer allow functions to be exported.
7753 hh. Changes to the pattern matching code so extended pattern matching works
7754 on systems with deficient shared library implementations, like MacOS X.
7756 ii. Better error messages when a script with a leading `#!interp' fails
7757 to execute because of problems with `interp'.
7759 jj. Fixed `compgen' to handle the `-o default' option better.
7761 kk. Fixed the job control code to force an asynchronous process's standard
7762 input to /dev/null only if job control is not active.
7764 ll. Fixed a possible infinite recursion problem when `fc ""=abc' (a null
7765 pattern) is used to re-execute a previous command.
7767 mm. 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
7771 nn. Fixed a bug that caused `read -a aname' to work even if ANAME had been
7774 oo. Fixed a possible integer overflow problem when constructing names for
7777 2. New Features in Bash
7779 a. Added support for DESTDIR installation root prefix, so you can do a
7780 `make install DESTDIR=bash-root' and do easier binary packaging.
7782 b. Added support for builtin printf "'" flag character as per latest POSIX
7785 c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
7788 d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
7789 (bash doesn't use very much of what it returns).
7791 e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
7794 f. New read-only `shopt' option: login_shell. Set to non-zero value if the
7795 shell is a login shell.
7797 g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
7799 h. New `-A group/-g' option to complete and compgen; does group name
7802 i. New `-t' option to `hash' to list hash values for each filename argument.
7804 j. New [-+]O invocation option to set and unset `shopt' options at startup.
7806 k. configure's `--with-installed-readline' option now takes an optional
7807 `=PATH' suffix to set the root of the tree where readline is installed
7810 l. 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.
7814 m. `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
7819 n. `bashbug' now requires that the subject be changed from the default.
7821 o. configure has a new `--enable-largefile' option, like other GNU utilities.
7823 p. `for' loops now allow empty word lists after `in', like the latest POSIX
7826 3. Changes to Readline
7828 a. More `const' and type casting fixes.
7830 b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
7833 c. 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.
7839 d. Fixed a trivial typo that made the vi-mode `dT' command not work.
7841 e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
7843 f. Fixed the tty code so that ^V works more than once.
7845 g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
7846 because the use of __P in typedefs conflicted g++ and glibc.
7848 4. New Features in Readline
7850 a. 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).
7853 b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
7854 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
7856 c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
7858 d. New bindable boolean readline variable: match-hidden-files. Controls
7859 completion of files beginning with a `.' (on Unix). Enabled by default.
7861 e. The history expansion code now allows any character to terminate a
7862 `:first-' modifier, like csh.
7864 f. The incremental search code remembers the last search string and uses
7865 it if ^R^R is typed without a search string.
7867 ------------------------------------------------------------------------------
7868 This document details the changes between this version, bash-2.05-release,
7869 and the previous version, bash-2.05-beta2.
7873 a. 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.
7877 b. Fixed a bug in the pattern matching code that caused `[' to be treated
7878 as a special character inside a `[...]' bracket expression.
7880 c. 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 `^').
7884 d. 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'.
7888 e. 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.
7891 f. 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.
7895 g. When started in POSIX mode, either by `bash --posix', `bash -o posix', or
7896 `sh', $SHELLOPTS includes `posix' and POSIXLY_CORRECT is set.
7898 h. Fixed a problem that caused the `\W' prompt string escape sequence to
7899 expand to nothing when $PWD was `//'.
7901 i. The `bashbug' shell script no longer uses $(...) command substitution.
7903 j. When `set' is invoked without options in POSIX mode, it no longer prints
7904 the names and definitions of shell functions.
7906 2. Changes to Readline
7908 a. rl_set_paren_blink_timeout() is now documented.
7910 b. Corrected history.3 man page: `$' is not in the default value of
7911 history_word_delimiters.
7913 c. 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).
7917 3. New Features in Bash
7919 a. The `>&word' redirection now works in POSIX mode as it does by default,
7920 since POSIX.2 leaves it unspecified.
7922 ------------------------------------------------------------------------------
7923 This document details the changes between this version, bash-2.05-beta2,
7924 and the previous version, bash-2.05-beta1.
7928 a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported.
7930 b. Fixed startup so posixly_correct is retained across subshells begun to
7931 execute scripts without a leading `#!'.
7933 c. Fixed a bug that caused $(< file) to not work in a (...) subshell.
7935 d. Added config support for Linux running on the IBM S390.
7937 e. 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.
7941 f. Made a change so that command completion now makes about half as many
7942 stat(2) calls when searching the $PATH.
7944 g. Fixed a bug that caused variable assignments preceding `return' to not
7945 be propagated to the shell environment in POSIX mode.
7947 h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed
7950 i. In POSIX mode, `break' and `continue' do not complain and return success
7951 if called when the shell is not executing a loop.
7953 j. Fixed `bash -o posix' to work the same as `bash --posix'.
7955 k. Fixed a bug where variable assignments preceding `eval' or `source/.'
7956 would not show up in the environment exported to subshells run by the
7959 l. In POSIX mode, shells started to execute command substitutions inherit
7960 the value of the `-e' option from their parent shell.
7962 m. In POSIX mode, aliases are expanded even in non-interactive shells.
7964 n. Changed some of the job control messages to display the text required by
7965 POSIX.2 when the shell is in POSIX mode.
7967 o. Fixed a bug in `test' that caused it to occasionally return incorrect
7968 results when non-numeric arguments were supplied to `-t'.
7970 2. Changes to Readline
7972 a. Some changes were made to avoid gcc warnings with -Wall.
7974 b. rl_get_keymap_by_name now finds keymaps case-insensitively, so
7975 `set keymap EMACS' works.
7977 c. The history file writing and truncation functions now return a useful
7980 d. Fixed a bug that could cause applications to dereference a NULL pointer
7981 if a NULL second argument was passed to history_expand().
7983 3. New Features in Bash
7985 a. doc/readline.3 has been moved to the readline distribution.
7987 4. New Features in Readline
7989 a. New function, rl_get_screen_size (int *rows, int *columns), returns
7990 readline's idea of the screen dimensions.
7992 b. The timeout in rl_gather_tyi (readline keyboard input polling function)
7993 is now settable via a function (rl_set_keyboard_input_timeout()).
7995 c. Renamed the max_input_history variable to history_max_entries; the old
7996 variable is maintained for backwards compatibility.
7998 d. The list of characters that separate words for the history tokenizer is
7999 now settable with a variable: history_word_delimiters. The default
8002 ------------------------------------------------------------------------------
8003 This document details the changes between this version, bash-2.05-beta1,
8004 and the previous version, bash-2.05-alpha1.
8008 a. Changes to allow shared library and object building on the GNU Hurd.
8010 b. Fixes to the way exported functions are placed into the environment and
8013 c. The globbing library once again respects locales when processing ranges
8014 in bracket expressions while doing pattern matching.
8016 d. System-specific configuration changes for: Tru 64, Interix
8018 e. 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.
8021 f. 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).
8024 g. Fixed a bug in the execution of shell scripts that caused the effects of
8025 $BASH_ENV to be undone in some cases.
8027 h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly.
8029 i. Several changes to the job control code to avoid some signal state
8032 j. The Bash malloc no longer blocks signals as often, which should make it
8035 k. Fixed a parsing bug that did not allow backslash to escape a single quote
8036 inside a $'...' construct.
8038 l. Fixed a bug that caused things like ${var:=$'value'} to be parsed
8039 incorrectly. This showed up in newer versions of autoconf.
8041 m. Fixed a bug in the bash-specific readline initialization that caused
8042 key bindings to bash-specific function names appearing in .inputrc to
8045 n. Bash now sets the file descriptor it uses to save the file descriptor
8046 opened on a shell script to close on exec.
8048 o. Fixed a bug in the prompt string decoding that caused it to misbehave
8049 when presented an octal sequence of fewer than three characters.
8051 p. Fixed the `test' builtin to return an error if `[' is supplied a single
8052 argument that is not `]'.
8054 q. 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)
8059 r. 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
8063 s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values
8064 when the shell is started.
8066 t. Fixed a bug that caused SIGINT to kill shell scripts after the script
8069 u. The `fc' builtin now tries to create its temporary files in the directory
8072 v. Bash no longer calls any Readline functions or uses any Readline variables
8073 not declared in readline.h.
8075 w. Fixed a bug that caused some substitutions involving $@ to not be split
8076 correctly, especially expansions of the form ${paramterOPword}.
8078 x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it
8079 appears in the initial environment.
8081 y. 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'.
8085 z. 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.
8089 aa. 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) &'.
8093 2. Changes to Readline
8095 a. 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.
8098 b. More `const' changes in function arguments, mostly for completion
8101 c. 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.
8104 d. 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).
8108 e. Fixed a file descriptor leak in the history file manipulation code that
8109 was tripped when attempting to truncate a non-regular file (like
8112 f. 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.
8116 g. 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
8121 3. New Features in Bash
8123 a. A new loadable builtin, realpath, which canonicalizes and expands symlinks
8124 in pathname arguments.
8126 b. When `set' is called without options, it prints function definitions in a
8127 way that allows them to be reused as input. This affects `declare' and
8128 `declare -p' as well.
8130 4. New Features in Readline
8132 a. New application-callable function rl_set_prompt(const char *prompt):
8133 expands its prompt string argument and sets rl_prompt to the result.
8135 b. 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
8139 c. The history example program (examples/histexamp.c) is now built as one
8142 ------------------------------------------------------------------------------
8143 This document details the changes between this version, bash-2.05-alpha1,
8144 and the previous version, bash-2.04-release.
8148 a. A fix was made to allow newlines in compond array assignments.
8150 b. configure now checks for real-time signals with unusable values.
8152 c. Interactive shells no longer exit if a substitution fails because of an
8153 unset variable within a sourced file.
8155 d. Fixed a problem with incorrect matching of extended glob patterns when
8156 doing pattern substitution.
8158 e. `{' is now quoted by the completion code when it appears in a filename.
8160 f. Fixed an error in pattern matching that caused the matcher to not
8161 correctly skip the rest of a bracket expression after a character
8164 g. 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.
8168 h. The {!prefix@} expansion now generates separate words, analogous to $@,
8171 i. Command substitution now ignores NUL bytes in the command output, and the
8172 parser ignores them on input.
8174 j. 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().
8178 k. `pwd' now prints an error message if the write fails when displaying the
8181 l. When in POSIX mode, the shell prints trap dispostions without a leading
8182 `SIG' in the signal specification.
8184 m. Fixed a parser bug that caused the current command's line count to be
8185 messed up by a compound array assignment.
8187 n. Fixed a bug in the unwind-protect code that caused bad behavior on machines
8188 where ints and pointers are not the same size.
8190 o. System-specific configure changes for: MacOS X.
8192 p. 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.
8195 q. Fixed a bug that caused `!' to occasionally not be honored when in
8198 r. Bash no longer assumes that getcwd() will return any useful error message
8199 in the buffer passed as an argument if the call fails.
8201 s. The `source', `.', and `fc' builtins no longer check whether a file is
8202 binary before reading commands from it.
8204 t. Subshells no longer turn off job control when they exit, since that
8205 sometimes resulted in the terminal being reset to the wrong process
8208 u. 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.
8211 v. The history saving code now does a better job of saving blank lines in a
8214 w. Removed a `feature' that made `ulimit' silently translate `unlimited' to
8215 the current hard limit, which obscured some kernel error returns.
8217 x. 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
8221 { { echo a b c ; } }
8225 y. Conditional commands ([[...]]) now perform tilde expansion on their
8228 z. Noted in the documentation that `set -a' will cause functions to be
8229 exported if they are defined after `set -a' is executed.
8231 aa. 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.
8234 bb. Fixed `printf' to handle invalid floating point numbers better.
8236 cc. Temporary files are now created with random filenames, to improve security.
8238 dd. The readline initialization code now binds the custom bash functions and
8239 key bindings after the readline defaults are set up.
8241 ee. Fixed the `source' builtin to no longer overwrite a shell function's
8242 argument list, even if the sourced file changes the positional parameters.
8244 ff. A bug fix was made in the expansion of `$*' in contexts where it should
8245 not be split, like assignment statements.
8247 gg. 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 `:'.
8251 hh. The `<>' redirection is no longer subject to the current setting of
8252 `noclobber', as POSIX.2 specifies.
8254 ii. Fixed a bug in the conditional command parsing code that caused expressions
8255 in parentheses to occasionally be parsed incorrectly.
8257 jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or
8258 {...} to follow the )) without an intervening list terminator.
8260 kk. `printf' now treats `\E' the same as `\e' when performing backslash escape
8261 expansion for the `%b' format specifier.
8263 ll. 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.
8266 mm. Interactive comments are no longer turned off when POSIX mode is disabled.
8268 nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's
8269 environment when it starts up.
8271 oo. 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.
8274 pp. ${foo[@]} and ${foo[*]} now work as in ksh93 if `foo' is not an array
8277 qq. ${#foo[X]}, where X is 0, @, or *, now work as in ksh93 if `foo' is not
8280 rr. The shell's idea of an absolute pathname now takes into account a
8281 possible drive specification on Cygwin and other Windows systems.
8283 ss. Fixed a bug which caused incorrect parsing of some multi-character
8284 constructs if they were split across input lines with backslash-newline
8287 tt. Fixed a bug that caused restricted shell mode to be set inappropriately
8288 when trying to execute a shell script without a leading `#!'.
8290 uu. Shell function definitions no longer require that the body be a group
8291 command ( {...} ), as POSIX.2 requires.
8293 vv. The `cd' and `pwd' builtins now process symlinks in pathnames internally
8294 and should require many fewer calls to getcwd().
8296 ww. 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.
8299 xx. Fixed a bug that caused core dumps when expanding the value of HISTIGNORE.
8301 yy. The output of `set' is now quoted using $'...' so invisible characters are
8302 displayed as escape sequences.
8304 zz. Fixed the help text for `unset', since PATH and IFS may both be unset.
8306 aaa. The shell no longer puts directory names into the command hash table.
8308 bbb. 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.
8311 ccc. Assignment statements that attempt to assign values to readonly variables
8312 now cause the command to return an error status.
8314 ddd. Fixed a bug that could cause incorrect output if a $(<file) construct was
8317 eee. 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.
8321 fff. The string-to-integer conversion code now ignores trailing whitespace in
8322 the string, even if strtol(3) does not.
8324 ggg. 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.
8328 hhh. 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.
8331 iii. Fixed a bug in the parameter pattern substitution code to avoid infinite
8332 recursion on zero-length matches.
8334 2. Changes to Readline
8336 a. When setting the terminal attributes on systems using `struct termio',
8337 readline waits for output to drain before changing the attributes.
8339 b. A fix was made to the history word tokenization code to avoid attempts to
8340 dereference a null pointer.
8342 c. 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.
8345 d. Instead of calling (*rl_getc_function)() directly to get input in certain
8346 places, readline now calls rl_read_key() consistently.
8348 e. Fixed a bug in the completion code that allowed a backslash to quote a
8349 single quote inside a single-quoted string.
8351 f. 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.
8356 g. Fixed a bug that caused non-interactive history searches to return the
8357 wrong line when performing multiple searches backward for the same string.
8359 h. Many variables, function arguments, and function return values are now
8360 declared `const' where appropriate, to improve behavior when linking with
8363 i. The control character detection code now works better on systems where
8364 `char' is unsigned by default.
8366 j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
8368 k. 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.
8372 m. 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.
8376 n. The ding() convenience function has been renamed to rl_ding(), though the
8377 old function is still defined for backwards compatibility.
8379 o. 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.
8383 p. 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.
8386 q. 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.
8390 r. Fixed a redisplay bug that occurred when the prompt spanned more than one
8391 physical line and contained invisible characters.
8393 3. New Features in Bash
8395 a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
8396 per the new GNU coding standards.
8398 b. The /dev/tcp and /dev/udp redirections now accept service names as well as
8401 c. `complete' and `compgen' now take a `-o value' option, which controls some
8402 of the aspects of that compspec. Valid values are:
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
8412 4. New Features in Readline
8414 a. The blink timeout for paren matching is now settable by applications.
8416 b. _rl_executing_macro has been renamed to rl_executing_macro, which means
8417 it's now part of the public interface.
8419 c. 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.
8423 ------------------------------------------------------------------------------
8424 This document details the changes between this version, bash-2.04-release,
8425 and the previous version, bash-2.04-beta5.
8429 a. Better compile-time and configure-time checks for the necessity of
8432 b. A bug was fixed in the expansion of "${@:-}" when there are positional
8435 c. A typo was fixed in the output of `complete'.
8437 d. 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.
8441 e. Some fixes were made for systems which do not restart read(2) when a
8442 signal caught by bash is received.
8444 f. A bug was fixed which caused the umask to be set to 0 when an invalid
8445 symbolic mode mask was parsed.
8447 g. Fixed a bug that could cause a core dump if a SIGCHLD was received while
8448 performing an assignment statement using command substitution.
8450 h. Changed the word splitting function for programmable completion so cases
8451 in which the cursor is between words are handled a bit better.
8453 2. Changes to Readline
8455 a. rl_funmap_names() is now documented.
8457 3. New Features in Bash
8459 a. 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.
8463 ------------------------------------------------------------------------------
8464 This document details the changes between this version, bash-2.04-beta5,
8465 and the previous version, bash-2.04-beta4.
8469 a. A couple of changes were made to the Makefiles for easier building on
8472 b. Fixed a bug where the current prompt would be set to $PS2 at startup.
8474 c. The shell script that tests an already-installed version was changed to
8475 remove the directory it created its test programs in at exit.
8477 d. 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.
8483 e. A bug was fixed that, under obscure circumstances, could confuse the
8484 parser when a shell function was run by the programmable completion code.
8486 f. A bug was fixed in the ulimit builtin for systems not using getrlimit().
8488 g. 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.
8493 h. Negative exponents in the arithmetic evaluation of v**e now return an
8496 i. A bug that caused bash to check the wrong process in a pipeline for
8497 abnormal termination (and consequently resetting the terminal attributes)
8500 j. Fixed a bug that caused $PS2 to be displayed after PROMPT_COMMAND was
8503 2. Changes to Readline
8505 1. Fixed a bug in a C preprocessor define that caused the keypad control
8506 functions to be compiled out for all platforms except DJGPP.
8508 ------------------------------------------------------------------------------
8509 This document details the changes between this version, bash-2.04-beta4,
8510 and the previous version, bash-2.04-beta3.
8514 a. A couple of changes were made to the redirection to attempt to avoid
8515 race conditions and malicious file replacement.
8517 2. 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.
8521 3. A bug that caused $LINENO to be wrong when executing arithmetic for
8524 4. A couple of memory leaks in the programmable completion code were fixed.
8526 5. 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.
8530 ------------------------------------------------------------------------------
8531 This document details the changes between this version, bash-2.04-beta3,
8532 and the previous version, bash-2.04-beta2.
8536 a. Bash should run the appropriate startup files when invoked by ssh2.
8538 b. Fixed a bug in the parsing of conditional commands that could cause a
8541 c. Fixed a bug in parsing job specifications that occasionally caused
8542 core dumps when an out-of-range job was referenced.
8544 d. Fixed the `type' and `command' builtins to do better reporting of
8545 commands that are not found in $PATH or the hash table.
8547 e. Fixed a POSIX.2 compliance problem in the command builtin -- commands
8548 are supposed to be reported as full pathnames.
8550 f. The `echo' builtin now returns failure if a write error occurs.
8552 g. Fixed a bug which caused the locale to not be reset correctly when
8555 h. Changed description of `getopts' in man page and reference manual to make
8556 it clear that option characters may be characters other than letters.
8558 i. If the shell exits while in a function, make sure that any trap on EXIT
8559 doesn't think the function is still executing.
8561 j. Bashbug now tries harder to find a usable editor if $EDITOR is not set,
8562 rather than simply defaulting to `emacs'.
8564 k. Changes to the scripts that guess and canonicalize the system type, from
8565 the latest `automake' distribution via Debian.
8567 l. When using named pipes for process substitution, make sure the file
8568 descriptors opened for reading are set to non-blocking mode.
8570 m. Fixed a bug that caused termination of pipelines that are killed by a
8571 signal to not be reported in some cases.
8573 n. When not in literal-history mode, shell comment lines are not added to
8576 o. 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.
8580 p. The prompt string decoding code now backslash-quotes only characters that
8581 are special within double quotes when expanding the \w and \W escape
8584 q. 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
8588 r. Fixed a bug that caused function definitions to be printed with any
8589 redirections that should be attached to the entire function before the
8592 s. Changed the tilde expansion code for Cygwin systems to avoid creating
8593 pathnames beginning with `//' if $HOME == `/'.
8595 t. Fixed a couple of autoconf tests to avoid creating files with fixed names
8598 u. The `trap' and `kill' builtins now know the names of the POSIX.1b real-
8599 time signals on systems which support them.
8601 2. Changes to Readline
8603 a. Fixed a problem with the single-quote quoting function that could cause
8606 b. 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
8610 3. New Features in Bash
8612 a. There is a new `rbash.1' manual page, from the Debian release.
8614 b. 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
8618 ------------------------------------------------------------------------------
8619 This document details the changes between this version, bash-2.04-beta2,
8620 and the previous version, bash-2.04-beta1.
8624 a. Fixed a bug that could cause pipes to be closed inappropriately in
8627 b. Fixed a bug that caused creation of the exported environment to clobber
8628 the current command string if there were any exported shell functions.
8630 c. Some changes were made to reduce bash's memory usage.
8632 d. Fixed a problem with programmable completion and filenames to be
8633 completed containing quote characters.
8635 e. Changed the code the removes named pipes created for the <(...) and >(...)
8636 expansions to defer removal until after any current shell function has
8639 f. Fixed a bug in `select' which caused it to not handle the `continue'
8642 g. Autoconf tests added for cygwin32 and mingw32.
8644 2. New Features in Bash
8646 a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc'
8647 (which is still there for backwards compatibility).
8649 ------------------------------------------------------------------------------
8650 This document details the changes between this version, bash-2.04-beta1,
8651 and the previous version, bash-2.04-alpha1.
8655 a. Fixed a bug in the programmable completion code that occurred when
8656 trying to complete command lines containing a `;' or `@'.
8658 b. The file descriptor from which the shell is reading a script is now
8659 moved to a file descriptor above the user-addressible range.
8661 c. Changes to `printf' so that it can handle integers beginning with 0
8662 or 0x as octal and hex, respectively.
8664 d. Fixes to the programmable completion code so it handles nonsense like
8665 `compgen -C xyz' gracefully.
8667 e. The shell no longer modifies the signal handler for SIGPROF, allowing
8668 profiling again on certain systems.
8670 f. The shell checks for a new window size, if the user has requested it,
8671 after a process exits due to a signal.
8673 g. Fixed a bug with variables with null values in a program's temporary
8674 environment and the bash getenv() replacement.
8676 h. `declare' and the other builtins that take variable assignments as
8677 arguments now honor `set -a' and mark modified variables for export.
8679 i. Some changes were made for --dump-po-strings mode when writing strings
8680 with embedded newlines.
8682 j. The code that caches export strings from the initial environment now
8683 duplicates the string rather than just pointing into the environment.
8685 k. 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.
8689 l. 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.
8692 m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x.
8694 n. Fixed a problem with hostname-to-ip-address translation in the
8695 /dev/(tcp|udp)/hostname/port redirection code.
8697 o. The texinfo manual has been reorganized slightly.
8699 p. 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.
8703 q. 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.
8706 r. 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.
8710 s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline'
8711 in `time ! pipeline'.
8713 t. 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.
8717 u. Fixed the DEBUG trap code so that it has the correct value of $?.
8719 v. 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.
8723 w. Fixed a bug in the positional parameter substring code that could
8724 cause the shell to loop freeing freed memory.
8726 x. 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 `#'.
8730 y. The shell no longer attempts to import functions from the environment if
8733 z. 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
8737 aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell
8740 bb. The wait* job control functions now behave better if called when there
8741 are no unwaited-for children.
8743 cc. Command substitution no longer unconditionally disables job control in
8744 the subshell started to run the command.
8746 dd. A bug was fixed that occasionally caused traps to mess up the parser
8749 ee. `bashbug' now honors user headers in the mail message it sends.
8751 ff. A bug was fixed that caused the `:p' history modifier to not print the
8752 history expansion if the `histverify' option was set.
8754 2. Changes to Readline
8756 a. Fixed a bug in the redisplay code for lines with more than 256 line
8759 b. 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.
8762 c. 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
8767 d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
8768 sequences is redrawn correctly.
8770 3. New Features in Bash
8772 a. `bashbug' now accepts `--help' and `--version' options.
8774 b. There is a new `xpg_echo' option to `shopt' that controls the behavior
8775 of echo with respect to backslash-escaped characters at runtime.
8777 ------------------------------------------------------------------------------
8778 This document details the changes between this version, bash-2.04-alpha1,
8779 and the previous version, bash-2.04-devel.
8783 a. Fixed a bug that could cause core dumps when performing substring
8786 b. Shared object configuration changes for: Solaris, OSF/1
8788 c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities
8789 for pathname expansion now understands GLOBIGNORE.
8791 d. 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.
8795 e. 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.
8800 f. Fixed a bug that caused the expansion code to occasionally dump core if
8801 IFS contained characters > 128.
8803 g. 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.
8807 h. Variable indirection may now reference the shell's special variables.
8809 i. The $'...' and $"..." constructs are now added to the history correctly
8810 if they contain newlines and command-oriented history is enabled.
8812 j. 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).
8815 2. Changes to Readline
8817 a. The history file code now uses O_BINARY mode when reading and writing
8818 the history file on cygwin32.
8820 3. New Features in Bash
8822 a. A new programmable completion facility, with two new builtin commands:
8823 complete and compgen.
8825 b. configure has a new option, `--enable-progcomp', to compile in the
8826 programmable completion features (enabled by default).
8828 c. `shopt' has a new option, `progcomp', to enable and disable programmable
8829 completion at runtime.
8831 d. Unsetting HOSTFILE now clears the list of hostnames used for completion.
8833 4. New Features in Readline
8835 a. 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.
8839 ------------------------------------------------------------------------------
8840 This document details the changes between this version, bash-2.04-devel,
8841 and the previous version, bash-2.03-release.
8845 a. System-specific configuration and source changes for: Interix, Rhapsody
8847 b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if
8848 JOB_CONTROL was not defined.
8850 c. An obscure race condition in the trap code was fixed.
8852 d. The string resulting from $'...' is now requoted to avoid any further
8855 e. The $'...' quoting syntax now allows backslash to escape a single quote,
8856 for ksh-93 compatibility.
8858 f. The $"..." quoting syntax now escapes backslashes and double quotes in
8859 the translated string when displaying them with the --dump-po-strings
8862 g. `echo -e' no longer converts \' to '.
8864 h. Fixes were made to the extended globbing code to handle embedded (...)
8867 i. Some improvements were made to the code that unsets `nodelay' mode on
8868 the file descriptor from which bash is reading input.
8870 j. Some changes were made to the replacement termcap library for better
8871 operation on MS-DOS.
8873 k. Some changes were made to the tilde expansion code to handle backslash
8874 as a pathname separator on MS-DOS.
8876 l. The source has been reorganized a little bit -- there is now an `include'
8877 subdirectory, and lib/posixheaders has been removed.
8879 m. Improvements were made to the `read' builtin so that it makes many
8880 fewer read(2) system calls.
8882 n. The expansion of $- will include `c' and `s' when those options are
8883 supplied at shell invocation.
8885 o. Several improvements were made to the completion code: variable completion
8886 now works better when there are unterminated expansions, command
8887 completion understands quotes better, and completion now works in certain
8888 unclosed $(... constructs.
8890 p. 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).
8893 q. Some changes were made to make exported environment creation faster.
8895 r. The html documentation will be installed into $(htmldir) if that variable
8896 has a value when `make install' is run.
8898 s. Fixed a bug that would cause the bashrc file to be sourced inappropriately
8899 when bash is started by sshd.
8901 t. The SSH_CLIENT environment variable is no longer auto-exported.
8903 u. A bug that caused redirections with (...) subshells to be performed in
8904 the wrong order was fixed.
8906 v. A bug that occasionally caused inappropriate expansion of assignment
8907 statements in compound array assignments was fixed.
8909 w. The code that parses the words in a compound array assignment was
8910 simplified considerably and should work better now.
8912 x. 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
8916 y. 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.
8920 2. Changes to Readline
8922 a. The history library tries to truncate the history file only if it is a
8925 b. A bug that caused _rl_dispatch to address negative array indices on
8926 systems with signed chars was fixed.
8928 c. rl-yank-nth-arg now leaves the history position the same as when it was
8931 d. Changes to the completion code to handle MS-DOS drive-letter:pathname
8934 e. Completion is now case-insensitive by default on MS-DOS.
8936 f. Fixes to the history file manipulation code for MS-DOS.
8938 g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
8940 h. Some fixes were made to the redisplay code for better operation on MS-DOS.
8942 i. The quoted-insert code will now insert tty special chars like ^C.
8944 j. A bug was fixed that caused the display code to reference memory before
8945 the start of the prompt string.
8947 k. More support for __EMX__ (OS/2).
8949 l. A bug was fixed in readline's signal handling that could cause infinite
8950 recursion in signal handlers.
8952 m. A bug was fixed that caused the point to be less than zero when rl_forward
8953 was given a very large numeric argument.
8955 n. The vi-mode code now gets characters via the application-settable value
8956 of rl_getc_function rather than calling rl_getc directly.
8958 3. New Features in Bash
8960 a. The history builtin has a `-d offset' option to delete the history entry
8961 at position `offset'.
8963 b. 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.
8966 c. The `bind' builtin has a new `-x' option to bind key sequences to shell
8969 d. 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.
8972 e. The `help' builtin has a `-s' option to just print a builtin's usage
8975 f. There are several new arithmetic operators: id++, id-- (variable
8976 post-increment/decrement), ++id, --id (variabl pre-increment/decrement),
8977 expr1 , expr2 (comma operator).
8979 g. There is a new ksh-93 style arithmetic for command:
8980 for ((expr1 ; expr2; expr3 )); do list; done
8982 h. 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
8988 i. 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.
8992 j. 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.
8996 k. The ksh-93 ${!prefix*} expansion, which expands to the names of all
8997 shell variables whose names start with prefix, has been implemented.
8999 l. There is a new dynamic variable, FUNCNAME, which expands to the name of
9000 a currently-executing function. Assignments to FUNCNAME have no effect.
9002 m. The GROUPS variable is no longer readonly; assignments to it are silently
9003 discarded. This means it can be unset.
9005 4. New Features in Readline
9007 a. Parentheses matching is now always compiled into readline, and enabled
9008 or disabled when the value of the `blink-matching-paren' variable is
9011 b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
9013 c. MS-DOS systems now use ~/_history as the default history file.
9015 d. 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.
9019 e. history-search-{forward,backward} now leave the last history line found
9020 in the readline buffer if the second or subsequent search fails.
9022 f. New function for use by applications: rl_on_new_line_with_prompt, used
9023 when an application displays the prompt itself before calling readline().
9025 g. New variable for use by applications: rl_already_prompted. An application
9026 that displays the prompt itself before calling readline() must set this to
9029 ------------------------------------------------------------------------------
9030 This document details the changes between this version, bash-2.03-release,
9031 and the previous version, bash-2.03-beta2.
9035 a. A file descriptor leak in the `fc' builtin was fixed.
9037 b. A bug was fixed in the `read' builtin that caused occasional spurious
9038 failures when using `read -e'.
9040 c. The version code needed to use the value of the cpp variable
9041 CONF_MACHTYPE rather than MACHTYPE.
9043 d. A new test was added to exercise the command printing and copying code.
9045 e. 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.
9048 ------------------------------------------------------------------------------
9049 This document details the changes between this version, bash-2.03-beta2,
9050 and the previous version, bash-2.03-beta1.
9054 a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2.
9056 b. config.{guess,sub} support added for the NEC SX4.
9058 c. Changed some of the cross-compiling sections of the configure macros in
9059 aclocal.m4 so that configure won't abort.
9061 d. Slight changes to how the HTML versions of the bash and readline manuals
9064 e. Fixed conditional command printing to avoid interpreting printf `%'-escapes
9067 f. Don't include the bash malloc on all variants of the alpha processor.
9069 g. Changes to configure to make --enable-profiling work on Solaris 2.x.
9071 h. Fixed a bug that manifested itself when shell functions were called
9072 between calls to `getopts'.
9074 i. 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.
9078 j. Fixed a bug in the command execution code that caused child processes
9079 to occasionally have the wrong value for $!.
9081 2. Changes to Readline
9083 a. Added code to the history library to catch history substitutions using
9084 `&' without a previous history substitution or search having been
9087 3. New Features in Bash
9089 4. New Features in Readline
9091 a. New bindable variable: `isearch-terminators'.
9093 b. New bindable function: `forward-backward-delete-char' (unbound by default).
9095 ------------------------------------------------------------------------------
9096 This document details the changes between this version, bash-2.03-beta1,
9097 and the previous version, bash-2.03-alpha.
9101 a. A change was made to the help text for `{...}' to make it clear that a
9102 semicolon is required before the closing brace.
9104 b. A fix was made to the `test' builtin so that syntax errors cause test
9105 to return an exit status > 1.
9107 c. Globbing is no longer performed on assignment statements that appear as
9108 arguments to `assignment builtins' such as `export'.
9110 d. System-specific configuration changes were made for: Rhapsody,
9111 AIX 4.2/gcc, BSD/OS 4.0.
9113 e. New loadable builtins: ln, unlink.
9115 f. Some fixes were made to the globbing code to handle extended glob patterns
9116 which immediately follow a `*'.
9118 g. 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
9122 h. 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.
9126 i. A fix was made so that loops containing `eval' commands in commands passed
9127 to `bash -c' would not exit prematurely.
9129 j. 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
9133 k. A fix was made so that `jobs | command' works again.
9135 l. The erroneous compound array assignment var=((...)) is now a syntax error.
9137 m. A change was made to the dynamic loading code in `enable' to support
9140 n. A fix was made to the globbing code so that extended globbing patterns
9141 will correctly match `.' in a bracket expression.
9143 2. Changes to Readline
9145 a. 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.
9149 b. 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.
9154 3. New Features in Bash
9156 a. 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.
9160 4. New Features in Readline
9162 a. 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.
9166 ------------------------------------------------------------------------------
9167 This document details the changes between this version, bash-2.03-alpha,
9168 and the previous version, bash-2.02.1-release.
9172 a. System-specific configuration changes were made for: Irix 6.x, Unixware 7.
9174 b. The texi2dvi and texi2html scripts were updated to the latest versions
9177 c. The configure tests that determine which native type is 32 bits were
9178 changed to not require a compiled program.
9180 d. Fixed a bug in shell_execve that could cause memory to be freed twice
9181 after a failed exec.
9183 e. The `printf' test uses `diff -a' if it's available to prevent confusion
9184 due to the non-ascii output.
9186 f. 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.
9190 g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a
9193 h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar
9194 handling of RLIMIT_FILESIZE.
9196 i. 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.
9200 j. Changes were made to `printf' to handle NUL bytes in the expanded format
9203 k. The various `make clean' Makefile targets now descend into lib/sh.
9205 l. The `type' builtin was changed to use the internal `getopt' so that things
9206 like `type -ap' work as expected.
9208 m. 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.
9213 n. There is a new autoconf macro used to find which basic type is 64 bits.
9215 o. 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.
9219 p. 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.
9223 q. The prompt expansion code now quotes the `$' in the `\$' expansion so it
9224 is not processed by subsequent parameter expansion.
9226 r. Fixed a parsing bug that caused a single or double quote after a `$$' to
9227 trigger ANSI C expansion or locale translation.
9229 s. Fixed a bug in the globbing code that caused quoted filenames containing
9230 no globbing characters to sometimes be incorrectly expanded.
9232 t. Changes to the default prompt strings if prompt string decoding is not
9233 compiled into the shell.
9235 u. Added `do', `then', `else', `{', and `(' to the list of keywords that may
9236 precede the `time' reserved word.
9238 v. The shell may now be cross-built for BeOS as well as cygwin32.
9240 w. The conditional command execution code now treats `=' the same as `=='
9241 for deciding when to perform pattern matching.
9243 x. 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.
9246 y. The `printf' builtin no longer dumps core if a modifier is supplied in
9247 the format string without a conversion character (e.g. `%h').
9249 z. Array assignments of the form a=(...) no longer show up in the history
9252 aa. The parser was fixed to obey the POSIX.2 rules for finding the closing
9253 `}' in a ${...} expression.
9255 bb. 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.
9258 cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now
9259 relies on proper behavior from the C library.
9261 dd. Minor changes were made to allow quoted variable expansions using
9262 ${...} to be completed correctly if there is no closing `"'.
9264 ee. Changes were made to builtins/Makefile.in so that configuring the shell
9265 with `--enable-profiling' works right and builtins/mkbuiltins is
9268 2. Changes to Readline
9270 a. The version number is now 4.0.
9272 b. There is no longer any #ifdef SHELL code in the source files.
9274 c. Some changes were made to the key binding code to fix memory leaks and
9275 better support Win32 systems.
9277 d. Fixed a silly typo in the paren matching code -- it's microseconds, not
9280 e. The readline library should be compilable by C++ compilers.
9282 f. 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.
9286 g. The maximum numeric argument is now clamped at 1000000.
9288 h. Fixes to rl_yank_last_arg to make it behave better.
9290 i. Fixed a bug in the display code that caused core dumps if the prompt
9291 string length exceeded 1024 characters.
9293 j. The menu completion code was fixed to properly insert a single completion
9294 if there is only one match.
9296 k. A bug was fixed that caused the display code to improperly display tabs
9299 3. New Features in Bash
9301 a. New `shopt' option, `restricted_shell', indicating whether or not the
9302 shell was started in restricted mode, for use in startup files.
9304 b. Filename generation is now performed on the words between ( and ) in
9305 array assignments (which it probably should have done all along).
9307 c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
9309 d. ENV and BASH_ENV are read-only variables in a restricted shell.
9311 4. New Features in Readline
9313 a. 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
9332 b. There is a new function, rl_resize_terminal, to reset readline's idea of
9333 the screen size after a SIGWINCH.
9335 c. New public functions: rl_save_prompt and rl_restore_prompt. These were
9336 previously private functions with a `_' prefix.
9338 d. New function hook: rl_pre_input_hook, called just before readline starts
9339 reading input, after initialization.
9341 e. 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.
9346 f. New bindable function, delete-char-or-list, like tcsh.
9348 ------------------------------------------------------------------------------
9349 This document details the changes between this version, bash-2.02.1-release,
9350 and the previous version, bash-2.02-release.
9354 a. 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.
9357 b. Fixed a bug that could cause a core dump when here documents contained
9358 more than 1000 characters.
9360 c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same
9361 as the current directory when in POSIX mode.
9363 d. Fixed an alignment problem with the memory returned by the bash malloc,
9364 so returned memory is now 64-bit aligned.
9366 e. Fixed a bug that caused command substitutions executed within pipelines
9367 to put the terminal in the wrong process group.
9369 f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop,
9370 Unixware 2, and Unixware 7.
9372 g. Fixes to the pattern matching code to make it work correctly for eight-bit
9375 h. 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.
9379 i. Fixed a bug that caused core dumps when using conditional commands in
9382 j. Fixed a bug that caused the printf builtin to loop forever if the format
9383 string did not consume any of the arguments.
9385 k. Fixed a bug in the parameter expansion code that caused "$@" to be
9386 incorrectly split if $IFS did not contain a space character.
9388 l. 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.
9391 m. Fixed a bug that caused the shell to fork too early when a command
9392 such as `%2 &' was given.
9394 2. Changes to Readline
9396 a. 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.
9399 ------------------------------------------------------------------------------
9400 This document details the changes between this version, bash-2.02-release,
9401 and the previous version, bash-2.02-beta2.
9405 a. A bug was fixed that caused the terminal process group to be set
9406 incorrectly when performing command substitution of builtins in a
9409 ------------------------------------------------------------------------------
9410 This document details the changes between this version, bash-2.02-beta2,
9411 and the previous version, bash-2.02-beta1.
9415 a. Attempting to `wait' for stopped jobs now generates a warning message.
9417 b. Pipelines which exit due to SIGPIPE in non-interactive shells are now
9418 not reported if the shell is compiled -DDONT_REPORT_SIGPIPE.
9420 c. Some changes were made to builtins/psize.sh and support/bashbug.sh to
9421 attempt to avoid some /tmp file races and surreptitious file
9424 d. Fixed a bug that caused the shell not to compile if configured with
9425 dparen arithmetic but without aliases.
9427 e. Fixed a bug that caused the input stream to be switched when assigning
9428 empty arrays with `bash -c'.
9430 f. 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.
9433 g. 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.
9437 h. 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.
9441 i. Fixed a bug in the exit trap code that caused reserved words to not be
9442 recognized under certain circumstances.
9444 j. Fixed a bug in the parameter pattern substitution code so that quote
9445 removal is performed.
9447 k. The shell should now configure correctly on Apple Rhapsody systems.
9449 l. The `kill' builtin now prints a usage message if it is not passed any
9452 ------------------------------------------------------------------------------
9453 This document details the changes between this version, bash-2.02-beta1,
9454 and the previous version, bash-2.02-alpha1.
9458 a. A few compilation bugs were fixed in the new extended globbing code.
9460 b. Executing arithmetic commands now sets the command name to `((' so
9461 error messages look right.
9463 c. Fixed some build problems with various configuration options.
9465 d. The `printf' builtin now aborts immediately if an illegal format
9466 character is encountered.
9468 e. The code that creates here-documents now behaves better if the file it's
9469 trying to create already exists for some reason.
9471 f. Fixed a problem with the extended globbing code that made patterns like
9472 `x+*' expand incorrectly.
9474 g. The prompt string expansion code no longer quotes tildes with backslashes.
9476 h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in
9477 the presence of lstat(2) failures.
9479 i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'.
9481 j. The mail checking code now ensures that it has a valid default mailpath.
9483 k. A bug was fixed that caused local variables to be unset inappropriately
9484 when sourcing a script from within another sourced script.
9486 l. 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'
9490 m. A bug was fixed that caused printf overflows when displaying error
9493 n. It should be easier to build the loadble builtins in examples/loadables,
9494 though some manual editing of the generated Makefile is still required.
9496 o. The user's primary group is now always ${GROUPS[0]}.
9498 p. Some updates were made to support/config.guess from the GNU master copy.
9500 q. Some changes were made to the autoconf support for Solaris 2.6 large
9503 r. The `command' builtins now does the right thing when confstr(3) cannot
9504 find a value for _CS_PATH.
9506 s. Extended globbing expressions like `*.!(c)' are not history expanded if
9507 `extglob' is enabled.
9509 t. Using the `-P' option to `cd' will force the value that is assigned to
9510 PWD to not contain any symbolic links.
9512 2. Changes to Readline
9514 a. The code that prints completion listings now behaves better if one or
9515 more of the filenames contains non-printable characters.
9517 b. The time delay when showing matching parentheses is now 0.5 seconds.
9519 ------------------------------------------------------------------------------
9520 This document details the changes between this version, bash-2.02-alpha1,
9521 and the previous version, bash-2.01.1-release.
9525 a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x,
9526 Solaris 2.6, SINIX SVR4.
9528 b. Changes were made to the generated `info' files so that `install-info'
9531 c. PWD is now auto-exported.
9533 d. 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.
9536 e. Changes to the test suite for systems with 14-character filenames.
9538 f. The default sizes of some internal hash tables have been made smaller
9539 to reduce the shell's memory footprint.
9541 g. The `((...))' arithmetic command is now executed directly instead of
9542 being translated into `let "..."'.
9544 h. 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.
9548 i. The indirect expansion code (${!var}) was changed so that the only
9549 valid values of `var' are variable names, positional parameters, `#',
9552 j. An arithmetic expression error in a $((...)) expansion now causes a
9553 non-interactive shell running in posix mode to exit.
9555 k. 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.
9559 l. 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 `:'.
9563 m. A couple of bugs with `shopt -o' were fixed.
9565 n. `bash +o' now displays the same output as `set +o' before starting an
9568 o. A bug that caused command substitution and the `eval' builtin to
9569 occasionally free memory twice when an error was encountered was fixed.
9571 p. 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.
9575 q. 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.
9580 r. 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.
9583 s. The shell no longer parses the value of SHELLOPTS from the environment
9584 if it is restricted, running setuid, or running in `privileged mode'.
9586 t. 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
9590 u. The filename hashing code was fixed to not add `./' to the beginning of
9591 filenames which already begin with `./'.
9593 v. The configure script was changed so that the GNU termcap library is not
9594 compiled in if `prefer-curses' has been specified.
9596 w. HISTCONTROL and HISTIGNORE are no longer applied to the second and
9597 subsequent lines of a multi-line command.
9599 x. A fix was made to `disown' so that it does a better job of catching
9602 y. Non-interactive shells no longer report the status of processes terminated
9603 due to SIGINT, even if the standard output is a terminal.
9605 z. A bug that caused the output of `jobs' to have extra carriage returns
9608 aa. A bug that caused PIPESTATUS to not be set when builtins or shell
9609 functions were executed in the foreground was fixed.
9611 bb. Bash now attempts to detect when it is being run by sshd, and treats
9612 that case identically to being run by rshd.
9614 cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell
9615 options was changed was fixed.
9617 dd. The `kill' builtin now disallows empty or missing process id arguments
9618 instead of treating them as identical to `0', which means the current
9621 ee. `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'.
9625 ff. A few memory leaks were fixed.
9627 gg. `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.
9631 hh. `alias' and `alias -p' now return a status of 0 when no aliases are
9632 defined, as POSIX.2 specifies.
9634 ii. `cd -' now prints the pathname of the new working directory if the shell
9637 jj. A fix was made so that the code that binds $PWD now copes with getcwd()
9640 kk. `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.
9643 ll. A change was made to the code that generates filenames for here documents
9644 to make them less prone to name collisions.
9646 mm. The parser was changed so that `time' is recognized as a reserved word
9647 only at the beginning of a pipeline.
9649 nn. The pathname canonicalization code was changed so that `//' is converted
9650 into `/', but all other pathnames beginning with `//' are left alone, as
9653 oo. The `logout' builtin will no longer exit a non-interactive non-login
9656 2. Changes to Readline
9658 a. Fixed a problem in the readline test program rltest.c that caused a core
9661 b. The code that handles parser directives in inputrc files now displays
9662 more error messages.
9664 c. 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.
9668 3. New Features in Bash
9670 a. 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.
9674 b. A new version of gmalloc, based on the old GLIBC malloc, with many
9675 changes and range checking included by default.
9677 c. 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
9682 d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
9683 implemented, controlled by a new `shopt' option, `extglob'.
9685 e. There is a new ksh-like `[[' compound command, which implements
9686 extended `test' functionality.
9688 f. There is a new `printf' builtin, implemented according to the POSIX.2
9691 g. 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)).
9695 h. There are new tilde prefixes which expand to directories from the
9698 i. There is a new `**' arithmetic operator to do exponentiation.
9700 j. 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.
9704 k. There is a new configuration option, `--enable-cond-command', which
9705 controls whether or not the `[[' command is included. It is on by
9708 l. 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.
9712 m. 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
9717 n. There is a new invocation option, `--dump-po-strings', to dump
9718 a shell script's translatable strings ($"...") in GNU `po' format.
9720 o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
9721 pattern matching when globbing filenames and using the `case' construct.
9723 p. 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
9727 q. `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
9731 r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
9732 and running jobs, respectively.
9734 s. The `shopt' `-p' option now causes output to be displayed in a reusable
9737 t. `test' has a new `-N' option, which returns true if the filename argument
9738 has been modified since it was last accessed.
9740 u. `umask' now has a `-p' option to print output in a reusable format.
9742 v. 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
9746 w. The prompt string expansion code has a new `\r' escape sequence.
9748 x. The shell may now be cross-compiled for the CYGWIN32 environment on
9751 4. New Features in Readline
9753 a. 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
9757 b. 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').
9761 c. New variable, `completion-ignore-case', which causes filename completion
9762 and matching to be performed case-insensitively.
9764 d. 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.
9768 e. 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).
9772 f. 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
9776 g. 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.
9780 h. An `$include' inputrc file parser directive has been added.
9782 ------------------------------------------------------------------------------
9783 This document details the changes between this version, bash-2.01.1-release,
9784 and the previous version, bash-2.01-release.
9788 a. The select command was fixed to check the validity of the user's
9789 input more strenuously.
9791 b. A bug was fixed that prevented `time' from timing commands correctly
9792 when supplied as an argument to `bash -c'.
9794 c. 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
9798 d. Fixed an off-by-one error in the tilde expansion library.
9800 e. When using the compound array assignment syntax, the old value of
9801 the array is cleared before assigning the new value.
9803 f. 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.
9806 g. Fixed a bug in the locale code that occurred when assigning a value
9809 h. 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 `='.
9813 i. A fix was made to the command tracing code to correctly quote each
9816 j. Some changes were made to the bash-specific autoconf tests to make them
9819 k. Completion of words with globbing characters now correctly quotes the
9822 l. The directory /var/spool/mail is now preferred to /usr/spool/mail when
9823 configure is deciding on the default mail directory.
9825 m. The brace completion code was fixed to not quote the `{' and `}'.
9827 n. Some fixes were made to make $RANDOM more random in subshells.
9829 o. System-specific changes were made to configure for: SVR4.2
9831 p. Changes were made so that completion of words containing globbing chars
9832 substitutes the result only if a single filename was matched.
9834 q. The window size is now recomputed after a job is stopped with SIGTSTP if
9835 the user has set `checkwinsize' with `shopt'.
9837 r. When doing substring expansion, out-of-range substring specifiers now
9838 cause nothing to be substituted rather than an expansion error.
9840 s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' --
9841 only `EXIT' and `DEBUG' are accepted.
9843 t. The display of trapped signals now uses the signal number if signals
9844 for which bash does not know the name are trapped.
9846 u. A fix was made so that `bash -r' does not turn on restricted mode until
9847 after the startup files are executed.
9849 v. 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
9853 w. A bug that occasionally caused unallocated memory to be passed to free()
9854 when doing arithmetic substitution was fixed.
9856 x. A bug that caused a buffer overrun when expanding a prompt string
9857 containing `\w' and ${#PWD} exceeded PATH_MAX was fixed.
9859 y. A problem with the completion code that occasionally caused it to
9860 refer to a character before the beginning of the readline line buffer
9863 z. A bug was fixed so that the `read' builtin restarts reads when
9864 interrupted by signals other than SIGINT.
9866 aa. Fixed a bug that caused a command to be freed twice when there was
9867 an evaluation error in the `eval' command.
9869 2. Changes to Readline
9871 a. Added a missing `extern' to a declaration in readline.h that kept
9872 readline from compiling cleanly on some systems.
9874 b. The history file is now opened with mode 0600 when it is written for
9877 c. Changes were made to the SIGWINCH handling code so that prompt redisplay
9880 d. ^G now interrupts incremental searches correctly.
9882 e. A bug that caused a core dump when the set of characters to be quoted
9883 when completing words was empty was fixed.
9885 ------------------------------------------------------------------------------
9886 This document details the changes between this version, bash-2.01-release,
9887 and the previous version, bash-2.01-beta2.
9891 a. The `distclean' target should remove the `printenv' executable if it
9894 b. The test suite was changed slightly to ensure that the error messages
9895 are printed in English.
9897 c. A bug that caused the shell to dump core when a filename containing a
9898 `/' was passed to `hash' was fixed.
9900 d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1
9903 e. A memory leak when completing commands was fixed.
9905 f. A memory leak that occurred when checking the hash table for commands
9906 with relative paths was fixed.
9908 ------------------------------------------------------------------------------
9909 This document details the changes between this version, bash-2.01-beta2,
9910 and the previous version, bash-2.01-beta1.
9914 a. 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.
9917 b. Fixed a bug that caused the bash emulation of strcasecmp to produce
9920 c. A bug that caused memory to be freed twice when a trap handler resets
9921 the trap more than once was fixed.
9923 d. A bug that caused machines where sizeof (pointer) > sizeof (int) to
9924 fail (and possibly dump core) when trying to unwind-protect a null
9927 e. The startup files should not be run with job control enabled. This fix
9928 allows SIGINT to once again interrupt startup file execution.
9930 f. Bash should not change the SIGPROF handler if it is set to something
9933 g. 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.
9937 h. The completion code now correctly quotes filenames containing a `!',
9938 even if the user attempted to use double quotes when attempting
9941 i. A bug that caused the shell to dump core when `disown' was called without
9942 arguments and there was no current job was fixed.
9944 j. A construct like $((foo);bar) is now processed as a command substitution
9945 rather than as a bad arithmetic substitution.
9947 k. 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
9951 l. 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
9955 2. Changes to Readline
9957 a. A couple of bugs that caused the history search functions to attempt to
9958 free a NULL pointer were fixed.
9960 b. 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'.
9965 c. If the filename completion function finds that a directory was not closed
9966 by a previous (interrupted) completion, it closes the directory with
9969 3. New Features in Bash
9971 a. New bindable readline commands: history-and-alias-expand-line and
9972 alias-expand-line. The code was always in there, there was just no
9975 ------------------------------------------------------------------------------
9976 This document details the changes between this version, bash-2.01-beta1,
9977 and the previous version, bash-2.01-alpha1.
9981 a. Fixed a problem that could cause file descriptors used for process
9982 substitution to conflict with those used explicitly in redirections.
9984 b. Made it easier to regenerate configure if the user changes configure.in.
9986 c. ${GROUPS[0]} should always be the primary group, even on systems without
9989 d. Spelling correction is no longer enabled by default.
9991 e. Fixes to quoting problems in `bashbug'.
9993 f. OS-specific configuration changes were made for: Irix 6.
9995 g. OS-specific code changes were made for: QNX.
9997 h. A more meaningful message is now printed when the file in /tmp for a
9998 here document cannot be created.
10000 i. Many changes to the shell's variable initialization code to speed
10001 non-interactive startup.
10003 j. Changes to the non-job-control code so that it does not try to open
10006 k. The output of `set' and `export' is once again sorted, as POSIX wants.
10008 l. Fixed a problem caused by a recursive call reparsing the value of
10011 m. 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.
10015 n. Fixed a problem that caused `bash -o' or `bash +o' to not list all
10018 o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit
10019 only if the hard limit is greater than the current (soft) limit.
10021 p. 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.
10025 q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated
10026 an unfinished command completion (`/), which generated errors.
10028 r. 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.
10032 s. Added support for <stdarg.h> to places where it was missing.
10034 t. 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.
10037 u. A number of changes to speed up export environment creation were made.
10039 v. A number of memory leaks were fixed as the result of running the test
10040 scripts through Purify.
10042 w. Fixed a bug that caused subshells forked to interpret executable
10043 scripts without a leading `#!' to not reinitialize the values of
10046 2. Changes to Readline
10048 a. History library has less `#ifdef SHELL' code -- abstracted stuff out
10049 into application-specific function hooks.
10051 b. 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(),
10055 c. Fixed translation of ESC when `untranslating' macro values.
10057 d. The region kill operation now fixes the mark if it ends up beyond the
10058 boundaries of the line after the region is deleted.
10060 3. New Features in Bash
10062 a. New argument for `configure': `--with-curses'. This can be used to
10063 override the selection of the termcap library on systems where it is
10066 ------------------------------------------------------------------------------
10067 This document details the changes between this version, bash-2.01-alpha1,
10068 and the previous version, bash-2.0-release.
10072 a. System-specific configuration changes for: FreeBSD, SunOS4, Irix,
10073 MachTen, QNX 4.2, Harris Night Hawk, SunOS5.
10075 b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2,
10078 c. A bug that caused the exec builtin to fail because the full pathname of
10079 the command could not be found was fixed.
10081 d. The code that performs output redirections is now more resistant to
10082 race conditions and possible security exploits.
10084 e. A bug that caused the shell to dump core when performing pattern
10085 substitutions on variable values was fixed.
10087 f. More hosts are now recognized by the auto-configuration mechanism
10088 (OpenBSD, QNX, others).
10090 g. Assignments to read-only variables that attempt to convert them to
10091 arrays are now errors.
10093 h. A bug that caused shell scripts using array assignments in POSIX mode
10094 to exit after the assignment was performed was fixed.
10096 i. The substring expansion code is now more careful about running off the
10097 ends of the expanded variable value.
10099 j. A bug that caused completion to fail if a backquoted command substitution
10100 appeared anywhere on the line was fixed.
10102 k. The `source' builtin no longer turns off history if it has been enabled
10103 in a non-interactive shell.
10105 l. A bug that caused the shell to crash when `disown' was given a pid
10106 instead of a job number was fixed.
10108 m. The `cd' spelling correction code will not try to change to `.' if no
10109 directory entries match a single-character argument.
10111 n. A bad variable name supplied to `declare', `export', or `readonly' no
10112 longer causes a non-interactive shell in POSIX mode to exit.
10114 o. Some fixes were made to the test suite to handle peculiarities of
10115 various Unix versions.
10117 p. The bash completion code now quotes characters that readline would
10118 treat as word breaks for completion but are not shell metacharacters.
10120 q. Bad options supplied at invocation now cause a usage message to be
10123 r. Fixes were made to the code that handles DEBUG traps so that the trap
10124 string is not freed inappropriately.
10126 s. Some changes were made to the bash debugger in examples/bashdb -- it
10127 should be closer to working now.
10129 t. A problem that caused the default filename used for mail checking to be
10132 u. 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.
10135 v. 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.
10138 w. 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
10142 x. A fix was made to the command timing code so that `time' can be used in
10145 y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as
10146 a nested subshell rather than strictly as an (erroneous) arithmetic
10149 z. A fix was made to the globbing code so that it correctly matches quoted
10150 filenames beginning with a `.'.
10152 aa. 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.
10156 bb. The `ulimit' builtin now attempts to catch some classes of integer
10159 cc. The command-oriented-history code no longer attempts to add `;'
10160 inappropriately when a newline appears while reading a $(...) command
10163 dd. A bug that caused the shell to dump core when `help --' was executed
10166 ee. 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
10170 ff. Implicit input redirections from /dev/null for asynchronous commands
10171 are now handled better.
10173 gg. A bug that caused the shell to fail to compile when configured with
10174 `--disable-readline' was fixed.
10176 hh. The globbing code should now be interruptible.
10178 ii. 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.
10182 jj. 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.
10185 kk. The command printing code now preserves the `-p' flag to `time'.
10187 ll. The command printing code now handles here documents better when there
10188 are other redirections associated with the command.
10190 mm. 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.
10194 nn. 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.
10199 oo. `bashbug' now uses a filename shorter than 14 characters for its
10200 temporary file, and asks for confirmation before sending the bug
10203 pp. 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.
10207 qq. A bug in the brace expansion code that caused brace expansions appearing
10208 in new-style $(...) command substitutions to be inappropriately expanded
10211 rr. A bug in the readline hook shell-expand-line that could cause memory to
10212 be inappropriately freed was fixed.
10214 ss. A bug that caused some arithmetic expressions containing `&&' and `||'
10215 to be parsed with the wrong precedence has been fixed.
10217 tt. References to unbound variables after `set -u' has been executed now
10218 cause the shell to exit immediately, as they should.
10220 uu. 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.
10224 vv. A bug that could occasionally cause the shell to crash with a
10225 divide-by-zero error when timing a command was fixed.
10227 ww. 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.
10231 xx. The `break' and `continue' builtins now break out of all loops when an
10232 invalid count argument is supplied.
10234 yy. Fixed a bug that caused PATH to be set to the empty string if
10235 `command -p' is executed with PATH unset.
10237 zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix,
10238 as POSIX specifies.
10240 aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS
10241 if there were no shell options set.
10243 bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX
10244 mode, their output is as POSIX.2 specifies.
10246 ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually
10247 creates an array variable.
10249 ddd. Fixed a bug that prevented `time' from correctly timing background
10252 2. Changes to Readline
10254 a. A bug that caused an extra newline to be printed when the cursor was on
10255 an otherwise empty line was fixed.
10257 b. An instance of memory being used after it was freed was corrected.
10259 c. The redisplay code now works when the prompt is longer than the screen
10262 d. `dump-macros' is now a bindable name, as it should have been all along.
10264 e. Non-printable characters are now expanded when displaying macros and
10267 f. 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.
10271 3. New Features in Bash
10273 a. 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.
10276 4. New Features in Readline
10278 a. 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.
10283 ------------------------------------------------------------------------------
10284 This document details the changes between this version, bash-2.0-release,
10285 and the previous version, bash-2.0-beta3.
10289 a. Fix to the `getopts' builtin so that it does the right thing when a
10290 required option argument is not present.
10292 b. 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.
10296 c. Fixed a bug that made messages in MAILPATH entries not work correctly.
10298 d. Fixed a serious documentation error in the description of the new
10299 ${parameter:offset[:length]} expansion.
10301 e. Fixes to make parameter substring expansion ({$param:offset[:length]})
10302 work when within double quotes.
10304 f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional
10307 g. Corrected a misspelling of `unlimited' in the output of `ulimit'.
10309 h. Fixed a bug that caused executable scripts without a leading `#!' to
10310 occasionally pick up the wrong set of positional parameters.
10312 i. Linux systems now have a working `ulimit -v', using RLIMIT_AS.
10314 j. Updated config.guess so that many more machine types are recognized.
10316 k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]}
10319 l. 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'.
10323 m. Fixed a bug that caused core dumps when the DEBUG trap was ignored
10324 with `trap "" DEBUG' and a shell function was subsequently executed.
10326 n. 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.
10329 2. Changes to Readline
10331 a. Fixed a bug that caused a numeric argument of 1024 to be ignored when
10334 b. Fixed the display code so that the numeric argument is displayed as it's
10337 c. Fixed the numeric argument reading code so that `M-- command' is
10338 equivalent to `M--1 command', as the prompt implies.
10340 3. New Features in Bash
10342 a. `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'.
10346 b. Integer constants have been extended to base 64.
10348 4. New Features in Readline
10350 a. The `home' and `end' keys are now bound to beginning-of-line and
10351 end-of-line, respectively, if the corresponding termcap capabilities
10354 ------------------------------------------------------------------------------
10355 This document details the changes between this version, bash-2.0-beta3,
10356 and the previous version, bash-2.0-beta2.
10360 a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX.
10362 b. When in POSIX mode, variable assignments preceding a special builtin
10363 persist in the shell environment after the builtin completes.
10365 c. 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.
10369 d. Fixed a bug that caused seg faults when executing scripts with the
10370 execute bit set but without a leading `#!'.
10372 e. The environment passed to executed commands is never sorted.
10374 f. A bug was fixed in the code that expands ${name[@]} to the number of
10375 elements in an array variable.
10377 g. A bug was fixed in the array compound assignment code ( A=( ... ) ).
10379 h. Window size changes now correctly propagate down to readline if
10380 the shopt `checkwinsize' option is enabled.
10382 i. A fix was made in the code that expands to the length of a variable
10385 j. A fix was made to the command builtin so that it did not turn on the
10386 `no fork' flag inappropriately.
10388 k. A fix was made to make `set -n' work more reliably.
10390 l. 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.
10394 2. Changes to Readline
10396 a. System-specific changes for: SCO 3.2v[45].
10398 b. 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.
10402 3. New features in Bash
10404 a. There is a new version of the autoload function package, in
10405 examples/functions/autoload.v2, that uses arrays and provides more
10408 b. Support for LC_COLLATE and locale-specific sorting of the results of
10409 pathname expansion if strcoll() is available.
10411 4. New Features in Readline
10413 a. Support for locale-specific sorting of completion possibilities if
10414 strcoll() is available.
10416 ------------------------------------------------------------------------------
10417 This document details the changes between this version, bash-2.0-beta2,
10418 and the previous version, bash-2.0-beta1.
10422 a. `pushd -' is once again equivalent to `pushd $OLDPWD'.
10424 b. OS-specific changes for: SCO 3.2v[45].
10426 c. 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.
10430 d. Some changes were made to the test suite so that it works if you
10431 configure bash with --enable-usg-echo-default.
10433 e. A fix was made to the parsing of conditional arithmetic expressions.
10435 f. Illegal arithmetic bases now cause an arithmetic evaluation error rather
10436 than being silently reset.
10438 g. Multiple arithmetic bases now cause an arithmetic evaluation error
10439 instead of being ignored.
10441 h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2.
10443 i. A bug that sometimes caused array indices to be evaluated twice (which
10444 would cause errors when they contained assignment statements) was fixed.
10446 j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning
10447 unsigned values and to simplify the code.
10449 k. A bug in the command-oriented-history code that caused it to sometimes
10450 put semicolons after right parens inappropriately was fixed.
10452 l. The values inserted into the prompt by the \w and \W escape sequences
10453 are now quoted to prevent further expansion.
10455 m. 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.
10459 n. The file named by $ENV is never read by non-interactive shells.
10461 2. Changes to Readline
10463 a. A few changes were made to hide some macros and functions that should not
10466 b. An off-by-one error that caused seg faults in the history expansion code
10469 3. New Features in Bash
10471 a. 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.
10475 b. 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.
10479 c. `ulimit' has a `-l' option that reports the maximum amount of data that
10480 may be locked into memory on 4.4BSD-based systems.
10482 ------------------------------------------------------------------------------
10483 This document details the changes between this version, bash-2.0-beta1,
10484 and the previous version, bash-2.0-alpha4.
10488 a. A bug that sometimes caused traps to be ignored on signals the
10489 shell treats specially was fixed.
10491 b. 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.
10496 c. A bug was fixed that sometimes caused double-quoted strings to be
10497 parsed incorrectly.
10499 d. Changes were made so that the siglist code compiles correctly on
10502 e. Added `:' to the set of characters that cause word breaks for the
10503 completion code so that pathnames in assignments to $PATH can be
10506 f. The `select' command was fixed to print $PS3 to stderr.
10508 g. Fixed an error in the manual page section describing the effect that
10509 setting and unsetting GLOBIGNORE has on the setting of the `dotglob'
10512 h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC
10513 on systems without gettimeofday() and resources.
10515 i. The getopt static variables are now initialized each time a subshell
10516 is started, so subshells using `getopts' work right.
10518 j. A sign-extension bug that caused a possible security hole was fixed.
10520 k. 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.
10524 l. A bug that caused `^O' to work incorrectly when typed as the first
10525 thing to an interactive shell was fixed.
10527 m. A rarely-exercised off-by-one error in the code that quotes variable
10530 n. Some memory and file descriptor leaks encountered when running a
10531 shell script that is executable but does not have a leading `#!'
10534 2. Changes to Readline
10536 a. A bug that sometimes caused incorrect results when trying to read
10537 typeahead on systems without FIONREAD was fixed.
10539 3. New Features in Bash
10541 a. The command timing code now uses the value of the TIMEFORMAT variable
10542 to format and display timing statistics.
10544 b. The `time' reserved word now accepts a `-p' option to force the
10545 POSIX.2 output format.
10547 c. There are a couple of new and updated scripts to convert csh startup
10548 files to bash format.
10550 d. 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.
10554 4. New Features in Readline
10556 a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter
10559 ------------------------------------------------------------------------------
10560 This document details the changes between this version, bash-2.0-alpha4,
10561 and the previous version, bash-2.0-alpha3.
10565 a. There is better detection of rsh connections on Solaris 2.
10567 b. 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.
10571 c. The word tokenizer was rewritten to handle nested quotes and pairs
10572 ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...))
10573 correctly. Some of the parameter expansion code was updated as a
10576 d. 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
10580 e. 2''>/dev/null is no longer equivalent to 2>/dev/null.
10582 f. 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
10586 g. A fix was made to the completion code so that it no longer removes the
10587 text the user typed in some cases.
10589 h. The special glibc `getopt' environment variable is no longer put into
10590 the environment on machines with small values of ARG_MAX.
10592 i. The expansion of ${...} now follows the POSIX.2 rules for finding the
10595 j. 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.
10599 k. `shopt -o' now correctly updates $SHELLOPTS.
10601 l. 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
10605 m. The shell now does tilde expansions on unquoted `:~' in assignment
10606 statements when not in posix mode.
10608 n. Variable assignment errors when a command consists only of assignments
10609 now cause non-interactive shells to exit when in posix mode.
10611 o. If the variable in a `for' or `select' command is read-only, or not a
10612 legal shell identifier, a variable assignment error occurs.
10614 p. `test' now handles `-a' and `-o' as binary operators when three arguments
10615 are supplied, and correctly parses `( word )' as equivalent to `word'.
10617 q. `test' was fixed so that file names of the form /dev/fd/NN mean the same
10618 thing on all systems, even Linux.
10620 r. Fixed a bug in the globbing code that caused patterns with multiple
10621 consecutive `*'s to not be matched correctly.
10623 s. Fixed a bug that caused $PS2 to not be printed when an interactive shell
10624 not using readline is reading a here document.
10626 t. Fixed a bug that caused history expansion to be performed inappropriately
10627 when a single-quoted string spanned more than one line.
10629 u. `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
10633 v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it
10634 encounters an error.
10636 w. Fixed `set' to display variable values in a form that can be re-read.
10638 x. 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.
10641 y. Non-interactive shells in posix mode now exit if the name in a function
10642 declaration is not a legal identifier.
10644 z. The job control code now ignores stopped children when the shell is not
10647 aa. 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
10651 bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2.
10653 cc. `time' now prints its output to stderr, as POSIX.2 specifies.
10655 2. Fixes to Readline
10657 a. After printing possible completions, all lines of a multi-line prompt
10660 b. Some changes were made to the terminal handling code in rltty.c to
10661 work around AIX 4.2 bugs.
10663 3. New Features in Bash
10665 a. 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
10670 b. 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.
10673 4. New Features in Readline
10675 a. 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.
10679 b. 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.
10683 ------------------------------------------------------------------------------
10684 This document details the changes between this version, bash-2.0-alpha3,
10685 and the previous version, bash-2.0-alpha2.
10687 There is now a file `COMPAT' included in the distribution that lists the
10688 user-visible incompatibilities between 1.14 and 2.0.
10692 a. Some work was done so that word splitting of the rhs of assignment
10693 statements conforms more closely to historical practice.
10695 b. A couple of errant memory frees were fixed.
10697 c. A fix was made to the test builtin so it recognizes `<' and `>' as
10700 d. 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.
10704 e. Fixed a problem with conversion to 12-hour time in the prompt
10707 f. Fixed a problem with configure's argument parsing order. Now you can
10708 correctly turn on specific options after using --enable-minimal-config.
10710 g. 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).
10714 h. There are new prompt expansions (\v and \V) to insert version information
10715 into the prompt strings.
10717 i. The default prompt string now includes the version number.
10719 j. 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.
10723 k. Some system-specific changes were made for SVR4.2 and Solaris 2.5.
10725 l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of
10728 m. A couple of problems caused by uninitialized variables were fixed.
10730 n. There are a number of new loadable builtin examples: logname, basename,
10731 dirname, tty, pathchk, tee, head, and rmdir. All of these conform to
10734 o. Bash now notices changes in TZ and calls tzset() if present, so
10735 changing TZ will alter the time printed by prompt expansions.
10737 p. 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.
10741 q. Bash no longer turns off job control if called as `sh', since the
10742 POSIX.2 spec includes job control as a standard feature.
10744 r. `bash -o posix' now works as intended.
10746 s. 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.
10750 t. Fixed ulimit so that (hopefully) the full range of limits is available
10753 u. A new `shopt' option (`hostcomplete') enables and disables hostname
10756 v. The shell no longer attempts to save the history on an abort(),
10757 which is usually called by programming_error().
10759 w. The `-s' option to `fc' was changed to echo the command to be executed
10760 to stderr instead of stdout.
10762 x. If the editor invoked by `fc -e' exits with a non-zero status, no
10763 commands are executed.
10765 y. Fixed a bug that made the shopt `histverify' option work incorrectly.
10767 z. 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.)
10771 aa. The `ulimit' builtin now allows the maximum virtual memory size to be
10772 set via setrlimit(2) if RLIMIT_VMEM is defined.
10774 bb. `bash -nc 'command'' no longer runs `command'.
10776 2. Changes to Readline
10778 a. Fixed a typo in the code that checked for FIONREAD in input.c.
10780 b. Fixed a bug in the code that outputs keybindings, so things like C-\
10781 are quoted properly.
10783 c. 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
10788 d. Readline no longer turns off the terminal's meta key, and turns it on
10789 once the first time it's called.
10791 ------------------------------------------------------------------------------
10792 This file documents the changes between this version, bash-2.0-alpha2,
10793 and the previous version, bash-2.0-alpha.
10797 a. The shell no longer thinks directories are executable.
10799 b. `disown' has a new option, `h', which inhibits the resending of SIGHUP
10800 but does not remove the job from the jobs table.
10802 c. The varargs functions in error.c now use ANSI-C `stdarg' if available.
10804 d. 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'.
10808 e. 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.)
10812 f. A fix was made to keep `wait' from hanging when waiting for all background
10815 g. `bash --help' now writes its output to stdout, like the GNU Coding Standards
10816 specify, and includes the machine type (the value of MACHTYPE).
10818 h. `bash --version' now prints more information and exits successfully, like
10819 the GNU Coding Standards specify.
10821 i. The output of `time' and `times' now prints fractional seconds with three
10822 places after the decimal point.
10824 j. A bug that caused process substitutions to screw up the pipeline printed
10825 by `jobs' was fixed.
10827 k. Fixes were made to the code that implements $'...' and $"..." so they
10828 work as documented.
10830 l. The process substitution code now opens named pipes for reading with
10831 O_NONBLOCK to avoid hanging.
10833 m. 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 `.'.
10837 n. 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'.
10840 o. Fixed an auto-increment error that caused bash -c args to sometimes dump
10843 p. Fixed a bug that caused $HISTIGNORE to fail when the history line
10844 contained globbing characters.
10846 2. Changes to Readline
10848 a. There is a new string variable, rl_library_version, available for use by
10849 applications. The current value is "2.1".
10851 b. A bug encountered when expand-tilde was enabled and file completion was
10852 attempted on a word beginning with `~/' was fixed.
10854 c. 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
10857 character. This is intended to allow users to terminate searches with
10858 the arrow keys and get the behavior they expect.