1 This document details the changes between this version, bash-4.4-release, and
2 the previous version, bash-4.4-rc2.
6 a. Fixed a bug that could potentially result in a crash due to an integer
9 b. Fixed a bug in where commands printed due to `set -x' could be incorrectly
10 quoted if being printed in contexts where they haven't yet been expanded.
12 c. Fixed several memory leaks.
14 d. Fixed a bug that could potentially cause the terminal attributes to be
15 set incorrectly by a command run from a programmable completion.
17 e. Fixed several potential buffer overflow issues in the word expansion code.
19 2. Changes to Readline
21 3. New Features in Bash
23 4. New Features in Readline
25 ------------------------------------------------------------------------------
26 This document details the changes between this version, bash-4.4-rc2, and
27 the previous version, bash-4.4-beta2.
31 a. Fixed an out-of-bounds read in the redirection operator completion code.
33 b. Fixed execution context so `until continue' doesn't disable execution for
36 c. Fixed trap handling code so traps don't inherit a command's temporary
39 d. Fixed a bug that resulted in incorrect line numbers when a function is
40 defined as part of another function's execution.
42 e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting
43 is not performed and $IFS is not the default.
45 f. Fixed a bug that caused ''"$@" to not expand to an empty argument when
46 there are no positional parameters.
48 g. Fixed a bug that caused a shell compiled without job control to use the
49 incorrect exit status for builtin commands preceded by a command executed
50 from the file system that causes the shell to call waitpid().
52 h. Improved word completion for quoted strings containing unterminated command
53 substitutions with embedded double quotes.
55 2. Changes to Readline
57 a. Fixed a bug that caused mode strings to be displayed incorrectly if the
58 prompt was shorter than the mode string.
60 3. New Features in Bash
62 a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
63 the nounset option is enabled no longer throws an unbound variable error.
65 4. New Features in Readline
67 a. New application-callable function: rl_pending_signal(): returns the signal
68 number of any signal readline has caught but not yet handled.
70 b. New application-settable variable: rl_persistent_signal_handlers: if set
71 to a non-zero value, readline will enable the readline-6.2 signal handler
72 behavior in callback mode: handlers are installed when
73 rl_callback_handler_install is called and removed removed when a complete
76 ------------------------------------------------------------------------------
77 This document details the changes between this version, bash-4.4-beta2, and
78 the previous version, bash-4.4-rc1.
82 a. Fixed a memory leak when processing ${!var[@]}.
84 b. Fixed a bug that caused subshells to free trap strings associated with
87 c. Inheriting BASHOPTS from the environment now works to force actions
88 associated with enabling an option, instead of just marking the option
91 d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
94 e. Fixed a bug caused by an accidental omission of part of the original patch
97 e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
99 f. Fixed a bug that caused parsing errors in command substitutions with
100 consecutive case statements separated by newlines.
102 g. Updated logic used to decide whether bash is running inside an emacs
103 terminal emulator to work with future emacs versions.
105 h. Fixed two extended pattern matching bugs caused by premature short-
108 i. Fixed a memory leak in the code that removes duplicate history entries.
110 j. There are a number of bug fixes to coproc, mapfile, declare, unset,
111 and assignment statements that prevent nameref variables from creating
112 and unsetting variables with invalid names.
114 k. Fixed a bug that caused variables to be inadvertently marked as both an
115 associative and an indexed array.
117 l. Fixed a bug that caused `bash -c' to not run a trap specified in the
120 j. There are a number of bug fixes to coproc, mapfile, declare, and assignment
121 statements that prevent nameref variables from overwriting or modifying
122 attributes of readonly variables.
124 k. Fixed a bug that caused command substitution to attempt to set the
125 terminal's process group incorrectly.
127 l. Fixed a bug that could cause prompt string expansion to display error
128 messages when the `nounset' shell option is set.
130 m. Fixed a bug that caused "$@" to not expand to an empty string under the
131 circumstances when Posix says it should ("${@-${@-$@}}").
133 n. Fixed several bugs caused by referencing nameref variables whose values
134 are names of unset variables (or names that are valid for referencing
135 but not assignment), including creating variables in the temporary
138 o. Function tracing and error tracing are disabled if --debugger is supplied
139 at startup but the shell can't find the debugger start file.
141 p. Fixed a bug when IFS is used as the control variable in a for statement.
143 q. Fixed a bug with SIGINT received by a command substitution in an interactive
146 r. The checks for nameref variable self-references are more thorough.
148 s. Fixed several bugs with multi-line aliases.
150 t. Fixed `test' to handle the four-argument case where $1 == '(' and
153 u. Fixed a bug in the expansion of $* in the cases where word splitting is
156 v. Fixed a bug in execution of case statements where IFS includes the
157 pattern matching characters.
159 2. Changes to Readline
161 a. When refreshing the line as the result of a key sequence, Readline attempts
162 to redraw only the last line of a multiline prompt.
164 b. Fixed an issue that caused completion of git commands to display
165 incorrectly when using colored-completion-prefix.
167 c. Fixed several redisplay bugs having to do with multibyte characters and
168 invisible characters in prompt strings.
170 3. New Features in Bash
172 a. Value conversions (arithmetic expansions, case modification, etc.) now
173 happen when assigning elements of an array using compound assignment.
175 b. There is a new option settable in config-top.h that makes multiple
176 directory arguments to `cd' a fatal error.
178 c. Bash now uses mktemp() when creating internal temporary files; it produces
179 a warning at build time on many Linux systems.
181 4. New Features in Readline
183 a. The default binding for ^W in vi mode now uses word boundaries specified
184 by Posix (vi-unix-word-rubout is bindable command name).
186 b. rl_clear_visible_line: new application-callable function; clears all
187 screen lines occupied by the current visible readline line.
189 c. rl_tty_set_echoing: application-callable function that controls whether
190 or not readline thinks it is echoing terminal output.
192 d. Handle >| and strings of digits preceding and following redirection
193 specifications as single tokens when tokenizing the line for history
196 e. Fixed a bug with displaying completions when the prefix display length
197 is greater than the length of the completions to be displayed.
199 f. The :p history modifier now applies to the entire line, so any expansion
200 specifying :p causes the line to be printed instead of expanded.
202 ------------------------------------------------------------------------------
203 This document details the changes between this version, bash-4.4-rc1, and
204 the previous version, bash-4.4-beta.
208 a. Fixed several problems with bash completion not special-casing bash syntax
211 b. Fixed a bug that caused the mapfile builtin to not create array variables
212 when a variable of the same name appears in the temporary environment.
214 c. Fixed a bug that caused prompt expansion to loop when PS1 contained a
217 d. Fixed a bug that caused the ${array[@]@A} expansion to split the results
218 even when double-quoted.
220 e. There is a new implementation of the code that saves the last CHILD_MAX
221 exited background pids so their status can be queried later.
223 f. Bash-4.4 can now be configured and built on very old versions of Solaris 2.
225 g. Fixed problems with --help support for several builtins.
227 h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited
228 from the environment.
230 i. Fixed a bug that caused background processes run from non-interactive shells
231 with job control enabled to place the terminal in the wrong process group
232 under certain circumstances.
234 j. Fixed a bug that caused `fc' to return an incorrect exit status when
235 executing commands from the history list.
237 k. Fixed a bug that caused the shell to exit when a process substitution
238 received a SIGINT when run in certain terminal emulators.
240 l. EXECIGNORE now honors the setting of `extglob' when attempting to match
243 m. Fixed a bug where `return' used the wrong exit status when executed in a
246 n. Fixed a bug that caused a command containing a here-document and an escaped
247 newline to be stored in the history list incorrectly.
249 o. Fixed a bug that caused set -e to be honored in cases of builtins invoking
250 other builtins when it should be ignored.
252 p. Fixed a bug that caused `readonly' and `export' to create local array
253 variables when used within shell functions.
255 q. Fixed a bug that allowed subshells begun to execute process substitutions
256 to have access to the command's temporary environment.
258 r. Fixed a bug that could cause the shell to dump core when receiving a
259 SIGCHLD for which a trap has been set while running in posix mode.
261 s. Fixed a bug that caused bash to not restore BASH_ARGC, BASH_ARGV,
262 BASH_SOURCE, BASH_LINENO, and FUNCNAME if the shell received a SIGINT
263 while reading commands from a file while executing `.'.
265 t. Fixed a bug that caused the `-o history' option to have no effect when
266 supplied on the command line when starting a new shell.
268 u. Fixed a bug that caused history expansions occurring in command
269 substitutions to not be performed.
271 v. Fixed a bug that caused `eval' run in a non-interactive shell to disable
272 history expansion for the remainder of the shell script, even if the script
273 had previously enabled it.
275 w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set
278 x. Fixed a bug that caused process and command substitution to inherit output
279 buffered in the stdio library but not written.
281 y. Fixed a bug that caused a terminating signal received during `echo' to run
282 an exit trap in a signal handler context.
284 z. Fixed a bug that caused a builtin command containing a process substitution
285 to return the wrong exit status.
287 aa. Fixed a bug that caused `()' subshells with piped input to incorrectly
288 redirect the standard input of some of the commands in the subshell from
291 bb. The history builtin now uses more descriptive error messages for missing or
294 2. Changes to Readline
296 a. The history file writing functions only attempt to create and use a backup
297 history file if the history file exists and is a regular file.
299 b. Fixed an out-of-bounds read in readline's internal tilde expansion
302 c. Fixed several redisplay bugs with prompt strings containing multibyte
303 and non-visible characters whose physical length is longer than the screen
306 d. Fixed a redisplay bug with prompt strings containing invisible characters
307 whose physical length exceeds the screen width and using incremental search.
309 e. Readline prints more descriptive error messages when it encounters errors
310 while reading an inputrc file.
312 f. Fixed a bug in the character insertion code that attempts to optimize
313 typeahead when it reads a character that is not bound to self-insert and
314 resets the key sequence state.
316 3. New Features in Bash
318 a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
321 b. inherit_errexit: a new `shopt' option that, when set, causes command
322 substitutions to inherit the -e option. By default, those subshells disable
323 -e. It's enabled as part of turning on posix mode.
325 c. New prompt string: PS0. Expanded and displayed by interactive shells after
326 reading a complete command but before executing it.
328 d. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to
329 SIG_DFL when the shell is started, so they are set to SIG_DFL in child
332 e. Posix-mode shells now allow double quotes to quote the history expansion
335 f. OLDPWD can be inherited from the environment if it names a directory.
337 g. Shells running as root no longer inherit PS4 from the environment, closing
338 a security hole involving PS4 expansion performing command substitution.
340 h. If executing an implicit `cd' when the `autocd' option is set, bash will
341 now invoke a function named `cd' if one exists before executing the `cd'
344 4. New Features in Readline
346 a. If an incremental search string has its last character removed with DEL,
347 the resulting empty search string no longer matches the previous line.
349 b. If readline reads a history file that begins with `#' (or the value of
350 the history comment character) and has enabled history timestamps, the
351 history entries are assumed to be delimited by timestamps. This allows
352 multi-line history entries.
354 c. Readline now throws an error if it parses a key binding without a
355 terminating `:' or whitespace.
357 ------------------------------------------------------------------------------
358 This document details the changes between this version, bash-4.4-beta, and
359 the previous version, bash-4.4-alpha.
363 a. Fixed two bugs that caused out-of-bounds reads when skipping over assignment
364 statements while finding the word on which to perform programmable
367 b. Fixed a memory leak in programmable completion.
369 c. Fixed a bug that could cause the shell to crash when interrupting the
372 d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new
375 e. Fixed a bug that caused the && and || operators to be incorrectly optimized.
377 f. The shell now undoes redirections before exiting the shell when the `-e'
378 option is enabled, and a shell function fails.
380 g. History expansion now skips over the history expansion character in command
381 and process substitution.
383 h. Fixed a bug that caused stray '\001' characters to be added to the output
386 i. Fixed a memory leak when processing declare commands that perform compound
389 j. Fixed a bug that could cause the shell to crash when reading input from a
390 file and the limit on open file descriptors is high.
392 k. Fixed a bug that caused the ERR and RETURN traps to be unset if they were
393 set in a shell function but unset previously.
395 l. Fixed a bug that caused several signals to be ignored if `exec' failed in
396 an interactive shell.
398 m. A posix-mode non-interactive shell now considers a parameter expansion error
401 n. The `time' command now prints timing statistics for failed commands when
402 the -e option is enabled.
404 o. Fixed a bug that caused the shell to crash when attempting to indirectly
405 expand a shell variable with an invalid name.
407 p. Fixed a bug that caused the shell to crash when running a trap containing
408 a process substitution.
410 q. Bash now prints the keyword `function' before a function with the same name
411 as a reserved word when using `declare -f' to avoid parse errors when
412 reusing the output as input.
414 r. Fixed a bug that caused the shell to crash when using declare -g to attempt
415 to redefine an existing global indexed array variable as an associative
418 s. Fixed a memory leak that occurred when interrupting brace expansions
419 generating a sequence.
421 t. Fixed a bug that resulted in alias expansion in redirections.
423 u. The `declare -a' and `declare -A' commands now print fewer warnings when
424 attempting to create and initialize an array at the same time, but
425 relying on word expansions to construct the compound assignment.
427 v. The `help' builtin now behaves better in locales where each wide
428 character occupies more than one display column.
430 w. The `read' builtin no longer has a possible race condition when a timeout
433 x. Fixed several expansion problems encountered when IFS="'".
435 y. Fixed a problem with the expansion of $'\c?'.
437 z. Bash no longer splits the expansion of here-strings, as the documentation
440 aa. Bash now puts `s' in the value of $- if the shell is reading from standard
441 input, as Posix requires.
443 bb. Fixed a bug that caused the shell to crash if invoked with a NULL
446 cc. The shell now only trusts an inherited value for $PWD if it begins with a
449 dd. Fixed a memory leak when creating local array variables and assigning to
450 them using compound assignment with the `declare' builtin.
452 ee. Fixed a bug that could cause the shell to crash when processing nested here
453 documents inside a command substitution.
455 ff. Array keys and values are now displayed using $'...' quoting where
458 gg. Fixed a bug that could cause the shell to crash if the replacement string
459 in pattern substitution was NULL.
461 hh. Fixed a bug that could cause the shell to crash if a command substitution
462 contained a non-fatal syntax error.
464 ii. Fixed a bug that could cause the shell to crash if variable indirection
465 resulted in a NULL variable.
467 jj. Fixed a bug that could cause the shell to crash if a long string contained
468 multiple unterminated parameter expansion constructs.
470 kk. Improved the code that acts on SIGINT received while waiting for a child
471 process only if the child exits due to SIGINT.
473 ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple
476 2. Changes to Readline
478 a. Colored completion prefixes are now displayed using a different color, less
479 likely to collide with files.
481 b. Fixed a bug that caused vi-mode character search to misbehave when
482 running in callback mode.
484 c. Fixed a bug that caused output to be delayed when input is coming from a
487 d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
488 a multi-key key sequence via a macro.
490 e. Fixed a bug that caused problems with applications that supply their own
491 input function when performing completion.
493 f. When read returns -1/EIO when attempting to read a key, return an error
494 instead of line termination back to the caller.
496 g. Updated tty auditing feature based on patch from Red Hat.
498 h. Fixed a bug that could cause the history library to crash on overflows
499 introduced by malicious editing of timestamps in the history file.
501 3. New Features in Bash
503 a. `make install' now installs the example loadable builtins and a set of
504 bash headers to use when developing new loadable builtins.
506 b. `enable -f' now attempts to call functions named BUILTIN_builtin_load when
507 loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows
508 loadable builtins to run initialization and cleanup code.
510 c. There is a new BASH_LOADABLES_PATH variable containing a list of directories
511 where the `enable -f' command looks for shared objects containing loadable
514 d. The `complete_fullquote' option to `shopt' changes filename completion to
515 quote all shell metacharacters in filenames and directory names.
517 e. The `kill' builtin now has a `-L' option, equivalent to `-l', for
518 compatibility with Linux standalone versions of kill.
520 4. New Features in Readline
521 ------------------------------------------------------------------------------
522 This document details the changes between this version, bash-4.4-alpha, and
523 the previous version, bash-4.3-release.
527 a. A bug that caused pipelines to be corrupted while running the DEBUG trap
530 b. A bug that accidentally omitted the `-R' unary operator from `test' was
533 c. A bug that could cause the shell to not restore the terminal's process
534 group on shell exit was fixed.
536 d. Several changes were made to programmable completion to accommodate
537 assumptions made by the bash-completion package.
539 e. Bash no longer inhibits C-style escape processing ($'...') while performing
540 pattern substitution word expansions.
542 f. Fixed a bug that caused `return' executed from a trap handler to use the
543 wrong return status when one was not supplied as an argument.
545 g. In Posix mode, defining a function with the same name as a special
546 builtin is now an error, fatal only when the shell is not interactive.
548 h. Fixed a bug that caused compound array assignments to discard unset or null
549 variables used as subscripts, thereby making it appear as if the index was
552 i. Fixed a bug that caused extended glob patterns to incorrectly match
553 filenames with a leading `.'.
555 j. Fixed a bug involving sign extension when reallocating the input line
556 after a history expansion, causing segmentation faults.
558 k. Bash now does a better job at identifying syntax errors during word
559 completion and tailoring completion appropriately.
561 l. Bash now uses the current locale's decimal point in comamnd timing output.
563 m. Fixed a bug that caused segmentation faults while reading here documents if
564 PS2 contains a command substitution.
566 n. There are several changes to how $@ is expanded when unquoted but in a
567 context where word splitting is not performed (e.g., on the rhs of an
568 assignment or in a conditional command).
570 o. Bash now quotes command hash table entries that contain shell metacharacters
571 when displaying hash table contents.
573 p. Fixed a potential file descriptor leak when dup2() fails while performing a
576 q. Fixed a bug that caused directory names evaluated during word completion to
579 r. Fixed several bugs which could result in indirect variable expansion and
580 namerefs creating variables with invalid names or referencing variables
581 set to the empty string.
583 s. Fixed a bug that caused bash to not expand $0 in word expansions where it
586 t. Fixed a bug that caused bash to perform process substitution if <(
587 appeared inside an arithmetic context.
589 u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern
590 to be confused as directory names.
592 v. Fixed several bugs with treatment of invisible variables (variables with
593 attributes that are unset because they have never been assigned values).
595 w. Fixed a bug that caused the `read' builtin to not clean up readline's
596 state when using the -e and -t options together and the read timed out.
598 x. Fixed a bug that caused the shell to exit with the wrong (but non-zero)
599 value if a command was not found or was not executable.
601 y. Fixed a bug that caused the `time' reserved word to not be recognized as
602 such in all contexts where it should have been.
604 z. Fixed a bug that caused the shell to close process subsitution file
605 descriptors when executing a script without the `#!' leading line.
607 aa. Fixed a typo that caused the `compat42' shell option to set the wrong
610 bb. The shell now handles process substitution commands with embedded
611 parentheses the same way as it does when parsing command substitution.
613 cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option
614 to produce core dumps.
616 dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases
617 where slashes must be matched explicitly.
619 ee. Fixed a problem with patterns containing `:' in colon-separated variables
622 ff. Fixed a bug that caused indirect variable expansion using indexed arrays to
625 gg. Fixed a parsing problem that caused quoted newlines immediately following a
626 command substitution to be mishandled in certain cases.
628 hh. Fixed a potential buffer overflow on systems without locale_charset or the
631 ii. Fixed a bug that caused background processes to modify the terminal's
632 process group under certain circumstances.
634 jj. Asynchronous commands now always set $? to 0 and are not affected by
635 whether or not the command's exit status is being inverted.
637 kk. Fixed a problem that caused a line ending with an escaped newline and
638 containingh a prior `eval' to be incorrectly parsed.
640 ll. Fixed an issue with programmable completion and `!' in extglob patterns
641 used as arguments to `compgen -X'.
643 mm. Word completion now treats the two-character token `>|' as requiring
646 nn. Bash no longer expands tildes in $PATH elements while in Posix mode.
648 oo. Fixed a bug that caused bash to not clean up readline's state, including
649 the terminal settings, if it received a fatal signal while in a readline()
650 call (including `read -e' and `read -s').
652 pp. Fixed bug that caused importing shell functions from the environment to
653 execute additional commands following the function.
655 qq. Fixed a bug that caused the parser to return a lookahead character pushed
656 back by a previous call, even when on another line.
658 rr. Fixed a bug that caused many here-documents or many nested case statements
659 to overflow an internal stack.
661 ss. Changed the way bash encodes exported functions for inclusion in the
662 environment to avoid name collisions with valid variable names and to
663 indicate that they are exported functions.
665 tt. Fixed a bug that could result in an invalid memory access when processing
666 a here document delimited by end of file or end of string.
668 uu. Fixed a bug that could cause an invalid memory access if a command was run
669 before initializing the job control framework.
671 vv. When in Posix mode, bash prints shell function definitions as Posix
672 specifies them, without the leading `function' keyword.
674 ww. The variable attribute display builtins no longer display variables with
675 invalid names that were imported from the environment.
677 xx. Fixed a bug that could allow `break' or `continue' executed from shell
678 functions to affect loops running outside of the function.
680 yy. Fixed a bug that could cause a restricted shell to attempt to import shell
681 functions from the environment.
683 zz. The shell now allows double-quoted identifiers in arithmetic expressions.
685 aaa. Fixed a bug that could allow scalar variables subscripted using [@] in
686 word expansions to be incorrectly quoted.
688 bbb. The shell now makes sure to ignore SIGTSTP/SIGTTIN/SIGTTOU in child
689 processes if they were ignored at shell startup, even if job control is
692 ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to
695 ddd. Posix says that expanding $* in a pattern context where the expansion is
696 double-quoted should not treat $* as if it were double quoted.
698 eee. Bash now restores getopts' internal state between calls to getopts even if
699 a shell function declares a local copy of OPTIND.
701 fff. Fixed a bug that could cause `history -r' or `history -n' to read identical
702 lines from the history file more than once.
704 ggg. The commands executed by `bind -x' now redisplay at most the final line
705 of a multi-line prompt, and those commands may return 124 to indicate that
706 the entire prompt should be redrawn.
708 hhh. Fixed a bug that could cause `mapfile' to create variables with invalid
711 iii. The shell only goes into debugging mode when --debugger is supplied if
712 the debugger initialization file is present.
714 jjj. Fixed a bug that disallowed an assignment to (implicit) subscript 0 of an
715 existing array in a declare command that set the readonly attribute.
717 kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable
720 lll. Appending to an existing array variable using the compound assignment
721 syntax (var+=(aaa)) should not affect assignments to existing subscripts
722 appearing in the compound assignment.
724 mmm. Fixed a bug that could cause the shell to crash when a variable with a
725 null value was passed in the temporary environment and the variable's
726 attributes are modified using `declare' while performing a redirection.
728 nnn. Fixed a bug in printf so that a missing precision specifier after a `.'
731 ooo. Fixed a bug that attempted to use the internal command timing to time
732 pipeline components if the pipeline elements are separated by newlines.
734 ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase
735 the values on assignment.
737 qqq. Bash does a better job of determining whether or not files are executable
738 when running on Windows, since the X_OK flag to access(2) is not supported.
740 rrr. Fixed a bug that caused some of the shell's internal traps (e.g., ERR) to
741 be interrupted (and leave incorrect state) by pending SIGINTs.
743 sss. Fixed a bug in the bash interface to history expansion to avoid attempting
744 expansion if the history expansion character occurs in a command
747 ttt. Fixed a bug that caused the select command to crash if the REPLY variable
748 ends up empty (e.g., if it's made readonly)
750 uuu. Bash handles backslash-quoting of multibyte characters better when quoting
751 output that is intended to be reused.
753 vvv. System-specific changes for: Windows, Cygwin.
755 www. Fixes for upper and lower-casing multibyte characters, some locales have
756 characters whose upper and lowercase versions have different numbers of
759 xxx. Fixed a bug that caused the ERR trap in a shell function to have the
760 wrong value for $LINENO.
762 yyy. Fixed a bug that resulted in incorrect quoting of regexps for the =~
763 operator when an open brace appears without a close brace.
765 zzz. Fixed a bug in the array unset operation that caused it to attempt to
766 parse embedded single and double quotes.
768 aaaa. Fixed a bug that caused $* to not expand with the first character of
769 $IFS as a separator in a context where word splitting will not take
772 bbbb. Fixed two bugs that could cause the shell to dereference a null pointer
773 while attempting to print an error message from arithmetic expansion.
775 cccc. Fixed a bug that resulted in short-circuited evaluation when reading
776 commands from a string ending in an unquoted backslash, or when sourcing
777 a file that ends with an unquoted backslash.
779 dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up
780 any FIFOs created by process substitution.
782 eeee. If the -T option is not set, allow the source builtin and shell functions
783 to set a DEBUG trap that persists after the sourced file or function
784 returns, instead of restoring the old (unset) value unconditionally.
786 ffff. Fixed a bug that caused redirections to not be undone on some syntax
787 errors, e.g., when parsing a command substitution.
789 gggg. Bash only adds asynchronous commands to the table of background pids
790 whose status it remembers, to avoid it growing too large during scripts
791 that create and reap large numbers of child processes. This means that
792 `wait' no longer works on synchronous jobs, but $? can be used to get
793 the exit status in those cases.
795 hhhh. Bash now checks whether or not a shell script argument is a directory
796 before trying to open it; Posix says implementations may allow open(2)
799 iiii. Fixed a bug that could cause the shell to set the terminal's process
800 group to a background process group when running as part of a pipeline.
802 jjjj. Made a few changes to strings to avoid possible potential negative effects
803 caused by malicious translations.
805 kkkk. Fixed a bug that caused the `unset' builtin to continue to treat its
806 arguments as functions after unsetting a function when invoked with no
809 llll. Fixed a bug that would not replace empty strings using pattern
810 substitution even if the pattern matched the empty string.
812 mmmm. Fixed a bug with word completion that prevented some characters from
813 being backslash-quoted (backquote, dollar sign).
815 nnnn. Fixed a bug that prevented a command from the history re-executed by the
816 `fc' builtin from setting verbose mode.
818 oooo. Fixed a bug that caused the shell to not enable and disable function
819 tracing with changes to the `extdebug' shell option.
821 pppp. Fixed a bug that caused assignments to nameref variables pointing to
822 unset variables with attributes but no values to create variables with
825 qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to
826 unset the wrong variable under certain circumstances.
828 rrrr. Fixed a bug that caused close braces occurring in brace expansions within
829 command substitutions to incorrectly terminate parameter expansions.
831 ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH.
833 tttt. Fixed a bug that caused interactive shells compiled without job control
834 to return incorrect status values for child processes when running a
835 single command that creates enough children to use the entire PID space.
837 uuuu. `esac' should not be recognized as a reserved word when it appears as the
838 second or later pattern in a case statement pattern list.
840 vvvv. Fixed a bug that caused the completion code to read past the end of the
841 readline line buffer while skipping assignment statements to find the
844 wwww. Fixed a bug that caused case statements within loops contained in a
845 command substitution to be parsed incorrectly.
847 xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after
848 running `wait' with no arguments and interrupting it with ^C without
849 a trap handler installed.
851 2. Changes to Readline
853 a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
854 commands with modifiers was fixed.
856 b. Fixed a bug that caused callback mode to dump core when reading a
857 multiple-key sequence (e.g., arrow keys).
859 c. Fixed a bug that caused the redisplay code to erase some of the line when
860 using horizontal scrolling with incremental search.
862 d. Readline's input handler now performs signal processing if read(2) is
863 interrupted by SIGALRM or SIGVTALRM.
865 e. Fixed a problem with revert-all-at-newline freeing freed memory.
867 f. Clarified the documentation for the history_quotes_inhibit_expansion
868 variable to note that it inhibits scanning for the history comment
869 character and that it only affects double-quoted strings.
871 g. Fixed an off-by-one error in the prompt printed when performing searches.
873 h. Use pselect(2), if available, to wait for input before calling read(2), so
874 a SIGWINCH can interrupt it, since it doesn't interrupt read(2).
876 i. Some memory leaks caused by signals interrupting filename completion have
879 j. Reading EOF twice on a non-empty line causes EOF to be returned, rather
880 than the partial line. This can cause partial lines to be executed on
883 k. Fixed a bug concerning deleting multibyte characters from the search
884 string while performing an incremental search.
886 l. Fixed a bug with tilde expanding directory names in filename completion.
888 m. Fixed a bug that did not allow binding sequences beginning with a `\'.
890 n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
891 contains a multibyte character in the last screen column.
893 o. Fixed a bug that caused history expansion to disregard characters that are
894 documented to delimit a history event specifier without requiring `:'.
896 p. Fixed a bug that could cause reading past the end of a string when reading
897 the value when binding the set of isearch terminators.
899 q. Fixed a bug that caused readline commands that depend on knowing which
900 key invoked them to misbehave when dispatching key sequences that are
901 prefixes of other key bindings.
903 r. Paren matching now works in vi insert mode.
905 3. New Features in Bash
907 a. There is now a settable configuration #define that will cause the shell
908 to exit if the shell is running setuid without the -p option and setuid
909 to the real uid fails.
911 b. Command and process substitutions now turn off the `-v' option when
912 executing, as other shells seem to do.
914 c. The default value for the `checkhash' shell option may now be set at
915 compile time with a #define.
917 d. The `mapfile' builtin now has a -d option to use an arbitrary character
918 as the record delimiter, and a -t option to strip the delimiter as
921 e. The maximum number of nested recursive calls to `eval' is now settable in
922 config-top.h; the default is no limit.
924 f. The `-p' option to declare and similar builtins will display attributes for
925 named variables even when those variables have not been assigned values
926 (which are technically unset).
928 g. The maximum number of nested recursive calls to `source' is now settable
929 in config-top.h; the default is no limit.
931 h. All builtin commands recognize the `--help' option and print a usage
934 i. Bash does not allow function names containing `/' and `=' to be exported.
936 j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
938 k. The shell now allows `time ; othercommand' to time null commands.
940 l. There is a new `--enable-function-import' configuration option to allow
941 importing shell functions from the environment; import is enabled by
944 m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
947 n. GLOBIGNORE, the pattern substitution word expansion, and programmable
948 completion match filtering now honor the value of the `nocasematch' option.
950 o. There is a new ${parameter@spec} family of operators to transform the
951 value of `parameter'.
953 p. Bash no longer attempts to perform compound assignment if a variable on the
954 rhs of an assignment statement argument to `declare' has the form of a
955 compound assignment (e.g., w='(word)' ; declare foo=$w); compound
956 assignments are accepted if the variable was already declared as an array,
959 q. The declare builtin no longer displays array variables using the compound
960 assignment syntax with quotes; that will generate warnings when re-used as
961 input, and isn't necessary.
963 r. Executing the rhs of && and || will no longer cause the shell to fork if
966 s. The `local' builtin takes a new argument: `-', which will cause it to save
967 the single-letter shell options and restore their previous values at
970 t. `complete' and `compgen' have a new `-o nosort' option, which forces
971 readline to not sort the completion matches.
973 u. Bash now allows waiting for the most recent process substitution, since it
976 v. The `unset' builtin now unsets a scalar variable if it is subscripted with
977 a `0', analogous to the ${var[0]} expansion.
979 w. `set -i' is no longer valid, as in other shells.
981 x. BASH_SUBSHELL is now updated for process substitution and group commands
982 in pipelines, and is available with the same value when running any exit
985 y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
986 not bash is being run in a GNU Emacs shell window.
988 z. Bash now treats SIGINT received when running a non-builtin command in a
989 loop the way it has traditionally treated running a builtin command:
990 running any trap handler and breaking out of the loop.
992 aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
993 cause matching filenames to be ignored when searching for commands.
995 bb. Aliases whose value ends in a shell metacharacter now expand in a way to
996 allow them to be `pasted' to the next token, which can potentially change
997 the meaning of a command (e.g., turning `&' into `&&').
999 4. New Features in Readline
1001 a. The history truncation code now uses the same error recovery mechansim as
1002 the history writing code, and restores the old version of the history file
1003 on error. The error recovery mechanism handles symlinked history files.
1005 b. There is a new bindable variable, `enable-bracketed-paste', which enables
1006 support for a terminal's bracketed paste mode.
1008 c. The editing mode indicators can now be strings and are user-settable
1009 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
1010 variables). Mode strings can contain invisible character sequences.
1011 Setting mode strings to null strings restores the defaults.
1013 d. Prompt expansion adds the mode string to the last line of a multi-line
1014 prompt (one with embedded newlines).
1016 e. There is a new bindable variable, `colored-completion-prefix', which, if
1017 set, causes the common prefix of a set of possible completions to be
1020 f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
1023 g. The redisplay code underwent several efficiency improvements for multibyte
1026 h. The insert-char function attempts to batch-insert all pending typeahead
1027 that maps to self-insert, as long as it is coming from the terminal.
1029 i. rl_callback_sigcleanup: a new application function that can clean up and
1030 unset any state set by readline's callback mode. Intended to be used