]> git.ipfire.org Git - thirdparty/bash.git/blob - CHANGES-4.4
fixes for HAVE_SELECT/HAVE_PSELECT; change some warning messages for nameref loops...
[thirdparty/bash.git] / CHANGES-4.4
1 This document details the changes between this version, bash-4.4-release, and
2 the previous version, bash-4.4-rc2.
3
4 1. Changes to Bash
5
6 a. Fixed a bug that could potentially result in a crash due to an integer
7 overflow.
8
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.
11
12 c. Fixed several memory leaks.
13
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.
16
17 e. Fixed several potential buffer overflow issues in the word expansion code.
18
19 2. Changes to Readline
20
21 3. New Features in Bash
22
23 4. New Features in Readline
24
25 ------------------------------------------------------------------------------
26 This document details the changes between this version, bash-4.4-rc2, and
27 the previous version, bash-4.4-beta2.
28
29 1. Changes to Bash
30
31 a. Fixed an out-of-bounds read in the redirection operator completion code.
32
33 b. Fixed execution context so `until continue' doesn't disable execution for
34 subsequent commands.
35
36 c. Fixed trap handling code so traps don't inherit a command's temporary
37 environment.
38
39 d. Fixed a bug that resulted in incorrect line numbers when a function is
40 defined as part of another function's execution.
41
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.
44
45 f. Fixed a bug that caused ''"$@" to not expand to an empty argument when
46 there are no positional parameters.
47
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().
51
52 h. Improved word completion for quoted strings containing unterminated command
53 substitutions with embedded double quotes.
54
55 2. Changes to Readline
56
57 a. Fixed a bug that caused mode strings to be displayed incorrectly if the
58 prompt was shorter than the mode string.
59
60 3. New Features in Bash
61
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.
64
65 4. New Features in Readline
66
67 a. New application-callable function: rl_pending_signal(): returns the signal
68 number of any signal readline has caught but not yet handled.
69
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
74 line has been read.
75
76 ------------------------------------------------------------------------------
77 This document details the changes between this version, bash-4.4-beta2, and
78 the previous version, bash-4.4-rc1.
79
80 1. Changes to Bash
81
82 a. Fixed a memory leak when processing ${!var[@]}.
83
84 b. Fixed a bug that caused subshells to free trap strings associated with
85 inherited signals.
86
87 c. Inheriting BASHOPTS from the environment now works to force actions
88 associated with enabling an option, instead of just marking the option
89 as enabled.
90
91 d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
92 restricted mode.
93
94 e. Fixed a bug caused by an accidental omission of part of the original patch
95 for EXECIGNORE.
96
97 e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
98
99 f. Fixed a bug that caused parsing errors in command substitutions with
100 consecutive case statements separated by newlines.
101
102 g. Updated logic used to decide whether bash is running inside an emacs
103 terminal emulator to work with future emacs versions.
104
105 h. Fixed two extended pattern matching bugs caused by premature short-
106 circuiting.
107
108 i. Fixed a memory leak in the code that removes duplicate history entries.
109
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.
113
114 k. Fixed a bug that caused variables to be inadvertently marked as both an
115 associative and an indexed array.
116
117 l. Fixed a bug that caused `bash -c' to not run a trap specified in the
118 command string.
119
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.
123
124 k. Fixed a bug that caused command substitution to attempt to set the
125 terminal's process group incorrectly.
126
127 l. Fixed a bug that could cause prompt string expansion to display error
128 messages when the `nounset' shell option is set.
129
130 m. Fixed a bug that caused "$@" to not expand to an empty string under the
131 circumstances when Posix says it should ("${@-${@-$@}}").
132
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
136 environment.
137
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.
140
141 p. Fixed a bug when IFS is used as the control variable in a for statement.
142
143 q. Fixed a bug with SIGINT received by a command substitution in an interactive
144 shell.
145
146 r. The checks for nameref variable self-references are more thorough.
147
148 s. Fixed several bugs with multi-line aliases.
149
150 t. Fixed `test' to handle the four-argument case where $1 == '(' and
151 $4 == ')'.
152
153 u. Fixed a bug in the expansion of $* in the cases where word splitting is
154 not performed.
155
156 v. Fixed a bug in execution of case statements where IFS includes the
157 pattern matching characters.
158
159 2. Changes to Readline
160
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.
163
164 b. Fixed an issue that caused completion of git commands to display
165 incorrectly when using colored-completion-prefix.
166
167 c. Fixed several redisplay bugs having to do with multibyte characters and
168 invisible characters in prompt strings.
169
170 3. New Features in Bash
171
172 a. Value conversions (arithmetic expansions, case modification, etc.) now
173 happen when assigning elements of an array using compound assignment.
174
175 b. There is a new option settable in config-top.h that makes multiple
176 directory arguments to `cd' a fatal error.
177
178 c. Bash now uses mktemp() when creating internal temporary files; it produces
179 a warning at build time on many Linux systems.
180
181 4. New Features in Readline
182
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).
185
186 b. rl_clear_visible_line: new application-callable function; clears all
187 screen lines occupied by the current visible readline line.
188
189 c. rl_tty_set_echoing: application-callable function that controls whether
190 or not readline thinks it is echoing terminal output.
191
192 d. Handle >| and strings of digits preceding and following redirection
193 specifications as single tokens when tokenizing the line for history
194 expansion.
195
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.
198
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.
201
202 ------------------------------------------------------------------------------
203 This document details the changes between this version, bash-4.4-rc1, and
204 the previous version, bash-4.4-beta.
205
206 1. Changes to Bash
207
208 a. Fixed several problems with bash completion not special-casing bash syntax
209 constructs.
210
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.
213
214 c. Fixed a bug that caused prompt expansion to loop when PS1 contained a
215 syntax error.
216
217 d. Fixed a bug that caused the ${array[@]@A} expansion to split the results
218 even when double-quoted.
219
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.
222
223 f. Bash-4.4 can now be configured and built on very old versions of Solaris 2.
224
225 g. Fixed problems with --help support for several builtins.
226
227 h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited
228 from the environment.
229
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.
233
234 j. Fixed a bug that caused `fc' to return an incorrect exit status when
235 executing commands from the history list.
236
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.
239
240 l. EXECIGNORE now honors the setting of `extglob' when attempting to match
241 executable names.
242
243 m. Fixed a bug where `return' used the wrong exit status when executed in a
244 DEBUG trap.
245
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.
248
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.
251
252 p. Fixed a bug that caused `readonly' and `export' to create local array
253 variables when used within shell functions.
254
255 q. Fixed a bug that allowed subshells begun to execute process substitutions
256 to have access to the command's temporary environment.
257
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.
260
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 `.'.
264
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.
267
268 u. Fixed a bug that caused history expansions occurring in command
269 substitutions to not be performed.
270
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.
274
275 w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set
276 to the empty string.
277
278 x. Fixed a bug that caused process and command substitution to inherit output
279 buffered in the stdio library but not written.
280
281 y. Fixed a bug that caused a terminating signal received during `echo' to run
282 an exit trap in a signal handler context.
283
284 z. Fixed a bug that caused a builtin command containing a process substitution
285 to return the wrong exit status.
286
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
289 /dev/null.
290
291 bb. The history builtin now uses more descriptive error messages for missing or
292 invalid timestamps.
293
294 2. Changes to Readline
295
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.
298
299 b. Fixed an out-of-bounds read in readline's internal tilde expansion
300 interface.
301
302 c. Fixed several redisplay bugs with prompt strings containing multibyte
303 and non-visible characters whose physical length is longer than the screen
304 width.
305
306 d. Fixed a redisplay bug with prompt strings containing invisible characters
307 whose physical length exceeds the screen width and using incremental search.
308
309 e. Readline prints more descriptive error messages when it encounters errors
310 while reading an inputrc file.
311
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.
315
316 3. New Features in Bash
317
318 a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
319 environment.
320
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.
324
325 c. New prompt string: PS0. Expanded and displayed by interactive shells after
326 reading a complete command but before executing it.
327
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
330 processes.
331
332 e. Posix-mode shells now allow double quotes to quote the history expansion
333 character.
334
335 f. OLDPWD can be inherited from the environment if it names a directory.
336
337 g. Shells running as root no longer inherit PS4 from the environment, closing
338 a security hole involving PS4 expansion performing command substitution.
339
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'
342 builtin.
343
344 4. New Features in Readline
345
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.
348
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.
353
354 c. Readline now throws an error if it parses a key binding without a
355 terminating `:' or whitespace.
356
357 ------------------------------------------------------------------------------
358 This document details the changes between this version, bash-4.4-beta, and
359 the previous version, bash-4.4-alpha.
360
361 1. Changes to Bash
362
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
365 completion.
366
367 b. Fixed a memory leak in programmable completion.
368
369 c. Fixed a bug that could cause the shell to crash when interrupting the
370 wait builtin.
371
372 d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new
373 `@' operator.
374
375 e. Fixed a bug that caused the && and || operators to be incorrectly optimized.
376
377 f. The shell now undoes redirections before exiting the shell when the `-e'
378 option is enabled, and a shell function fails.
379
380 g. History expansion now skips over the history expansion character in command
381 and process substitution.
382
383 h. Fixed a bug that caused stray '\001' characters to be added to the output
384 of `declare -p'.
385
386 i. Fixed a memory leak when processing declare commands that perform compound
387 array assignments.
388
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.
391
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.
394
395 l. Fixed a bug that caused several signals to be ignored if `exec' failed in
396 an interactive shell.
397
398 m. A posix-mode non-interactive shell now considers a parameter expansion error
399 to be a fatal error.
400
401 n. The `time' command now prints timing statistics for failed commands when
402 the -e option is enabled.
403
404 o. Fixed a bug that caused the shell to crash when attempting to indirectly
405 expand a shell variable with an invalid name.
406
407 p. Fixed a bug that caused the shell to crash when running a trap containing
408 a process substitution.
409
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.
413
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
416 array.
417
418 s. Fixed a memory leak that occurred when interrupting brace expansions
419 generating a sequence.
420
421 t. Fixed a bug that resulted in alias expansion in redirections.
422
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.
426
427 v. The `help' builtin now behaves better in locales where each wide
428 character occupies more than one display column.
429
430 w. The `read' builtin no longer has a possible race condition when a timeout
431 occurs.
432
433 x. Fixed several expansion problems encountered when IFS="'".
434
435 y. Fixed a problem with the expansion of $'\c?'.
436
437 z. Bash no longer splits the expansion of here-strings, as the documentation
438 has always said.
439
440 aa. Bash now puts `s' in the value of $- if the shell is reading from standard
441 input, as Posix requires.
442
443 bb. Fixed a bug that caused the shell to crash if invoked with a NULL
444 environment.
445
446 cc. The shell now only trusts an inherited value for $PWD if it begins with a
447 `/'.
448
449 dd. Fixed a memory leak when creating local array variables and assigning to
450 them using compound assignment with the `declare' builtin.
451
452 ee. Fixed a bug that could cause the shell to crash when processing nested here
453 documents inside a command substitution.
454
455 ff. Array keys and values are now displayed using $'...' quoting where
456 appropriate.
457
458 gg. Fixed a bug that could cause the shell to crash if the replacement string
459 in pattern substitution was NULL.
460
461 hh. Fixed a bug that could cause the shell to crash if a command substitution
462 contained a non-fatal syntax error.
463
464 ii. Fixed a bug that could cause the shell to crash if variable indirection
465 resulted in a NULL variable.
466
467 jj. Fixed a bug that could cause the shell to crash if a long string contained
468 multiple unterminated parameter expansion constructs.
469
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.
472
473 ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple
474 commands.
475
476 2. Changes to Readline
477
478 a. Colored completion prefixes are now displayed using a different color, less
479 likely to collide with files.
480
481 b. Fixed a bug that caused vi-mode character search to misbehave when
482 running in callback mode.
483
484 c. Fixed a bug that caused output to be delayed when input is coming from a
485 macro in vi-mode.
486
487 d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
488 a multi-key key sequence via a macro.
489
490 e. Fixed a bug that caused problems with applications that supply their own
491 input function when performing completion.
492
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.
495
496 g. Updated tty auditing feature based on patch from Red Hat.
497
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.
500
501 3. New Features in Bash
502
503 a. `make install' now installs the example loadable builtins and a set of
504 bash headers to use when developing new loadable builtins.
505
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.
509
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
512 builtins.
513
514 d. The `complete_fullquote' option to `shopt' changes filename completion to
515 quote all shell metacharacters in filenames and directory names.
516
517 e. The `kill' builtin now has a `-L' option, equivalent to `-l', for
518 compatibility with Linux standalone versions of kill.
519
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.
524
525 1. Changes to Bash
526
527 a. A bug that caused pipelines to be corrupted while running the DEBUG trap
528 was fixed.
529
530 b. A bug that accidentally omitted the `-R' unary operator from `test' was
531 fixed.
532
533 c. A bug that could cause the shell to not restore the terminal's process
534 group on shell exit was fixed.
535
536 d. Several changes were made to programmable completion to accommodate
537 assumptions made by the bash-completion package.
538
539 e. Bash no longer inhibits C-style escape processing ($'...') while performing
540 pattern substitution word expansions.
541
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.
544
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.
547
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
550 not present.
551
552 i. Fixed a bug that caused extended glob patterns to incorrectly match
553 filenames with a leading `.'.
554
555 j. Fixed a bug involving sign extension when reallocating the input line
556 after a history expansion, causing segmentation faults.
557
558 k. Bash now does a better job at identifying syntax errors during word
559 completion and tailoring completion appropriately.
560
561 l. Bash now uses the current locale's decimal point in comamnd timing output.
562
563 m. Fixed a bug that caused segmentation faults while reading here documents if
564 PS2 contains a command substitution.
565
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).
569
570 o. Bash now quotes command hash table entries that contain shell metacharacters
571 when displaying hash table contents.
572
573 p. Fixed a potential file descriptor leak when dup2() fails while performing a
574 redirection.
575
576 q. Fixed a bug that caused directory names evaluated during word completion to
577 be dequoted twice.
578
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.
582
583 s. Fixed a bug that caused bash to not expand $0 in word expansions where it
584 should.
585
586 t. Fixed a bug that caused bash to perform process substitution if <(
587 appeared inside an arithmetic context.
588
589 u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern
590 to be confused as directory names.
591
592 v. Fixed several bugs with treatment of invisible variables (variables with
593 attributes that are unset because they have never been assigned values).
594
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.
597
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.
600
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.
603
604 z. Fixed a bug that caused the shell to close process subsitution file
605 descriptors when executing a script without the `#!' leading line.
606
607 aa. Fixed a typo that caused the `compat42' shell option to set the wrong
608 compatibility level.
609
610 bb. The shell now handles process substitution commands with embedded
611 parentheses the same way as it does when parsing command substitution.
612
613 cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option
614 to produce core dumps.
615
616 dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases
617 where slashes must be matched explicitly.
618
619 ee. Fixed a problem with patterns containing `:' in colon-separated variables
620 like GLOBIGNORE.
621
622 ff. Fixed a bug that caused indirect variable expansion using indexed arrays to
623 always use index 0.
624
625 gg. Fixed a parsing problem that caused quoted newlines immediately following a
626 command substitution to be mishandled in certain cases.
627
628 hh. Fixed a potential buffer overflow on systems without locale_charset or the
629 bash replacement.
630
631 ii. Fixed a bug that caused background processes to modify the terminal's
632 process group under certain circumstances.
633
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.
636
637 kk. Fixed a problem that caused a line ending with an escaped newline and
638 containingh a prior `eval' to be incorrectly parsed.
639
640 ll. Fixed an issue with programmable completion and `!' in extglob patterns
641 used as arguments to `compgen -X'.
642
643 mm. Word completion now treats the two-character token `>|' as requiring
644 filename expansion.
645
646 nn. Bash no longer expands tildes in $PATH elements while in Posix mode.
647
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').
651
652 pp. Fixed bug that caused importing shell functions from the environment to
653 execute additional commands following the function.
654
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.
657
658 rr. Fixed a bug that caused many here-documents or many nested case statements
659 to overflow an internal stack.
660
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.
664
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.
667
668 uu. Fixed a bug that could cause an invalid memory access if a command was run
669 before initializing the job control framework.
670
671 vv. When in Posix mode, bash prints shell function definitions as Posix
672 specifies them, without the leading `function' keyword.
673
674 ww. The variable attribute display builtins no longer display variables with
675 invalid names that were imported from the environment.
676
677 xx. Fixed a bug that could allow `break' or `continue' executed from shell
678 functions to affect loops running outside of the function.
679
680 yy. Fixed a bug that could cause a restricted shell to attempt to import shell
681 functions from the environment.
682
683 zz. The shell now allows double-quoted identifiers in arithmetic expressions.
684
685 aaa. Fixed a bug that could allow scalar variables subscripted using [@] in
686 word expansions to be incorrectly quoted.
687
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
690 in effect.
691
692 ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to
693 the empty string.
694
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.
697
698 eee. Bash now restores getopts' internal state between calls to getopts even if
699 a shell function declares a local copy of OPTIND.
700
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.
703
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.
707
708 hhh. Fixed a bug that could cause `mapfile' to create variables with invalid
709 names.
710
711 iii. The shell only goes into debugging mode when --debugger is supplied if
712 the debugger initialization file is present.
713
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.
716
717 kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable
718 its special status.
719
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.
723
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.
727
728 nnn. Fixed a bug in printf so that a missing precision specifier after a `.'
729 is treated as 0.
730
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.
733
734 ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase
735 the values on assignment.
736
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.
739
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.
742
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
745 substitution.
746
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)
749
750 uuu. Bash handles backslash-quoting of multibyte characters better when quoting
751 output that is intended to be reused.
752
753 vvv. System-specific changes for: Windows, Cygwin.
754
755 www. Fixes for upper and lower-casing multibyte characters, some locales have
756 characters whose upper and lowercase versions have different numbers of
757 bytes.
758
759 xxx. Fixed a bug that caused the ERR trap in a shell function to have the
760 wrong value for $LINENO.
761
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.
764
765 zzz. Fixed a bug in the array unset operation that caused it to attempt to
766 parse embedded single and double quotes.
767
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
770 place.
771
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.
774
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.
778
779 dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up
780 any FIFOs created by process substitution.
781
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.
785
786 ffff. Fixed a bug that caused redirections to not be undone on some syntax
787 errors, e.g., when parsing a command substitution.
788
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.
794
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)
797 on a directory.
798
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.
801
802 jjjj. Made a few changes to strings to avoid possible potential negative effects
803 caused by malicious translations.
804
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
807 options.
808
809 llll. Fixed a bug that would not replace empty strings using pattern
810 substitution even if the pattern matched the empty string.
811
812 mmmm. Fixed a bug with word completion that prevented some characters from
813 being backslash-quoted (backquote, dollar sign).
814
815 nnnn. Fixed a bug that prevented a command from the history re-executed by the
816 `fc' builtin from setting verbose mode.
817
818 oooo. Fixed a bug that caused the shell to not enable and disable function
819 tracing with changes to the `extdebug' shell option.
820
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
823 incorrect names.
824
825 qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to
826 unset the wrong variable under certain circumstances.
827
828 rrrr. Fixed a bug that caused close braces occurring in brace expansions within
829 command substitutions to incorrectly terminate parameter expansions.
830
831 ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH.
832
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.
836
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.
839
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
842 command name.
843
844 wwww. Fixed a bug that caused case statements within loops contained in a
845 command substitution to be parsed incorrectly.
846
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.
850
851 2. Changes to Readline
852
853 a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
854 commands with modifiers was fixed.
855
856 b. Fixed a bug that caused callback mode to dump core when reading a
857 multiple-key sequence (e.g., arrow keys).
858
859 c. Fixed a bug that caused the redisplay code to erase some of the line when
860 using horizontal scrolling with incremental search.
861
862 d. Readline's input handler now performs signal processing if read(2) is
863 interrupted by SIGALRM or SIGVTALRM.
864
865 e. Fixed a problem with revert-all-at-newline freeing freed memory.
866
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.
870
871 g. Fixed an off-by-one error in the prompt printed when performing searches.
872
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).
875
876 i. Some memory leaks caused by signals interrupting filename completion have
877 been fixed.
878
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
881 SIGHUP, for example.
882
883 k. Fixed a bug concerning deleting multibyte characters from the search
884 string while performing an incremental search.
885
886 l. Fixed a bug with tilde expanding directory names in filename completion.
887
888 m. Fixed a bug that did not allow binding sequences beginning with a `\'.
889
890 n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
891 contains a multibyte character in the last screen column.
892
893 o. Fixed a bug that caused history expansion to disregard characters that are
894 documented to delimit a history event specifier without requiring `:'.
895
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.
898
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.
902
903 r. Paren matching now works in vi insert mode.
904
905 3. New Features in Bash
906
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.
910
911 b. Command and process substitutions now turn off the `-v' option when
912 executing, as other shells seem to do.
913
914 c. The default value for the `checkhash' shell option may now be set at
915 compile time with a #define.
916
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
919 supplied with -d.
920
921 e. The maximum number of nested recursive calls to `eval' is now settable in
922 config-top.h; the default is no limit.
923
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).
927
928 g. The maximum number of nested recursive calls to `source' is now settable
929 in config-top.h; the default is no limit.
930
931 h. All builtin commands recognize the `--help' option and print a usage
932 summary.
933
934 i. Bash does not allow function names containing `/' and `=' to be exported.
935
936 j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
937
938 k. The shell now allows `time ; othercommand' to time null commands.
939
940 l. There is a new `--enable-function-import' configuration option to allow
941 importing shell functions from the environment; import is enabled by
942 default.
943
944 m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
945 had been executed.
946
947 n. GLOBIGNORE, the pattern substitution word expansion, and programmable
948 completion match filtering now honor the value of the `nocasematch' option.
949
950 o. There is a new ${parameter@spec} family of operators to transform the
951 value of `parameter'.
952
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,
957 but with a warning.
958
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.
962
963 r. Executing the rhs of && and || will no longer cause the shell to fork if
964 it's not necessary.
965
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
968 function return.
969
970 t. `complete' and `compgen' have a new `-o nosort' option, which forces
971 readline to not sort the completion matches.
972
973 u. Bash now allows waiting for the most recent process substitution, since it
974 appears as $!.
975
976 v. The `unset' builtin now unsets a scalar variable if it is subscripted with
977 a `0', analogous to the ${var[0]} expansion.
978
979 w. `set -i' is no longer valid, as in other shells.
980
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
983 trap.
984
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.
987
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.
991
992 aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
993 cause matching filenames to be ignored when searching for commands.
994
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 `&&').
998
999 4. New Features in Readline
1000
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.
1004
1005 b. There is a new bindable variable, `enable-bracketed-paste', which enables
1006 support for a terminal's bracketed paste mode.
1007
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.
1012
1013 d. Prompt expansion adds the mode string to the last line of a multi-line
1014 prompt (one with embedded newlines).
1015
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
1018 displayed in color.
1019
1020 f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
1021 mode yank-pop.
1022
1023 g. The redisplay code underwent several efficiency improvements for multibyte
1024 locales.
1025
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.
1028
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
1031 after a signal.