]> git.ipfire.org Git - thirdparty/bash.git/blame - CHANGES
Bash-5.2-rc4 release
[thirdparty/bash.git] / CHANGES
CommitLineData
9cef6d01
CR
1This document details the changes between this version, bash-5.2-rc4, and
2the previous version, bash-5.2-rc3.
3
41. Changes to Bash
5
6a. Changed how the compatibility mode enabling of extglob works in conjunction
7 with parsing conditional commands.
8
9b. Fixed a problem with aliases containing command substitutions.
10
112. Changes to Readline
12
133. New Features in Bash
14
154. New Features in Readline
16
17------------------------------------------------------------------------------
b3afafd8
CR
18This document details the changes between this version, bash-5.2-rc3, and
19the previous version, bash-5.2-rc2.
20
211. Changes to Bash
22
23a. Added a compatibility mode feature that causes the parser to parse command
24 substitutions as if extglob were enabled. If it is enabled before execution,
25 parse at execution will succeed. If not, the subsequent execution parse will
26 fail.
27
28b. Fixed an issue with handling a `return' executed in a trap action if the
29 trap is executed while running in a shell function.
30
312. Changes to Readline
32
333. New Features in Bash
34
354. New Features in Readline
36
37a. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG)
38 each time it is called, and modifies the appropriate locale-specific display
39 and key binding variables when the locale changes.
40
41------------------------------------------------------------------------------
f36c8c8e
CR
42This document details the changes between this version, bash-5.2-rc2, and
43the previous version, bash-5.2-rc1.
44
451. Changes to Bash
46
47a. Fixed a bug that could disable history saving after a compound array
48 assignment in an interactive shell.
49
50b. Fixed a bug that could cause incorrect error messages when running a DEBUG
51 trap during a conditional or arithmetic command.
52
53c. Fixed a bug that caused test to print an error message when given ! ! arg
54 as arguments.
55
56d. Fixed a bug that resulted in incorrect error messages when completing a
57 backquoted command substitution.
58
59e. Changed command substitution parsing to reproduce the original text more
60 closely when reconsituting the command string from the parsed command.
61
62f. Fixed a bug that could cause an EXIT trap to use the wrong variable context
63 when the errexit option is set.
64
65g. Fixed a bug that could cause the parser to incorrectly delimit a token when
66 an alias expansion ended with a multibyte character.
67
682. Changes to Readline
69
703. New Features in Bash
71
72a. Since there is no `declare -' equivalent of `local -', make sure to use
73 `local -' in the output of `local -p'.
74
75b. Null anchored matches in pattern substitution now process `&' in the
76 replacement string, like sed.
77
784. New Features in Readline
79
80------------------------------------------------------------------------------
6c1407d2
CR
81This document details the changes between this version, bash-5.2-rc1, and
82the previous version, bash-5.2-beta.
83
841. Changes to Bash
85
86a. Changes to `wait -p' and how it sets the variable name in the presence of
87 valid and invalid PID arguments.
88
89b. Fixed a bug that caused compgen to dump core if the completion engine was
90 not initialized.
91
92c. Fixed a memory leak in the variable name programmable completion code.
93
94d. Here-documents and here-strings use tempfiles if the shell compatibility
95 level is 50 or lower.
96
97e. Non-interactive shells exit on a syntax error encountered while parsing a
98 command substitution.
99
100f. Fixed a bug with inherited parser state while parsing a command substitution.
101
102g. Fixed a bug that caused the shell not to check for terminating signals
103 after executing the command_string supplied with `-c' and before executing
104 the exit trap.
105
106h. Changes to avoid a make race condition while generating builtins.c.
107
108i. Make it explicit that BASH_REMATCH is always a global variable, and that
109 local copies are (currently) ignored.
110
111j. Fixed a bug that caused an ambiguous redirection (>&word) to be printed
112 incorrectly (>&word) if no file descriptor was supplied.
113
1142. Changes to Readline
115
116a. Fixed a bug that caused rl_eof_found to be set prematurely while reading a
117 multi-character key sequence in callback mode.
118
1193. New Features in Bash
120
121a. In posix mode, the `printf' builtin checks for the `L' length modifier and
122 uses long double for floating point conversion specifiers if it's present,
123 double otherwise.
124
125b. The `globbing' completion code now takes the `globstar' option into account.
126
127c. `suspend -f' now forces the shell to suspend even if job control is not
128 currently enabled.
129
1304. New Features in Readline
131
132------------------------------------------------------------------------------
187661b8
CR
133This document details the changes between this version, bash-5.2-beta, and
134the previous version, bash-5.2-alpha.
135
1361. Changes to Bash
137
138a. Fixed a problem with command-oriented history and multi-line commands that
139 caused embedded blank lines to be run together.
140
141b. Changed the way `&' is quoted when performing pattern substitution and
142 `patsub_replacement' is enabled.
143
144c. Fixed some integer overflows when expanding strings or reading the output
145 of command substitution larger than 2GB.
146
147d. `wait -p' without the `-n' option now does something useful if there are no
148 jobs.
149
150e. Fixed an issue with read timeouts in posix mode.
151
152f. Changed here-document processing to process $'...' and $"..." only when they
153 appear in the WORD portion of ${PARAM OP WORD} in the here-document body
154 and the body is being expanded.
155
156g. Changed alias expansion in command substitution to be posix-conformant
157 (performed while initially parsing the command substitution) when in posix
158 mode.
159
160h. Bash optimizes away more forks in subshells.
161
162i. Here-document construction now performs quote removal on the here-document
163 delimiter only if it's marked as quoted, which prevents quote characters in
164 command substitutions from being removed.
165
166j. Prompt string expansion now gives invisible characters in the expansion of
167 the \w, \W, and \s escape sequences a visible representation to avoid
168 problems with redisplay.
169
170k. Fixed a problem with SIGINT during the execution of a command bound with
171 `bind -x' affecting the saved terminal settings.
172
173l. Fixed an inconsistency with how $@ expands in a construct like ${@:+set}
174 or ${array[@]:+set} in the presence of null positional parameters or
175 array elements.
176
1772. Changes to Readline
178
179a. Prevent some display problems when running a command as the result of a
180 trap or one bound using `bind -x' and the command generates output.
181
182b. Fixed an issue with multi-line prompt strings that have one or more
183 invisible characters at the end of a physical line.
184
185c. Fixed an issue that caused a history line's undo list to be cleared when
186 it should not have been.
187
1883. New Features in Bash
189
190a. There is a new bindable readline command name: `vi-edit-and-execute-command'.
191
1924. New Features in Readline
193
194a. Two new bindable string variables: active-region-start-color and
195 active-region-end-color. The first sets the color used to display the
196 active region; the second turns it off. If set, these are used in place
197 of terminal standout mode.
198
199b. New readline state (RL_STATE_EOF) and application-visible variable
200 (rl_eof_found) to allow applications to detect when readline reads EOF
201 before calling the deprep-terminal hook.
202
203c. There is a new configuration option: --with-shared-termcap-library, which
204 forces linking the shared readline library with the shared termcap (or
205 curses/ncurses/termlib) library so applications don't have to do it.
206
207------------------------------------------------------------------------------
4491c030
CR
208This document details the changes between this version, bash-5.2-alpha, and
209the previous version, bash-5.1-release.
210
2111. Changes to Bash
212
213a. Fixed a bug that assigned a value to the variable name supplied as an
214 argument to `wait -p' when there were no jobs.
215
216b. Fixed a bug that resulted in performing incorrect word expansion on the
217 key/value pairs in a compound array assignment.
218
219c. Fixed a bug that could put the child forked to run a command substitution
220 into the wrong process group.
221
222d. Fixed a problem that could cause the lastpipe option to work incorrectly if
223 file descriptor 0 was closed.
224
225e. Bash tries to suppress traps if a forked child receives a trapped signal
226 before it has a chance to reset its signal handlers.
227
228f. Fixed several memory leaks in compound array assignments.
229
230g. Fixed a problem with performing an assignment with `+=' to an array element
231 that was the value of a nameref.
232
233h. Fixed a bug that could cause a nameref containing an array reference using
234 `@' or `*' not to expand to multiple words.
235
236i. Fixed a bug where extended glob functions could match `.' or `..' when it
237 wasn't explicitly specified, even if dotglob was set.
238
239j. Fixed a bug that caused non-interactive posix-mode shells not to exit on a
240 variable assignment error while assigning into the temporary environment.
241
242k. Fixed a bug that caused parsing errors if an alias contained a compound
243 array assignment.
244
245l. Fixed a couple of instances where bash checked syntax too aggressively when
246 trying to determine how to add a partial command to command-oriented
247 history.
248
249m. Fixed a parser problem that caused it not to allow reserved words to follow
250 the `((' and `[[' commands.
251
252n. Fixed a bad offset calculation when using negative offsets to `history -d'.
253
254o. Fixed an off-by-one error that caused a read past the end of a buffer when
255 reading a multibyte character from the output of a command substitution.
256
257p. Fixed a problem with a failed `exec' command not setting $? to the right
258 value for an exit trap.
259
260q. Fixed a problem that caused bash not to unlink FIFOs created as part of
261 expanding redirections for an external command.
262
263r. Fixed a bug that could cause aliases not to be expanded in case statements.
264
265s. Fixed a bug that could cause word completion to attempt programmable
266 completion for the target of a redirection, instead of filename completion.
267
268t. Fixed a bug that could result in errors after rebinding a key sequence with
269 `bind -x' multiple times.
270
271u. Fixed a problem that could result in not quoting the result when performing
272 command name completion with a glob pattern in the command name.
273
274v. `mapfile' now uses fully-buffered reads in more cases, which should improve
275 bulk read performance.
276
277w. Fixed a bug that caused `wait -n' to not reset its internal state when
278 interrupted by a signal, resulting in subsequent calls failing.
279
280x. Fixed a bug with parsing numeric arguments to readline key sequences
281 installed with `bind -x'.
282
283y. Bash suppresses forking in several additional cases, including most uses
284 of $(<file).
285
286z. If there are multiple `!' tokens in a [[ command, toggle the invert state
287 instead of setting it unconditionally.
288
289aa. Fixed a bug where running `fc' on an empty history list would cause the
290 shell to crash.
291
292bb. Word completion now checks whether or not a quote character closes a
293 quoted string begun on a previous line, so readline doesn't interpret the
294 quote as starting a new quoted string.
295
296cc. Fixed a typo that translated \UNNNNNNNN characters that were not valid in
297 the current locale encoding as \uNNNNNNNN.
298
299dd. Fixed an issue that could cause bash to print timing statistics for the
300 wrong command when `set -e' causes a command to fail.
301
302ee. Bash now runs the exit trap in function context if a failed command in
303 the function causes the shell to exit.
304
305ff. Some fixes to how subshells modify $SHLVL.
306
307gg. Fixed a bug that caused `mapfile -t' not to remove the delimiter when the
308 delimiter is > 128 in the current encoding.
309
310hh. Fixed a problem that could cause the shell to attempt to free unallocated
311 memory if an expansion error occurred.
312
313ii. Fixed a bug in the bash malloc implementation of malloc_usable_size. Bash
314 did not use it, but it could cause problems with library functions that
315 did.
316
317jj. If the `exec' builtin fails, and the shell does not exit, it restores
318 trapped signals to their trapped state.
319
320kk. Fixed a bug that could cause variable assignment arguments to `declare' to
321 expand variables using attributes that the call to declare was turning off.
322
323ll. Fixed a bug with LINENO and arithmetic for commands.
324
325mm. Fixed a posix-mode bug that caused tildes not to be expanded after an
326 unquoted colon on the right side of an assignment statement.
327
328nn. Fixed a problem with `caller' and line numbers when executing an ERR trap.
329
330oo. Fixed a problem that could make the value returned by ${a:=b} not be the
331 final value assigned to a (e.g., if `a' has an attribute that modifies
332 the value on assignment).
333
334pp. Fixed a problem with saving multi-line here-documents to the history list
335 where the here-document delimiter does not appear on the first line.
336
337qq. Fixed a bug with using += to assign to dynamic variables like RANDOM.
338
339rr. Fixed a bug that caused `set -n' to modify $? if set after execution had
340 started.
341
342ss. Builtins like printf/read/wait now behave more consistently when assigning
343 arbitrary keys to associative arrays (like `]'. when appropriately quoted).
344
345tt. Fixed a problem with here-document collection printing the wrong prompt
346 when parsing a compound list in an interactive shell.
347
348uu. Fixed a problem with quoting shell expansion characters (like `$') when
349 they appear in a tab-completed word along with characters that do need
350 quoting (e.g.. $HOME/VirtualBox VMs).
351
3522. Changes to Readline
353
354a. Fixed a problem with cleaning up active marks when using callback mode.
355
356b. Fixed a problem with arithmetic comparison operators checking the version.
357
358c. Fixed a problem that could cause readline not to build on systems without
359 POSIX signal functions.
360
361d. Fixed a bug that could cause readline to crash if the application removed
362 the callback line handler before readline read all typeahead.
363
364e. Added additional checks for read errors in the middle of readline commands.
365
366f. Fixed a redisplay problem that occurred when switching from the digit-
367 argument prompt `(arg: N)' back to the regular prompt and the regular
368 prompt contained invisible characters.
369
370g. Fixed a problem with restoring the prompt when aborting an incremental
371 search.
372
373h. Fix a problem with characters > 128 not being displayed correctly in certain
374 single-byte encodings.
375
376i. Fixed a problem with unix-filename-rubout that caused it to delete too much
377 when applied to a pathname consisting only of one or more slashes.
378
379j. Fixed a display problem that caused the prompt to be wrapped incorrectly if
380 the screen changed dimensions during a call to readline() and the prompt
381 became longer than the screen width.
382
383k. Fixed a problem that caused the \r output by turning off bracketed paste
384 to overwrite the line if terminal echo was disabled.
385
386l. Fixed a bug that could cause colored-completion-prefix to not display if
387 completion-prefix-display-length was set.
388
389m. Fixed a problem with line wrapping prompts when a group of invisible
390 characters runs to the right edge of the screen and the prompt extends
391 longer then the screen width.
392
393n. Fixed a couple problems that could cause rl_end to be set incorrectly by
394 transpose-words.
395
3963. New Features in Bash
397
398a. The bash malloc returns memory that is aligned on 16-byte boundaries.
399
400b. There is a new internal timer framework used for read builtin timeouts.
401
402c. Rewrote the command substitution parsing code to call the parser recursively
403 and rebuild the command string from the parsed command. This allows better
f36c8c8e
CR
404 syntax checking and catches errors much earlier. Along with this, if
405 command substitution parsing completes with here-documents remaining to be
406 read, the shell prints a warning message and reads the here-document bodies
407 from the current input stream.
4491c030
CR
408
409d. The `ulimit' builtin now treats an operand remaining after all of the options
410 and arguments are parsed as an argument to the last command specified by
411 an option. This is for POSIX compatibility.
412
413e. Here-document parsing now handles $'...' and $"..." quoting when reading the
414 here-document body.
415
416f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline
417 commands now understand $'...' and $"..." quoting.
418
419g. There is a new `spell-correct-word' bindable readline command to perform
420 spelling correction on the current word.
421
422h. The `unset' builtin now attempts to treat arguments as array subscripts
423 without parsing or expanding the subscript, even when `assoc_expand_once'
424 is not set.
425
426i. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
427
428j. Associative array assignment and certain instances of referencing (e.g.,
6c1407d2 429 `test -v') now allow `@' and `*' to be used as keys.
4491c030 430
6c1407d2
CR
431k. Bash attempts to expand indexed and associative array subscripts only
432 once when executing shell constructs and word expansions.
4491c030
CR
433
434l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with
435 that value for associative arrays instead of unsetting the entire array
436 (which you can still do with `unset arrayname'). For indexed arrays, it
437 removes all elements of the array without unsetting it (like `A=()').
438
439m. Additional builtins (printf/test/read/wait) do a better job of not
440 parsing array subscripts if array_expand_once is set.
441
442n. New READLINE_ARGUMENT variable set to numeric argument for readline commands
443 defined using `bind -x'.
444
445o. The new `varredir_close' shell option causes bash to automatically close
446 file descriptors opened with {var}<fn and other styles of varassign
447 redirection unless they're arguments to the `exec' builtin.
448
449p. The `$0' special parameter is now set to the name of the script when running
450 any (non-interactive) startup files such as $BASH_ENV.
451
452q. The `enable' builtin tries to load a loadable builtin using the default
453 search path if `enable name' (without any options) attempts to enable a
454 non-existent builtin.
455
456r. The `printf' builtin has a new format specifier: %Q. This acts like %q but
457 applies any specified precision to the original unquoted argument, then
458 quotes and outputs the result.
459
460s. The new `noexpand_translations' option controls whether or not the translated
461 output of $"..." is single-quoted.
462
463t. There is a new parameter transformation operator: @k. This is like @K, but
464 expands the result to separate words after word splitting.
465
466u. There is an alternate array implementation, selectable at `configure' time,
467 that optimizes access speed over memory use (use the new configure
468 --enable-alt-array-implementation option).
469
470v. If an [N]<&WORD- or [N]>&WORD- redirection has WORD expand to the empty
471 string, treat the redirection as [N]<&- or [N]>&- and close file descriptor
472 N (default 0).
473
474w. Invalid parameter transformation operators are now invalid word expansions,
475 and so cause fatal errors in non-interactive shells.
476
477x. New shell option: patsub_replacement. When enabled, a `&' in the replacement
478 string of the pattern substitution expansion is replaced by the portion of
479 the string that matched the pattern. Backslash will escape the `&' and
480 insert a literal `&'.
481
482y. `command -p' no longer looks in the hash table for the specified command.
483
484z. The new `--enable-translatable-strings' option to `configure' allows $"..."
485 support to be compiled in or out.
486
487aa. The new `globskipdots' shell option forces pathname expansion never to
b3afafd8 488 return `.' or `..' unless explicitly matched. It is enabled by default.
4491c030
CR
489
490bb. Array references using `@' and `*' that are the value of nameref variables
491 (declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
492 set -u is enabled and the array (v) is unset.
493
4944. New Features in Readline
495
496a. There is now an HS_HISTORY_VERSION containing the version number of the
497 history library for applications to use.
498
499b. History expansion better understands multiple history expansions that may
500 contain strings that would ordinarily inhibit history expansion (e.g.,
501 `abc!$!$').
502
503c. There is a new framework for readline timeouts, including new public
504 functions to set timeouts and query how much time is remaining before a
505 timeout hits, and a hook function that can trigger when readline times
506 out. There is a new state value to indicate a timeout.
507
508d. Automatically bind termcap key sequences for page-up and page-down to
509 history-search-backward and history-search-forward, respectively.
510
511e. There is a new `fetch-history' bindable command that retrieves the history
512 entry corresponding to its numeric argument. Negative arguments count back
513 from the end of the history.
514
515f. `vi-undo' is now a bindable command.
516
517g. There is a new option: `enable-active-region'. This separates control of
518 the active region and bracketed-paste. It has the same default value as
519 bracketed-paste, and enabling bracketed paste enables the active region.
520 Users can now turn off the active region while leaving bracketed paste
521 enabled.
522
523h. rl_completer_word_break_characters is now `const char *' like
524 rl_basic_word_break_characters.
525
187661b8 526i. Readline looks in $LS_COLORS for a custom filename extension
4491c030
CR
527 (*.readline-colored-completion-prefix) and uses that as the default color
528 for the common prefix displayed when `colored-completion-prefix' is set.
529
530------------------------------------------------------------------------------
8868edaf
CR
531This document details the changes between this version, bash-5.1-rc3, and
532the previous version, bash-5.1-rc2.
533
5341. Changes to Bash
535
536a. The `assoc_expand_once' option now affects the evaluation of the -v primary
537 to test and the [[ compound command.
538
5392. Changes to Readline
540
541a. Fixed a bug that could cause point to be set beyond the end of the line
542 buffer when aborting an incremental search.
543
5443. New Features in Bash
545
5464. New Features in Readline
547
548------------------------------------------------------------------------------
549This document details the changes between this version, bash-5.1-rc2, and
550the previous version, bash-5.1-rc1.
551
5521. Changes to Bash
553
554a. Process substitutions started from an interactive shell no longer have their
555 standard input implicitly redirected from /dev/null.
556
557b. Fixed an issue with setting the SIGINT trap handler in an interactive shell
558 when temporarily running $PROMPT_COMMAND non-interactively.
559
5602. Changes to Readline
561
562a. Terminals that are named "dumb" or unknown do not enable bracketed paste
563 by default.
564
565b. Ensure that disabling bracketed paste turns off highlighting the incremental
566 search string when the search is successful.
567
5683. New Features in Bash
569
5704. New Features in Readline
571
572------------------------------------------------------------------------------
573This document details the changes between this version, bash-5.1-rc1, and
574the previous version, bash-5.1-beta.
575
5761. Changes to Bash
577
578a. Fixed an inconsistency in the way HISTCMD is calculated when it's expanded
579 during a multi-line command.
580
581b. Modified the change to here-document expansion containing backslash-quoted
582 double quotes.
583
584c. Fixed a case where the shells's exit status could be greater than 255.
585
586d. Modified changed to process substitution so the executed command has its
587 stdin redirected from /dev/null if it was previously interactive and
588 reading commands from the terminal.
589
5902. New Features in Bash
591
592a. There is a new contributed loadable builtin: asort.
593
5943. Changes to Readline
595
596a. Fixed a bug that could cause an application with an application-specific
597 redisplay function to crash if the line data structures had not been
598 initialized.
599
6004. New Features in Readline
601
602------------------------------------------------------------------------------
603This document details the changes between this version, bash-5.1-beta, and
604the previous version, bash-5.1-alpha.
605
6061. Changes to Bash
607
608a. Fixed a bug that caused name references to variables to not update the
609 referenced variable's assignment side effects.
610
611b. Tightened up the parameter transformation error checking for invalid
612 transformation operators.
613
614c. System-specific changes for: FreeBSD
615
616d. A few minor changes to move potential uses of stdio functions out of signal
617 handling paths.
618
619e. Make sure SIGCHLD is blocked in all cases where waitchld() is not called
620 from a signal handler.
621
622f. Changed `command' builtin processing so it no longer starts an extra process
623 when run asynchronously (command x &).
624
625g. Avoid performing tilde expansion after `:' in words that look like assignment
626 statements when in posix mode.
627
628h. Slight changes to how the `complete' builtin prints out options and actions
629 for completion specifications.
630
631i. Several changes to how `local -' restores the values of options and
632 $SHELLOPTS.
633
634j. Don't treat a word in a compound assignment as an assignment statement
635 unless it has a valid subscript before the `='.
636
637k. Fixed a bug with the DEBUG trap and process substitution that caused the
638 terminal's process group to be set incorrectly.
639
640l. Fixed a bug that left readline's signal handlers installed while running a
641 shell command from a bindable readline command.
642
643m. Fixed the `fc' builtin to clamp out of range history specifications at the
644 boundaries of the history list for POSIX conformance.
645
646n. Fixed a bug that caused ${foo@a} to treat foo as an unset variable if it
647 was an array without a value for subscript 0/"0" but had other set
648 elements.
649
650o. Fixed a bug that caused the history code to attempt to parse command
651 substitutions looking for shell comments before adding them to the history,
652 even while parsing here-documents.
653
654p. Fixed a bug that could cause a syntax error in a command read by `eval' to
655 exit an interactive shell.
656
6572. New Features in Bash
658
659a. If the hash builtin is listing hashed filenames portably, don't print
660 anything if the table is empty.
661
662b. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component.
663
664c. Bash attempts to optimize away forks in the last command in a function body
665 under appropriate circumstances.
666
667d. The globbing code now uses fnmatch(3) to check collation elements (if
668 available) even in cases without multibyte characters.
669
670e. The `fg' and `bg' builtins now return an error in a command substitution
671 when asked to restart a job inherited from the parent shell.
672
673f. The shell now attempts to unlink all FIFOs on exit, whether a consuming
674 process has finished with them or not.
675
6763. Changes to Readline
677
678a. Make sure that all undo groups are closed when leaving vi insertion mode.
679
680b. Make sure that the vi-mode `C' and `c' commands enter insert mode even if
681 the motion command doesn't have any effect.
682
683c. Fixed several potential memory leaks in the callback mode context handling.
684
685d. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while
686 executing the terminal cleanup code, since it's no longer run in a signal
687 handling context.
688
6894. New Features in Readline
690
691a. The signal cleanup code now blocks SIGINT while processing after a SIGINT.
692
693------------------------------------------------------------------------------
694This document details the changes between this version, bash-5.1-alpha, and
695the previous version, bash-5.0-release.
696
6971. Changes to Bash
698
699a. Fixed a bug that caused a posix-mode shell to not exit if the return builtin
700 was executed outside a function or dot script.
701
702b. Fixed a bug where `declare +f' could potentially turn off the function
703 attribute.
704
705c. Restored bash-4.4 pathname expansion behavior when a word to be expanded had
706 only backslashes, not any of the other globbing characters. This came after
707 an extensive POSIX group discussion (interp #1234).
708
709d. There are more changes to avoid performing word expansions multiple times on
710 arithmetic expressions.
711
712e. Fixed a bug with alias expansion when the alias ends with a TAB.
713
714f. Fixed a bug that caused programmable completion to return an error if the
715 shell function name supplied as an argument to `complete -F' was invalid.
716
717g. There are several fixes to buffer overflows found as the result of fuzzing
718 with random input.
719
720h. Fixed a bug that caused the edit-and-execute-command editing command to
721 start with the previous history line if invoked on an empty line.
722
723i. Fixed a bug that potentially caused `bind --help' to change readline's
724 output stream.
725
726j. Turning off posix mode now restores the vi-insertion mode binding for TAB
727 that was in effect when posix mode was enabled.
728
729k. Restore the previous state of job control being enabled if `exec' fails in
730 an interactive shell.
731
732l. Fixed a bug that caused the terminal's process group to be set incorrectly
733 if job control was turned off before starting an interactive shell.
734
735m. Fixed a bug that caused a crash when HISTSIZE=0.
736
737n. Fixed a word expansion bug that caused null strings on the rhs of expansions
738 to be discarded incorrectly.
739
740o. History list management does a better job of handling the situation where
741 the number of history entries from the current shell session is greater than
742 the number of entries in the history list.
743
744p. Fixed a bug that caused the `fc' builtin to attempt to dereference a newly-
745 freed history entry.
746
747q. Fixed a bug that made the `Q' variable transformation not work well with
748 `set -u'.
749
750r. There are several word expansion fixes for expanding $* and $@ in contexts
751 where word splitting is not going to be performed, since each positional
752 parameter must expand to a separate word.
753
754s. Fixed a bug that could cause ^D to exit bash immediately even if there were
755 stopped jobs.
756
757t. Fixed a bug with double-quoting and backslash-quoting strings containing
758 multibyte characters for reuse.
759
760u. Fixed a bug that caused the line number to be reported incorrectly if the
761 shell executed a (command) subshell.
762
763v. Fixed a bug that caused the shell to fail to reap process substitutions
764 when they went out of scope, which had unpredictable results.
765
766w. Fixed a bug that caused null strings in arguments to [[ conditional command
767 operators to compare incorrectly.
768
769x. Changed the behavior of `wait' without arguments to only wait for background
770 processes the current shell instance started, not background children it may
771 have inherited.
772
773y. Fixed a bug that could cause command substitution to leave file descriptors
774 open if the shell received many SIGINTs.
775
776z. Bash now behaves better if the `**' filename expansion operator encounters a
777 symbolic link to a directory, avoiding more cases where it might return
778 duplicate pathnames.
779
780aa. Programmable completion now canonicalizes directory names in the same way
781 as bash word completion, so `..' is handled consistently.
782
783bb. Fixed a bug when using RETURN as the delimiter to the read builtin; it
784 caused readline to set the binding for RETURN incorrectly.
785
786cc. Fixed a bug that caused `history -d' to delay printing an out-of-range
787 error message.
788
789dd. Fixed a bug with `bash -c command' where `command' ends with an expanded
790 alias.
791
792ee. Fixed a bug that could result in `history -n' adding spurious line feeds to
793 commands in the history list.
794
795ff. The $RANDOM random number generator now XORs the top and bottom halves of
796 the internal 32-bit value to introduce more randomness. Setting the shell
797 compatibility level to 50 or lower undoes this.
798
799gg. Fixed several problems caused by running the DEBUG trap on simple commands
800 executed as part of a pipeline.
801
802ii. Fixed a bug that didn't allow `bind -r' to remove the binding for \C-@.
803
804jj. Several fixes to the bash-backward-shellword bindable readline command to
805 behave better when at the last character on the line.
806
807kk. If `set -x' is enabled, bash doesn't print a command twice if it's run by
808 the `command' builtin.
809
810ll. Fixed a bug with printing function definitions containing here documents.
811
812mm. Fixed a bug that could cause the `bind' builtin to set $? to -1.
813
814nn. Fixed a bug that didn't reset the timezone information correctly when the
815 TZ variable was unset.
816
817oo. Fixed several issues with assigning an associative array variable using a
818 compound assignment that expands the value of the same variable.
819
820pp. Fixed several places where the shell set $? without setting PIPESTATUS.
821
822qq. Fixed a problem with glob bracket expressions containing invalid character
823 classes, collating symbols, or equivalence classes -- they should not
824 require a closing right bracket.
825
826rr. Fixed a bug where running a builtin in a subshell did not run the EXIT trap.
827
828ss. Fixed several problems with posix-mode variable assignments preceding
829 shell function calls and posix special builtins, so that they create and
830 modify variables at the current scope.
831
832tt. Fix history initialization so `bash +o history' works as expected.
833
834uu. Fixed a bug in the bindable edit-and-execute-command command that could
835 interfere with the shell's parsing state.
836
837vv. Fixed an issue with nested traps running command substitutions in command
838 lines with command substitutions.
839
840ww. Fixed a bug with globbing pathnames that contain invalid multibyte
841 characters (sequences that don't correspond to a character in the current
842 locale).
843
844xx. Fixed a bug that caused the shell not to exit if a function definition
845 failed while errexit was enabled.
846
847yy. Process substitution processes now get their input from /dev/null, since
848 they are asynchronous, not interactive, and not jobs.
849
850zz. Setting nocaseglob no longer turns on case-insensitive regexp matching.
851
852aaa. Fixed a bug that resulted in extra blank lines being added to some history
853 entries containing here-documents.
854
855bbb. Fixed a bug that resulted in incorrect matching of some patterns in word
856 expansion if they expanded to the empty string.
857
858ccc. Fixed here-string expansion so it behaves the same as expansion of the
859 rhs of an assignment statement.
860
861ddd. Changed here-document parsing to no longer allow the end of the here
862 document to delimit a command substitution.
863
864eee. Several fixes to history expansion: multiple :p modifiers work, a ^ word
865 designator works as part of a range, and a `-' is treated as part of a
866 search string if it immediately follows a `!'.
867
868fff. Fixed a bug in pattern substitution with null matches in a string
869 containing multibyte characters.
870
871ggg. Unbinding a key sequence bound with `bind -x' now removes the key sequence
872 from the additional keymap `bind -x' uses.
873
874hhh. Fixed a bug with command start detection for completion so that it doesn't
875 mistake brace expansion for the start of a command.
876
877iii. Fixed a bug that caused local variables with the same name as variables
878 appearing in a function's temporary environment to not be marked as local.
879
880jjj. Fixed a bug that could cause SIGCHLD to be blocked when executing return
881 or exec in the rightmost pipeline element with lastpipe enabled.
882
883kkk. Fixed a bug that could result in commands without the execute bit set
884 being added to the command hash table.
885
886lll. Fixed a bug that allowed non-digits to follow the `#' in a `base#number'
887 integer constant.
888
889mmm. Fixed a bug that made `time -- command' attempt to execute `--'.
890
891nnn. Fixed a couple of bugs with variable transformation using arrays
892 subscripted with `*' or `@'.
893
894ooo. A failure to create a variable using `declare' in a function no longer
895 causes the function to return immediately.
896
897ppp. Fixed a bug that could cause the := word expansion to add a non-null
898 value if attempting to assign a null string when double-quoted.
899
900qqq. Fixed a bug that could cause backslashes quoting double quotes in here
901 document bodies to not be removed when expanding the body.
902
903rrr. Fixed a bug that caused commands following a subshell while the shell is
904 reading input from stdin but not interactive, while job control is
905 enabled, to be executed twice.
906
907sss. Fixed a bug where receiving SIGTERM from a different process while
908 readline was active could cause the shell to terminate.
909
910ttt. In posix mode, running a trap after the read builtin now sees the exit
911 status of the read builtin (e.g., 130 after a SIGINT) in $?.
912
913uuu. Fixed a bug with nameref variables referencing array subscripts used in
914 arithmetic expressions.
915
916vvv. Fixed a bug that caused the pipeline process group id to be reset in the
917 middle of a command list run by a shell started to run a command
918 substitution.
919
920www. Restricted shells can no longer read and write history files with pathnames
921 containing slashes.
922
923xxx. Fixed a couple of problems with 0 and -0 used as arguments to `fc' when
924 not listing commands from the history.
925
926yyy. When `test' is supplied four or more arguments, treat an argument that
927 looks like an operator (e.g., -e), but is in a place where only a string
928 is valid, as a string, as it would be when using the POSIX rules, instead
929 of an operator with a missing argument.
930
931zzz. There is no `compat50' shopt option. Changes to the shell compatibility
932 level should use the BASH_COMPAT variable.
933
934aaaa. Redirection failures with compound commands are now treated as errors
935 that cause the shell to exit if `errexit' is enabled.
936
937bbbb. Redirection failure error messages no longer expand the word in the
938 redirection again.
939
940cccc. History expansion is no longer performed while parsing a here-document
941 inside a command substitution.
942
9432. Changes to Readline
944
945a. There are a number of fixes that were found as the result of fuzzing with
946 random input.
947
948b. Changed the revert-all-at-newline behavior to make sure to start at the end
949 of the history list when doing it, instead of the line where the user hit
950 return.
951
952c. When parsing `set' commands from the inputrc file or an application, readline
953 now allows trailing whitespace.
954
955d. Fixed a bug that left a file descriptor open to the history file if the
956 file size was 0.
957
958e. Fixed a problem with binding key sequences containing meta characters.
959
960f. Fixed a bug that caused the wrong line to be displayed if the user tried to
961 move back beyond the beginning of the history list, or forward past the end
962 of the history list.
963
964g. If readline catches SIGTSTP, it now sets a hook that allows the calling
965 application to handle it if it desires.
966
967h. Fixed a redisplay problem with a prompt string containing embedded newlines.
968
969i. Fixed a problem with completing filenames containing invalid multibyte
970 sequences when case-insensitive comparisons are enabled.
971
972j. Fixed a redisplay problem with prompt strings containing invisible multibyte
973 characters.
974
975k. Fixed a problem with multibyte characters mapped to editing commands that
976 modify the search string in incremental search.
977
978l. Fixed a bug with maintaining the key sequence while resolving a bound
979 command in the presence of ambiguous sequences (sequences with a common
980 prefix), in most cases while attempting to unbind it.
981
982m. Fixed several buffer overflows found as the result of fuzzing.
983
984n. Reworked backslash handling when translating key sequences for key binding
985 to be more uniform and consistent, which introduces a slight backwards
986 incompatibility.
987
988o. Fixed a bug with saving the history that resulted in errors not being
989 propagated to the calling application when the history file is not writable.
990
991p. Readline only calls chown(2) on a newly-written history file if it really
992 needs to, instead of having it be a no-op.
993
994q. Readline now behaves better when operate-and-get-next is used when the
995 history list is `full': when there are already $HISTSIZE entries.
996
997r. Fixed a bug that could cause vi redo (`.') of a replace command not to work
998 correctly in the C or POSIX locale.
999
1000s. Fixed a bug with vi-mode digit arguments that caused the last command to be
1001 set incorrectly. This prevents yank-last-arg from working as intended, for
1002 example.
1003
10043. New Features in Bash
1005
1006a. `bind -x' now supports different bindings for different editing modes and
1007 keymaps.
1008
1009b. Bash attempts to optimize the number of times it forks when executing
1010 commands in subshells and from `bash -c'.
1011
1012c. Here documents and here strings now use pipes for the expanded document if
1013 it's smaller than the pipe buffer size, reverting to temporary files if it's
1014 larger.
1015
1016d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut
1017
1018e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL
1019 and those that were SIG_IGN when the shell starts.
1020
1021f. The shell now expands the history number (e.g., in PS1) even if it is not
1022 currently saving commands to the history list.
1023
1024g. `read -e' may now be used with arbitrary file descriptors (`read -u N').
1025
1026h. The `select' builtin now runs traps if its internal call to the read builtin
1027 is interrupted by a signal.
1028
1029i. SRANDOM: a new variable that expands to a 32-bit random number that is not
1030 produced by an LCRNG, and uses getrandom/getentropy, falling back to
1031 /dev/urandom or arc4random if available. There is a fallback generator if
1032 none of these are available.
1033
1034j. shell-transpose-words: a new bindable readline command that uses the same
1035 definition of word as shell-forward-word, etc.
1036
1037k. The shell now adds default bindings for shell-forward-word,
1038 shell-backward-word, shell-transpose-words, and shell-kill-word.
1039
1040l. Bash now allows ARGV0 appearing in the initial shell environment to set $0.
1041
1042m. If `unset' is executed without option arguments, bash tries to unset a shell
1043 function if a name argument cannot be a shell variable name because it's not
1044 an identifier.
1045
1046n. The `test -N' operator uses nanosecond timestamp granularity if it's
1047 available.
1048
1049o. Bash posix mode now treats assignment statements preceding shell function
1050 definitions the same as in its default mode, since POSIX has changed and
1051 no longer requires those assignments to persist after the function returns
1052 (POSIX interp 654).
1053
1054p. BASH_REMATCH is no longer readonly.
1055
1056q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n'
1057 or `wait' without arguments.
1058
1059r. Sorting the results of pathname expansion now uses byte-by-byte comparisons
1060 if two strings collate equally to impose a total order; the result of a
1061 POSIX interpretation (#963 and #1070).
1062
1063s. Bash now allows SIGINT trap handlers to execute recursively.
1064
1065t. Bash now saves and restores state around setting and unsetting posix mode,
1066 instead of having unsetting posix mode set a known state.
1067
1068u. Process substitution is now available in posix mode.
1069
1070v. READLINE_MARK: a new variable available while executing commands bound with
1071 `bind -x', contains the value of the mark.
1072
1073w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell
1074 startup.
1075
1076x. `test -v N' can now test whether or not positional parameter N is set.
1077
1078y. `local' now honors the `-p' option to display all local variables at the
1079 current context.
1080
1081z. The `@a' variable transformation now prints attributes for unset array
1082 variables.
1083
1084aa. The `@A' variable transformation now prints a declare command that sets a
1085 variable's attributes if the variable has attributes but is unset.
1086
1087bb. `declare' and `local' now have a -I option that inherits attributes and
1088 value from a variable with the same name at a previous scope.
1089
1090cc. When run from a -c command, `jobs' now reports the status of completed jobs.
1091
1092dd. New `U', `u', and `L' parameter transformations to convert to uppercase,
1093 convert first character to uppercase, and convert to lowercase,
1094 respectively.
1095
1096ee. PROMPT_COMMAND: can now be an array variable, each element of which can
1097 contain a command to be executed like a string PROMPT_COMMAND variable.
1098
1099ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource.
1100
1101gg. Associative arrays may be assigned using a list of key-value pairs within
1102 a compound assignment. Compound assignments where the words are not of
1103 the form [key]=value are assumed to be key-value assignments. A missing or
1104 empty key is an error; a missing value is treated as NULL. Assignments may
1105 not mix the two forms.
1106
1107hh. New `K' parameter transformation to display associative arrays as key-
1108 value pairs.
1109
1110ii. Writing history to syslog now handles messages longer than the syslog max
1111 length by writing multiple messages with a sequence number.
1112
1113jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since
1114 they are nominally integer variables. LINENO is not an integer variable.
1115
1116kk. Bash temporarily suppresses the verbose option when running the DEBUG trap
1117 while running a command from the `fc' builtin.
1118
1119ll. `wait -n' now accepts a list of job specifications as arguments and will
1120 wait for the first one in the list to change state.
1121
1122mm. The associative array implementation can now dynamically increase the
1123 size of the hash table based on insertion patterns.
1124
1125nn. HISTFILE is now readonly in a restricted shell.
1126
1127oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit
1128 systems.
1129
11304. New Features in Readline
1131
1132a. If a second consecutive completion attempt produces matches where the first
1133 did not, treat it as a new completion attempt and insert a match as
1134 appropriate.
1135
1136b. Bracketed paste mode works in more places: incremental search strings, vi
1137 overstrike mode, character search, and reading numeric arguments.
1138
1139c. Readline automatically switches to horizontal scrolling if the terminal has
1140 only one line.
1141
1142d. Unbinding all key sequences bound to a particular readline function now
1143 descends into keymaps for multi-key sequences.
1144
1145e. rl-clear-display: new bindable command that clears the screen and, if
1146 possible, the scrollback buffer (bound to emacs mode M-C-l by default).
1147
1148f. New active mark and face feature: when enabled, it will highlight the text
1149 inserted by a bracketed paste (the `active region') and the text found by
1150 incremental and non-incremental history searches. This is tied to bracketed
1151 paste and can be disabled by turning off bracketed paste.
1152
1153g. Readline sets the mark in several additional commands.
1154
1155h. Bracketed paste mode is enabled by default.
1156
1157i. Readline tries to take advantage of the more regular structure of UTF-8
1158 characters to identify the beginning and end of characters when moving
1159 through the line buffer.
1160
1161j. The bindable operate-and-get-next command (and its default bindings) are
1162 now part of readline instead of a bash-specific addition.
1163
1164------------------------------------------------------------------------------
d233b485
CR
1165This document details the changes between this version, bash-5.0-release, and
1166the previous version, bash-5.0-rc1.
1167
11681. Changes to Bash
1169
1170a. Tilde expansion isn't performed on indexed array subscripts, even for
1171 backwards compatibility.
1172
1173b. The shell doesn't exit in posix mode if the eval builtin gets a parse
1174 error when run by the command builtin.
1175
1176c. Fixed a bug that caused a shell comment in an alias to not find the end
1177 of the alias properly.
1178
1179d. Reverted a change from April, 2018 that caused strings containing
1180 backslashes to be flagged as glob patterns.
1181
11822. Changes to Readline
1183
11843. New Features in Bash
1185
11864. New Features in Readline
1187
1188------------------------------------------------------------------------------
1189This document details the changes between this version, bash-5.0-rc1, and
1190the previous version, bash-5.0-beta2.
1191
11921. Changes to Bash
1193
1194a. Fix to initial word completion detection code.
1195
1196b. Fixed a bug that caused issues with assignment statements containing ^A in
1197 the value assigned when IFS contains ^A.
1198
1199c. Added a fallback to fnmatch() when strcoll can't correctly deal with
1200 bracket expression character equivalence classes.
1201
1202d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command
1203 when running a trap handler containing [[ or (( commands.
1204
1205e. Fixed a bug that caused nameref assignments in the temporary environment
1206 to potentially create variables with invalid names.
1207
1208f. Fixed a bug that caused `local -' to turn off alias expansion in scripts.
1209
1210g. Fixed a parser issue with a command string containing EOF after an invalid
1211 command as an argument to a special builtin not causing a posix-mode shell
1212 to exit.
1213
1214h. Made a slight change to the FNV-1 string hash algorithm used for associative
1215 arrays (corrected the initial seed).
1216
12172. Changes to Readline
1218
12193. New Features in Bash
1220
1221a. The `select' command now supports command forms without a word list
1222 following `in'.
1223
12244. New Features in Readline
1225
1226------------------------------------------------------------------------------
1227This document details the changes between this version, bash-5.0-beta2, and
1228the previous version, bash-5.0-beta.
1229
12301. Changes to Bash
1231
1232a. Fixed a bug that could cause a seg fault while parsing a subshell command
1233 inside a command substitution.
1234
1235b. Fixed several small memory leaks uncovered by coverity.
1236
1237c. Fixed a problem with command substitution inside an interactive shell that
1238 could cause the parent to receive a SIGHUP.
1239
1240d. Fixed a problem with using `*' and `@' as subscripts when assigning values
1241 to an associative array with assoc_expand_once enabled.
1242
1243e. Fixed a bug that could cause a huge memory allocation when completing a
1244 word beginning with an invalid tilde expansion.
1245
8868edaf 1246f. Cleaned up some incompatibilities with bash-4.4 when expanding indexed array
d233b485
CR
1247 subscripts used in arithmetic expansions when assoc_expand_once is enabled.
1248
1249g. The ${parameter@a} expansion will display attributes even if `parameter' is
1250 unset.
1251
1252h. Fixed a bug that caused the output of `set' to cut off some variables before
1253 printing the value.
1254
1255i. Treat a failure to assign a variable when using the ${x:=value} expansion
1256 as an expansion error, so non-interactive posix-mode shells exit
1257
1258j. Fixed a problem when expanding $* in a context where word splitting is not
1259 performed when IFS is NULL.
1260
1261k. Temp files used to store here documents are forced readable, no matter what
1262 the user's umask says.
1263
1264l. Fixed a problem where an interrupted brace expansion could cause the shell
1265 to attempt to free an invalid memory location.
1266
1267m. Make sure to check for any terminating signals after running a trap
1268 handler; don't wait until the next time we process traps.
1269
1270n. Fixed a bug that caused "return" to act like a special builtin with respect
1271 to variable assignments even when preceded by "command".
1272
1273o. POSIX-mode shells now return failure if the cd builtin fails due to the
1274 absolute directory name being longer than PATH_MAX, instead of trying
1275 again with a relative pathname.
1276
1277p. Fixed a problem with FUNCNAME occasionally being visible when not executing
1278 a shell function.
1279
1280q. Fixed a problem with the expansions performed on the WORD in the case
1281 command.
1282
1283r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during
1284 word splitting and the read builtin.
1285
1286s. Fixed a problem with expanding an array with subscript `*' when all the
1287 elements expand to the empty string, and making sure the expansion honors
1288 the `:' specifier.
1289
12902. Changes to Readline
1291
1292a. Fixed a bug with adding multibyte characters to an incremental search string.
1293
1294b. Fixed a bug with redoing text insertions in vi mode.
1295
1296c. Fixed a bug with pasting text into an incremental search string if bracketed
1297 paste mode is enabled. ESC cannot be one of the incremental search
1298 terminator characters for this to work.
1299
1300d. Fixed a bug with anchored search patterns when performing searches in vi
1301 mode.
1302
13033. New Features in Bash
1304
1305a. Associative and indexed arrays now allow subscripts consisting solely of
1306 whitespace.
1307
1308b. `checkwinsize' is now enabled by default.
1309
1310c. The `localvar_unset' shopt option is now visible and documented.
1311
1312d. The `progcomp_alias' shopt option is now visible and documented.
1313
1314e. The signal name processing code now understands `SIGRTMIN+n' all the way
1315 up to SIGRTMAX.
1316
1317f. There is a new `seq' loadable builtin.
1318
1319g. Trap execution now honors the (internal) max invocations of `eval', since
1320 traps are supposed to be executed as if using `eval'.
1321
1322h. The $_ variable doesn't change when the shell executes a command that forks.
1323
1324i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though
1325 conforming applications aren't supposed to use them.
1326
1327j. POSIX mode now enables the `shift_verbose' option.
1328
13294. New Features in Readline
1330
1331a. Readline now allows application-defined keymap names; there is a new public
1332 function, rl_set_keymap_name(), to do that.
1333
1334b. The "Insert" keypad key, if available, now puts readline into overwrite
1335 mode.
1336
1337------------------------------------------------------------------------------
1338This document details the changes between this version, bash-5.0-beta, and
1339the previous version, bash-5.0-alpha.
1340
13411. Changes to Bash
1342
1343a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this
1344 is where POSIX says the subshell is not "enclosed" by the loop.
1345
1346b. Added more UTF-8-specific versions of multibyte functions, and optimized
1347 existing functions if the current locale uses UTF-8 encoding.
1348
1349c. In POSIX mode, assignments preceding regular builtins should not persist
1350 when the builtin completes.
1351
1352d. Added additional checks to special array assignment (e.g., BASH_ALIASES)
1353 so it can't be used to bypass validity checks performed in other places.
1354
1355e. The `!!' history expansion now refers to the previous history entry as
1356 expected, even if used on the second or subsequent line of a multi-line
1357 history entry.
1358
1359f. Fixed a bug that could cause the shell to dereference a NULL pointer if
1360 the environment (`environ') is set to NULL.
1361
1362g. Bash uses slightly better integer overflow handling for brace sequence
1363 expansion on systems where ints are 32 bits and intmax_t is 64 bits.
1364
1365h. Fixed a bug setting attributes for a variable named as an argument to
1366 `declare' that also appears as a nameref in the temporary environment.
1367
1368i. Fixed several bugs that could cause assignments to namerefs to create
1369 variables with invalid names.
1370
1371j. Fixed a bug that could result in the SIGINT handler being set incorrectly
1372 in asynchronous subshells.
1373
1374k. Fixed a bug that could cause `bash -t' to not execute the specified command.
1375
1376l. Fixed several bugs that caused the shell to operate on the wrong variable
1377 when using namerefs with the same name as a global variable in shell
1378 functions.
1379
1380m. Internal changes to how the shell handles variables with invalid names in
1381 the initial environment and to prevent variables with invalid names from
1382 being added to the environment instead of passing them on to children.
1383
1384n. Changes to make sure that an expansion that results in a quoted null string
1385 is reflected in the expansion, even if the word expands to nothing.
1386
1387o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand
1388 the same way after the recent changes for POSIX interpretation 888.
1389
1390p. Saving and restoring the positional parameters at function entry and exit
1391 is considerably more efficient; noticeably so when there are large numbers
1392 of positional parameters.
1393
1394q. Fixed a bug that caused `lastpipe' and `pipefail' to return an incorrect
1395 status for the pipeline if there was more than one external command in a
1396 loop body appearing in the last pipeline element.
1397
1398r. Fixed a bug that caused value conversion errors with the printf builtin's
1399 %u and %f conversion specifications and invalid constants.
1400
14012. Changes to Readline
1402
1403a. Added more UTF-8-specific versions of multibyte functions, and optimized
1404 existing functions if the current locale uses UTF-8 encoding.
1405
1406b. Fixed a problem with bracketed-paste inserting more than one character and
1407 interacting with other readline functions.
1408
1409c. Fixed a bug that caused the history library to attempt to append a history
1410 line to a non-existent history entry.
1411
1412d. If using bracketed paste mode, output a newline after the \r that is the
1413 last character of the mode disable string to avoid overwriting output.
1414
1415e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better
1416 handle multibyte characters.
1417
1418f. Fixed a redisplay problem that caused an extra newline to be generated on
1419 accept-line when the line length is exactly the screenwidth.
1420
14213. New Features in Bash
1422
1423a. Bash no longer allows variable assignments preceding a special builtin that
1424 changes variable attributes to propagate back to the calling environment
1425 unless the compatibility level is 44 or lower.
1426
1427b. You can set the default value for $HISTSIZE at build time in config-top.h.
1428
1429c. The `complete' builtin now accepts a -I option that applies the completion
1430 to the initial word on the line.
1431
1432d. The internal bash malloc now uses mmap (if available) to satisfy requests
1433 greater than 128K bytes, so free can use mfree to return the pages to the
1434 kernel.
1435
1436e. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup
1437 unless it's in debugging mode, as the documentation has always said, but
1438 will dynamically create them if a script references them at the top level
1439 without having enabled debugging mode.
1440
1441f. The localvar_inherit option will not attempt to inherit a value from a
1442 variable of an incompatible type (indexed vs. associative arrays, for
1443 example).
1444
1445g. The `globasciiranges' option is now enabled by default; it can be set to
1446 off by default at configuration time.
1447
14484. New Features in Readline
1449
1450a. The history expansion library now understands command and process
1451 substitution and extended globbing and allows them to appear anywhere in a
1452 word.
1453
1454b. The history library has a new variable that allows applications to set the
1455 initial quoting state, so quoting state can be inherited from a previous
1456 line.
1457
1458------------------------------------------------------------------------------
1459This document details the changes between this version, bash-5.0-alpha, and
1460the previous version, bash-4.4-release.
1461
14621. Changes to Bash
1463
1464a. Fixed a bug that could cause traps in background jobs to give the terminal
1465 to the wrong process group.
1466
1467b. Fixed a bug that caused `kill -l 0' to print an out-of-range error.
1468
1469c. Fixed a problem that could result in here-documents being displayed in
1470 the wrong order.
1471
1472d. Fixed a number of out-of-bounds and free memory read errors found via
1473 fuzzing.
1474
1475e. Fixed a subshell inheritance problem that could cause a subshell to wait for
1476 the wrong process.
1477
1478f. Fixed a bug that caused SHLVL to be incremented one too many times when
1479 creating subshells.
1480
1481g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with
1482 job control enabled.
1483
1484h. Fixed a spurious warning about unterminated ${ or $( constructs during
1485 word completion.
1486
1487i. The shell no longer runs traps if a signal arrives while reading command
1488 substitution output.
1489
1490j. Fixed an arithmetic expansion error that could allow ++var++ as valid
1491 syntax.
1492
1493k. Fixed an error that allowed out-of-bounds references to the directory stack.
1494
1495l. The shell does a better job of saving multi-line history entries with
1496 embedded comments.
1497
1498m. Fixed a bug that could cause quoted bracket expressions in regular expression
1499 arguments to `[[' to not match correctly.
1500
1501n. Fixed a bug that could cause an IFS character in a word to result in an
1502 extra '\001' character in the expansion.
1503
1504o. A trailing backslash in a glob pattern can match a trailing backslash in the
1505 string.
1506
1507p. Fixed a memory leak in the process creation code path when job control is
1508 enabled.
1509
1510q. Fixed a bug that caused `printf' to output broken surrogate pairs for
1511 Japanese locales.
1512
1513r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to
1514 kill an interactive shell.
1515
1516s. Fixed a bug that could cause the `read' builtin to not fully read a
1517 multibyte character.
1518
1519t. Fixed a bug that could cause identifiers to be evaluated in conditional
1520 arithmetic expressions even when evaluation is suppressed.
1521
1522u. Fixed a bug that could result in command substitution, when executed in a
1523 context where word splitting is not performed, to leave a stray '\001'
1524 character in the string.
1525
1526v. Fixed a bug that could cause history expansion to be disabled in a non-
1527 interactive shell even if `-o histexpand' is supplied at startup.
1528
1529w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters.
1530
1531x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions.
1532
1533y. If indirect expansion attempts to indirectly reference through an unset
1534 variable, report an error.
1535
1536z. Added a guard to prevent the shell from looping while receiving an endless
1537 stream of SIGTTIN at shell startup.
1538
1539aa. Fixed a bug with parsing here documents inside a command substitution when
1540 looking for the closing delimiter.
1541
1542bb. Fixed a bug that caused printf to not quote all <blank> characters in the
1543 current locale when using the `%q' format specifier.
1544
1545cc. Fixed a bug with bash's internal buffered I/O system that caused the input
1546 pointer to not be reset when read(2) returned an EOF.
1547
1548dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will
1549 not interrupt open/read/write system calls.
1550
1551ee. The ERR trap now reports line numbers more reliably.
1552
1553ff. The shell no longer tries to manipulate the terminal process group if a
1554 command or process substitution is killed by SIGTERM when job control is
1555 enabled.
1556
1557gg. Fixed a bug that caused extglob patterns to match filenames beginning with
1558 a period.
1559
1560hh. File descriptors open for writing to here documents are no longer available
1561 to subshells.
1562
1563ii. Make sure word completion doesn't perform command or process substitution.
1564
1565jj. Fixed a bug with parsing $$'...' inside a command substitution.
1566
1567kk. Fixed a bug that caused bash to remove backslash-newline pairs from the
1568 body of a here-document with a quoted delimiter inside a command
1569 substitution.
1570
1571ll. Fixed a bug that could cause the shell to hang when adding a pid to the
1572 table of background process exit statuses.
1573
1574mm. Fixed a bug that could cause 0x01 characters to be doubled in the output
1575 of process substitution.
1576
1577nn. Restricted shells now clear the hash table before making the PATH variable
1578 read-only.
1579
1580oo. There are a number of changes to the expansion of $* and $@ in contexts
1581 where word splitting does not occur (quoted and unquoted), with IFS set
1582 to NULL or a non-standard value, mostly to deal with the consequences of
1583 the behavior defined in Posix interpretation 888.
1584
1585pp. There are a number of changes to nameref variable handling to avoid
1586 creating variables with invalid names.
1587
1588qq. A non-interactive posix mode shell no longer exits when an assignment
1589 statement fails if the assignment is utimately being performed by the
1590 `command' builtin.
1591
1592rr. When using character class names for globbing, don't allow case
1593 insensitivity, even if nocaseglob is enabled.
1594
1595ss. Fixed a bug that allowed some redirections to stay in place if a later
1596 redirection failed.
1597
1598tt. Fixed a bug in how command and process substitutions are recognized within
1599 other parameter expansions.
1600
1601uu. Fixed a bug that caused bash to loop under certain circumstances when
1602 performing arithmetic expansion on a variable whose value is an invalid
1603 expression.
1604
1605vv. Fixed a bug that could cause bash to expand aliases inappropriately while
1606 parsing compound commands like `case'.
1607
1608ww. Fixed a bug that could cause `read -N' to fail to read complete multibyte
1609 characters, even when the sequences are incomplete or invalid, with or
1610 without readline.
1611
1612xx. Fixed a bug that could cause `case' to fail to match patterns containing
1613 0x01 characters.
1614
1615yy. Fixed a bug that caused exported functions to contain stray 0x01 characters.
1616
1617zz. Fixed some inconsistencies with how the history number is handled in the
1618 various prompt strings.
1619
1620aaa. Fixed a bug that could cause a core dump if READLINE_LINE was unset
1621 inside a shell function bound to a key sequence with `bind -x'.
1622
1623bbb. Fixed a bug that could cause bash to not read a token terminator correctly
1624 if a command substitution was used inside an arithmetic `for' command.
1625
1626ccc. Fixed problems that could occur with a fatal arithmetic expansion error
1627 in a context (like prompt expansion) where you can't jump back to the
1628 top level.
1629
1630ddd. Expression errors in arithmetic `for' commands are treated more like
1631 shell syntax errors.
1632
1633eee. Fixed a parser synchronization error resulting from a syntax error
1634 followed immediately by an EOF.
1635
1636fff. When executing a shell function, the first line in the function ($LINENO)
1637 is line 1 instead of line 0, as Posix requires.
1638
1639ggg. In Posix mode, bash will canonicalize the value of PWD it inherits from
1640 the environment and use that to set its idea of the current directory.
1641
1642hhh. If LINENO is exported, bash needs to regenerate its value each time it
1643 constructs the environment.
1644
1645iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'.
1646
1647jjj. Make sure the `coproc' command returns an appropriate status if the NAME
1648 argument is invalid.
1649
1650kkk. Fixed a problem with arithmetic expressions containing array references
1651 that contain arithmetic expressions with syntax errors.
1652
1653lll. The `select' command and help builtin will use $COLUMNS before the window
1654 size returned from the kernel as the terminal width.
1655
1656mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to
1657 detect file descriptor errors.
1658
1659nnn. The `read' builtin now does a better job of acting on signals that don't
1660 interrupt read(2).
1661
1662ooo. Fixed some cases where `printf -v' did not return failure status on a
1663 variable assignment error.
1664
1665ppp. Fixed temporary environment propagation back to the current environment
1666 so that it doesn't happen for special builtins run by the `command'
1667 builtin.
1668
1669qqq. Fixed a bug when searching for the end of a here-document delimiter in a
1670 command substitution.
1671
1672rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail.
1673
1674sss. Fixed a bug that could cause reserved words to not be recognized in a
1675 for statement without the `in' inside a command substitution.
1676
1677ttt. Fixed a bug that could cause a double-free in a timed command with an
1678 expansion error.
1679
1680uuu. Fixed a bug that could cause a core dump if a script switches from a UTF-8
1681 locale to a different locale after displaying a lone surrogate character.
1682
1683vvv. Fixed cases where bash prematurely removed FIFOs attached to process
1684 substitutions.
1685
1686www. Fixed a problem with calculating the size of the table that stores exit
1687 statuses from background processes when the child process resource limit
1688 is very large.
1689
1690xxx. Fixed a memory leak with functions using `return' when using FIFOs for
1691 standard input.
1692
1693yyy. `wait' without arguments attempts to wait for all active process
1694 substitution processes.
1695
1696zzz. Fixed a bug where an indirect parameter was subjected to word splitting
1697 when trying to find the indirected variable name.
1698
1699aaaa. Fixed a bug that could allow restricted shell users to add commands to
1700 the hash table.
1701
1702bbbb. When using the `!(patlist)' extended globbing operator, a filename
1703 beginning with a `.' that doesn't match any of the patterns is not
1704 returned as a match if leading dots must be matched explicitly.
1705
1706cccc. Fixed a bug that could cause line number and source file information for
1707 a function definition to be incorrect if there are multiple definitions.
1708
1709dddd. Fixed a bug that could cause builtins like `readonly' to behave
1710 differently when applied to arrays and scalar variables within functions.
1711
1712eeee. Fixed a bug that could cause alias expansion to add an extra space to
1713 a quoted string that begins outside the alias expansion.
1714
1715ffff. Fixed a bug that could result in unwanted alias expansion after timing
1716 the null command.
1717
1718gggg. Fixed a bug that could cause a core dump if a timestamp in a history
1719 file overflowed a time_t.
1720
1721hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since
1722 the kernel calls make those file descriptors read-write.
1723
1724iiii. Fixed a problem with splitting double-quoted words for programmable
1725 completion when the double quote immediately follows another word
1726 delimiter.
1727
1728jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share
1729 the same input buffer.
1730
1731kkkk. The error message resulting from ${x:?} and ${x?} now differs depending
1732 on whether the variable is null or unset.
1733
1734llll. In Posix mode, the shell exits if a variable assignment fails and precedes
1735 an empty simple command (after expansion).
1736
1737mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to
1738 drop characters.
1739
1740nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal
1741 due to Linux pid namespace peculiarities.
1742
1743oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for
1744 `bind -x' commands.
1745
1746pppp. Fixed a bug that could cause SIGINT recursion when running an external
1747 command in a trap the shell takes after a command exits due to SIGINT.
1748
1749qqqq. Make sure the shell turns off job control before running the command-
1750 not-found handle, so the command doesn't try to manipulate process
1751 groups.
1752
1753rrrr. Fixed a problem with timing process substitutions that caused the shell
1754 to print timing information for the calling command.
1755
1756ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark
1757 the delimiter as quoted (inhibiting expansion of the here-document
1758 contents).
1759
1760tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and
1761 conditional command pattern matches.
1762
1763uuuu. Fixed a bug that could cause the pattern matching engine to not recognize
1764 locale-specific character classes.
1765
1766vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently.
1767
1768wwww. The `globstar' code now skips over symbolic links to directories,
1769 preventing them from being scanned twice.
1770
1771xxxx. When running `bind -x' commands, bash now sets READLINE_POINT based on
1772 the number of characters in the readline line buffer, not the number of
1773 bytes.
1774
1775yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN
1776 trap when using `eval return'.
1777
1778zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document.
1779
1780aaaaa. The process substitution code now closes and unlinks FIFOs when the
1781 process on the other side exits, in order to prevent SIGPIPE or
1782 waiting until a FIFO opened for read has a writer.
1783
1784bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in
1785 an {id}>foo construct.
1786
1787ccccc. After a Posix discussion, the pattern matching engine just skips over
1788 invalid character classes in bracket expressions, instead of matching
1789 them like individual characters in the expression.
1790
1791ddddd. Fixed a posix-mode problem with variable scoping when creating variables
1792 from assignment statements preceding special builtins.
1793
1794eeeee. Fixed a bug that could cause patterns containing backslashes to not be
1795 run through the pattern matching engine.
1796
1797fffff. Fixed a bug that could cause redirections to compound commands to not
1798 be `undone' if the file descriptor in the redirection was closed when
1799 the redirection was initially processed.
1800
1801ggggg. Fixed a bug that could cause buffer corruption when using `bind -x' in
1802 a command execute as a result of a key binding installed by `bind -x'.
1803
18042. Changes to Readline
1805
1806a. Added a guard to prevent nested macros from causing an infinite expansion
1807 loop.
1808
1809b. Instead of allocating enough history list entries to hold the maximum list
1810 size, cap the number allocated initially.
1811
1812c. Added a strategy to avoid allocating huge amounts of memory if a block of
1813 history entries without timestamps occurs after a block with timestamps.
1814
1815d. Added support for keyboard timeouts when an ESC character is the last
1816 character in a macro.
1817
1818e. There are several performance improvements when in a UTF-8 locale.
1819
1820f. Readline does a better job of preserving the original set of blocked
1821 signals when using pselect() to wait for input.
1822
1823g. Fixed a bug that caused multibyte characters in macros to be mishandled.
1824
1825h. Fixed several bugs in the code that calculates line breaks when expanding
1826 prompts that span several lines, contain multibyte characters, and contain
1827 invisible character seqeuences.
1828
1829i. Fixed several bugs in cursor positioning when displaying lines with prompts
1830 containing invisible characters and multibyte characters.
1831
1832j. When performing case-insensitive completion, Readline no longer sorts the
1833 list of matches unless directed to do so.
1834
1835k. Fixed a problem with key sequences ending with a backslash.
1836
1837l. Fixed out-of-bounds and free memory read errors found via fuzzing.
1838
1839m. Fixed several cases where the mark was set to an invalid value.
1840
1841n. Fixed a problem with the case-changing operators in the case where the
1842 lower and upper case versions of a character do not have the same number
1843 of bytes.
1844
1845o. Handle incremental and non-incremental search character reads returning EOF.
1846
1847p. Handle the case where a failing readline command at the end of a multi-key
1848 sequence could be misinterpreted.
1849
1850q. The history library now prints a meaningful error message if the history
1851 file isn't a regular file.
1852
1853r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace
1854 a multibyte character.
1855
1856s. The key binding code now attempts to remove a keymap if a key unbinding
1857 leaves it empty.
1858
1859t. Fixed a line-wrapping issue that caused problems for some terminal
1860 emulators.
1861
1862u. If there is a key bound to the tty's VDISCARD special character, readline
1863 disables VDISCARD while it is active.
1864
1865v. Fixed a problem with exiting bracketed paste mode on terminals that assume
1866 the bracketed paste mode character sequence contains visible characters.
1867
1868w. Fixed a bug that could cause a key binding command to refer to an
1869 uninitialized variable.
1870
18713. New Features in Bash
1872
1873a. The `wait' builtin can now wait for the last process substitution created.
1874
1875b. There is an EPOCHSECONDS variable, which expands to the time in seconds
1876 since the Unix epoch.
1877
1878c. There is an EPOCHREALTIME variable, which expands to the time in seconds
1879 since the Unix epoch with microsecond granularity.
1880
1881d. New loadable builtins: rm, stat, fdflags.
1882
1883e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment.
1884
1885f. When supplied a numeric argument, the shell-expand-line bindable readline
1886 command does not perform quote removal and suppresses command and process
1887 substitution.
1888
1889g. `history -d' understands negative arguments: negative arguments offset from
1890 the end of the history list.
1891
1892h. The `name' argument to the `coproc' reserved word now undergoes word
1893 expansion, so unique coprocs can be created in loops.
1894
1895i. A nameref name resolution loop in a function now resolves to a variable by
1896 that name in the global scope.
1897
8868edaf 1898j. The `wait' builtin now has a `-f' option, which signifies to wait until the
d233b485
CR
1899 specified job or process terminates, instead of waiting until it changes
1900 state.
1901
1902k. There is a define in config-top.h that allows the shell to use a static
1903 value for $PATH, overriding whatever is in the environment at startup, for
1904 use by the restricted shell.
1905
1906l. Process substitution does not inherit the `v' option, like command
1907 substitution.
1908
1909m. If a non-interactive shell with job control enabled detects that a foreground
1910 job died due to SIGINT, it acts as if it received the SIGINT.
1911
1912n. The SIGCHLD trap is run once for each exiting child process even if job
1913 control is not enabled when the shell is in Posix mode.
1914
1915o. A new shopt option: localvar_inherit; if set, a local variable inherits the
1916 value of a variable with the same name at the nearest preceding scope.
1917
1918p. `bind -r' now checks whether a key sequence is bound before binding it to
1919 NULL, to avoid creating keymaps for a multi-key sequence.
1920
1921q. A numeric argument to the line editing `operate-and-get-next' command
1922 specifies which history entry to use.
1923
1924r. The positional parameters are now assigned before running the shell startup
1925 files, so startup files can use $@.
1926
1927s. There is a compile-time option that forces the shell to disable the check
1928 for an inherited OLDPWD being a directory.
1929
1930t. The `history' builtin can now delete ranges of history entries using
1931 `-d start-end'.
1932
1933u. The `vi-edit-and-execute-command' bindable readline command now puts readline
1934 back in vi insertion mode after executing commands from the edited file.
1935
1936v. The command completion code now matches aliases and shell function names
1937 case-insensitively if the readline completion-ignore-case variable is set.
1938
1939w. There is a new `assoc_expand_once' shell option that attempts to expand
1940 associative array subscripts only once.
1941
1942x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended
1943 debugging mode is active. The old behavior of unconditionally setting them
1944 is available as part of the shell compatibility options.
1945
1946y. The `umask' builtin now allows modes and masks greater than octal 777.
1947
1948z. The `times' builtin now honors the current locale when printing a decimal
1949 point.
1950
1951aa. There is a new (disabled by default, undocumented) shell option to enable
1952 and disable sending history to syslog at runtime.
1953
19544. New Features in Readline
1955
1956a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
1957 Posix specifies (uses fnmatch(3) if available).
1958
1959b. There are new `next-screen-line' and `previous-screen-line' bindable
1960 commands, which move the cursor to the same column in the next, or previous,
1961 physical line, respectively.
1962
1963c. There are default key bindings for control-arrow-key key combinations.
1964
1965d. A negative argument (-N) to `quoted-insert' means to insert the next N
1966 characters using quoted-insert.
1967
1968e. New public function: rl_check_signals(), which allows applications to
1969 respond to signals that readline catches while waiting for input using
1970 a custom read function.
1971
1972f. There is new support for conditionally testing the readline version in an
1973 inputrc file, with a full set of arithmetic comparison operators available.
1974
1975g. There is a simple variable comparison facility available for use within an
1976 inputrc file. Allowable operators are equality and inequality; string
1977 variables may be compared to a value; boolean variables must be compared to
1978 either `on' or `off'; variable names are separated from the operator by
1979 whitespace.
1980
1981------------------------------------------------------------------------------
a0c0a00f
CR
1982This document details the changes between this version, bash-4.4-release, and
1983the previous version, bash-4.4-rc2.
1984
19851. Changes to Bash
1986
1987a. Fixed a bug that could potentially result in a crash due to an integer
1988 overflow.
1989
1990b. Fixed a bug in where commands printed due to `set -x' could be incorrectly
1991 quoted if being printed in contexts where they haven't yet been expanded.
1992
1993c. Fixed several memory leaks.
1994
1995d. Fixed a bug that could potentially cause the terminal attributes to be
1996 set incorrectly by a command run from a programmable completion.
1997
1998e. Fixed several potential buffer overflow issues in the word expansion code.
1999
20002. Changes to Readline
2001
20023. New Features in Bash
2003
20044. New Features in Readline
a0c0a00f
CR
2005------------------------------------------------------------------------------
2006This document details the changes between this version, bash-4.4-rc2, and
2007the previous version, bash-4.4-beta2.
2008
20091. Changes to Bash
2010
2011a. Fixed an out-of-bounds read in the redirection operator completion code.
2012
2013b. Fixed execution context so `until continue' doesn't disable execution for
2014 subsequent commands.
2015
2016c. Fixed trap handling code so traps don't inherit a command's temporary
2017 environment.
2018
2019d. Fixed a bug that resulted in incorrect line numbers when a function is
2020 defined as part of another function's execution.
2021
2022e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting
2023 is not performed and $IFS is not the default.
2024
2025f. Fixed a bug that caused ''"$@" to not expand to an empty argument when
2026 there are no positional parameters.
2027
2028g. Fixed a bug that caused a shell compiled without job control to use the
2029 incorrect exit status for builtin commands preceded by a command executed
2030 from the file system that causes the shell to call waitpid().
2031
2032h. Improved word completion for quoted strings containing unterminated command
2033 substitutions with embedded double quotes.
2034
20352. Changes to Readline
2036
2037a. Fixed a bug that caused mode strings to be displayed incorrectly if the
2038 prompt was shorter than the mode string.
2039
20403. New Features in Bash
2041
2042a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
2043 the nounset option is enabled no longer throws an unbound variable error.
2044
20454. New Features in Readline
2046
2047a. New application-callable function: rl_pending_signal(): returns the signal
2048 number of any signal readline has caught but not yet handled.
2049
2050b. New application-settable variable: rl_persistent_signal_handlers: if set
2051 to a non-zero value, readline will enable the readline-6.2 signal handler
2052 behavior in callback mode: handlers are installed when
2053 rl_callback_handler_install is called and removed removed when a complete
2054 line has been read.
2055
2056------------------------------------------------------------------------------
2057This document details the changes between this version, bash-4.4-beta2, and
2058the previous version, bash-4.4-rc1.
2059
20601. Changes to Bash
2061
2062a. Fixed a memory leak when processing ${!var[@]}.
2063
2064b. Fixed a bug that caused subshells to free trap strings associated with
2065 inherited signals.
2066
2067c. Inheriting BASHOPTS from the environment now works to force actions
2068 associated with enabling an option, instead of just marking the option
2069 as enabled.
2070
2071d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
2072 restricted mode.
2073
2074e. Fixed a bug caused by an accidental omission of part of the original patch
2075 for EXECIGNORE.
2076
2077e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
2078
2079f. Fixed a bug that caused parsing errors in command substitutions with
2080 consecutive case statements separated by newlines.
2081
2082g. Updated logic used to decide whether bash is running inside an emacs
2083 terminal emulator to work with future emacs versions.
2084
2085h. Fixed two extended pattern matching bugs caused by premature short-
2086 circuiting.
2087
2088i. Fixed a memory leak in the code that removes duplicate history entries.
2089
2090j. There are a number of bug fixes to coproc, mapfile, declare, unset,
2091 and assignment statements that prevent nameref variables from creating
2092 and unsetting variables with invalid names.
2093
2094k. Fixed a bug that caused variables to be inadvertently marked as both an
2095 associative and an indexed array.
2096
2097l. Fixed a bug that caused `bash -c' to not run a trap specified in the
2098 command string.
2099
2100j. There are a number of bug fixes to coproc, mapfile, declare, and assignment
2101 statements that prevent nameref variables from overwriting or modifying
2102 attributes of readonly variables.
2103
2104k. Fixed a bug that caused command substitution to attempt to set the
2105 terminal's process group incorrectly.
2106
2107l. Fixed a bug that could cause prompt string expansion to display error
2108 messages when the `nounset' shell option is set.
2109
2110m. Fixed a bug that caused "$@" to not expand to an empty string under the
2111 circumstances when Posix says it should ("${@-${@-$@}}").
2112
2113n. Fixed several bugs caused by referencing nameref variables whose values
2114 are names of unset variables (or names that are valid for referencing
2115 but not assignment), including creating variables in the temporary
2116 environment.
2117
2118o. Function tracing and error tracing are disabled if --debugger is supplied
2119 at startup but the shell can't find the debugger start file.
2120
2121p. Fixed a bug when IFS is used as the control variable in a for statement.
2122
2123q. Fixed a bug with SIGINT received by a command substitution in an interactive
2124 shell.
2125
2126r. The checks for nameref variable self-references are more thorough.
2127
2128s. Fixed several bugs with multi-line aliases.
2129
2130t. Fixed `test' to handle the four-argument case where $1 == '(' and
2131 $4 == ')'.
2132
2133u. Fixed a bug in the expansion of $* in the cases where word splitting is
2134 not performed.
2135
2136v. Fixed a bug in execution of case statements where IFS includes the
2137 pattern matching characters.
2138
21392. Changes to Readline
2140
2141a. When refreshing the line as the result of a key sequence, Readline attempts
2142 to redraw only the last line of a multiline prompt.
2143
2144b. Fixed an issue that caused completion of git commands to display
2145 incorrectly when using colored-completion-prefix.
2146
2147c. Fixed several redisplay bugs having to do with multibyte characters and
2148 invisible characters in prompt strings.
2149
21503. New Features in Bash
2151
2152a. Value conversions (arithmetic expansions, case modification, etc.) now
2153 happen when assigning elements of an array using compound assignment.
2154
2155b. There is a new option settable in config-top.h that makes multiple
2156 directory arguments to `cd' a fatal error.
2157
2158c. Bash now uses mktemp() when creating internal temporary files; it produces
2159 a warning at build time on many Linux systems.
2160
21614. New Features in Readline
2162
2163a. The default binding for ^W in vi mode now uses word boundaries specified
2164 by Posix (vi-unix-word-rubout is bindable command name).
2165
2166b. rl_clear_visible_line: new application-callable function; clears all
2167 screen lines occupied by the current visible readline line.
2168
2169c. rl_tty_set_echoing: application-callable function that controls whether
2170 or not readline thinks it is echoing terminal output.
2171
2172d. Handle >| and strings of digits preceding and following redirection
2173 specifications as single tokens when tokenizing the line for history
2174 expansion.
2175
2176e. Fixed a bug with displaying completions when the prefix display length
2177 is greater than the length of the completions to be displayed.
2178
2179f. The :p history modifier now applies to the entire line, so any expansion
2180 specifying :p causes the line to be printed instead of expanded.
2181
2182------------------------------------------------------------------------------
2183This document details the changes between this version, bash-4.4-rc1, and
2184the previous version, bash-4.4-beta.
2185
21861. Changes to Bash
2187
2188a. Fixed several problems with bash completion not special-casing bash syntax
2189 constructs.
2190
2191b. Fixed a bug that caused the mapfile builtin to not create array variables
2192 when a variable of the same name appears in the temporary environment.
2193
2194c. Fixed a bug that caused prompt expansion to loop when PS1 contained a
2195 syntax error.
2196
2197d. Fixed a bug that caused the ${array[@]@A} expansion to split the results
2198 even when double-quoted.
2199
2200e. There is a new implementation of the code that saves the last CHILD_MAX
2201 exited background pids so their status can be queried later.
2202
2203f. Bash-4.4 can now be configured and built on very old versions of Solaris 2.
2204
2205g. Fixed problems with --help support for several builtins.
2206
2207h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited
2208 from the environment.
2209
2210i. Fixed a bug that caused background processes run from non-interactive shells
2211 with job control enabled to place the terminal in the wrong process group
2212 under certain circumstances.
2213
2214j. Fixed a bug that caused `fc' to return an incorrect exit status when
2215 executing commands from the history list.
2216
2217k. Fixed a bug that caused the shell to exit when a process substitution
2218 received a SIGINT when run in certain terminal emulators.
2219
2220l. EXECIGNORE now honors the setting of `extglob' when attempting to match
2221 executable names.
2222
2223m. Fixed a bug where `return' used the wrong exit status when executed in a
2224 DEBUG trap.
2225
2226n. Fixed a bug that caused a command containing a here-document and an escaped
2227 newline to be stored in the history list incorrectly.
2228
2229o. Fixed a bug that caused set -e to be honored in cases of builtins invoking
2230 other builtins when it should be ignored.
2231
2232p. Fixed a bug that caused `readonly' and `export' to create local array
2233 variables when used within shell functions.
2234
2235q. Fixed a bug that allowed subshells begun to execute process substitutions
2236 to have access to the command's temporary environment.
2237
2238r. Fixed a bug that could cause the shell to dump core when receiving a
2239 SIGCHLD for which a trap has been set while running in posix mode.
2240
2241s. Fixed a bug that caused bash to not restore BASH_ARGC, BASH_ARGV,
2242 BASH_SOURCE, BASH_LINENO, and FUNCNAME if the shell received a SIGINT
2243 while reading commands from a file while executing `.'.
2244
2245t. Fixed a bug that caused the `-o history' option to have no effect when
2246 supplied on the command line when starting a new shell.
2247
2248u. Fixed a bug that caused history expansions occurring in command
2249 substitutions to not be performed.
2250
2251v. Fixed a bug that caused `eval' run in a non-interactive shell to disable
2252 history expansion for the remainder of the shell script, even if the script
2253 had previously enabled it.
2254
2255w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set
2256 to the empty string.
2257
2258x. Fixed a bug that caused process and command substitution to inherit output
2259 buffered in the stdio library but not written.
2260
2261y. Fixed a bug that caused a terminating signal received during `echo' to run
2262 an exit trap in a signal handler context.
2263
2264z. Fixed a bug that caused a builtin command containing a process substitution
2265 to return the wrong exit status.
2266
2267aa. Fixed a bug that caused `()' subshells with piped input to incorrectly
2268 redirect the standard input of some of the commands in the subshell from
2269 /dev/null.
2270
2271bb. The history builtin now uses more descriptive error messages for missing or
2272 invalid timestamps.
2273
22742. Changes to Readline
2275
2276a. The history file writing functions only attempt to create and use a backup
2277 history file if the history file exists and is a regular file.
2278
2279b. Fixed an out-of-bounds read in readline's internal tilde expansion
2280 interface.
2281
2282c. Fixed several redisplay bugs with prompt strings containing multibyte
2283 and non-visible characters whose physical length is longer than the screen
2284 width.
2285
2286d. Fixed a redisplay bug with prompt strings containing invisible characters
2287 whose physical length exceeds the screen width and using incremental search.
2288
2289e. Readline prints more descriptive error messages when it encounters errors
2290 while reading an inputrc file.
2291
2292f. Fixed a bug in the character insertion code that attempts to optimize
2293 typeahead when it reads a character that is not bound to self-insert and
2294 resets the key sequence state.
2295
22963. New Features in Bash
2297
2298a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
2299 environment.
2300
2301b. inherit_errexit: a new `shopt' option that, when set, causes command
2302 substitutions to inherit the -e option. By default, those subshells disable
2303 -e. It's enabled as part of turning on posix mode.
2304
2305c. New prompt string: PS0. Expanded and displayed by interactive shells after
2306 reading a complete command but before executing it.
2307
2308d. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to
2309 SIG_DFL when the shell is started, so they are set to SIG_DFL in child
2310 processes.
2311
2312e. Posix-mode shells now allow double quotes to quote the history expansion
2313 character.
2314
2315f. OLDPWD can be inherited from the environment if it names a directory.
2316
2317g. Shells running as root no longer inherit PS4 from the environment, closing
2318 a security hole involving PS4 expansion performing command substitution.
2319
2320h. If executing an implicit `cd' when the `autocd' option is set, bash will
2321 now invoke a function named `cd' if one exists before executing the `cd'
2322 builtin.
2323
23244. New Features in Readline
2325
2326a. If an incremental search string has its last character removed with DEL,
2327 the resulting empty search string no longer matches the previous line.
2328
2329b. If readline reads a history file that begins with `#' (or the value of
2330 the history comment character) and has enabled history timestamps, the
2331 history entries are assumed to be delimited by timestamps. This allows
2332 multi-line history entries.
2333
2334c. Readline now throws an error if it parses a key binding without a
2335 terminating `:' or whitespace.
2336
2337------------------------------------------------------------------------------
2338This document details the changes between this version, bash-4.4-beta, and
2339the previous version, bash-4.4-alpha.
2340
23411. Changes to Bash
2342
2343a. Fixed two bugs that caused out-of-bounds reads when skipping over assignment
2344 statements while finding the word on which to perform programmable
2345 completion.
2346
2347b. Fixed a memory leak in programmable completion.
2348
2349c. Fixed a bug that could cause the shell to crash when interrupting the
2350 wait builtin.
2351
2352d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new
2353 `@' operator.
2354
2355e. Fixed a bug that caused the && and || operators to be incorrectly optimized.
2356
2357f. The shell now undoes redirections before exiting the shell when the `-e'
2358 option is enabled, and a shell function fails.
2359
2360g. History expansion now skips over the history expansion character in command
2361 and process substitution.
2362
2363h. Fixed a bug that caused stray '\001' characters to be added to the output
2364 of `declare -p'.
2365
2366i. Fixed a memory leak when processing declare commands that perform compound
2367 array assignments.
2368
2369j. Fixed a bug that could cause the shell to crash when reading input from a
2370 file and the limit on open file descriptors is high.
2371
2372k. Fixed a bug that caused the ERR and RETURN traps to be unset if they were
2373 set in a shell function but unset previously.
2374
2375l. Fixed a bug that caused several signals to be ignored if `exec' failed in
2376 an interactive shell.
2377
2378m. A posix-mode non-interactive shell now considers a parameter expansion error
2379 to be a fatal error.
2380
2381n. The `time' command now prints timing statistics for failed commands when
2382 the -e option is enabled.
2383
2384o. Fixed a bug that caused the shell to crash when attempting to indirectly
2385 expand a shell variable with an invalid name.
2386
2387p. Fixed a bug that caused the shell to crash when running a trap containing
2388 a process substitution.
2389
2390q. Bash now prints the keyword `function' before a function with the same name
2391 as a reserved word when using `declare -f' to avoid parse errors when
2392 reusing the output as input.
2393
2394r. Fixed a bug that caused the shell to crash when using declare -g to attempt
2395 to redefine an existing global indexed array variable as an associative
2396 array.
2397
2398s. Fixed a memory leak that occurred when interrupting brace expansions
2399 generating a sequence.
2400
2401t. Fixed a bug that resulted in alias expansion in redirections.
2402
2403u. The `declare -a' and `declare -A' commands now print fewer warnings when
2404 attempting to create and initialize an array at the same time, but
2405 relying on word expansions to construct the compound assignment.
2406
2407v. The `help' builtin now behaves better in locales where each wide
2408 character occupies more than one display column.
2409
2410w. The `read' builtin no longer has a possible race condition when a timeout
2411 occurs.
2412
2413x. Fixed several expansion problems encountered when IFS="'".
2414
2415y. Fixed a problem with the expansion of $'\c?'.
2416
2417z. Bash no longer splits the expansion of here-strings, as the documentation
2418 has always said.
2419
2420aa. Bash now puts `s' in the value of $- if the shell is reading from standard
2421 input, as Posix requires.
2422
2423bb. Fixed a bug that caused the shell to crash if invoked with a NULL
2424 environment.
2425
2426cc. The shell now only trusts an inherited value for $PWD if it begins with a
2427 `/'.
2428
2429dd. Fixed a memory leak when creating local array variables and assigning to
2430 them using compound assignment with the `declare' builtin.
2431
2432ee. Fixed a bug that could cause the shell to crash when processing nested here
2433 documents inside a command substitution.
2434
2435ff. Array keys and values are now displayed using $'...' quoting where
2436 appropriate.
2437
2438gg. Fixed a bug that could cause the shell to crash if the replacement string
2439 in pattern substitution was NULL.
2440
2441hh. Fixed a bug that could cause the shell to crash if a command substitution
2442 contained a non-fatal syntax error.
2443
2444ii. Fixed a bug that could cause the shell to crash if variable indirection
2445 resulted in a NULL variable.
2446
2447jj. Fixed a bug that could cause the shell to crash if a long string contained
2448 multiple unterminated parameter expansion constructs.
2449
2450kk. Improved the code that acts on SIGINT received while waiting for a child
2451 process only if the child exits due to SIGINT.
2452
2453ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple
2454 commands.
2455
24562. Changes to Readline
2457
2458a. Colored completion prefixes are now displayed using a different color, less
2459 likely to collide with files.
2460
2461b. Fixed a bug that caused vi-mode character search to misbehave when
2462 running in callback mode.
2463
2464c. Fixed a bug that caused output to be delayed when input is coming from a
2465 macro in vi-mode.
2466
2467d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
2468 a multi-key key sequence via a macro.
2469
2470e. Fixed a bug that caused problems with applications that supply their own
2471 input function when performing completion.
2472
2473f. When read returns -1/EIO when attempting to read a key, return an error
2474 instead of line termination back to the caller.
2475
2476g. Updated tty auditing feature based on patch from Red Hat.
2477
2478h. Fixed a bug that could cause the history library to crash on overflows
2479 introduced by malicious editing of timestamps in the history file.
2480
24813. New Features in Bash
2482
2483a. `make install' now installs the example loadable builtins and a set of
2484 bash headers to use when developing new loadable builtins.
2485
2486b. `enable -f' now attempts to call functions named BUILTIN_builtin_load when
2487 loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows
2488 loadable builtins to run initialization and cleanup code.
2489
2490c. There is a new BASH_LOADABLES_PATH variable containing a list of directories
2491 where the `enable -f' command looks for shared objects containing loadable
2492 builtins.
2493
2494d. The `complete_fullquote' option to `shopt' changes filename completion to
2495 quote all shell metacharacters in filenames and directory names.
2496
2497e. The `kill' builtin now has a `-L' option, equivalent to `-l', for
2498 compatibility with Linux standalone versions of kill.
2499
25004. New Features in Readline
2501------------------------------------------------------------------------------
2502This document details the changes between this version, bash-4.4-alpha, and
2503the previous version, bash-4.3-release.
2504
25051. Changes to Bash
2506
2507a. A bug that caused pipelines to be corrupted while running the DEBUG trap
2508 was fixed.
2509
2510b. A bug that accidentally omitted the `-R' unary operator from `test' was
2511 fixed.
2512
2513c. A bug that could cause the shell to not restore the terminal's process
2514 group on shell exit was fixed.
2515
2516d. Several changes were made to programmable completion to accommodate
2517 assumptions made by the bash-completion package.
2518
2519e. Bash no longer inhibits C-style escape processing ($'...') while performing
2520 pattern substitution word expansions.
2521
2522f. Fixed a bug that caused `return' executed from a trap handler to use the
2523 wrong return status when one was not supplied as an argument.
2524
2525g. In Posix mode, defining a function with the same name as a special
2526 builtin is now an error, fatal only when the shell is not interactive.
2527
2528h. Fixed a bug that caused compound array assignments to discard unset or null
2529 variables used as subscripts, thereby making it appear as if the index was
2530 not present.
2531
2532i. Fixed a bug that caused extended glob patterns to incorrectly match
2533 filenames with a leading `.'.
2534
2535j. Fixed a bug involving sign extension when reallocating the input line
2536 after a history expansion, causing segmentation faults.
2537
2538k. Bash now does a better job at identifying syntax errors during word
2539 completion and tailoring completion appropriately.
2540
8868edaf 2541l. Bash now uses the current locale's decimal point in command timing output.
a0c0a00f
CR
2542
2543m. Fixed a bug that caused segmentation faults while reading here documents if
2544 PS2 contains a command substitution.
2545
2546n. There are several changes to how $@ is expanded when unquoted but in a
2547 context where word splitting is not performed (e.g., on the rhs of an
2548 assignment or in a conditional command).
2549
2550o. Bash now quotes command hash table entries that contain shell metacharacters
2551 when displaying hash table contents.
2552
2553p. Fixed a potential file descriptor leak when dup2() fails while performing a
2554 redirection.
2555
2556q. Fixed a bug that caused directory names evaluated during word completion to
2557 be dequoted twice.
2558
2559r. Fixed several bugs which could result in indirect variable expansion and
2560 namerefs creating variables with invalid names or referencing variables
2561 set to the empty string.
2562
2563s. Fixed a bug that caused bash to not expand $0 in word expansions where it
2564 should.
2565
2566t. Fixed a bug that caused bash to perform process substitution if <(
2567 appeared inside an arithmetic context.
2568
2569u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern
2570 to be confused as directory names.
2571
2572v. Fixed several bugs with treatment of invisible variables (variables with
2573 attributes that are unset because they have never been assigned values).
2574
2575w. Fixed a bug that caused the `read' builtin to not clean up readline's
2576 state when using the -e and -t options together and the read timed out.
2577
2578x. Fixed a bug that caused the shell to exit with the wrong (but non-zero)
2579 value if a command was not found or was not executable.
2580
2581y. Fixed a bug that caused the `time' reserved word to not be recognized as
2582 such in all contexts where it should have been.
2583
8868edaf 2584z. Fixed a bug that caused the shell to close process substitution file
a0c0a00f
CR
2585 descriptors when executing a script without the `#!' leading line.
2586
2587aa. Fixed a typo that caused the `compat42' shell option to set the wrong
2588 compatibility level.
2589
2590bb. The shell now handles process substitution commands with embedded
2591 parentheses the same way as it does when parsing command substitution.
2592
2593cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option
2594 to produce core dumps.
2595
2596dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases
2597 where slashes must be matched explicitly.
2598
2599ee. Fixed a problem with patterns containing `:' in colon-separated variables
2600 like GLOBIGNORE.
2601
2602ff. Fixed a bug that caused indirect variable expansion using indexed arrays to
2603 always use index 0.
2604
2605gg. Fixed a parsing problem that caused quoted newlines immediately following a
2606 command substitution to be mishandled in certain cases.
2607
2608hh. Fixed a potential buffer overflow on systems without locale_charset or the
2609 bash replacement.
2610
2611ii. Fixed a bug that caused background processes to modify the terminal's
2612 process group under certain circumstances.
2613
2614jj. Asynchronous commands now always set $? to 0 and are not affected by
2615 whether or not the command's exit status is being inverted.
2616
2617kk. Fixed a problem that caused a line ending with an escaped newline and
2618 containingh a prior `eval' to be incorrectly parsed.
2619
2620ll. Fixed an issue with programmable completion and `!' in extglob patterns
2621 used as arguments to `compgen -X'.
2622
2623mm. Word completion now treats the two-character token `>|' as requiring
2624 filename expansion.
2625
2626nn. Bash no longer expands tildes in $PATH elements while in Posix mode.
2627
2628oo. Fixed a bug that caused bash to not clean up readline's state, including
2629 the terminal settings, if it received a fatal signal while in a readline()
2630 call (including `read -e' and `read -s').
2631
2632pp. Fixed bug that caused importing shell functions from the environment to
2633 execute additional commands following the function.
2634
2635qq. Fixed a bug that caused the parser to return a lookahead character pushed
2636 back by a previous call, even when on another line.
2637
2638rr. Fixed a bug that caused many here-documents or many nested case statements
2639 to overflow an internal stack.
2640
2641ss. Changed the way bash encodes exported functions for inclusion in the
2642 environment to avoid name collisions with valid variable names and to
2643 indicate that they are exported functions.
2644
2645tt. Fixed a bug that could result in an invalid memory access when processing
2646 a here document delimited by end of file or end of string.
2647
2648uu. Fixed a bug that could cause an invalid memory access if a command was run
2649 before initializing the job control framework.
2650
2651vv. When in Posix mode, bash prints shell function definitions as Posix
2652 specifies them, without the leading `function' keyword.
2653
2654ww. The variable attribute display builtins no longer display variables with
2655 invalid names that were imported from the environment.
2656
2657xx. Fixed a bug that could allow `break' or `continue' executed from shell
2658 functions to affect loops running outside of the function.
2659
2660yy. Fixed a bug that could cause a restricted shell to attempt to import shell
2661 functions from the environment.
2662
2663zz. The shell now allows double-quoted identifiers in arithmetic expressions.
2664
2665aaa. Fixed a bug that could allow scalar variables subscripted using [@] in
2666 word expansions to be incorrectly quoted.
2667
2668bbb. The shell now makes sure to ignore SIGTSTP/SIGTTIN/SIGTTOU in child
2669 processes if they were ignored at shell startup, even if job control is
2670 in effect.
2671
2672ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to
2673 the empty string.
2674
2675ddd. Posix says that expanding $* in a pattern context where the expansion is
2676 double-quoted should not treat $* as if it were double quoted.
2677
2678eee. Bash now restores getopts' internal state between calls to getopts even if
2679 a shell function declares a local copy of OPTIND.
2680
2681fff. Fixed a bug that could cause `history -r' or `history -n' to read identical
2682 lines from the history file more than once.
2683
2684ggg. The commands executed by `bind -x' now redisplay at most the final line
2685 of a multi-line prompt, and those commands may return 124 to indicate that
2686 the entire prompt should be redrawn.
2687
2688hhh. Fixed a bug that could cause `mapfile' to create variables with invalid
2689 names.
2690
2691iii. The shell only goes into debugging mode when --debugger is supplied if
2692 the debugger initialization file is present.
2693
2694jjj. Fixed a bug that disallowed an assignment to (implicit) subscript 0 of an
2695 existing array in a declare command that set the readonly attribute.
2696
2697kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable
2698 its special status.
2699
2700lll. Appending to an existing array variable using the compound assignment
2701 syntax (var+=(aaa)) should not affect assignments to existing subscripts
2702 appearing in the compound assignment.
2703
2704mmm. Fixed a bug that could cause the shell to crash when a variable with a
2705 null value was passed in the temporary environment and the variable's
2706 attributes are modified using `declare' while performing a redirection.
2707
2708nnn. Fixed a bug in printf so that a missing precision specifier after a `.'
2709 is treated as 0.
2710
2711ooo. Fixed a bug that attempted to use the internal command timing to time
2712 pipeline components if the pipeline elements are separated by newlines.
2713
2714ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase
2715 the values on assignment.
2716
2717qqq. Bash does a better job of determining whether or not files are executable
2718 when running on Windows, since the X_OK flag to access(2) is not supported.
2719
2720rrr. Fixed a bug that caused some of the shell's internal traps (e.g., ERR) to
2721 be interrupted (and leave incorrect state) by pending SIGINTs.
2722
2723sss. Fixed a bug in the bash interface to history expansion to avoid attempting
2724 expansion if the history expansion character occurs in a command
2725 substitution.
2726
2727ttt. Fixed a bug that caused the select command to crash if the REPLY variable
2728 ends up empty (e.g., if it's made readonly)
2729
2730uuu. Bash handles backslash-quoting of multibyte characters better when quoting
2731 output that is intended to be reused.
2732
2733vvv. System-specific changes for: Windows, Cygwin.
2734
2735www. Fixes for upper and lower-casing multibyte characters, some locales have
2736 characters whose upper and lowercase versions have different numbers of
2737 bytes.
2738
2739xxx. Fixed a bug that caused the ERR trap in a shell function to have the
2740 wrong value for $LINENO.
2741
2742yyy. Fixed a bug that resulted in incorrect quoting of regexps for the =~
2743 operator when an open brace appears without a close brace.
2744
2745zzz. Fixed a bug in the array unset operation that caused it to attempt to
2746 parse embedded single and double quotes.
2747
2748aaaa. Fixed a bug that caused $* to not expand with the first character of
2749 $IFS as a separator in a context where word splitting will not take
2750 place.
2751
2752bbbb. Fixed two bugs that could cause the shell to dereference a null pointer
2753 while attempting to print an error message from arithmetic expansion.
2754
2755cccc. Fixed a bug that resulted in short-circuited evaluation when reading
2756 commands from a string ending in an unquoted backslash, or when sourcing
2757 a file that ends with an unquoted backslash.
2758
2759dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up
2760 any FIFOs created by process substitution.
2761
2762eeee. If the -T option is not set, allow the source builtin and shell functions
2763 to set a DEBUG trap that persists after the sourced file or function
2764 returns, instead of restoring the old (unset) value unconditionally.
2765
2766ffff. Fixed a bug that caused redirections to not be undone on some syntax
2767 errors, e.g., when parsing a command substitution.
2768
2769gggg. Bash only adds asynchronous commands to the table of background pids
2770 whose status it remembers, to avoid it growing too large during scripts
2771 that create and reap large numbers of child processes. This means that
2772 `wait' no longer works on synchronous jobs, but $? can be used to get
2773 the exit status in those cases.
2774
2775hhhh. Bash now checks whether or not a shell script argument is a directory
2776 before trying to open it; Posix says implementations may allow open(2)
2777 on a directory.
2778
2779iiii. Fixed a bug that could cause the shell to set the terminal's process
2780 group to a background process group when running as part of a pipeline.
2781
2782jjjj. Made a few changes to strings to avoid possible potential negative effects
2783 caused by malicious translations.
2784
2785kkkk. Fixed a bug that caused the `unset' builtin to continue to treat its
2786 arguments as functions after unsetting a function when invoked with no
2787 options.
2788
2789llll. Fixed a bug that would not replace empty strings using pattern
2790 substitution even if the pattern matched the empty string.
2791
2792mmmm. Fixed a bug with word completion that prevented some characters from
2793 being backslash-quoted (backquote, dollar sign).
2794
2795nnnn. Fixed a bug that prevented a command from the history re-executed by the
2796 `fc' builtin from setting verbose mode.
2797
2798oooo. Fixed a bug that caused the shell to not enable and disable function
2799 tracing with changes to the `extdebug' shell option.
2800
2801pppp. Fixed a bug that caused assignments to nameref variables pointing to
2802 unset variables with attributes but no values to create variables with
2803 incorrect names.
2804
2805qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to
2806 unset the wrong variable under certain circumstances.
2807
2808rrrr. Fixed a bug that caused close braces occurring in brace expansions within
2809 command substitutions to incorrectly terminate parameter expansions.
2810
2811ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH.
2812
2813tttt. Fixed a bug that caused interactive shells compiled without job control
2814 to return incorrect status values for child processes when running a
2815 single command that creates enough children to use the entire PID space.
2816
2817uuuu. `esac' should not be recognized as a reserved word when it appears as the
2818 second or later pattern in a case statement pattern list.
2819
2820vvvv. Fixed a bug that caused the completion code to read past the end of the
2821 readline line buffer while skipping assignment statements to find the
2822 command name.
2823
2824wwww. Fixed a bug that caused case statements within loops contained in a
2825 command substitution to be parsed incorrectly.
2826
2827xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after
2828 running `wait' with no arguments and interrupting it with ^C without
2829 a trap handler installed.
2830
28312. Changes to Readline
2832
2833a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
2834 commands with modifiers was fixed.
2835
2836b. Fixed a bug that caused callback mode to dump core when reading a
2837 multiple-key sequence (e.g., arrow keys).
2838
2839c. Fixed a bug that caused the redisplay code to erase some of the line when
2840 using horizontal scrolling with incremental search.
2841
2842d. Readline's input handler now performs signal processing if read(2) is
2843 interrupted by SIGALRM or SIGVTALRM.
2844
2845e. Fixed a problem with revert-all-at-newline freeing freed memory.
2846
2847f. Clarified the documentation for the history_quotes_inhibit_expansion
2848 variable to note that it inhibits scanning for the history comment
2849 character and that it only affects double-quoted strings.
2850
2851g. Fixed an off-by-one error in the prompt printed when performing searches.
2852
2853h. Use pselect(2), if available, to wait for input before calling read(2), so
2854 a SIGWINCH can interrupt it, since it doesn't interrupt read(2).
2855
2856i. Some memory leaks caused by signals interrupting filename completion have
2857 been fixed.
2858
2859j. Reading EOF twice on a non-empty line causes EOF to be returned, rather
2860 than the partial line. This can cause partial lines to be executed on
2861 SIGHUP, for example.
2862
2863k. Fixed a bug concerning deleting multibyte characters from the search
2864 string while performing an incremental search.
2865
2866l. Fixed a bug with tilde expanding directory names in filename completion.
2867
2868m. Fixed a bug that did not allow binding sequences beginning with a `\'.
2869
2870n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
2871 contains a multibyte character in the last screen column.
2872
2873o. Fixed a bug that caused history expansion to disregard characters that are
2874 documented to delimit a history event specifier without requiring `:'.
2875
2876p. Fixed a bug that could cause reading past the end of a string when reading
2877 the value when binding the set of isearch terminators.
2878
2879q. Fixed a bug that caused readline commands that depend on knowing which
2880 key invoked them to misbehave when dispatching key sequences that are
2881 prefixes of other key bindings.
2882
2883r. Paren matching now works in vi insert mode.
2884
28853. New Features in Bash
2886
2887a. There is now a settable configuration #define that will cause the shell
2888 to exit if the shell is running setuid without the -p option and setuid
2889 to the real uid fails.
2890
2891b. Command and process substitutions now turn off the `-v' option when
2892 executing, as other shells seem to do.
2893
2894c. The default value for the `checkhash' shell option may now be set at
2895 compile time with a #define.
2896
2897d. The `mapfile' builtin now has a -d option to use an arbitrary character
2898 as the record delimiter, and a -t option to strip the delimiter as
2899 supplied with -d.
2900
2901e. The maximum number of nested recursive calls to `eval' is now settable in
2902 config-top.h; the default is no limit.
2903
2904f. The `-p' option to declare and similar builtins will display attributes for
2905 named variables even when those variables have not been assigned values
2906 (which are technically unset).
2907
2908g. The maximum number of nested recursive calls to `source' is now settable
2909 in config-top.h; the default is no limit.
2910
2911h. All builtin commands recognize the `--help' option and print a usage
2912 summary.
2913
2914i. Bash does not allow function names containing `/' and `=' to be exported.
2915
2916j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
2917
2918k. The shell now allows `time ; othercommand' to time null commands.
2919
2920l. There is a new `--enable-function-import' configuration option to allow
2921 importing shell functions from the environment; import is enabled by
2922 default.
2923
2924m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
2925 had been executed.
2926
2927n. GLOBIGNORE, the pattern substitution word expansion, and programmable
2928 completion match filtering now honor the value of the `nocasematch' option.
2929
2930o. There is a new ${parameter@spec} family of operators to transform the
2931 value of `parameter'.
2932
2933p. Bash no longer attempts to perform compound assignment if a variable on the
2934 rhs of an assignment statement argument to `declare' has the form of a
2935 compound assignment (e.g., w='(word)' ; declare foo=$w); compound
2936 assignments are accepted if the variable was already declared as an array,
2937 but with a warning.
2938
2939q. The declare builtin no longer displays array variables using the compound
2940 assignment syntax with quotes; that will generate warnings when re-used as
2941 input, and isn't necessary.
2942
2943r. Executing the rhs of && and || will no longer cause the shell to fork if
2944 it's not necessary.
2945
2946s. The `local' builtin takes a new argument: `-', which will cause it to save
2947 the single-letter shell options and restore their previous values at
2948 function return.
2949
2950t. `complete' and `compgen' have a new `-o nosort' option, which forces
2951 readline to not sort the completion matches.
2952
2953u. Bash now allows waiting for the most recent process substitution, since it
2954 appears as $!.
2955
2956v. The `unset' builtin now unsets a scalar variable if it is subscripted with
2957 a `0', analogous to the ${var[0]} expansion.
2958
2959w. `set -i' is no longer valid, as in other shells.
2960
2961x. BASH_SUBSHELL is now updated for process substitution and group commands
2962 in pipelines, and is available with the same value when running any exit
2963 trap.
2964
2965y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
2966 not bash is being run in a GNU Emacs shell window.
2967
2968z. Bash now treats SIGINT received when running a non-builtin command in a
2969 loop the way it has traditionally treated running a builtin command:
2970 running any trap handler and breaking out of the loop.
2971
2972aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
2973 cause matching filenames to be ignored when searching for commands.
2974
2975bb. Aliases whose value ends in a shell metacharacter now expand in a way to
2976 allow them to be `pasted' to the next token, which can potentially change
2977 the meaning of a command (e.g., turning `&' into `&&').
2978
29794. New Features in Readline
2980
8868edaf 2981a. The history truncation code now uses the same error recovery mechanism as
a0c0a00f
CR
2982 the history writing code, and restores the old version of the history file
2983 on error. The error recovery mechanism handles symlinked history files.
2984
2985b. There is a new bindable variable, `enable-bracketed-paste', which enables
2986 support for a terminal's bracketed paste mode.
2987
2988c. The editing mode indicators can now be strings and are user-settable
2989 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
2990 variables). Mode strings can contain invisible character sequences.
2991 Setting mode strings to null strings restores the defaults.
2992
2993d. Prompt expansion adds the mode string to the last line of a multi-line
2994 prompt (one with embedded newlines).
2995
2996e. There is a new bindable variable, `colored-completion-prefix', which, if
2997 set, causes the common prefix of a set of possible completions to be
2998 displayed in color.
2999
3000f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
3001 mode yank-pop.
3002
3003g. The redisplay code underwent several efficiency improvements for multibyte
3004 locales.
3005
3006h. The insert-char function attempts to batch-insert all pending typeahead
3007 that maps to self-insert, as long as it is coming from the terminal.
3008
3009i. rl_callback_sigcleanup: a new application function that can clean up and
3010 unset any state set by readline's callback mode. Intended to be used
3011 after a signal.
3012
3013------------------------------------------------------------------------------
ac50fbac
CR
3014This document details the changes between this version, bash-4.3-release, and
3015the previous version, bash-4.3-rc2.
3016
30171. Changes to Bash
3018
3019a. Only Posix-mode shells should exit on an assignment failure in the
3020 temporary environment preceding a special builtin. This is how it's been
3021 documented.
3022
3023b. Fixed a bug that caused a failed special builtin to not exit a posix-mode
3024 shell if the failing builtin was on the LHS of a && or ||.
3025
3026c. Changed the handling of unquoted backslashes in regular expressions to be
3027 closer to bash-4.2.
3028
3029d. globstar (**) no longer traverses symbolic links that resolve to
3030 directories. This eliminates some duplicate entries.
3031
3032e. Fixed a bug that caused a SIGCHLD trap handler to not be able to change the
3033 SIGCHLD disposition.
3034
3035f. Fixed a bug that caused a crash when -x was enabled and a command
3036 contained a printable multibyte (wide) character.
3037
3038g. Fixed a bug that caused an interactive shell without line editing enabled
3039 to read invalid data after receiving a SIGINT.
3040
3041h. Fixed a bug that caused command word completion to fail if the directory in
3042 $PATH where the completion would be found contained single or double quotes.
3043
3044i. Fixed a bug that caused a shell with -v enabled to print commands in $()
3045 multiple times.
3046
30472. Changes to Readline
3048
3049a. Fixed a bug that caused `undo' to reference freed memory or null pointers.
3050
30513. New Features in Bash
3052
3053a. The [[ -v ]] option now understands array references (foo[1]) and returns
3054 success if the referenced element has a value.
3055
3056------------------------------------------------------------------------------
3057This document details the changes between this version, bash-4.3-rc2, and the
3058previous version, bash-4.3-rc1.
3059
30601. Changes to Bash
3061
3062a. Fixed a bug that left variables set by printf -v marked as invisible.
3063
3064b. Fixed an off-by-one error in a job control warning message.
3065
3066c. Fixed a bug that caused the shell to crash after declaring a nameref variable
3067 without a value.
3068
3069d. Fixed a bug that caused asynchronous commands to not set $? correctly.
3070
3071e. Fixed a bug that caused out-of-order execution when executing aliases with
3072 embedded newlines containing `.' commands.
3073
3074f. Fixed a bug that caused error messages generated by expansion errors in
3075 `for' commands to have the wrong line number.
3076
3077g. Fixed a bug that caused the `wait' builtin to not be interruptible in an
3078 interactive shell with job control enabled.
3079
3080h. Fixed a bug that caused SIGINT and SIGQUIT to not be trappable in
3081 asynchronous subshell commands.
3082
3083i. Bash now requires that the value assigned to a nameref variable be a valid
3084 shell identifier (variable name or array reference).
3085
3086j. Converting an existing variable to a nameref variable now turns off the
3087 -i/-l/-u/-c attributes.
3088
3089k. Displaying a nameref variable with `declare -p' now displays the nameref
3090 variable and its value rather than following the nameref chain.
3091
3092l. Fixed a problem with interrupt handling that caused a second and subsequent
3093 SIGINT to be ignored by interactive shells.
3094
3095m. Fixed a bug that caused certain positional parameter and array expansions
3096 to mishandle (discard) null positional parameters and array elements.
3097
3098n. The shell no longer blocks receipt of signals while running trap handlers
3099 for those signals, and allows most trap handlers to be run recursively
3100 (running trap handlers while a trap handler is executing).
3101
3102o. The shell now handles backslashes in regular expression arguments to the
3103 [[ command's =~ operator slightly differently, resulting in more
3104 consistent behavior.
3105
31062. Changes to Readline
3107
3108a. Fixed a bug that could cause readline to crash and seg fault attempting to
3109 expand an empty history entry.
3110
3111b. Fixed a bug that caused a bad entry in the $LS_COLORS variable to abort all
3112 color processing but leave color enabled.
3113
3114c. Fixed a bug that caused display problems with multi-line prompts containing
3115 invisible characters on multiple lines.
3116
3117d. Fixed a bug that caused effects made by undoing changes to a history line to
3118 be discarded.
3119
31203. New Features in Bash
3121
31224. New Features in Readline
3123
3124a. When creating shared libraries on Mac OS X, the pathname written into the
3125 library (install_name) no longer includes the minor version number.
3126------------------------------------------------------------------------------
3127This document details the changes between this version, bash-4.3-rc1, and the
3128previous version, bash-4.3-beta2.
3129
31301. Changes to Bash
3131
3132a. Fixed a bug in bash completion that caused a tilde to be expanded even if
3133 the `direxpand' option was not enabled.
3134
3135b. Fixed a potential bug that could cause corrupted input in interactive shells
3136 running without line editing and with `ignoreeof' enabled.
3137
3138c. Fixed a bug that could cause failures when opening pipes back to shells
3139 created to run process substitutions.
3140
3141d. Fixed a bug that caused an assignment to TEXTDOMAIN to require TEXTDOMAINDIR
3142 to be set in order to actually change the current text domain.
3143
3144e. Changed the way redirections are printed to avoid confusion when the target
3145 of an output redirection is a process substitution beginning with `>'.
3146
31472. Changes to Readline
3148
3149a. Shared library building is now supported on Mac OS X 10.9 (Darwin 13).
3150
31513. New Features in Bash
3152
3153a. `cd' has a new `-@' option to browse a file's extended attributes on
3154 systems that support O_XATTR.
3155
31564. New Features in Readline
3157
3158a. There are additional default key bindings for MinGW32
3159
3160------------------------------------------------------------------------------
3161This document details the changes between this version, bash-4.3-beta2, and the
3162previous version, bash-4.3-beta.
3163
31641. Changes to Bash
3165
3166a. Fixed a bug that caused assignment to an unset variable using a negative
3167 subscript to result in a segmentation fault.
3168
3169b. Fixed a bug that caused assignment to a string variable using a negative
3170 subscript to use the incorrect index.
3171
3172c. Fixed a bug that caused some strings to be interpreted as invalid
3173 extended globbing expressions when used with the help builtin.
3174
3175d. Fixed a bug that caused an attempt to trap a signal whose disposition
3176 cannot be changed to reference uninitialized memory.
3177
3178e. Command completion now skips assignment statements preceding a command
3179 name and completes the command.
3180
3181f. Fixed a bug that caused `compgen -f' in a non-interactive shell to dump
3182 core under certain circumstances.
3183
3184g. Fixed a bug that caused the `read -N' to misbehave when the input stream
3185 contains 0xff.
3186
31872. Changes to Readline
3188
3189a. Changed message when an incremental search fails to include "failed" in
3190 the prompt and display the entire search string instead of just the last
3191 matching portion.
3192
3193b. Fixed a bug that caused an arrow key typed to an incremental search prompt
3194 to process the key sequence incorrectly.
3195
3196c. Additional key bindings for arrow keys on MinGW.
3197
31983. New Features in Bash
3199
3200a. The help builtin now attempts substring matching (as it did through
3201 bash-4.2) if exact string matching fails.
3202
3203b. The fc builtin now interprets -0 as the current command line.
3204
3205c. Completing directory names containing shell variables now adds a trailing
3206 slash if the expanded result is a directory.
3207
32084. New Features in Readline
3209
3210a. rl_change_environment: new application-settable variable that controls
3211 whether or not Readline modifies the environment (currently readline
3212 modifies only LINES and COLUMNS).
3213
3214------------------------------------------------------------------------------
3215This document details the changes between this version, bash-4.3-beta, and the
3216previous version, bash-4.3-alpha.
3217
32181. Changes to Bash
3219
3220a. Fixed a bug in the prompt directory name "trimming" code that caused
3221 memory corruption and garbled the results.
3222
3223b. Fixed a bug that caused single quotes that resulted from $'...' quoting
3224 in the replacement portion of a double-quoted ${word/pat/rep} expansion
3225 to be treated as quote characters.
3226
3227c. Fixed a bug that caused assignment statements preceding a command word to
3228 result in assignment statements following a declaration command to not be
3229 expanded like assignment statements.
3230
3231d. Fixed a bug with variable search order in the presence of local variables
3232 with the same name as variables in the temporary environment supplied to
3233 a shell function.
3234
3235e. Fixed a bug that caused constructs like 1<(2) to be interpreted as process
3236 substitutions even in an arithmetic context.
3237
3238f. Fixed several cases where `invisible' variables (variables with attributes
3239 but no values, which are technically unset) were treated incorrectly.
3240
3241g. Fixed a bug that caused group commands in pipelines that were not the
3242 last element to not run the EXIT trap.
3243
3244h. Fixed a bug that caused `unset -n' to not unset a nameref variable in
3245 certain cases.
3246
3247i. Fixed the nameref circular reference checking to be less strict and only
3248 disallow a nameref variable with the same value as its name at the global
3249 scope.
3250
3251j. Fixed a bug that caused trap handlers to be executed recursively,
3252 corrupting internal data structures.
3253
3254k. Fixed a bug that could result in bash not compiling if certain options were
3255 not enabled.
3256
3257l. Fixed a bug that caused the arithmetic expansion code to attempt variable
3258 assignments when operator precedence prohibited them.
3259
3260m. Word expansions like ${foo##bar} now understand indirect variable references.
3261
3262n. Fixed a bug that caused `declare -fp name' to not display a function
3263 definition.
3264
3265o. Fixed a bug that caused asynchronous child processes to modify the stdin
3266 file pointer when bash was using it to read a script, which modified the
3267 parent's value as well.
3268
32692. Changes to Readline
3270
3271a. Fixed a bug in vi mode that caused the arrow keys to set the saved last
3272 vi-mode command to the wrong value.
3273
3274b. Fixed a bug that caused double-quoted strings to be scanned incorrectly
3275 when being used as the value of a readline variable assignment.
3276
3277c. Fixed a bug with vi mode that prevented `.' from repeating a command
3278 entered on a previous line (command).
3279
3280d. Fixed a bug that could cause completion to core dump if it was interrupted
3281 by a signal.
3282
3283e. Readline now sends the meta-key enable string to the terminal if the
3284 terminal has been successfully initialized.
3285
3286f. Readline now calls the signal hook after resizing the terminal when it
3287 receives a SIGWINCH.
3288
3289g. Fixed a bug that could cause the history list code to perform an out-of-
3290 bounds array reference if the history list is empty.
3291
32923. New Features in Bash
3293
3294a. Shells started to run process substitutions now run any trap set on EXIT.
3295
3296b. There is now a configure-time option to enable the globasciiranges option
3297 by default.
3298
3299c. The read builtin now checks its first variable argument for validity before
3300 trying to read any input.
3301
3302------------------------------------------------------------------------------
3303This document details the changes between this version, bash-4.3-alpha,
3304and the previous version, bash-4.2-release.
3305
33061. Changes to Bash
3307
3308a. Fixed several bugs concerning incomplete bracket expressions in filename
3309 generation (globbing) patterns.
3310
3311b. Fixed a bug with single quotes and WORD in ${param op WORD} when running
3312 in Posix mode.
3313
3314c. Fixed a bug that caused the pattern removal and pattern substitution word
3315 expansions and case statement word expansion to not match the empty string.
3316
3317d. Fixed a bug that caused the tzset() function to not work after changing
8868edaf 3318 the TZ environment variable.
ac50fbac
CR
3319
3320e. Fixed a bug that caused the RHS of an assignment statement to undergo
3321 word splitting when it contained an unquoted $@.
3322
3323f. Fixed bugs that caused the shell to not react to a SIGINT sent while
3324 waiting for a child process to exit.
3325
3326g. Bash doesn't try to run things in a signal handler context when it gets a
3327 signal (SIGINT/SIGHUP/etc) while reading input using readline but still
3328 be responsive to terminating signals.
3329
3330h. Fixed a bug that caused bash to go into an infinite loop if a filename
3331 to be matched contained an invalid multibyte character.
3332
3333i. Fixed a bug that caused PS4 to end up being truncated if it is longer
3334 than 128 bytes.
3335
3336j. Fixed a bug that caused brace expansion to not skip over double-quoted
3337 command substitution.
3338
3339k. System-specific updates for: DJGPP, HP/UX, Mac OS X
3340
3341l. Fixed a bug in displaying commands that caused redirections to be associated
3342 with the wrong part of the command.
3343
3344m. Fixed the coproc cleanup to unset the appropriate shell variables when a
3345 coproc terminates.
3346
3347n. Fixed a bug that caused `fc' to dump core due to incorrect calculation of
3348 the last history entry.
3349
3350o. Added workarounds for FreeBSD's implementation of faccessat/eaccess and
3351 `test -x'.
3352
3353p. Fixed a bug that caused the shell to not match patterns containing
3354 control-A.
3355
3356q. Fixed a bug that could result in doubled error messages when the `printf'
3357 builtin got a write error.
3358
3359r. Fixed a bug that caused the shell to not correctly expand words containing
3360 multiple consecutive quoted empty strings (""""""aa).
3361
3362s. Fixed a bug that caused the shell to not correctly parse multi-line
3363 process substitutions containing comments and quoted strings.
3364
3365t. Fixed a problem with the bash malloc's internal idea of the top of the
3366 memory heap that resulted in incorrect decisions to try to reduce the
3367 break and give memory back to the kernel.
3368
8868edaf 3369u. There are changes to the expansions performed on compound array assignments,
ac50fbac
CR
3370 in an effort to make foo=( [ind1]=bar [ind2]=baz ) identical to
3371 foo[ind1]=bar foo[ind2]=baz.
3372
3373v. Bash now reports an error if `read -a name' is used when `name' is an
3374 existing associative array.
3375
3376w. Fixed a bug that allowed an attempted assignment to a readonly variable
3377 in an arithmetic expression to not return failure.
3378
3379x. Fixed several bugs that caused completion functions to be invoked even when
3380 the cursor was before the first word in the command.
3381
3382y. Fixed a bug that caused parsing a command substitution to overwrite the
3383 parsing state associated with the complete input line.
3384
3385z. Fixed several bugs with the built-in snprintf replacement and field widths
3386 and floating point.
3387
3388aa. Fixed a bug that caused incorrect offset calculations and input buffer
3389 corruption when reading files longer than 2^31 bytes.
3390
3391bb. Fixed several bugs where bash performed arithmetic evaluation in contexts
3392 where evaluation is suppressed.
3393
3394cc. Fixed a bug that caused bash to close FIFOs used for process substitution
3395 too early when a shell function was executing, but protect against using
3396 all file descriptors when the shell functions are invoked inside loops.
3397
3398dd. Added checks for printable (and non-printable) multibyte characters for
3399 use in error messages.
3400
3401ee. Fixed a bug that caused ^O (operate-and-get-next) to not work correctly
3402 at the end of the history list.
3403
3404ff. Fixed a bug that caused command-oriented history to incorrectly combine
3405 here documents into one line.
3406
3407gg. Fixed a bug that caused importing SHELLOPTS from the environment into a
3408 Posix-mode shell to print an error message and refuse to parse it.
3409
3410hh. Fixed a bug that caused the shell to delete an extra history entry when
3411 using `history -s'.
3412
3413ii. Fixed a bug that caused floating-point exceptions and overflow errors
3414 for the / and % arithmetic operators when using INTMAX_MIN and -1.
3415
3416jj. Fixed a bug that caused parsing errors when reading an arithmetic for
3417 loop inside a command substitution.
3418
3419kk. Fixed a bug that caused a readonly function to be unset when unset was
3420 called without the -f or -v option.
3421
3422ll. Fixed several bugs in the code that quotes characters special to regular
3423 expressions when used in a quoted string on the RHS of the =~ operator
3424 to the [[ command.
3425
3426mm. Fixed a bug that caused redirections to fail because the file descriptor
3427 limit was set to a value less than 10.
3428
3429nn. Fixed a bug that caused the `read' builtin to execute code in a signal
3430 handler context if read timed out.
3431
3432oo. Fixed a bug that caused extended globbing patterns to not match files
3433 beginning with `.' correctly when a `.' was explicitly supplied in the
3434 pattern.
3435
3436pp. Fixed a bug that caused key sequences longer than two characters to not
3437 work when used with `bind -x'.
3438
3439qq. Fixed a bug that resulted in redefined functions having the wrong source
3440 file names in BASH_SOURCE.
3441
3442rr. Fixed a bug that caused the read builtin to assign null strings to variables
3443 when using `read -N', which caused core dumps when referenced
3444
3445ss. Fixed a bug that caused `bash -m script' to not enable job control while
3446 running the script.
3447
3448tt. Fixed a bug that caused `printf -v var' to dump core when used with the
3449 %b format code.
3450
3451uu. Fixed a bug that caused the shell to exit with the wrong status if -e was
3452 active and the shell exited on a substitution error.
3453
3454vv. Fixed a bug that caused the shell to seg fault if an array variable with
3455 the same name as an existing associative array was implicitly created by
3456 an assignment (declare a[n]=b).
3457
3458ww. Fixed a bug that caused a redirection to misbehave if the number specified
3459 for a file descriptor overflows an intmax_t.
3460
3461xx. Fixed several bugs with the handling of valid and invalid unicode character
3462 values when used with the \u and \U escape sequences to printf and $'...'.
3463
3464yy. Fixed a bug that caused tildes to not be escaped in expanded filenames,
3465 making them subject to later expansion.
3466
3467zz. When using the pattern substitution word expansion, bash now runs the
3468 replacement string through quote removal, since it allows quotes in that
3469 string to act as escape characters. This is not backwards compatible, so
3470 it can be disabled by setting the bash compatibility mode to 4.2.
3471
3472aaa. Fixed the rest of the cases where the shell runs non-allowed code in a
3473 signal handler context.
3474
3475bbb. Fixed a bug that caused spurious DEL characters (\177) to appear in
3476 double-quoted expansion where the RHS is evaluated to the empty string.
3477
3478ccc. Fixed a bug that caused the use of the shell's internal random number
3479 generator for temporary file names to perturb the random number
3480 sequence.
3481
3482ddd. Fixed several bugs that caused `declare -g' to not set the right global
3483 variables or to misbehave when declaring global indexed arrays.
3484
3485eee. Fixed a logic bug that caused extended globbing in a multibyte locale to
3486 cause failures when using the pattern substititution word expansions.
3487
3488fff. Fixed a bug that caused the `lastpipe' option to corrupt the file
3489 descriptor used to read the script.
3490
3491ggg. Fixed a bug that causes the shell to delete DEL characters in the
3492 expanded value of variables used in the same quoted string as variables
3493 that expand to nothing.
3494
3495hhh. Fixed a bug that caused the shell to assign the wrong value from an
3496 assignment like (( x=7 )) when `x' was an existing array variable.
3497
3498iii. Fixed a bug that caused the shell to misbehave when generating sequences
3499 and the boundary values overflow an intmax_t.
3500
3501jjj. Fixed a bug caused expansion errors if an expansion of "$@" appeared
3502 next to another expansion (e.g.. "${@}${x}").
3503
3504kkk. Fixed a potential buffer overflow bug when performing /dev/fd expansion.
3505
3506lll. Fixed a bug that resulted in an extra semicolon being added to compound
3507 assignments when they were added to the history list.
3508
3509mmm. Fixed a bug that caused mapfile to read one extra line from the input.
3510
3511nnn. Fixed a bug that caused the mail checking code to use uninitialized
3512 values.
3513
3514ooo. Fixed a bug that prevented history timestamps from being saved if the
3515 history comment character is unset.
3516
3517ppp. Fixed a bug that caused the case-modifying expansions to not work with
3518 multibyte characters.
3519
3520qqq. Fixed a bug that caused the edit-and-execute bindable readline command
3521 to see the wrong data if invoked in the middle of a multi-line quoted
3522 string.
3523
3524rrr. Fixed a bug that resulted in the shell returning the wrong exit status
3525 for a background command on systems that recycle PIDs very quickly.
3526
3527sss. Fixed a bug that caused asynchronous group commands to not run any EXIT
3528 trap defined in the body of the command.
3529
3530ttt. Fixed a bug that caused `eval "... ; return"' to not clean up properly.
3531
3532uuu. Fixed a bug that caused the shell to dump core if `read' reads an escaped
3533 IFS whitespace character.
3534
3535vvv. Fixed a bug that caused BASH_COMMAND to be set to an incorrect value when
3536 executing a (...) subshell.
3537
3538www. Fixed a couple of pointer aliasing bugs with the token string in arithmetic
3539 evaluation.
3540
3541xxx. Fixed a bug with parsing multi-line command substitutions when reading
3542 the `do' keyword followed by whitespace.
3543
3544yyy. Fixed a bug that caused the shell to seg fault if the time given to the
3545 printf %(...)T format overflowed the value accepted by localtime(3).
3546
3547zzz. Fixed a problem with displaying help topics in two columns when the
3548 translated text contained multibyte characters.
3549
3550aaaa. Fixed a bug with the extended globbing pattern matcher where a `*' was
3551 followed by a negated extended glob pattern.
3552
3553bbbb. Fixed a race condition with short-lived coproc creation and reaping that
3554 caused the child process to be reaped before the various coproc shell
3555 variables were initialized.
3556
3557cccc. Fixed a bug where turning off `errexit' in command substitution subshells
3558 was not reflected in $SHELLOPTS.
3559
3560dddd. Partially fixed an inconsistency in how the shell treated shell
3561 functions run from an EXIT trap.
3562
3563eeee. Fixed a bug in how the shell invalidated FIFOs used for process
3564 substitution when executing a pipeline (once rather than in every child).
3565
3566ffff. Fixed a bug that occurred when expanding a special variable ($@, $*)
3567 within double quotes and the expansion resulted in an empty string.
3568
3569gggg. Fixed bugs with executing a SIGCHLD trap handler to make sure that it's
3570 executed once per exited child.
3571
3572hhhh. Fixed a bug that caused `declare' and `test' to find variables that
3573 had been given attributes but not assigned values. Such variables are
3574 not set.
3575
3576iiii. Fixed a bug that caused commands in process substitutions to not look in
3577 the local temporary environment when performing word expansions.
3578
3579jjjj. Fixed several problems with globstar expansions (**/**) returning null
3580 filenames and multiple instances of the same pathname.
3581
3582kkkk. Fixed an oversight that did not allow the exit status of `coproc' to
3583 be inverted using `!'.
3584
3585llll. Fixed a bug that caused the -e option to be re-enabled using `set -e'
3586 even when executing in a context where -e is ignored.
3587
3588mmmm. Fixed a (mostly theoretical) bug with input lines longer than SIZE_MAX.
3589
3590nnnn. Fixed a bug that could result in double evaluation of command
3591 substitutions when they appear in failed redirections.
3592
3593oooo. Fixed a bug that could cause seg faults during `mapfile' callbacks if
3594 the callback unsets the array variable mapfile is using.
3595
3596pppp. Fixed several problems with variable assignments using ${var:=value}
3597 when the variable assignment is supposed to have side effects.
3598
3599qqqq. Fixed a bug that caused a failure of an assignment statement preceding a
3600 builtin caused the next invocation of a special builtin to exit the shell.
3601
3602rrrr. Fixed several problems with IFS when it appears in the temporary environment
3603 and is used in redirections.
3604
3605ssss. Fixed a problem that caused IFS changes using ${IFS:=value} to modify
3606 how preceding expansions were split.
3607
3608tttt. Fixed a problem that caused subshells to not run an EXIT trap they set.
3609
3610uuuu. Fixed a problem that caused shells started in posix mode to attempt to
3611 import shell functions with invalid names from the environment. We now
3612 print a warning.
3613
3614vvvv. Worked around a kernel problem that caused SIGCHLD to interrupt open(2)
3615 on a FIFO used for process substitution, even if the SIGCHLD handler was
3616 installed with the SA_RESTART flag.
3617
3618wwww. Fixed a problem that resulted in inconsistent expansion of $* and ${a[*]}.
3619
3620xxxx. Fixed a problem that caused `read -t' to crash when interrupted by
3621 SIGINT.
3622
3623yyyy. Fixed a problem that caused pattern removal to fail randomly because the
3624 pattern matcher read beyond the end of a string.
3625
3626zzzz. Fixed a bug that caused core dumps when shell functions tried to create
3627 local shadow copies of special variables like GROUPS.
3628
3629aaaaa. Fixed a bug that caused SIGTERM to be occasionally lost by children of
3630 interactive shells when it arrived before the child process reset the
3631 handler from SIG_DFL.
3632
3633bbbbb. Fixed a bug that caused redirections like <&n- to leave file descriptor
3634 n closed if executed with a builtin command.
3635
3636ccccc. Fixed a bug that caused incorrect completion quoting when completing a
3637 word containing a globbing character with `show-all-if-ambiguous' set.
3638
3639ddddd. Fixed a bug that caused printf's %q format specifier not to quote a
3640 tilde even if it appeared in a location where it would be subject to
3641 tilde expansion.
3642
36432. Changes to Readline
3644
3645a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode
3646 commands to work on the entire line.
3647
3648b. Fixed a bug that caused redisplay problems with prompts longer than 128
3649 characters and history searches.
3650
3651c. Fixed a bug that caused readline to try and run code to modify its idea
3652 of the screen size in a signal handler context upon receiving a SIGWINCH.
3653
3654d. Fixed a bug that caused the `meta' key to be enabled beyond the duration
3655 of an individual call top readline().
3656
3657e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's
3658 redisplay to mishandle zero-width combining characters.
3659
3660f. Fixed a bug that caused readline to `forget' part of a key sequence when
3661 a multiple-key sequence caused it to break out of an incremental search.
3662
3663g. Fixed bugs that caused readline to execute code in a signal handler
3664 context if interrupted while reading from the file system during completion.
3665
3666h. Fixed a bug that caused readline to `forget' part of a key sequence when
3667 reading an unbound multi-character key sequence.
3668
3669i. Fixed a bug that caused Readline's signal handlers to be installed beyond
3670 the bounds of a single call to readline().
3671
3672j. Fixed a bug that caused the `.' command to not redo the most recent `R'
3673 command in vi mode.
3674
3675k. Fixed a bug that caused ignoring case in completion matches to result in
3676 readline using the wrong match.
3677
3678l. Paren matching now works in vi insert mode.
3679
3680m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix
3681 work together.
3682
3683n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone
3684 in vi editing mode.
3685
3686o. Fixed a bug that caused the filename comparison code to not compare
3687 multibyte characters correctly when using case-sensitive or case-mapping
3688 comparisons.
3689
3690p. Fixed the input reading loop to call the input hook function only when there
3691 is no terminal input available.
3692
3693q. Fixed a bug that caused binding a macro to a multi-character key sequence
3694 where the sequence and macro value share a common prefix to not perform
3695 the macro replacement.
3696
3697r. Fixed several redisplay errors with multibyte characters and prompts
3698 containing invisible characters when using horizontal scrolling.
3699
3700s. Fixed a bug that caused redisplay errors when trying to overwrite
3701 existing characters using multibyte characters.
3702
37033. New Features in Bash
3704
3705a. The `helptopic' completion action now maps to all the help topics, not just
3706 the shell builtins.
3707
3708b. The `help' builtin no longer does prefix substring matching, so `help read'
3709 does not match `readonly'.
3710
3711c. The shell can be compiled to not display a message about processes that
3712 terminate due to SIGTERM.
3713
3714d. Non-interactive shells now react to the setting of checkwinsize and set
3715 LINES and COLUMNS after a foreground job exits.
3716
3717e. There is a new shell option, `globasciiranges', which, when set to on,
3718 forces globbing range comparisons to use character ordering as if they
3719 were run in the C locale.
3720
3721f. There is a new shell option, `direxpand', which makes filename completion
3722 expand variables in directory names in the way bash-4.1 did.
3723
3724g. In Posix mode, the `command' builtin does not change whether or not a
3725 builtin it shadows is treated as an assignment builtin.
3726
3727h. The `return' and `exit' builtins accept negative exit status arguments.
3728
3729i. The word completion code checks whether or not a filename containing a
3730 shell variable expands to a directory name and appends `/' to the word
3731 as appropriate. The same code expands shell variables in command names
3732 when performing command completion.
3733
3734j. In Posix mode, it is now an error to attempt to define a shell function
3735 with the same name as a Posix special builtin.
3736
3737k. When compiled for strict Posix conformance, history expansion is disabled
3738 by default.
3739
3740l. The history expansion character (!) does not cause history expansion when
3741 followed by the closing quote in a double-quoted string.
3742
3743m. `complete' and its siblings compgen/compopt now takes a new `-o noquote'
3744 option to inhibit quoting of the completions.
3745
3746n. Setting HISTSIZE to a value less than zero causes the history list to be
3747 unlimited (setting it 0 zero disables the history list).
3748
3749o. Setting HISTFILESIZE to a value less than zero causes the history file size
3750 to be unlimited (setting it to 0 causes the history file to be truncated
3751 to zero size).
3752
3753p. The `read' builtin now skips NUL bytes in the input.
3754
3755q. There is a new `bind -X' option to print all key sequences bound to Unix
3756 commands.
3757
3758r. When in Posix mode, `read' is interruptible by a trapped signal. After
3759 running the trap handler, read returns 128+signal and throws away any
3760 partially-read input.
3761
3762s. The command completion code skips whitespace and assignment statements
3763 before looking for the command name word to be completed.
3764
3765t. The build process has a new mechanism for constructing separate help files
3766 that better reflects the current set of compilation options.
3767
3768u. The -nt and -ot options to test now work with files with nanosecond
3769 timestamp resolution.
3770
3771v. The shell saves the command history in any shell for which history is
3772 enabled and HISTFILE is set, not just interactive shells.
3773
3774w. The shell has `nameref' variables and new -n(/+n) options to declare and
3775 unset to use them, and a `test -R' option to test for them.
3776
3777x. The shell now allows assigning, referencing, and unsetting elements of
3778 indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which
3779 count back from the last element of the array.
3780
3781y. The {x}<word redirection feature now allows words like {array[ind]} and
3782 can use variables with special meanings to the shell (e.g., BASH_XTRACEFD).
3783
3784z. There is a new CHILD_MAX special shell variable; its value controls the
a0c0a00f 3785 number of exited child statuses the shell remembers.
ac50fbac
CR
3786
3787aa. There is a new configuration option (--enable-direxpand-default) that
3788 causes the `direxpand' shell option to be enabled by default.
3789
3790bb. Bash does not do anything special to ensure that the file descriptor
3791 assigned to X in {x}<foo remains open after the block containing it
3792 completes.
3793
3794cc. The `wait' builtin has a new `-n' option to wait for the next child to
3795 change status.
3796
3797dd. The `printf' %(...)T format specifier now uses the current time if no
3798 argument is supplied.
3799
3800ee. There is a new variable, BASH_COMPAT, that controls the current shell
3801 compatibility level.
3802
3803ff. The `popd' builtin now treats additional arguments as errors.
3804
3805gg. The brace expansion code now treats a failed sequence expansion as a
3806 simple string and will continue to expand brace terms in the remainder
3807 of the word.
3808
38094. New Features in Readline
3810
3811a. Readline is now more responsive to SIGHUP and other fatal signals when
3812 reading input from the terminal or performing word completion but no
3813 longer attempts to run any not-allowable functions from a signal handler
3814 context.
3815
3816b. There are new bindable commands to search the history for the string of
3817 characters between the beginning of the line and the point
3818 (history-substring-search-forward, history-substring-search-backward)
3819
3820c. Readline allows quoted strings as the values of variables when setting
3821 them with `set'. As a side effect, trailing spaces and tabs are ignored
3822 when setting a string variable's value.
3823
3824d. The history library creates a backup of the history file when writing it
3825 and restores the backup on a write error.
3826
3827e. New application-settable variable: rl_filename_stat_hook: a function called
3828 with a filename before using it in a call to stat(2). Bash uses it to
3829 expand shell variables so things like $HOME/Downloads have a slash
3830 appended.
3831
3832f. New bindable function `print-last-kbd-macro', prints the most-recently-
3833 defined keyboard macro in a reusable format.
3834
3835g. New user-settable variable `colored-stats', enables use of colored text
3836 to denote file types when displaying possible completions (colored analog
3837 of visible-stats).
3838
3839h. New user-settable variable `keyseq-timout', acts as an inter-character
3840 timeout when reading input or incremental search strings.
3841
3842i. New application-callable function: rl_clear_history. Clears the history list
3843 and frees all readline-associated private data.
3844
3845j. New user-settable variable, show-mode-in-prompt, adds a characters to the
3846 beginning of the prompt indicating the current editing mode.
3847
3848k. New application-settable variable: rl_input_available_hook; function to be
3849 called when readline needs to check whether there is data available on its
3850 input source. The default hook checks rl_instream.
3851
3852l. Readline calls an application-set event hook (rl_signal_event_hook) after
3853 it gets a signal while reading input (read returns -1/EINTR but readline
3854 does not handle the signal immediately) to allow the application to handle
3855 or otherwise note it. Not currently called for SIGHUP or SIGTERM.
3856
3857m. If the user-settable variable `history-size' is set to a value less than
3858 0, the history list size is unlimited.
3859
3860------------------------------------------------------------------------------
495aee44
CR
3861This document details the changes between this version, bash-4.2-release,
3862and the previous version, bash-4.2-rc2.
3863
38641. Changes to Bash
3865
3866a. Fixed a bug that caused some variables to be clobbered by a longjmp,
3867 resulting in stack corruption.
3868
3869------------------------------------------------------------------------------
3870This document details the changes between this version, bash-4.2-rc2,
3871and the previous version, bash-4.2-rc1.
3872
38731. Changes to Bash
3874
3875a. Changes to bash_directory_completion_hook so that it's assigned to the
3876 readline rl_directory_rewrite_hook variable, which modifies the directory
3877 name passed to opendir without modifying the directory name the user
3878 typed.
3879
3880b. Fixed bug in select builtin that caused it to not terminate correctly if
3881 the read timed out due to $TMOUT.
3882
3883c. Fixed a problem that resulted in non-repeatable sequences of random
3884 numbers when RANDOM=0.
3885
3886------------------------------------------------------------------------------
3887This document details the changes between this version, bash-4.2-rc1,
3888and the previous version, bash-4.2-beta.
3889
38901. Changes to Bash
3891
3892a. Fixed a bug that caused some redirection errors to leak file descriptors.
3893
3894b. Fixed a bug that caused unary `+' and `-' arithmetic operators to have a
3895 higher precedence than unary `!' and `~'.
3896
3897c. Fixed a bug that caused simple commands in a pipeline to affect the exit
3898 status ($?) seen by subsequent pipeline commands.
3899
3900d. A number of cygwin-specific changes to avoid the use of text-mode files
3901 and file access, and to make sure that \r is handled correctly.
3902
3903e. Fixed a bug that caused the read builtin to not return failure if an
3904 attempt is made to assign to a readonly variable.
3905
3906f. Fixed a bug that caused some builtin usage messages to not be translated.
3907
3908g. Fixed a bug that caused the getopts builtin to not return failure if an
3909 attempt is made to assign to a readonly variable. Now it returns 2.
3910
3911h. Fixed the cd and pwd builtins to return failure if PWD is readonly and
3912 cannot be assigned to.
3913
3914i. Added code to check the return value of access(2) on Solaris systems,
3915 since it returns success for executable tests (e.g., `test -x') when
3916 run by root, even if the file permissions don't allow execution.
3917
39182. Changes to Readline
3919
3920a. Fixed a bug that caused directory names in words to be completed to not
3921 be dequoted correctly.
3922
39233. New Features in Bash
3924
39254. New Features in Readline
3926
3927------------------------------------------------------------------------------
3928This document details the changes between this version, bash-4.2-beta,
3929and the previous version, bash-4.2-alpha.
3930
39311. Changes to Bash
3932
3933a. Fixed a bug that caused the \W prompt string escape to not add a closing
3934 NULL.
3935
3936b. Fixed a bug that caused partially-quoted words that were not subject to
3937 word splitting to retained quoted NULLs.
3938
3939c. Added considerable efficiency speedups when pattern matching in multibyte
3940 locales by skipping multibyte character functions where possible.
3941
3942d. Added considerable speedups to variable expansion when in multibyte locales.
3943
3944e. Fixed a bug that caused the expansion of $* when there are no positional
3945 parameters to cause the shell to dump core when used in a pattern
3946 matching context.
3947
3948f. Fixed a bug that caused variable expansions preceding regular builtins to
3949 not change the shell environment during their execution.
3950
39512. Changes to Readline
3952
3953a. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave
3954 as if it were a negative argument.
3955
3956------------------------------------------------------------------------------
3957This document details the changes between this version, bash-4.2-alpha,
3958and the previous version, bash-4.1-release.
3959
39601. Changes to Bash
3961
3962a. Fixed a bug in the parser when processing alias expansions containing
3963 quoted newlines.
3964
3965b. Fixed a memory leak in associative array expansion.
3966
3967c. Fixed a bug that caused quoted here-strings to be requoted when printed.
3968
3969d. Fixed a bug in arithmetic expansion that caused the index in an array
3970 expansion to be evaluated twice under certain circumstances.
3971
3972e. Fixed several bugs with the expansion and display of variables that have
3973 been given attributes but not values and are technically unset.
3974
3975f. Fixed a bug that caused core dumps when using filename completion that
3976 expands to a filename containing a globbing character.
3977
3978g. Fixed a bug that caused assignment statements preceding a special builtin
3979 when running in Posix mode to not persist after the builtin completed
3980 when the special builtin was executed in a shell function without any
3981 local variables.
3982
3983h. Fixed a bug that caused a command to remain in the hash table even after
3984 `hash command' did not find anything if there was already an existing
3985 hashed pathname.
3986
3987i. Fixed several bugs caused by executing unsafe functions from a signal
3988 handler in the cases where a signal handler is executed immediately
3989 rather than setting a flag for later execution.
3990
3991j. Fixed a bug that caused some internal flag variables to be set
3992 incorrectly if `read -t' timed out.
3993
3994k. Fixed a Posix compatibility issue by making sure that a backslash escaping
3995 a `}' within a double-quoted ${...} parameter expansion is removed as part
3996 of the parameter expansion.
3997
3998l. Fixed a bug that caused execution of a trap to overwrite PIPESTATUS.
3999
4000m. Fixed a bug that caused here documents to not be displayed correctly
4001 when attached to commands inside compound commands.
4002
4003n. Fixed a bug that caused the printf builtin to use the wrong precision
4004 when using the `*' modifier.
4005
4006o. Fixed a bug that caused an arriving SIGCHLD to interrupt output functions
4007 like those invoked by echo or printf.
4008
4009p. Changed to use a more robust mechanism than eaccess(2) when test is
4010 checking filenames for execution permission.
4011
4012q. Fixed a bug that caused spurious semicolons to be added into the command
4013 history in certain cases.
4014
4015r. Fixed a bug that caused the shell to free non-allocated memory when
4016 unsetting element 0 of an associative array after it was assigned
4017 implicitly.
4018
4019s. Fixed a bug that could cause the shell to dump core if using the `v'
4020 vi editing command on a multi-line command.
4021
4022t. Fixed a bug that left FIFOs opened by process substitutions open long
4023 enough to potentially cause file descriptor exhaustion when running a
4024 shell function or shell builtin.
4025
4026u. Fixed a bug that caused the history expansion functions to not recognize
4027 process substitution or extended glob patterns as single words.
4028
4029v. Fixed a bug that caused restricted shells to set a restricted command's
4030 exit status incorrectly.
4031
4032w. Fixed a bug that caused bash to ignore the wrong set of filenames when
4033 completing a command using the `complete-filename' readline command.
4034
4035x. Fixed a bug that caused a -PID argument following a -s sig or -n sig to
4036 not be interpreted as a signal specification.
4037
4038y. Changed posix-mode behavior of a parse error in a `.' script or `eval'
4039 command to exit the shell under Posix-specified conditions. Previous
4040 versions printed a warning.
4041
4042z. Fixed a bug in \W prompt expansion that resulted in incorrect expansion
4043 in the event of overlapping strings.
4044
4045aa. Fixed a bug that caused the := parameter expansion operator to return the
4046 wrong value as the result of the expansion.
4047
4048bb. When in Posix mode, a single quote is not treated specially in a
4049 double-quoted ${...} expansion, unless the expansion operator is
4050 # or % or the non-Posix `//', `^', and `,'. In particular, it does
4051 not define a new quoting context. This is from Posix interpretation 221.
4052
4053cc. Fixed a bug that inadvertently allowed program names containing slashes
4054 to be entered into the command hash table.
4055
4056dd. Fixed a bug that caused the select builtin to incorrectly compute the
4057 display width of the arguments in the presence of multibyte characters.
4058
4059ee. Fixed a bug that caused bash to not change the xtrace file descriptor if
4060 BASH_XTRACEFD was found in the shell environment at startup.
4061
4062ff. Fixed a memory leak in the pattern removal parameter expansion.
4063
4064gg. Fixed a bug that caused SIGINT to fail to interrupt a nested loop if the
4065 loop was in a pipeline.
4066
4067hh. Fixed a problem in $(...) parsing that caused the parser to add an extra
4068 space to a here-document delimiter if the first word contained a `/'.
4069
4070ii. Fixed a bug that caused functions defined with the `function' reserved
4071 word to require braces around the function body.
4072
4073jj. Fixed a bug that caused bash to dump core when a variable expansion being
4074 used as an array subscript failed.
4075
4076kk. Fixed a bug that caused bash to dump core if the case-modification
4077 expansions were used on a variable with a null value.
4078
4079ll. Fixed a bug that caused partially-quoted strings to be split incorrectly
4080 if a variable with a null value was expanded within double quotes.
4081
4082mm. The pattern substitution word expansion has been sped up dramatically
4083 when running in a locale with multibyte characters.
4084
4085nn. Fixed a bug that caused history -a to not write the correct lines to
4086 the history file if all the new lines in the history list were added
4087 since the last time the history file was read or written.
4088
4089oo. Fixed a bug that caused completion of a word with an unclosed `` command
4090 substitution to set the prompt incorrectly.
4091
4092pp. Fixed a bug that caused extended globbing patterns in $HISTIGNORE or
4093 $GLOBIGNORE to be incorrectly scanned.
4094
4095qq. Fixed a bug caused by closing file descriptors 3-20 on shell startup. The
4096 shell now sets them to close-on-exec.
4097
4098rr. Fixed a bug that caused the exit status of `exec file' to be set incorrectly
4099 if `file' was a directory.
4100
4101ss. Fixed a bug in the `.' builtin to make a non-interactive posix-mode shell
4102 exit if the file argument to `.' is not found. Prefixing exec with
4103 `command' makes the shell not exit. Posix requires this behavior.
4104
4105tt. Fixed a bug that caused `sh -c 'command exec; exit 1' to hang.
4106
4107uu. Fixed a bug in $(...) command substitution parsing that caused the shell
4108 to treat backslash-newline incorrectly when parsing a comment.
4109
4110vv. Fixed bug that caused brace expansion sequence generation to misbehave
4111 when supplied integers greater than 2**31 - 1.
4112
4113ww. Fixed a bug that caused failure to save file descriptors for redirections
4114 to corrupt shell file descriptors.
4115
4116xx. Fixed a bug that caused bash-forward-shellword to not correctly handle
4117 quoted strings.
4118
41192. Changes to Readline
4120
4121a. Fixed a bug that caused the unconverted filename to be added to the list of
4122 completions when the application specified filename conversion functions.
4123
4124b. Fixed a bug that caused the wrong filename to be passed to opendir when the
4125 application has specified a filename dequoting function.
4126
4127c. Fixed a bug when repeating a character search in vi mode in the case where
4128 there was no search to repeat.
4129
4130d. When show-all-if-ambiguous is set, the completion routines no longer insert
4131 a common match prefix that is shorter than the text being completed.
4132
4133e. The full set of vi editing commands may now be used in callback mode.
4134
4135f. Fixed a bug that caused readline to not update its idea of the terminal
4136 dimensions while running in `no-echo' mode.
4137
4138h. Fixed a bug that caused readline to dump core if an application called
4139 rl_prep_terminal without setting rl_instream.
4140
4141i. Fixed a bug that caused meta-prefixed characters bound to incremental
4142 search forward or backward to not be recognized if they were typed
4143 subsequently.
4144
4145j. The incremental search code treats key sequences that map to the same
4146 functions as (default) ^G, ^W, and ^Y as equivalent to those characters.
4147
4148k. Fixed a bug in menu-complete that caused it to misbehave with large
4149 negative argument.
4150
4151l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked
4152 at the end of the line.
4153
41543. New Features in Bash
4155
4156a. `exec -a foo' now sets $0 to `foo' in an executable shell script without a
4157 leading #!.
4158
4159b. Subshells begun to execute command substitutions or run shell functions or
4160 builtins in subshells do not reset trap strings until a new trap is
4161 specified. This allows $(trap) to display the caller's traps and the
4162 trap strings to persist until a new trap is set.
4163
4164c. `trap -p' will now show signals ignored at shell startup, though their
4165 disposition still cannot be modified.
4166
4167d. $'...', echo, and printf understand \uXXXX and \UXXXXXXXX escape sequences.
4168
4169e. declare/typeset has a new `-g' option, which creates variables in the
4170 global scope even when run in a shell function.
4171
4172f. test/[/[[ have a new -v variable unary operator, which returns success if
4173 `variable' has been set.
4174
4175g. Posix parsing changes to allow `! time command' and multiple consecutive
4176 instances of `!' (which toggle) and `time' (which have no cumulative
4177 effect).
4178
4179h. Posix change to allow `time' as a command by itself to print the elapsed
4180 user, system, and real times for the shell and its children.
4181
4182j. $((...)) is always parsed as an arithmetic expansion first, instead of as
4183 a potential nested command substitution, as Posix requires.
4184
4185k. A new FUNCNEST variable to allow the user to control the maximum shell
4186 function nesting (recursive execution) level.
4187
4188l. The mapfile builtin now supplies a third argument to the callback command:
4189 the line about to be assigned to the supplied array index.
4190
4191m. The printf builtin has a new %(fmt)T specifier, which allows time values
4192 to use strftime-like formatting.
4193
4194n. There is a new `compat41' shell option.
4195
4196o. The cd builtin has a new Posix-mandated `-e' option.
4197
4198p. Negative subscripts to indexed arrays, previously errors, now are treated
4199 as offsets from the maximum assigned index + 1.
4200
4201q. Negative length specifications in the ${var:offset:length} expansion,
4202 previously errors, are now treated as offsets from the end of the variable.
4203
4204r. Parsing change to allow `time -p --'.
4205
4206s. Posix-mode parsing change to not recognize `time' as a keyword if the
4207 following token begins with a `-'. This means no more Posix-mode
4208 `time -p'. Posix interpretation 267.
4209
4210t. There is a new `lastpipe' shell option that runs the last command of a
4211 pipeline in the current shell context. The lastpipe option has no
4212 effect if job control is enabled.
4213
4214u. History expansion no longer expands the `$!' variable expansion.
4215
4216v. Posix mode shells no longer exit if a variable assignment error occurs
4217 with an assignment preceding a command that is not a special builtin.
4218
4219w. Non-interactive mode shells exit if -u is enabled and an attempt is made
4220 to use an unset variable with the % or # expansions, the `//', `^', or
4221 `,' expansions, or the parameter length expansion.
4222
4223x. Posix-mode shells use the argument passed to `.' as-is if a $PATH search
4224 fails, effectively searching the current directory. Posix-2008 change.
4225
42264. New Features in Readline
4227
4228a. The history library does not try to write the history filename in the
4229 current directory if $HOME is unset. This closes a potential security
4230 problem if the application does not specify a history filename.
4231
4232b. New bindable variable `completion-display-width' to set the number of
4233 columns used when displaying completions.
4234
4235c. New bindable variable `completion-case-map' to cause case-insensitive
4236 completion to treat `-' and `_' as identical.
4237
4238d. There are new bindable vi-mode command names to avoid readline's case-
4239 insensitive matching not allowing them to be bound separately.
4240
4241e. New bindable variable `menu-complete-display-prefix' causes the menu
4242 completion code to display the common prefix of the possible completions
4243 before cycling through the list, instead of after.
4244
4245------------------------------------------------------------------------------
0001803f
CR
4246This document details the changes between this version, bash-4.1-rc,
4247and the previous version, bash-4.1-beta.
4248
42491. Changes to Bash
4250
4251a. Fixed a bug that caused printf to not return a partial value when it
4252 encountered an error while converting an integer argument.
4253
4254b. Fixed a bug that caused setting one of the compatNN options to not
4255 turn off the others.
4256
4257c. The (undocumented) --wordexp option is no longer included by default.
4258
4259d. Fixed a bug in conditional command execution that caused it to not
4260 correctly ignore the exit status under certain circumstances.
4261
4262e. Added a configure-time check for correctly-working asprintf/snprintf.
4263
4264f. Fixed some problems with line number calculation and display when sourcing
4265 a file in an interactive shell.
4266
4267g. Fixed a bug that caused the shell to crash when using `declare -A foo=bar'.
4268
4269h. Fixed a bug that caused an off-by-one error when calculating the directories
4270 to display with the PROMPT_DIRTRIM option.
4271
42722. Changes to Readline
4273
4274a. Fixed a bug that caused applications using the callback interface to not
4275 react to SIGINT (or other signals) until another character arrived.
4276
4277------------------------------------------------------------------------------
4278This document details the changes between this version, bash-4.1-beta,
4279and the previous version, bash-4.1-alpha.
4280
42811. Changes to Bash
4282
4283a. Fixed a bug in mapfile that caused the shell to crash if it was passed the
4284 name of an associative array.
4285
4286b. Fixed a bug that caused the shell to incorrectly split case patterns if
4287 they contained characters in $IFS.
4288
4289c. Fixed a bug that caused the shell to set $? to the wrong value when using
4290 a construct ending with a variable assignment with set -x enabled and PS4
4291 containing a command substitution.
4292
4293d. Fixed a bug that caused the shell to read commands incorrectly if an
4294 expansion error occurred under certain conditions in a user-specified
4295 subshell.
4296
4297e. Fixed a bug that caused the shell to set $? incorrectly if a parse error
4298 occurred in an evaluation context ("eval", trap command, dot script, etc.)
4299
4300f. Fixed a bug that caused the shell to attempt command substitution
4301 completion within a single-quoted string.
4302
4303g. Fixed a bug that caused the shell to insert an extra single quote during
4304 word completion.
4305
4306h. Fixed a bug that caused the shell to crash if invoked with the environment
4307 variable EMACS having a null value.
4308
4309i. Fixed a bug that caused bash to incorrectly report the presence of new
4310 mail in a `maildir' environment.
4311
4312j. Fixed a bug that caused the shell to not recognize a here-document ending
4313 delimiter inside a command substitution.
4314
4315k. Fixed a bug that caused the shell to crash when a a dynamic array variable
4316 was assigned a scalar value.
4317
43182. Changes to Readline
4319
43203. New Features in Bash
4321
4322a. The mapfile/readarray builtin no longer stores the commands it invokes via
4323 callbacks in the history list.
4324
4325b. There is a new `compat40' shopt option.
4326
4327c. The < and > operators to [[ do string comparisons using the current locale
4328 only if the compatibility level is greater than 40 (set to 41 by default).
4329
43304. New Features in Readline
4331
4332------------------------------------------------------------------------------
4333This document details the changes between this version, bash-4.1-alpha,
4334and the previous version, bash-4.0-release.
4335
43361. Changes to Bash
4337
4338a. Fixed bugs in the parser involving new parsing of the commands contained
4339 in command substitution when the substitution is read.
4340
4341b. Fixed a bug that caused the shell to dump core when performing programmable
4342 completion using a shell function.
4343
4344c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong
4345 time.
4346
4347d. Fixed a bug that caused the shell to dump core when listing jobs in the
4348 `exit' builtin.
4349
4350e. Fixed several bugs encountered when reading subscripts in associative
4351 array assignments and expansions.
4352
4353f. Fixed a bug that under some circumstances caused an associative array to
4354 be converted to an indexed array.
4355
4356g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set
4357 $? to a value > 128.
4358
4359h. Fixed a bug that caused the shell to remove FIFOs associated with process
4360 substitution inside shell functions.
4361
4362i. Fixed a bug that caused terminal attributes to not be reset when the
4363 `read' builtin timed out.
4364
4365j. Fixed a bug in brace expansion that caused unwanted zero padding of the
4366 expanded terms.
4367
4368k. Fixed a bug that prevented the |& construct from working as intended when
4369 used with a simple command with additional redirections.
4370
8868edaf 4371l. Fixed a bug with the case statement ;& terminator that caused the shell to
0001803f
CR
4372 dereference a NULL pointer.
4373
4374m. Fixed a bug that caused assignment statements or redirections preceding
4375 a simple command name to inhibit alias expansion.
4376
4377n. Fixed the behavior of `set -u' to conform to the latest Posix interpretation:
4378 every expansion of an unset variable except $@ and $* will cause the
4379 shell to exit.
4380
4381o. Fixed a bug that caused double-quoted expansions of $* inside word
4382 expansions like ${x#$*} to not expand properly when $IFS is empty.
4383
4384p. Fixed a bug that caused traps to set $LINENO to the wrong value when they
4385 execute.
4386
4387q. Fixed a bug that caused off-by-one errors when computing history lines in
4388 the `fc' builtin.
4389
4390r. Fixed a bug that caused some terminating signals to not exit the shell
4391 quickly enough, forcing the kernel to send the signal (e.g., SIGSEGV)
4392 multiple times.
4393
4394s. Fixed a bug that caused the shell to attempt to add empty lines to the
4395 history list when reading here documents.
4396
4397t. Made some internal changes that dramatically speeds up sequential indexed
4398 array access.
4399
4400u. Fixed a bug that caused the shell to write past the end of a string when
4401 completing a double-quoted string ending in a backslash.
4402
4403v. Fixed a bug that caused the shell to replace too many characters when a
4404 pattern match was null in a ${foo//bar} expansion.
4405
4406w. Fixed bugs in the expansion of ** that caused duplicate directory names
4407 and the contents of the current directory to be omitted.
4408
4409x. Fixed a bug that caused $? to not be set correctly when referencing an
4410 unset variable with set -u and set -e enabled.
4411
4412y. Fixed a bug caused by executing an external program from the DEBUG trap
4413 while a pipeline was running. The effect was to disturb the pipeline
4414 state, occasionally causing it to hang.
4415
4416z. Fixed a bug that caused the ** glob expansion to dump core if it
4417 encountered an unsearchable directory.
4418
4419aa. Fixed a bug that caused `command -v' and `command -V' to not honor the
4420 path set by the -p option.
4421
4422bb. Fixed a bug that caused brace expansion to take place too soon in some
4423 compound array assignments.
4424
4425cc. Fixed a bug that caused programmable completion functions' changes to
4426 READLINE_POINT to not be reflected back to readline.
4427
4428dd. Fixed a bug that caused the shell to dump core if a trap was executed
4429 during a shell assignment statement.
4430
4431ee. Fixed an off-by-one error when computing the number of positional
4432 parameters for the ${@:0:n} expansion.
4433
4434ff. Fixed a problem with setting COMP_CWORD for programmable completion
4435 functions that could leave it set to -1.
4436
4437gg. Fixed a bug that caused the ERR trap to be triggered in some cases where
4438 `set -e' would not have caused the shell to exit.
4439
4440hh. Fixed a bug that caused changes made by `compopt' to not persist past the
4441 completion function in which compopt was executed.
4442
4443ii. Fixed a bug that caused the list of hostname completions to not be cleared
4444 when HOSTNAME was unset.
4445
4446jj. Fixed a bug that caused variable expansion in here documents to look in
4447 any temporary environment.
4448
4449kk. Bash and readline can now convert file names between precomposed and
4450 decomposed Unicode on Mac OS X ("keyboard" and file system forms,
4451 respectively). This affects filename completion (using new
4452 rl_filename_rewrite_hook), globbing, and readline redisplay.
4453
4454ll. The ERR and EXIT traps now see a non-zero value for $? when a parser
4455 error after set -e has been enabled causes the shell to exit.
4456
4457mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to
4458 not contain the correct number of digits.
4459
4460nn. Fixed a bug that caused the shell to free non-allocated memory when
4461 unsetting an associative array which had had a value implicitly assigned
4462 to index "0".
4463
4464oo. Fixed a memory leak in the ${!prefix@} expansion.
4465
4466pp. Fixed a bug that caused printf to not correctly report all write errors.
4467
4468qq. Fixed a bug that caused single and double quotes to act as delimiters
4469 when splitting a command line into words for programmable completion.
4470
4471rr. Fixed a bug that caused ** globbing that caused **/path/* to match every
4472 directory, not just those matching `path'.
4473
4474ss. Fixed a bug that caused the shell to dump core when running `help' without
4475 arguments if the terminal width was fewer than 7 characters.
4476
44772. Changes to Readline
4478
4479a. The SIGWINCH signal handler now avoids calling the redisplay code if
4480 one arrives while in the middle of redisplay.
4481
4482b. Changes to the timeout code to make sure that timeout values greater
4483 than one second are handled better.
4484
4485c. Fixed a bug in the redisplay code that was triggered by a prompt
4486 containing invisible characters exactly the width of the screen.
4487
4488d. Fixed a bug in the redisplay code encountered when running in horizontal
4489 scroll mode.
4490
4491e. Fixed a bug that prevented menu completion from properly completing
4492 filenames.
4493
4494f. Fixed a redisplay bug caused by a multibyte character causing a line to
4495 wrap.
4496
4497g. Fixed a bug that caused key sequences of two characters to not be
4498 recognized when a longer sequence identical in the first two characters
4499 was bound.
4500
4501h. Fixed a bug that caused history expansion to be attempted on $'...'
4502 single-quoted strings.
4503
4504i. Fixed a bug that caused incorrect redisplay when the prompt contained
4505 multibyte characters in an `invisible' sequence bracketed by \[ and
4506 \].
4507
4508j. Fixed a bug that caused history expansion to short-circuit after
4509 encountering a multibyte character.
4510
45113. New Features in Bash
4512
4513a. Here-documents within $(...) command substitutions may once more be
4514 delimited by the closing right paren, instead of requiring a newline.
4515
4516b. Bash's file status checks (executable, readable, etc.) now take file
4517 system ACLs into account on file systems that support them.
4518
4519c. Bash now passes environment variables with names that are not valid
4520 shell variable names through into the environment passed to child
4521 processes.
4522
4523d. The `execute-unix-command' readline function now attempts to clear and
4524 reuse the current line rather than move to a new one after the command
4525 executes.
4526
4527e. `printf -v' can now assign values to array indices.
4528
4529f. New `complete -E' and `compopt -E' options that work on the "empty"
4530 completion: completion attempted on an empty command line.
4531
4532g. New complete/compgen/compopt -D option to define a `default' completion:
4533 a completion to be invoked on command for which no completion has been
4534 defined. If this function returns 124, programmable completion is
4535 attempted again, allowing a user to dynamically build a set of completions
4536 as completion is attempted by having the default completion function
4537 install individual completion functions each time it is invoked.
4538
4539h. When displaying associative arrays, subscripts are now quoted.
4540
4541i. Changes to dabbrev-expand to make it more `emacs-like': no space appended
4542 after matches, completions are not sorted, and most recent history entries
4543 are presented first.
4544
4545j. The [[ and (( commands are now subject to the setting of `set -e' and the
4546 ERR trap.
4547
4548k. The source/. builtin now removes NUL bytes from the file before attempting
4549 to parse commands.
4550
4551l. There is a new configuration option (in config-top.h) that forces bash to
4552 forward all history entries to syslog.
4553
4554m. A new variable $BASHOPTS to export shell options settable using `shopt' to
4555 child processes.
4556
b3afafd8 4557n. There is a new configure option that forces the extglob option to be
0001803f
CR
4558 enabled by default.
4559
4560o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
4561 output to that file descriptor.
4562
4563p. If the optional left-hand-side of a redirection is of the form {var}, the
4564 shell assigns the file descriptor used to $var or uses $var as the file
4565 descriptor to move or close, depending on the redirection operator.
4566
4567q. The < and > operators to the [[ conditional command now do string
4568 comparison according to the current locale.
4569
4570r. Programmable completion now uses the completion for `b' instead of `a'
4571 when completion is attempted on a line like: a $(b c.
4572
4573s. Force extglob on temporarily when parsing the pattern argument to
4574 the == and != operators to the [[ command, for compatibility.
4575
4576t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is
4577 received and a trap on SIGCHLD is set to be Posix-mode only.
4578
4579u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS
4580 characters, ignoring delimiters like newline.
4581
45824. New Features in Readline
4583
4584a. New bindable function: menu-complete-backward.
4585
4586b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
4587 and C-p to menu-complete-backward.
4588
4589c. When in vi command mode, repeatedly hitting ESC now does nothing, even
4590 when ESC introduces a bound key sequence. This is closer to how
4591 historical vi behaves.
4592
4593d. New bindable function: skip-csi-sequence. Can be used as a default to
4594 consume key sequences generated by keys like Home and End without having
4595 to bind all keys.
4596
4597e. New application-settable function: rl_filename_rewrite_hook. Can be used
b3afafd8 4598 to rewrite or modify filenames read from the file system before they are
0001803f
CR
4599 compared to the word to be completed.
4600
4601f. New bindable variable: skip-completed-text, active when completing in the
4602 middle of a word. If enabled, it means that characters in the completion
4603 that match characters in the remainder of the word are "skipped" rather
4604 than inserted into the line.
4605
4606g. The pre-readline-6.0 version of menu completion is available as
4607 "old-menu-complete" for users who do not like the readline-6.0 version.
4608
4609h. New bindable variable: echo-control-characters. If enabled, and the
4610 tty ECHOCTL bit is set, controls the echoing of characters corresponding
4611 to keyboard-generated signals.
4612
4613i. New bindable variable: enable-meta-key. Controls whether or not readline
4614 sends the smm/rmm sequences if the terminal indicates it has a meta key
4615 that enables eight-bit characters.
4616
4617------------------------------------------------------------------------------
17345e5a
JA
4618This document details the changes between this version, bash-4.0-release,
4619and the previous version, bash-4.0-rc1.
4620
46211. Changes to Bash
4622
4623a. Changed the message printed when setlocale(3) fails to only include the
4624 strerror error text if the call changes errno.
4625
4626b. Changed trap command execution to reset the line number before running a
4627 trap (except DEBUG and RETURN traps).
4628
4629c. Fixed behavior of case-modifiying word expansions to not work on
4630 individual words within a variable's value.
4631
4632d. Fixed a bug that caused mapfile to not be interruptible when run in an
4633 interactive shell.
4634
4635e. Fixed a bug that caused mapfile to not run callbacks for the first line
4636 read.
4637
4638f. Fixed a bug that caused mapfile to not honor EOF typed in an interactive
4639 shell.
4640
4641g. Fixed the coprocess reaping code to not run straight from a signal handler.
4642
4643h. Fixed a bug that caused printf -b to ignore the first % conversion specifier
4644 in the format string on 64-bit systems.
4645
4646i. Fixed a bug that caused incorrect word splitting when `:', `=', or `~'
4647 appeared in $IFS.
4648
4649j. Fixed a bug that caused data corruption in the programmable completion code
4650 when a shell function called from a completion aborted execution.
4651
4652k. Fixed a bug that caused the CPU usage reported by the `time' builtin to be
4653 capped at 100%.
4654
4655l. Changed behavior of shell when -e option is in effect to reflect consensus
4656 of Posix shell standardization working group.
4657
4658m. Fixed a bug introduced in bash-4.0-alpha that caused redirections to not
4659 be displayed by `type' or `declare' when appearing in functions under
4660 certain circumstances.
4661
46622. Changes to Readline
4663
4664a. Fixed a bug that caused !(...) extended glob patterns to inhibit later
4665 history expansion.
4666
4667b. Reworked the signal handling to avoid calling disallowed functions from a
4668 signal handler.
4669
46703. New Features in Bash
4671
4672a. `readarray' is now a synonym for `mapfile'.
4673------------------------------------------------------------------------------
3185942a
JA
4674This document details the changes between this version, bash-4.0-rc1,
4675and the previous version, bash-4.0-beta2.
4676
46771. Changes to Bash
4678
4679a. Fixed a bug that caused parsing errors when a $()-style command
b3afafd8 4680 substitution was followed immediately by a quoted newline.
3185942a
JA
4681
4682b. Fixed a bug that caused extended shell globbing patterns beginning with
4683 `*(' to not work when used with pattern substitution word expansions.
4684
4685------------------------------------------------------------------------------
4686This document details the changes between this version, bash-4.0-beta2,
4687and the previous version, bash-4.0-beta.
4688
46891. Changes to Bash
4690
4691a. Fixed a bug that caused failed word expansions to set $? but not
4692 PIPESTATUS.
4693
4694b. Changed filename completion to quote the tilde in a filename with a
4695 leading tilde that exists in the current directory.
4696
4697c. Fixed a bug that caused a file descriptor leak when performing
4698 redirections attached to a compound command.
4699
4700d. Fixed a bug that caused expansions of $@ and $* to not exit the shell if
4701 the -u option was enabled and there were no posititional parameters.
4702
4703e. Fixed a bug that resulted in bash not terminating immediately if a
4704 terminating signal was received while performing output.
4705
4706f. Fixed a bug that caused the shell to crash after creating 256 process
4707 substitutions during word completion.
4708
47092. Changes to Readline
4710
4711a. Fixed a bug that caused redisplay errors when using prompts with invisible
4712 characters and numeric arguments to a command in a multibyte locale.
4713
4714b. Fixed a bug that caused redisplay errors when using prompts with invisible
4715 characters spanning more than two physical screen lines.
4716
4717------------------------------------------------------------------------------
4718This document details the changes between this version, bash-4.0-beta,
17345e5a 4719and the previous version, bash-4.0-alpha.
3185942a
JA
4720
47211. Changes to Bash
4722
4723a. Fixed a typo that caused a variable to be used before initialization
4724 while parsing Posix-style command substitutions.
4725
4726b. Fixed a bug that caused stray ^? when the expansion of a parameter used
4727 as part of a pattern removal expansion is empty, but part of a non-
4728 empty string.
4729
4730c. Fixed a bug that could cause strings not converted to numbers by strtol
4731 to be treated as if the conversion had been successful.
4732
4733d. The `return' builtin now accepts no options and requires a `--' before
4734 a negative return value, as Posix requires.
4735
4736e. Fixed a bug that caused local variables to be created with the empty
4737 string for a value rather than no value.
4738
4739f. Changed behavior so the shell now acts as if it received an interrupt
4740 when a pipeline is killed by SIGINT while executing a list.
4741
4742g. Fixed a bug that caused `declare var' and `typeset var' to initialize
4743 `var' to the empty string.
4744
4745h. Changed `bind' builtin to print a warning but proceed if invoked when
4746 line editing is not active.
4747
4748i. Fixed a bug that caused the shell to exit when the `errexit' option is
4749 set and a command in a pipeline returns a non-zero exit status.
4750
4751j. Fixed a bug that caused the shell to not run the exit trap in a command
4752 run with `bash -c' under some circumstances.
4753
4754k. Fixed a bug that caused parser errors to occasionally not set $? when
4755 running commands with `eval'.
4756
4757l. Fixed a bug that caused stray control characters when evaluating compound
4758 array assignments containing $'\x7f' escapes.
4759
4760m. Fixed a bug that caused redirections involving file descriptor 10 as the
4761 target to behave incorrectly.
4762
4763n. Fixed a bug that could cause memory to be freed multiple times when
4764 assigning to COMP_WORDBREAKS.
4765
4766o. Fixed a bug that could cause NULL pointer dereferences when COMP_WORDBREAKS
4767 was unset.
4768
47692. Changes to Readline
4770
47713. New Features in Bash
4772
4773a. A value of 0 for the -t option to `read' now returns success if there is
4774 input available to be read from the specified file descriptor.
4775
4776b. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
4777 mode.
4778
4779c. New bindable readline functions shell-forward-word and shell-backward-word,
4780 which move forward and backward words delimited by shell metacharacters
4781 and honor shell quoting.
4782
4783d. New bindable readline functions shell-backward-kill-word and shell-kill-word
4784 which kill words backward and forward, but use the same word boundaries
4785 as shell-forward-word and shell-backward-word.
4786
47874. New Features in Readline
4788
4789a. If the kernel supports it, readline displays special characters
4790 corresponding to a keyboard-generated signal when the signal is received.
4791
4792------------------------------------------------------------------------------
4793This document details the changes between this version, bash-4.0-alpha,
4794and the previous version, bash-3.2-release.
4795
47961. Changes to Bash
4797
4798a. Fixed several bugs in old-style `` command substitution parsing, including
4799 comment parsing and quoted string handling.
4800
4801b. Fixed problems parsing arguments to the [[ command's =~ regular expression
4802 matching operator: metacharacter and whitespace parsing.
4803
4804c. Fixed a bug that caused the shell to inappropriately reuse high-numbered
4805 file descriptors it used internally.
4806
4807d. Fixed a bug in pattern replacement word expansions that caused a `/' as
4808 the first character of an expanded pattern to be mistaken for a global
4809 replacement specifier.
4810
4811e. Fixed several problems with the asprintf and snprintf replacement functions
4812 that caused hangs and crashes.
4813
4814f. Fixed a bug in the calculation of the current and previous job that caused
4815 it to refer to incorrect jobs.
4816
4817g. Fixed a bug in the check for the validity of a hashed command pathname that
4818 caused unnecessary hash table deletions and additions.
4819
4820h. Fixed a bug that caused child processes to inherit the wrong value for $!.
4821
4822i. Fixed a bug that caused `.' to fail to read and execute commands from non-
4823 regular files such as devices or named pipes.
4824
4825j. Fixed a bug in printf formatting for the %x and %X expansions that occurred
4826 on some systems.
4827
4828k. Fixed a bug that caused the shell to crash when creating temporary files if
4829 $TMPDIR named a non-writable directory.
4830
4831l. Fixed a bug that caused the shell to ignore $TMPDIR when creating temporary
4832 files under some circumstances.
4833
4834m. Fixed a bug that caused named pipes created by process substitution to not
4835 be cleaned up.
4836
4837n. Fixed a bug that caused HISTTIMEFORMAT to not be honored when it appeared
4838 in the initial shell environment.
4839
4840o. Fixed several bugs in the expansion of $* and $@ (quoted and unquoted)
4841 when IFS is null or contains non-whitespace characters; the same changes
4842 apply to arrays subscripted with * or @.
4843
4844p. Fixed several problems with pattern substitution expansions on the
4845 positional parameters and arrays subscripted with * or @ that occurred
4846 when $IFS was set to the empty string.
4847
4848q. Made a change to the default locale initialization code that should
4849 result in better behavior from the locale-aware library functions.
4850
4851r. Fixed a bug that caused compacting the jobs list to drop jobs.
4852
4853s. Fixed a bug that caused jumps back to the top-level processing loop from
4854 a builtin command to leave the shell in an inconsistent state.
4855
4856t. Fixed a bug that caused characters that would be escaped internally to be
4857 doubled when escaped with a backslash.
4858
4859u. Fixed the initialization of mailboxes to not cause maildirs to be read
4860 (and stat(2) called for every message file) at shell startup.
4861
4862v. Fixed a bug that caused the shell to not display $PS2 when the read builtin
4863 reads a line continued with a backslash.
4864
4865w. Fixed a bug that caused errors in word splitting when $IFS contained
4866 characters used for internal quoting.
4867
4868x. Fixed bugs that caused problems with output from shell builtins not being
4869 completely displayed on some systems.
4870
4871y. Fixed a bug that caused output to be lost when a redirection is acting on
4872 the shell's output file descriptor.
4873
4874z. Fixed bugs caused by shell builtins not checking for all write errors.
4875
4876aa. Fixed a problem that caused the shell to dump core if expansions on the
4877 pattern passed to the pattern removal word expansions resulted in expansion
4878 errors.
4879
4880bb. Fixed a bug that caused bash to loop infinitely after creating and
4881 waiting for 4096 jobs.
4882
4883cc. Fixed a bug that caused bash to lose the status of a background job under
4884 certain circumstances.
4885
4886dd. Fixed a bug that caused bash to not look in the temporary environment
4887 when performing variable lookup under certain circumstances.
4888
4889ee. Fixed a bug that caused bash to close file descriptors greater than 10
4890 when they were used in redirections.
4891
4892ff. Fixed a problem that caused the shell to attempt to read from the standard
4893 input when called as `bash -i script'.
4894
4895gg. Fixed a memory leak and variable initialization problems when the -v option
4896 was supplied to `printf' that could cause incorrect results.
4897
4898hh. Fixed a bug that caused the `read' builtin to count bytes when the -n option
4899 was supplied, rather than (possibly multibyte) characters.
4900
4901ii. Fixed a bug when displaying a function due to not converting the function
4902 to an external form.
4903
4904jj. Changed job control initialization to ensure that the shell has a tty
4905 as its controlling terminal before enabling job control.
4906
4907kk. Fixed a bug with the `test' builtin that caused it to misinterpret
4908 arguments beginning with `-' but containing more than one character.
4909
4910ll. Fixed bug that could cause the shell to dump core in certain cases where
4911 a command sets the SIGINT disposition to the default.
4912
4913mm. Fixed a bug in the pattern replacement (affecting both word expansion
4914 and the `fc' builtin) that occurred when the pattern and replacement
4915 strings were empty.
4916
4917nn. Fixed a bug that caused an arithmetic evaluation error to disable all
4918 further evaluation.
4919
4920oo. Fixed a bug in pathname expansion that caused it to interpret backslashes
4921 in the pathname as quoting characters.
4922
4923pp. Fixed a bug in the replacement getcwd() implementation that could cause
4924 memory to be overwritten.
4925
4926qq. When in Posix mode, the `ulimit' builtin now uses a block size of 512 for
4927 the `-c' and `-f' options.
4928
4929rr. Brace expansion now allows process substitutions to pass through unchanged.
4930
4931ss. Fixed a problem in the command name completion code to avoid quoting
4932 escaped special characters twice when the command name begins with a tilde.
4933
4934tt. Fixed a problem in the printf builtin that resulted in single-byte
4935 output for the "'" escape, even when using multibyte characters.
4936
4937uu. Fixed a bug that caused the failure exit status to be lost when redirections
4938 attached to a compound command failed.
4939
4940vv. Fixed a bug that caused the internal random number generator to not be
4941 re-seeded correctly when creating a subshell.
4942
4943ww. Fixed a bug that could cause the bash replacement getcwd to overwrite
4944 memory.
4945
4946xx. Fixed a bug that caused the shell to not receive SIGINT if it was sent
4947 while the shell was waiting for a command substitution to terminate, and
4948 make sure the exit status is correct when it does.
4949
4950yy. Fixed a bug that resulted in the second and subsequent children spawned
4951 by a shell begun to run a command substitution being placed into the
4952 wrong process group.
4953
4954zz. Fixed a bug that caused the results of successful tilde expansion to be
4955 subject to pathname expansion and word splitting.
4956
4957aaa. Fixed a bug that could cause the shell to hang if it encountered an
4958 error that caused it to jump back to the top processing loop during a
4959 command substitution or `eval' command.
4960
4961bbb. Fixed a bug that caused the `read' builtin to use the tty's attributes
4962 instead of those of the file descriptor passed with the -u option when
4963 processing the -n and -d options.
4964
4965ccc. Fixed a bug that caused incorrect expansion of ${array[@]:foo} if the
4966 first character of $IFS was not whitespace.
4967
4968ddd. Fixed a bug that occurred when scanning for the ending delimiter of a
4969 ${parameter/pat/sub} expansion.
4970
4971eee. Fixed a bug that caused the shell to inappropriately expand command
4972 substitutions in words when expanding directory names for completion.
4973
4974fff. Fixed a bug that caused the `fc' builtin to look too far back in the
4975 history list under certain circumstances.
4976
4977ggg. Fixed a bug that caused a shell running in Posix mode to search $PWD for
4978 a file specified as an argument to source/. when the file was not found
4979 in $PATH.
4980
4981hhh. Fixed a bug that caused the shell to modify the case of a command word
4982 found via command completion when the shell was performing case-
4983 insensitive completion.
4984
4985iii. Fixed a bug that caused the shell to search $PATH for an argument to
4986 source/. even when it contained a `/'.
4987
4988jjj. Fixed a bug that caused brace expansion to misorder expansions when the
4989 locale did not have a collating order like aAbBcC...zZ.
4990
4991kkk. Fixed a bug that did not allow `set +o history' to have any effect when
4992 run in a startup file or from a sourced file.
4993
4994lll. Fixed a bug with the precedence of the ?: conditional arithmetic operator.
4995
4996mmm. Fixed a bug that caused side effects of temporary variable assignments
4997 to persist in the shell environment.
4998
4999nnn. Fixed a bug that caused the terminal to be left in non-canonical mode
5000 when using editing commands that invoke the an editor on the current
5001 command line.
5002
5003ooo. Fixed a bug that caused globbing characters and characters in $IFS to not
5004 be quoted appropriately when displaying assignment statements.
5005
5006ppp. Fixed a bug that caused the `-e' option to be inherited when sourcing a
5007 file or evaluating a command with `eval' even if the return value of the
5008 command was supposed to be ignored.
5009
5010qqq. Fixed a bug that caused the shell to attempt to created variables with
5011 invalid names if such names appeared in the initial environment.
5012
5013rrr. Fixed a bug with quote removal in strings where the final character is a
5014 backslash.
5015
5016sss. Fixed a bug that caused the effects of special variables to persist even
5017 when the variables were unset as part of the shell reinitializing itself
5018 to execute a shell script.
5019
5020ttt. Fixed a bug that caused the history to not be saved after `history -c' or
5021 `history -d' was executed until a sufficient number of commands had been
5022 saved to the history.
5023
5024uuu. Bash now parses command substitutions according to Posix rules: parsing
5025 the command contained in $() to find the closing delimiter.
5026
5027vvv. Fixed a bug that caused traps on SIGCHLD set in a SIGCHLD handler to
5028 not persist.
5029
5030www. Fixed a bug that didn't allow SIGCHLD to interrupt the `wait' builtin
5031 as Posix specifies.
5032
5033xxx. Invalid numeric arguments to shell builtins no longer cause the shell to
5034 short-circuit any executing compound command.
5035
5036yyy. Fixed a bug that caused the exit status to be lost when `break' was
5037 used to short-circuit a loop's execution.
5038
5039zzz. Fixed a bug that caused stray ^? characters to be left in expansions of
5040 "${array[*]}".
5041
5042aaaa. Bash now prints better error messages for here documents terminated by
5043 EOF and for identifying the incorrect token in an invalid arithmetic
5044 expression.
5045
5046bbbb. Fixed a bug in the variable length word expansion that caused it to
5047 incorrectly calculate the number of multibyte characters.
5048
5049cccc. Fixed a race condition that could result in the top-level shell setting
5050 the terminal's process group to an incorrect value if the process
5051 group was changed by a child of a child of the shell.
5052
5053dddd. Fixed a bug that caused here documents belonging to commands within a
5054 compound command to be displayed in a syntactially-incorrect form, which
5055 prevented them from being re-read as input.
5056
5057eeee. The shell displays more warnings about failures to set the locale.
5058
5059ffff. Fixed a bug that caused the body of a here-document to not be saved to
5060 the history list.
5061
5062gggg. Fixed a bug that caused configure to incorrectly conclude that FreeBSD
5063 had /dev/fd available, resulting in problems with process substitution.
5064
50652. Changes to Readline
5066
5067a. Fixed a number of redisplay errors in environments supporting multibyte
5068 characters.
5069
5070b. Fixed bugs in vi command mode that caused motion commands to inappropriately
5071 set the mark.
5072
5073c. When using the arrow keys in vi insertion mode, readline allows movement
5074 beyond the current end of the line (unlike command mode).
5075
5076d. Fixed bugs that caused readline to loop when the terminal has been taken
5077 away and reads return -1/EIO.
5078
5079e. Fixed bugs in redisplay occurring when displaying prompts containing
5080 invisible characters.
5081
5082f. Fixed a bug that caused the completion append character to not be reset to
5083 the default after an application-specified completion function changed it.
5084
5085g. Fixed a problem that caused incorrect positioning of the cursor while in
5086 emacs editing mode when moving forward at the end of a line while using
5087 a locale supporting multibyte characters.
5088
5089h. Fixed an off-by-one error that caused readline to drop every 511th
5090 character of buffered input.
5091
5092i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up.
5093
5094j. Fixed redisplay bugs caused by multiline prompts with invisible characters
5095 or no characters following the final newline.
5096
5097k. Fixed redisplay bug caused by prompts consisting solely of invisible
5098 characters.
5099
5100l. Fixed a bug in the code that buffers characters received very quickly in
5101 succession which caused characters to be dropped.
5102
5103m. Fixed a bug that caused readline to reference uninitialized data structures
8868edaf 5104 if it received a SIGWINCH before completing initialization.
3185942a
JA
5105
5106n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly
5107 and therefore unrepeatable.
5108
5109o. Fixed a bug that caused readline to disable echoing when it was being used
5110 with an output file descriptor that was not a terminal.
5111
5112p. Readline now blocks SIGINT while manipulating internal data structures
5113 during redisplay.
5114
5115q. Fixed a bug in redisplay that caused readline to segfault when pasting a
5116 very long line (over 130,000 characters).
5117
5118r. Fixed bugs in redisplay when using prompts with no visible printing
5119 characters.
5120
51213. New Features in Bash
5122
5123a. When using substring expansion on the positional parameters, a starting
5124 index of 0 now causes $0 to be prefixed to the list.
5125
5126b. The `help' builtin now prints its columns with entries sorted vertically
5127 rather than horizontally.
5128
5129c. There is a new variable, $BASHPID, which always returns the process id of
5130 the current shell.
5131
5132d. There is a new `autocd' option that, when enabled, causes bash to attempt
5133 to `cd' to a directory name that is supplied as the first word of a
5134 simple command.
5135
5136e. There is a new `checkjobs' option that causes the shell to check for and
5137 report any running or stopped jobs at exit.
5138
5139f. The programmable completion code exports a new COMP_TYPE variable, set to
5140 a character describing the type of completion being attempted.
5141
5142g. The programmable completion code exports a new COMP_KEY variable, set to
5143 the character that caused the completion to be invoked (e.g., TAB).
5144
5145h. If creation of a child process fails due to insufficient resources, bash
5146 will try again several times before reporting failure.
5147
5148i. The programmable completion code now uses the same set of characters as
5149 readline when breaking the command line into a list of words.
5150
5151j. The block multiplier for the ulimit -c and -f options is now 512 when in
5152 Posix mode, as Posix specifies.
5153
5154k. Changed the behavior of the read builtin to save any partial input received
5155 in the specified variable when the read builtin times out. This also
5156 results in variables specified as arguments to read to be set to the empty
5157 string when there is no input available. When the read builtin times out,
5158 it returns an exit status greater than 128.
5159
5160l. The shell now has the notion of a `compatibility level', controlled by
5161 new variables settable by `shopt'. Setting this variable currently
5162 restores the bash-3.1 behavior when processing quoted strings on the rhs
5163 of the `=~' operator to the `[[' command.
5164
5165m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number
5166 of threads) options.
5167
5168n. The -p option to `declare' now displays all variable values and attributes
5169 (or function values and attributes if used with -f).
5170
5171o. There is a new `compopt' builtin that allows completion functions to modify
5172 completion options for existing completions or the completion currently
5173 being executed.
5174
5175p. The `read' builtin has a new -i option which inserts text into the reply
5176 buffer when using readline.
5177
5178q. A new `-E' option to the complete builtin allows control of the default
5179 behavior for completion on an empty line.
5180
5181r. There is now limited support for completing command name words containing
5182 globbing characters.
5183
5184s. Changed format of internal help documentation for all builtins to roughly
5185 follow man page format.
5186
5187t. The `help' builtin now has a new -d option, to display a short description,
5188 and a -m option, to print help information in a man page-like format.
5189
5190u. There is a new `mapfile' builtin to populate an array with lines from a
5191 given file.
5192
5193v. If a command is not found, the shell attempts to execute a shell function
5194 named `command_not_found_handle', supplying the command words as the
5195 function arguments.
5196
5197w. There is a new shell option: `globstar'. When enabled, the globbing code
5198 treats `**' specially -- it matches all directories (and files within
5199 them, when appropriate) recursively.
5200
5201x. There is a new shell option: `dirspell'. When enabled, the filename
5202 completion code performs spelling correction on directory names during
5203 completion.
5204
5205y. The `-t' option to the `read' builtin now supports fractional timeout
5206 values.
5207
5208z. Brace expansion now allows zero-padding of expanded numeric values and
5209 will add the proper number of zeroes to make sure all values contain the
5210 same number of digits.
5211
5212aa. There is a new bash-specific bindable readline function: `dabbrev-expand'.
5213 It uses menu completion on a set of words taken from the history list.
5214
5215bb. The command assigned to a key sequence with `bind -x' now sets two new
5216 variables in the environment of the executed command: READLINE_LINE_BUFFER
5217 and READLINE_POINT. The command can change the current readline line
5218 and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT,
5219 respectively.
5220
0001803f 5221cc. There is a new &>> redirection operator, which appends the standard output
3185942a
JA
5222 and standard error to the named file.
5223
5224dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects
5225 the standard error for a command through a pipe.
5226
5227ee. The new `;&' case statement action list terminator causes execution to
5228 continue with the action associated with the next pattern in the
5229 statement rather than terminating the command.
5230
5231ff. The new `;;&' case statement action list terminator causes the shell to
5232 test the next set of patterns after completing execution of the current
5233 action, rather than terminating the command.
5234
5235gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an
5236 integer value greater than zero, prompt expansion of \w and \W will
5237 retain only that number of trailing pathname components and replace
5238 the intervening characters with `...'.
5239
5240hh. There are new case-modifying word expansions: uppercase (^[^]) and
5241 lowercase (,[,]). They can work on either the first character or
5242 array element, or globally. They accept an optional shell pattern
5243 that determines which characters to modify. There is an optionally-
5244 configured feature to include capitalization operators.
5245
5246ii. The shell provides associative array variables, with the appropriate
5247 support to create, delete, assign values to, and expand them.
5248
5249jj. The `declare' builtin now has new -l (convert value to lowercase upon
5250 assignment) and -u (convert value to uppercase upon assignment) options.
5251 There is an optionally-configurable -c option to capitalize a value at
5252 assignment.
5253
5254kk. There is a new `coproc' reserved word that specifies a coprocess: an
5255 asynchronous command run with two pipes connected to the creating shell.
5256 Coprocs can be named. The input and output file descriptors and the
5257 PID of the coprocess are available to the calling shell in variables
5258 with coproc-specific names.
5259
52604. New Features in Readline
5261
5262a. A new variable, rl_sort_completion_matches; allows applications to inhibit
5263 match list sorting (but beware: some things don't work right if
5264 applications do this).
5265
5266b. A new variable, rl_completion_invoking_key; allows applications to discover
5267 the key that invoked rl_complete or rl_menu_complete.
5268
5269c. The functions rl_block_sigint and rl_release_sigint are now public and
5270 available to calling applications who want to protect critical sections
5271 (like redisplay).
5272
5273d. The functions rl_save_state and rl_restore_state are now public and
5274 available to calling applications; documented rest of readline's state
5275 flag values.
5276
5277e. A new user-settable variable, `history-size', allows setting the maximum
5278 number of entries in the history list.
5279
5280f. There is a new implementation of menu completion, with several improvements
5281 over the old; the most notable improvement is a better `completions
5282 browsing' mode.
5283
5284g. The menu completion code now uses the rl_menu_completion_entry_function
5285 variable, allowing applications to provide their own menu completion
5286 generators.
5287
5288h. There is support for replacing a prefix of a pathname with a `...' when
5289 displaying possible completions. This is controllable by setting the
5290 `completion-prefix-display-length' variable. Matches with a common prefix
5291 longer than this value have the common prefix replaced with `...'.
5292
5293i. There is a new `revert-all-at-newline' variable. If enabled, readline will
5294 undo all outstanding changes to all history lines when `accept-line' is
5295 executed.
5296
5297------------------------------------------------------------------------------
0628567a
JA
5298This document details the changes between this version, bash-3.2-release,
5299and the previous version, bash-3.2-beta.
5300
53011. Changes to Bash
5302
5303a. Fixed a bug that caused the temporary environment passed to a command to
5304 affect the shell's environment under certain circumstances.
5305
5306b. Fixed a bug in the printf builtin that caused the %q format specifier to
5307 ignore empty string arguments.
5308
5309c. Improved multibyte character environment detection at configuration time.
5310
5311d. Fixed a bug in the read builtin that left spurious escape characters in the
5312 input after processing backslashes when assigning to an array variable.
5313
53142. Changes to Readline
5315
5316a. Fixed a redisplay bug that occurred in multibyte-capable locales when the
5317 prompt was one character longer than the screen width.
5318------------------------------------------------------------------------------
5319This document details the changes between this version, bash-3.2-beta,
5320and the previous version, bash-3.2-alpha.
5321
53221. Changes to Bash
5323
5324a. Changed the lexical analyzer to treat locale-specific blank characters as
5325 white space.
5326
5327b. Fixed a bug in command printing to avoid confusion between redirections and
5328 process substitution.
5329
5330c. Fixed problems with cross-compiling originating from inherited environment
5331 variables.
5332
5333d. Added write error reporting to printf builtin.
5334
5335e. Fixed a bug in the variable expansion code that could cause a core dump in
5336 a multi-byte locale.
5337
5338f. Fixed a bug that caused substring expansion of a null string to return
5339 incorrect results.
5340
5341g. BASH_COMMAND now retains its previous value while executing commands as the
5342 result of a trap, as the documentation states.
5343
53442. Changes to Readline
5345
5346a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
5347 the prompt and input line multiple times.
5348
5349b. Fixed history expansion to not be confused by here-string redirection.
5350
5351c. Readline no longer treats read errors by converting them to newlines, as
5352 it does with EOF. This caused partial lines to be returned from readline().
5353
5354------------------------------------------------------------------------------
5355This document details the changes between this version, bash-3.2-alpha,
5356and the previous version, bash-3.1-release.
5357
53581. Changes to Bash
5359
5360a. Fixed a source bug that caused the minimal configuration to not compile.
5361
5362b. Fixed memory leaks in error handling for the `read' builtin.
5363
5364c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit
5365 status.
5366
5367d. Fixed some parsing problems with compound array assignments.
5368
5369e. Added additional configuration changes for: NetBSD (incomplete multibyte
5370 character support)
5371
5372f. Fixed two bugs with local array variable creation when shadowing a variable
5373 of the same name from a previous context.
5374
5375g. Fixed the `read' builtin to restore the correct set of completion functions
5376 if a timeout occurs.
5377
5378h. Added code to defer the initialization of HISTSIZE (and its stifling of the
5379 history list) until the history file is loaded, allowing a startup file to
5380 override the default value.
5381
5382i. Tightened up the arithmetic expression parsing to produce better error
5383 messages when presented with invalid operators.
5384
5385j. Fixed the cross-compilation support to build the signal list at shell
5386 invocation rather than compile time if cross-compiling.
5387
5388k. Fixed multibyte support for non-gcc compilers (or compilers that do not
5389 allow automatic array variable sizing based on a non-constant value).
5390
5391l. Several fixes to the code that manages the list of terminated jobs and
5392 their exit statuses, and the list of active and recently-terminated jobs
5393 to avoid pid aliasing/wraparound and allocation errors.
5394
5395m. Fixed a problem that allowed scripts to die due to SIGINT while waiting
5396 for children, even when started in the background or otherwise ignoring
5397 SIGINT.
5398
5399n. Fixed a bug that caused shells invoked as -/bin/bash from not being
5400 recognized as login shells.
5401
5402o. Fixed a problem that caused shells in the background to give the terminal
5403 to a process group other than the foreground shell process group.
5404
5405p. Fixed a problem with extracting the `varname' in ${#varname}.
5406
5407q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby
5408 calling functions that may not be called in a signal handler context --
5409 but set a flag and exit afterward (like SIGINT).
5410
5411r. Changed the brace expansion code to skip over braces that don't begin a
5412 valid matched brace expansion construct.
5413
5414s. Fixed `typeset' and `declare' to not require that their shell function
5415 operands to be valid shell identifiers.
5416
5417t. Changed `test' to use access(2) with a temporary uid/euid swap when testing
5418 file attributes and running setuid, and access(2) in most other cases.
5419
5420u. Changed completion code to not attempt command name completion on a line
5421 consisting solely of whitespace when no_empty_command_completion is set.
5422
5423v. The `hash' builtin now prints nothing in posix mode when the hash table is
5424 empty, and prints a message to that effect to stdout instead of stderr
5425 when not in posix mode.
5426
5427w. Fixed a bug in the extended pattern matching code that caused it to fail to
5428 match periods with certain patterns.
5429
5430x. Fixed a bug that caused the shell to dump core when performing filename
5431 generation in directories with thousands of files.
5432
5433y. Returned to the original Bourne shell rules for parsing ``: no recursive
5434 parsing of embedded quoted strings or ${...} constructs.
5435
8868edaf 5436z. The inheritance of the DEBUG, RETURN, and ERR traps is now dependent only
0628567a
JA
5437 on the settings of the `functrace' and `errtrace' shell options, rather
5438 than whether or not the shell is in debugging mode.
5439
5440aa. Fixed a problem with $HOME being converted to ~ in the expansion of
5441 members of the DIRSTACK array.
5442
5443bb. Fixed a problem with quoted arguments to arithmetic expansions in certain
5444 constructs.
5445
5446cc. The command word completion code now no longer returns matching directories
5447 while searching $PATH.
5448
5449dd. Fixed a bug with zero-padding and precision handling in snprintf()
5450 replacement.
5451
5452ee. Fixed a bug that caused the command substitution code not to take embedded
5453 shell comments into account.
5454
5455ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an
5456 arithmetic substitution.
5457
5458gg. Fixed a bug in the prompt expansion code that inappropriately added a
5459 \001 before a \002 under certain circumstances.
5460
5461hh. Fixed a bug that caused `unset LANG' to not properly reset the locale
5462 (previous versions would set the locale back to what it was when bash
5463 was started rather than the system's "native" locale).
5464
5465ii. Fixed a bug that could cause file descriptors > 10 to not be closed even
5466 when closed explicitly by a script.
5467
5468jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting
5469 inside double-quoted command substitutions.
5470
5471kk. Fixed a bug that could cause core dumps when `return' was executed as the
5472 last element of a pipeline inside a shell function.
5473
5474ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in
5475 the jobs list.
5476
54772. Changes to Readline
5478
5479a. Fixed a problem that caused segmentation faults when using readline in
5480 callback mode and typing consecutive DEL characters on an empty line.
5481
5482b. Fixed several redisplay problems with multibyte characters, all having to
5483 do with the different code paths and variable meanings between single-byte
5484 and multibyte character redisplay.
5485
5486c. Fixed a problem with key sequence translation when presented with the
5487 sequence \M-\C-x.
5488
5489d. Fixed a problem that prevented the `a' command in vi mode from being
5490 undone and redone properly.
5491
5492e. Fixed a problem that prevented empty inserts in vi mode from being undone
5493 properly.
5494
5495f. Fixed a problem that caused readline to initialize with an incorrect idea
5496 of whether or not the terminal can autowrap.
5497
5498g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
5499 convert-meta and use \e where appropriate.
5500
5501h. Changed the default filename completion function to call the filename
5502 dequoting function if the directory completion hook isn't set. This means
5503 that any directory completion hooks need to dequote the directory name,
5504 since application-specific hooks need to know how the word was quoted,
5505 even if no other changes are made.
5506
5507i. Fixed a bug with creating the prompt for a non-interactive search string
5508 when there are non-printing characters in the primary prompt.
5509
5510j. Fixed a bug that caused prompts with invisible characters to be redrawn
5511 multiple times in a multibyte locale.
5512
5513k. Fixed a bug that could cause the key sequence scanning code to return the
5514 wrong function.
5515
5516l. Fixed a problem with the callback interface that caused it to fail when
5517 using multi-character keyboard macros.
5518
5519m. Fixed a bug that could cause a core dump when an edited history entry was
5520 re-executed under certain conditions.
5521
5522n. Fixed a bug that caused readline to reference freed memory when attmpting
5523 to display a portion of the prompt.
5524
55253. New Features in Bash
5526
5527a. Changed the parameter pattern replacement functions to not anchor the
5528 pattern at the beginning of the string if doing global replacement - that
5529 combination doesn't make any sense.
5530
5531b. When running in `word expansion only' mode (--wordexp option), inhibit
5532 process substitution.
5533
5534c. Loadable builtins now work on MacOS X 10.[34].
5535
5536d. Shells running in posix mode no longer set $HOME, as POSIX requires.
5537
5538e. The code that checks for binary files being executed as shell scripts now
5539 checks only for NUL rather than any non-printing character.
5540
5541f. Quoting the string argument to the [[ command's =~ operator now forces
5542 string matching, as with the other pattern-matching operators.
5543
55444. New Features in Readline
5545
5546a. Calling applications can now set the keyboard timeout to 0, allowing
5547 poll-like behavior.
5548
5549b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
5550 the default last-ditch startup file.
5551
5552c. The history file reading functions now allow windows-like \r\n line
5553 terminators.
5554
5555------------------------------------------------------------------------------
95732b49
JA
5556This document details the changes between this version, bash-3.1-release,
5557and the previous version, bash-3.1-rc2.
5558
55591. Changes to Readline
5560
5561a. Several changes to the multibyte redisplay code to fix problems with
5562 prompts containing invisible characters.
5563
5564------------------------------------------------------------------------------
5565This document details the changes between this version, bash-3.1-rc2,
5566and the previous version, bash-3.1-rc1.
5567
55681. Changes to Bash
5569
5570a. Fixed a bug that caused a DEBUG trap to overwrite a command string that's
5571 eventually attached to a background job.
5572
5573b. Changed some code so that filenames with leading tildes with spaces in the
5574 name aren't tilde-expanded by the bash completion code.
5575
5576c. Fixed a bug that caused the pushd builtin to fail to change to
5577 directories with leading `-'.
5578
5579d. Fixed a small memory leak in the programmable completion code.
5580
55812. Changes to Readline
5582
5583a. Fixed a redisplay bug caused by moving the cursor vertically to a line
5584 with invisible characters in the prompt in a multibyte locale.
5585
5586b. Fixed a bug that could cause the terminal special chars to be bound in the
5587 wrong keymap in vi mode.
5588
55893. New Features in Bash
5590
5591a. If compiled for strict POSIX conformance, LINES and COLUMNS may now
5592 override the true terminal size.
5593
55944. New Features in Readline
5595
5596a. A new external application-controllable variable that allows the LINES
5597 and COLUMNS environment variables to set the window size regardless of
5598 what the kernel returns.
5599
5600------------------------------------------------------------------------------
5601This document details the changes between this version, bash-3.1-rc1,
5602and the previous version, bash-3.1-beta1.
5603
56041. Changes to Bash
5605
0628567a 5606a. Fixed a bug that could cause core dumps due to accessing the current
95732b49
JA
5607 pipeline while in the middle of modifying it.
5608
5609b. Fixed a bug that caused pathnames with backslashes still quoting characters
5610 to be passed to opendir().
5611
5612c. Command word completion now obeys the setting of completion-ignore-case.
5613
5614d. Fixed a problem with redirection that caused file descriptors greater than
5615 2 to be inappropriately marked as close-on-exec.
5616
5617e. In Posix mode, after `wait' is called to wait for a particular process
5618 explicitly, that process is removed from the list of processes known to
5619 the shell, and subsequent attempts to wait for it return errors.
5620
5621f. Fixed a bug that caused extended pattern matching to incorrectly scan
5622 backslash-escaped pattern characters.
5623
5624g. Fixed a synchronization problem that could cause core dumps when handling
5625 a SIGWINCH.
5626
5627h. Fixed a bug that caused an unmatched backquote to be accepted without an
5628 error when processing here documents.
5629
5630i. Fixed a small memory leak in the `cd' builtin.
5631
5632j. Fix for MacOS X so it gets the values for the HOSTTYPE, MACHTYPE, and
5633 OSTYPE variables at build time, to support universal binaries.
5634
5635k. Fixed a bug that could cause an exit trap to return the exit status of
5636 the trap command rather than the status as it was before the trap was
5637 run as the shell's exit status.
5638
56392. New Features in Bash
5640
56413. Changes to Readline
5642
5643a. Fixed a bug that caused reversing the incremental search direction to
5644 not work correctly.
5645
5646b. Fixed the vi-mode `U' command to only undo up to the first time insert mode
5647 was entered, as Posix specifies.
5648
5649c. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
5650 place.
5651
56524. New Features in Readline
5653
5654a. New application-callable auxiliary function, rl_variable_value, returns
5655 a string corresponding to a readline variable's value.
5656
5657b. When parsing inputrc files and variable binding commands, the parser
5658 strips trailing whitespace from values assigned to boolean variables
5659 before checking them.
5660
5661
5662------------------------------------------------------------------------------
5663This document details the changes between this version, bash-3.1-beta1,
5664and the previous version, bash-3.1-alpha1.
5665
56661. Changes to Bash
5667
5668a. Added some system-specific signal names.
5669
5670b. Fixed a typo in the ulimit builtin to make `x' the right option to
8868edaf 5671 manipulate the limit on file locks.
95732b49
JA
5672
5673c. Fixed a problem with using += to append to index 0 of an array variable
5674 when not using subscript syntax.
5675
5676d. A few changes to configure.in to remove calls to obsolete or outdated
5677 macros.
5678
5679e. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
5680 made when the variable is set in the temporary environment to a command.
5681
5682f. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
5683 made when the variable is modified using `printf -v'.
5684
5685g. The export environment is now remade on cygwin when HOME is changed, so
5686 DLLs bash is linked against pick up the new value. This fixes problems
5687 with tilde expansion when linking against and already-installed readline.
5688
5689h. Small fix to the logic for performing tilde expansion in posix mode, so
5690 expansion on the right-hand side of an assignment statement takes place.
5691
5692i. Fixed a bug that prevented redirections associated with a shell function
5693 from being executed when in a subshell.
5694
5695j. Fixed `source' and `.' builtins to not require an executable file when
5696 searching $PATH for a file to source.
5697
5698k. Fixed a bug that caused incorrect word splitting in a function when IFS
5699 was declared local, then unset.
5700
5701l. Fixed a problem with the `kill' builtin that prevented sending signals
5702 to a process group under certain circumstances when providing a pid < 0.
5703
5704m. When in POSIX mode, `pwd' now checks that the value it prints is the same
5705 directory as `.', even when displaying $PWD.
5706
5707n. Fixed a problem with the `read' builtin when reading a script from standard
5708 input and reading data from the same file.
5709
5710o. Fixed a problem with the `type' and `command' builtins that caused absolute
5711 pathnames to be displayed incorrectly.
5712
5713p. Some changes to the `bg' builtin for POSIX conformance.
5714
5715q. The `fc' builtin now removes the `fc' command that caused it to invoke an
5716 editor on specified history entries from the history entirely, rather than
5717 simply ignoring it.
5718
5719r. When in POSIX mode, the `v' command in vi editing mode simply invokes vi
5720 on the current command, rather than checking $FCEDIT and $EDITOR.
5721
5722s. Fixed a small memory leak in the pathname canonicalization code.
5723
5724t. Fixed a bug that caused the expanded value of a $'...' string to be
5725 incorrectly re-quoted if it occurred within a double-quoted ${...}
5726 parameter expansion.
5727
5728u. Restored default emacs-mode key binding of M-TAB to dynamic-complete-history.
5729
5730v. Fixed a bug that caused core dumps when interrupting loops running builtins
5731 on some systems.
5732
5733w. Make sure that some of the functions bash provides replacements for are
5734 not cpp defines.
5735
5736x. The code that scans embedded commands for the parser (`...` and $(...)) is
5737 now more aware of embedded comments and their effect on quoted strings.
5738
5739y. Changed the `-n' option to the `history' builtin to not reset the number of
5740 history lines read in the current session after reading the new lines from
5741 the history file if the history is being appended when it is written to
5742 the file, since the appending takes care of the problem that the adjustment
5743 was intended to solve.
5744
5745z. Improved the error message displayed when a shell script fails to execute
5746 because the environment and size of command line arguments are too large.
5747
5748aa. A small fix to make sure that $HISTCMD is evaluated whenever the shell is
5749 saving commands to the history list, not just when HISTSIZE is defined.
5750
57512. Changes to Readline
5752
5753a. The `change-case' command now correctly changes the case of multibyte
5754 characters.
5755
5756b. Changes to the shared library construction scripts to deal with Windows
5757 DLL naming conventions for Cygwin.
5758
5759c. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
5760 SIGWINCH.
5761
5762d. Fixed the non-incremental search code in vi mode to dispose of any current
5763 undo list when copying a line from the history into the current editing
5764 buffer.
5765
5766e. The variable assignment code now ignores whitespace at the end of lines
5767 when assigning to boolean variables.
5768
5769f. The `C-w' binding in incremental search now understands multibyte
5770 characters.
5771
57723. New Features in Bash
5773
5774a. A new configuration option, `--enable-strict-posix-default', which will
5775 build bash to be POSIX conforming by default.
5776
57774. New Features in Readline
5778
5779a. If the rl_completion_query_items is set to a value < 0, readline never
5780 asks the user whether or not to view the possible completions.
5781
5782------------------------------------------------------------------------------
5783This document details the changes between this version, bash-3.1-alpha1,
5784and the previous version, bash-3.0-release.
5785
57861. Changes to Bash
5787
5788a. Fixed a bug that caused bash to crash if referencing an unset local array.
5789
5790b. Fixed a problem that caused tilde expansion to not be performed before
5791 attempting globbing word completion.
5792
5793c. Fixed an incompatibility so that a first argument to trap that's a valid
5794 signal number will be trated as a signal rather than a command to execute.
5795
5796d. Fixed ${#word} expansion to correctly compute the length of a string
5797 containing multibyte characters.
5798
5799e. Fixed a bug that caused bash to not pass the correct flags for signal
5800 disposition to child processes.
5801
5802f. Fixed a bug that caused `fc -l' to list one too many history entries.
5803
5804g. Some fixes to `fc' for POSIX conformance.
5805
5806h. Some fixes to job status display for POSIX conformance.
5807
5808i. Fixed a bug that caused `command -v' to display output if a command was not
5809 found -- it should be silent.
5810
5811j. In POSIX mode, `type' and `command -[vV]' do not report non-executable
5812 files, even if the shell will attempt to execute them.
5813
5814k. Fixed a bug that caused the `==' operator to the [[ command to not attempt
5815 extended pattern matching.
5816
5817l. Fixed the brace expansion code to handle characters whose value exceeds 128.
5818
5819m. Fixed `printf' to handle strings with a leading `\0' whose length is
5820 non-zero.
5821
5822n. Fixed a couple of problems with brace expansion where `${' was handled
5823 incorrectly.
5824
5825o. Fixed off-by-one error when calculating the upper bound of `offset' when
5826 processing the ${array[@]:offset:length} expansion.
5827
5828p. System-specific configuration changes for: FreeBSD 5.x, Interix, MacOS X
5829 10.4, Linux 2.4+ kernels, Linux 3.x kernels, Dragonfly BSD, QNX 6.x,
5830 Cygwin
5831
5832q. Fixed a bug that caused the shell to ignore the status of the rightmost
5833 command in a pipeline when the `pipefail' option was enabled.
5834
5835r. Fixed a completion bug that caused core dumps when expanding a directory
5836 name.
5837
5838s. Fixed a bug that prevented `hash -d' from removing commands from the hash
5839 table.
5840
5841t. Fixed word splitting to avoid really bad quadratic performance when
5842 expanding long lists.
5843
5844u. Fixed a bug that caused negative offsets in substring expansion to use the
5845 wrong values.
5846
5847v. Fixed a bug in printf that caused it to not return failure on write errors.
5848
5849w. Fixed a bug that caused commands in subshells to not be properly timed.
5850
5851x. The shell parser no longer attempts to parse a compound assignment specially
5852 unless in a position where an assignment statement is acceptable or parsing
5853 arguments to a builtin that accepts assignment statements.
5854
5855y. Fixed a problem that caused a `case' statement to be added to the history
5856 incorrectly as a single command if the `case word' was on one line and the
5857 `in' on another.
5858
5859z. Fixed a problem that caused internal shell quoting characters to be
5860 incorrectly quoted with backslashes under some circumstances.
5861
5862aa. The shell now performs correct word splitting when IFS contains multibyte
5863 characters.
5864
5865bb. The mail checking code now resets the cached file information if the size
5866 drops to 0, even if the times don't change.
5867
5868cc. A completed command name that is found in $PATH as well as the name of a
5869 directory in the current directory no longer has a slash appended in certain
5870 circumstances: a single instance found in $PATH when `.' is not in $PATH,
5871 and multiple instances found in $PATH, even when `.' is in $PATH.
5872
5873dd. Incorporated tilde expansion into the word expansion code rather than as a
5874 separately-called function, fixing some cases where it was performed
5875 inappropriately (e.g., after the second `=' in an assignment statement or
5876 in a double-quoted parameter expansion).
5877
5878ee. Fixed several bugs encountered when parsing compound assignment statements,
5879 so that compound assignments appearing as arguments to builtins are no
5880 longer double-expanded.
5881
5882ff. Fixed a bug in the command execution code that caused asynchronous commands
5883 containing command substitutions to not put the terminal in the wrong
5884 process group.
5885
5886gg. Bash now handles the case where the WCONTINUED flag causes waitpid() to
5887 return -1/EINVAL at runtime as well as configuration time.
5888
5889hh. Fixed parser to generate an error when the pipeline `argument' to `!' or
5890 `time' is NULL.
5891
5892ii. The shell now takes a little more care when manipulating file descriptors
5893 greater than 9 with the `exec' builtin.
5894
5895jj. Fixed a bug that caused variable assignments preceding the `command' builtin
5896 preceding a special builtin to be preserved after the command completed in
5897 POSIX mode.
5898
5899kk. Fixed a bug that allowed variables beginning with a digit to be created.
5900
5901ll. Fixed a bug that caused a \<newline> to be removed when parsing a $'...'
5902 construct.
5903
5904mm. A shell whose name begins with `-' will now be a restricted shell if the
5905 remainder of the name indicates it should be restricted.
5906
5907nn. Fixed a bug that could cause a core dump if FUNCNAME were changed or unset
5908 during a function's execution.
5909
5910oo. Fixed a bug that caused executing a `return' in a function to not execute
5911 a RETURN trap. The RETURN trap is inherited by shell functions only if
5912 function tracing is globally enabled or has been enabled for that function.
5913
5914pp. Fixed cases where var[@] was not handled exactly like var, when var is a
5915 scalar variable.
5916
5917qq. Fixed a bug that caused the first character after a SIGINT to be discarded
5918 under certain circumstances.
5919
5920rr. Fixed exit status code so that a suspended job returns 128+signal as its
5921 exit status (preventing commands after it in `&&' lists from being
5922 executed).
5923
5924ss. Fixed a bug that caused the shell parser state to be changed by executing
5925 a shell function as a result of word completion.
5926
5927tt. Fixed a long-standing bug that caused '\177' characters in variable
5928 values to be discarded when expanded in double-quoted strings.
5929
5930uu. Fixed a bug that caused $RANDOM to be re-seeded multiple times in a
5931 subshell environment.
5932
5933vv. Extensive changes to the job management code to avoid the pid-reuse and
5934 pid-aliasing problems caused by retaining the exit status of too many jobs,
5935 but still retain as many background job statuses as POSIX requires.
5936
5937ww. Fixed a parser bug in processing \<newline> that caused things like
5938
5939 ((echo 5) \
5940 (echo 6))
5941
5942 to not work correctly.
5943
5944xx. `pwd -P' now sets $PWD to a directory name containing no symbolic links
5945 when in posix mode, as POSIX requires.
5946
5947yy. In posix mode, bash no longer sets $PWD to a name containing no symbolic
5948 links if a directory is chosen from $CDPATH.
5949
5950zz. The word splitting code now treats an IFS character that is not space,
5951 tab, or newline and any adjacent IFS white space as a single delimiter, as
5952 SUSv3/XPG6 require.
5953
5954aaa. The `read' builtin now checks whether or not the number of fields read is
5955 exactly the same as the number of variables instead of just assigning the
5956 rest of the line (minus any trailing IFS white space) to the last
5957 variable. This is what POSIX/SUS/XPG all require.
5958
5959bbb. Fixed a bug that caused `read' to always check whether or not fd 0 was a
5960 pipe, even when reading from another file descriptor.
5961
5962ccc. Fixed a bug that caused short-circuiting of execution even if the return
5963 value was being inverted.
5964
5965ddd. Fixed a bug that caused a core dump while decoding \W escapes in PS1 if
5966 PWD was unset.
5967
5968eee. Fixed a bug in `read' that counted internal quoting characters for the
5969 purposes of `read -n'.
5970
5971fff. Fixed a bug so that a function definition in a pipeline causes a child
5972 process to be forked at the right time.
5973
5974ggg. Bash will not attempt to link against a readline library that doesn't
5975 have rl_gnu_readline_p == 1.
5976
5977hhh. Fixed a bug that caused `read' to consume one too many characters when
5978 reading a fixed number of characters and the Nth character is a backslash.
5979
5980iii. Fixed a bug that caused `unset' on variables in the temporary environment
5981 to leave them set when `unset' completed.
5982
5983jjj. Fixed a bug that caused bash to close fd 2 if an `exec' failed and the
5984 shell didn't exit.
5985
5986kkk. The completion code is more careful to not turn `/' or `///' into `//',
5987 for those systems on which `//' has special meaning.
5988
5989lll. Fixed a bug that caused command substitution in asynchronous commands to
5990 close the wrong file descriptors.
5991
5992mmm. The shell no longer prints status messages about terminated background
5993 processes unless job control is active.
5994
5995nnn. Fixed a bug that prevented multiple consecutive invocations of `history -s'
5996 from adding all the commands to the history list.
5997
5998ooo. Added a couple of changes to make arithmetic expansion more consistent in
5999 all its contexts (still not perfect).
6000
6001ppp. Fixed a bug that caused the parser to occasionally not find the right
6002 terminating "`" in an old-style command substitution.
6003
6004qqq. Fixed a bug that caused core dumps when the shell was reading its non-
6005 interactive input from fd 0 and fd 0 was duplicated and restored using a
6006 combination of `exec' (to save) and redirection (to restore).
6007
6008rrr. Fixed a problem that caused loops in sourced scripts to not be cleaned
6009 up properly when a `return' is executed.
6010
6011sss. Change internal command substitution completion function to append a slash
6012 to directory names in the command.
6013
60142. Changes to Readline
6015
6016a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
6017 incorrectly.
6018
6019b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
6020 line correctly.
6021
6022c. Fixed a problem in computing the number of invisible characters on the first
6023 line of a prompt whose length exceeds the screen width.
6024
6025d. Fixed vi-mode searching so that failure preserves the current line rather
6026 than the last line in the history list.
6027
6028e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
6029 end-of-line when manipulating multibyte characters.
6030
6031f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
6032 end-of-line when manipulating multibyte characters.
6033
6034g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
6035 prompts longer than the screen width containing multibyte characters,
6036
6037h. Fix the calculation of the number of physical characters in the prompt
6038 string when it contains multibyte characters.
6039
6040i. A non-zero value for the `rl_complete_suppress_append' variable now causes
6041 no `/' to be appended to a directory name.
6042
6043j. Fixed forward-word and backward-word to work when words contained
6044 multibyte characters.
6045
6046k. Fixed a bug in finding the delimiter of a `?' substring when performing
6047 history expansion in a locale that supports multibyte characters.
6048
6049l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
6050
6051m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
6052 of the `convert-meta' variable.
6053
6054n. Fixed saving and restoring primary prompt when prompting for incremental
6055 and non-incremental searches; search prompts now display multibyte
6056 characters correctly.
6057
6058o. Fixed a bug that caused keys originally bound to self-insert but shadowed
6059 by a multi-character key sequence to not be inserted.
6060
6061p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
6062 dereferenced if NULL (matching the documentation).
6063
6064q. Extensive changes to readline to add enough state so that commands
6065 requiring additional characters (searches, multi-key sequences, numeric
6066 arguments, commands requiring an additional specifier character like
6067 vi-mode change-char, etc.) work without synchronously waiting for
6068 additional input.
6069
6070r. Lots of changes so readline builds and runs on MinGW.
6071
6072s. Readline no longer tries to modify the terminal settings when running in
6073 callback mode.
6074
6075t. The Readline display code no longer sets the location of the last invisible
6076 character in the prompt if the \[\] sequence is empty.
6077
60783. New Features in Bash
6079
6080a. Bash now understands LC_TIME as a special variable so that time display
6081 tracks the current locale.
6082
6083b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created
6084 as `invisible' variables and may not be unset.
6085
6086c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't
6087 try to interpret any options at all, as POSIX requires.
6088
6089d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.
6090
6091e. Fixed vi-mode word completion and glob expansion to perform tilde
6092 expansion.
6093
6094f. The `**' mathematic exponentiation operator is now right-associative.
6095
6096g. The `ulimit' builtin has new options: -i (max number of pending signals),
6097 -q (max size of POSIX message queues), and -x (max number of file locks).
6098
6099h. A bare `%' once again expands to the current job when used as a job
6100 specifier.
6101
6102i. The `+=' assignment operator (append to the value of a string or array) is
6103 now supported for assignment statements and arguments to builtin commands
6104 that accept assignment statements.
6105
6106j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.
6107
6108k. The `gnu_errfmt' option is enabled automatically if the shell is running
6109 in an emacs terminal window.
6110
6111l. New configuration option: --single-help-strings. Causes long help text
6112 to be written as a single string; intended to ease translation.
6113
6114m. The COMP_WORDBREAKS variable now causes the list of word break characters
6115 to be emptied when the variable is unset.
6116
6117n. An unquoted expansion of $* when $IFS is empty now causes the positional
6118 parameters to be concatenated if the expansion doesn't undergo word
6119 splitting.
6120
6121o. Bash now inherits $_ from the environment if it appears there at startup.
6122
6123p. New shell option: nocasematch. If non-zero, shell pattern matching ignores
6124 case when used by `case' and `[[' commands.
6125
6126q. The `printf' builtin takes a new option: -v var. That causes the output
6127 to be placed into var instead of on stdout.
6128
6129r. By default, the shell no longer reports processes dying from SIGPIPE.
6130
6131s. Bash now sets the extern variable `environ' to the export environment it
6132 creates, so C library functions that call getenv() (and can't use the
6133 shell-provided replacement) get current values of environment variables.
6134
61354. New Features in Readline
6136
6137a. The key sequence sent by the keypad `delete' key is now automatically
6138 bound to delete-char.
6139
6140b. A negative argument to menu-complete now cycles backward through the
6141 completion list.
6142
6143c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
6144 readline will bind the terminal special characters to their readline
6145 equivalents when it's called (on by default).
6146
6147d. New bindable command: vi-rubout. Saves deleted text for possible
6148 reinsertion, as with any vi-mode `text modification' command; `X' is bound
6149 to this in vi command mode.
6150
6151------------------------------------------------------------------------------
b80f6443
JA
6152This document details the changes between this version, bash-3.0-release,
6153and the previous version, bash-3.0-rc1.
6154
61551. Changes to Bash
6156
6157a. Fixed a boundary overrun that could cause segmentation faults when the
6158 completion code hands an incomplete construct to the word expansion
6159 functions.
6160
6161b. Changed posix mode behavior so that an error in a variable assignment
6162 preceding a special builtin causes a non-interactive shell to exit.
6163
6164c. Change the directory expansion portion of the completion code to not
6165 expand embedded command substitutions if the directory name appears in
6166 the file system.
6167
6168d. Fixed a problem that caused `bash -r' to turn on restrictions before
6169 reading the startup files.
6170
6171e. Fixed a problem with the default operation of the `umask' builtin.
6172
61732. Changes to Readline
6174
6175a. Fixed a problem with readline saving the contents of the current line
6176 before beginning a non-interactive search.
6177
6178b. Fixed a problem with EOF detection when using rl_event_hook.
6179
6180c. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
6181 arguments.
6182
6183------------------------------------------------------------------------------
6184This document details the changes between this version, bash-3.0-rc1,
6185and the previous version, bash-3.0-beta1.
6186
61871. Changes to Bash
6188
6189a. Fixed a bug that caused incorrect behavior when referecing element 0 of
6190 an array using $array, element 0 was unset, and `set -u' was enabled.
6191
6192b. System-specific changes for: SCO Unix 3.2, Tandem.
6193
6194c. Fixed a bug that caused inappropriate word splitting when a variable was
6195 expanded within a double-quoted string that also included $@.
6196
6197d. Fixed a bug that caused `pwd' to not display anything in physical mode
6198 when the file system had changed underneath the shell.
6199
6200e. Fixed a bug in the pre- and post- increment and decrement parsing in the
6201 expression evaluator that caused errors when the operands and corresponding
6202 operators were separated by whitespace.
6203
6204f. Fixed a bug that caused `history -p' to add an entry to the history list,
6205 counter to the documentation. (Keeps the history expansions invoked by
6206 emacs-mode command line editing from doing that as well.)
6207
6208g. Fixed a bug that could cause a core dump if `cd' is asked to print out a
6209 pathname longer than PATH_MAX characters.
6210
6211h. Fixed a bug that caused jobs to be put into the wrong process group under
6212 some circumstances after enabling job control with `set -m'.
6213
6214i. `unalias' now returns failure if no alias name arguments are supplied.
6215
6216j. Documented the characters not allowed to appear in an alias name.
6217
6218k. $* is no longer expanded as if in double quotes when it appears in the
6219 body of a here document, as the SUS seems to require.
6220
6221l. The `bashbug' script now uses a directory in $TMPDIR for exclusive
6222 access rather than trying to guess how the underlying OS provides for
6223 secure temporary file creation.
6224
6225m. Fixed a few problems with `cd' and `pwd' when asked to operate on pathnames
6226 longer than PATH_MAX characters.
6227
6228n. Fixed a memory leak caused when creating multiple local array variables
6229 with identical names.
6230
6231o. Fixed a problem with calls to getcwd() so that bash now operates better
6232 when the full pathname to the current directory is longer than PATH_MAX
6233 bytes.
6234
6235p. The `trap' builtin now reports an error if a single non-signal argument
6236 is specified.
6237
6238q. Fixed a bug that caused `umask' to not work correctly when presented
6239 with a mask of all 0s.
6240
6241r. When `getopts' reaches the end of options, OPTARG is unset, as POSIX
6242 appears to specify.
6243
6244s. Interactive mode now depends on whether or not stdin and stderr are
6245 connected to a tty; formerly it was stdin and stdout. POSIX requires
6246 this.
6247
6248t. Fixed vi-mode completion to work more as POSIX specifies (e.g., doing the
6249 right kind of filename generation).
6250
62512. Changes to Readline
6252
6253a. Fixed a problem that could cause readline to refer to freed memory when
6254 moving between history lines while doing searches.
6255
6256b. Improvements to the code that expands and displays prompt strings
6257 containing multibyte characters.
6258
6259c. Fixed a problem with vi-mode not correctly remembering the numeric argument
6260 to the last `c'hange command for later use with `.'.
6261
6262d. Fixed a bug in vi-mode that caused multi-digit count arguments to work
6263 incorrectly.
6264
6265e. Fixed a problem in vi-mode that caused the last text modification command
6266 to not be remembered across different command lines.
6267
6268f. Fixed problems with changing characters and changing case at the end of
6269 the line.
6270
62713. New Features in Bash
6272
6273a. The `jobs', `kill', and `wait' builtins now accept job control notation
6274 even if job control is not enabled.
6275
6276b. The historical behavior of `trap' that allows a missing `action' argument
6277 to cause each specified signal's handling to be reset to its default is
6278 now only supported when `trap' is given a single non-option argument.
6279
62804. New Features in Readline
6281
6282a. When listing completions, directories have a `/' appended if the
6283 `mark-directories' option has been enabled.
6284
6285------------------------------------------------------------------------------
6286This document details the changes between this version, bash-3.0-beta1,
6287and the previous version, bash-3.0-alpha.
6288
62891. Changes to Bash
6290
6291a. Fixes to build correctly when arrays are not compiled into the shell.
6292
6293b. Fixed command substitution to run any exit trap defined in the command
6294 substitution before returning; the exit trap is not inherited from the
6295 calling shell.
6296
6297c. Fixes to process group synchronization code so that every child process
6298 attempts to set the terminal's process group; fixes some synchronization
6299 problems on Linux kernels that schedule the child to always run before
6300 the parent.
6301
6302d. Fixed processing of octal and hex constants in printf builtin for POSIX.2
6303 compliance.
6304
6305e. Fixed a couple of core dumps in the pattern removal code.
6306
6307f. Fixes to the array subrange extraction code to deal better with sparse
6308 arrays.
6309
6310g. Parser errors and other errors that result in the shell exiting now cause
6311 the exit trap to be run.
6312
6313h. Change the command substitution completion functions to not append any
6314 closing quote, because it would be inserted a closing "`" or ")".
6315
6316i. Fix history initialization so assignments to $histchars made in startup
6317 files are honored.
6318
6319j. If an exit trap does not contain a call to `exit', the shell now uses
6320 the exit status of the last command executed before the trap as the exit
6321 status of the shell.
6322
6323k. The parser now prompts with $PS2 if it reads a newline while parsing a
6324 compound array assignment statement.
6325
6326l. When performing a compound array assignment, the parser doesn't treat
6327 words of the form [index]=value as assignments if they're the result of
6328 expansions.
6329
6330m. Fixed a bug that caused `return' executed in a trap command to make the
6331 shell think it was still running the trap.
6332
6333n. Fixed the value of errno set by the pathname canonicalization functions.
6334
6335o. Changed the grammar so that `time' alone on a line times a null command
6336 rather than being a syntax error.
6337
95732b49 6338p. The pattern substitution code no longer performs quote removal on the
b80f6443
JA
6339 pattern before trying to match it, as the pattern removal functions do.
6340
6341q. Fixed a bug that could cause core dumps when checking whether a quoted
6342 command name was being completed.
6343
6344r. Fixes to the pattern removal and pattern replacement expansions to deal
6345 with multibyte characters better (and faster).
6346
6347s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly
6348 multibyte) characters instead of raw bytes.
6349
6350t. Fixed a bug that caused some key bindings set in an inputrc to be ignored
6351 at shell startup.
6352
6353u. Fixed a bug that caused unsetting a local variable within a function to
6354 not work correctly.
6355
6356v. Fixed a bug that caused invalid variables to be created when using
6357 `read -a'.
6358
6359w. Fixed a bug that caused "$@" to expand incorrectly when used as the right
6360 hand side of a parameter expansion such as ${word:="$@"} if the first
6361 character of $IFS was not a space.
6362
6363x. Fixed a slight cosmetic problem when printing commands containing a
6364 `>&word' redirection.
6365
6366y. Fixed a problem that could cause here documents to not be created correctly
6367 if the system temporary directory did not allow writing.
6368
63692. Changes to Readline
6370
6371a. Change to history expansion functions to treat `^' as equivalent to word
8868edaf 6372 one, as the documentation states.
b80f6443
JA
6373
6374b. Some changes to the display code to improve display and redisplay of
6375 multibyte characters.
6376
6377c. Changes to speed up the multibyte character redisplay code.
6378
6379d. Fixed a bug in the vi-mode `E' command that caused it to skip over the
6380 last character of a word if invoked while point was on the word's
6381 next-to-last character.
6382
6383e. Fixed a bug that could cause incorrect filename quoting when
6384 case-insensitive completion was enabled and the word being completed
6385 contained backslashes quoting word break characters.
6386
6387f. Fixed a bug in redisplay triggered when the prompt string contains
6388 invisible characters.
6389
6390g. Fixed some display (and other) bugs encountered in multibyte locales
6391 when a non-ascii character was the last character on a line.
6392
6393h. Fixed some display bugs caused by multibyte characters in prompt strings.
6394
6395i. Fixed a problem with history expansion caused by non-whitespace characters
6396 used as history word delimiters.
6397
63983. New Features in Bash
6399
6400a. printf builtin understands two new escape sequences: \" and \?.
6401
6402b. `echo -e' understands two new escape sequences: \" and \?.
6403
6404c. The GNU `gettext' package and libintl have been integrated; the shell's
6405 messages can be translated into different languages.
6406
6407d. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.
6408
6409e. The error message printed when bash cannot open a shell script supplied
6410 as argument 1 now includes the name of the shell, to better identify
6411 the error as coming from bash.
6412
64134. New Features in Readline
6414
6415a. New application variable, rl_completion_quote_character, set to any
6416 quote character readline finds before it calls the application completion
6417 function.
6418
6419b. New application variable, rl_completion_suppress_quote, settable by an
6420 application completion function. If set to non-zero, readline does not
6421 attempt to append a closing quote to a completed word.
6422
6423c. New application variable, rl_completion_found_quote, set to a non-zero
6424 value if readline determines that the word to be completed is quoted.
6425 Set before readline calls any application completion function.
6426
6427d. New function hook, rl_completion_word_break_hook, called when readline
6428 needs to break a line into words when completion is attempted. Allows
6429 the word break characters to vary based on position in the line.
6430
6431e. New bindable command: unix-filename-rubout. Does the same thing as
6432 unix-word-rubout, but adds `/' to the set of word delimiters.
6433
6434------------------------------------------------------------------------------
6435This document details the changes between this version, bash-3.0-alpha,
6436and the previous version, bash-2.05b-release.
6437
64381. Changes to Bash
6439
6440a. Fixes so that the shell will compile without some of the default options
6441 defined.
6442
6443b. Fixed an error message that did not pass enough arguments to printf.
6444
6445c. Fixed a bug that caused input redirection to a builtin inside a script
6446 being read from standard input to result in the rest of the already-
6447 read and buffered script to be discarded.
6448
6449d. Fixed a bug that caused subshell initialization to close the file
6450 descriptor from which the shell was reading a script under certain
6451 circumstances.
6452
6453e. Fixed a bug that caused the shell to not advance a string pointer over
6454 a null wide character when doing string operations.
6455
6456f. Fixed the internal logout code so that shells that time out waiting for
6457 input (using $TMOUT) run ~/.bash_logout.
6458
6459g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD.
6460
6461h. The parser no longer adds implicit double quotes to ((...)) arithmetic
6462 commands.
6463
6464i. The ((...)) arithmetic command evaluation code was fixed to not dump core
6465 when the expanded string is null.
6466
6467j. The ((...)) arithmetic command evaluation code was fixed to not perform
6468 variable assignments while expanding the expression.
6469
6470k. Fixed a bug that caused word splitting to be performed incorrectly when
6471 IFS is set, but null.
6472
6473l. Fixed a bug in brace expansion that caused a quoted `$' preceding an
6474 open brace to inhibit brace expansion.
6475
6476m. Fixed a bug that caused a leading `-' in the shell's name to cause it to
6477 not be recognized as a restricted shell.
6478
6479n. Fixed a bug in the arithmetic evaluation code that could cause longjmps
6480 to an invalid location and result in a core dump.
6481
6482o. Fixed a bug in the calculation of how many history lines are new in a
6483 single shell session when reading new history lines from a file with
6484 `history -n'.
6485
6486p. Fixed a bug in pathname canonicalization that caused the shell to dump
6487 core when presented with a pathname longer than PATH_MAX.
6488
6489q. Fixed the parser so that it doesn't try to compare a char variable to
6490 EOF, which fails when chars are unsigned.
6491
6492r. Fixed a bug in the simple command execution code that caused occasional
6493 core dumps.
6494
6495s. The shell does a better job of saving any partial parsing state during
6496 operations which cause a command to be executed while a line is being
6497 entered and parsed.
6498
6499t. The completion code now splits words more like the expansion code when
6500 $IFS is used to split.
6501
6502u. The locale code does a better job of recomputing the various locale
6503 variable values when LC_ALL is unset.
6504
6505v. The programmable completion code does a better job of dequoting expanded
6506 word lists before comparing them against the word to be matched.
6507
6508w. The shell no longer seg faults if the expanded value of $PS4 is null
6509 and `set -x' is enabled.
6510
6511x. Fixed a bug that caused core dumps when a here string expanded to NULL.
6512
6513y. The mail checking code now makes sure the mailbox is bigger before
6514 reporting the existence of new mail.
6515
6516z. The parser does not try to expand $'...' and $"..." when the appear
6517 within double quotes unless the `extquote' option has been enabled with
6518 `shopt'. For backwards compatibility, it is enabled by default.
6519
6520aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use
6521 $@ instead of "$@" for the implicit list of arguments.
6522
6523bb. Fixed a bug that caused a subshell of a restricted shell (e.g., one
6524 spawned to execute a pipeline) to not exit immediately if attempting
6525 to use a command containing a slash.
6526
6527cc. Fixed a problem with empty replacements for a pattern that doesn't match
6528 when performing ${param/word/} expansion.
6529
6530dd. Word expansions performed while expanding redirections no longer search
6531 a command's temporary environment to expand variable values.
6532
6533ee. Improvements to the alias expansion code when expanding subsequent words
6534 because an aliase's value ends with a space.
6535
6536ff. `cd -' now prints the current working directory after a successful chdir
6537 even when the shell is not interactive, as the standard requires.
6538
6539gg. The shell does a better job of ensuring a child process dies of SIGINT
6540 before resending SIGINT to itself.
6541
6542hh. The arithmetic expansion variable assignment code now does the right
6543 thing when assigning to `special' variables like OPTIND.
6544
6545ii. When history expansion verification is enabled, the bash readline helper
6546 functions that do history expansion on the current line don't print
6547 the results.
6548
6549jj. Fixed bugs with multiple consecutive alias expansion when one of the
6550 expansions ends with a space.
6551
6552kk. Fixed a problem in the programmable completion code that could cause core
6553 dumps when trying to initialize a set of possible completions from a
6554 list of variables.
6555
6556ll. The \[ and \] escape characters are now ignored when decoding the prompt
6557 string if the shell is started with editing disabled.
6558
6559mm. Fixed a bug that could leave extra characters in a string when doing
6560 quoted null character removal.
6561
6562nn. Command substitution and other subshell operations no longer reset the
6563 line number (aids the bash debugger).
6564
6565oo. Better line number management when executing simple commands, conditional
6566 commands, for commands, and select commands.
6567
6568pp. The globbing code now uses malloc, with its better failure properties,
6569 rather than alloca().
6570
6571qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the
6572 appropriate array element instead of a variable named `a[2]'.
6573
6574rr. Fixed a bug in the handling of a `?(...)' pattern immediately following
6575 a `*' when extglob is enabled.
6576
6577ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is
6578 invoked in a function to misbehave.
6579
6580tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped
6581 by the internal shell string quoting functions.
6582
6583uu. Fixed a bug that caused quoted null characters in an expanded word list
6584 to be inappropriately assigned to an array variable when using `read -a'.
6585
6586vv. Fixed a bug that caused redirections accompanying a null command to persist
6587 in the current shell.
6588
6589ww. Fixed a bug that caused the prompt to be printed when the shell was
6590 expanding a multiline alias.
6591
6592xx. Fixed a bug that resulted in core dumps when the completion for a command
6593 changed the compspec.
6594
6595yy. Fixed a bug that caused evaluation of programmable completions to print
6596 notifications of completed jobs.
6597
6598zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb'
6599 (which is what emacs shell windows do).
6600
6601aaa. In posix mode, `kill -l' causes signal names to be displayed without
6602 a leading `SIG'.
6603
6604bbb. Clear error flag on standard output so it doesn't persist across multiple
6605 builtin commands.
6606
6607ccc. In posix mode, `alias' displays alias values without the leading `alias',
6608 so the output cannot be used as subsequent input.
6609
6610ddd. In posix mode, the `trap' builtin doesn't check whether or not its
6611 first argument is a signal specification and revert the signal handling
6612 to its original disposition if it is.
6613
6614eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the
6615 pattern substitution and removal expansions.
6616
6617fff. Fixed several problems with the handling of ${array[@]}, ${array[*]},
6618 $@, and $* by the indirect variable expansion code.
6619
6620ggg. Fixed a bug that did not allow `time' to be aliased.
6621
6622hhh. Improved the mail checking code so it won't check (and possibly cause an
6623 NFS file system mount) until MAILPATH or MAIL is given a value -- there
6624 is no default if DEFAULT_MAIL_DIRECTORY is not defined at compile time.
6625 (It is computed by configure, but can be #undef'd in config-bot.h.)
6626
6627iii. If the `chkwinsize' option is enabled, the shell checks for window size
6628 changes if a child process exits due to a signal.
6629
6630jjj. Removed the attempts to avoid adding a slash at the end of a completed
6631 executable name if there was a directory with the same name in the
6632 current directory.
6633
6634kkk. Fixed PATH lookup code so it treats the permission bits separately for
6635 owner, group, and other, rather than checking them all.
6636
6637lll. Fixed the locale code to reset the parser's idea of the character class
6638 <blank>, which controls how it splits tokens, when the locale changes.
6639
6640mmm. The shell now binds its special readline functions and key bindings only
6641 if the user's inputrc file has not already bound them.
6642
6643nnn. The shell now reports on processes that dump core due to signals when
6644 invoked as `-c command'.
6645
66462. Changes to Readline
6647
6648a. Fixes to avoid core dumps because of null pointer references in the
6649 multibyte character code.
6650
6651b. Fix to avoid infinite recursion caused by certain key combinations.
6652
6653c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
6654
6655d. Readline no longer tries to read ahead more than one line of input, even
6656 when more is available.
6657
6658e. Fixed the code that adjusts the point to not mishandle null wide
6659 characters.
6660
6661f. Fixed a bug in the history expansion `g' modifier that caused it to skip
6662 every other match.
6663
6664g. Fixed a bug that caused the prompt to overwrite previous output when the
6665 output doesn't contain a newline and the locale supports multibyte
6666 characters. This same change fixes the problem of readline redisplay
6667 slowing down dramatically as the line gets longer in multibyte locales.
6668
6669h. History traversal with arrow keys in vi insertion mode causes the cursor
6670 to be placed at the end of the new line, like in emacs mode.
6671
6672i. The locale initialization code does a better job of using the right
6673 precedence and defaulting when checking the appropriate environment
6674 variables.
6675
6676j. Fixed the history word tokenizer to handle <( and >( better when used as
6677 part of bash.
6678
6679k. The overwrite mode code received several bug fixes to improve undo.
6680
6681l. Many speedups to the multibyte character redisplay code.
6682
6683m. The callback character reading interface should not hang waiting to read
6684 keyboard input.
6685
6686n. Fixed a bug with redoing vi-mode `s' command.
6687
6688o. The code that initializes the terminal tracks changes made to the terminal
6689 special characters with stty(1) (or equivalent), so that these changes
6690 are reflected in the readline bindings. New application-callable function
6691 to make it work: rl_tty_unset_default_bindings().
6692
6693p. Fixed a bug that could cause garbage to be inserted in the buffer when
6694 changing character case in vi mode when using a multibyte locale.
6695
6696q. Fixed a bug in the redisplay code that caused problems on systems
6697 supporting multibyte characters when moving between history lines when the
6698 new line has more glyphs but fewer bytes.
6699
6700r. Undo and redo now work better after exiting vi insertion mode.
6701
6702s. Make sure system calls are restarted after a SIGWINCH is received using
6703 SA_RESTART.
6704
6705t. Improvements to the code that displays possible completions when using
6706 multibyte characters.
6707
6708u. Fixed a problem when parsing nested if statements in inputrc files.
6709
6710v. The completer now takes multibyte characters into account when looking for
6711 quoted substrings on which to perform completion.
6712
6713w. The history search functions now perform better bounds checking on the
6714 history list.
6715
67163. New Features in Bash
6717
6718a. ANSI string expansion now implements the \x{hexdigits} escape.
6719
6720b. There is a new loadable `strftime' builtin.
6721
6722c. New variable, COMP_WORDBREAKS, which controls the readline completer's
6723 idea of word break characters.
6724
6725d. The `type' builtin no longer reports on aliases unless alias expansion
6726 will actually be performed.
6727
6728e. HISTCONTROL is now a colon-separated list of values, which permits
6729 more extensibility and backwards compatibility.
6730
6731f. HISTCONTROL may now include the `erasedups' option, which causes all lines
6732 matching a line being added to be removed from the history list.
6733
6734g. `configure' has a new `--enable-multibyte' argument that permits multibyte
6735 character support to be disabled even on systems that support it.
6736
6737h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
6738 BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
6739 BASH_COMMAND
6740
6741i. FUNCNAME has been changed to support the debugger: it's now an array
6742 variable.
6743
6744j. for, case, select, arithmetic commands now keep line number information
6745 for the debugger.
6746
6747k. There is a new `RETURN' trap executed when a function or sourced script
6748 returns (not inherited child processes; inherited by command substitution
6749 if function tracing is enabled and the debugger is active).
6750
6751l. New invocation option: --debugger. Enables debugging and turns on new
6752 `extdebug' shell option.
6753
6754m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR
6755 traps, respectively, to be inherited by shell functions. Equivalent to
6756 `set -T' and `set -E' respectively. The `functrace' option also controls
6757 whether or not the DEBUG trap is inherited by sourced scripts.
6758
6759n. The DEBUG trap is run before binding the variable and running the action
6760 list in a `for' command, binding the selection variable and running the
6761 query in a `select' command, and before attempting a match in a `case'
6762 command.
6763
6764o. New `--enable-debugger' option to `configure' to compile in the debugger
6765 support code.
6766
6767p. `declare -F' now prints out extra line number and source file information
6768 if the `extdebug' option is set.
6769
6770q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes
6771 the next command to be skipped, and a return value of 2 while in a
6772 function or sourced script forces a `return'.
6773
6774r. New `caller' builtin to provide a call stack for the bash debugger.
6775
6776s. The DEBUG trap is run just before the first command in a function body is
6777 executed, for the debugger.
6778
6779t. `for', `select', and `case' command heads are printed when `set -x' is
6780 enabled.
6781
6782u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1,
6783 x+2,...,y}. x and y can be integers or single characters; the sequence
6784 may ascend or descend; the increment is always 1.
6785
6786v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
6787 of array.
6788
6789w. New `force_fignore' shopt option; if enabled, suffixes specified by
6790 FIGNORE cause words to be ignored when performing word completion even
6791 if they're the only possibilities.
6792
6793x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
6794 style' (filename:lineno:message) format.
6795
6796y. New `-o bashdefault' option to complete and compgen; if set, causes the
6797 whole set of bash completions to be performed if the compspec doesn't
6798 result in a match.
6799
6800z. New `-o plusdirs' option to complete and compgen; if set, causes directory
6801 name completion to be performed and the results added to the rest of the
6802 possible completions.
6803
6804aa. `kill' is available as a builtin even when the shell is built without
6805 job control.
6806
6807bb. New HISTTIMEFORMAT variable; value is a format string to pass to
6808 strftime(3). If set and not null, the `history' builtin prints out
6809 timestamp information according to the specified format when displaying
6810 history entries. If set, bash tells the history library to write out
6811 timestamp information when the history file is written.
6812
6813cc. The [[ ... ]] command has a new binary `=~' operator that performs
6814 extended regular expression (egrep-like) matching.
6815
6816dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
6817 to enable the =~ operator and regexp matching in [[ ... ]].
6818
6819ee. Subexpressions matched by the =~ operator are placed in the new
6820 BASH_REMATCH array variable.
6821
6822ff. New `failglob' option that causes an expansion error when pathname
6823 expansion fails to produce a match.
6824
6825gg. New `set -o pipefail' option that causes a pipeline to return a failure
6826 status if any of the processes in the pipeline fail, not just the last
6827 one.
6828
68294. New Features in Readline
6830
6831a. History expansion has a new `a' modifier equivalent to the `g' modifier
6832 for compatibility with the BSD csh.
6833
6834b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
6835 modifier, which performs a substitution once per word.
6836
6837c. All non-incremental search operations may now undo the operation of
6838 replacing the current line with the history line.
6839
6840d. The text inserted by an `a' command in vi mode can be reinserted with
6841 `.'.
6842
6843e. New bindable variable, `show-all-if-unmodified'. If set, the readline
6844 completer will list possible completions immediately if there is more
6845 than one completion and partial completion cannot be performed.
6846
6847f. There is a new application-callable `free_history_entry()' function.
6848
6849g. History list entries now contain timestamp information; the history file
6850 functions know how to read and write timestamp information associated
6851 with each entry.
6852
6853h. Four new key binding functions have been added:
6854
6855 rl_bind_key_if_unbound()
6856 rl_bind_key_if_unbound_in_map()
6857 rl_bind_keyseq_if_unbound()
6858 rl_bind_keyseq_if_unbound_in_map()
6859
6860------------------------------------------------------------------------------
7117c2d2
JA
6861This document details the changes between this version, bash-2.05b-release,
6862and the previous version, bash-2.05b-beta2.
6863
68641. Changes to Bash
6865
6866a. Fixed an off-by-one error in the function that translates job
6867 specifications.
6868
6869b. Note that we're running under Emacs and disable line editing if
6870 $EMACS == `t'.
6871
6872------------------------------------------------------------------------------
6873This document details the changes between this version, bash-2.05b-beta2,
6874and the previous version, bash-2.05b-beta1.
6875
68761. Changes to Bash
6877
6878a. Fixed the /= and %= arithmetic operators to catch division by zero.
6879
6880b. Added putenv, setenv, unsetenv to getenv replacement for completeness.
6881
6882c. Fixed a bug that could cause the -O expand_aliases invocation option
6883 to not take effect.
6884
6885d. Fixed a problem with process substitution that resulted in incorrect
6886 behavior when the number of process substitutions in an individual
6887 command approached 64.
6888
68892. Changes to Readline
6890
6891a. Fixed a problem with backward-char-search when on a system with support
6892 for multibyte characters when running in a locale without any multibyte
6893 characters.
6894
6895------------------------------------------------------------------------------
6896This document details the changes between this version, bash-2.05b-beta1,
6897and the previous version, bash-2.05b-alpha1.
6898
68991. Changes to Bash
6900
6901a. Fixed a problem when parsing a POSIX.2 character class name while
6902 evaluating a bracket expression containing multibyte characters.
6903
6904b. Changed the help text for `bind' to make it clear that any command
6905 that may be placed in ~/.inputrc is a valid argument to `bind'.
6906
6907c. Added `help' builtin entries for `((', `[[', and arithmetic for.
6908
6909d. malloc updated again:
6910 o slightly better overflow and underflow detection by putting the
6911 chunk size at the beginning and end of the chunk and making
6912 sure they match in free/realloc
6913 o partial page allocated to make things page-aligned no longer
6914 completely wasted
6915 o block coalescing now enabled by default
6916 o splitting and coalescing enabled for 32-byte chunks, the most
6917 common size requested
6918 o fixed a problem that resulted in spurious underflow messages and
6919 aborts
6920 o bin sizes are precomputed and stored in an array rather than
6921 being computed at run time
6922 o malloc will return memory blocks back to the system if the block
6923 being freed is at the top of the heap and of sufficient size to
6924 make it worthwhile
6925 o malloc/free/realloc now inline memset instead of calling the
6926 libc function; uses Duff's device for good performance
6927
6928e. Check for getservent(); make the service name completion code dependent
6929 on its presence.
6930
6931f. Changed the readline callback that executes a command bound to a key
6932 sequence to not save the executed command on the history list and to
6933 save and restore the parsing state.
6934
6935g. Changes to lib/sh/snprintf.c: fixed some bugs in the `g' and `G'
6936 floating point format display; implemented the "'" flag character
6937 that turns on thousands' grouping; fixed behavior on systems where
6938 MB_CUR_MAX does not evaluate to a constant.
6939
6940h. The `unset' builtin no longer returns a failure status when asked to
6941 unset a previously-unset variable or function.
6942
6943i. Changes to the build system to make it easier to cross-compile bash
6944 for different systems.
6945
6946j. Added `,' to the characters that are backslash-escaped during filename
6947 completion, to avoid problems with complete-into-braces and RCS filenames
6948 containing commas.
6949
6950k. Some changes to the multibyte character support code to avoid many calls
6951 to strlen().
6952
6953l. Bash now correctly honors setting LANG to some value when LC_ALL does not
6954 already have a value.
6955
6956m. Fixed a bug that could cause SIGSEGV when processing nested traps with
6957 trap handlers.
6958
6959n. The `source/.' builtin now restores the positional parameters when it
6960 returns unless they were changed using the `set' builtin during the file's
6961 execution.
6962
6963o. Fixed a bug that caused a syntax error when a command was terminated by
6964 EOF.
6965
69662. New Features in Bash
6967
6968a. There is now support for placing the long help text into separate files
6969 installed into ${datadir}/bash. Not enabled by default; can be turned
6970 on with `--enable-separate-helpfiles' option to configure.
6971
6972b. All builtins that take operands accept a `--' pseudo-option, except
6973 `echo'.
6974
6975c. The `echo' builtin now accepts \0xxx (zero to three octal digits following
6976 the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
6977 POSIX.1-2001 compliance.
6978
69793. Changes to Readline
6980
6981a. Fixed a small problem in _rl_insert_char with multibyte characters.
6982
6983b. Fixes from IBM for line wrapping problems when using multibyte characters.
6984
6985c. Fixed a problem which caused the display to be messed up when the last
6986 line of a multi-line prompt (possibly containing invisible characters)
6987 was longer than the screen width.
6988
8868edaf 6989d. Fixed a problem with the vi-mode `r' command that occurred on systems with
7117c2d2
JA
6990 support for multibyte characters when running in a locale without any
6991 multibyte characters.
6992
6993------------------------------------------------------------------------------
6994This document details the changes between this version, bash-2.05b-alpha1,
6995and the previous version, bash-2.05a-release.
6996
69971. Changes to Bash
6998
6999a. Some changes to work around inlining differences between compilers.
7000
7001b. Added more prototypes for internal shell typedefs, to catch argument
7002 passing errors when using pointers to functions.
7003
7004c. The `cd' builtin now fails in posix mode when a valid directory cannot be
7005 constructed from a relative pathname argument and the $PWD using pathname
7006 canonicalization, and the -P option has not been supplied. Previously,
7007 the shell would attempt to use what the user typed, leading to weird
7008 values for $PWD and discrepancies between the value of $PWD and the
7009 actual working directory.
7010
7011d. The `cd' builtin now resets $PWD when canonicalization fails but a chdir
7012 to the pathname passed as an argument succeeds (when not in posix mode).
7013
7014e. The `fc' builtin has been fixed, as POSIX requires, to use the closest
7015 history position in range when given an out-of-range argument.
7016
7017f. The history file loading code was changed to allow lines to be saved in
7018 the history list from the shell startup files.
7019
b80f6443 7020g. `history -s args' now works better in compound commands.
7117c2d2
JA
7021
7022h. The tilde expansion code was fixed to better recognize when it's being
7023 invoked in an assignment context, which enables expansion after `='
7024 and `:'.
7025
7026i. Fixed the command name completion code so a slash is no longer appended
7027 to a single match if there happens to be a directory with that name in
7028 $PWD.
7029
7030j. Fixed compound array assignment to no longer perform alias expansion, to
7031 allow reserved words as array members, and to not produce extra output
7032 when the `-v' option had been enabled.
7033
7034k. Fixed the programmable completion code to better handle newlines in lists
7035 of possible completions (e.g., `complete -W').
7036
7037l. Removed the reserved words from the `bash-builtins' manual page.
7038
7039m. Parser error reporting now attempts to do a better job of identifying the
7040 token in error rather than doing straight textual analysis.
7041
7042n. Fixes for Inf/NaN, locales, wide/multibyte characters and zero-length
7043 arguments in the library snprintf(3) replacement.
7044
7045o. `read -e' no longer does command name completion on the first word on
7046 the line being read.
7047
7048p. `select' now returns failure if the read of the user's selection fails.
7049
7050q. Fixed a bug that could cause a core dump when setting $PIPESTATUS.
7051
7052r. Fixes to not allocate so many job slots when the shell is running a loop
7053 with job control enabled in a subshell of an interactive shell.
7054
7055s. Fixed a bug in the trap code that caused traps to be inherited by
7056 command substitutions in some cases.
7057
7058t. Fixed a bug that could cause alias expansion to inappropriately expand
7059 the word following the alias.
7060
7061u. Fixed a bug in the `kill' builtin that mishandled negative pid arguments.
7062
7063v. The parser is less lenient when parsing assignment statements where the
7064 characters before the `=' don't comprise a valid identifier.
7065
7066w. The arithmetic expression evaluation code now honors the setting of the
7067 `-u' option when expanding variable names.
7068
7069x. Fixed the arithmetic evaluation code to allow array subscripts to be
7070 assigned (`let b[7]=42') and auto-incremented and auto-decremented
7071 (e.g., b[7]++).
7072
7073y. Reimplemented the existing prompt string date and time expansions using
7074 strftime(3), which changed the output of \@ in some locales.
7075
7076z. Fixed a bug that could cause a core dump when a special shell variable
7077 (like RANDOM) was converted to an array with a variable assignment.
7078
7079aa. Fixed a bug that would reset the handler for a signal the user had
7080 trapped to a function that would exit the shell when setting the exit
7081 trap in a non-interactive shell.
7082
7083bb. Changed the execve(2) wrapper code to check whether or not a failing
7084 command is a directory before looking at whether a `#!' interpreter
7085 failed for some reason.
7086
7087cc. Fixed a bug in the command printing code so it no longer inserts a `;'
7088 after a newline, which produces a syntax error when reused as input.
7089
7090dd. The code that expands $PS4 no longer inherits the `-x' flag.
7091
7092ee. The bash-specific completion functions may now take advantage of the
7093 double-TAB and M-? features of the standard readline completion
7094 functions.
7095
7096ff. The mail checking code no longer prints a message if the checked file's
7097 size has not increased, even if the access time is less than the modification time.
7098
7099gg. Rewrote the variable symbol table code: there is now a stack of
7100 contexts, each possibly including a separate symbol table; there can
7101 be more than one temporary environment supplied to nested invocations
7102 of `./source'; the temporary environments no longer require so much
7103 special-case code; shell functions now handle the temporary environment
7104 and local variables more consistently; function scope exit is faster now
7105 that the entire symbol table does not have to be traversed to dispose of
7106 local variables; it is now easier to push vars from the temporary
7107 environment to the shell's variable table in posix mode; some duplicated
7108 code has been removed.
7109
7110hh. Regularized the error message printing code; builtin_error is now called
7111 more consistently, and common error message strings are handled by small
7112 functions. This should make eventual message translation easier.
7113
7114ii. Error messages now include the line number in a script when the shell
7115 is not interactive.
7116
7117jj. Array subscript expansion now takes place even when the array variable is
7118 unset, so side effects will take place.
7119
7120kk. Fixed a bug in the SICGHLD child-reaping code so that it won't find
7121 jobs already marked as terminated if the OS reuses pids quickly enough.
7122
7123ll. Fixed a bug that could cause a signal to not interrupt the `wait'
7124 builtin while it was waiting for a background process to terminate.
7125
7126mm. A couple of changes to make it easier for multiple shells to share history
7127 files using `history -n', `history -r', and `history -w'.
7128
7129nn. The `getopts' builtin always increments OPTIND to point to the next
7130 option to be handled when an option is returned, whether it's valid
7131 or not, as POSIX 1003.x-2001 requires.
7132
7133oo. Changed some parts of the expansion code to avoid allocating and
7134 immediately freeing memory without using the results for anything.
7135
7136pp. The shell now keeps track of $IFS internally, updating its internal map
7137 each time the variable is assigned a new value (or at local scope exit).
7138 This saves thousands of hash lookups for IFS, which, while individually
7139 cheap, add up.
7140
7141qq. Rewrote the hash table code: searching and insertion are much faster now,
7142 and it uses a better string hashing function; augmented the function
7143 interface to simplify other parts of the code and remove duplicated code
7144
7145rr. The shell now uses a simple, generic `object cache' for allocating and
7146 caching words and word lists, which were the major users of
7147 malloc/free.
7148
7149ss. Fixed the assignment statement parsing code to allow whitespace and
7150 newlines in subscripts when performing array element assignment.
7151
7152tt. The shell now issues many fewer calls to sigprocmask and other signal
7153 masking system calls.
7154
7155uu. Fixed the `test' and conditional command file comparison operators to
7156 work right when one file has a non-positive timestamp and the other
7157 does not exist.
7158
7159vv. Fixed some cases where the special characters '\001' and '\177' in the
7160 values of variables or positional parameters caused incorrect expansion
7161 results.
7162
71632. Changes to Readline
7164
7165a. Fixed output of comment-begin character when listing variable values.
7166
7167b. Added some default key bindings for common escape sequences produced by
7168 HOME and END keys.
7169
7170c. Fixed the mark handling code to be more emacs-compatible.
7171
7172d. A bug was fixed in the code that prints possible completions to keep it
7173 from printing empty strings in certain circumstances.
7174
7175e. Change the key sequence printing code to print ESC as M\- if ESC is a
7176 meta-prefix character -- it's easier for users to understand than \e.
7177
7178f. Fixed unstifle_history() to return values that match the documentation.
7179
7180g. Fixed the event loop (rl_event_hook) to handle the case where the input
7181 file descriptor is invalidated.
7182
7183h. Fixed the prompt display code to work better when the application has a
7184 custom redisplay function.
7185
7186i. Changes to make reading and writing the history file a little faster, and
7187 to cope with huge history files without calling abort(3) from xmalloc.
7188
7189j. The vi-mode `S' and `s' commands are now undone correctly.
7190
71913. New Features in Bash
7192
7193a. If set, TMOUT is the default timeout for the `read' builtin.
7194
7195b. `type' has two new options: `-f' suppresses shell function lookup, and
7196 `-P' forces a $PATH search.
7197
7198c. New code to handle multibyte characters.
7199
7200d. `select' was changed to be more ksh-compatible, in that the menu is
7201 reprinted each time through the loop only if REPLY is set to NULL.
7202 The previous behavior is available as a compile-time option.
7203
7204e. `complete -d' and `complete -o dirnames' now force a slash to be
7205 appended to names which are symlinks to directories.
7206
7207f. There is now a bindable edit-and-execute-command readline command,
7208 like the vi-mode `v' command, bound to C-xC-e in emacs mode.
7209
7210g. Added support for ksh93-like [:word:] character class in pattern matching.
7211
7212h. The $'...' quoting construct now expands \cX to Control-X.
7213
7214i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
7215 the result into the expanded prompt.
7216
7217j. The shell now performs arithmetic in the largest integer size the
7218 machine supports (intmax_t), instead of long.
7219
7220k. If a numeric argument is supplied to one of the bash globbing completion
7221 functions, a `*' is appended to the word before expansion is attempted.
7222
7223l. The bash globbing completion functions now allow completions to be listed
7224 with double tabs or if `show-all-if-ambiguous' is set.
7225
7226m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
7227 readline's appending a space to the completed word.
7228
7229n. New `here-string' redirection operator: <<< word.
7230
7231o. When displaying variables, function attributes and definitions are shown
7232 separately, allowing them to be re-used as input (attempting to re-use
7233 the old output would result in syntax errors).
7234
7235p. There is a new configuration option `--enable-mem-scramble', controls
7236 bash malloc behavior of writing garbage characters into memory at
7237 allocation and free time.
7238
7239q. The `complete' and `compgen' builtins now have a new `-s/-A service'
7240 option to complete on names from /etc/services.
7241
7242r. `read' has a new `-u fd' option to read from a specified file descriptor.
7243
7244s. Fix the completion code so that expansion errors in a directory name
7245 don't cause a longjmp back to the command loop.
7246
7247t. Fixed word completion inside command substitution to work a little more
7248 intuitively.
7249
7250u. The `printf' %q format specifier now uses $'...' quoting to print the
7251 argument if it contains non-printing characters.
7252
7253v. The `declare' and `typeset' builtins have a new `-t' option. When applied
7254 to functions, it causes the DEBUG trap to be inherited by the named
7255 function. Currently has no effect on variables.
7256
7257w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
7258 [[...]] conditional commands, and for ((...)) loops.
7259
7260x. The expansion of $LINENO inside a shell function is only relative to the
7261 function start if the shell is interactive -- if the shell is running a
7262 script, $LINENO expands to the line number in the script. This is as
7263 POSIX-2001 requires.
7264
7265y. The bash debugger in examples/bashdb has been modified to work with the
7266 new DEBUG trap semantics, the command set has been made more gdb-like,
7267 and the changes to $LINENO make debugging functions work better. Code
7268 from Gary Vaughan.
7269
7270z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
7271 and close).
7272
7273aa. There is a new `-l' invocation option, equivalent to `--login'.
7274
7275bb. The `hash' builtin has a new `-l' option to list contents in a reusable
7276 format, and a `-d' option to remove a name from the hash table.
7277
72784. New Features in Readline
7279
7280a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
7281 be bound to readline functions. Now the arrow keys may be used in vi
7282 insert mode.
7283
7284b. When listing completions, and the number of lines displayed is more than
7285 the screen length, readline uses an internal pager to display the results.
7286 This is controlled by the `page-completions' variable (default on).
7287
7288c. New code to handle editing and displaying multibyte characters.
7289
7290d. The behavior introduced in bash-2.05a of deciding whether or not to
7291 append a slash to a completed name that is a symlink to a directory has
7292 been made optional, controlled by the `mark-symlinked-directories'
7293 variable (default is the 2.05a behavior).
7294
7295e. The `insert-comment' command now acts as a toggle if given a numeric
7296 argument: if the first characters on the line don't specify a
7297 comment, insert one; if they do, delete the comment text
7298
7299f. New application-settable completion variable:
7300 rl_completion_mark_symlink_dirs, allows an application's completion
7301 function to temporarily override the user's preference for appending
7302 slashes to names which are symlinks to directories.
7303
7304g. New function available to application completion functions:
7305 rl_completion_mode, to tell how the completion function was invoked
7306 and decide which argument to supply to rl_complete_internal (to list
7307 completions, etc.).
7308
7309h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
7310 bindable command, which could be bound to `Insert'.
7311
7312i. New application-settable completion variable:
7313 rl_completion_suppress_append, inhibits appending of
7314 rl_completion_append_character to completed words.
7315
7316j. New key bindings when reading an incremental search string: ^W yanks
7317 the currently-matched word out of the current line into the search
7318 string; ^Y yanks the rest of the current line into the search string,
7319 DEL or ^H deletes characters from the search string.
7320
7321------------------------------------------------------------------------------
f73dda09
JA
7322This document details the changes between this version, bash-2.05a-release,
7323and the previous version, bash-2.05a-rc1.
7324
73251. Changes to Bash
7326
7327a. Fixed the `printf' builtin so that the variable name supplied as an
7328 argument to a %n conversion must be a valid shell identifier.
7329
7330b. Improved the random number generator slightly.
7331
7332c. Changes to configuration to not put -I/usr/include into $CFLAGS, since
7333 it messes up some includes.
7334
7335d. Corrected description of POSIXLY_CORRECT in man page and info manual.
7336
7337e. Fixed a couple of cases of incorrect function prototypes that sneaked
7338 through and caused compilation problems.
7339
7340f. A few changes to avoid potential core dumps in the programmable completion
7341 code.
7342
7343g. Fixed a configure problem that could cause a non-existent file to show
7344 up in LIBOBJS.
7345
7346h. Fixed a configure problem that could cause siglist.o to not be built when
7347 required.
7348
7349i. Changes to the strtoimax and strtoumax replacement functions to work
7350 around buggy compilers.
7351
7352j. Fixed a problem with the snprintf replacement function that could
7353 potentially cause a core dump.
7354
73552. Changes to Readline
7356
7357a. Fixed a locale-specific problem in the vi-mode `goto mark' command.
7358
7359b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
7360 include file problems.
7361
7362------------------------------------------------------------------------------
7363This document details the changes between this version, bash-2.05a-rc1,
7364and the previous version, bash-2.05a-beta1.
7365
73661. Changes to Bash
7367
7368a. Fixed the snprintf replacement to correctly implement the `alternate form'
7369 of the %g and %G conversions.
7370
7371b. Fixed snprintf to correctly handle the optional precision with the %g and
7372 %G conversions.
7373
7374c. Fixed the arithmetic evaluation code to correct the values of `@' and `_'
7375 when translating base-64 constants (they were backwards).
7376
7377d. New library functions for formatting long and long long ints.
7378
7379e. Fixed a few places where negative array subscripts could have occurred,
7380 mostly as the result of systems using signed characters.
7381
7382f. Fixed a few places that assumed a pid_t was no wider than an int.
7383
7384g. Fixed the `maildir' mail checking code to work on systems where a
7385 `struct stat' doesn't include an `st_blocks' member.
7386
7387h. Fixed snprintf to make `unsigned long long' conversion formats (%llu)
7388 work better.
7389
7390i. Fixed snprintf to not print a sign when asked to do an unsigned conversion.
7391
7392j. Made configure changes to avoid compiling empty source files in lib/sh.
7393
7394k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax,
7395 strtoumax.
7396
7397l. The `printf' builtin now handles the `ll' and `j' length modifiers
7398 directly, since they can affect the type and width of the argument
7399 passed to printf(3).
7400
7401m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to
8868edaf 7402 have more systematic naming, with accompanying changes to configure.in.
f73dda09
JA
7403
7404n. Fixed snprintf to handle long doubles and the %a/%A conversions by
7405 falling back to sprintf, as long as sprintf supports them.
7406
7407o. Fixed return value from vsnprintf/snprintf to be the number of characters
7408 that would have been printed, even if that number exceeds the buffer
7409 size passed as an argument.
7410
7411p. Bash no longer attempts to define its own versions of some ctype macros
7412 if they are implemented as functions in libc but not as macros in
7413 <ctype.h>.
7414
7415q. Changed the variable printing code (used by `set', `export', etc.) to
7416 not use the $'...' syntax when in posix mode, since that caused
7417 interoperability problems with other shells (most notably with autoconf).
7418 When not in posix mode, it uses $'...' if the string to be printed
7419 contains non-printing characters and regular single quotes otherwise.
7420
7421r. snprintf now recognizes the %F conversion.
7422
7423s. Fixed a bug that could cause the wrong status to be returned by a shell
7424 function when the shell is compiled without job control and a null
7425 command containing a command substutition was executed in the function.
7426
7427t. When in posix mode, the default value for MAILCHECK is 600.
7428
7429u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables
7430 if they're not in the initial environment.
7431
7432v. If SECONDS appears in the initial environment with a valid integer value,
7433 bash uses that as the starting value, as if an assignment had been
7434 performed.
7435
7436w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it
7437 gives them default values if they don't appear in the initial environment.
7438
7439x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE,
7440 even if it assigns them default values.
7441
7442y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT
7443 if they appear in the initial environment.
7444
7445z. Bash no longer attempts to discover if it's being run by sshd in order to
7446 run the startup files. If the SSH_SOURCE_BASHRC is uncommented in
7447 config-top.h it will attempt to do so as previously, but that's commented
7448 out in the distributed version.
7449
7450aa. Fixed a typo in the code that tests for LC_NUMERIC.
7451
7452bb. The POSIXLY_CORRECT shell variable and its effects are now documented.
7453
7454cc. Some changes to several of the support shell scripts included in the
7455 definitions to try to avoid race conditions and attacks.
7456
7457dd. Several changes to avoid warnings from `gcc -Wall'.
7458
7459ee. Fixed a problem with the `unset' builtin that could cause incorrect
7460 results if asked to unset a variable and an array subscript in the
7461 same command.
7462
7463ff. A few changes to the shell's temporary file creation code to avoid
7464 potential file descriptor leaks and to prefer the system's idea of
7465 the temporary directory to use.
7466
7467gg. Fixes to build with the C alloca in lib/malloc/alloca.c if the system
7468 requires it but the shell has been configured --without-bash-malloc.
7469
7470hh. Updated the documentation to note that only interactive shells resend
7471 SIGHUP to all jobs before exiting.
7472
7473ii. Fixes to only pass unquoted tilde words to tilde_expand, rather than
7474 rely on tilde_expand or getpwnam(3) to handle the quotes (MacOS 10.x
7475 will remove backslashes in any login name passed to getpwnam(3)).
7476
7477jj. Small change from Paul Eggert to make LINENO right in commands run with
7478 `bash -c'.
7479
74802. New Features in Bash
7481
7482a. The `printf' builtin now handles the %a and %A conversions if they're
7483 implemented by printf(3).
7484
7485b. The `printf' builtin now handles the %F conversion (just about like %f).
7486
7487c. The `printf' builtin now handles the %n conversion like printf(3). The
7488 corresponding argument is the name of a shell variable to which the
7489 value is assigned.
7490
74913. Changes to Readline
7492
7493a. Fixed a few places where negative array subscripts could have occurred.
7494
7495b. Fixed the vi-mode code to use a better method to determine the bounds of
7496 the array used to hold the marks.
7497
7498c. Fixed the defines in chardefs.h to work better when chars are signed.
7499
7500d. Fixed configure.in to use the new names for bash autoconf macros.
7501
7502e. Readline no longer attempts to define its own versions of some ctype
7503 macros if they are implemented as functions in libc but not as macros in
7504 <ctype.h>.
7505
7506f. Fixed a problem where rl_backward could possibly set point to before
7507 the beginning of the line.
7508
7509------------------------------------------------------------------------------
7510This document details the changes between this version, bash-2.05a-beta1,
7511and the previous version, bash-2.05a-alpha1.
7512
75131. Changes to Bash
7514
8868edaf 7515a. Fixed a bug in the evaluation of arithmetic `for' statements when the
f73dda09
JA
7516 expanded expression is NULL.
7517
7518b. Fixed an unassigned variable problem in the redirection printing code.
7519
7520c. Added more prototypes to extern function declarations in the header
7521 files and to static function declarations in C source files.
7522
7523d. Make sure called functions have a prototype in scope, to get the arguments
7524 and return values right instead of casting. Removed extern function
7525 declarations from C source files that were already included in header
7526 files.
7527
7528e. Changed some function arguments to use function typedefs in general.h so
7529 the prototypes can be checked. The only use of Function and VFunction
7530 now is for unwind-protects.
7531
7532f. More const changes to function arguments and appropriate variables.
7533
7534g. Changed the mail checking support to handle `maildir'-style mail
7535 directories.
7536
7537h. Augmented the bash malloc to pass in the file and line number information
7538 for each malloc, realloc, and free. This should result in better error
7539 messages.
7540
7541i. The `old' gnu malloc is no longer a configuration option.
7542
7543j. Augmented the bash malloc with optional tracing and registering allocated
7544 and freed memory.
7545
7546k. Prompt string decoding now saves and restores the value of $? when it
7547 expands the prompt string, so command substitutions don't change $?.
7548
7549i. Array indices are now `long', since shell arithmetic is performed as long,
7550 and the internal arrayind_t type is used consistently.
7551
7552j. Some more `unsigned char *' fixes from Paul Eggert.
7553
7554k. Fixed a bad call to builtin_error that could cause core dumps when making
7555 local variables.
7556
7557l. `return' may no longer be used to terminate a `select' command, for
7558 compatibility with ksh.
7559
7560m. Changed code that reads octal numbers to do a better job of detecting
7561 overflows.
7562
7563n. The time formatting code no longer uses absolute indices into a buffer,
7564 because the buffer size changes depending on the size of a `time_t'.
7565
7566o. `umask' now prints four digits when printing in octal mode, for
7567 compatibility with other shells.
7568
7569p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L'
7570 formats and long doubles better, and internal functions have been
8868edaf 7571 simplified where appropriate.
f73dda09
JA
7572
7573q. Some `time_t' fixes for machines were a time_t is bigger than a long.
7574
7575r. Replaced some bash-specific autoconf macros with standard equivalents.
7576
7577s. Improvmed the code that constructs temporary filenames to make the
7578 generated names a bit more random.
7579
7580t. Added code that checks for ascii before calling any of the is* ctype
7581 functions.
7582
7583u. Changed some places where a `char' was used as an array subscript to use
7584 `unsigned char', since a `char' can be negative if it's signed by default.
7585
7586v. Lots of changes to the `ulimit' builtin from Paul Eggert to add support
7587 for the new POSIX-200x RLIM_SAVED_CUR and RLIM_SAVED_MAX values and
7588 simplify the code.
7589
7590w. `ulimit' now prints the description of a resource in any error message
7591 relating to fetching or setting that resource's limits.
7592
7593x. The `snprintf' replacement now computes maximum values at compile
7594 time rather than using huge constants for things like long long.
7595
7596y. Interactive shells now ignore `set -n'.
7597
7598z. Changed the malloc bookkeeping information so that it's now 8 bytes
7599 instead of 12 on most 32-bit machines (saving 4 bytes per allocation),
7600 restoring 8-byte alignment.
7601
7602aa. The malloc error reporting code now attempts to print the file and line
7603 number of the call that caused the error.
7604
7605bb. Changed the redirection error reporting code to catch EBADF errors and
7606 report the file descriptor number rather than the file being redirected
7607 to or from (e.g., things like `exec 4242<x' where 4242 is an out-of-range
7608 file descriptor).
7609
7610cc. `printf', `echo -e', and the $'...' code now process only two hex digits
7611 after a `\x' escape sequence for compatibility with other shells, and
7612 the documentation was changed to note that the octal and hex escape
7613 sequences result in an eight-bit value rather than strict ASCII.
7614
76152. Changes to Readline
7616
7617a. The completion code now attempts to do a better job of preserving the
7618 case of the word the user typed if ignoring case in completions.
7619
7620b. Readline defaults to not echoing the input and lets the terminal
7621 initialization code enable echoing if there is a controlling terminal.
7622
7623c. The key binding code now processes only two hex digits after a `\x'
7624 escape sequence, and the documentation was changed to note that the
7625 octal and hex escape sequences result in an eight-bit value rather
7626 than strict ASCII.
7627
76283. New Features in Bash
7629
7630a. The builtin `ulimit' now takes two new non-numeric arguments: `hard',
7631 meaning the current hard limit, and `soft', meaning the current soft
7632 limit, in addition to `unlimited'
7633
7634b. `ulimit' now prints the option letter associated with a particular
7635 resource when printing more than one limit.
7636
7637c. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
7638 one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
7639
76404. New Features in Readline
7641
7642a. New bindable variable `history-preserve-point'. If set, the history
7643 code attempts to place the user at the same location on each history
8868edaf 7644 line retrieved with previous-history or next-history.
f73dda09
JA
7645
7646------------------------------------------------------------------------------
7647This document details the changes between this version, bash-2.05a-alpha1,
7648and the previous version, bash-2.05-release.
7649
76501. Changes to Bash
7651
7652a. Better checks in the redirection code for write errors.
7653
7654b. bashbug now uses $TMPDIR, defaulting to /tmp, and uses mktemp(1) more
7655 portably.
7656
7657c. System-specific configuration changes for: Interix, OpenBSD, FreeBSD,
7658 MacOS X.
7659
7660d. Some more `const' cleanups through the code.
7661
7662e. Fixed a typo in the /dev/fd redirection code, better checks for valid
7663 numeric fds in /dev/fd.
7664
7665f. Fixed many parts of the shell to handle integer overflow more gracefully
7666 and to do more stringent checks for valid numbers.
7667
7668g. Fixed mksignames to include config.h.
7669
7670h. Fixed an uninitialized variable problem that could cause the shell to core
7671 dump when replacing characters in a string.
7672
7673i. New mechanism for updating the patch level when official patches are
7674 released (patchlevel.h).
7675
7676j. configure.in changed to no longer require external files _distribution and
7677 _patchlevel.
7678
7679k. Fixed non-interactive shell initialization problem when bash started as
7680 `bash -i filename'.
7681
7682l. Fixed printf builtin conversion error handling to be POSIX.2-conformant.
7683
7684m. autoconf-2.52 is now used to build configure; autoconf-2.50 or newer is
7685 required. Some of the bash-specific macros were removed, since they are
7686 now standard.
7687
7688n. Startup files and files read with source or `.' are no longer required to
7689 be regular files.
7690
7691o. Fixed core dump in builtin printf when user-supplied precision or field
7692 width is 0.
7693
7694p. Fixed builtin printf to treat a negative field width as a positive field
7695 width with left-justification.
7696
7697r. New unwind-protect implementation from Paul Eggert.
7698
7699s. Fixed an inadvertently-unclosed comment in the bash completion code that
7700 caused programmable completions to not add trailing slashes or spaces to
7701 completions.
7702
7703t. Fixed the process substitution code to cope better when stdin is closed.
7704
7705v. Fixes, mostly from Paul Eggert, for a few possible buffer overflows in
7706 the shell.
7707
7708w. Fixes from Paul Eggert to avoid most of the type casts in the shell code,
7709 and use more appropriate types for a number of variables.
7710
8868edaf 7711x. Command substitution no longer inherits the DEBUG trap.
f73dda09 7712
8868edaf 7713y. Some fixes to the process substitution code on machines without /dev/fd so
f73dda09
JA
7714 that named pipes are not removed inappropriately.
7715
7716z. The loadable `getconf' builtin is now much more complete, and will become
7717 part of the shell in the future.
7718
7719aa. The select command no longer terminates on a `return', so it can be used
7720 to return from an enclosing function (as ksh does it).
7721
7722bb. Fixed the extended pattern matching code to behave better when presented
7723 with incorrectly-formed patterns.
7724
7725cc. Some changes were made with the intent of making cross-compilation easier.
7726
7727dd. The network code (/dev/tcp and /dev/udp redirections) uses getaddrinfo(3)
7728 if it's available, which adds support for IPv6.
7729
7730ee. Subshells of login shells no longer source ~/.bash_logout when they exit.
7731
7732ff. Fixes so that subshells don't exit inappropriately if the -e option has
7733 been set.
7734
7735gg. Restricted shells no longer allow functions to be exported.
7736
7737hh. Changes to the pattern matching code so extended pattern matching works
7738 on systems with deficient shared library implementations, like MacOS X.
7739
7740ii. Better error messages when a script with a leading `#!interp' fails
7741 to execute because of problems with `interp'.
7742
7743jj. Fixed `compgen' to handle the `-o default' option better.
7744
7745kk. Fixed the job control code to force an asynchronous process's standard
7746 input to /dev/null only if job control is not active.
7747
7748ll. Fixed a possible infinite recursion problem when `fc ""=abc' (a null
7749 pattern) is used to re-execute a previous command.
7750
7751mm. Fixed `declare [-a] var=value' to assign VALUE to element 0 if VAR is an
7752 array variable. Similarly for `declare [-a] var[N]=value'. This is like
7753 ksh93.
7754
7755nn. Fixed a bug that caused `read -a aname' to work even if ANAME had been
7756 declared readonly.
7757
7758oo. Fixed a possible integer overflow problem when constructing names for
7759 temporary files.
7760
77612. New Features in Bash
7762
7763a. Added support for DESTDIR installation root prefix, so you can do a
7764 `make install DESTDIR=bash-root' and do easier binary packaging.
7765
7766b. Added support for builtin printf "'" flag character as per latest POSIX
7767 drafts.
7768
7769c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
7770 ISO C99).
7771
7772d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
7773 (bash doesn't use very much of what it returns).
7774
7775e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
7776 but ignored.
7777
7778f. New read-only `shopt' option: login_shell. Set to non-zero value if the
7779 shell is a login shell.
7780
7781g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
7782
7783h. New `-A group/-g' option to complete and compgen; does group name
7784 completion.
7785
7786i. New `-t' option to `hash' to list hash values for each filename argument.
7787
7788j. New [-+]O invocation option to set and unset `shopt' options at startup.
7789
7790k. configure's `--with-installed-readline' option now takes an optional
7791 `=PATH' suffix to set the root of the tree where readline is installed
7792 to PATH.
7793
7794l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run
7795 whenever the shell would have exited if the -e option were enabled.
7796 It is not inherited by shell functions.
7797
7798m. `readonly', `export', and `declare' now print variables which have been
7799 given attributes but not set by assigning a value as just a command and
7800 a variable name (like `export foo') when listing, as the latest POSIX
7801 drafts require.
7802
7803n. `bashbug' now requires that the subject be changed from the default.
7804
7805o. configure has a new `--enable-largefile' option, like other GNU utilities.
7806
7807p. `for' loops now allow empty word lists after `in', like the latest POSIX
7808 drafts require.
7809
78103. Changes to Readline
7811
7812a. More `const' and type casting fixes.
7813
7814b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
7815 overflow problems.
7816
7817c. The completion code no longer appends a `/' or ` ' to a match when
7818 completing a symbolic link that resolves to a directory name, unless
7819 the match does not add anything to the word being completed. This
7820 means that a tab will complete the word up to the full name, but not
7821 add anything, and a subsequent tab will add a slash.
7822
7823d. Fixed a trivial typo that made the vi-mode `dT' command not work.
7824
7825e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
7826
7827f. Fixed the tty code so that ^V works more than once.
7828
7829g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
7830 because the use of __P in typedefs conflicted g++ and glibc.
7831
78324. New Features in Readline
7833
7834a. Added extern declaration for rl_get_termcap to readline.h, making it a
7835 public function (it was always there, just not in readline.h).
7836
7837b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
7838 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
7839
7840c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
7841
7842d. New bindable boolean readline variable: match-hidden-files. Controls
7843 completion of files beginning with a `.' (on Unix). Enabled by default.
7844
7845e. The history expansion code now allows any character to terminate a
7846 `:first-' modifier, like csh.
7847
7848f. The incremental search code remembers the last search string and uses
7849 it if ^R^R is typed without a search string.
7850
7851------------------------------------------------------------------------------
28ef6c31
JA
7852This document details the changes between this version, bash-2.05-release,
7853and the previous version, bash-2.05-beta2.
7854
78551. Changes to Bash
7856
7857a. Make sure we note that the first line of a multi-line command was not
7858 saved in the history if the tests for HISTCONTROL succeed, but the
7859 HISTIGNORE check fails.
7860
7861b. Fixed a bug in the pattern matching code that caused `[' to be treated
7862 as a special character inside a `[...]' bracket expression.
7863
7864c. Fixed a bug in the pattern matching code that caused `]' to terminate
7865 a bracket expression even if it was the first character after the `['
7866 (or a leading `!' or `^').
7867
7868d. Made a small change to report a more user-friendly error message if
7869 execve(2) fails because of an error with the interpreter in a script
7870 with a leading `#! interpreter'.
7871
7872e. If the OS does not support an exec(2) magic number of `#!', make sure we
7873 have a non-null interpreter name before attempting to execute it.
7874
7875f. Fixed a bug that caused the shell process to end up in a different
7876 process group than the controlling terminal if a job-control shell was
7877 run with `exec' in the startup files.
7878
7879g. When started in POSIX mode, either by `bash --posix', `bash -o posix', or
7880 `sh', $SHELLOPTS includes `posix' and POSIXLY_CORRECT is set.
7881
7882h. Fixed a problem that caused the `\W' prompt string escape sequence to
7883 expand to nothing when $PWD was `//'.
7884
7885i. The `bashbug' shell script no longer uses $(...) command substitution.
7886
7887j. When `set' is invoked without options in POSIX mode, it no longer prints
7888 the names and definitions of shell functions.
7889
78902. Changes to Readline
7891
7892a. rl_set_paren_blink_timeout() is now documented.
7893
7894b. Corrected history.3 man page: `$' is not in the default value of
7895 history_word_delimiters.
7896
7897c. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
7898 value, rl_read_key() now immediately returns '\n' (which is assumed to
7899 be bound to accept-line).
7900
79013. New Features in Bash
7902
7903a. The `>&word' redirection now works in POSIX mode as it does by default,
7904 since POSIX.2 leaves it unspecified.
7905
7906------------------------------------------------------------------------------
7907This document details the changes between this version, bash-2.05-beta2,
7908and the previous version, bash-2.05-beta1.
7909
79101. Changes to Bash
7911
7912a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported.
7913
7914b. Fixed startup so posixly_correct is retained across subshells begun to
7915 execute scripts without a leading `#!'.
7916
7917c. Fixed a bug that caused $(< file) to not work in a (...) subshell.
7918
7919d. Added config support for Linux running on the IBM S390.
7920
7921e. Fixed a bug that caused bash to get its input pointer out of sync when
7922 reading commands through a pipe and running a command with standard
7923 input redirected from a file.
7924
7925f. Made a change so that command completion now makes about half as many
7926 stat(2) calls when searching the $PATH.
7927
7928g. Fixed a bug that caused variable assignments preceding `return' to not
7929 be propagated to the shell environment in POSIX mode.
7930
7931h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed
7932 on `word'.
7933
7934i. In POSIX mode, `break' and `continue' do not complain and return success
7935 if called when the shell is not executing a loop.
7936
7937j. Fixed `bash -o posix' to work the same as `bash --posix'.
7938
7939k. Fixed a bug where variable assignments preceding `eval' or `source/.'
7940 would not show up in the environment exported to subshells run by the
7941 commands.
7942
7943l. In POSIX mode, shells started to execute command substitutions inherit
7944 the value of the `-e' option from their parent shell.
7945
7946m. In POSIX mode, aliases are expanded even in non-interactive shells.
7947
7948n. Changed some of the job control messages to display the text required by
7949 POSIX.2 when the shell is in POSIX mode.
7950
7951o. Fixed a bug in `test' that caused it to occasionally return incorrect
7952 results when non-numeric arguments were supplied to `-t'.
7953
79542. Changes to Readline
7955
7956a. Some changes were made to avoid gcc warnings with -Wall.
7957
7958b. rl_get_keymap_by_name now finds keymaps case-insensitively, so
7959 `set keymap EMACS' works.
7960
7961c. The history file writing and truncation functions now return a useful
7962 status on error.
7963
7964d. Fixed a bug that could cause applications to dereference a NULL pointer
7965 if a NULL second argument was passed to history_expand().
7966
79673. New Features in Bash
7968
7969a. doc/readline.3 has been moved to the readline distribution.
7970
79714. New Features in Readline
7972
7973a. New function, rl_get_screen_size (int *rows, int *columns), returns
7974 readline's idea of the screen dimensions.
7975
7976b. The timeout in rl_gather_tyi (readline keyboard input polling function)
7977 is now settable via a function (rl_set_keyboard_input_timeout()).
7978
7979c. Renamed the max_input_history variable to history_max_entries; the old
7980 variable is maintained for backwards compatibility.
7981
7982d. The list of characters that separate words for the history tokenizer is
7983 now settable with a variable: history_word_delimiters. The default
7984 value is as before.
7985
7986------------------------------------------------------------------------------
7987This document details the changes between this version, bash-2.05-beta1,
7988and the previous version, bash-2.05-alpha1.
7989
79901. Changes to Bash
7991
7992a. Changes to allow shared library and object building on the GNU Hurd.
7993
7994b. Fixes to the way exported functions are placed into the environment and
7995 cached.
7996
7997c. The globbing library once again respects locales when processing ranges
7998 in bracket expressions while doing pattern matching.
7999
8000d. System-specific configuration changes for: Tru 64, Interix
8001
8002e. Bashbug now uses /usr/bin/editor as one of the editing alternatives, and
8003 will use mktemp(1) or tempfile(1), if present, for temporary file creation.
8004
8005f. Bash no longer performs a binary file check on a script argument that's
8006 really a tty (like /dev/fd/0 or /dev/stdin).
8007
8008g. Fixed a bug in the execution of shell scripts that caused the effects of
8009 $BASH_ENV to be undone in some cases.
8010
8011h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly.
8012
8013i. Several changes to the job control code to avoid some signal state
8014 manipulation.
8015
8016j. The Bash malloc no longer blocks signals as often, which should make it
8017 faster.
8018
8019k. Fixed a parsing bug that did not allow backslash to escape a single quote
8020 inside a $'...' construct.
8021
8022l. Fixed a bug that caused things like ${var:=$'value'} to be parsed
8023 incorrectly. This showed up in newer versions of autoconf.
8024
8025m. Fixed a bug in the bash-specific readline initialization that caused
8026 key bindings to bash-specific function names appearing in .inputrc to
8027 not be honored.
8028
8029n. Bash now sets the file descriptor it uses to save the file descriptor
8030 opened on a shell script to close on exec.
8031
8032o. Fixed a bug in the prompt string decoding that caused it to misbehave
8033 when presented an octal sequence of fewer than three characters.
8034
8035p. Fixed the `test' builtin to return an error if `[' is supplied a single
8036 argument that is not `]'.
8037
8038q. Fixed a bug that caused subshells started to run executable shell scripts
8039 without a leading `#!' to incorrectly inherit an argument list preceding
8040 a shell builtin (like such a script called from a script sourced with `.',
8041 where there were variable assignments preceding the `.' command)
8042
8043r. Fixed a bug that caused changes to variables supplied in an assignment
8044 statement preceding a shell builtin to not be honored (like a script
8045 run with `.').
8046
8047s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values
8048 when the shell is started.
8049
8050t. Fixed a bug that caused SIGINT to kill shell scripts after the script
8051 called `wait'.
8052
8053u. The `fc' builtin now tries to create its temporary files in the directory
8054 named by $TMPDIR.
8055
8056v. Bash no longer calls any Readline functions or uses any Readline variables
8057 not declared in readline.h.
8058
8059w. Fixed a bug that caused some substitutions involving $@ to not be split
8060 correctly, especially expansions of the form ${paramterOPword}.
8061
8062x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it
8063 appears in the initial environment.
8064
8065y. Fixed a couple of problems with shell scripts without a leading `#!'
8066 being executed out of shell functions that could cause core dumps if
8067 such a script attempted to execute `return'.
8068
8069z. Fixed a problem with the `-nt' and `-ot' binary operators for the
8070 `test/[' builtin and the `[[' conditional command that caused wrong
8071 return values if one of the file arguments did not exist.
8072
8073aa. Fixed a bug that caused non-interactive shells which had previously
8074 executed `shopt -s expand_aliases' to fail to expand aliases in a
8075 command like `(command) &'.
8076
80772. Changes to Readline
8078
8079a. Changes to make most (but not yet all -- there is still crlf()) of the
8080 exported readline functions declared in readline.h have an rl_ prefix.
8081
8082b. More `const' changes in function arguments, mostly for completion
8083 functions.
8084
8085c. Fixed a bug in rl_forward that could cause the point to be set to before
8086 the beginning of the line in vi mode.
8087
8088d. Fixed a bug in the callback read-char interface to make it work when a
8089 readline function pushes some input onto the input stream with
8090 rl_execute_next (like the incremental search functions).
8091
8092e. Fixed a file descriptor leak in the history file manipulation code that
8093 was tripped when attempting to truncate a non-regular file (like
8094 /dev/null).
8095
8096f. Some existing variables are now documented and part of the public
8097 interface (declared in readline.h): rl_explict_arg, rl_numeric_arg,
8098 rl_editing_mode, rl_last_func.
8099
8100g. Renamed rltty_set_default_bindings to rl_tty_set_default_bindings and
8101 crlf to rl_crlf, so there are no public functions declared in readline.h
8102 without an `rl_' prefix. The old functions still exist for backwards
8103 compatibility.
8104
81053. New Features in Bash
8106
8107a. A new loadable builtin, realpath, which canonicalizes and expands symlinks
8108 in pathname arguments.
8109
8868edaf 8110b. When `set' is called without options, it prints function definitions in a
28ef6c31
JA
8111 way that allows them to be reused as input. This affects `declare' and
8112 `declare -p' as well.
8113
81144. New Features in Readline
8115
8116a. New application-callable function rl_set_prompt(const char *prompt):
8117 expands its prompt string argument and sets rl_prompt to the result.
8118
8119b. New application-callable function rl_set_screen_size(int rows, int cols):
8120 public method for applications to set readline's idea of the screen
8121 dimensions.
8122
8123c. The history example program (examples/histexamp.c) is now built as one
8124 of the examples.
8125
8126------------------------------------------------------------------------------
8127This document details the changes between this version, bash-2.05-alpha1,
8128and the previous version, bash-2.04-release.
8129
81301. Changes to Bash
8131
8132a. A fix was made to allow newlines in compond array assignments.
8133
8134b. configure now checks for real-time signals with unusable values.
8135
8136c. Interactive shells no longer exit if a substitution fails because of an
8137 unset variable within a sourced file.
8138
8139d. Fixed a problem with incorrect matching of extended glob patterns when
8140 doing pattern substitution.
8141
8142e. `{' is now quoted by the completion code when it appears in a filename.
8143
8144f. Fixed an error in pattern matching that caused the matcher to not
8145 correctly skip the rest of a bracket expression after a character
8146 matched.
8147
8148g. Fixed a bug in the IFS word splitting code to make a non-whitespace IFS
8149 character preceded by IFS whitespace part of the current delimiter rather
8150 than generating a separate field.
8151
8152h. The {!prefix@} expansion now generates separate words, analogous to $@,
8153 when double-quoted.
8154
8155i. Command substitution now ignores NUL bytes in the command output, and the
8156 parser ignores them on input.
8157
8158j. A fix was made to the job control code to prevent hanging processes when
8159 the shell thinks background processes are running but the kernel returns
8160 -1/ECHILD from waitpid().
8161
8162k. `pwd' now prints an error message if the write fails when displaying the
8163 current directory.
8164
8165l. When in POSIX mode, the shell prints trap dispostions without a leading
8166 `SIG' in the signal specification.
8167
8168m. Fixed a parser bug that caused the current command's line count to be
8169 messed up by a compound array assignment.
8170
8171n. Fixed a bug in the unwind-protect code that caused bad behavior on machines
8172 where ints and pointers are not the same size.
8173
8174o. System-specific configure changes for: MacOS X.
8175
8176p. Changes for Cygwin to translate \r\n and \r to \n and to set file
8177 descriptors used for reading input to text mode in various places.
8178
8179q. Fixed a bug that caused `!' to occasionally not be honored when in
8180 a (...) subshell.
8181
8182r. Bash no longer assumes that getcwd() will return any useful error message
8183 in the buffer passed as an argument if the call fails.
8184
8185s. The `source', `.', and `fc' builtins no longer check whether a file is
8186 binary before reading commands from it.
8187
8188t. Subshells no longer turn off job control when they exit, since that
8189 sometimes resulted in the terminal being reset to the wrong process
8190 group.
8191
8192u. The history code no longer tries to save the second and subsequent lines
8193 of a multi-line command if the first line was not saved.
8194
8195v. The history saving code now does a better job of saving blank lines in a
8196 multi-line command.
8197
8198w. Removed a `feature' that made `ulimit' silently translate `unlimited' to
8199 the current hard limit, which obscured some kernel error returns.
8200
8201x. Fixed the grammar so that `}' is recognized as a reserved word after
8202 another reserved word, rather than requiring a `;' or newline. This
8203 means that constructs like
8204
8205 { { echo a b c ; } }
8206
8207 work as expected.
8208
8209y. Conditional commands ([[...]]) now perform tilde expansion on their
8210 arguments.
8211
8212z. Noted in the documentation that `set -a' will cause functions to be
8213 exported if they are defined after `set -a' is executed.
8214
8215aa. When an interactive login shell starts, if $PWD and $HOME refer to the
8216 same directory but are not the same string, $PWD is set to $HOME.
8217
8218bb. Fixed `printf' to handle invalid floating point numbers better.
8219
8220cc. Temporary files are now created with random filenames, to improve security.
8221
8222dd. The readline initialization code now binds the custom bash functions and
8223 key bindings after the readline defaults are set up.
8224
8225ee. Fixed the `source' builtin to no longer overwrite a shell function's
8226 argument list, even if the sourced file changes the positional parameters.
8227
8228ff. A bug fix was made in the expansion of `$*' in contexts where it should
8229 not be split, like assignment statements.
8230
8231gg. Fixed a bug in the parameter substring expansion to handle conditional
8232 arithmetic expressions ( exp ? val1 : val2 ) without cutting the expression
8233 off at the wrong `:'.
8234
8235hh. The `<>' redirection is no longer subject to the current setting of
8236 `noclobber', as POSIX.2 specifies.
8237
8238ii. Fixed a bug in the conditional command parsing code that caused expressions
8239 in parentheses to occasionally be parsed incorrectly.
8240
8241jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or
8242 {...} to follow the )) without an intervening list terminator.
8243
8244kk. `printf' now treats `\E' the same as `\e' when performing backslash escape
8245 expansion for the `%b' format specifier.
8246
8247ll. When in POSIX mode, the shell no longer searches the current directory for
8248 a file to be sourced with `.' or `source' if `.' is not in $PATH.
8249
8250mm. Interactive comments are no longer turned off when POSIX mode is disabled.
8251
8252nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's
8253 environment when it starts up.
8254
8255oo. Fixed a bug in the `command' builtin so the effect of a command like
8256 `command exec 4<file' is as if the `command' had been omitted.
8257
8258pp. ${foo[@]} and ${foo[*]} now work as in ksh93 if `foo' is not an array
8259 variable.
8260
8261qq. ${#foo[X]}, where X is 0, @, or *, now work as in ksh93 if `foo' is not
8262 an array variable.
8263
8264rr. The shell's idea of an absolute pathname now takes into account a
8265 possible drive specification on Cygwin and other Windows systems.
8266
8267ss. Fixed a bug which caused incorrect parsing of some multi-character
8268 constructs if they were split across input lines with backslash-newline
8269 line continuation.
8270
8271tt. Fixed a bug that caused restricted shell mode to be set inappropriately
8272 when trying to execute a shell script without a leading `#!'.
8273
8274uu. Shell function definitions no longer require that the body be a group
8275 command ( {...} ), as POSIX.2 requires.
8276
8277vv. The `cd' and `pwd' builtins now process symlinks in pathnames internally
8278 and should require many fewer calls to getcwd().
8279
8280ww. Fixed a bug that caused a pipeline's process group to be set incorrectly
8281 if one of the pipeline elements contained a command substitution.
8282
8283xx. Fixed a bug that caused core dumps when expanding the value of HISTIGNORE.
8284
8285yy. The output of `set' is now quoted using $'...' so invisible characters are
8286 displayed as escape sequences.
8287
8288zz. Fixed the help text for `unset', since PATH and IFS may both be unset.
8289
8290aaa. The shell no longer puts directory names into the command hash table.
8291
8292bbb. Fixed a bug in `read' that caused it to occasionally free memory twice if
8293 it was interrupted after reading a large amount of data.
8294
8295ccc. Assignment statements that attempt to assign values to readonly variables
8296 now cause the command to return an error status.
8297
8298ddd. Fixed a bug that could cause incorrect output if a $(<file) construct was
8299 interrupted.
8300
8301eee. GROUPS and FUNCNAME now return an error status when assignment is
8302 attempted, but may be unset (in which case they lose their special
8303 properties). In all respects except unsetting, they are readonly.
8304
8305fff. The string-to-integer conversion code now ignores trailing whitespace in
8306 the string, even if strtol(3) does not.
8307
8308ggg. The tcsh magic-space function now does a better job of inserting the
8309 space close to where the point was before the history expansion, rather
8310 than just appending it.
8311
8312hhh. Fixed a bug which caused a file sourced from an interactive shell to
8313 fill up the jobs table if it ran lots of jobs.
8314
8315iii. Fixed a bug in the parameter pattern substitution code to avoid infinite
8316 recursion on zero-length matches.
8317
83182. Changes to Readline
8319
8320a. When setting the terminal attributes on systems using `struct termio',
8321 readline waits for output to drain before changing the attributes.
8322
8323b. A fix was made to the history word tokenization code to avoid attempts to
8324 dereference a null pointer.
8325
8326c. Readline now defaults rl_terminal_name to $TERM if the calling application
8327 has left it unset, and tries to initialize with the resultant value.
8328
8329d. Instead of calling (*rl_getc_function)() directly to get input in certain
8330 places, readline now calls rl_read_key() consistently.
8331
8332e. Fixed a bug in the completion code that allowed a backslash to quote a
8333 single quote inside a single-quoted string.
8334
8335f. rl_prompt is no longer assigned directly from the argument to readline(),
8336 but uses memory allocated by readline. This allows constant strings to
8337 be passed to readline without problems arising when the prompt processing
8338 code wants to modify the string.
8339
8340g. Fixed a bug that caused non-interactive history searches to return the
8341 wrong line when performing multiple searches backward for the same string.
8342
8343h. Many variables, function arguments, and function return values are now
8344 declared `const' where appropriate, to improve behavior when linking with
8345 C++ code.
8346
8347i. The control character detection code now works better on systems where
8348 `char' is unsigned by default.
8349
8350j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
8351
8352k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been
8353 replaced with a set of specific prototyped typedefs, though they are
8354 still in the readline header files for backwards compatibility.
8355
8356m. Nearly all of the (undocumented) internal global variables in the library
8357 now have an _rl_ prefix -- there were a number that did not, like
8358 screenheight, screenwidth, alphabetic, etc.
8359
8360n. The ding() convenience function has been renamed to rl_ding(), though the
8361 old function is still defined for backwards compatibility.
8362
8363o. The completion convenience functions filename_completion_function,
8364 username_completion_function, and completion_matches now have an rl_
8365 prefix, though the old names are still defined for backwards compatibility.
8366
8367p. The functions shared by readline and bash (linkage is satisfied from bash
8368 when compiling with bash, and internally otherwise) now have an sh_ prefix.
8369
8370q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so
8371 that the `soname' contains only the major version number rather than the
8372 major and minor numbers.
8373
8374r. Fixed a redisplay bug that occurred when the prompt spanned more than one
8375 physical line and contained invisible characters.
8376
83773. New Features in Bash
8378
8379a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
8380 per the new GNU coding standards.
8381
8382b. The /dev/tcp and /dev/udp redirections now accept service names as well as
8383 port numbers.
8384
8385c. `complete' and `compgen' now take a `-o value' option, which controls some
8386 of the aspects of that compspec. Valid values are:
8387
8388 default - perform bash default completion if programmable
8389 completion produces no matches
8390 dirnames - perform directory name completion if programmable
8391 completion produces no matches
8392 filenames - tell readline that the compspec produces filenames,
8393 so it can do things like append slashes to
8394 directory names and suppress trailing spaces
8395
83964. New Features in Readline
8397
8398a. The blink timeout for paren matching is now settable by applications.
8399
8400b. _rl_executing_macro has been renamed to rl_executing_macro, which means
8401 it's now part of the public interface.
8402
8403c. Readline has a new variable, rl_readline_state, which is a bitmap that
8404 encapsulates the current state of the library; intended for use by
8405 callbacks and hook functions.
8406
8407------------------------------------------------------------------------------
bb70624e
JA
8408This document details the changes between this version, bash-2.04-release,
8409and the previous version, bash-2.04-beta5.
8410
84111. Changes to Bash
8412
8413a. Better compile-time and configure-time checks for the necessity of
8414 inet_aton().
8415
8416b. A bug was fixed in the expansion of "${@:-}" when there are positional
8417 parameters.
8418
8419c. A typo was fixed in the output of `complete'.
8420
8421d. The matches generated for a word by the `-W' argument to complete and
8422 compgen are now matched against the word being completed, and only
8423 matches are returned as the result.
8424
8425e. Some fixes were made for systems which do not restart read(2) when a
8426 signal caught by bash is received.
8427
8428f. A bug was fixed which caused the umask to be set to 0 when an invalid
8429 symbolic mode mask was parsed.
8430
8431g. Fixed a bug that could cause a core dump if a SIGCHLD was received while
8432 performing an assignment statement using command substitution.
8433
8434h. Changed the word splitting function for programmable completion so cases
8435 in which the cursor is between words are handled a bit better.
8436
84372. Changes to Readline
8438
8439a. rl_funmap_names() is now documented.
8440
84413. New Features in Bash
8442
8443a. The LC_NUMERIC variable is now treated specially, and used to set the
8444 LC_NUMERIC locale category for number formatting, e.g., when `printf'
8445 displays floating-point numbers.
8446
8447------------------------------------------------------------------------------
8448This document details the changes between this version, bash-2.04-beta5,
8449and the previous version, bash-2.04-beta4.
8450
84511. Changes to Bash
8452
8453a. A couple of changes were made to the Makefiles for easier building on
8454 non-Unix systems.
8455
8456b. Fixed a bug where the current prompt would be set to $PS2 at startup.
8457
8458c. The shell script that tests an already-installed version was changed to
8459 remove the directory it created its test programs in at exit.
8460
8461d. Several changes were made to the code that tokenizes an input line for
8462 the programmable completion code. Shell metacharacters will now appear
8463 as individual words in the word list passed to the completion functions.
8464 Some of the example completion shell functions were changed to understand
8465 redirection operators.
8466
8467e. A bug was fixed that, under obscure circumstances, could confuse the
8468 parser when a shell function was run by the programmable completion code.
8469
8470f. A bug was fixed in the ulimit builtin for systems not using getrlimit().
8471
8472g. The execution code now propagates the correct exit status back to the rest
8473 of the code if the return value of a subshell command was being inverted.
8474 Some new test cases for inverting return values with the `!' reserved
8475 word have been added.
8476
8477h. Negative exponents in the arithmetic evaluation of v**e now return an
8478 evaluation error.
8479
8480i. A bug that caused bash to check the wrong process in a pipeline for
8481 abnormal termination (and consequently resetting the terminal attributes)
8482 was fixed.
8483
8484j. Fixed a bug that caused $PS2 to be displayed after PROMPT_COMMAND was
8485 executed.
8486
84872. Changes to Readline
8488
84891. Fixed a bug in a C preprocessor define that caused the keypad control
8490 functions to be compiled out for all platforms except DJGPP.
8491
8492------------------------------------------------------------------------------
8493This document details the changes between this version, bash-2.04-beta4,
8494and the previous version, bash-2.04-beta3.
8495
84961. Changes to Bash
8497
8498a. A couple of changes were made to the redirection to attempt to avoid
8499 race conditions and malicious file replacement.
8500
85012. A change was made to the string evaluation code (used for command
8502 substitution, `eval', and the `.' builtin) to fix an obscure core
8503 dump on alpha machines.
8504
85053. A bug that caused $LINENO to be wrong when executing arithmetic for
8506 commands was fixed.
8507
85084. A couple of memory leaks in the programmable completion code were fixed.
8509
85105. A bug that could cause a core dump by freeing memory twice during a call
8511 to `eval' if `set -u' had been enabled and an undefined variable was
8512 referenced was fixed.
8513
8514------------------------------------------------------------------------------
8515This document details the changes between this version, bash-2.04-beta3,
8516and the previous version, bash-2.04-beta2.
8517
85181. Changes to Bash
8519
8520a. Bash should run the appropriate startup files when invoked by ssh2.
8521
8522b. Fixed a bug in the parsing of conditional commands that could cause a
8523 core dump.
8524
8525c. Fixed a bug in parsing job specifications that occasionally caused
8526 core dumps when an out-of-range job was referenced.
8527
8528d. Fixed the `type' and `command' builtins to do better reporting of
8529 commands that are not found in $PATH or the hash table.
8530
8531e. Fixed a POSIX.2 compliance problem in the command builtin -- commands
8532 are supposed to be reported as full pathnames.
8533
8534f. The `echo' builtin now returns failure if a write error occurs.
8535
8536g. Fixed a bug which caused the locale to not be reset correctly when
8537 LC_ALL was unset.
8538
8539h. Changed description of `getopts' in man page and reference manual to make
8540 it clear that option characters may be characters other than letters.
8541
8542i. If the shell exits while in a function, make sure that any trap on EXIT
8543 doesn't think the function is still executing.
8544
8545j. Bashbug now tries harder to find a usable editor if $EDITOR is not set,
8546 rather than simply defaulting to `emacs'.
8547
8548k. Changes to the scripts that guess and canonicalize the system type, from
8549 the latest `automake' distribution via Debian.
8550
8551l. When using named pipes for process substitution, make sure the file
8552 descriptors opened for reading are set to non-blocking mode.
8553
8554m. Fixed a bug that caused termination of pipelines that are killed by a
8555 signal to not be reported in some cases.
8556
8557n. When not in literal-history mode, shell comment lines are not added to
8558 the history list.
8559
8560o. When running in POSIX.2 mode, bash no longer performs word splitting on
8561 the expanded value of the word supplied as the filename argument to
8562 redirection operators.
8563
8564p. The prompt string decoding code now backslash-quotes only characters that
8565 are special within double quotes when expanding the \w and \W escape
8566 sequences.
8567
8568q. Fixed a bug in the prompt decoding code that could cause a non-interactive
8569 shell to seg fault if `\u' was used in PS4 and the shell was in xtrace
8570 mode.
8571
8572r. Fixed a bug that caused function definitions to be printed with any
8573 redirections that should be attached to the entire function before the
8574 closing brace.
8575
8576s. Changed the tilde expansion code for Cygwin systems to avoid creating
8577 pathnames beginning with `//' if $HOME == `/'.
8578
8579t. Fixed a couple of autoconf tests to avoid creating files with fixed names
8580 in /tmp.
8581
8582u. The `trap' and `kill' builtins now know the names of the POSIX.1b real-
8583 time signals on systems which support them.
8584
85852. Changes to Readline
8586
8587a. Fixed a problem with the single-quote quoting function that could cause
8588 buffer overflows.
8589
8590b. Fixed a bug that caused incorrect `stat characters' to be printed if
8591 the files being completed were in the root directory and visible-stats
8592 was enabled.
8593
85943. New Features in Bash
8595
8596a. There is a new `rbash.1' manual page, from the Debian release.
8597
8598b. The `--enable-usg-echo-default' option to `configure' has been renamed to
8599 `--enable-xpg-echo-default'. The old option is still there for backwards
8600 compatibility.
8601
8602------------------------------------------------------------------------------
8603This document details the changes between this version, bash-2.04-beta2,
8604and the previous version, bash-2.04-beta1.
8605
86061. Changes to Bash
8607
8608a. Fixed a bug that could cause pipes to be closed inappropriately in
8609 some obscure cases.
8610
8611b. Fixed a bug that caused creation of the exported environment to clobber
8612 the current command string if there were any exported shell functions.
8613
8614c. Some changes were made to reduce bash's memory usage.
8615
8616d. Fixed a problem with programmable completion and filenames to be
8617 completed containing quote characters.
8618
8619e. Changed the code the removes named pipes created for the <(...) and >(...)
8620 expansions to defer removal until after any current shell function has
8621 finished executing.
8622
8623f. Fixed a bug in `select' which caused it to not handle the `continue'
8624 builtin correctly.
8625
8626g. Autoconf tests added for cygwin32 and mingw32.
8627
86282. New Features in Bash
8629
8630a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc'
8631 (which is still there for backwards compatibility).
8632
8633------------------------------------------------------------------------------
8634This document details the changes between this version, bash-2.04-beta1,
8635and the previous version, bash-2.04-alpha1.
8636
86371. Changes to Bash
8638
8639a. Fixed a bug in the programmable completion code that occurred when
8640 trying to complete command lines containing a `;' or `@'.
8641
8642b. The file descriptor from which the shell is reading a script is now
8643 moved to a file descriptor above the user-addressible range.
8644
8645c. Changes to `printf' so that it can handle integers beginning with 0
8646 or 0x as octal and hex, respectively.
8647
8648d. Fixes to the programmable completion code so it handles nonsense like
8649 `compgen -C xyz' gracefully.
8650
8651e. The shell no longer modifies the signal handler for SIGPROF, allowing
8652 profiling again on certain systems.
8653
8654f. The shell checks for a new window size, if the user has requested it,
8655 after a process exits due to a signal.
8656
8657g. Fixed a bug with variables with null values in a program's temporary
8658 environment and the bash getenv() replacement.
8659
8660h. `declare' and the other builtins that take variable assignments as
8661 arguments now honor `set -a' and mark modified variables for export.
8662
8663i. Some changes were made for --dump-po-strings mode when writing strings
8664 with embedded newlines.
8665
8666j. The code that caches export strings from the initial environment now
8667 duplicates the string rather than just pointing into the environment.
8668
8669k. The filename completion quoting code now uses single quotes by default
8670 if the filename being completed contains newlines, since \<newline>
8671 has a special meaning to the parser.
8672
8673l. Bash now uses typedefs bits32_t and u_bits32_t instead of int32_t and
8674 u_int32_t, respectively to avoid conflicts on certain Unix versions.
8675
8676m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x.
8677
8678n. Fixed a problem with hostname-to-ip-address translation in the
8679 /dev/(tcp|udp)/hostname/port redirection code.
8680
8681o. The texinfo manual has been reorganized slightly.
8682
8683p. Filename generation (globbing) range comparisons in bracket expressions
8684 no longer use strcoll(3) even if it is available, since it has unwanted
8685 effects in certain locales.
8686
8687q. Fixed a cosmetic problem in the source that caused the shell to not
8688 compile if DPAREN_ARITHMETIC was not defined but ARITH_FOR_COMMAND was.
8689
8690r. Fixed a bug in the here-document code tripped when the file descriptor
8691 opened to the file containing the text of the here document was the
8692 same as a redirector specified by the user.
8693
8694s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline'
8695 in `time ! pipeline'.
8696
8697t. Fixed a bug with the `wait' builtin which manifested itself when an
8698 interrupt was received while the shell was waiting for asynchronous
8699 processes in a shell script.
8700
8701u. Fixed the DEBUG trap code so that it has the correct value of $?.
8702
8703v. Fixed a bug in the parameter pattern substitution code that could cause
8704 the shell to attempt to free unallocated memory if the pattern started
8705 with `/' and an expansion error occurs.
8706
8707w. Fixed a bug in the positional parameter substring code that could
8708 cause the shell to loop freeing freed memory.
8709
8710x. Fixed a bug in the positional parameter pattern substitution code so
8711 that it correctly handles null replacement strings with a pattern
8712 string prefixed with `%' or `#'.
8713
8714y. The shell no longer attempts to import functions from the environment if
8715 started with `-n'.
8716
8717z. Fixed a bug that caused `return' in a command substitution executed in
8718 a shell function to return from the function in a subshell and continue
8719 execution.
8720
8721aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell
8722 is restricted.
8723
8724bb. The wait* job control functions now behave better if called when there
8725 are no unwaited-for children.
8726
8727cc. Command substitution no longer unconditionally disables job control in
8728 the subshell started to run the command.
8729
8730dd. A bug was fixed that occasionally caused traps to mess up the parser
8731 state.
8732
8733ee. `bashbug' now honors user headers in the mail message it sends.
8734
8735ff. A bug was fixed that caused the `:p' history modifier to not print the
8736 history expansion if the `histverify' option was set.
8737
87382. Changes to Readline
8739
8740a. Fixed a bug in the redisplay code for lines with more than 256 line
8741 breaks.
8742
8743b. A bug was fixed which caused invisible character markers to not be
8744 stripped from the prompt string if the terminal was in no-echo mode.
8745
8746c. Readline no longer tries to get the variables it needs for redisplay
8747 from the termcap entry if the calling application has specified its
8748 own redisplay function. Readline treats the terminal as `dumb' in
8749 this case.
8750
8751d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
8752 sequences is redrawn correctly.
8753
87543. New Features in Bash
8755
8756a. `bashbug' now accepts `--help' and `--version' options.
8757
8758b. There is a new `xpg_echo' option to `shopt' that controls the behavior
8759 of echo with respect to backslash-escaped characters at runtime.
8760
8761------------------------------------------------------------------------------
8762This document details the changes between this version, bash-2.04-alpha1,
8763and the previous version, bash-2.04-devel.
8764
87651. Changes to Bash
8766
8767a. Fixed a bug that could cause core dumps when performing substring
8768 expansion.
8769
8770b. Shared object configuration changes for: Solaris, OSF/1
8771
8772c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities
8773 for pathname expansion now understands GLOBIGNORE.
8774
8775d. The code that implements `eval' was changed to save the value of the
8776 current prompt, so an eval in a shell function called by the programmable
8777 completion code will not change the prompt to $PS2.
8778
8779e. Restored the undocumented NON_INTERACTIVE_LOGIN_SHELLS #define to
8780 config-top.h. If this is defined, all login shells will read the
8781 startup files, not just interactive and non-interactive started with
8782 the `--login' option.
8783
8784f. Fixed a bug that caused the expansion code to occasionally dump core if
8785 IFS contained characters > 128.
8786
8787g. Fixed a problem with the grammar so that a newline is not required
8788 after the `))' in the new-style arithmetic for statement; a semicolon
8789 may be used as expected.
8790
8791h. Variable indirection may now reference the shell's special variables.
8792
8793i. The $'...' and $"..." constructs are now added to the history correctly
8794 if they contain newlines and command-oriented history is enabled.
8795
8796j. It is now an error to try to assign a value to a function-local copy
8797 of a readonly shell variable (declared with the `local' builtin).
8798
87992. Changes to Readline
8800
8801a. The history file code now uses O_BINARY mode when reading and writing
8802 the history file on cygwin32.
8803
88043. New Features in Bash
8805
8806a. A new programmable completion facility, with two new builtin commands:
8807 complete and compgen.
8808
8809b. configure has a new option, `--enable-progcomp', to compile in the
8810 programmable completion features (enabled by default).
8811
8812c. `shopt' has a new option, `progcomp', to enable and disable programmable
8813 completion at runtime.
8814
8815d. Unsetting HOSTFILE now clears the list of hostnames used for completion.
8816
88174. New Features in Readline
8818
8819a. A new variable, rl_gnu_readline_p, always 1. The intent is that an
8820 application can verify whether or not it is linked with the `real'
8821 readline library or some substitute.
8822
8823------------------------------------------------------------------------------
8824This document details the changes between this version, bash-2.04-devel,
8825and the previous version, bash-2.03-release.
8826
88271. Changes to Bash
8828
8829a. System-specific configuration and source changes for: Interix, Rhapsody
8830
8831b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if
8832 JOB_CONTROL was not defined.
8833
8834c. An obscure race condition in the trap code was fixed.
8835
8836d. The string resulting from $'...' is now requoted to avoid any further
8837 expansion.
8838
8839e. The $'...' quoting syntax now allows backslash to escape a single quote,
8840 for ksh-93 compatibility.
8841
8842f. The $"..." quoting syntax now escapes backslashes and double quotes in
8843 the translated string when displaying them with the --dump-po-strings
8844 option.
8845
8846g. `echo -e' no longer converts \' to '.
8847
8848h. Fixes were made to the extended globbing code to handle embedded (...)
8849 patterns better.
8850
8851i. Some improvements were made to the code that unsets `nodelay' mode on
8852 the file descriptor from which bash is reading input.
8853
8854j. Some changes were made to the replacement termcap library for better
8855 operation on MS-DOS.
8856
8857k. Some changes were made to the tilde expansion code to handle backslash
8858 as a pathname separator on MS-DOS.
8859
8860l. The source has been reorganized a little bit -- there is now an `include'
8861 subdirectory, and lib/posixheaders has been removed.
8862
8863m. Improvements were made to the `read' builtin so that it makes many
8864 fewer read(2) system calls.
8865
8866n. The expansion of $- will include `c' and `s' when those options are
8867 supplied at shell invocation.
8868
8868edaf 8869o. Several improvements were made to the completion code: variable completion
bb70624e
JA
8870 now works better when there are unterminated expansions, command
8871 completion understands quotes better, and completion now works in certain
8872 unclosed $(... constructs.
8873
8874p. The arithmetic expansion code was fixed to not need the value of a
8875 variable being assigned a value (fixes the "ss=09; let ss=10" bug).
8876
8877q. Some changes were made to make exported environment creation faster.
8878
8879r. The html documentation will be installed into $(htmldir) if that variable
8880 has a value when `make install' is run.
8881
8882s. Fixed a bug that would cause the bashrc file to be sourced inappropriately
8883 when bash is started by sshd.
8884
8885t. The SSH_CLIENT environment variable is no longer auto-exported.
8886
8887u. A bug that caused redirections with (...) subshells to be performed in
8888 the wrong order was fixed.
8889
28ef6c31 8890v. A bug that occasionally caused inappropriate expansion of assignment
bb70624e
JA
8891 statements in compound array assignments was fixed.
8892
8893w. The code that parses the words in a compound array assignment was
8894 simplified considerably and should work better now.
8895
8896x. Fixes to the non-job-control code in nojobs.c to make it POSIX.2-compliant
8897 when a user attempts to retrieve the status of a terminated background
8898 process.
8899
8900y. Fixes to the `printf' builtin so that it doesn't try to expand all
8901 backslash escape sequences in the format string before parsing it for
8902 % format specifiers.
8903
89042. Changes to Readline
8905
8906a. The history library tries to truncate the history file only if it is a
8907 regular file.
8908
8909b. A bug that caused _rl_dispatch to address negative array indices on
8910 systems with signed chars was fixed.
8911
8912c. rl-yank-nth-arg now leaves the history position the same as when it was
8913 called.
8914
8915d. Changes to the completion code to handle MS-DOS drive-letter:pathname
8916 filenames.
8917
8918e. Completion is now case-insensitive by default on MS-DOS.
8919
8920f. Fixes to the history file manipulation code for MS-DOS.
8921
8922g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
8923
8924h. Some fixes were made to the redisplay code for better operation on MS-DOS.
8925
8926i. The quoted-insert code will now insert tty special chars like ^C.
8927
8928j. A bug was fixed that caused the display code to reference memory before
8929 the start of the prompt string.
8930
8931k. More support for __EMX__ (OS/2).
8932
8933l. A bug was fixed in readline's signal handling that could cause infinite
8934 recursion in signal handlers.
8935
8936m. A bug was fixed that caused the point to be less than zero when rl_forward
8937 was given a very large numeric argument.
8938
8939n. The vi-mode code now gets characters via the application-settable value
8940 of rl_getc_function rather than calling rl_getc directly.
8941
89423. New Features in Bash
8943
8944a. The history builtin has a `-d offset' option to delete the history entry
8945 at position `offset'.
8946
8947b. The prompt expansion code has two new escape sequences: \j, the number of
8948 active jobs; and \l, the basename of the shell's tty device name.
8949
8950c. The `bind' builtin has a new `-x' option to bind key sequences to shell
8951 commands.
8952
8953d. There is a new shell option, no_empty_command_completion, which, when
8954 enabled, disables command completion when TAB is typed on an empty line.
8955
8956e. The `help' builtin has a `-s' option to just print a builtin's usage
8868edaf 8957 synopsis.
bb70624e
JA
8958
8959f. There are several new arithmetic operators: id++, id-- (variable
8960 post-increment/decrement), ++id, --id (variabl pre-increment/decrement),
8961 expr1 , expr2 (comma operator).
8962
8963g. There is a new ksh-93 style arithmetic for command:
8964 for ((expr1 ; expr2; expr3 )); do list; done
8965
8966h. The `read' builtin has a number of new options:
8967 -t timeout only wait timeout seconds for input
8968 -n nchars only read nchars from input instead of a full line
8969 -d delim read until delim rather than newline
8970 -s don't echo input chars as they are read
8971
8972i. The redirection code now handles several filenames specially:
8973 /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
8974 not they are present in the file system.
8975
8976j. The redirection code now recognizes pathnames of the form
8977 /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
8978 of the appropriate type to the specified port on the specified host.
8979
8980k. The ksh-93 ${!prefix*} expansion, which expands to the names of all
8981 shell variables whose names start with prefix, has been implemented.
8982
8983l. There is a new dynamic variable, FUNCNAME, which expands to the name of
8984 a currently-executing function. Assignments to FUNCNAME have no effect.
8985
8986m. The GROUPS variable is no longer readonly; assignments to it are silently
8987 discarded. This means it can be unset.
8988
89894. New Features in Readline
8990
8991a. Parentheses matching is now always compiled into readline, and enabled
8992 or disabled when the value of the `blink-matching-paren' variable is
8993 changed.
8994
8995b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
8996
8997c. MS-DOS systems now use ~/_history as the default history file.
8998
8999d. history-search-{forward,backward} now leave the point at the end of the
9000 line when the string to search for is empty, like
9001 {reverse,forward}-search-history.
9002
9003e. history-search-{forward,backward} now leave the last history line found
9004 in the readline buffer if the second or subsequent search fails.
9005
9006f. New function for use by applications: rl_on_new_line_with_prompt, used
9007 when an application displays the prompt itself before calling readline().
9008
9009g. New variable for use by applications: rl_already_prompted. An application
9010 that displays the prompt itself before calling readline() must set this to
9011 a non-zero value.
9012
9013------------------------------------------------------------------------------
b72432fd
JA
9014This document details the changes between this version, bash-2.03-release,
9015and the previous version, bash-2.03-beta2.
9016
90171. Changes to Bash
9018
9019a. A file descriptor leak in the `fc' builtin was fixed.
9020
9021b. A bug was fixed in the `read' builtin that caused occasional spurious
9022 failures when using `read -e'.
9023
9024c. The version code needed to use the value of the cpp variable
9025 CONF_MACHTYPE rather than MACHTYPE.
9026
9027d. A new test was added to exercise the command printing and copying code.
9028
9029e. A bug was fixed that caused `time' to be recognized as a reserved word
9030 if it was the first pattern in a `case' statement pattern list.
9031
9032------------------------------------------------------------------------------
9033This document details the changes between this version, bash-2.03-beta2,
9034and the previous version, bash-2.03-beta1.
9035
90361. Changes to Bash
9037
9038a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2.
9039
9040b. config.{guess,sub} support added for the NEC SX4.
9041
9042c. Changed some of the cross-compiling sections of the configure macros in
9043 aclocal.m4 so that configure won't abort.
9044
9045d. Slight changes to how the HTML versions of the bash and readline manuals
9046 are generated.
9047
9048e. Fixed conditional command printing to avoid interpreting printf `%'-escapes
9049 in arguments to [[.
9050
9051f. Don't include the bash malloc on all variants of the alpha processor.
9052
9053g. Changes to configure to make --enable-profiling work on Solaris 2.x.
9054
9055h. Fixed a bug that manifested itself when shell functions were called
9056 between calls to `getopts'.
9057
9058i. Fixed pattern substitution so that a bare `#'as a pattern causes the
9059 replacement string to be prefixed to the search string, and a bare
9060 `%' causes the replacement string to be appended to the search string.
9061
9062j. Fixed a bug in the command execution code that caused child processes
9063 to occasionally have the wrong value for $!.
9064
90652. Changes to Readline
9066
9067a. Added code to the history library to catch history substitutions using
9068 `&' without a previous history substitution or search having been
9069 performed.
9070
90713. New Features in Bash
9072
90734. New Features in Readline
9074
9075a. New bindable variable: `isearch-terminators'.
9076
9077b. New bindable function: `forward-backward-delete-char' (unbound by default).
9078
9079------------------------------------------------------------------------------
9080This document details the changes between this version, bash-2.03-beta1,
9081and the previous version, bash-2.03-alpha.
9082
90831. Changes to Bash
9084
9085a. A change was made to the help text for `{...}' to make it clear that a
9086 semicolon is required before the closing brace.
9087
9088b. A fix was made to the `test' builtin so that syntax errors cause test
9089 to return an exit status > 1.
9090
9091c. Globbing is no longer performed on assignment statements that appear as
9092 arguments to `assignment builtins' such as `export'.
9093
9094d. System-specific configuration changes were made for: Rhapsody,
9095 AIX 4.2/gcc, BSD/OS 4.0.
9096
9097e. New loadable builtins: ln, unlink.
9098
9099f. Some fixes were made to the globbing code to handle extended glob patterns
9100 which immediately follow a `*'.
9101
9102g. A fix was made to the command printing code to ensure that redirections
9103 following compound commands have a space separating them from the rest
9104 of the command.
9105
9106h. The pathname canonicalization code was changed to produce fewer leading
9107 `//' sequences, since those are interpreted as network file system
9108 pathnames on some systems.
9109
9110i. A fix was made so that loops containing `eval' commands in commands passed
9111 to `bash -c' would not exit prematurely.
9112
9113j. Some changes were made to the job reaping code when the shell is not
9114 interactive, so the shell will retain exit statuses longer for examination
9115 by `wait'.
9116
9117k. A fix was made so that `jobs | command' works again.
9118
9119l. The erroneous compound array assignment var=((...)) is now a syntax error.
9120
9121m. A change was made to the dynamic loading code in `enable' to support
9122 Tenon's MachTen.
9123
9124n. A fix was made to the globbing code so that extended globbing patterns
9125 will correctly match `.' in a bracket expression.
9126
91272. Changes to Readline
9128
9129a. A fix was made to the completion code in which a typo caused the wrong
9130 value to be passed to the function that computed the longest common
9131 prefix of the list of matches.
9132
9133b. The completion code now checks the value of rl_filename_completion_desired,
9134 which is set by application-supplied completion functions to indicate
9135 that filename completion is being performed, to decide whether or not to
9136 call an application-supplied `ignore completions' function.
9137
91383. New Features in Bash
9139
9140a. A change was made to the startup file code so that any shell begun with
9141 the `--login' option, even non-interactive shells, will source the login
9142 shell startup files.
9143
91444. New Features in Readline
9145
9146a. A new variable, rl_erase_empty_line, which, if set by an application using
9147 readline, will cause readline to erase, prompt and all, lines on which the
9148 only thing typed was a newline.
9149
9150------------------------------------------------------------------------------
9151This document details the changes between this version, bash-2.03-alpha,
9152and the previous version, bash-2.02.1-release.
9153
91541. Changes to Bash
9155
9156a. System-specific configuration changes were made for: Irix 6.x, Unixware 7.
9157
9158b. The texi2dvi and texi2html scripts were updated to the latest versions
9159 from the net.
9160
9161c. The configure tests that determine which native type is 32 bits were
9162 changed to not require a compiled program.
9163
9164d. Fixed a bug in shell_execve that could cause memory to be freed twice
9165 after a failed exec.
9166
9167e. The `printf' test uses `diff -a' if it's available to prevent confusion
9168 due to the non-ascii output.
9169
9170f. Shared object configuration is now performed by a shell script,
9171 support/shobj-conf, which generates values to be substituted into
9172 makefiles by configure.
9173
9174g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a
9175 return value.
9176
9177h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar
9178 handling of RLIMIT_FILESIZE.
9179
9180i. Some new loadable builtins were added: id, printenv, sync, whoami, push,
9181 mkdir. `pushd', `popd', and `dirs' can now be built as regular or
9182 loadable builtins from the same source file.
9183
9184j. Changes were made to `printf' to handle NUL bytes in the expanded format
9185 string.
9186
9187k. The various `make clean' Makefile targets now descend into lib/sh.
9188
9189l. The `type' builtin was changed to use the internal `getopt' so that things
9190 like `type -ap' work as expected.
9191
9192m. There is a new configuration option, --with-installed-readline, to link
9193 bash with a locally-installed version of readline. Only readline version
9194 4.0 and later releases can support this. Shared and static libraries
9195 are supported. The installed include files are used.
9196
9197n. There is a new autoconf macro used to find which basic type is 64 bits.
9198
9199o. Dynamic linking and loadable builtins should now work on SCO 3.2v5*,
9200 AIX 4.2 with gcc, Unixware 7, and many other systems using gcc, where
9201 the `-shared' options works correctly.
9202
9203p. A bug was fixed in the bash filename completion code that caused memory to
9204 be freed twice if a directory name containing an unset variable was
9205 completed and the -u option was set.
9206
9207q. The prompt expansion code now quotes the `$' in the `\$' expansion so it
9208 is not processed by subsequent parameter expansion.
9209
9210r. Fixed a parsing bug that caused a single or double quote after a `$$' to
9211 trigger ANSI C expansion or locale translation.
9212
9213s. Fixed a bug in the globbing code that caused quoted filenames containing
9214 no globbing characters to sometimes be incorrectly expanded.
9215
9216t. Changes to the default prompt strings if prompt string decoding is not
9217 compiled into the shell.
9218
9219u. Added `do', `then', `else', `{', and `(' to the list of keywords that may
9220 precede the `time' reserved word.
9221
9222v. The shell may now be cross-built for BeOS as well as cygwin32.
9223
9224w. The conditional command execution code now treats `=' the same as `=='
9225 for deciding when to perform pattern matching.
9226
9227x. The `-e' option no longer causes the shell to exit if a command exits
9228 with a non-zero status while running the startup files.
9229
9230y. The `printf' builtin no longer dumps core if a modifier is supplied in
9231 the format string without a conversion character (e.g. `%h').
9232
9233z. Array assignments of the form a=(...) no longer show up in the history
9234 list.
9235
9236aa. The parser was fixed to obey the POSIX.2 rules for finding the closing
9237 `}' in a ${...} expression.
9238
9239bb. The history file is now opened with mode 0600 rather than 0666, so bash
9240 no longer relies on the user's umask being set appropriately.
9241
9242cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now
9243 relies on proper behavior from the C library.
9244
9245dd. Minor changes were made to allow quoted variable expansions using
9246 ${...} to be completed correctly if there is no closing `"'.
9247
9248ee. Changes were made to builtins/Makefile.in so that configuring the shell
9249 with `--enable-profiling' works right and builtins/mkbuiltins is
9250 generated.
9251
92522. Changes to Readline
9253
9254a. The version number is now 4.0.
9255
9256b. There is no longer any #ifdef SHELL code in the source files.
9257
9258c. Some changes were made to the key binding code to fix memory leaks and
9259 better support Win32 systems.
9260
9261d. Fixed a silly typo in the paren matching code -- it's microseconds, not
9262 milliseconds.
9263
9264e. The readline library should be compilable by C++ compilers.
9265
9266f. The readline.h public header file now includes function prototypes for
9267 all readline functions, and some changes were made to fix errors in the
9268 source files uncovered by the use of prototypes.
9269
9270g. The maximum numeric argument is now clamped at 1000000.
9271
9272h. Fixes to rl_yank_last_arg to make it behave better.
9273
9274i. Fixed a bug in the display code that caused core dumps if the prompt
9275 string length exceeded 1024 characters.
9276
9277j. The menu completion code was fixed to properly insert a single completion
9278 if there is only one match.
9279
9280k. A bug was fixed that caused the display code to improperly display tabs
9281 after newlines.
9282
92833. New Features in Bash
9284
9285a. New `shopt' option, `restricted_shell', indicating whether or not the
9286 shell was started in restricted mode, for use in startup files.
9287
9288b. Filename generation is now performed on the words between ( and ) in
9289 array assignments (which it probably should have done all along).
9290
9291c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
9292
9293d. ENV and BASH_ENV are read-only variables in a restricted shell.
9294
92954. New Features in Readline
9296
9297a. Many changes to the signal handling:
9298 o Readline now catches SIGQUIT and cleans up the tty before returning;
9299 o A new variable, rl_catch_signals, is available to application writers
9300 to indicate to readline whether or not it should install its own
9301 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
9302 SIGTTIN, and SIGTTOU;
9303 o A new variable, rl_catch_sigwinch, is available to application
9304 writers to indicate to readline whether or not it should install its
9305 own signal handler for SIGWINCH, which will chain to the calling
9306 applications's SIGWINCH handler, if one is installed;
9307 o There is a new function, rl_free_line_state, for application signal
9308 handlers to call to free up the state associated with the current
9309 line after receiving a signal;
9310 o There is a new function, rl_cleanup_after_signal, to clean up the
9311 display and terminal state after receiving a signal;
9312 o There is a new function, rl_reset_after_signal, to reinitialize the
9313 terminal and display state after an application signal handler
9314 returns and readline continues
9315
9316b. There is a new function, rl_resize_terminal, to reset readline's idea of
9317 the screen size after a SIGWINCH.
9318
9319c. New public functions: rl_save_prompt and rl_restore_prompt. These were
9320 previously private functions with a `_' prefix.
9321
9322d. New function hook: rl_pre_input_hook, called just before readline starts
9323 reading input, after initialization.
9324
9325e. New function hook: rl_display_matches_hook, called when readline would
9326 display the list of completion matches. The new function
9327 rl_display_match_list is what readline uses internally, and is available
9328 for use by application functions called via this hook.
9329
9330f. New bindable function, delete-char-or-list, like tcsh.
9331
9332------------------------------------------------------------------------------
bc4cd23c
JA
9333This document details the changes between this version, bash-2.02.1-release,
9334and the previous version, bash-2.02-release.
9335
93361. Changes to Bash
9337
9338a. A bug that caused the bash readline support to not compile unless aliases
9339 and csh-style history were configured into the shell was fixed.
9340
9341b. Fixed a bug that could cause a core dump when here documents contained
9342 more than 1000 characters.
9343
9344c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same
9345 as the current directory when in POSIX mode.
9346
9347d. Fixed an alignment problem with the memory returned by the bash malloc,
9348 so returned memory is now 64-bit aligned.
9349
9350e. Fixed a bug that caused command substitutions executed within pipelines
9351 to put the terminal in the wrong process group.
9352
9353f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop,
9354 Unixware 2, and Unixware 7.
9355
9356g. Fixes to the pattern matching code to make it work correctly for eight-bit
9357 characters.
9358
9359h. Fixed a problem that occasionally caused the shell to display the wrong
9360 value for the new working directory when changing to a directory found
9361 in $CDPATH when in physical mode.
9362
9363i. Fixed a bug that caused core dumps when using conditional commands in
9364 shell functions.
9365
9366j. Fixed a bug that caused the printf builtin to loop forever if the format
9367 string did not consume any of the arguments.
9368
9369k. Fixed a bug in the parameter expansion code that caused "$@" to be
9370 incorrectly split if $IFS did not contain a space character.
9371
9372l. Fixed a bug that could cause a core dump when completing hostnames if
9373 the number of matching hostnames was an exact multiple of 16.
9374
9375m. Fixed a bug that caused the shell to fork too early when a command
9376 such as `%2 &' was given.
9377
93782. Changes to Readline
9379
9380a. Fixed a problem with redisplay that showed up when the prompt string was
9381 longer than the screen width and the prompt contained invisible characters.
9382
9383------------------------------------------------------------------------------
9384This document details the changes between this version, bash-2.02-release,
9385and the previous version, bash-2.02-beta2.
cce855bc
JA
9386
93871. Changes to Bash
9388
9389a. A bug was fixed that caused the terminal process group to be set
9390 incorrectly when performing command substitution of builtins in a
9391 pipeline.
9392
9393------------------------------------------------------------------------------
9394This document details the changes between this version, bash-2.02-beta2,
9395and the previous version, bash-2.02-beta1.
9396
93971. Changes to Bash
9398
9399a. Attempting to `wait' for stopped jobs now generates a warning message.
9400
9401b. Pipelines which exit due to SIGPIPE in non-interactive shells are now
9402 not reported if the shell is compiled -DDONT_REPORT_SIGPIPE.
9403
9404c. Some changes were made to builtins/psize.sh and support/bashbug.sh to
9405 attempt to avoid some /tmp file races and surreptitious file
9406 substitutions.
9407
9408d. Fixed a bug that caused the shell not to compile if configured with
9409 dparen arithmetic but without aliases.
9410
9411e. Fixed a bug that caused the input stream to be switched when assigning
9412 empty arrays with `bash -c'.
9413
9414f. A bug was fixed in the readline expansion glue code that caused bash to
9415 dump core when expanding lines with an unclosed single quote.
9416
9417g. A fix was made to the `cd' builtin so that using a non-empty directory
9418 from $CDPATH results in an absolute pathname of the new current working
9419 directory to be displayed after the current directory is changed.
9420
9421h. Fixed a bug in the variable assignment code that caused the shell to
9422 dump core when referencing an unset variable with `set -u' enabled in
9423 an assignment statement preceding a command.
9424
9425i. Fixed a bug in the exit trap code that caused reserved words to not be
9426 recognized under certain circumstances.
9427
9428j. Fixed a bug in the parameter pattern substitution code so that quote
9429 removal is performed.
9430
9431k. The shell should now configure correctly on Apple Rhapsody systems.
9432
9433l. The `kill' builtin now prints a usage message if it is not passed any
9434 arguments.
9435
9436------------------------------------------------------------------------------
9437This document details the changes between this version, bash-2.02-beta1,
9438and the previous version, bash-2.02-alpha1.
9439
94401. Changes to Bash
9441
9442a. A few compilation bugs were fixed in the new extended globbing code.
9443
9444b. Executing arithmetic commands now sets the command name to `((' so
9445 error messages look right.
9446
9447c. Fixed some build problems with various configuration options.
9448
9449d. The `printf' builtin now aborts immediately if an illegal format
9450 character is encountered.
9451
9452e. The code that creates here-documents now behaves better if the file it's
9453 trying to create already exists for some reason.
9454
9455f. Fixed a problem with the extended globbing code that made patterns like
9456 `x+*' expand incorrectly.
9457
9458g. The prompt string expansion code no longer quotes tildes with backslashes.
9459
9460h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in
9461 the presence of lstat(2) failures.
9462
9463i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'.
9464
9465j. The mail checking code now ensures that it has a valid default mailpath.
9466
9467k. A bug was fixed that caused local variables to be unset inappropriately
9468 when sourcing a script from within another sourced script.
9469
9470l. A bug was fixed in the history saving code so that functions are saved
9471 in the history list correctly if `cmdhist' is enabled, but `lithist'
9472 is not.
9473
9474m. A bug was fixed that caused printf overflows when displaying error
9475 messages.
9476
9477n. It should be easier to build the loadble builtins in examples/loadables,
9478 though some manual editing of the generated Makefile is still required.
9479
9480o. The user's primary group is now always ${GROUPS[0]}.
9481
9482p. Some updates were made to support/config.guess from the GNU master copy.
9483
9484q. Some changes were made to the autoconf support for Solaris 2.6 large
9485 files.
9486
9487r. The `command' builtins now does the right thing when confstr(3) cannot
9488 find a value for _CS_PATH.
9489
9490s. Extended globbing expressions like `*.!(c)' are not history expanded if
9491 `extglob' is enabled.
9492
9493t. Using the `-P' option to `cd' will force the value that is assigned to
9494 PWD to not contain any symbolic links.
9495
94962. Changes to Readline
9497
9498a. The code that prints completion listings now behaves better if one or
9499 more of the filenames contains non-printable characters.
9500
9501b. The time delay when showing matching parentheses is now 0.5 seconds.
9502
9503------------------------------------------------------------------------------
9504This document details the changes between this version, bash-2.02-alpha1,
9505and the previous version, bash-2.01.1-release.
9506
95071. Changes to Bash
9508
9509a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x,
9510 Solaris 2.6, SINIX SVR4.
9511
9512b. Changes were made to the generated `info' files so that `install-info'
9513 works correctly.
9514
9515c. PWD is now auto-exported.
9516
9517d. A fix was made to the pipeline code to make sure that the shell forks
9518 to execute simple commands consisting solely of assignment statements.
9519
9520e. Changes to the test suite for systems with 14-character filenames.
9521
9522f. The default sizes of some internal hash tables have been made smaller
9523 to reduce the shell's memory footprint.
9524
9525g. The `((...))' arithmetic command is now executed directly instead of
9526 being translated into `let "..."'.
9527
9528h. Fixes were made to the expansion code so that "$*", "$@", "${array[@]}",
9529 and "${array[@]}" expand correctly when IFS does not contain a space
9530 character, is unset, or is set to NULL.
9531
9532i. The indirect expansion code (${!var}) was changed so that the only
9533 valid values of `var' are variable names, positional parameters, `#',
9534 `@', and `*'.
9535
9536j. An arithmetic expression error in a $((...)) expansion now causes a
9537 non-interactive shell running in posix mode to exit.
9538
9539k. Compound array assignment now splits the words within the parentheses
9540 on shell metacharacters like the parser would before expansing them
9541 and performing the assignment. This is for compatibility with ksh-93.
9542
9543l. The internal shell backslash-quoting code (used in the output of `set'
9544 and completion) now quotes tildes if they appear at the start of the
9545 string or after a `=' or `:'.
9546
9547m. A couple of bugs with `shopt -o' were fixed.
9548
9549n. `bash +o' now displays the same output as `set +o' before starting an
9550 interactive shell.
9551
9552o. A bug that caused command substitution and the `eval' builtin to
9553 occasionally free memory twice when an error was encountered was fixed.
9554
9555p. The filename globbing code no longer requires read permission for a
9556 directory when the filename to be matched does not contain any globbing
9557 characters, as POSIX.2 specifies.
9558
9559q. A bug was fixed so that the job containing the last asynchronous
9560 process is not removed from the job table until a `wait' is executed
9561 for that process or another asynchronous process is started. This
9562 satisfies a POSIX.2 requirement.
9563
9564r. A `select' bug was fixed so that a non-numeric user response is treated
9565 the same as a numeric response that is out of range.
9566
9567s. The shell no longer parses the value of SHELLOPTS from the environment
9568 if it is restricted, running setuid, or running in `privileged mode'.
9569
9570t. Fixes were made to enable large file support on systems such as
9571 Solaris 2.6, where the size of a file may be larger than can be held
9572 in an `int'.
9573
9574u. The filename hashing code was fixed to not add `./' to the beginning of
9575 filenames which already begin with `./'.
9576
9577v. The configure script was changed so that the GNU termcap library is not
9578 compiled in if `prefer-curses' has been specified.
9579
9580w. HISTCONTROL and HISTIGNORE are no longer applied to the second and
9581 subsequent lines of a multi-line command.
9582
9583x. A fix was made to `disown' so that it does a better job of catching
9584 out-of-range jobs.
9585
9586y. Non-interactive shells no longer report the status of processes terminated
9587 due to SIGINT, even if the standard output is a terminal.
9588
9589z. A bug that caused the output of `jobs' to have extra carriage returns
9590 was fixed.
9591
9592aa. A bug that caused PIPESTATUS to not be set when builtins or shell
9593 functions were executed in the foreground was fixed.
9594
9595bb. Bash now attempts to detect when it is being run by sshd, and treats
9596 that case identically to being run by rshd.
9597
9598cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell
9599 options was changed was fixed.
9600
9601dd. The `kill' builtin now disallows empty or missing process id arguments
9602 instead of treating them as identical to `0', which means the current
9603 process.
9604
9605ee. `var=value declare -x var' now behaves identically to
9606 `var=value export var'. Similarly for `var=value declare -r var' and
9607 `var=value readonly var'.
9608
9609ff. A few memory leaks were fixed.
9610
9611gg. `alias' and `unalias' now print error messages when passed an argument
9612 that is not an alias for printing or deletion, even when the shell is
9613 not interactive, as POSIX.2 specifies.
9614
9615hh. `alias' and `alias -p' now return a status of 0 when no aliases are
b3afafd8 9616 defined, as POSIX.2 specifies.
cce855bc
JA
9617
9618ii. `cd -' now prints the pathname of the new working directory if the shell
9619 is interactive.
9620
9621jj. A fix was made so that the code that binds $PWD now copes with getcwd()
9622 returning NULL.
9623
9624kk. `unset' now checks whether or not a function name it's trying to unset
9625 is a valid shell identifier only when the shell is running in posix mode.
9626
9627ll. A change was made to the code that generates filenames for here documents
9628 to make them less prone to name collisions.
9629
9630mm. The parser was changed so that `time' is recognized as a reserved word
9631 only at the beginning of a pipeline.
9632
9633nn. The pathname canonicalization code was changed so that `//' is converted
9634 into `/', but all other pathnames beginning with `//' are left alone, as
9635 POSIX.2 specifies.
9636
9637oo. The `logout' builtin will no longer exit a non-interactive non-login
9638 shell.
9639
96402. Changes to Readline
9641
9642a. Fixed a problem in the readline test program rltest.c that caused a core
9643 dump.
9644
9645b. The code that handles parser directives in inputrc files now displays
9646 more error messages.
9647
9648c. The history expansion code was fixed so that the appearance of the
9649 history comment character at the beginning of a word inhibits history
9650 expansion for that word and the rest of the input line.
9651
96523. New Features in Bash
9653
9654a. A new version of malloc, based on the older GNU malloc, that has many
9655 changes, is more page-based, is more conservative with memory usage,
9656 and does not `orphan' large blocks when they are freed.
9657
9658b. A new version of gmalloc, based on the old GLIBC malloc, with many
9659 changes and range checking included by default.
9660
9661c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic
9662 Regular Expression matching, including character classes, collating
9663 symbols, equivalence classes, and support for case-insensitive pattern
9664 matching.
9665
9666d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
9667 implemented, controlled by a new `shopt' option, `extglob'.
9668
9669e. There is a new ksh-like `[[' compound command, which implements
9670 extended `test' functionality.
9671
9672f. There is a new `printf' builtin, implemented according to the POSIX.2
9673 specification.
9674
9675g. There is a new feature for command substitution: $(< filename) now expands
9676 to the contents of `filename', with any trailing newlines removed
9677 (equivalent to $(cat filename)).
9678
9679h. There are new tilde prefixes which expand to directories from the
9680 directory stack.
9681
9682i. There is a new `**' arithmetic operator to do exponentiation.
9683
9684j. There are new configuration options to control how bash is linked:
9685 `--enable-profiling', to allow bash to be profiled with gprof, and
9686 `--enable-static-link', to allow bash to be linked statically.
9687
9688k. There is a new configuration option, `--enable-cond-command', which
9689 controls whether or not the `[[' command is included. It is on by
9690 default.
9691
9692l. There is a new configuration option, `--enable-extended-glob', which
9693 controls whether or not the ksh extended globbing feature is included.
9694 It is enabled by default.
9695
9696m. There is a new configuration #define in config.h.top that, when enabled,
9697 will cause all login shells to source /etc/profile and one of the user-
9698 specific login shell startup files, whether or not the shell is
9699 interactive.
9700
9701n. There is a new invocation option, `--dump-po-strings', to dump
9702 a shell script's translatable strings ($"...") in GNU `po' format.
9703
9704o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
9705 pattern matching when globbing filenames and using the `case' construct.
9706
9707p. There is a new `shopt' option, `huponexit', which, when enabled, causes
9708 the shell to send SIGHUP to all jobs when an interactive login shell
9709 exits.
9710
9711q. `bind' has a new `-u' option, which takes a readline function name as an
9712 argument and unbinds all key sequences bound to that function in a
9713 specified keymap.
9714
9715r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
9716 and running jobs, respectively.
9717
9718s. The `shopt' `-p' option now causes output to be displayed in a reusable
9719 format.
9720
9721t. `test' has a new `-N' option, which returns true if the filename argument
9722 has been modified since it was last accessed.
9723
9724u. `umask' now has a `-p' option to print output in a reusable format.
9725
9726v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
9727 translation code. It expands to the character whose ascii code is NNN
9728 in hexadecimal.
9729
9730w. The prompt string expansion code has a new `\r' escape sequence.
9731
9732x. The shell may now be cross-compiled for the CYGWIN32 environment on
9733 a Unix machine.
9734
97354. New Features in Readline
9736
9737a. There is now an option for `iterative' yank-last-arg handline, so a user
9738 can keep entering `M-.', yanking the last argument of successive history
9739 lines.
9740
9741b. New variable, `print-completions-horizontally', which causes completion
9742 matches to be displayed across the screen (like `ls -x') rather than up
9743 and down the screen (like `ls').
9744
9745c. New variable, `completion-ignore-case', which causes filename completion
9746 and matching to be performed case-insensitively.
9747
9748d. There is a new bindable command, `magic-space', which causes history
9749 expansion to be performed on the current readline buffer and a space to
9750 be inserted into the result.
9751
9752e. There is a new bindable command, `menu-complete', which enables tcsh-like
9753 menu completion (successive executions of menu-complete insert a single
9754 completion match, cycling through the list of possible completions).
9755
9756f. There is a new bindable command, `paste-from-clipboard', for use on Win32
9757 systems, to insert the text from the Win32 clipboard into the editing
9758 buffer.
9759
9760g. The key sequence translation code now understands printf-style backslash
9761 escape sequences, including \NNN octal escapes. These escape sequences
9762 may be used in key sequence definitions or macro values.
9763
9764h. An `$include' inputrc file parser directive has been added.
9765
9766------------------------------------------------------------------------------
e8ce775d
JA
9767This document details the changes between this version, bash-2.01.1-release,
9768and the previous version, bash-2.01-release.
9769
97701. Changes to Bash
9771
9772a. The select command was fixed to check the validity of the user's
9773 input more strenuously.
9774
9775b. A bug was fixed that prevented `time' from timing commands correctly
9776 when supplied as an argument to `bash -c'.
9777
9778c. A fix was made to the mail checking code to keep from adding the same
9779 mail file to the list of files to check multiple times when parsing
9780 $MAILPATH.
9781
9782d. Fixed an off-by-one error in the tilde expansion library.
9783
9784e. When using the compound array assignment syntax, the old value of
9785 the array is cleared before assigning the new value.
9786
9787f. Fixed a bug that could cause a core dump when a trap handler was reset
9788 to the default in the trap command associated with that signal.
9789
9790g. Fixed a bug in the locale code that occurred when assigning a value
9791 to LC_ALL.
9792
9793h. A change was made to the parser so that words of the form xxx=(...)
9794 are not considered compound assignment statements unless there are
9795 characters before the `='.
9796
9797i. A fix was made to the command tracing code to correctly quote each
9798 word of output.
9799
9800j. Some changes were made to the bash-specific autoconf tests to make them
9801 more portable.
9802
9803k. Completion of words with globbing characters now correctly quotes the
9804 result.
9805
9806l. The directory /var/spool/mail is now preferred to /usr/spool/mail when
9807 configure is deciding on the default mail directory.
9808
9809m. The brace completion code was fixed to not quote the `{' and `}'.
9810
9811n. Some fixes were made to make $RANDOM more random in subshells.
9812
9813o. System-specific changes were made to configure for: SVR4.2
9814
9815p. Changes were made so that completion of words containing globbing chars
9816 substitutes the result only if a single filename was matched.
9817
9818q. The window size is now recomputed after a job is stopped with SIGTSTP if
9819 the user has set `checkwinsize' with `shopt'.
9820
9821r. When doing substring expansion, out-of-range substring specifiers now
9822 cause nothing to be substituted rather than an expansion error.
9823
9824s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' --
9825 only `EXIT' and `DEBUG' are accepted.
9826
9827t. The display of trapped signals now uses the signal number if signals
9828 for which bash does not know the name are trapped.
9829
9830u. A fix was made so that `bash -r' does not turn on restricted mode until
9831 after the startup files are executed.
9832
9833v. A bug was fixed that occasionally caused a core dump when a variable
9834 found in the temporary environment of export/declare/readonly had a
9835 null value.
9836
9837w. A bug that occasionally caused unallocated memory to be passed to free()
9838 when doing arithmetic substitution was fixed.
9839
9840x. A bug that caused a buffer overrun when expanding a prompt string
9841 containing `\w' and ${#PWD} exceeded PATH_MAX was fixed.
9842
9843y. A problem with the completion code that occasionally caused it to
9844 refer to a character before the beginning of the readline line buffer
9845 was fixed.
9846
9847z. A bug was fixed so that the `read' builtin restarts reads when
9848 interrupted by signals other than SIGINT.
9849
9850aa. Fixed a bug that caused a command to be freed twice when there was
9851 an evaluation error in the `eval' command.
9852
98532. Changes to Readline
9854
9855a. Added a missing `extern' to a declaration in readline.h that kept
9856 readline from compiling cleanly on some systems.
9857
9858b. The history file is now opened with mode 0600 when it is written for
9859 better security.
9860
9861c. Changes were made to the SIGWINCH handling code so that prompt redisplay
9862 is done better.
9863
9864d. ^G now interrupts incremental searches correctly.
9865
9866e. A bug that caused a core dump when the set of characters to be quoted
9867 when completing words was empty was fixed.
9868
9869------------------------------------------------------------------------------
d166f048
JA
9870This document details the changes between this version, bash-2.01-release,
9871and the previous version, bash-2.01-beta2.
9872
98731. Changes to Bash
9874
9875a. The `distclean' target should remove the `printenv' executable if it
9876 has been created.
9877
9878b. The test suite was changed slightly to ensure that the error messages
9879 are printed in English.
9880
9881c. A bug that caused the shell to dump core when a filename containing a
9882 `/' was passed to `hash' was fixed.
9883
9884d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1
9885 requires.
9886
9887e. A memory leak when completing commands was fixed.
9888
9889f. A memory leak that occurred when checking the hash table for commands
9890 with relative paths was fixed.
9891
9892------------------------------------------------------------------------------
9893This document details the changes between this version, bash-2.01-beta2,
9894and the previous version, bash-2.01-beta1.
9895
98961. Changes to Bash
9897
9898a. The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if
9899 the current (soft) limit is less than or equal to the hard limit.
9900
9901b. Fixed a bug that caused the bash emulation of strcasecmp to produce
9902 incorrect results.
9903
9904c. A bug that caused memory to be freed twice when a trap handler resets
9905 the trap more than once was fixed.
9906
9907d. A bug that caused machines where sizeof (pointer) > sizeof (int) to
9908 fail (and possibly dump core) when trying to unwind-protect a null
9909 pointer was fixed.
9910
9911e. The startup files should not be run with job control enabled. This fix
9912 allows SIGINT to once again interrupt startup file execution.
9913
9914f. Bash should not change the SIGPROF handler if it is set to something
9915 other than SIG_DFL.
9916
9917g. The completion code that provides bash-specific completions for readline
9918 now quotes characters that the readline code would treat as word break
9919 characters if they appear in a file name.
9920
9921h. The completion code now correctly quotes filenames containing a `!',
9922 even if the user attempted to use double quotes when attempting
9923 completion.
9924
9925i. A bug that caused the shell to dump core when `disown' was called without
9926 arguments and there was no current job was fixed.
9927
9928j. A construct like $((foo);bar) is now processed as a command substitution
9929 rather than as a bad arithmetic substitution.
9930
9931k. A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist'
9932 shell options when editing and re-executing a series of commands were
9933 fixed.
9934
9935l. A fix was made to the grammar -- the list of commands between `do' and
9936 `done' in the body of a `for' command should be treated the same as a
9937 while loop.
9938
99392. Changes to Readline
9940
9941a. A couple of bugs that caused the history search functions to attempt to
9942 free a NULL pointer were fixed.
9943
9944b. If the C library provides setlocale(3), readline does not need to look
9945 at various environment variables to decide whether or not to go into
9946 eight-bit mode automatically -- just check whether the current locale
9947 is not `C' or `POSIX'.
9948
9949c. If the filename completion function finds that a directory was not closed
9950 by a previous (interrupted) completion, it closes the directory with
9951 closedir().
9952
99533. New Features in Bash
9954
9955a. New bindable readline commands: history-and-alias-expand-line and
9956 alias-expand-line. The code was always in there, there was just no
9957 way to execute it.
9958
9959------------------------------------------------------------------------------
9960This document details the changes between this version, bash-2.01-beta1,
9961and the previous version, bash-2.01-alpha1.
9962
99631. Changes to Bash
9964
9965a. Fixed a problem that could cause file descriptors used for process
9966 substitution to conflict with those used explicitly in redirections.
9967
9968b. Made it easier to regenerate configure if the user changes configure.in.
9969
9970c. ${GROUPS[0]} should always be the primary group, even on systems without
9971 multiple groups.
9972
9973d. Spelling correction is no longer enabled by default.
9974
9975e. Fixes to quoting problems in `bashbug'.
9976
9977f. OS-specific configuration changes were made for: Irix 6.
9978
9979g. OS-specific code changes were made for: QNX.
9980
9981h. A more meaningful message is now printed when the file in /tmp for a
9982 here document cannot be created.
9983
9984i. Many changes to the shell's variable initialization code to speed
9985 non-interactive startup.
9986
9987j. Changes to the non-job-control code so that it does not try to open
9988 /dev/tty.
9989
9990k. The output of `set' and `export' is once again sorted, as POSIX wants.
9991
9992l. Fixed a problem caused by a recursive call reparsing the value of
9993 $SHELLOPTS.
9994
9995m. The tilde code no longer calls getenv() when it's compiled as part of
9996 the shell, which should eliminate problems on systems that cannot
9997 redefine getenv(), like the NeXT OS.
9998
9999n. Fixed a problem that caused `bash -o' or `bash +o' to not list all
10000 the shell options.
10001
10002o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit
10003 only if the hard limit is greater than the current (soft) limit.
10004
10005p. Fixed a problem that arose when building bash in a different directory
10006 than the source and y.tab.[ch] were remade with something other than
10007 bison. This came up most often on NetBSD.
10008
10009q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated
10010 an unfinished command completion (`/), which generated errors.
10011
10012r. The bash special tilde expansions (~-, ~+) are now attempted before
10013 calling the standard tilde expansion code, which should eliminate the
10014 problems people have been seeing with this on Solaris 2.5.1.
10015
10016s. Added support for <stdarg.h> to places where it was missing.
10017
10018t. Changed the code that reads the output of a command substitution to not
10019 go through stdio. This reduces the memory requirements and is faster.
10020
10021u. A number of changes to speed up export environment creation were made.
10022
10023v. A number of memory leaks were fixed as the result of running the test
10024 scripts through Purify.
10025
10026w. Fixed a bug that caused subshells forked to interpret executable
10027 scripts without a leading `#!' to not reinitialize the values of
10028 the shell options.
10029
100302. Changes to Readline
10031
10032a. History library has less `#ifdef SHELL' code -- abstracted stuff out
10033 into application-specific function hooks.
10034
10035b. Readline no longer calls getenv() if it's compiled as part of the shell,
10036 which should eliminate problems on systems that cannot redefine getenv(),
10037 like the NeXT OS.
10038
10039c. Fixed translation of ESC when `untranslating' macro values.
10040
10041d. The region kill operation now fixes the mark if it ends up beyond the
10042 boundaries of the line after the region is deleted.
10043
100443. New Features in Bash
10045
10046a. New argument for `configure': `--with-curses'. This can be used to
10047 override the selection of the termcap library on systems where it is
10048 deficient.
10049
10050------------------------------------------------------------------------------
10051This document details the changes between this version, bash-2.01-alpha1,
10052and the previous version, bash-2.0-release.
10053
100541. Changes to Bash
10055
10056a. System-specific configuration changes for: FreeBSD, SunOS4, Irix,
10057 MachTen, QNX 4.2, Harris Night Hawk, SunOS5.
10058
10059b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2,
10060 HP-UX, AIX 4.2.
10061
10062c. A bug that caused the exec builtin to fail because the full pathname of
10063 the command could not be found was fixed.
10064
10065d. The code that performs output redirections is now more resistant to
10066 race conditions and possible security exploits.
10067
10068e. A bug that caused the shell to dump core when performing pattern
10069 substitutions on variable values was fixed.
10070
10071f. More hosts are now recognized by the auto-configuration mechanism
10072 (OpenBSD, QNX, others).
10073
10074g. Assignments to read-only variables that attempt to convert them to
10075 arrays are now errors.
10076
10077h. A bug that caused shell scripts using array assignments in POSIX mode
10078 to exit after the assignment was performed was fixed.
10079
10080i. The substring expansion code is now more careful about running off the
10081 ends of the expanded variable value.
10082
10083j. A bug that caused completion to fail if a backquoted command substitution
10084 appeared anywhere on the line was fixed.
10085
10086k. The `source' builtin no longer turns off history if it has been enabled
10087 in a non-interactive shell.
10088
10089l. A bug that caused the shell to crash when `disown' was given a pid
10090 instead of a job number was fixed.
10091
10092m. The `cd' spelling correction code will not try to change to `.' if no
10093 directory entries match a single-character argument.
10094
10095n. A bad variable name supplied to `declare', `export', or `readonly' no
10096 longer causes a non-interactive shell in POSIX mode to exit.
10097
10098o. Some fixes were made to the test suite to handle peculiarities of
10099 various Unix versions.
10100
10101p. The bash completion code now quotes characters that readline would
10102 treat as word breaks for completion but are not shell metacharacters.
10103
10104q. Bad options supplied at invocation now cause a usage message to be
10105 displayed.
10106
10107r. Fixes were made to the code that handles DEBUG traps so that the trap
10108 string is not freed inappropriately.
10109
10110s. Some changes were made to the bash debugger in examples/bashdb -- it
10111 should be closer to working now.
10112
10113t. A problem that caused the default filename used for mail checking to be
10114 wrong was fixed.
10115
10116u. A fix was made to the `echo' builtin so that NUL characters printed with
10117 `echo -e' do not cause the output to be truncated.
10118
10119v. A fix was made to the job control code so that the shell behaves better
10120 when monitor mode is enabled in a non-interactive shell.
10121
10122w. Bash no longer catches all of the terminating signals in a non-
10123 interactive shell until a trap is set on EXIT, which should result in
10124 quicker startup.
10125
10126x. A fix was made to the command timing code so that `time' can be used in
10127 a loop.
10128
10129y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as
b72432fd 10130 a nested subshell rather than strictly as an (erroneous) arithmetic
d166f048
JA
10131 command.
10132
10133z. A fix was made to the globbing code so that it correctly matches quoted
10134 filenames beginning with a `.'.
10135
10136aa. A bug in `fc' that caused some multi-line commands to not be stored as
10137 one command in the history when they were re-executed after editing
10138 (with `fc -e') was fixed.
10139
10140bb. The `ulimit' builtin now attempts to catch some classes of integer
10141 overflows.
10142
10143cc. The command-oriented-history code no longer attempts to add `;'
10144 inappropriately when a newline appears while reading a $(...) command
10145 substitution.
10146
10147dd. A bug that caused the shell to dump core when `help --' was executed
10148 was fixed.
10149
10150ee. A bug that caused the shell to crash when an unset variable appeared
10151 in the body of a here document after `set -u' had been executed was
10152 fixed.
10153
10154ff. Implicit input redirections from /dev/null for asynchronous commands
10155 are now handled better.
10156
10157gg. A bug that caused the shell to fail to compile when configured with
10158 `--disable-readline' was fixed.
10159
10160hh. The globbing code should now be interruptible.
10161
10162ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a
10163 stopped job and adjusts the data structures accordingly, as if `bg' had
10164 been executed instead.
10165
10166jj. A bug that caused the shell to crash when mixing calls to `getopts'
10167 and `shift' on the same set of positional parameters was fixed.
10168
10169kk. The command printing code now preserves the `-p' flag to `time'.
10170
10171ll. The command printing code now handles here documents better when there
10172 are other redirections associated with the command.
10173
10174mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_)
10175 is no longer placed into the environment of executed commands -- users
10176 of glibc had too many problems with it.
10177
10178nn. Reorganized the code that generates signames.h. The signal_names list
10179 is now more complete but may be slightly different (SIGABRT is favored
10180 over SIGIOT, for example). The preferred signal names are those
10181 listed in the POSIX.2 standard.
10182
10183oo. `bashbug' now uses a filename shorter than 14 characters for its
10184 temporary file, and asks for confirmation before sending the bug
10185 report.
10186
10187pp. A bug that caused TAB completion in vi editing mode to not be turned
10188 off when `set -o posix' was executed or back on when `set +o posix'
10189 was executed was fixed.
10190
10191qq. A bug in the brace expansion code that caused brace expansions appearing
10192 in new-style $(...) command substitutions to be inappropriately expanded
10193 was fixed.
10194
10195rr. A bug in the readline hook shell-expand-line that could cause memory to
10196 be inappropriately freed was fixed.
10197
10198ss. A bug that caused some arithmetic expressions containing `&&' and `||'
10199 to be parsed with the wrong precedence has been fixed.
10200
10201tt. References to unbound variables after `set -u' has been executed now
10202 cause the shell to exit immediately, as they should.
10203
10204uu. A bug that caused the shell to exit inappropriately when `set -e' had
10205 been executed and a command's return status was being inverted with the
10206 `!' reserved word was fixed.
10207
10208vv. A bug that could occasionally cause the shell to crash with a
10209 divide-by-zero error when timing a command was fixed.
10210
10211ww. A bug that caused parameter pattern substitution to leave stray
10212 backslashes in the replacement string when the expression is in
10213 double quotes was fixed.
10214
10215xx. The `break' and `continue' builtins now break out of all loops when an
10216 invalid count argument is supplied.
10217
10218yy. Fixed a bug that caused PATH to be set to the empty string if
10219 `command -p' is executed with PATH unset.
10220
10221zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix,
10222 as POSIX specifies.
10223
10224aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS
10225 if there were no shell options set.
10226
10227bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX
10228 mode, their output is as POSIX.2 specifies.
10229
10230ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually
10231 creates an array variable.
10232
10233ddd. Fixed a bug that prevented `time' from correctly timing background
10234 pipelines.
10235
102362. Changes to Readline
10237
10238a. A bug that caused an extra newline to be printed when the cursor was on
10239 an otherwise empty line was fixed.
10240
10241b. An instance of memory being used after it was freed was corrected.
10242
10243c. The redisplay code now works when the prompt is longer than the screen
10244 width.
10245
10246d. `dump-macros' is now a bindable name, as it should have been all along.
10247
10248e. Non-printable characters are now expanded when displaying macros and
10249 their values.
10250
10251f. The `dump-variables' and `dump-macros' commands now output a leading
10252 newline if they're called as the result of a key sequence, rather
10253 than directly by an application.
10254
102553. New Features in Bash
10256
10257a. There is a new builtin array variable: GROUPS, the set of groups to which
10258 the user belongs. This is used by the test suite.
10259
102604. New Features in Readline
10261
10262a. If a key sequence bound to `universal-argument' is read while reading a
10263 numeric argument started with `universal-argument', it terminates the
10264 argument but is otherwise ignored. This provides a way to insert multiple
10265 instances of a digit string, and is how GNU emacs does it.
10266
10267------------------------------------------------------------------------------
ccc6cda3
JA
10268This document details the changes between this version, bash-2.0-release,
10269and the previous version, bash-2.0-beta3.
10270
102711. Changes to Bash
10272
10273a. Fix to the `getopts' builtin so that it does the right thing when a
10274 required option argument is not present.
10275
10276b. The completion code now updates the common prefix of matched names
10277 after FIGNORE processing is done, since any names that were removed
10278 may have changed the common prefix.
10279
10280c. Fixed a bug that made messages in MAILPATH entries not work correctly.
10281
10282d. Fixed a serious documentation error in the description of the new
10283 ${parameter:offset[:length]} expansion.
10284
10285e. Fixes to make parameter substring expansion ({$param:offset[:length]})
10286 work when within double quotes.
10287
10288f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional
10289 parameters.
10290
10291g. Corrected a misspelling of `unlimited' in the output of `ulimit'.
10292
10293h. Fixed a bug that caused executable scripts without a leading `#!' to
10294 occasionally pick up the wrong set of positional parameters.
10295
10296i. Linux systems now have a working `ulimit -v', using RLIMIT_AS.
10297
10298j. Updated config.guess so that many more machine types are recognized.
10299
10300k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]}
10301 expansion.
10302
10303l. If the shell is named `-su', and `-c command' is supplied, read and
10304 execute the login shell startup files even though the shell is not
10305 interactive. This is to support the `-' option to `su'.
10306
10307m. Fixed a bug that caused core dumps when the DEBUG trap was ignored
10308 with `trap "" DEBUG' and a shell function was subsequently executed.
10309
10310n. Fixed a bug that caused core dumps in the read builtin when IFS was
10311 set to the null string and the input had leading whitespace.
10312
103132. Changes to Readline
10314
10315a. Fixed a bug that caused a numeric argument of 1024 to be ignored when
10316 inserting text.
10317
10318b. Fixed the display code so that the numeric argument is displayed as it's
10319 being entered.
10320
10321c. Fixed the numeric argument reading code so that `M-- command' is
10322 equivalent to `M--1 command', as the prompt implies.
10323
103243. New Features in Bash
10325
10326a. `ulimit' now sets both hard and soft limits and reports the soft limit
10327 by default (when neither -H nor -S is specified). This is compatible
10328 with versions of sh and ksh that implement `ulimit'.
10329
10330b. Integer constants have been extended to base 64.
10331
103324. New Features in Readline
10333
10334a. The `home' and `end' keys are now bound to beginning-of-line and
10335 end-of-line, respectively, if the corresponding termcap capabilities
10336 are present.
10337
10338------------------------------------------------------------------------------
10339This document details the changes between this version, bash-2.0-beta3,
10340and the previous version, bash-2.0-beta2.
10341
103421. Changes to Bash
10343
10344a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX.
10345
10346b. When in POSIX mode, variable assignments preceding a special builtin
10347 persist in the shell environment after the builtin completes.
10348
10349c. Changed all calls to getwd() to getcwd(). Improved check for systems
10350 where the libc getcwd() calls popen(), since that breaks on some
10351 systems when job control is being used.
10352
10353d. Fixed a bug that caused seg faults when executing scripts with the
10354 execute bit set but without a leading `#!'.
10355
10356e. The environment passed to executed commands is never sorted.
10357
10358f. A bug was fixed in the code that expands ${name[@]} to the number of
10359 elements in an array variable.
10360
10361g. A bug was fixed in the array compound assignment code ( A=( ... ) ).
10362
10363h. Window size changes now correctly propagate down to readline if
10364 the shopt `checkwinsize' option is enabled.
10365
10366i. A fix was made in the code that expands to the length of a variable
10367 value (${#var}).
10368
10369j. A fix was made to the command builtin so that it did not turn on the
10370 `no fork' flag inappropriately.
10371
10372k. A fix was made to make `set -n' work more reliably.
10373
10374l. A fix was made to the job control initialization code so that the
10375 terminal process group is set to the shell's process group if the
10376 shell changes its own process group.
10377
103782. Changes to Readline
10379
10380a. System-specific changes for: SCO 3.2v[45].
10381
10382b. The behavior of the vi-mode `.' when redoing an `i' command was changed
10383 to insert the text previously inserted by the `i' command rather than
10384 simply entering insert mode.
10385
103863. New features in Bash
10387
10388a. There is a new version of the autoload function package, in
10389 examples/functions/autoload.v2, that uses arrays and provides more
10390 functionality.
10391
10392b. Support for LC_COLLATE and locale-specific sorting of the results of
10393 pathname expansion if strcoll() is available.
10394
103954. New Features in Readline
10396
10397a. Support for locale-specific sorting of completion possibilities if
10398 strcoll() is available.
10399
10400------------------------------------------------------------------------------
10401This document details the changes between this version, bash-2.0-beta2,
10402and the previous version, bash-2.0-beta1.
10403
104041. Changes to Bash
10405
10406a. `pushd -' is once again equivalent to `pushd $OLDPWD'.
10407
10408b. OS-specific changes for: SCO 3.2v[45].
10409
10410c. A change was made to the fix for the recently-reported security hole
10411 when reading characters with octal value 255 to make it work better on
10412 systems with restartable system calls when not using readline.
10413
10414d. Some changes were made to the test suite so that it works if you
10415 configure bash with --enable-usg-echo-default.
10416
10417e. A fix was made to the parsing of conditional arithmetic expressions.
10418
10419f. Illegal arithmetic bases now cause an arithmetic evaluation error rather
10420 than being silently reset.
10421
10422g. Multiple arithmetic bases now cause an arithmetic evaluation error
10423 instead of being ignored.
10424
10425h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2.
10426
10427i. A bug that sometimes caused array indices to be evaluated twice (which
10428 would cause errors when they contained assignment statements) was fixed.
10429
10430j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning
10431 unsigned values and to simplify the code.
10432
10433k. A bug in the command-oriented-history code that caused it to sometimes
10434 put semicolons after right parens inappropriately was fixed.
10435
10436l. The values inserted into the prompt by the \w and \W escape sequences
10437 are now quoted to prevent further expansion.
10438
10439m. An interactive shell invoked as `sh' now reads and executes commands
10440 from the file named by $ENV when it starts up. If it's a login shell,
10441 it does this after reading /etc/profile and ~/.profile.
10442
10443n. The file named by $ENV is never read by non-interactive shells.
10444
104452. Changes to Readline
10446
10447a. A few changes were made to hide some macros and functions that should not
10448 be public.
10449
10450b. An off-by-one error that caused seg faults in the history expansion code
10451 was fixed.
10452
104533. New Features in Bash
10454
10455a. The ksh-style ((...)) arithmetic command was implemented. It is exactly
10456 identical to let "...". This is controlled by a new option to configure,
10457 `--enable-dparen-arithmetic', which is on by default.
10458
10459b. There is a new #define available in config.h.top: SYS_BASH_LOGOUT. If
10460 defined to a filename, bash reads and executes commands from that file
10461 when a login shell exits. It's commented out by default.
10462
10463c. `ulimit' has a `-l' option that reports the maximum amount of data that
10464 may be locked into memory on 4.4BSD-based systems.
10465
10466------------------------------------------------------------------------------
10467This document details the changes between this version, bash-2.0-beta1,
10468and the previous version, bash-2.0-alpha4.
10469
104701. Changes to Bash
10471
10472a. A bug that sometimes caused traps to be ignored on signals the
10473 shell treats specially was fixed.
10474
10475b. The internationalization code was changed to track the values of
10476 LC_* variables and call setlocale() as appropriate. The TEXTDOMAIN
10477 and TEXTDOMAINDIR variables are also tracked; changes cause calls
10478 to textdomain() and bindtextdomain(), if available.
10479
10480c. A bug was fixed that sometimes caused double-quoted strings to be
10481 parsed incorrectly.
10482
10483d. Changes were made so that the siglist code compiles correctly on
10484 Solaris 2.5.
10485
10486e. Added `:' to the set of characters that cause word breaks for the
10487 completion code so that pathnames in assignments to $PATH can be
10488 completed.
10489
10490f. The `select' command was fixed to print $PS3 to stderr.
10491
10492g. Fixed an error in the manual page section describing the effect that
10493 setting and unsetting GLOBIGNORE has on the setting of the `dotglob'
10494 option.
10495
10496h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC
10497 on systems without gettimeofday() and resources.
10498
10499i. The getopt static variables are now initialized each time a subshell
10500 is started, so subshells using `getopts' work right.
10501
10502j. A sign-extension bug that caused a possible security hole was fixed.
10503
10504k. The parser now reads characters between backquotes within a double-
10505 quoted string as a single word, so double quotes in the backquoted
10506 string don't terminate the enclosing double-quoted string.
10507
10508l. A bug that caused `^O' to work incorrectly when typed as the first
10509 thing to an interactive shell was fixed.
10510
10511m. A rarely-exercised off-by-one error in the code that quotes variable
10512 values was fixed.
10513
10514n. Some memory and file descriptor leaks encountered when running a
10515 shell script that is executable but does not have a leading `#!'
10516 were plugged.
10517
105182. Changes to Readline
10519
10520a. A bug that sometimes caused incorrect results when trying to read
10521 typeahead on systems without FIONREAD was fixed.
10522
105233. New Features in Bash
10524
10525a. The command timing code now uses the value of the TIMEFORMAT variable
10526 to format and display timing statistics.
10527
10528b. The `time' reserved word now accepts a `-p' option to force the
10529 POSIX.2 output format.
10530
10531c. There are a couple of new and updated scripts to convert csh startup
10532 files to bash format.
10533
10534d. There is a new builtin array variable: BASH_VERSINFO. The various
10535 members hold the parts of the version information in BASH_VERSION,
10536 plus the value of MACHTYPE.
10537
105384. New Features in Readline
10539
10540a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter
10541 eight-bit mode.
10542
10543------------------------------------------------------------------------------
10544This document details the changes between this version, bash-2.0-alpha4,
10545and the previous version, bash-2.0-alpha3.
10546
105471. Changes to Bash
10548
10549a. There is better detection of rsh connections on Solaris 2.
10550
10551b. Assignments to read-only variables preceding a command name are now
10552 variable assignment errors. Variable assignment errors cause
10553 non-interactive shells running in posix mode to exit.
10554
10555c. The word tokenizer was rewritten to handle nested quotes and pairs
10556 ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...))
10557 correctly. Some of the parameter expansion code was updated as a
10558 consequence.
10559
10560d. A fix was made to `test' when given three arguments so that a binary
10561 operator is checked for first, before checking that the first argument
10562 is `!'.
10563
10564e. 2''>/dev/null is no longer equivalent to 2>/dev/null.
10565
10566f. Parser error messages were regularized, and in most cases the name of
10567 the shell script being read by a non-interactive shell is not printed
10568 twice.
10569
10570g. A fix was made to the completion code so that it no longer removes the
10571 text the user typed in some cases.
10572
10573h. The special glibc `getopt' environment variable is no longer put into
10574 the environment on machines with small values of ARG_MAX.
10575
10576i. The expansion of ${...} now follows the POSIX.2 rules for finding the
10577 closing `}'.
10578
10579j. The shell no longer displays spurious status messages for background
10580 jobs in shell scripts that complete successfully when the script is
10581 run from a terminal.
10582
10583k. `shopt -o' now correctly updates $SHELLOPTS.
10584
10585l. A bug that caused the $PATH searching code to return a non-executable
10586 file even when an executable file with the same name appeared later in
10587 $PATH was fixed.
10588
10589m. The shell now does tilde expansions on unquoted `:~' in assignment
10590 statements when not in posix mode.
10591
10592n. Variable assignment errors when a command consists only of assignments
10593 now cause non-interactive shells to exit when in posix mode.
10594
10595o. If the variable in a `for' or `select' command is read-only, or not a
10596 legal shell identifier, a variable assignment error occurs.
10597
10598p. `test' now handles `-a' and `-o' as binary operators when three arguments
10599 are supplied, and correctly parses `( word )' as equivalent to `word'.
10600
10601q. `test' was fixed so that file names of the form /dev/fd/NN mean the same
10602 thing on all systems, even Linux.
10603
10604r. Fixed a bug in the globbing code that caused patterns with multiple
10605 consecutive `*'s to not be matched correctly.
10606
10607s. Fixed a bug that caused $PS2 to not be printed when an interactive shell
10608 not using readline is reading a here document.
10609
10610t. Fixed a bug that caused history expansion to be performed inappropriately
10611 when a single-quoted string spanned more than one line.
10612
10613u. `getopts' now checks that the variable name passed by the user as the
10614 second argument is a legal shell identifier and that the variable is
10615 not read-only.
10616
10617v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it
10618 encounters an error.
10619
10620w. Fixed `set' to display variable values in a form that can be re-read.
10621
10622x. Fixed a bug in the code that keeps track of whether or not local variables
10623 have been declared at the current level of function nesting.
10624
10625y. Non-interactive shells in posix mode now exit if the name in a function
10626 declaration is not a legal identifier.
10627
10628z. The job control code now ignores stopped children when the shell is not
10629 interactive.
10630
10631aa. The `cd' builtin no longer attempts spelling correction on the directory
10632 name if the shell is not interactive, regardless of the setting of the
10633 `cdspell' option.
10634
10635bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2.
10636
10637cc. `time' now prints its output to stderr, as POSIX.2 specifies.
10638
106392. Fixes to Readline
10640
10641a. After printing possible completions, all lines of a multi-line prompt
10642 are redisplayed.
10643
10644b. Some changes were made to the terminal handling code in rltty.c to
10645 work around AIX 4.2 bugs.
10646
106473. New Features in Bash
10648
10649a. There is a new loadable builtin: sprintf, with calling syntax
10650 sprintf var format [args]
10651 This provides an easy way to simulate ksh left- and right-justified
10652 variable values.
10653
10654b. The expansions of \h and \H in prompt strings were swapped. \h now
10655 expands to the hostname up to the first `.', as in bash-1.14.
10656
106574. New Features in Readline
10658
10659a. The bash-1.14 behavior when ^M is typed while doing an incremental
10660 search was restored. ^J may now be used to terminate the search without
10661 accepting the line.
10662
10663b. There is a new bindable variable: disable-completion. This inhibits
10664 word completion and causes the completion character to be inserted as
10665 if it had been bound to self-insert.
10666
10667------------------------------------------------------------------------------
10668This document details the changes between this version, bash-2.0-alpha3,
10669and the previous version, bash-2.0-alpha2.
10670
10671There is now a file `COMPAT' included in the distribution that lists the
10672user-visible incompatibilities between 1.14 and 2.0.
10673
106741. Changes to Bash
10675
10676a. Some work was done so that word splitting of the rhs of assignment
10677 statements conforms more closely to historical practice.
10678
10679b. A couple of errant memory frees were fixed.
10680
10681c. A fix was made to the test builtin so it recognizes `<' and `>' as
10682 binary operators.
10683
10684d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's
10685 allocated and freed. This is to catch callers that refer to freed
10686 memory or assume something about newly-allocated memory.
10687
10688e. Fixed a problem with conversion to 12-hour time in the prompt
10689 expansion code.
10690
10691f. Fixed a problem with configure's argument parsing order. Now you can
10692 correctly turn on specific options after using --enable-minimal-config.
10693
10694g. The configure script now automatically disables the use of GNU malloc
10695 on systems where it's appropriate (better than having people read the
10696 NOTES file and do it manually).
10697
10698h. There are new prompt expansions (\v and \V) to insert version information
10699 into the prompt strings.
10700
10701i. The default prompt string now includes the version number.
10702
10703j. Most of the builtins that take no options were changed to use the
10704 internal getopt so they can produce proper error messages for -?
10705 and incorrect options.
10706
10707k. Some system-specific changes were made for SVR4.2 and Solaris 2.5.
10708
10709l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of
10710 MAXNAMLEN.
10711
10712m. A couple of problems caused by uninitialized variables were fixed.
10713
10714n. There are a number of new loadable builtin examples: logname, basename,
10715 dirname, tty, pathchk, tee, head, and rmdir. All of these conform to
10716 POSIX.2.
10717
10718o. Bash now notices changes in TZ and calls tzset() if present, so
10719 changing TZ will alter the time printed by prompt expansions.
10720
10721p. The source was reorganized a bit so I don't have to wait so long for
10722 some files to compile, and to facilitate the creation of a `shell
10723 library' at some future point.
10724
10725q. Bash no longer turns off job control if called as `sh', since the
10726 POSIX.2 spec includes job control as a standard feature.
10727
10728r. `bash -o posix' now works as intended.
10729
10730s. Fixed a problem with the completion code: when completing a filename
10731 that contained globbing characters, if show-all-if-ambiguous was set,
10732 the completion code would remove the user's text.
10733
10734t. Fixed ulimit so that (hopefully) the full range of limits is available
10735 on HPUX systems.
10736
10737u. A new `shopt' option (`hostcomplete') enables and disables hostname
10738 completion.
10739
10740v. The shell no longer attempts to save the history on an abort(),
10741 which is usually called by programming_error().
10742
10743w. The `-s' option to `fc' was changed to echo the command to be executed
10744 to stderr instead of stdout.
10745
10746x. If the editor invoked by `fc -e' exits with a non-zero status, no
10747 commands are executed.
10748
10749y. Fixed a bug that made the shopt `histverify' option work incorrectly.
10750
10751z. There is a new variable `MACHTYPE' whose value is the GNU-style
10752 `cpu-company-system' system description as set by configure. (The
10753 values of MACHTYPE and HOSTTYPE should really be swapped.)
10754
10755aa. The `ulimit' builtin now allows the maximum virtual memory size to be
10756 set via setrlimit(2) if RLIMIT_VMEM is defined.
10757
10758bb. `bash -nc 'command'' no longer runs `command'.
10759
107602. Changes to Readline
10761
10762a. Fixed a typo in the code that checked for FIONREAD in input.c.
10763
10764b. Fixed a bug in the code that outputs keybindings, so things like C-\
10765 are quoted properly.
10766
10767c. Fixed a bug in the inputrc file parsing code to handle the problems
10768 caused by inputrc files created from the output of `bind -p' in
10769 previous versions of bash. The problem was due to the bug fixed
10770 in item b above.
10771
10772d. Readline no longer turns off the terminal's meta key, and turns it on
10773 once the first time it's called.
10774
10775------------------------------------------------------------------------------
10776This file documents the changes between this version, bash-2.0-alpha2,
10777and the previous version, bash-2.0-alpha.
10778
107791. Changes to Bash
10780
10781a. The shell no longer thinks directories are executable.
10782
10783b. `disown' has a new option, `h', which inhibits the resending of SIGHUP
10784 but does not remove the job from the jobs table.
10785
10786c. The varargs functions in error.c now use ANSI-C `stdarg' if available.
10787
10788d. The build process now treats the `build version' in .build as local to
10789 the build directory, so different versions built from the same source
10790 tree have different `build versions'.
10791
10792e. Some problems with the grammar have been fixed. (It used `list' in a few
10793 productions where `compound_list' was needed. A `list' must be terminated
10794 with a newline or semicolon; a `compound_list' need not be.)
10795
10796f. A fix was made to keep `wait' from hanging when waiting for all background
10797 jobs.
10798
10799g. `bash --help' now writes its output to stdout, like the GNU Coding Standards
10800 specify, and includes the machine type (the value of MACHTYPE).
10801
10802h. `bash --version' now prints more information and exits successfully, like
10803 the GNU Coding Standards specify.
10804
10805i. The output of `time' and `times' now prints fractional seconds with three
10806 places after the decimal point.
10807
10808j. A bug that caused process substitutions to screw up the pipeline printed
10809 by `jobs' was fixed.
10810
10811k. Fixes were made to the code that implements $'...' and $"..." so they
10812 work as documented.
10813
10814l. The process substitution code now opens named pipes for reading with
10815 O_NONBLOCK to avoid hanging.
10816
10817m. Fixes were made to the trap code so the shell cleans up correctly if the
10818 trap command contains a `return' and we're executing a function or
10819 sourcing a script with `.'.
10820
10821n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the
10822 documentation (ps, dvi, etc.) on a `make install'.
10823
10824o. Fixed an auto-increment error that caused bash -c args to sometimes dump
10825 core.
10826
10827p. Fixed a bug that caused $HISTIGNORE to fail when the history line
10828 contained globbing characters.
10829
108302. Changes to Readline
10831
10832a. There is a new string variable, rl_library_version, available for use by
10833 applications. The current value is "2.1".
10834
10835b. A bug encountered when expand-tilde was enabled and file completion was
10836 attempted on a word beginning with `~/' was fixed.
10837
10838c. A slight change was made to the incremental search termination behavior.
10839 ESC still terminates the search, but if input is pending or arrives
10840 within 0.1 seconds (on systems with select(2)), it is used as a prefix
8868edaf 10841 character. This is intended to allow users to terminate searches with
ccc6cda3 10842 the arrow keys and get the behavior they expect.