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