]> git.ipfire.org Git - thirdparty/bash.git/blame - CHANGES
bash-5.2-alpha release
[thirdparty/bash.git] / CHANGES
CommitLineData
4491c030
CR
1This document details the changes between this version, bash-5.2-alpha, and
2the previous version, bash-5.1-release.
3
41. Changes to Bash
5
6a. Fixed a bug that assigned a value to the variable name supplied as an
7 argument to `wait -p' when there were no jobs.
8
9b. Fixed a bug that resulted in performing incorrect word expansion on the
10 key/value pairs in a compound array assignment.
11
12c. Fixed a bug that could put the child forked to run a command substitution
13 into the wrong process group.
14
15d. Fixed a problem that could cause the lastpipe option to work incorrectly if
16 file descriptor 0 was closed.
17
18e. Bash tries to suppress traps if a forked child receives a trapped signal
19 before it has a chance to reset its signal handlers.
20
21f. Fixed several memory leaks in compound array assignments.
22
23g. Fixed a problem with performing an assignment with `+=' to an array element
24 that was the value of a nameref.
25
26h. Fixed a bug that could cause a nameref containing an array reference using
27 `@' or `*' not to expand to multiple words.
28
29i. Fixed a bug where extended glob functions could match `.' or `..' when it
30 wasn't explicitly specified, even if dotglob was set.
31
32j. Fixed a bug that caused non-interactive posix-mode shells not to exit on a
33 variable assignment error while assigning into the temporary environment.
34
35k. Fixed a bug that caused parsing errors if an alias contained a compound
36 array assignment.
37
38l. Fixed a couple of instances where bash checked syntax too aggressively when
39 trying to determine how to add a partial command to command-oriented
40 history.
41
42m. Fixed a parser problem that caused it not to allow reserved words to follow
43 the `((' and `[[' commands.
44
45n. Fixed a bad offset calculation when using negative offsets to `history -d'.
46
47o. Fixed an off-by-one error that caused a read past the end of a buffer when
48 reading a multibyte character from the output of a command substitution.
49
50p. Fixed a problem with a failed `exec' command not setting $? to the right
51 value for an exit trap.
52
53q. Fixed a problem that caused bash not to unlink FIFOs created as part of
54 expanding redirections for an external command.
55
56r. Fixed a bug that could cause aliases not to be expanded in case statements.
57
58s. Fixed a bug that could cause word completion to attempt programmable
59 completion for the target of a redirection, instead of filename completion.
60
61t. Fixed a bug that could result in errors after rebinding a key sequence with
62 `bind -x' multiple times.
63
64u. Fixed a problem that could result in not quoting the result when performing
65 command name completion with a glob pattern in the command name.
66
67v. `mapfile' now uses fully-buffered reads in more cases, which should improve
68 bulk read performance.
69
70w. Fixed a bug that caused `wait -n' to not reset its internal state when
71 interrupted by a signal, resulting in subsequent calls failing.
72
73x. Fixed a bug with parsing numeric arguments to readline key sequences
74 installed with `bind -x'.
75
76y. Bash suppresses forking in several additional cases, including most uses
77 of $(<file).
78
79z. If there are multiple `!' tokens in a [[ command, toggle the invert state
80 instead of setting it unconditionally.
81
82aa. Fixed a bug where running `fc' on an empty history list would cause the
83 shell to crash.
84
85bb. Word completion now checks whether or not a quote character closes a
86 quoted string begun on a previous line, so readline doesn't interpret the
87 quote as starting a new quoted string.
88
89cc. Fixed a typo that translated \UNNNNNNNN characters that were not valid in
90 the current locale encoding as \uNNNNNNNN.
91
92dd. Fixed an issue that could cause bash to print timing statistics for the
93 wrong command when `set -e' causes a command to fail.
94
95ee. Bash now runs the exit trap in function context if a failed command in
96 the function causes the shell to exit.
97
98ff. Some fixes to how subshells modify $SHLVL.
99
100gg. Fixed a bug that caused `mapfile -t' not to remove the delimiter when the
101 delimiter is > 128 in the current encoding.
102
103hh. Fixed a problem that could cause the shell to attempt to free unallocated
104 memory if an expansion error occurred.
105
106ii. Fixed a bug in the bash malloc implementation of malloc_usable_size. Bash
107 did not use it, but it could cause problems with library functions that
108 did.
109
110jj. If the `exec' builtin fails, and the shell does not exit, it restores
111 trapped signals to their trapped state.
112
113kk. Fixed a bug that could cause variable assignment arguments to `declare' to
114 expand variables using attributes that the call to declare was turning off.
115
116ll. Fixed a bug with LINENO and arithmetic for commands.
117
118mm. Fixed a posix-mode bug that caused tildes not to be expanded after an
119 unquoted colon on the right side of an assignment statement.
120
121nn. Fixed a problem with `caller' and line numbers when executing an ERR trap.
122
123oo. Fixed a problem that could make the value returned by ${a:=b} not be the
124 final value assigned to a (e.g., if `a' has an attribute that modifies
125 the value on assignment).
126
127pp. Fixed a problem with saving multi-line here-documents to the history list
128 where the here-document delimiter does not appear on the first line.
129
130qq. Fixed a bug with using += to assign to dynamic variables like RANDOM.
131
132rr. Fixed a bug that caused `set -n' to modify $? if set after execution had
133 started.
134
135ss. Builtins like printf/read/wait now behave more consistently when assigning
136 arbitrary keys to associative arrays (like `]'. when appropriately quoted).
137
138tt. Fixed a problem with here-document collection printing the wrong prompt
139 when parsing a compound list in an interactive shell.
140
141uu. Fixed a problem with quoting shell expansion characters (like `$') when
142 they appear in a tab-completed word along with characters that do need
143 quoting (e.g.. $HOME/VirtualBox VMs).
144
1452. Changes to Readline
146
147a. Fixed a problem with cleaning up active marks when using callback mode.
148
149b. Fixed a problem with arithmetic comparison operators checking the version.
150
151c. Fixed a problem that could cause readline not to build on systems without
152 POSIX signal functions.
153
154d. Fixed a bug that could cause readline to crash if the application removed
155 the callback line handler before readline read all typeahead.
156
157e. Added additional checks for read errors in the middle of readline commands.
158
159f. Fixed a redisplay problem that occurred when switching from the digit-
160 argument prompt `(arg: N)' back to the regular prompt and the regular
161 prompt contained invisible characters.
162
163g. Fixed a problem with restoring the prompt when aborting an incremental
164 search.
165
166h. Fix a problem with characters > 128 not being displayed correctly in certain
167 single-byte encodings.
168
169i. Fixed a problem with unix-filename-rubout that caused it to delete too much
170 when applied to a pathname consisting only of one or more slashes.
171
172j. Fixed a display problem that caused the prompt to be wrapped incorrectly if
173 the screen changed dimensions during a call to readline() and the prompt
174 became longer than the screen width.
175
176k. Fixed a problem that caused the \r output by turning off bracketed paste
177 to overwrite the line if terminal echo was disabled.
178
179l. Fixed a bug that could cause colored-completion-prefix to not display if
180 completion-prefix-display-length was set.
181
182m. Fixed a problem with line wrapping prompts when a group of invisible
183 characters runs to the right edge of the screen and the prompt extends
184 longer then the screen width.
185
186n. Fixed a couple problems that could cause rl_end to be set incorrectly by
187 transpose-words.
188
1893. New Features in Bash
190
191a. The bash malloc returns memory that is aligned on 16-byte boundaries.
192
193b. There is a new internal timer framework used for read builtin timeouts.
194
195c. Rewrote the command substitution parsing code to call the parser recursively
196 and rebuild the command string from the parsed command. This allows better
197 syntax checking and catches errors much earlier.
198
199d. The `ulimit' builtin now treats an operand remaining after all of the options
200 and arguments are parsed as an argument to the last command specified by
201 an option. This is for POSIX compatibility.
202
203e. Here-document parsing now handles $'...' and $"..." quoting when reading the
204 here-document body.
205
206f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline
207 commands now understand $'...' and $"..." quoting.
208
209g. There is a new `spell-correct-word' bindable readline command to perform
210 spelling correction on the current word.
211
212h. The `unset' builtin now attempts to treat arguments as array subscripts
213 without parsing or expanding the subscript, even when `assoc_expand_once'
214 is not set.
215
216i. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
217
218j. Associative array assignment and certain instances of referencing (e.g.,
219 `test -v' now allow `@' and `*' to be used as keys.
220
221k. Bash attempts to expand indexed array subscripts only once when executing
222 shell constructs and word expansions.
223
224l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with
225 that value for associative arrays instead of unsetting the entire array
226 (which you can still do with `unset arrayname'). For indexed arrays, it
227 removes all elements of the array without unsetting it (like `A=()').
228
229m. Additional builtins (printf/test/read/wait) do a better job of not
230 parsing array subscripts if array_expand_once is set.
231
232n. New READLINE_ARGUMENT variable set to numeric argument for readline commands
233 defined using `bind -x'.
234
235o. The new `varredir_close' shell option causes bash to automatically close
236 file descriptors opened with {var}<fn and other styles of varassign
237 redirection unless they're arguments to the `exec' builtin.
238
239p. The `$0' special parameter is now set to the name of the script when running
240 any (non-interactive) startup files such as $BASH_ENV.
241
242q. The `enable' builtin tries to load a loadable builtin using the default
243 search path if `enable name' (without any options) attempts to enable a
244 non-existent builtin.
245
246r. The `printf' builtin has a new format specifier: %Q. This acts like %q but
247 applies any specified precision to the original unquoted argument, then
248 quotes and outputs the result.
249
250s. The new `noexpand_translations' option controls whether or not the translated
251 output of $"..." is single-quoted.
252
253t. There is a new parameter transformation operator: @k. This is like @K, but
254 expands the result to separate words after word splitting.
255
256u. There is an alternate array implementation, selectable at `configure' time,
257 that optimizes access speed over memory use (use the new configure
258 --enable-alt-array-implementation option).
259
260v. If an [N]<&WORD- or [N]>&WORD- redirection has WORD expand to the empty
261 string, treat the redirection as [N]<&- or [N]>&- and close file descriptor
262 N (default 0).
263
264w. Invalid parameter transformation operators are now invalid word expansions,
265 and so cause fatal errors in non-interactive shells.
266
267x. New shell option: patsub_replacement. When enabled, a `&' in the replacement
268 string of the pattern substitution expansion is replaced by the portion of
269 the string that matched the pattern. Backslash will escape the `&' and
270 insert a literal `&'.
271
272y. `command -p' no longer looks in the hash table for the specified command.
273
274z. The new `--enable-translatable-strings' option to `configure' allows $"..."
275 support to be compiled in or out.
276
277aa. The new `globskipdots' shell option forces pathname expansion never to
278 return `.' or `..' unless explicitly matched.
279
280bb. Array references using `@' and `*' that are the value of nameref variables
281 (declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
282 set -u is enabled and the array (v) is unset.
283
2844. New Features in Readline
285
286a. There is now an HS_HISTORY_VERSION containing the version number of the
287 history library for applications to use.
288
289b. History expansion better understands multiple history expansions that may
290 contain strings that would ordinarily inhibit history expansion (e.g.,
291 `abc!$!$').
292
293c. There is a new framework for readline timeouts, including new public
294 functions to set timeouts and query how much time is remaining before a
295 timeout hits, and a hook function that can trigger when readline times
296 out. There is a new state value to indicate a timeout.
297
298d. Automatically bind termcap key sequences for page-up and page-down to
299 history-search-backward and history-search-forward, respectively.
300
301e. There is a new `fetch-history' bindable command that retrieves the history
302 entry corresponding to its numeric argument. Negative arguments count back
303 from the end of the history.
304
305f. `vi-undo' is now a bindable command.
306
307g. There is a new option: `enable-active-region'. This separates control of
308 the active region and bracketed-paste. It has the same default value as
309 bracketed-paste, and enabling bracketed paste enables the active region.
310 Users can now turn off the active region while leaving bracketed paste
311 enabled.
312
313h. rl_completer_word_break_characters is now `const char *' like
314 rl_basic_word_break_characters.
315
316i. The non-incremental history searches now leave the current history offset
317 at the position of the last matching history entry, like incremental search.
318
319j. Readline looks in $LS_COLORS for a custom filename extension
320 (*.readline-colored-completion-prefix) and uses that as the default color
321 for the common prefix displayed when `colored-completion-prefix' is set.
322
323------------------------------------------------------------------------------
8868edaf
CR
324This document details the changes between this version, bash-5.1-rc3, and
325the previous version, bash-5.1-rc2.
326
3271. Changes to Bash
328
329a. The `assoc_expand_once' option now affects the evaluation of the -v primary
330 to test and the [[ compound command.
331
3322. Changes to Readline
333
334a. Fixed a bug that could cause point to be set beyond the end of the line
335 buffer when aborting an incremental search.
336
3373. New Features in Bash
338
3394. New Features in Readline
340
341------------------------------------------------------------------------------
342This document details the changes between this version, bash-5.1-rc2, and
343the previous version, bash-5.1-rc1.
344
3451. Changes to Bash
346
347a. Process substitutions started from an interactive shell no longer have their
348 standard input implicitly redirected from /dev/null.
349
350b. Fixed an issue with setting the SIGINT trap handler in an interactive shell
351 when temporarily running $PROMPT_COMMAND non-interactively.
352
3532. Changes to Readline
354
355a. Terminals that are named "dumb" or unknown do not enable bracketed paste
356 by default.
357
358b. Ensure that disabling bracketed paste turns off highlighting the incremental
359 search string when the search is successful.
360
3613. New Features in Bash
362
3634. New Features in Readline
364
365------------------------------------------------------------------------------
366This document details the changes between this version, bash-5.1-rc1, and
367the previous version, bash-5.1-beta.
368
3691. Changes to Bash
370
371a. Fixed an inconsistency in the way HISTCMD is calculated when it's expanded
372 during a multi-line command.
373
374b. Modified the change to here-document expansion containing backslash-quoted
375 double quotes.
376
377c. Fixed a case where the shells's exit status could be greater than 255.
378
379d. Modified changed to process substitution so the executed command has its
380 stdin redirected from /dev/null if it was previously interactive and
381 reading commands from the terminal.
382
3832. New Features in Bash
384
385a. There is a new contributed loadable builtin: asort.
386
3873. Changes to Readline
388
389a. Fixed a bug that could cause an application with an application-specific
390 redisplay function to crash if the line data structures had not been
391 initialized.
392
3934. New Features in Readline
394
395------------------------------------------------------------------------------
396This document details the changes between this version, bash-5.1-beta, and
397the previous version, bash-5.1-alpha.
398
3991. Changes to Bash
400
401a. Fixed a bug that caused name references to variables to not update the
402 referenced variable's assignment side effects.
403
404b. Tightened up the parameter transformation error checking for invalid
405 transformation operators.
406
407c. System-specific changes for: FreeBSD
408
409d. A few minor changes to move potential uses of stdio functions out of signal
410 handling paths.
411
412e. Make sure SIGCHLD is blocked in all cases where waitchld() is not called
413 from a signal handler.
414
415f. Changed `command' builtin processing so it no longer starts an extra process
416 when run asynchronously (command x &).
417
418g. Avoid performing tilde expansion after `:' in words that look like assignment
419 statements when in posix mode.
420
421h. Slight changes to how the `complete' builtin prints out options and actions
422 for completion specifications.
423
424i. Several changes to how `local -' restores the values of options and
425 $SHELLOPTS.
426
427j. Don't treat a word in a compound assignment as an assignment statement
428 unless it has a valid subscript before the `='.
429
430k. Fixed a bug with the DEBUG trap and process substitution that caused the
431 terminal's process group to be set incorrectly.
432
433l. Fixed a bug that left readline's signal handlers installed while running a
434 shell command from a bindable readline command.
435
436m. Fixed the `fc' builtin to clamp out of range history specifications at the
437 boundaries of the history list for POSIX conformance.
438
439n. Fixed a bug that caused ${foo@a} to treat foo as an unset variable if it
440 was an array without a value for subscript 0/"0" but had other set
441 elements.
442
443o. Fixed a bug that caused the history code to attempt to parse command
444 substitutions looking for shell comments before adding them to the history,
445 even while parsing here-documents.
446
447p. Fixed a bug that could cause a syntax error in a command read by `eval' to
448 exit an interactive shell.
449
4502. New Features in Bash
451
452a. If the hash builtin is listing hashed filenames portably, don't print
453 anything if the table is empty.
454
455b. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component.
456
457c. Bash attempts to optimize away forks in the last command in a function body
458 under appropriate circumstances.
459
460d. The globbing code now uses fnmatch(3) to check collation elements (if
461 available) even in cases without multibyte characters.
462
463e. The `fg' and `bg' builtins now return an error in a command substitution
464 when asked to restart a job inherited from the parent shell.
465
466f. The shell now attempts to unlink all FIFOs on exit, whether a consuming
467 process has finished with them or not.
468
4693. Changes to Readline
470
471a. Make sure that all undo groups are closed when leaving vi insertion mode.
472
473b. Make sure that the vi-mode `C' and `c' commands enter insert mode even if
474 the motion command doesn't have any effect.
475
476c. Fixed several potential memory leaks in the callback mode context handling.
477
478d. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while
479 executing the terminal cleanup code, since it's no longer run in a signal
480 handling context.
481
4824. New Features in Readline
483
484a. The signal cleanup code now blocks SIGINT while processing after a SIGINT.
485
486------------------------------------------------------------------------------
487This document details the changes between this version, bash-5.1-alpha, and
488the previous version, bash-5.0-release.
489
4901. Changes to Bash
491
492a. Fixed a bug that caused a posix-mode shell to not exit if the return builtin
493 was executed outside a function or dot script.
494
495b. Fixed a bug where `declare +f' could potentially turn off the function
496 attribute.
497
498c. Restored bash-4.4 pathname expansion behavior when a word to be expanded had
499 only backslashes, not any of the other globbing characters. This came after
500 an extensive POSIX group discussion (interp #1234).
501
502d. There are more changes to avoid performing word expansions multiple times on
503 arithmetic expressions.
504
505e. Fixed a bug with alias expansion when the alias ends with a TAB.
506
507f. Fixed a bug that caused programmable completion to return an error if the
508 shell function name supplied as an argument to `complete -F' was invalid.
509
510g. There are several fixes to buffer overflows found as the result of fuzzing
511 with random input.
512
513h. Fixed a bug that caused the edit-and-execute-command editing command to
514 start with the previous history line if invoked on an empty line.
515
516i. Fixed a bug that potentially caused `bind --help' to change readline's
517 output stream.
518
519j. Turning off posix mode now restores the vi-insertion mode binding for TAB
520 that was in effect when posix mode was enabled.
521
522k. Restore the previous state of job control being enabled if `exec' fails in
523 an interactive shell.
524
525l. Fixed a bug that caused the terminal's process group to be set incorrectly
526 if job control was turned off before starting an interactive shell.
527
528m. Fixed a bug that caused a crash when HISTSIZE=0.
529
530n. Fixed a word expansion bug that caused null strings on the rhs of expansions
531 to be discarded incorrectly.
532
533o. History list management does a better job of handling the situation where
534 the number of history entries from the current shell session is greater than
535 the number of entries in the history list.
536
537p. Fixed a bug that caused the `fc' builtin to attempt to dereference a newly-
538 freed history entry.
539
540q. Fixed a bug that made the `Q' variable transformation not work well with
541 `set -u'.
542
543r. There are several word expansion fixes for expanding $* and $@ in contexts
544 where word splitting is not going to be performed, since each positional
545 parameter must expand to a separate word.
546
547s. Fixed a bug that could cause ^D to exit bash immediately even if there were
548 stopped jobs.
549
550t. Fixed a bug with double-quoting and backslash-quoting strings containing
551 multibyte characters for reuse.
552
553u. Fixed a bug that caused the line number to be reported incorrectly if the
554 shell executed a (command) subshell.
555
556v. Fixed a bug that caused the shell to fail to reap process substitutions
557 when they went out of scope, which had unpredictable results.
558
559w. Fixed a bug that caused null strings in arguments to [[ conditional command
560 operators to compare incorrectly.
561
562x. Changed the behavior of `wait' without arguments to only wait for background
563 processes the current shell instance started, not background children it may
564 have inherited.
565
566y. Fixed a bug that could cause command substitution to leave file descriptors
567 open if the shell received many SIGINTs.
568
569z. Bash now behaves better if the `**' filename expansion operator encounters a
570 symbolic link to a directory, avoiding more cases where it might return
571 duplicate pathnames.
572
573aa. Programmable completion now canonicalizes directory names in the same way
574 as bash word completion, so `..' is handled consistently.
575
576bb. Fixed a bug when using RETURN as the delimiter to the read builtin; it
577 caused readline to set the binding for RETURN incorrectly.
578
579cc. Fixed a bug that caused `history -d' to delay printing an out-of-range
580 error message.
581
582dd. Fixed a bug with `bash -c command' where `command' ends with an expanded
583 alias.
584
585ee. Fixed a bug that could result in `history -n' adding spurious line feeds to
586 commands in the history list.
587
588ff. The $RANDOM random number generator now XORs the top and bottom halves of
589 the internal 32-bit value to introduce more randomness. Setting the shell
590 compatibility level to 50 or lower undoes this.
591
592gg. Fixed several problems caused by running the DEBUG trap on simple commands
593 executed as part of a pipeline.
594
595ii. Fixed a bug that didn't allow `bind -r' to remove the binding for \C-@.
596
597jj. Several fixes to the bash-backward-shellword bindable readline command to
598 behave better when at the last character on the line.
599
600kk. If `set -x' is enabled, bash doesn't print a command twice if it's run by
601 the `command' builtin.
602
603ll. Fixed a bug with printing function definitions containing here documents.
604
605mm. Fixed a bug that could cause the `bind' builtin to set $? to -1.
606
607nn. Fixed a bug that didn't reset the timezone information correctly when the
608 TZ variable was unset.
609
610oo. Fixed several issues with assigning an associative array variable using a
611 compound assignment that expands the value of the same variable.
612
613pp. Fixed several places where the shell set $? without setting PIPESTATUS.
614
615qq. Fixed a problem with glob bracket expressions containing invalid character
616 classes, collating symbols, or equivalence classes -- they should not
617 require a closing right bracket.
618
619rr. Fixed a bug where running a builtin in a subshell did not run the EXIT trap.
620
621ss. Fixed several problems with posix-mode variable assignments preceding
622 shell function calls and posix special builtins, so that they create and
623 modify variables at the current scope.
624
625tt. Fix history initialization so `bash +o history' works as expected.
626
627uu. Fixed a bug in the bindable edit-and-execute-command command that could
628 interfere with the shell's parsing state.
629
630vv. Fixed an issue with nested traps running command substitutions in command
631 lines with command substitutions.
632
633ww. Fixed a bug with globbing pathnames that contain invalid multibyte
634 characters (sequences that don't correspond to a character in the current
635 locale).
636
637xx. Fixed a bug that caused the shell not to exit if a function definition
638 failed while errexit was enabled.
639
640yy. Process substitution processes now get their input from /dev/null, since
641 they are asynchronous, not interactive, and not jobs.
642
643zz. Setting nocaseglob no longer turns on case-insensitive regexp matching.
644
645aaa. Fixed a bug that resulted in extra blank lines being added to some history
646 entries containing here-documents.
647
648bbb. Fixed a bug that resulted in incorrect matching of some patterns in word
649 expansion if they expanded to the empty string.
650
651ccc. Fixed here-string expansion so it behaves the same as expansion of the
652 rhs of an assignment statement.
653
654ddd. Changed here-document parsing to no longer allow the end of the here
655 document to delimit a command substitution.
656
657eee. Several fixes to history expansion: multiple :p modifiers work, a ^ word
658 designator works as part of a range, and a `-' is treated as part of a
659 search string if it immediately follows a `!'.
660
661fff. Fixed a bug in pattern substitution with null matches in a string
662 containing multibyte characters.
663
664ggg. Unbinding a key sequence bound with `bind -x' now removes the key sequence
665 from the additional keymap `bind -x' uses.
666
667hhh. Fixed a bug with command start detection for completion so that it doesn't
668 mistake brace expansion for the start of a command.
669
670iii. Fixed a bug that caused local variables with the same name as variables
671 appearing in a function's temporary environment to not be marked as local.
672
673jjj. Fixed a bug that could cause SIGCHLD to be blocked when executing return
674 or exec in the rightmost pipeline element with lastpipe enabled.
675
676kkk. Fixed a bug that could result in commands without the execute bit set
677 being added to the command hash table.
678
679lll. Fixed a bug that allowed non-digits to follow the `#' in a `base#number'
680 integer constant.
681
682mmm. Fixed a bug that made `time -- command' attempt to execute `--'.
683
684nnn. Fixed a couple of bugs with variable transformation using arrays
685 subscripted with `*' or `@'.
686
687ooo. A failure to create a variable using `declare' in a function no longer
688 causes the function to return immediately.
689
690ppp. Fixed a bug that could cause the := word expansion to add a non-null
691 value if attempting to assign a null string when double-quoted.
692
693qqq. Fixed a bug that could cause backslashes quoting double quotes in here
694 document bodies to not be removed when expanding the body.
695
696rrr. Fixed a bug that caused commands following a subshell while the shell is
697 reading input from stdin but not interactive, while job control is
698 enabled, to be executed twice.
699
700sss. Fixed a bug where receiving SIGTERM from a different process while
701 readline was active could cause the shell to terminate.
702
703ttt. In posix mode, running a trap after the read builtin now sees the exit
704 status of the read builtin (e.g., 130 after a SIGINT) in $?.
705
706uuu. Fixed a bug with nameref variables referencing array subscripts used in
707 arithmetic expressions.
708
709vvv. Fixed a bug that caused the pipeline process group id to be reset in the
710 middle of a command list run by a shell started to run a command
711 substitution.
712
713www. Restricted shells can no longer read and write history files with pathnames
714 containing slashes.
715
716xxx. Fixed a couple of problems with 0 and -0 used as arguments to `fc' when
717 not listing commands from the history.
718
719yyy. When `test' is supplied four or more arguments, treat an argument that
720 looks like an operator (e.g., -e), but is in a place where only a string
721 is valid, as a string, as it would be when using the POSIX rules, instead
722 of an operator with a missing argument.
723
724zzz. There is no `compat50' shopt option. Changes to the shell compatibility
725 level should use the BASH_COMPAT variable.
726
727aaaa. Redirection failures with compound commands are now treated as errors
728 that cause the shell to exit if `errexit' is enabled.
729
730bbbb. Redirection failure error messages no longer expand the word in the
731 redirection again.
732
733cccc. History expansion is no longer performed while parsing a here-document
734 inside a command substitution.
735
7362. Changes to Readline
737
738a. There are a number of fixes that were found as the result of fuzzing with
739 random input.
740
741b. Changed the revert-all-at-newline behavior to make sure to start at the end
742 of the history list when doing it, instead of the line where the user hit
743 return.
744
745c. When parsing `set' commands from the inputrc file or an application, readline
746 now allows trailing whitespace.
747
748d. Fixed a bug that left a file descriptor open to the history file if the
749 file size was 0.
750
751e. Fixed a problem with binding key sequences containing meta characters.
752
753f. Fixed a bug that caused the wrong line to be displayed if the user tried to
754 move back beyond the beginning of the history list, or forward past the end
755 of the history list.
756
757g. If readline catches SIGTSTP, it now sets a hook that allows the calling
758 application to handle it if it desires.
759
760h. Fixed a redisplay problem with a prompt string containing embedded newlines.
761
762i. Fixed a problem with completing filenames containing invalid multibyte
763 sequences when case-insensitive comparisons are enabled.
764
765j. Fixed a redisplay problem with prompt strings containing invisible multibyte
766 characters.
767
768k. Fixed a problem with multibyte characters mapped to editing commands that
769 modify the search string in incremental search.
770
771l. Fixed a bug with maintaining the key sequence while resolving a bound
772 command in the presence of ambiguous sequences (sequences with a common
773 prefix), in most cases while attempting to unbind it.
774
775m. Fixed several buffer overflows found as the result of fuzzing.
776
777n. Reworked backslash handling when translating key sequences for key binding
778 to be more uniform and consistent, which introduces a slight backwards
779 incompatibility.
780
781o. Fixed a bug with saving the history that resulted in errors not being
782 propagated to the calling application when the history file is not writable.
783
784p. Readline only calls chown(2) on a newly-written history file if it really
785 needs to, instead of having it be a no-op.
786
787q. Readline now behaves better when operate-and-get-next is used when the
788 history list is `full': when there are already $HISTSIZE entries.
789
790r. Fixed a bug that could cause vi redo (`.') of a replace command not to work
791 correctly in the C or POSIX locale.
792
793s. Fixed a bug with vi-mode digit arguments that caused the last command to be
794 set incorrectly. This prevents yank-last-arg from working as intended, for
795 example.
796
7973. New Features in Bash
798
799a. `bind -x' now supports different bindings for different editing modes and
800 keymaps.
801
802b. Bash attempts to optimize the number of times it forks when executing
803 commands in subshells and from `bash -c'.
804
805c. Here documents and here strings now use pipes for the expanded document if
806 it's smaller than the pipe buffer size, reverting to temporary files if it's
807 larger.
808
809d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut
810
811e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL
812 and those that were SIG_IGN when the shell starts.
813
814f. The shell now expands the history number (e.g., in PS1) even if it is not
815 currently saving commands to the history list.
816
817g. `read -e' may now be used with arbitrary file descriptors (`read -u N').
818
819h. The `select' builtin now runs traps if its internal call to the read builtin
820 is interrupted by a signal.
821
822i. SRANDOM: a new variable that expands to a 32-bit random number that is not
823 produced by an LCRNG, and uses getrandom/getentropy, falling back to
824 /dev/urandom or arc4random if available. There is a fallback generator if
825 none of these are available.
826
827j. shell-transpose-words: a new bindable readline command that uses the same
828 definition of word as shell-forward-word, etc.
829
830k. The shell now adds default bindings for shell-forward-word,
831 shell-backward-word, shell-transpose-words, and shell-kill-word.
832
833l. Bash now allows ARGV0 appearing in the initial shell environment to set $0.
834
835m. If `unset' is executed without option arguments, bash tries to unset a shell
836 function if a name argument cannot be a shell variable name because it's not
837 an identifier.
838
839n. The `test -N' operator uses nanosecond timestamp granularity if it's
840 available.
841
842o. Bash posix mode now treats assignment statements preceding shell function
843 definitions the same as in its default mode, since POSIX has changed and
844 no longer requires those assignments to persist after the function returns
845 (POSIX interp 654).
846
847p. BASH_REMATCH is no longer readonly.
848
849q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n'
850 or `wait' without arguments.
851
852r. Sorting the results of pathname expansion now uses byte-by-byte comparisons
853 if two strings collate equally to impose a total order; the result of a
854 POSIX interpretation (#963 and #1070).
855
856s. Bash now allows SIGINT trap handlers to execute recursively.
857
858t. Bash now saves and restores state around setting and unsetting posix mode,
859 instead of having unsetting posix mode set a known state.
860
861u. Process substitution is now available in posix mode.
862
863v. READLINE_MARK: a new variable available while executing commands bound with
864 `bind -x', contains the value of the mark.
865
866w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell
867 startup.
868
869x. `test -v N' can now test whether or not positional parameter N is set.
870
871y. `local' now honors the `-p' option to display all local variables at the
872 current context.
873
874z. The `@a' variable transformation now prints attributes for unset array
875 variables.
876
877aa. The `@A' variable transformation now prints a declare command that sets a
878 variable's attributes if the variable has attributes but is unset.
879
880bb. `declare' and `local' now have a -I option that inherits attributes and
881 value from a variable with the same name at a previous scope.
882
883cc. When run from a -c command, `jobs' now reports the status of completed jobs.
884
885dd. New `U', `u', and `L' parameter transformations to convert to uppercase,
886 convert first character to uppercase, and convert to lowercase,
887 respectively.
888
889ee. PROMPT_COMMAND: can now be an array variable, each element of which can
890 contain a command to be executed like a string PROMPT_COMMAND variable.
891
892ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource.
893
894gg. Associative arrays may be assigned using a list of key-value pairs within
895 a compound assignment. Compound assignments where the words are not of
896 the form [key]=value are assumed to be key-value assignments. A missing or
897 empty key is an error; a missing value is treated as NULL. Assignments may
898 not mix the two forms.
899
900hh. New `K' parameter transformation to display associative arrays as key-
901 value pairs.
902
903ii. Writing history to syslog now handles messages longer than the syslog max
904 length by writing multiple messages with a sequence number.
905
906jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since
907 they are nominally integer variables. LINENO is not an integer variable.
908
909kk. Bash temporarily suppresses the verbose option when running the DEBUG trap
910 while running a command from the `fc' builtin.
911
912ll. `wait -n' now accepts a list of job specifications as arguments and will
913 wait for the first one in the list to change state.
914
915mm. The associative array implementation can now dynamically increase the
916 size of the hash table based on insertion patterns.
917
918nn. HISTFILE is now readonly in a restricted shell.
919
920oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit
921 systems.
922
9234. New Features in Readline
924
925a. If a second consecutive completion attempt produces matches where the first
926 did not, treat it as a new completion attempt and insert a match as
927 appropriate.
928
929b. Bracketed paste mode works in more places: incremental search strings, vi
930 overstrike mode, character search, and reading numeric arguments.
931
932c. Readline automatically switches to horizontal scrolling if the terminal has
933 only one line.
934
935d. Unbinding all key sequences bound to a particular readline function now
936 descends into keymaps for multi-key sequences.
937
938e. rl-clear-display: new bindable command that clears the screen and, if
939 possible, the scrollback buffer (bound to emacs mode M-C-l by default).
940
941f. New active mark and face feature: when enabled, it will highlight the text
942 inserted by a bracketed paste (the `active region') and the text found by
943 incremental and non-incremental history searches. This is tied to bracketed
944 paste and can be disabled by turning off bracketed paste.
945
946g. Readline sets the mark in several additional commands.
947
948h. Bracketed paste mode is enabled by default.
949
950i. Readline tries to take advantage of the more regular structure of UTF-8
951 characters to identify the beginning and end of characters when moving
952 through the line buffer.
953
954j. The bindable operate-and-get-next command (and its default bindings) are
955 now part of readline instead of a bash-specific addition.
956
957------------------------------------------------------------------------------
d233b485
CR
958This document details the changes between this version, bash-5.0-release, and
959the previous version, bash-5.0-rc1.
960
9611. Changes to Bash
962
963a. Tilde expansion isn't performed on indexed array subscripts, even for
964 backwards compatibility.
965
966b. The shell doesn't exit in posix mode if the eval builtin gets a parse
967 error when run by the command builtin.
968
969c. Fixed a bug that caused a shell comment in an alias to not find the end
970 of the alias properly.
971
972d. Reverted a change from April, 2018 that caused strings containing
973 backslashes to be flagged as glob patterns.
974
9752. Changes to Readline
976
9773. New Features in Bash
978
9794. New Features in Readline
980
981------------------------------------------------------------------------------
982This document details the changes between this version, bash-5.0-rc1, and
983the previous version, bash-5.0-beta2.
984
9851. Changes to Bash
986
987a. Fix to initial word completion detection code.
988
989b. Fixed a bug that caused issues with assignment statements containing ^A in
990 the value assigned when IFS contains ^A.
991
992c. Added a fallback to fnmatch() when strcoll can't correctly deal with
993 bracket expression character equivalence classes.
994
995d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command
996 when running a trap handler containing [[ or (( commands.
997
998e. Fixed a bug that caused nameref assignments in the temporary environment
999 to potentially create variables with invalid names.
1000
1001f. Fixed a bug that caused `local -' to turn off alias expansion in scripts.
1002
1003g. Fixed a parser issue with a command string containing EOF after an invalid
1004 command as an argument to a special builtin not causing a posix-mode shell
1005 to exit.
1006
1007h. Made a slight change to the FNV-1 string hash algorithm used for associative
1008 arrays (corrected the initial seed).
1009
10102. Changes to Readline
1011
10123. New Features in Bash
1013
1014a. The `select' command now supports command forms without a word list
1015 following `in'.
1016
10174. New Features in Readline
1018
1019------------------------------------------------------------------------------
1020This document details the changes between this version, bash-5.0-beta2, and
1021the previous version, bash-5.0-beta.
1022
10231. Changes to Bash
1024
1025a. Fixed a bug that could cause a seg fault while parsing a subshell command
1026 inside a command substitution.
1027
1028b. Fixed several small memory leaks uncovered by coverity.
1029
1030c. Fixed a problem with command substitution inside an interactive shell that
1031 could cause the parent to receive a SIGHUP.
1032
1033d. Fixed a problem with using `*' and `@' as subscripts when assigning values
1034 to an associative array with assoc_expand_once enabled.
1035
1036e. Fixed a bug that could cause a huge memory allocation when completing a
1037 word beginning with an invalid tilde expansion.
1038
8868edaf 1039f. Cleaned up some incompatibilities with bash-4.4 when expanding indexed array
d233b485
CR
1040 subscripts used in arithmetic expansions when assoc_expand_once is enabled.
1041
1042g. The ${parameter@a} expansion will display attributes even if `parameter' is
1043 unset.
1044
1045h. Fixed a bug that caused the output of `set' to cut off some variables before
1046 printing the value.
1047
1048i. Treat a failure to assign a variable when using the ${x:=value} expansion
1049 as an expansion error, so non-interactive posix-mode shells exit
1050
1051j. Fixed a problem when expanding $* in a context where word splitting is not
1052 performed when IFS is NULL.
1053
1054k. Temp files used to store here documents are forced readable, no matter what
1055 the user's umask says.
1056
1057l. Fixed a problem where an interrupted brace expansion could cause the shell
1058 to attempt to free an invalid memory location.
1059
1060m. Make sure to check for any terminating signals after running a trap
1061 handler; don't wait until the next time we process traps.
1062
1063n. Fixed a bug that caused "return" to act like a special builtin with respect
1064 to variable assignments even when preceded by "command".
1065
1066o. POSIX-mode shells now return failure if the cd builtin fails due to the
1067 absolute directory name being longer than PATH_MAX, instead of trying
1068 again with a relative pathname.
1069
1070p. Fixed a problem with FUNCNAME occasionally being visible when not executing
1071 a shell function.
1072
1073q. Fixed a problem with the expansions performed on the WORD in the case
1074 command.
1075
1076r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during
1077 word splitting and the read builtin.
1078
1079s. Fixed a problem with expanding an array with subscript `*' when all the
1080 elements expand to the empty string, and making sure the expansion honors
1081 the `:' specifier.
1082
10832. Changes to Readline
1084
1085a. Fixed a bug with adding multibyte characters to an incremental search string.
1086
1087b. Fixed a bug with redoing text insertions in vi mode.
1088
1089c. Fixed a bug with pasting text into an incremental search string if bracketed
1090 paste mode is enabled. ESC cannot be one of the incremental search
1091 terminator characters for this to work.
1092
1093d. Fixed a bug with anchored search patterns when performing searches in vi
1094 mode.
1095
10963. New Features in Bash
1097
1098a. Associative and indexed arrays now allow subscripts consisting solely of
1099 whitespace.
1100
1101b. `checkwinsize' is now enabled by default.
1102
1103c. The `localvar_unset' shopt option is now visible and documented.
1104
1105d. The `progcomp_alias' shopt option is now visible and documented.
1106
1107e. The signal name processing code now understands `SIGRTMIN+n' all the way
1108 up to SIGRTMAX.
1109
1110f. There is a new `seq' loadable builtin.
1111
1112g. Trap execution now honors the (internal) max invocations of `eval', since
1113 traps are supposed to be executed as if using `eval'.
1114
1115h. The $_ variable doesn't change when the shell executes a command that forks.
1116
1117i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though
1118 conforming applications aren't supposed to use them.
1119
1120j. POSIX mode now enables the `shift_verbose' option.
1121
11224. New Features in Readline
1123
1124a. Readline now allows application-defined keymap names; there is a new public
1125 function, rl_set_keymap_name(), to do that.
1126
1127b. The "Insert" keypad key, if available, now puts readline into overwrite
1128 mode.
1129
1130------------------------------------------------------------------------------
1131This document details the changes between this version, bash-5.0-beta, and
1132the previous version, bash-5.0-alpha.
1133
11341. Changes to Bash
1135
1136a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this
1137 is where POSIX says the subshell is not "enclosed" by the loop.
1138
1139b. Added more UTF-8-specific versions of multibyte functions, and optimized
1140 existing functions if the current locale uses UTF-8 encoding.
1141
1142c. In POSIX mode, assignments preceding regular builtins should not persist
1143 when the builtin completes.
1144
1145d. Added additional checks to special array assignment (e.g., BASH_ALIASES)
1146 so it can't be used to bypass validity checks performed in other places.
1147
1148e. The `!!' history expansion now refers to the previous history entry as
1149 expected, even if used on the second or subsequent line of a multi-line
1150 history entry.
1151
1152f. Fixed a bug that could cause the shell to dereference a NULL pointer if
1153 the environment (`environ') is set to NULL.
1154
1155g. Bash uses slightly better integer overflow handling for brace sequence
1156 expansion on systems where ints are 32 bits and intmax_t is 64 bits.
1157
1158h. Fixed a bug setting attributes for a variable named as an argument to
1159 `declare' that also appears as a nameref in the temporary environment.
1160
1161i. Fixed several bugs that could cause assignments to namerefs to create
1162 variables with invalid names.
1163
1164j. Fixed a bug that could result in the SIGINT handler being set incorrectly
1165 in asynchronous subshells.
1166
1167k. Fixed a bug that could cause `bash -t' to not execute the specified command.
1168
1169l. Fixed several bugs that caused the shell to operate on the wrong variable
1170 when using namerefs with the same name as a global variable in shell
1171 functions.
1172
1173m. Internal changes to how the shell handles variables with invalid names in
1174 the initial environment and to prevent variables with invalid names from
1175 being added to the environment instead of passing them on to children.
1176
1177n. Changes to make sure that an expansion that results in a quoted null string
1178 is reflected in the expansion, even if the word expands to nothing.
1179
1180o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand
1181 the same way after the recent changes for POSIX interpretation 888.
1182
1183p. Saving and restoring the positional parameters at function entry and exit
1184 is considerably more efficient; noticeably so when there are large numbers
1185 of positional parameters.
1186
1187q. Fixed a bug that caused `lastpipe' and `pipefail' to return an incorrect
1188 status for the pipeline if there was more than one external command in a
1189 loop body appearing in the last pipeline element.
1190
1191r. Fixed a bug that caused value conversion errors with the printf builtin's
1192 %u and %f conversion specifications and invalid constants.
1193
11942. Changes to Readline
1195
1196a. Added more UTF-8-specific versions of multibyte functions, and optimized
1197 existing functions if the current locale uses UTF-8 encoding.
1198
1199b. Fixed a problem with bracketed-paste inserting more than one character and
1200 interacting with other readline functions.
1201
1202c. Fixed a bug that caused the history library to attempt to append a history
1203 line to a non-existent history entry.
1204
1205d. If using bracketed paste mode, output a newline after the \r that is the
1206 last character of the mode disable string to avoid overwriting output.
1207
1208e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better
1209 handle multibyte characters.
1210
1211f. Fixed a redisplay problem that caused an extra newline to be generated on
1212 accept-line when the line length is exactly the screenwidth.
1213
12143. New Features in Bash
1215
1216a. Bash no longer allows variable assignments preceding a special builtin that
1217 changes variable attributes to propagate back to the calling environment
1218 unless the compatibility level is 44 or lower.
1219
1220b. You can set the default value for $HISTSIZE at build time in config-top.h.
1221
1222c. The `complete' builtin now accepts a -I option that applies the completion
1223 to the initial word on the line.
1224
1225d. The internal bash malloc now uses mmap (if available) to satisfy requests
1226 greater than 128K bytes, so free can use mfree to return the pages to the
1227 kernel.
1228
1229e. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup
1230 unless it's in debugging mode, as the documentation has always said, but
1231 will dynamically create them if a script references them at the top level
1232 without having enabled debugging mode.
1233
1234f. The localvar_inherit option will not attempt to inherit a value from a
1235 variable of an incompatible type (indexed vs. associative arrays, for
1236 example).
1237
1238g. The `globasciiranges' option is now enabled by default; it can be set to
1239 off by default at configuration time.
1240
12414. New Features in Readline
1242
1243a. The history expansion library now understands command and process
1244 substitution and extended globbing and allows them to appear anywhere in a
1245 word.
1246
1247b. The history library has a new variable that allows applications to set the
1248 initial quoting state, so quoting state can be inherited from a previous
1249 line.
1250
1251------------------------------------------------------------------------------
1252This document details the changes between this version, bash-5.0-alpha, and
1253the previous version, bash-4.4-release.
1254
12551. Changes to Bash
1256
1257a. Fixed a bug that could cause traps in background jobs to give the terminal
1258 to the wrong process group.
1259
1260b. Fixed a bug that caused `kill -l 0' to print an out-of-range error.
1261
1262c. Fixed a problem that could result in here-documents being displayed in
1263 the wrong order.
1264
1265d. Fixed a number of out-of-bounds and free memory read errors found via
1266 fuzzing.
1267
1268e. Fixed a subshell inheritance problem that could cause a subshell to wait for
1269 the wrong process.
1270
1271f. Fixed a bug that caused SHLVL to be incremented one too many times when
1272 creating subshells.
1273
1274g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with
1275 job control enabled.
1276
1277h. Fixed a spurious warning about unterminated ${ or $( constructs during
1278 word completion.
1279
1280i. The shell no longer runs traps if a signal arrives while reading command
1281 substitution output.
1282
1283j. Fixed an arithmetic expansion error that could allow ++var++ as valid
1284 syntax.
1285
1286k. Fixed an error that allowed out-of-bounds references to the directory stack.
1287
1288l. The shell does a better job of saving multi-line history entries with
1289 embedded comments.
1290
1291m. Fixed a bug that could cause quoted bracket expressions in regular expression
1292 arguments to `[[' to not match correctly.
1293
1294n. Fixed a bug that could cause an IFS character in a word to result in an
1295 extra '\001' character in the expansion.
1296
1297o. A trailing backslash in a glob pattern can match a trailing backslash in the
1298 string.
1299
1300p. Fixed a memory leak in the process creation code path when job control is
1301 enabled.
1302
1303q. Fixed a bug that caused `printf' to output broken surrogate pairs for
1304 Japanese locales.
1305
1306r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to
1307 kill an interactive shell.
1308
1309s. Fixed a bug that could cause the `read' builtin to not fully read a
1310 multibyte character.
1311
1312t. Fixed a bug that could cause identifiers to be evaluated in conditional
1313 arithmetic expressions even when evaluation is suppressed.
1314
1315u. Fixed a bug that could result in command substitution, when executed in a
1316 context where word splitting is not performed, to leave a stray '\001'
1317 character in the string.
1318
1319v. Fixed a bug that could cause history expansion to be disabled in a non-
1320 interactive shell even if `-o histexpand' is supplied at startup.
1321
1322w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters.
1323
1324x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions.
1325
1326y. If indirect expansion attempts to indirectly reference through an unset
1327 variable, report an error.
1328
1329z. Added a guard to prevent the shell from looping while receiving an endless
1330 stream of SIGTTIN at shell startup.
1331
1332aa. Fixed a bug with parsing here documents inside a command substitution when
1333 looking for the closing delimiter.
1334
1335bb. Fixed a bug that caused printf to not quote all <blank> characters in the
1336 current locale when using the `%q' format specifier.
1337
1338cc. Fixed a bug with bash's internal buffered I/O system that caused the input
1339 pointer to not be reset when read(2) returned an EOF.
1340
1341dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will
1342 not interrupt open/read/write system calls.
1343
1344ee. The ERR trap now reports line numbers more reliably.
1345
1346ff. The shell no longer tries to manipulate the terminal process group if a
1347 command or process substitution is killed by SIGTERM when job control is
1348 enabled.
1349
1350gg. Fixed a bug that caused extglob patterns to match filenames beginning with
1351 a period.
1352
1353hh. File descriptors open for writing to here documents are no longer available
1354 to subshells.
1355
1356ii. Make sure word completion doesn't perform command or process substitution.
1357
1358jj. Fixed a bug with parsing $$'...' inside a command substitution.
1359
1360kk. Fixed a bug that caused bash to remove backslash-newline pairs from the
1361 body of a here-document with a quoted delimiter inside a command
1362 substitution.
1363
1364ll. Fixed a bug that could cause the shell to hang when adding a pid to the
1365 table of background process exit statuses.
1366
1367mm. Fixed a bug that could cause 0x01 characters to be doubled in the output
1368 of process substitution.
1369
1370nn. Restricted shells now clear the hash table before making the PATH variable
1371 read-only.
1372
1373oo. There are a number of changes to the expansion of $* and $@ in contexts
1374 where word splitting does not occur (quoted and unquoted), with IFS set
1375 to NULL or a non-standard value, mostly to deal with the consequences of
1376 the behavior defined in Posix interpretation 888.
1377
1378pp. There are a number of changes to nameref variable handling to avoid
1379 creating variables with invalid names.
1380
1381qq. A non-interactive posix mode shell no longer exits when an assignment
1382 statement fails if the assignment is utimately being performed by the
1383 `command' builtin.
1384
1385rr. When using character class names for globbing, don't allow case
1386 insensitivity, even if nocaseglob is enabled.
1387
1388ss. Fixed a bug that allowed some redirections to stay in place if a later
1389 redirection failed.
1390
1391tt. Fixed a bug in how command and process substitutions are recognized within
1392 other parameter expansions.
1393
1394uu. Fixed a bug that caused bash to loop under certain circumstances when
1395 performing arithmetic expansion on a variable whose value is an invalid
1396 expression.
1397
1398vv. Fixed a bug that could cause bash to expand aliases inappropriately while
1399 parsing compound commands like `case'.
1400
1401ww. Fixed a bug that could cause `read -N' to fail to read complete multibyte
1402 characters, even when the sequences are incomplete or invalid, with or
1403 without readline.
1404
1405xx. Fixed a bug that could cause `case' to fail to match patterns containing
1406 0x01 characters.
1407
1408yy. Fixed a bug that caused exported functions to contain stray 0x01 characters.
1409
1410zz. Fixed some inconsistencies with how the history number is handled in the
1411 various prompt strings.
1412
1413aaa. Fixed a bug that could cause a core dump if READLINE_LINE was unset
1414 inside a shell function bound to a key sequence with `bind -x'.
1415
1416bbb. Fixed a bug that could cause bash to not read a token terminator correctly
1417 if a command substitution was used inside an arithmetic `for' command.
1418
1419ccc. Fixed problems that could occur with a fatal arithmetic expansion error
1420 in a context (like prompt expansion) where you can't jump back to the
1421 top level.
1422
1423ddd. Expression errors in arithmetic `for' commands are treated more like
1424 shell syntax errors.
1425
1426eee. Fixed a parser synchronization error resulting from a syntax error
1427 followed immediately by an EOF.
1428
1429fff. When executing a shell function, the first line in the function ($LINENO)
1430 is line 1 instead of line 0, as Posix requires.
1431
1432ggg. In Posix mode, bash will canonicalize the value of PWD it inherits from
1433 the environment and use that to set its idea of the current directory.
1434
1435hhh. If LINENO is exported, bash needs to regenerate its value each time it
1436 constructs the environment.
1437
1438iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'.
1439
1440jjj. Make sure the `coproc' command returns an appropriate status if the NAME
1441 argument is invalid.
1442
1443kkk. Fixed a problem with arithmetic expressions containing array references
1444 that contain arithmetic expressions with syntax errors.
1445
1446lll. The `select' command and help builtin will use $COLUMNS before the window
1447 size returned from the kernel as the terminal width.
1448
1449mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to
1450 detect file descriptor errors.
1451
1452nnn. The `read' builtin now does a better job of acting on signals that don't
1453 interrupt read(2).
1454
1455ooo. Fixed some cases where `printf -v' did not return failure status on a
1456 variable assignment error.
1457
1458ppp. Fixed temporary environment propagation back to the current environment
1459 so that it doesn't happen for special builtins run by the `command'
1460 builtin.
1461
1462qqq. Fixed a bug when searching for the end of a here-document delimiter in a
1463 command substitution.
1464
1465rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail.
1466
1467sss. Fixed a bug that could cause reserved words to not be recognized in a
1468 for statement without the `in' inside a command substitution.
1469
1470ttt. Fixed a bug that could cause a double-free in a timed command with an
1471 expansion error.
1472
1473uuu. Fixed a bug that could cause a core dump if a script switches from a UTF-8
1474 locale to a different locale after displaying a lone surrogate character.
1475
1476vvv. Fixed cases where bash prematurely removed FIFOs attached to process
1477 substitutions.
1478
1479www. Fixed a problem with calculating the size of the table that stores exit
1480 statuses from background processes when the child process resource limit
1481 is very large.
1482
1483xxx. Fixed a memory leak with functions using `return' when using FIFOs for
1484 standard input.
1485
1486yyy. `wait' without arguments attempts to wait for all active process
1487 substitution processes.
1488
1489zzz. Fixed a bug where an indirect parameter was subjected to word splitting
1490 when trying to find the indirected variable name.
1491
1492aaaa. Fixed a bug that could allow restricted shell users to add commands to
1493 the hash table.
1494
1495bbbb. When using the `!(patlist)' extended globbing operator, a filename
1496 beginning with a `.' that doesn't match any of the patterns is not
1497 returned as a match if leading dots must be matched explicitly.
1498
1499cccc. Fixed a bug that could cause line number and source file information for
1500 a function definition to be incorrect if there are multiple definitions.
1501
1502dddd. Fixed a bug that could cause builtins like `readonly' to behave
1503 differently when applied to arrays and scalar variables within functions.
1504
1505eeee. Fixed a bug that could cause alias expansion to add an extra space to
1506 a quoted string that begins outside the alias expansion.
1507
1508ffff. Fixed a bug that could result in unwanted alias expansion after timing
1509 the null command.
1510
1511gggg. Fixed a bug that could cause a core dump if a timestamp in a history
1512 file overflowed a time_t.
1513
1514hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since
1515 the kernel calls make those file descriptors read-write.
1516
1517iiii. Fixed a problem with splitting double-quoted words for programmable
1518 completion when the double quote immediately follows another word
1519 delimiter.
1520
1521jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share
1522 the same input buffer.
1523
1524kkkk. The error message resulting from ${x:?} and ${x?} now differs depending
1525 on whether the variable is null or unset.
1526
1527llll. In Posix mode, the shell exits if a variable assignment fails and precedes
1528 an empty simple command (after expansion).
1529
1530mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to
1531 drop characters.
1532
1533nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal
1534 due to Linux pid namespace peculiarities.
1535
1536oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for
1537 `bind -x' commands.
1538
1539pppp. Fixed a bug that could cause SIGINT recursion when running an external
1540 command in a trap the shell takes after a command exits due to SIGINT.
1541
1542qqqq. Make sure the shell turns off job control before running the command-
1543 not-found handle, so the command doesn't try to manipulate process
1544 groups.
1545
1546rrrr. Fixed a problem with timing process substitutions that caused the shell
1547 to print timing information for the calling command.
1548
1549ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark
1550 the delimiter as quoted (inhibiting expansion of the here-document
1551 contents).
1552
1553tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and
1554 conditional command pattern matches.
1555
1556uuuu. Fixed a bug that could cause the pattern matching engine to not recognize
1557 locale-specific character classes.
1558
1559vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently.
1560
1561wwww. The `globstar' code now skips over symbolic links to directories,
1562 preventing them from being scanned twice.
1563
1564xxxx. When running `bind -x' commands, bash now sets READLINE_POINT based on
1565 the number of characters in the readline line buffer, not the number of
1566 bytes.
1567
1568yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN
1569 trap when using `eval return'.
1570
1571zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document.
1572
1573aaaaa. The process substitution code now closes and unlinks FIFOs when the
1574 process on the other side exits, in order to prevent SIGPIPE or
1575 waiting until a FIFO opened for read has a writer.
1576
1577bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in
1578 an {id}>foo construct.
1579
1580ccccc. After a Posix discussion, the pattern matching engine just skips over
1581 invalid character classes in bracket expressions, instead of matching
1582 them like individual characters in the expression.
1583
1584ddddd. Fixed a posix-mode problem with variable scoping when creating variables
1585 from assignment statements preceding special builtins.
1586
1587eeeee. Fixed a bug that could cause patterns containing backslashes to not be
1588 run through the pattern matching engine.
1589
1590fffff. Fixed a bug that could cause redirections to compound commands to not
1591 be `undone' if the file descriptor in the redirection was closed when
1592 the redirection was initially processed.
1593
1594ggggg. Fixed a bug that could cause buffer corruption when using `bind -x' in
1595 a command execute as a result of a key binding installed by `bind -x'.
1596
15972. Changes to Readline
1598
1599a. Added a guard to prevent nested macros from causing an infinite expansion
1600 loop.
1601
1602b. Instead of allocating enough history list entries to hold the maximum list
1603 size, cap the number allocated initially.
1604
1605c. Added a strategy to avoid allocating huge amounts of memory if a block of
1606 history entries without timestamps occurs after a block with timestamps.
1607
1608d. Added support for keyboard timeouts when an ESC character is the last
1609 character in a macro.
1610
1611e. There are several performance improvements when in a UTF-8 locale.
1612
1613f. Readline does a better job of preserving the original set of blocked
1614 signals when using pselect() to wait for input.
1615
1616g. Fixed a bug that caused multibyte characters in macros to be mishandled.
1617
1618h. Fixed several bugs in the code that calculates line breaks when expanding
1619 prompts that span several lines, contain multibyte characters, and contain
1620 invisible character seqeuences.
1621
1622i. Fixed several bugs in cursor positioning when displaying lines with prompts
1623 containing invisible characters and multibyte characters.
1624
1625j. When performing case-insensitive completion, Readline no longer sorts the
1626 list of matches unless directed to do so.
1627
1628k. Fixed a problem with key sequences ending with a backslash.
1629
1630l. Fixed out-of-bounds and free memory read errors found via fuzzing.
1631
1632m. Fixed several cases where the mark was set to an invalid value.
1633
1634n. Fixed a problem with the case-changing operators in the case where the
1635 lower and upper case versions of a character do not have the same number
1636 of bytes.
1637
1638o. Handle incremental and non-incremental search character reads returning EOF.
1639
1640p. Handle the case where a failing readline command at the end of a multi-key
1641 sequence could be misinterpreted.
1642
1643q. The history library now prints a meaningful error message if the history
1644 file isn't a regular file.
1645
1646r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace
1647 a multibyte character.
1648
1649s. The key binding code now attempts to remove a keymap if a key unbinding
1650 leaves it empty.
1651
1652t. Fixed a line-wrapping issue that caused problems for some terminal
1653 emulators.
1654
1655u. If there is a key bound to the tty's VDISCARD special character, readline
1656 disables VDISCARD while it is active.
1657
1658v. Fixed a problem with exiting bracketed paste mode on terminals that assume
1659 the bracketed paste mode character sequence contains visible characters.
1660
1661w. Fixed a bug that could cause a key binding command to refer to an
1662 uninitialized variable.
1663
16643. New Features in Bash
1665
1666a. The `wait' builtin can now wait for the last process substitution created.
1667
1668b. There is an EPOCHSECONDS variable, which expands to the time in seconds
1669 since the Unix epoch.
1670
1671c. There is an EPOCHREALTIME variable, which expands to the time in seconds
1672 since the Unix epoch with microsecond granularity.
1673
1674d. New loadable builtins: rm, stat, fdflags.
1675
1676e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment.
1677
1678f. When supplied a numeric argument, the shell-expand-line bindable readline
1679 command does not perform quote removal and suppresses command and process
1680 substitution.
1681
1682g. `history -d' understands negative arguments: negative arguments offset from
1683 the end of the history list.
1684
1685h. The `name' argument to the `coproc' reserved word now undergoes word
1686 expansion, so unique coprocs can be created in loops.
1687
1688i. A nameref name resolution loop in a function now resolves to a variable by
1689 that name in the global scope.
1690
8868edaf 1691j. The `wait' builtin now has a `-f' option, which signifies to wait until the
d233b485
CR
1692 specified job or process terminates, instead of waiting until it changes
1693 state.
1694
1695k. There is a define in config-top.h that allows the shell to use a static
1696 value for $PATH, overriding whatever is in the environment at startup, for
1697 use by the restricted shell.
1698
1699l. Process substitution does not inherit the `v' option, like command
1700 substitution.
1701
1702m. If a non-interactive shell with job control enabled detects that a foreground
1703 job died due to SIGINT, it acts as if it received the SIGINT.
1704
1705n. The SIGCHLD trap is run once for each exiting child process even if job
1706 control is not enabled when the shell is in Posix mode.
1707
1708o. A new shopt option: localvar_inherit; if set, a local variable inherits the
1709 value of a variable with the same name at the nearest preceding scope.
1710
1711p. `bind -r' now checks whether a key sequence is bound before binding it to
1712 NULL, to avoid creating keymaps for a multi-key sequence.
1713
1714q. A numeric argument to the line editing `operate-and-get-next' command
1715 specifies which history entry to use.
1716
1717r. The positional parameters are now assigned before running the shell startup
1718 files, so startup files can use $@.
1719
1720s. There is a compile-time option that forces the shell to disable the check
1721 for an inherited OLDPWD being a directory.
1722
1723t. The `history' builtin can now delete ranges of history entries using
1724 `-d start-end'.
1725
1726u. The `vi-edit-and-execute-command' bindable readline command now puts readline
1727 back in vi insertion mode after executing commands from the edited file.
1728
1729v. The command completion code now matches aliases and shell function names
1730 case-insensitively if the readline completion-ignore-case variable is set.
1731
1732w. There is a new `assoc_expand_once' shell option that attempts to expand
1733 associative array subscripts only once.
1734
1735x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended
1736 debugging mode is active. The old behavior of unconditionally setting them
1737 is available as part of the shell compatibility options.
1738
1739y. The `umask' builtin now allows modes and masks greater than octal 777.
1740
1741z. The `times' builtin now honors the current locale when printing a decimal
1742 point.
1743
1744aa. There is a new (disabled by default, undocumented) shell option to enable
1745 and disable sending history to syslog at runtime.
1746
17474. New Features in Readline
1748
1749a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
1750 Posix specifies (uses fnmatch(3) if available).
1751
1752b. There are new `next-screen-line' and `previous-screen-line' bindable
1753 commands, which move the cursor to the same column in the next, or previous,
1754 physical line, respectively.
1755
1756c. There are default key bindings for control-arrow-key key combinations.
1757
1758d. A negative argument (-N) to `quoted-insert' means to insert the next N
1759 characters using quoted-insert.
1760
1761e. New public function: rl_check_signals(), which allows applications to
1762 respond to signals that readline catches while waiting for input using
1763 a custom read function.
1764
1765f. There is new support for conditionally testing the readline version in an
1766 inputrc file, with a full set of arithmetic comparison operators available.
1767
1768g. There is a simple variable comparison facility available for use within an
1769 inputrc file. Allowable operators are equality and inequality; string
1770 variables may be compared to a value; boolean variables must be compared to
1771 either `on' or `off'; variable names are separated from the operator by
1772 whitespace.
1773
1774------------------------------------------------------------------------------
a0c0a00f
CR
1775This document details the changes between this version, bash-4.4-release, and
1776the previous version, bash-4.4-rc2.
1777
17781. Changes to Bash
1779
1780a. Fixed a bug that could potentially result in a crash due to an integer
1781 overflow.
1782
1783b. Fixed a bug in where commands printed due to `set -x' could be incorrectly
1784 quoted if being printed in contexts where they haven't yet been expanded.
1785
1786c. Fixed several memory leaks.
1787
1788d. Fixed a bug that could potentially cause the terminal attributes to be
1789 set incorrectly by a command run from a programmable completion.
1790
1791e. Fixed several potential buffer overflow issues in the word expansion code.
1792
17932. Changes to Readline
1794
17953. New Features in Bash
1796
17974. New Features in Readline
a0c0a00f
CR
1798------------------------------------------------------------------------------
1799This document details the changes between this version, bash-4.4-rc2, and
1800the previous version, bash-4.4-beta2.
1801
18021. Changes to Bash
1803
1804a. Fixed an out-of-bounds read in the redirection operator completion code.
1805
1806b. Fixed execution context so `until continue' doesn't disable execution for
1807 subsequent commands.
1808
1809c. Fixed trap handling code so traps don't inherit a command's temporary
1810 environment.
1811
1812d. Fixed a bug that resulted in incorrect line numbers when a function is
1813 defined as part of another function's execution.
1814
1815e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting
1816 is not performed and $IFS is not the default.
1817
1818f. Fixed a bug that caused ''"$@" to not expand to an empty argument when
1819 there are no positional parameters.
1820
1821g. Fixed a bug that caused a shell compiled without job control to use the
1822 incorrect exit status for builtin commands preceded by a command executed
1823 from the file system that causes the shell to call waitpid().
1824
1825h. Improved word completion for quoted strings containing unterminated command
1826 substitutions with embedded double quotes.
1827
18282. Changes to Readline
1829
1830a. Fixed a bug that caused mode strings to be displayed incorrectly if the
1831 prompt was shorter than the mode string.
1832
18333. New Features in Bash
1834
1835a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
1836 the nounset option is enabled no longer throws an unbound variable error.
1837
18384. New Features in Readline
1839
1840a. New application-callable function: rl_pending_signal(): returns the signal
1841 number of any signal readline has caught but not yet handled.
1842
1843b. New application-settable variable: rl_persistent_signal_handlers: if set
1844 to a non-zero value, readline will enable the readline-6.2 signal handler
1845 behavior in callback mode: handlers are installed when
1846 rl_callback_handler_install is called and removed removed when a complete
1847 line has been read.
1848
1849------------------------------------------------------------------------------
1850This document details the changes between this version, bash-4.4-beta2, and
1851the previous version, bash-4.4-rc1.
1852
18531. Changes to Bash
1854
1855a. Fixed a memory leak when processing ${!var[@]}.
1856
1857b. Fixed a bug that caused subshells to free trap strings associated with
1858 inherited signals.
1859
1860c. Inheriting BASHOPTS from the environment now works to force actions
1861 associated with enabling an option, instead of just marking the option
1862 as enabled.
1863
1864d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
1865 restricted mode.
1866
1867e. Fixed a bug caused by an accidental omission of part of the original patch
1868 for EXECIGNORE.
1869
1870e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
1871
1872f. Fixed a bug that caused parsing errors in command substitutions with
1873 consecutive case statements separated by newlines.
1874
1875g. Updated logic used to decide whether bash is running inside an emacs
1876 terminal emulator to work with future emacs versions.
1877
1878h. Fixed two extended pattern matching bugs caused by premature short-
1879 circuiting.
1880
1881i. Fixed a memory leak in the code that removes duplicate history entries.
1882
1883j. There are a number of bug fixes to coproc, mapfile, declare, unset,
1884 and assignment statements that prevent nameref variables from creating
1885 and unsetting variables with invalid names.
1886
1887k. Fixed a bug that caused variables to be inadvertently marked as both an
1888 associative and an indexed array.
1889
1890l. Fixed a bug that caused `bash -c' to not run a trap specified in the
1891 command string.
1892
1893j. There are a number of bug fixes to coproc, mapfile, declare, and assignment
1894 statements that prevent nameref variables from overwriting or modifying
1895 attributes of readonly variables.
1896
1897k. Fixed a bug that caused command substitution to attempt to set the
1898 terminal's process group incorrectly.
1899
1900l. Fixed a bug that could cause prompt string expansion to display error
1901 messages when the `nounset' shell option is set.
1902
1903m. Fixed a bug that caused "$@" to not expand to an empty string under the
1904 circumstances when Posix says it should ("${@-${@-$@}}").
1905
1906n. Fixed several bugs caused by referencing nameref variables whose values
1907 are names of unset variables (or names that are valid for referencing
1908 but not assignment), including creating variables in the temporary
1909 environment.
1910
1911o. Function tracing and error tracing are disabled if --debugger is supplied
1912 at startup but the shell can't find the debugger start file.
1913
1914p. Fixed a bug when IFS is used as the control variable in a for statement.
1915
1916q. Fixed a bug with SIGINT received by a command substitution in an interactive
1917 shell.
1918
1919r. The checks for nameref variable self-references are more thorough.
1920
1921s. Fixed several bugs with multi-line aliases.
1922
1923t. Fixed `test' to handle the four-argument case where $1 == '(' and
1924 $4 == ')'.
1925
1926u. Fixed a bug in the expansion of $* in the cases where word splitting is
1927 not performed.
1928
1929v. Fixed a bug in execution of case statements where IFS includes the
1930 pattern matching characters.
1931
19322. Changes to Readline
1933
1934a. When refreshing the line as the result of a key sequence, Readline attempts
1935 to redraw only the last line of a multiline prompt.
1936
1937b. Fixed an issue that caused completion of git commands to display
1938 incorrectly when using colored-completion-prefix.
1939
1940c. Fixed several redisplay bugs having to do with multibyte characters and
1941 invisible characters in prompt strings.
1942
19433. New Features in Bash
1944
1945a. Value conversions (arithmetic expansions, case modification, etc.) now
1946 happen when assigning elements of an array using compound assignment.
1947
1948b. There is a new option settable in config-top.h that makes multiple
1949 directory arguments to `cd' a fatal error.
1950
1951c. Bash now uses mktemp() when creating internal temporary files; it produces
1952 a warning at build time on many Linux systems.
1953
19544. New Features in Readline
1955
1956a. The default binding for ^W in vi mode now uses word boundaries specified
1957 by Posix (vi-unix-word-rubout is bindable command name).
1958
1959b. rl_clear_visible_line: new application-callable function; clears all
1960 screen lines occupied by the current visible readline line.
1961
1962c. rl_tty_set_echoing: application-callable function that controls whether
1963 or not readline thinks it is echoing terminal output.
1964
1965d. Handle >| and strings of digits preceding and following redirection
1966 specifications as single tokens when tokenizing the line for history
1967 expansion.
1968
1969e. Fixed a bug with displaying completions when the prefix display length
1970 is greater than the length of the completions to be displayed.
1971
1972f. The :p history modifier now applies to the entire line, so any expansion
1973 specifying :p causes the line to be printed instead of expanded.
1974
1975------------------------------------------------------------------------------
1976This document details the changes between this version, bash-4.4-rc1, and
1977the previous version, bash-4.4-beta.
1978
19791. Changes to Bash
1980
1981a. Fixed several problems with bash completion not special-casing bash syntax
1982 constructs.
1983
1984b. Fixed a bug that caused the mapfile builtin to not create array variables
1985 when a variable of the same name appears in the temporary environment.
1986
1987c. Fixed a bug that caused prompt expansion to loop when PS1 contained a
1988 syntax error.
1989
1990d. Fixed a bug that caused the ${array[@]@A} expansion to split the results
1991 even when double-quoted.
1992
1993e. There is a new implementation of the code that saves the last CHILD_MAX
1994 exited background pids so their status can be queried later.
1995
1996f. Bash-4.4 can now be configured and built on very old versions of Solaris 2.
1997
1998g. Fixed problems with --help support for several builtins.
1999
2000h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited
2001 from the environment.
2002
2003i. Fixed a bug that caused background processes run from non-interactive shells
2004 with job control enabled to place the terminal in the wrong process group
2005 under certain circumstances.
2006
2007j. Fixed a bug that caused `fc' to return an incorrect exit status when
2008 executing commands from the history list.
2009
2010k. Fixed a bug that caused the shell to exit when a process substitution
2011 received a SIGINT when run in certain terminal emulators.
2012
2013l. EXECIGNORE now honors the setting of `extglob' when attempting to match
2014 executable names.
2015
2016m. Fixed a bug where `return' used the wrong exit status when executed in a
2017 DEBUG trap.
2018
2019n. Fixed a bug that caused a command containing a here-document and an escaped
2020 newline to be stored in the history list incorrectly.
2021
2022o. Fixed a bug that caused set -e to be honored in cases of builtins invoking
2023 other builtins when it should be ignored.
2024
2025p. Fixed a bug that caused `readonly' and `export' to create local array
2026 variables when used within shell functions.
2027
2028q. Fixed a bug that allowed subshells begun to execute process substitutions
2029 to have access to the command's temporary environment.
2030
2031r. Fixed a bug that could cause the shell to dump core when receiving a
2032 SIGCHLD for which a trap has been set while running in posix mode.
2033
2034s. Fixed a bug that caused bash to not restore BASH_ARGC, BASH_ARGV,
2035 BASH_SOURCE, BASH_LINENO, and FUNCNAME if the shell received a SIGINT
2036 while reading commands from a file while executing `.'.
2037
2038t. Fixed a bug that caused the `-o history' option to have no effect when
2039 supplied on the command line when starting a new shell.
2040
2041u. Fixed a bug that caused history expansions occurring in command
2042 substitutions to not be performed.
2043
2044v. Fixed a bug that caused `eval' run in a non-interactive shell to disable
2045 history expansion for the remainder of the shell script, even if the script
2046 had previously enabled it.
2047
2048w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set
2049 to the empty string.
2050
2051x. Fixed a bug that caused process and command substitution to inherit output
2052 buffered in the stdio library but not written.
2053
2054y. Fixed a bug that caused a terminating signal received during `echo' to run
2055 an exit trap in a signal handler context.
2056
2057z. Fixed a bug that caused a builtin command containing a process substitution
2058 to return the wrong exit status.
2059
2060aa. Fixed a bug that caused `()' subshells with piped input to incorrectly
2061 redirect the standard input of some of the commands in the subshell from
2062 /dev/null.
2063
2064bb. The history builtin now uses more descriptive error messages for missing or
2065 invalid timestamps.
2066
20672. Changes to Readline
2068
2069a. The history file writing functions only attempt to create and use a backup
2070 history file if the history file exists and is a regular file.
2071
2072b. Fixed an out-of-bounds read in readline's internal tilde expansion
2073 interface.
2074
2075c. Fixed several redisplay bugs with prompt strings containing multibyte
2076 and non-visible characters whose physical length is longer than the screen
2077 width.
2078
2079d. Fixed a redisplay bug with prompt strings containing invisible characters
2080 whose physical length exceeds the screen width and using incremental search.
2081
2082e. Readline prints more descriptive error messages when it encounters errors
2083 while reading an inputrc file.
2084
2085f. Fixed a bug in the character insertion code that attempts to optimize
2086 typeahead when it reads a character that is not bound to self-insert and
2087 resets the key sequence state.
2088
20893. New Features in Bash
2090
2091a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
2092 environment.
2093
2094b. inherit_errexit: a new `shopt' option that, when set, causes command
2095 substitutions to inherit the -e option. By default, those subshells disable
2096 -e. It's enabled as part of turning on posix mode.
2097
2098c. New prompt string: PS0. Expanded and displayed by interactive shells after
2099 reading a complete command but before executing it.
2100
2101d. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to
2102 SIG_DFL when the shell is started, so they are set to SIG_DFL in child
2103 processes.
2104
2105e. Posix-mode shells now allow double quotes to quote the history expansion
2106 character.
2107
2108f. OLDPWD can be inherited from the environment if it names a directory.
2109
2110g. Shells running as root no longer inherit PS4 from the environment, closing
2111 a security hole involving PS4 expansion performing command substitution.
2112
2113h. If executing an implicit `cd' when the `autocd' option is set, bash will
2114 now invoke a function named `cd' if one exists before executing the `cd'
2115 builtin.
2116
21174. New Features in Readline
2118
2119a. If an incremental search string has its last character removed with DEL,
2120 the resulting empty search string no longer matches the previous line.
2121
2122b. If readline reads a history file that begins with `#' (or the value of
2123 the history comment character) and has enabled history timestamps, the
2124 history entries are assumed to be delimited by timestamps. This allows
2125 multi-line history entries.
2126
2127c. Readline now throws an error if it parses a key binding without a
2128 terminating `:' or whitespace.
2129
2130------------------------------------------------------------------------------
2131This document details the changes between this version, bash-4.4-beta, and
2132the previous version, bash-4.4-alpha.
2133
21341. Changes to Bash
2135
2136a. Fixed two bugs that caused out-of-bounds reads when skipping over assignment
2137 statements while finding the word on which to perform programmable
2138 completion.
2139
2140b. Fixed a memory leak in programmable completion.
2141
2142c. Fixed a bug that could cause the shell to crash when interrupting the
2143 wait builtin.
2144
2145d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new
2146 `@' operator.
2147
2148e. Fixed a bug that caused the && and || operators to be incorrectly optimized.
2149
2150f. The shell now undoes redirections before exiting the shell when the `-e'
2151 option is enabled, and a shell function fails.
2152
2153g. History expansion now skips over the history expansion character in command
2154 and process substitution.
2155
2156h. Fixed a bug that caused stray '\001' characters to be added to the output
2157 of `declare -p'.
2158
2159i. Fixed a memory leak when processing declare commands that perform compound
2160 array assignments.
2161
2162j. Fixed a bug that could cause the shell to crash when reading input from a
2163 file and the limit on open file descriptors is high.
2164
2165k. Fixed a bug that caused the ERR and RETURN traps to be unset if they were
2166 set in a shell function but unset previously.
2167
2168l. Fixed a bug that caused several signals to be ignored if `exec' failed in
2169 an interactive shell.
2170
2171m. A posix-mode non-interactive shell now considers a parameter expansion error
2172 to be a fatal error.
2173
2174n. The `time' command now prints timing statistics for failed commands when
2175 the -e option is enabled.
2176
2177o. Fixed a bug that caused the shell to crash when attempting to indirectly
2178 expand a shell variable with an invalid name.
2179
2180p. Fixed a bug that caused the shell to crash when running a trap containing
2181 a process substitution.
2182
2183q. Bash now prints the keyword `function' before a function with the same name
2184 as a reserved word when using `declare -f' to avoid parse errors when
2185 reusing the output as input.
2186
2187r. Fixed a bug that caused the shell to crash when using declare -g to attempt
2188 to redefine an existing global indexed array variable as an associative
2189 array.
2190
2191s. Fixed a memory leak that occurred when interrupting brace expansions
2192 generating a sequence.
2193
2194t. Fixed a bug that resulted in alias expansion in redirections.
2195
2196u. The `declare -a' and `declare -A' commands now print fewer warnings when
2197 attempting to create and initialize an array at the same time, but
2198 relying on word expansions to construct the compound assignment.
2199
2200v. The `help' builtin now behaves better in locales where each wide
2201 character occupies more than one display column.
2202
2203w. The `read' builtin no longer has a possible race condition when a timeout
2204 occurs.
2205
2206x. Fixed several expansion problems encountered when IFS="'".
2207
2208y. Fixed a problem with the expansion of $'\c?'.
2209
2210z. Bash no longer splits the expansion of here-strings, as the documentation
2211 has always said.
2212
2213aa. Bash now puts `s' in the value of $- if the shell is reading from standard
2214 input, as Posix requires.
2215
2216bb. Fixed a bug that caused the shell to crash if invoked with a NULL
2217 environment.
2218
2219cc. The shell now only trusts an inherited value for $PWD if it begins with a
2220 `/'.
2221
2222dd. Fixed a memory leak when creating local array variables and assigning to
2223 them using compound assignment with the `declare' builtin.
2224
2225ee. Fixed a bug that could cause the shell to crash when processing nested here
2226 documents inside a command substitution.
2227
2228ff. Array keys and values are now displayed using $'...' quoting where
2229 appropriate.
2230
2231gg. Fixed a bug that could cause the shell to crash if the replacement string
2232 in pattern substitution was NULL.
2233
2234hh. Fixed a bug that could cause the shell to crash if a command substitution
2235 contained a non-fatal syntax error.
2236
2237ii. Fixed a bug that could cause the shell to crash if variable indirection
2238 resulted in a NULL variable.
2239
2240jj. Fixed a bug that could cause the shell to crash if a long string contained
2241 multiple unterminated parameter expansion constructs.
2242
2243kk. Improved the code that acts on SIGINT received while waiting for a child
2244 process only if the child exits due to SIGINT.
2245
2246ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple
2247 commands.
2248
22492. Changes to Readline
2250
2251a. Colored completion prefixes are now displayed using a different color, less
2252 likely to collide with files.
2253
2254b. Fixed a bug that caused vi-mode character search to misbehave when
2255 running in callback mode.
2256
2257c. Fixed a bug that caused output to be delayed when input is coming from a
2258 macro in vi-mode.
2259
2260d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
2261 a multi-key key sequence via a macro.
2262
2263e. Fixed a bug that caused problems with applications that supply their own
2264 input function when performing completion.
2265
2266f. When read returns -1/EIO when attempting to read a key, return an error
2267 instead of line termination back to the caller.
2268
2269g. Updated tty auditing feature based on patch from Red Hat.
2270
2271h. Fixed a bug that could cause the history library to crash on overflows
2272 introduced by malicious editing of timestamps in the history file.
2273
22743. New Features in Bash
2275
2276a. `make install' now installs the example loadable builtins and a set of
2277 bash headers to use when developing new loadable builtins.
2278
2279b. `enable -f' now attempts to call functions named BUILTIN_builtin_load when
2280 loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows
2281 loadable builtins to run initialization and cleanup code.
2282
2283c. There is a new BASH_LOADABLES_PATH variable containing a list of directories
2284 where the `enable -f' command looks for shared objects containing loadable
2285 builtins.
2286
2287d. The `complete_fullquote' option to `shopt' changes filename completion to
2288 quote all shell metacharacters in filenames and directory names.
2289
2290e. The `kill' builtin now has a `-L' option, equivalent to `-l', for
2291 compatibility with Linux standalone versions of kill.
2292
22934. New Features in Readline
2294------------------------------------------------------------------------------
2295This document details the changes between this version, bash-4.4-alpha, and
2296the previous version, bash-4.3-release.
2297
22981. Changes to Bash
2299
2300a. A bug that caused pipelines to be corrupted while running the DEBUG trap
2301 was fixed.
2302
2303b. A bug that accidentally omitted the `-R' unary operator from `test' was
2304 fixed.
2305
2306c. A bug that could cause the shell to not restore the terminal's process
2307 group on shell exit was fixed.
2308
2309d. Several changes were made to programmable completion to accommodate
2310 assumptions made by the bash-completion package.
2311
2312e. Bash no longer inhibits C-style escape processing ($'...') while performing
2313 pattern substitution word expansions.
2314
2315f. Fixed a bug that caused `return' executed from a trap handler to use the
2316 wrong return status when one was not supplied as an argument.
2317
2318g. In Posix mode, defining a function with the same name as a special
2319 builtin is now an error, fatal only when the shell is not interactive.
2320
2321h. Fixed a bug that caused compound array assignments to discard unset or null
2322 variables used as subscripts, thereby making it appear as if the index was
2323 not present.
2324
2325i. Fixed a bug that caused extended glob patterns to incorrectly match
2326 filenames with a leading `.'.
2327
2328j. Fixed a bug involving sign extension when reallocating the input line
2329 after a history expansion, causing segmentation faults.
2330
2331k. Bash now does a better job at identifying syntax errors during word
2332 completion and tailoring completion appropriately.
2333
8868edaf 2334l. Bash now uses the current locale's decimal point in command timing output.
a0c0a00f
CR
2335
2336m. Fixed a bug that caused segmentation faults while reading here documents if
2337 PS2 contains a command substitution.
2338
2339n. There are several changes to how $@ is expanded when unquoted but in a
2340 context where word splitting is not performed (e.g., on the rhs of an
2341 assignment or in a conditional command).
2342
2343o. Bash now quotes command hash table entries that contain shell metacharacters
2344 when displaying hash table contents.
2345
2346p. Fixed a potential file descriptor leak when dup2() fails while performing a
2347 redirection.
2348
2349q. Fixed a bug that caused directory names evaluated during word completion to
2350 be dequoted twice.
2351
2352r. Fixed several bugs which could result in indirect variable expansion and
2353 namerefs creating variables with invalid names or referencing variables
2354 set to the empty string.
2355
2356s. Fixed a bug that caused bash to not expand $0 in word expansions where it
2357 should.
2358
2359t. Fixed a bug that caused bash to perform process substitution if <(
2360 appeared inside an arithmetic context.
2361
2362u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern
2363 to be confused as directory names.
2364
2365v. Fixed several bugs with treatment of invisible variables (variables with
2366 attributes that are unset because they have never been assigned values).
2367
2368w. Fixed a bug that caused the `read' builtin to not clean up readline's
2369 state when using the -e and -t options together and the read timed out.
2370
2371x. Fixed a bug that caused the shell to exit with the wrong (but non-zero)
2372 value if a command was not found or was not executable.
2373
2374y. Fixed a bug that caused the `time' reserved word to not be recognized as
2375 such in all contexts where it should have been.
2376
8868edaf 2377z. Fixed a bug that caused the shell to close process substitution file
a0c0a00f
CR
2378 descriptors when executing a script without the `#!' leading line.
2379
2380aa. Fixed a typo that caused the `compat42' shell option to set the wrong
2381 compatibility level.
2382
2383bb. The shell now handles process substitution commands with embedded
2384 parentheses the same way as it does when parsing command substitution.
2385
2386cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option
2387 to produce core dumps.
2388
2389dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases
2390 where slashes must be matched explicitly.
2391
2392ee. Fixed a problem with patterns containing `:' in colon-separated variables
2393 like GLOBIGNORE.
2394
2395ff. Fixed a bug that caused indirect variable expansion using indexed arrays to
2396 always use index 0.
2397
2398gg. Fixed a parsing problem that caused quoted newlines immediately following a
2399 command substitution to be mishandled in certain cases.
2400
2401hh. Fixed a potential buffer overflow on systems without locale_charset or the
2402 bash replacement.
2403
2404ii. Fixed a bug that caused background processes to modify the terminal's
2405 process group under certain circumstances.
2406
2407jj. Asynchronous commands now always set $? to 0 and are not affected by
2408 whether or not the command's exit status is being inverted.
2409
2410kk. Fixed a problem that caused a line ending with an escaped newline and
2411 containingh a prior `eval' to be incorrectly parsed.
2412
2413ll. Fixed an issue with programmable completion and `!' in extglob patterns
2414 used as arguments to `compgen -X'.
2415
2416mm. Word completion now treats the two-character token `>|' as requiring
2417 filename expansion.
2418
2419nn. Bash no longer expands tildes in $PATH elements while in Posix mode.
2420
2421oo. Fixed a bug that caused bash to not clean up readline's state, including
2422 the terminal settings, if it received a fatal signal while in a readline()
2423 call (including `read -e' and `read -s').
2424
2425pp. Fixed bug that caused importing shell functions from the environment to
2426 execute additional commands following the function.
2427
2428qq. Fixed a bug that caused the parser to return a lookahead character pushed
2429 back by a previous call, even when on another line.
2430
2431rr. Fixed a bug that caused many here-documents or many nested case statements
2432 to overflow an internal stack.
2433
2434ss. Changed the way bash encodes exported functions for inclusion in the
2435 environment to avoid name collisions with valid variable names and to
2436 indicate that they are exported functions.
2437
2438tt. Fixed a bug that could result in an invalid memory access when processing
2439 a here document delimited by end of file or end of string.
2440
2441uu. Fixed a bug that could cause an invalid memory access if a command was run
2442 before initializing the job control framework.
2443
2444vv. When in Posix mode, bash prints shell function definitions as Posix
2445 specifies them, without the leading `function' keyword.
2446
2447ww. The variable attribute display builtins no longer display variables with
2448 invalid names that were imported from the environment.
2449
2450xx. Fixed a bug that could allow `break' or `continue' executed from shell
2451 functions to affect loops running outside of the function.
2452
2453yy. Fixed a bug that could cause a restricted shell to attempt to import shell
2454 functions from the environment.
2455
2456zz. The shell now allows double-quoted identifiers in arithmetic expressions.
2457
2458aaa. Fixed a bug that could allow scalar variables subscripted using [@] in
2459 word expansions to be incorrectly quoted.
2460
2461bbb. The shell now makes sure to ignore SIGTSTP/SIGTTIN/SIGTTOU in child
2462 processes if they were ignored at shell startup, even if job control is
2463 in effect.
2464
2465ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to
2466 the empty string.
2467
2468ddd. Posix says that expanding $* in a pattern context where the expansion is
2469 double-quoted should not treat $* as if it were double quoted.
2470
2471eee. Bash now restores getopts' internal state between calls to getopts even if
2472 a shell function declares a local copy of OPTIND.
2473
2474fff. Fixed a bug that could cause `history -r' or `history -n' to read identical
2475 lines from the history file more than once.
2476
2477ggg. The commands executed by `bind -x' now redisplay at most the final line
2478 of a multi-line prompt, and those commands may return 124 to indicate that
2479 the entire prompt should be redrawn.
2480
2481hhh. Fixed a bug that could cause `mapfile' to create variables with invalid
2482 names.
2483
2484iii. The shell only goes into debugging mode when --debugger is supplied if
2485 the debugger initialization file is present.
2486
2487jjj. Fixed a bug that disallowed an assignment to (implicit) subscript 0 of an
2488 existing array in a declare command that set the readonly attribute.
2489
2490kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable
2491 its special status.
2492
2493lll. Appending to an existing array variable using the compound assignment
2494 syntax (var+=(aaa)) should not affect assignments to existing subscripts
2495 appearing in the compound assignment.
2496
2497mmm. Fixed a bug that could cause the shell to crash when a variable with a
2498 null value was passed in the temporary environment and the variable's
2499 attributes are modified using `declare' while performing a redirection.
2500
2501nnn. Fixed a bug in printf so that a missing precision specifier after a `.'
2502 is treated as 0.
2503
2504ooo. Fixed a bug that attempted to use the internal command timing to time
2505 pipeline components if the pipeline elements are separated by newlines.
2506
2507ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase
2508 the values on assignment.
2509
2510qqq. Bash does a better job of determining whether or not files are executable
2511 when running on Windows, since the X_OK flag to access(2) is not supported.
2512
2513rrr. Fixed a bug that caused some of the shell's internal traps (e.g., ERR) to
2514 be interrupted (and leave incorrect state) by pending SIGINTs.
2515
2516sss. Fixed a bug in the bash interface to history expansion to avoid attempting
2517 expansion if the history expansion character occurs in a command
2518 substitution.
2519
2520ttt. Fixed a bug that caused the select command to crash if the REPLY variable
2521 ends up empty (e.g., if it's made readonly)
2522
2523uuu. Bash handles backslash-quoting of multibyte characters better when quoting
2524 output that is intended to be reused.
2525
2526vvv. System-specific changes for: Windows, Cygwin.
2527
2528www. Fixes for upper and lower-casing multibyte characters, some locales have
2529 characters whose upper and lowercase versions have different numbers of
2530 bytes.
2531
2532xxx. Fixed a bug that caused the ERR trap in a shell function to have the
2533 wrong value for $LINENO.
2534
2535yyy. Fixed a bug that resulted in incorrect quoting of regexps for the =~
2536 operator when an open brace appears without a close brace.
2537
2538zzz. Fixed a bug in the array unset operation that caused it to attempt to
2539 parse embedded single and double quotes.
2540
2541aaaa. Fixed a bug that caused $* to not expand with the first character of
2542 $IFS as a separator in a context where word splitting will not take
2543 place.
2544
2545bbbb. Fixed two bugs that could cause the shell to dereference a null pointer
2546 while attempting to print an error message from arithmetic expansion.
2547
2548cccc. Fixed a bug that resulted in short-circuited evaluation when reading
2549 commands from a string ending in an unquoted backslash, or when sourcing
2550 a file that ends with an unquoted backslash.
2551
2552dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up
2553 any FIFOs created by process substitution.
2554
2555eeee. If the -T option is not set, allow the source builtin and shell functions
2556 to set a DEBUG trap that persists after the sourced file or function
2557 returns, instead of restoring the old (unset) value unconditionally.
2558
2559ffff. Fixed a bug that caused redirections to not be undone on some syntax
2560 errors, e.g., when parsing a command substitution.
2561
2562gggg. Bash only adds asynchronous commands to the table of background pids
2563 whose status it remembers, to avoid it growing too large during scripts
2564 that create and reap large numbers of child processes. This means that
2565 `wait' no longer works on synchronous jobs, but $? can be used to get
2566 the exit status in those cases.
2567
2568hhhh. Bash now checks whether or not a shell script argument is a directory
2569 before trying to open it; Posix says implementations may allow open(2)
2570 on a directory.
2571
2572iiii. Fixed a bug that could cause the shell to set the terminal's process
2573 group to a background process group when running as part of a pipeline.
2574
2575jjjj. Made a few changes to strings to avoid possible potential negative effects
2576 caused by malicious translations.
2577
2578kkkk. Fixed a bug that caused the `unset' builtin to continue to treat its
2579 arguments as functions after unsetting a function when invoked with no
2580 options.
2581
2582llll. Fixed a bug that would not replace empty strings using pattern
2583 substitution even if the pattern matched the empty string.
2584
2585mmmm. Fixed a bug with word completion that prevented some characters from
2586 being backslash-quoted (backquote, dollar sign).
2587
2588nnnn. Fixed a bug that prevented a command from the history re-executed by the
2589 `fc' builtin from setting verbose mode.
2590
2591oooo. Fixed a bug that caused the shell to not enable and disable function
2592 tracing with changes to the `extdebug' shell option.
2593
2594pppp. Fixed a bug that caused assignments to nameref variables pointing to
2595 unset variables with attributes but no values to create variables with
2596 incorrect names.
2597
2598qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to
2599 unset the wrong variable under certain circumstances.
2600
2601rrrr. Fixed a bug that caused close braces occurring in brace expansions within
2602 command substitutions to incorrectly terminate parameter expansions.
2603
2604ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH.
2605
2606tttt. Fixed a bug that caused interactive shells compiled without job control
2607 to return incorrect status values for child processes when running a
2608 single command that creates enough children to use the entire PID space.
2609
2610uuuu. `esac' should not be recognized as a reserved word when it appears as the
2611 second or later pattern in a case statement pattern list.
2612
2613vvvv. Fixed a bug that caused the completion code to read past the end of the
2614 readline line buffer while skipping assignment statements to find the
2615 command name.
2616
2617wwww. Fixed a bug that caused case statements within loops contained in a
2618 command substitution to be parsed incorrectly.
2619
2620xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after
2621 running `wait' with no arguments and interrupting it with ^C without
2622 a trap handler installed.
2623
26242. Changes to Readline
2625
2626a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
2627 commands with modifiers was fixed.
2628
2629b. Fixed a bug that caused callback mode to dump core when reading a
2630 multiple-key sequence (e.g., arrow keys).
2631
2632c. Fixed a bug that caused the redisplay code to erase some of the line when
2633 using horizontal scrolling with incremental search.
2634
2635d. Readline's input handler now performs signal processing if read(2) is
2636 interrupted by SIGALRM or SIGVTALRM.
2637
2638e. Fixed a problem with revert-all-at-newline freeing freed memory.
2639
2640f. Clarified the documentation for the history_quotes_inhibit_expansion
2641 variable to note that it inhibits scanning for the history comment
2642 character and that it only affects double-quoted strings.
2643
2644g. Fixed an off-by-one error in the prompt printed when performing searches.
2645
2646h. Use pselect(2), if available, to wait for input before calling read(2), so
2647 a SIGWINCH can interrupt it, since it doesn't interrupt read(2).
2648
2649i. Some memory leaks caused by signals interrupting filename completion have
2650 been fixed.
2651
2652j. Reading EOF twice on a non-empty line causes EOF to be returned, rather
2653 than the partial line. This can cause partial lines to be executed on
2654 SIGHUP, for example.
2655
2656k. Fixed a bug concerning deleting multibyte characters from the search
2657 string while performing an incremental search.
2658
2659l. Fixed a bug with tilde expanding directory names in filename completion.
2660
2661m. Fixed a bug that did not allow binding sequences beginning with a `\'.
2662
2663n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
2664 contains a multibyte character in the last screen column.
2665
2666o. Fixed a bug that caused history expansion to disregard characters that are
2667 documented to delimit a history event specifier without requiring `:'.
2668
2669p. Fixed a bug that could cause reading past the end of a string when reading
2670 the value when binding the set of isearch terminators.
2671
2672q. Fixed a bug that caused readline commands that depend on knowing which
2673 key invoked them to misbehave when dispatching key sequences that are
2674 prefixes of other key bindings.
2675
2676r. Paren matching now works in vi insert mode.
2677
26783. New Features in Bash
2679
2680a. There is now a settable configuration #define that will cause the shell
2681 to exit if the shell is running setuid without the -p option and setuid
2682 to the real uid fails.
2683
2684b. Command and process substitutions now turn off the `-v' option when
2685 executing, as other shells seem to do.
2686
2687c. The default value for the `checkhash' shell option may now be set at
2688 compile time with a #define.
2689
2690d. The `mapfile' builtin now has a -d option to use an arbitrary character
2691 as the record delimiter, and a -t option to strip the delimiter as
2692 supplied with -d.
2693
2694e. The maximum number of nested recursive calls to `eval' is now settable in
2695 config-top.h; the default is no limit.
2696
2697f. The `-p' option to declare and similar builtins will display attributes for
2698 named variables even when those variables have not been assigned values
2699 (which are technically unset).
2700
2701g. The maximum number of nested recursive calls to `source' is now settable
2702 in config-top.h; the default is no limit.
2703
2704h. All builtin commands recognize the `--help' option and print a usage
2705 summary.
2706
2707i. Bash does not allow function names containing `/' and `=' to be exported.
2708
2709j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
2710
2711k. The shell now allows `time ; othercommand' to time null commands.
2712
2713l. There is a new `--enable-function-import' configuration option to allow
2714 importing shell functions from the environment; import is enabled by
2715 default.
2716
2717m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
2718 had been executed.
2719
2720n. GLOBIGNORE, the pattern substitution word expansion, and programmable
2721 completion match filtering now honor the value of the `nocasematch' option.
2722
2723o. There is a new ${parameter@spec} family of operators to transform the
2724 value of `parameter'.
2725
2726p. Bash no longer attempts to perform compound assignment if a variable on the
2727 rhs of an assignment statement argument to `declare' has the form of a
2728 compound assignment (e.g., w='(word)' ; declare foo=$w); compound
2729 assignments are accepted if the variable was already declared as an array,
2730 but with a warning.
2731
2732q. The declare builtin no longer displays array variables using the compound
2733 assignment syntax with quotes; that will generate warnings when re-used as
2734 input, and isn't necessary.
2735
2736r. Executing the rhs of && and || will no longer cause the shell to fork if
2737 it's not necessary.
2738
2739s. The `local' builtin takes a new argument: `-', which will cause it to save
2740 the single-letter shell options and restore their previous values at
2741 function return.
2742
2743t. `complete' and `compgen' have a new `-o nosort' option, which forces
2744 readline to not sort the completion matches.
2745
2746u. Bash now allows waiting for the most recent process substitution, since it
2747 appears as $!.
2748
2749v. The `unset' builtin now unsets a scalar variable if it is subscripted with
2750 a `0', analogous to the ${var[0]} expansion.
2751
2752w. `set -i' is no longer valid, as in other shells.
2753
2754x. BASH_SUBSHELL is now updated for process substitution and group commands
2755 in pipelines, and is available with the same value when running any exit
2756 trap.
2757
2758y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
2759 not bash is being run in a GNU Emacs shell window.
2760
2761z. Bash now treats SIGINT received when running a non-builtin command in a
2762 loop the way it has traditionally treated running a builtin command:
2763 running any trap handler and breaking out of the loop.
2764
2765aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
2766 cause matching filenames to be ignored when searching for commands.
2767
2768bb. Aliases whose value ends in a shell metacharacter now expand in a way to
2769 allow them to be `pasted' to the next token, which can potentially change
2770 the meaning of a command (e.g., turning `&' into `&&').
2771
27724. New Features in Readline
2773
8868edaf 2774a. The history truncation code now uses the same error recovery mechanism as
a0c0a00f
CR
2775 the history writing code, and restores the old version of the history file
2776 on error. The error recovery mechanism handles symlinked history files.
2777
2778b. There is a new bindable variable, `enable-bracketed-paste', which enables
2779 support for a terminal's bracketed paste mode.
2780
2781c. The editing mode indicators can now be strings and are user-settable
2782 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
2783 variables). Mode strings can contain invisible character sequences.
2784 Setting mode strings to null strings restores the defaults.
2785
2786d. Prompt expansion adds the mode string to the last line of a multi-line
2787 prompt (one with embedded newlines).
2788
2789e. There is a new bindable variable, `colored-completion-prefix', which, if
2790 set, causes the common prefix of a set of possible completions to be
2791 displayed in color.
2792
2793f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
2794 mode yank-pop.
2795
2796g. The redisplay code underwent several efficiency improvements for multibyte
2797 locales.
2798
2799h. The insert-char function attempts to batch-insert all pending typeahead
2800 that maps to self-insert, as long as it is coming from the terminal.
2801
2802i. rl_callback_sigcleanup: a new application function that can clean up and
2803 unset any state set by readline's callback mode. Intended to be used
2804 after a signal.
2805
2806------------------------------------------------------------------------------
ac50fbac
CR
2807This document details the changes between this version, bash-4.3-release, and
2808the previous version, bash-4.3-rc2.
2809
28101. Changes to Bash
2811
2812a. Only Posix-mode shells should exit on an assignment failure in the
2813 temporary environment preceding a special builtin. This is how it's been
2814 documented.
2815
2816b. Fixed a bug that caused a failed special builtin to not exit a posix-mode
2817 shell if the failing builtin was on the LHS of a && or ||.
2818
2819c. Changed the handling of unquoted backslashes in regular expressions to be
2820 closer to bash-4.2.
2821
2822d. globstar (**) no longer traverses symbolic links that resolve to
2823 directories. This eliminates some duplicate entries.
2824
2825e. Fixed a bug that caused a SIGCHLD trap handler to not be able to change the
2826 SIGCHLD disposition.
2827
2828f. Fixed a bug that caused a crash when -x was enabled and a command
2829 contained a printable multibyte (wide) character.
2830
2831g. Fixed a bug that caused an interactive shell without line editing enabled
2832 to read invalid data after receiving a SIGINT.
2833
2834h. Fixed a bug that caused command word completion to fail if the directory in
2835 $PATH where the completion would be found contained single or double quotes.
2836
2837i. Fixed a bug that caused a shell with -v enabled to print commands in $()
2838 multiple times.
2839
28402. Changes to Readline
2841
2842a. Fixed a bug that caused `undo' to reference freed memory or null pointers.
2843
28443. New Features in Bash
2845
2846a. The [[ -v ]] option now understands array references (foo[1]) and returns
2847 success if the referenced element has a value.
2848
2849------------------------------------------------------------------------------
2850This document details the changes between this version, bash-4.3-rc2, and the
2851previous version, bash-4.3-rc1.
2852
28531. Changes to Bash
2854
2855a. Fixed a bug that left variables set by printf -v marked as invisible.
2856
2857b. Fixed an off-by-one error in a job control warning message.
2858
2859c. Fixed a bug that caused the shell to crash after declaring a nameref variable
2860 without a value.
2861
2862d. Fixed a bug that caused asynchronous commands to not set $? correctly.
2863
2864e. Fixed a bug that caused out-of-order execution when executing aliases with
2865 embedded newlines containing `.' commands.
2866
2867f. Fixed a bug that caused error messages generated by expansion errors in
2868 `for' commands to have the wrong line number.
2869
2870g. Fixed a bug that caused the `wait' builtin to not be interruptible in an
2871 interactive shell with job control enabled.
2872
2873h. Fixed a bug that caused SIGINT and SIGQUIT to not be trappable in
2874 asynchronous subshell commands.
2875
2876i. Bash now requires that the value assigned to a nameref variable be a valid
2877 shell identifier (variable name or array reference).
2878
2879j. Converting an existing variable to a nameref variable now turns off the
2880 -i/-l/-u/-c attributes.
2881
2882k. Displaying a nameref variable with `declare -p' now displays the nameref
2883 variable and its value rather than following the nameref chain.
2884
2885l. Fixed a problem with interrupt handling that caused a second and subsequent
2886 SIGINT to be ignored by interactive shells.
2887
2888m. Fixed a bug that caused certain positional parameter and array expansions
2889 to mishandle (discard) null positional parameters and array elements.
2890
2891n. The shell no longer blocks receipt of signals while running trap handlers
2892 for those signals, and allows most trap handlers to be run recursively
2893 (running trap handlers while a trap handler is executing).
2894
2895o. The shell now handles backslashes in regular expression arguments to the
2896 [[ command's =~ operator slightly differently, resulting in more
2897 consistent behavior.
2898
28992. Changes to Readline
2900
2901a. Fixed a bug that could cause readline to crash and seg fault attempting to
2902 expand an empty history entry.
2903
2904b. Fixed a bug that caused a bad entry in the $LS_COLORS variable to abort all
2905 color processing but leave color enabled.
2906
2907c. Fixed a bug that caused display problems with multi-line prompts containing
2908 invisible characters on multiple lines.
2909
2910d. Fixed a bug that caused effects made by undoing changes to a history line to
2911 be discarded.
2912
29133. New Features in Bash
2914
29154. New Features in Readline
2916
2917a. When creating shared libraries on Mac OS X, the pathname written into the
2918 library (install_name) no longer includes the minor version number.
2919------------------------------------------------------------------------------
2920This document details the changes between this version, bash-4.3-rc1, and the
2921previous version, bash-4.3-beta2.
2922
29231. Changes to Bash
2924
2925a. Fixed a bug in bash completion that caused a tilde to be expanded even if
2926 the `direxpand' option was not enabled.
2927
2928b. Fixed a potential bug that could cause corrupted input in interactive shells
2929 running without line editing and with `ignoreeof' enabled.
2930
2931c. Fixed a bug that could cause failures when opening pipes back to shells
2932 created to run process substitutions.
2933
2934d. Fixed a bug that caused an assignment to TEXTDOMAIN to require TEXTDOMAINDIR
2935 to be set in order to actually change the current text domain.
2936
2937e. Changed the way redirections are printed to avoid confusion when the target
2938 of an output redirection is a process substitution beginning with `>'.
2939
29402. Changes to Readline
2941
2942a. Shared library building is now supported on Mac OS X 10.9 (Darwin 13).
2943
29443. New Features in Bash
2945
2946a. `cd' has a new `-@' option to browse a file's extended attributes on
2947 systems that support O_XATTR.
2948
29494. New Features in Readline
2950
2951a. There are additional default key bindings for MinGW32
2952
2953------------------------------------------------------------------------------
2954This document details the changes between this version, bash-4.3-beta2, and the
2955previous version, bash-4.3-beta.
2956
29571. Changes to Bash
2958
2959a. Fixed a bug that caused assignment to an unset variable using a negative
2960 subscript to result in a segmentation fault.
2961
2962b. Fixed a bug that caused assignment to a string variable using a negative
2963 subscript to use the incorrect index.
2964
2965c. Fixed a bug that caused some strings to be interpreted as invalid
2966 extended globbing expressions when used with the help builtin.
2967
2968d. Fixed a bug that caused an attempt to trap a signal whose disposition
2969 cannot be changed to reference uninitialized memory.
2970
2971e. Command completion now skips assignment statements preceding a command
2972 name and completes the command.
2973
2974f. Fixed a bug that caused `compgen -f' in a non-interactive shell to dump
2975 core under certain circumstances.
2976
2977g. Fixed a bug that caused the `read -N' to misbehave when the input stream
2978 contains 0xff.
2979
29802. Changes to Readline
2981
2982a. Changed message when an incremental search fails to include "failed" in
2983 the prompt and display the entire search string instead of just the last
2984 matching portion.
2985
2986b. Fixed a bug that caused an arrow key typed to an incremental search prompt
2987 to process the key sequence incorrectly.
2988
2989c. Additional key bindings for arrow keys on MinGW.
2990
29913. New Features in Bash
2992
2993a. The help builtin now attempts substring matching (as it did through
2994 bash-4.2) if exact string matching fails.
2995
2996b. The fc builtin now interprets -0 as the current command line.
2997
2998c. Completing directory names containing shell variables now adds a trailing
2999 slash if the expanded result is a directory.
3000
30014. New Features in Readline
3002
3003a. rl_change_environment: new application-settable variable that controls
3004 whether or not Readline modifies the environment (currently readline
3005 modifies only LINES and COLUMNS).
3006
3007------------------------------------------------------------------------------
3008This document details the changes between this version, bash-4.3-beta, and the
3009previous version, bash-4.3-alpha.
3010
30111. Changes to Bash
3012
3013a. Fixed a bug in the prompt directory name "trimming" code that caused
3014 memory corruption and garbled the results.
3015
3016b. Fixed a bug that caused single quotes that resulted from $'...' quoting
3017 in the replacement portion of a double-quoted ${word/pat/rep} expansion
3018 to be treated as quote characters.
3019
3020c. Fixed a bug that caused assignment statements preceding a command word to
3021 result in assignment statements following a declaration command to not be
3022 expanded like assignment statements.
3023
3024d. Fixed a bug with variable search order in the presence of local variables
3025 with the same name as variables in the temporary environment supplied to
3026 a shell function.
3027
3028e. Fixed a bug that caused constructs like 1<(2) to be interpreted as process
3029 substitutions even in an arithmetic context.
3030
3031f. Fixed several cases where `invisible' variables (variables with attributes
3032 but no values, which are technically unset) were treated incorrectly.
3033
3034g. Fixed a bug that caused group commands in pipelines that were not the
3035 last element to not run the EXIT trap.
3036
3037h. Fixed a bug that caused `unset -n' to not unset a nameref variable in
3038 certain cases.
3039
3040i. Fixed the nameref circular reference checking to be less strict and only
3041 disallow a nameref variable with the same value as its name at the global
3042 scope.
3043
3044j. Fixed a bug that caused trap handlers to be executed recursively,
3045 corrupting internal data structures.
3046
3047k. Fixed a bug that could result in bash not compiling if certain options were
3048 not enabled.
3049
3050l. Fixed a bug that caused the arithmetic expansion code to attempt variable
3051 assignments when operator precedence prohibited them.
3052
3053m. Word expansions like ${foo##bar} now understand indirect variable references.
3054
3055n. Fixed a bug that caused `declare -fp name' to not display a function
3056 definition.
3057
3058o. Fixed a bug that caused asynchronous child processes to modify the stdin
3059 file pointer when bash was using it to read a script, which modified the
3060 parent's value as well.
3061
30622. Changes to Readline
3063
3064a. Fixed a bug in vi mode that caused the arrow keys to set the saved last
3065 vi-mode command to the wrong value.
3066
3067b. Fixed a bug that caused double-quoted strings to be scanned incorrectly
3068 when being used as the value of a readline variable assignment.
3069
3070c. Fixed a bug with vi mode that prevented `.' from repeating a command
3071 entered on a previous line (command).
3072
3073d. Fixed a bug that could cause completion to core dump if it was interrupted
3074 by a signal.
3075
3076e. Readline now sends the meta-key enable string to the terminal if the
3077 terminal has been successfully initialized.
3078
3079f. Readline now calls the signal hook after resizing the terminal when it
3080 receives a SIGWINCH.
3081
3082g. Fixed a bug that could cause the history list code to perform an out-of-
3083 bounds array reference if the history list is empty.
3084
30853. New Features in Bash
3086
3087a. Shells started to run process substitutions now run any trap set on EXIT.
3088
3089b. There is now a configure-time option to enable the globasciiranges option
3090 by default.
3091
3092c. The read builtin now checks its first variable argument for validity before
3093 trying to read any input.
3094
3095------------------------------------------------------------------------------
3096This document details the changes between this version, bash-4.3-alpha,
3097and the previous version, bash-4.2-release.
3098
30991. Changes to Bash
3100
3101a. Fixed several bugs concerning incomplete bracket expressions in filename
3102 generation (globbing) patterns.
3103
3104b. Fixed a bug with single quotes and WORD in ${param op WORD} when running
3105 in Posix mode.
3106
3107c. Fixed a bug that caused the pattern removal and pattern substitution word
3108 expansions and case statement word expansion to not match the empty string.
3109
3110d. Fixed a bug that caused the tzset() function to not work after changing
8868edaf 3111 the TZ environment variable.
ac50fbac
CR
3112
3113e. Fixed a bug that caused the RHS of an assignment statement to undergo
3114 word splitting when it contained an unquoted $@.
3115
3116f. Fixed bugs that caused the shell to not react to a SIGINT sent while
3117 waiting for a child process to exit.
3118
3119g. Bash doesn't try to run things in a signal handler context when it gets a
3120 signal (SIGINT/SIGHUP/etc) while reading input using readline but still
3121 be responsive to terminating signals.
3122
3123h. Fixed a bug that caused bash to go into an infinite loop if a filename
3124 to be matched contained an invalid multibyte character.
3125
3126i. Fixed a bug that caused PS4 to end up being truncated if it is longer
3127 than 128 bytes.
3128
3129j. Fixed a bug that caused brace expansion to not skip over double-quoted
3130 command substitution.
3131
3132k. System-specific updates for: DJGPP, HP/UX, Mac OS X
3133
3134l. Fixed a bug in displaying commands that caused redirections to be associated
3135 with the wrong part of the command.
3136
3137m. Fixed the coproc cleanup to unset the appropriate shell variables when a
3138 coproc terminates.
3139
3140n. Fixed a bug that caused `fc' to dump core due to incorrect calculation of
3141 the last history entry.
3142
3143o. Added workarounds for FreeBSD's implementation of faccessat/eaccess and
3144 `test -x'.
3145
3146p. Fixed a bug that caused the shell to not match patterns containing
3147 control-A.
3148
3149q. Fixed a bug that could result in doubled error messages when the `printf'
3150 builtin got a write error.
3151
3152r. Fixed a bug that caused the shell to not correctly expand words containing
3153 multiple consecutive quoted empty strings (""""""aa).
3154
3155s. Fixed a bug that caused the shell to not correctly parse multi-line
3156 process substitutions containing comments and quoted strings.
3157
3158t. Fixed a problem with the bash malloc's internal idea of the top of the
3159 memory heap that resulted in incorrect decisions to try to reduce the
3160 break and give memory back to the kernel.
3161
8868edaf 3162u. There are changes to the expansions performed on compound array assignments,
ac50fbac
CR
3163 in an effort to make foo=( [ind1]=bar [ind2]=baz ) identical to
3164 foo[ind1]=bar foo[ind2]=baz.
3165
3166v. Bash now reports an error if `read -a name' is used when `name' is an
3167 existing associative array.
3168
3169w. Fixed a bug that allowed an attempted assignment to a readonly variable
3170 in an arithmetic expression to not return failure.
3171
3172x. Fixed several bugs that caused completion functions to be invoked even when
3173 the cursor was before the first word in the command.
3174
3175y. Fixed a bug that caused parsing a command substitution to overwrite the
3176 parsing state associated with the complete input line.
3177
3178z. Fixed several bugs with the built-in snprintf replacement and field widths
3179 and floating point.
3180
3181aa. Fixed a bug that caused incorrect offset calculations and input buffer
3182 corruption when reading files longer than 2^31 bytes.
3183
3184bb. Fixed several bugs where bash performed arithmetic evaluation in contexts
3185 where evaluation is suppressed.
3186
3187cc. Fixed a bug that caused bash to close FIFOs used for process substitution
3188 too early when a shell function was executing, but protect against using
3189 all file descriptors when the shell functions are invoked inside loops.
3190
3191dd. Added checks for printable (and non-printable) multibyte characters for
3192 use in error messages.
3193
3194ee. Fixed a bug that caused ^O (operate-and-get-next) to not work correctly
3195 at the end of the history list.
3196
3197ff. Fixed a bug that caused command-oriented history to incorrectly combine
3198 here documents into one line.
3199
3200gg. Fixed a bug that caused importing SHELLOPTS from the environment into a
3201 Posix-mode shell to print an error message and refuse to parse it.
3202
3203hh. Fixed a bug that caused the shell to delete an extra history entry when
3204 using `history -s'.
3205
3206ii. Fixed a bug that caused floating-point exceptions and overflow errors
3207 for the / and % arithmetic operators when using INTMAX_MIN and -1.
3208
3209jj. Fixed a bug that caused parsing errors when reading an arithmetic for
3210 loop inside a command substitution.
3211
3212kk. Fixed a bug that caused a readonly function to be unset when unset was
3213 called without the -f or -v option.
3214
3215ll. Fixed several bugs in the code that quotes characters special to regular
3216 expressions when used in a quoted string on the RHS of the =~ operator
3217 to the [[ command.
3218
3219mm. Fixed a bug that caused redirections to fail because the file descriptor
3220 limit was set to a value less than 10.
3221
3222nn. Fixed a bug that caused the `read' builtin to execute code in a signal
3223 handler context if read timed out.
3224
3225oo. Fixed a bug that caused extended globbing patterns to not match files
3226 beginning with `.' correctly when a `.' was explicitly supplied in the
3227 pattern.
3228
3229pp. Fixed a bug that caused key sequences longer than two characters to not
3230 work when used with `bind -x'.
3231
3232qq. Fixed a bug that resulted in redefined functions having the wrong source
3233 file names in BASH_SOURCE.
3234
3235rr. Fixed a bug that caused the read builtin to assign null strings to variables
3236 when using `read -N', which caused core dumps when referenced
3237
3238ss. Fixed a bug that caused `bash -m script' to not enable job control while
3239 running the script.
3240
3241tt. Fixed a bug that caused `printf -v var' to dump core when used with the
3242 %b format code.
3243
3244uu. Fixed a bug that caused the shell to exit with the wrong status if -e was
3245 active and the shell exited on a substitution error.
3246
3247vv. Fixed a bug that caused the shell to seg fault if an array variable with
3248 the same name as an existing associative array was implicitly created by
3249 an assignment (declare a[n]=b).
3250
3251ww. Fixed a bug that caused a redirection to misbehave if the number specified
3252 for a file descriptor overflows an intmax_t.
3253
3254xx. Fixed several bugs with the handling of valid and invalid unicode character
3255 values when used with the \u and \U escape sequences to printf and $'...'.
3256
3257yy. Fixed a bug that caused tildes to not be escaped in expanded filenames,
3258 making them subject to later expansion.
3259
3260zz. When using the pattern substitution word expansion, bash now runs the
3261 replacement string through quote removal, since it allows quotes in that
3262 string to act as escape characters. This is not backwards compatible, so
3263 it can be disabled by setting the bash compatibility mode to 4.2.
3264
3265aaa. Fixed the rest of the cases where the shell runs non-allowed code in a
3266 signal handler context.
3267
3268bbb. Fixed a bug that caused spurious DEL characters (\177) to appear in
3269 double-quoted expansion where the RHS is evaluated to the empty string.
3270
3271ccc. Fixed a bug that caused the use of the shell's internal random number
3272 generator for temporary file names to perturb the random number
3273 sequence.
3274
3275ddd. Fixed several bugs that caused `declare -g' to not set the right global
3276 variables or to misbehave when declaring global indexed arrays.
3277
3278eee. Fixed a logic bug that caused extended globbing in a multibyte locale to
3279 cause failures when using the pattern substititution word expansions.
3280
3281fff. Fixed a bug that caused the `lastpipe' option to corrupt the file
3282 descriptor used to read the script.
3283
3284ggg. Fixed a bug that causes the shell to delete DEL characters in the
3285 expanded value of variables used in the same quoted string as variables
3286 that expand to nothing.
3287
3288hhh. Fixed a bug that caused the shell to assign the wrong value from an
3289 assignment like (( x=7 )) when `x' was an existing array variable.
3290
3291iii. Fixed a bug that caused the shell to misbehave when generating sequences
3292 and the boundary values overflow an intmax_t.
3293
3294jjj. Fixed a bug caused expansion errors if an expansion of "$@" appeared
3295 next to another expansion (e.g.. "${@}${x}").
3296
3297kkk. Fixed a potential buffer overflow bug when performing /dev/fd expansion.
3298
3299lll. Fixed a bug that resulted in an extra semicolon being added to compound
3300 assignments when they were added to the history list.
3301
3302mmm. Fixed a bug that caused mapfile to read one extra line from the input.
3303
3304nnn. Fixed a bug that caused the mail checking code to use uninitialized
3305 values.
3306
3307ooo. Fixed a bug that prevented history timestamps from being saved if the
3308 history comment character is unset.
3309
3310ppp. Fixed a bug that caused the case-modifying expansions to not work with
3311 multibyte characters.
3312
3313qqq. Fixed a bug that caused the edit-and-execute bindable readline command
3314 to see the wrong data if invoked in the middle of a multi-line quoted
3315 string.
3316
3317rrr. Fixed a bug that resulted in the shell returning the wrong exit status
3318 for a background command on systems that recycle PIDs very quickly.
3319
3320sss. Fixed a bug that caused asynchronous group commands to not run any EXIT
3321 trap defined in the body of the command.
3322
3323ttt. Fixed a bug that caused `eval "... ; return"' to not clean up properly.
3324
3325uuu. Fixed a bug that caused the shell to dump core if `read' reads an escaped
3326 IFS whitespace character.
3327
3328vvv. Fixed a bug that caused BASH_COMMAND to be set to an incorrect value when
3329 executing a (...) subshell.
3330
3331www. Fixed a couple of pointer aliasing bugs with the token string in arithmetic
3332 evaluation.
3333
3334xxx. Fixed a bug with parsing multi-line command substitutions when reading
3335 the `do' keyword followed by whitespace.
3336
3337yyy. Fixed a bug that caused the shell to seg fault if the time given to the
3338 printf %(...)T format overflowed the value accepted by localtime(3).
3339
3340zzz. Fixed a problem with displaying help topics in two columns when the
3341 translated text contained multibyte characters.
3342
3343aaaa. Fixed a bug with the extended globbing pattern matcher where a `*' was
3344 followed by a negated extended glob pattern.
3345
3346bbbb. Fixed a race condition with short-lived coproc creation and reaping that
3347 caused the child process to be reaped before the various coproc shell
3348 variables were initialized.
3349
3350cccc. Fixed a bug where turning off `errexit' in command substitution subshells
3351 was not reflected in $SHELLOPTS.
3352
3353dddd. Partially fixed an inconsistency in how the shell treated shell
3354 functions run from an EXIT trap.
3355
3356eeee. Fixed a bug in how the shell invalidated FIFOs used for process
3357 substitution when executing a pipeline (once rather than in every child).
3358
3359ffff. Fixed a bug that occurred when expanding a special variable ($@, $*)
3360 within double quotes and the expansion resulted in an empty string.
3361
3362gggg. Fixed bugs with executing a SIGCHLD trap handler to make sure that it's
3363 executed once per exited child.
3364
3365hhhh. Fixed a bug that caused `declare' and `test' to find variables that
3366 had been given attributes but not assigned values. Such variables are
3367 not set.
3368
3369iiii. Fixed a bug that caused commands in process substitutions to not look in
3370 the local temporary environment when performing word expansions.
3371
3372jjjj. Fixed several problems with globstar expansions (**/**) returning null
3373 filenames and multiple instances of the same pathname.
3374
3375kkkk. Fixed an oversight that did not allow the exit status of `coproc' to
3376 be inverted using `!'.
3377
3378llll. Fixed a bug that caused the -e option to be re-enabled using `set -e'
3379 even when executing in a context where -e is ignored.
3380
3381mmmm. Fixed a (mostly theoretical) bug with input lines longer than SIZE_MAX.
3382
3383nnnn. Fixed a bug that could result in double evaluation of command
3384 substitutions when they appear in failed redirections.
3385
3386oooo. Fixed a bug that could cause seg faults during `mapfile' callbacks if
3387 the callback unsets the array variable mapfile is using.
3388
3389pppp. Fixed several problems with variable assignments using ${var:=value}
3390 when the variable assignment is supposed to have side effects.
3391
3392qqqq. Fixed a bug that caused a failure of an assignment statement preceding a
3393 builtin caused the next invocation of a special builtin to exit the shell.
3394
3395rrrr. Fixed several problems with IFS when it appears in the temporary environment
3396 and is used in redirections.
3397
3398ssss. Fixed a problem that caused IFS changes using ${IFS:=value} to modify
3399 how preceding expansions were split.
3400
3401tttt. Fixed a problem that caused subshells to not run an EXIT trap they set.
3402
3403uuuu. Fixed a problem that caused shells started in posix mode to attempt to
3404 import shell functions with invalid names from the environment. We now
3405 print a warning.
3406
3407vvvv. Worked around a kernel problem that caused SIGCHLD to interrupt open(2)
3408 on a FIFO used for process substitution, even if the SIGCHLD handler was
3409 installed with the SA_RESTART flag.
3410
3411wwww. Fixed a problem that resulted in inconsistent expansion of $* and ${a[*]}.
3412
3413xxxx. Fixed a problem that caused `read -t' to crash when interrupted by
3414 SIGINT.
3415
3416yyyy. Fixed a problem that caused pattern removal to fail randomly because the
3417 pattern matcher read beyond the end of a string.
3418
3419zzzz. Fixed a bug that caused core dumps when shell functions tried to create
3420 local shadow copies of special variables like GROUPS.
3421
3422aaaaa. Fixed a bug that caused SIGTERM to be occasionally lost by children of
3423 interactive shells when it arrived before the child process reset the
3424 handler from SIG_DFL.
3425
3426bbbbb. Fixed a bug that caused redirections like <&n- to leave file descriptor
3427 n closed if executed with a builtin command.
3428
3429ccccc. Fixed a bug that caused incorrect completion quoting when completing a
3430 word containing a globbing character with `show-all-if-ambiguous' set.
3431
3432ddddd. Fixed a bug that caused printf's %q format specifier not to quote a
3433 tilde even if it appeared in a location where it would be subject to
3434 tilde expansion.
3435
34362. Changes to Readline
3437
3438a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode
3439 commands to work on the entire line.
3440
3441b. Fixed a bug that caused redisplay problems with prompts longer than 128
3442 characters and history searches.
3443
3444c. Fixed a bug that caused readline to try and run code to modify its idea
3445 of the screen size in a signal handler context upon receiving a SIGWINCH.
3446
3447d. Fixed a bug that caused the `meta' key to be enabled beyond the duration
3448 of an individual call top readline().
3449
3450e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's
3451 redisplay to mishandle zero-width combining characters.
3452
3453f. Fixed a bug that caused readline to `forget' part of a key sequence when
3454 a multiple-key sequence caused it to break out of an incremental search.
3455
3456g. Fixed bugs that caused readline to execute code in a signal handler
3457 context if interrupted while reading from the file system during completion.
3458
3459h. Fixed a bug that caused readline to `forget' part of a key sequence when
3460 reading an unbound multi-character key sequence.
3461
3462i. Fixed a bug that caused Readline's signal handlers to be installed beyond
3463 the bounds of a single call to readline().
3464
3465j. Fixed a bug that caused the `.' command to not redo the most recent `R'
3466 command in vi mode.
3467
3468k. Fixed a bug that caused ignoring case in completion matches to result in
3469 readline using the wrong match.
3470
3471l. Paren matching now works in vi insert mode.
3472
3473m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix
3474 work together.
3475
3476n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone
3477 in vi editing mode.
3478
3479o. Fixed a bug that caused the filename comparison code to not compare
3480 multibyte characters correctly when using case-sensitive or case-mapping
3481 comparisons.
3482
3483p. Fixed the input reading loop to call the input hook function only when there
3484 is no terminal input available.
3485
3486q. Fixed a bug that caused binding a macro to a multi-character key sequence
3487 where the sequence and macro value share a common prefix to not perform
3488 the macro replacement.
3489
3490r. Fixed several redisplay errors with multibyte characters and prompts
3491 containing invisible characters when using horizontal scrolling.
3492
3493s. Fixed a bug that caused redisplay errors when trying to overwrite
3494 existing characters using multibyte characters.
3495
34963. New Features in Bash
3497
3498a. The `helptopic' completion action now maps to all the help topics, not just
3499 the shell builtins.
3500
3501b. The `help' builtin no longer does prefix substring matching, so `help read'
3502 does not match `readonly'.
3503
3504c. The shell can be compiled to not display a message about processes that
3505 terminate due to SIGTERM.
3506
3507d. Non-interactive shells now react to the setting of checkwinsize and set
3508 LINES and COLUMNS after a foreground job exits.
3509
3510e. There is a new shell option, `globasciiranges', which, when set to on,
3511 forces globbing range comparisons to use character ordering as if they
3512 were run in the C locale.
3513
3514f. There is a new shell option, `direxpand', which makes filename completion
3515 expand variables in directory names in the way bash-4.1 did.
3516
3517g. In Posix mode, the `command' builtin does not change whether or not a
3518 builtin it shadows is treated as an assignment builtin.
3519
3520h. The `return' and `exit' builtins accept negative exit status arguments.
3521
3522i. The word completion code checks whether or not a filename containing a
3523 shell variable expands to a directory name and appends `/' to the word
3524 as appropriate. The same code expands shell variables in command names
3525 when performing command completion.
3526
3527j. In Posix mode, it is now an error to attempt to define a shell function
3528 with the same name as a Posix special builtin.
3529
3530k. When compiled for strict Posix conformance, history expansion is disabled
3531 by default.
3532
3533l. The history expansion character (!) does not cause history expansion when
3534 followed by the closing quote in a double-quoted string.
3535
3536m. `complete' and its siblings compgen/compopt now takes a new `-o noquote'
3537 option to inhibit quoting of the completions.
3538
3539n. Setting HISTSIZE to a value less than zero causes the history list to be
3540 unlimited (setting it 0 zero disables the history list).
3541
3542o. Setting HISTFILESIZE to a value less than zero causes the history file size
3543 to be unlimited (setting it to 0 causes the history file to be truncated
3544 to zero size).
3545
3546p. The `read' builtin now skips NUL bytes in the input.
3547
3548q. There is a new `bind -X' option to print all key sequences bound to Unix
3549 commands.
3550
3551r. When in Posix mode, `read' is interruptible by a trapped signal. After
3552 running the trap handler, read returns 128+signal and throws away any
3553 partially-read input.
3554
3555s. The command completion code skips whitespace and assignment statements
3556 before looking for the command name word to be completed.
3557
3558t. The build process has a new mechanism for constructing separate help files
3559 that better reflects the current set of compilation options.
3560
3561u. The -nt and -ot options to test now work with files with nanosecond
3562 timestamp resolution.
3563
3564v. The shell saves the command history in any shell for which history is
3565 enabled and HISTFILE is set, not just interactive shells.
3566
3567w. The shell has `nameref' variables and new -n(/+n) options to declare and
3568 unset to use them, and a `test -R' option to test for them.
3569
3570x. The shell now allows assigning, referencing, and unsetting elements of
3571 indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which
3572 count back from the last element of the array.
3573
3574y. The {x}<word redirection feature now allows words like {array[ind]} and
3575 can use variables with special meanings to the shell (e.g., BASH_XTRACEFD).
3576
3577z. There is a new CHILD_MAX special shell variable; its value controls the
a0c0a00f 3578 number of exited child statuses the shell remembers.
ac50fbac
CR
3579
3580aa. There is a new configuration option (--enable-direxpand-default) that
3581 causes the `direxpand' shell option to be enabled by default.
3582
3583bb. Bash does not do anything special to ensure that the file descriptor
3584 assigned to X in {x}<foo remains open after the block containing it
3585 completes.
3586
3587cc. The `wait' builtin has a new `-n' option to wait for the next child to
3588 change status.
3589
3590dd. The `printf' %(...)T format specifier now uses the current time if no
3591 argument is supplied.
3592
3593ee. There is a new variable, BASH_COMPAT, that controls the current shell
3594 compatibility level.
3595
3596ff. The `popd' builtin now treats additional arguments as errors.
3597
3598gg. The brace expansion code now treats a failed sequence expansion as a
3599 simple string and will continue to expand brace terms in the remainder
3600 of the word.
3601
36024. New Features in Readline
3603
3604a. Readline is now more responsive to SIGHUP and other fatal signals when
3605 reading input from the terminal or performing word completion but no
3606 longer attempts to run any not-allowable functions from a signal handler
3607 context.
3608
3609b. There are new bindable commands to search the history for the string of
3610 characters between the beginning of the line and the point
3611 (history-substring-search-forward, history-substring-search-backward)
3612
3613c. Readline allows quoted strings as the values of variables when setting
3614 them with `set'. As a side effect, trailing spaces and tabs are ignored
3615 when setting a string variable's value.
3616
3617d. The history library creates a backup of the history file when writing it
3618 and restores the backup on a write error.
3619
3620e. New application-settable variable: rl_filename_stat_hook: a function called
3621 with a filename before using it in a call to stat(2). Bash uses it to
3622 expand shell variables so things like $HOME/Downloads have a slash
3623 appended.
3624
3625f. New bindable function `print-last-kbd-macro', prints the most-recently-
3626 defined keyboard macro in a reusable format.
3627
3628g. New user-settable variable `colored-stats', enables use of colored text
3629 to denote file types when displaying possible completions (colored analog
3630 of visible-stats).
3631
3632h. New user-settable variable `keyseq-timout', acts as an inter-character
3633 timeout when reading input or incremental search strings.
3634
3635i. New application-callable function: rl_clear_history. Clears the history list
3636 and frees all readline-associated private data.
3637
3638j. New user-settable variable, show-mode-in-prompt, adds a characters to the
3639 beginning of the prompt indicating the current editing mode.
3640
3641k. New application-settable variable: rl_input_available_hook; function to be
3642 called when readline needs to check whether there is data available on its
3643 input source. The default hook checks rl_instream.
3644
3645l. Readline calls an application-set event hook (rl_signal_event_hook) after
3646 it gets a signal while reading input (read returns -1/EINTR but readline
3647 does not handle the signal immediately) to allow the application to handle
3648 or otherwise note it. Not currently called for SIGHUP or SIGTERM.
3649
3650m. If the user-settable variable `history-size' is set to a value less than
3651 0, the history list size is unlimited.
3652
3653------------------------------------------------------------------------------
495aee44
CR
3654This document details the changes between this version, bash-4.2-release,
3655and the previous version, bash-4.2-rc2.
3656
36571. Changes to Bash
3658
3659a. Fixed a bug that caused some variables to be clobbered by a longjmp,
3660 resulting in stack corruption.
3661
3662------------------------------------------------------------------------------
3663This document details the changes between this version, bash-4.2-rc2,
3664and the previous version, bash-4.2-rc1.
3665
36661. Changes to Bash
3667
3668a. Changes to bash_directory_completion_hook so that it's assigned to the
3669 readline rl_directory_rewrite_hook variable, which modifies the directory
3670 name passed to opendir without modifying the directory name the user
3671 typed.
3672
3673b. Fixed bug in select builtin that caused it to not terminate correctly if
3674 the read timed out due to $TMOUT.
3675
3676c. Fixed a problem that resulted in non-repeatable sequences of random
3677 numbers when RANDOM=0.
3678
3679------------------------------------------------------------------------------
3680This document details the changes between this version, bash-4.2-rc1,
3681and the previous version, bash-4.2-beta.
3682
36831. Changes to Bash
3684
3685a. Fixed a bug that caused some redirection errors to leak file descriptors.
3686
3687b. Fixed a bug that caused unary `+' and `-' arithmetic operators to have a
3688 higher precedence than unary `!' and `~'.
3689
3690c. Fixed a bug that caused simple commands in a pipeline to affect the exit
3691 status ($?) seen by subsequent pipeline commands.
3692
3693d. A number of cygwin-specific changes to avoid the use of text-mode files
3694 and file access, and to make sure that \r is handled correctly.
3695
3696e. Fixed a bug that caused the read builtin to not return failure if an
3697 attempt is made to assign to a readonly variable.
3698
3699f. Fixed a bug that caused some builtin usage messages to not be translated.
3700
3701g. Fixed a bug that caused the getopts builtin to not return failure if an
3702 attempt is made to assign to a readonly variable. Now it returns 2.
3703
3704h. Fixed the cd and pwd builtins to return failure if PWD is readonly and
3705 cannot be assigned to.
3706
3707i. Added code to check the return value of access(2) on Solaris systems,
3708 since it returns success for executable tests (e.g., `test -x') when
3709 run by root, even if the file permissions don't allow execution.
3710
37112. Changes to Readline
3712
3713a. Fixed a bug that caused directory names in words to be completed to not
3714 be dequoted correctly.
3715
37163. New Features in Bash
3717
37184. New Features in Readline
3719
3720------------------------------------------------------------------------------
3721This document details the changes between this version, bash-4.2-beta,
3722and the previous version, bash-4.2-alpha.
3723
37241. Changes to Bash
3725
3726a. Fixed a bug that caused the \W prompt string escape to not add a closing
3727 NULL.
3728
3729b. Fixed a bug that caused partially-quoted words that were not subject to
3730 word splitting to retained quoted NULLs.
3731
3732c. Added considerable efficiency speedups when pattern matching in multibyte
3733 locales by skipping multibyte character functions where possible.
3734
3735d. Added considerable speedups to variable expansion when in multibyte locales.
3736
3737e. Fixed a bug that caused the expansion of $* when there are no positional
3738 parameters to cause the shell to dump core when used in a pattern
3739 matching context.
3740
3741f. Fixed a bug that caused variable expansions preceding regular builtins to
3742 not change the shell environment during their execution.
3743
37442. Changes to Readline
3745
3746a. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave
3747 as if it were a negative argument.
3748
3749------------------------------------------------------------------------------
3750This document details the changes between this version, bash-4.2-alpha,
3751and the previous version, bash-4.1-release.
3752
37531. Changes to Bash
3754
3755a. Fixed a bug in the parser when processing alias expansions containing
3756 quoted newlines.
3757
3758b. Fixed a memory leak in associative array expansion.
3759
3760c. Fixed a bug that caused quoted here-strings to be requoted when printed.
3761
3762d. Fixed a bug in arithmetic expansion that caused the index in an array
3763 expansion to be evaluated twice under certain circumstances.
3764
3765e. Fixed several bugs with the expansion and display of variables that have
3766 been given attributes but not values and are technically unset.
3767
3768f. Fixed a bug that caused core dumps when using filename completion that
3769 expands to a filename containing a globbing character.
3770
3771g. Fixed a bug that caused assignment statements preceding a special builtin
3772 when running in Posix mode to not persist after the builtin completed
3773 when the special builtin was executed in a shell function without any
3774 local variables.
3775
3776h. Fixed a bug that caused a command to remain in the hash table even after
3777 `hash command' did not find anything if there was already an existing
3778 hashed pathname.
3779
3780i. Fixed several bugs caused by executing unsafe functions from a signal
3781 handler in the cases where a signal handler is executed immediately
3782 rather than setting a flag for later execution.
3783
3784j. Fixed a bug that caused some internal flag variables to be set
3785 incorrectly if `read -t' timed out.
3786
3787k. Fixed a Posix compatibility issue by making sure that a backslash escaping
3788 a `}' within a double-quoted ${...} parameter expansion is removed as part
3789 of the parameter expansion.
3790
3791l. Fixed a bug that caused execution of a trap to overwrite PIPESTATUS.
3792
3793m. Fixed a bug that caused here documents to not be displayed correctly
3794 when attached to commands inside compound commands.
3795
3796n. Fixed a bug that caused the printf builtin to use the wrong precision
3797 when using the `*' modifier.
3798
3799o. Fixed a bug that caused an arriving SIGCHLD to interrupt output functions
3800 like those invoked by echo or printf.
3801
3802p. Changed to use a more robust mechanism than eaccess(2) when test is
3803 checking filenames for execution permission.
3804
3805q. Fixed a bug that caused spurious semicolons to be added into the command
3806 history in certain cases.
3807
3808r. Fixed a bug that caused the shell to free non-allocated memory when
3809 unsetting element 0 of an associative array after it was assigned
3810 implicitly.
3811
3812s. Fixed a bug that could cause the shell to dump core if using the `v'
3813 vi editing command on a multi-line command.
3814
3815t. Fixed a bug that left FIFOs opened by process substitutions open long
3816 enough to potentially cause file descriptor exhaustion when running a
3817 shell function or shell builtin.
3818
3819u. Fixed a bug that caused the history expansion functions to not recognize
3820 process substitution or extended glob patterns as single words.
3821
3822v. Fixed a bug that caused restricted shells to set a restricted command's
3823 exit status incorrectly.
3824
3825w. Fixed a bug that caused bash to ignore the wrong set of filenames when
3826 completing a command using the `complete-filename' readline command.
3827
3828x. Fixed a bug that caused a -PID argument following a -s sig or -n sig to
3829 not be interpreted as a signal specification.
3830
3831y. Changed posix-mode behavior of a parse error in a `.' script or `eval'
3832 command to exit the shell under Posix-specified conditions. Previous
3833 versions printed a warning.
3834
3835z. Fixed a bug in \W prompt expansion that resulted in incorrect expansion
3836 in the event of overlapping strings.
3837
3838aa. Fixed a bug that caused the := parameter expansion operator to return the
3839 wrong value as the result of the expansion.
3840
3841bb. When in Posix mode, a single quote is not treated specially in a
3842 double-quoted ${...} expansion, unless the expansion operator is
3843 # or % or the non-Posix `//', `^', and `,'. In particular, it does
3844 not define a new quoting context. This is from Posix interpretation 221.
3845
3846cc. Fixed a bug that inadvertently allowed program names containing slashes
3847 to be entered into the command hash table.
3848
3849dd. Fixed a bug that caused the select builtin to incorrectly compute the
3850 display width of the arguments in the presence of multibyte characters.
3851
3852ee. Fixed a bug that caused bash to not change the xtrace file descriptor if
3853 BASH_XTRACEFD was found in the shell environment at startup.
3854
3855ff. Fixed a memory leak in the pattern removal parameter expansion.
3856
3857gg. Fixed a bug that caused SIGINT to fail to interrupt a nested loop if the
3858 loop was in a pipeline.
3859
3860hh. Fixed a problem in $(...) parsing that caused the parser to add an extra
3861 space to a here-document delimiter if the first word contained a `/'.
3862
3863ii. Fixed a bug that caused functions defined with the `function' reserved
3864 word to require braces around the function body.
3865
3866jj. Fixed a bug that caused bash to dump core when a variable expansion being
3867 used as an array subscript failed.
3868
3869kk. Fixed a bug that caused bash to dump core if the case-modification
3870 expansions were used on a variable with a null value.
3871
3872ll. Fixed a bug that caused partially-quoted strings to be split incorrectly
3873 if a variable with a null value was expanded within double quotes.
3874
3875mm. The pattern substitution word expansion has been sped up dramatically
3876 when running in a locale with multibyte characters.
3877
3878nn. Fixed a bug that caused history -a to not write the correct lines to
3879 the history file if all the new lines in the history list were added
3880 since the last time the history file was read or written.
3881
3882oo. Fixed a bug that caused completion of a word with an unclosed `` command
3883 substitution to set the prompt incorrectly.
3884
3885pp. Fixed a bug that caused extended globbing patterns in $HISTIGNORE or
3886 $GLOBIGNORE to be incorrectly scanned.
3887
3888qq. Fixed a bug caused by closing file descriptors 3-20 on shell startup. The
3889 shell now sets them to close-on-exec.
3890
3891rr. Fixed a bug that caused the exit status of `exec file' to be set incorrectly
3892 if `file' was a directory.
3893
3894ss. Fixed a bug in the `.' builtin to make a non-interactive posix-mode shell
3895 exit if the file argument to `.' is not found. Prefixing exec with
3896 `command' makes the shell not exit. Posix requires this behavior.
3897
3898tt. Fixed a bug that caused `sh -c 'command exec; exit 1' to hang.
3899
3900uu. Fixed a bug in $(...) command substitution parsing that caused the shell
3901 to treat backslash-newline incorrectly when parsing a comment.
3902
3903vv. Fixed bug that caused brace expansion sequence generation to misbehave
3904 when supplied integers greater than 2**31 - 1.
3905
3906ww. Fixed a bug that caused failure to save file descriptors for redirections
3907 to corrupt shell file descriptors.
3908
3909xx. Fixed a bug that caused bash-forward-shellword to not correctly handle
3910 quoted strings.
3911
39122. Changes to Readline
3913
3914a. Fixed a bug that caused the unconverted filename to be added to the list of
3915 completions when the application specified filename conversion functions.
3916
3917b. Fixed a bug that caused the wrong filename to be passed to opendir when the
3918 application has specified a filename dequoting function.
3919
3920c. Fixed a bug when repeating a character search in vi mode in the case where
3921 there was no search to repeat.
3922
3923d. When show-all-if-ambiguous is set, the completion routines no longer insert
3924 a common match prefix that is shorter than the text being completed.
3925
3926e. The full set of vi editing commands may now be used in callback mode.
3927
3928f. Fixed a bug that caused readline to not update its idea of the terminal
3929 dimensions while running in `no-echo' mode.
3930
3931h. Fixed a bug that caused readline to dump core if an application called
3932 rl_prep_terminal without setting rl_instream.
3933
3934i. Fixed a bug that caused meta-prefixed characters bound to incremental
3935 search forward or backward to not be recognized if they were typed
3936 subsequently.
3937
3938j. The incremental search code treats key sequences that map to the same
3939 functions as (default) ^G, ^W, and ^Y as equivalent to those characters.
3940
3941k. Fixed a bug in menu-complete that caused it to misbehave with large
3942 negative argument.
3943
3944l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked
3945 at the end of the line.
3946
39473. New Features in Bash
3948
3949a. `exec -a foo' now sets $0 to `foo' in an executable shell script without a
3950 leading #!.
3951
3952b. Subshells begun to execute command substitutions or run shell functions or
3953 builtins in subshells do not reset trap strings until a new trap is
3954 specified. This allows $(trap) to display the caller's traps and the
3955 trap strings to persist until a new trap is set.
3956
3957c. `trap -p' will now show signals ignored at shell startup, though their
3958 disposition still cannot be modified.
3959
3960d. $'...', echo, and printf understand \uXXXX and \UXXXXXXXX escape sequences.
3961
3962e. declare/typeset has a new `-g' option, which creates variables in the
3963 global scope even when run in a shell function.
3964
3965f. test/[/[[ have a new -v variable unary operator, which returns success if
3966 `variable' has been set.
3967
3968g. Posix parsing changes to allow `! time command' and multiple consecutive
3969 instances of `!' (which toggle) and `time' (which have no cumulative
3970 effect).
3971
3972h. Posix change to allow `time' as a command by itself to print the elapsed
3973 user, system, and real times for the shell and its children.
3974
3975j. $((...)) is always parsed as an arithmetic expansion first, instead of as
3976 a potential nested command substitution, as Posix requires.
3977
3978k. A new FUNCNEST variable to allow the user to control the maximum shell
3979 function nesting (recursive execution) level.
3980
3981l. The mapfile builtin now supplies a third argument to the callback command:
3982 the line about to be assigned to the supplied array index.
3983
3984m. The printf builtin has a new %(fmt)T specifier, which allows time values
3985 to use strftime-like formatting.
3986
3987n. There is a new `compat41' shell option.
3988
3989o. The cd builtin has a new Posix-mandated `-e' option.
3990
3991p. Negative subscripts to indexed arrays, previously errors, now are treated
3992 as offsets from the maximum assigned index + 1.
3993
3994q. Negative length specifications in the ${var:offset:length} expansion,
3995 previously errors, are now treated as offsets from the end of the variable.
3996
3997r. Parsing change to allow `time -p --'.
3998
3999s. Posix-mode parsing change to not recognize `time' as a keyword if the
4000 following token begins with a `-'. This means no more Posix-mode
4001 `time -p'. Posix interpretation 267.
4002
4003t. There is a new `lastpipe' shell option that runs the last command of a
4004 pipeline in the current shell context. The lastpipe option has no
4005 effect if job control is enabled.
4006
4007u. History expansion no longer expands the `$!' variable expansion.
4008
4009v. Posix mode shells no longer exit if a variable assignment error occurs
4010 with an assignment preceding a command that is not a special builtin.
4011
4012w. Non-interactive mode shells exit if -u is enabled and an attempt is made
4013 to use an unset variable with the % or # expansions, the `//', `^', or
4014 `,' expansions, or the parameter length expansion.
4015
4016x. Posix-mode shells use the argument passed to `.' as-is if a $PATH search
4017 fails, effectively searching the current directory. Posix-2008 change.
4018
40194. New Features in Readline
4020
4021a. The history library does not try to write the history filename in the
4022 current directory if $HOME is unset. This closes a potential security
4023 problem if the application does not specify a history filename.
4024
4025b. New bindable variable `completion-display-width' to set the number of
4026 columns used when displaying completions.
4027
4028c. New bindable variable `completion-case-map' to cause case-insensitive
4029 completion to treat `-' and `_' as identical.
4030
4031d. There are new bindable vi-mode command names to avoid readline's case-
4032 insensitive matching not allowing them to be bound separately.
4033
4034e. New bindable variable `menu-complete-display-prefix' causes the menu
4035 completion code to display the common prefix of the possible completions
4036 before cycling through the list, instead of after.
4037
4038------------------------------------------------------------------------------
0001803f
CR
4039This document details the changes between this version, bash-4.1-rc,
4040and the previous version, bash-4.1-beta.
4041
40421. Changes to Bash
4043
4044a. Fixed a bug that caused printf to not return a partial value when it
4045 encountered an error while converting an integer argument.
4046
4047b. Fixed a bug that caused setting one of the compatNN options to not
4048 turn off the others.
4049
4050c. The (undocumented) --wordexp option is no longer included by default.
4051
4052d. Fixed a bug in conditional command execution that caused it to not
4053 correctly ignore the exit status under certain circumstances.
4054
4055e. Added a configure-time check for correctly-working asprintf/snprintf.
4056
4057f. Fixed some problems with line number calculation and display when sourcing
4058 a file in an interactive shell.
4059
4060g. Fixed a bug that caused the shell to crash when using `declare -A foo=bar'.
4061
4062h. Fixed a bug that caused an off-by-one error when calculating the directories
4063 to display with the PROMPT_DIRTRIM option.
4064
40652. Changes to Readline
4066
4067a. Fixed a bug that caused applications using the callback interface to not
4068 react to SIGINT (or other signals) until another character arrived.
4069
4070------------------------------------------------------------------------------
4071This document details the changes between this version, bash-4.1-beta,
4072and the previous version, bash-4.1-alpha.
4073
40741. Changes to Bash
4075
4076a. Fixed a bug in mapfile that caused the shell to crash if it was passed the
4077 name of an associative array.
4078
4079b. Fixed a bug that caused the shell to incorrectly split case patterns if
4080 they contained characters in $IFS.
4081
4082c. Fixed a bug that caused the shell to set $? to the wrong value when using
4083 a construct ending with a variable assignment with set -x enabled and PS4
4084 containing a command substitution.
4085
4086d. Fixed a bug that caused the shell to read commands incorrectly if an
4087 expansion error occurred under certain conditions in a user-specified
4088 subshell.
4089
4090e. Fixed a bug that caused the shell to set $? incorrectly if a parse error
4091 occurred in an evaluation context ("eval", trap command, dot script, etc.)
4092
4093f. Fixed a bug that caused the shell to attempt command substitution
4094 completion within a single-quoted string.
4095
4096g. Fixed a bug that caused the shell to insert an extra single quote during
4097 word completion.
4098
4099h. Fixed a bug that caused the shell to crash if invoked with the environment
4100 variable EMACS having a null value.
4101
4102i. Fixed a bug that caused bash to incorrectly report the presence of new
4103 mail in a `maildir' environment.
4104
4105j. Fixed a bug that caused the shell to not recognize a here-document ending
4106 delimiter inside a command substitution.
4107
4108k. Fixed a bug that caused the shell to crash when a a dynamic array variable
4109 was assigned a scalar value.
4110
41112. Changes to Readline
4112
41133. New Features in Bash
4114
4115a. The mapfile/readarray builtin no longer stores the commands it invokes via
4116 callbacks in the history list.
4117
4118b. There is a new `compat40' shopt option.
4119
4120c. The < and > operators to [[ do string comparisons using the current locale
4121 only if the compatibility level is greater than 40 (set to 41 by default).
4122
41234. New Features in Readline
4124
4125------------------------------------------------------------------------------
4126This document details the changes between this version, bash-4.1-alpha,
4127and the previous version, bash-4.0-release.
4128
41291. Changes to Bash
4130
4131a. Fixed bugs in the parser involving new parsing of the commands contained
4132 in command substitution when the substitution is read.
4133
4134b. Fixed a bug that caused the shell to dump core when performing programmable
4135 completion using a shell function.
4136
4137c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong
4138 time.
4139
4140d. Fixed a bug that caused the shell to dump core when listing jobs in the
4141 `exit' builtin.
4142
4143e. Fixed several bugs encountered when reading subscripts in associative
4144 array assignments and expansions.
4145
4146f. Fixed a bug that under some circumstances caused an associative array to
4147 be converted to an indexed array.
4148
4149g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set
4150 $? to a value > 128.
4151
4152h. Fixed a bug that caused the shell to remove FIFOs associated with process
4153 substitution inside shell functions.
4154
4155i. Fixed a bug that caused terminal attributes to not be reset when the
4156 `read' builtin timed out.
4157
4158j. Fixed a bug in brace expansion that caused unwanted zero padding of the
4159 expanded terms.
4160
4161k. Fixed a bug that prevented the |& construct from working as intended when
4162 used with a simple command with additional redirections.
4163
8868edaf 4164l. Fixed a bug with the case statement ;& terminator that caused the shell to
0001803f
CR
4165 dereference a NULL pointer.
4166
4167m. Fixed a bug that caused assignment statements or redirections preceding
4168 a simple command name to inhibit alias expansion.
4169
4170n. Fixed the behavior of `set -u' to conform to the latest Posix interpretation:
4171 every expansion of an unset variable except $@ and $* will cause the
4172 shell to exit.
4173
4174o. Fixed a bug that caused double-quoted expansions of $* inside word
4175 expansions like ${x#$*} to not expand properly when $IFS is empty.
4176
4177p. Fixed a bug that caused traps to set $LINENO to the wrong value when they
4178 execute.
4179
4180q. Fixed a bug that caused off-by-one errors when computing history lines in
4181 the `fc' builtin.
4182
4183r. Fixed a bug that caused some terminating signals to not exit the shell
4184 quickly enough, forcing the kernel to send the signal (e.g., SIGSEGV)
4185 multiple times.
4186
4187s. Fixed a bug that caused the shell to attempt to add empty lines to the
4188 history list when reading here documents.
4189
4190t. Made some internal changes that dramatically speeds up sequential indexed
4191 array access.
4192
4193u. Fixed a bug that caused the shell to write past the end of a string when
4194 completing a double-quoted string ending in a backslash.
4195
4196v. Fixed a bug that caused the shell to replace too many characters when a
4197 pattern match was null in a ${foo//bar} expansion.
4198
4199w. Fixed bugs in the expansion of ** that caused duplicate directory names
4200 and the contents of the current directory to be omitted.
4201
4202x. Fixed a bug that caused $? to not be set correctly when referencing an
4203 unset variable with set -u and set -e enabled.
4204
4205y. Fixed a bug caused by executing an external program from the DEBUG trap
4206 while a pipeline was running. The effect was to disturb the pipeline
4207 state, occasionally causing it to hang.
4208
4209z. Fixed a bug that caused the ** glob expansion to dump core if it
4210 encountered an unsearchable directory.
4211
4212aa. Fixed a bug that caused `command -v' and `command -V' to not honor the
4213 path set by the -p option.
4214
4215bb. Fixed a bug that caused brace expansion to take place too soon in some
4216 compound array assignments.
4217
4218cc. Fixed a bug that caused programmable completion functions' changes to
4219 READLINE_POINT to not be reflected back to readline.
4220
4221dd. Fixed a bug that caused the shell to dump core if a trap was executed
4222 during a shell assignment statement.
4223
4224ee. Fixed an off-by-one error when computing the number of positional
4225 parameters for the ${@:0:n} expansion.
4226
4227ff. Fixed a problem with setting COMP_CWORD for programmable completion
4228 functions that could leave it set to -1.
4229
4230gg. Fixed a bug that caused the ERR trap to be triggered in some cases where
4231 `set -e' would not have caused the shell to exit.
4232
4233hh. Fixed a bug that caused changes made by `compopt' to not persist past the
4234 completion function in which compopt was executed.
4235
4236ii. Fixed a bug that caused the list of hostname completions to not be cleared
4237 when HOSTNAME was unset.
4238
4239jj. Fixed a bug that caused variable expansion in here documents to look in
4240 any temporary environment.
4241
4242kk. Bash and readline can now convert file names between precomposed and
4243 decomposed Unicode on Mac OS X ("keyboard" and file system forms,
4244 respectively). This affects filename completion (using new
4245 rl_filename_rewrite_hook), globbing, and readline redisplay.
4246
4247ll. The ERR and EXIT traps now see a non-zero value for $? when a parser
4248 error after set -e has been enabled causes the shell to exit.
4249
4250mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to
4251 not contain the correct number of digits.
4252
4253nn. Fixed a bug that caused the shell to free non-allocated memory when
4254 unsetting an associative array which had had a value implicitly assigned
4255 to index "0".
4256
4257oo. Fixed a memory leak in the ${!prefix@} expansion.
4258
4259pp. Fixed a bug that caused printf to not correctly report all write errors.
4260
4261qq. Fixed a bug that caused single and double quotes to act as delimiters
4262 when splitting a command line into words for programmable completion.
4263
4264rr. Fixed a bug that caused ** globbing that caused **/path/* to match every
4265 directory, not just those matching `path'.
4266
4267ss. Fixed a bug that caused the shell to dump core when running `help' without
4268 arguments if the terminal width was fewer than 7 characters.
4269
42702. Changes to Readline
4271
4272a. The SIGWINCH signal handler now avoids calling the redisplay code if
4273 one arrives while in the middle of redisplay.
4274
4275b. Changes to the timeout code to make sure that timeout values greater
4276 than one second are handled better.
4277
4278c. Fixed a bug in the redisplay code that was triggered by a prompt
4279 containing invisible characters exactly the width of the screen.
4280
4281d. Fixed a bug in the redisplay code encountered when running in horizontal
4282 scroll mode.
4283
4284e. Fixed a bug that prevented menu completion from properly completing
4285 filenames.
4286
4287f. Fixed a redisplay bug caused by a multibyte character causing a line to
4288 wrap.
4289
4290g. Fixed a bug that caused key sequences of two characters to not be
4291 recognized when a longer sequence identical in the first two characters
4292 was bound.
4293
4294h. Fixed a bug that caused history expansion to be attempted on $'...'
4295 single-quoted strings.
4296
4297i. Fixed a bug that caused incorrect redisplay when the prompt contained
4298 multibyte characters in an `invisible' sequence bracketed by \[ and
4299 \].
4300
4301j. Fixed a bug that caused history expansion to short-circuit after
4302 encountering a multibyte character.
4303
43043. New Features in Bash
4305
4306a. Here-documents within $(...) command substitutions may once more be
4307 delimited by the closing right paren, instead of requiring a newline.
4308
4309b. Bash's file status checks (executable, readable, etc.) now take file
4310 system ACLs into account on file systems that support them.
4311
4312c. Bash now passes environment variables with names that are not valid
4313 shell variable names through into the environment passed to child
4314 processes.
4315
4316d. The `execute-unix-command' readline function now attempts to clear and
4317 reuse the current line rather than move to a new one after the command
4318 executes.
4319
4320e. `printf -v' can now assign values to array indices.
4321
4322f. New `complete -E' and `compopt -E' options that work on the "empty"
4323 completion: completion attempted on an empty command line.
4324
4325g. New complete/compgen/compopt -D option to define a `default' completion:
4326 a completion to be invoked on command for which no completion has been
4327 defined. If this function returns 124, programmable completion is
4328 attempted again, allowing a user to dynamically build a set of completions
4329 as completion is attempted by having the default completion function
4330 install individual completion functions each time it is invoked.
4331
4332h. When displaying associative arrays, subscripts are now quoted.
4333
4334i. Changes to dabbrev-expand to make it more `emacs-like': no space appended
4335 after matches, completions are not sorted, and most recent history entries
4336 are presented first.
4337
4338j. The [[ and (( commands are now subject to the setting of `set -e' and the
4339 ERR trap.
4340
4341k. The source/. builtin now removes NUL bytes from the file before attempting
4342 to parse commands.
4343
4344l. There is a new configuration option (in config-top.h) that forces bash to
4345 forward all history entries to syslog.
4346
4347m. A new variable $BASHOPTS to export shell options settable using `shopt' to
4348 child processes.
4349
4350n. There is a new confgure option that forces the extglob option to be
4351 enabled by default.
4352
4353o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
4354 output to that file descriptor.
4355
4356p. If the optional left-hand-side of a redirection is of the form {var}, the
4357 shell assigns the file descriptor used to $var or uses $var as the file
4358 descriptor to move or close, depending on the redirection operator.
4359
4360q. The < and > operators to the [[ conditional command now do string
4361 comparison according to the current locale.
4362
4363r. Programmable completion now uses the completion for `b' instead of `a'
4364 when completion is attempted on a line like: a $(b c.
4365
4366s. Force extglob on temporarily when parsing the pattern argument to
4367 the == and != operators to the [[ command, for compatibility.
4368
4369t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is
4370 received and a trap on SIGCHLD is set to be Posix-mode only.
4371
4372u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS
4373 characters, ignoring delimiters like newline.
4374
43754. New Features in Readline
4376
4377a. New bindable function: menu-complete-backward.
4378
4379b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
4380 and C-p to menu-complete-backward.
4381
4382c. When in vi command mode, repeatedly hitting ESC now does nothing, even
4383 when ESC introduces a bound key sequence. This is closer to how
4384 historical vi behaves.
4385
4386d. New bindable function: skip-csi-sequence. Can be used as a default to
4387 consume key sequences generated by keys like Home and End without having
4388 to bind all keys.
4389
4390e. New application-settable function: rl_filename_rewrite_hook. Can be used
4391 to rewite or modify filenames read from the file system before they are
4392 compared to the word to be completed.
4393
4394f. New bindable variable: skip-completed-text, active when completing in the
4395 middle of a word. If enabled, it means that characters in the completion
4396 that match characters in the remainder of the word are "skipped" rather
4397 than inserted into the line.
4398
4399g. The pre-readline-6.0 version of menu completion is available as
4400 "old-menu-complete" for users who do not like the readline-6.0 version.
4401
4402h. New bindable variable: echo-control-characters. If enabled, and the
4403 tty ECHOCTL bit is set, controls the echoing of characters corresponding
4404 to keyboard-generated signals.
4405
4406i. New bindable variable: enable-meta-key. Controls whether or not readline
4407 sends the smm/rmm sequences if the terminal indicates it has a meta key
4408 that enables eight-bit characters.
4409
4410------------------------------------------------------------------------------
17345e5a
JA
4411This document details the changes between this version, bash-4.0-release,
4412and the previous version, bash-4.0-rc1.
4413
44141. Changes to Bash
4415
4416a. Changed the message printed when setlocale(3) fails to only include the
4417 strerror error text if the call changes errno.
4418
4419b. Changed trap command execution to reset the line number before running a
4420 trap (except DEBUG and RETURN traps).
4421
4422c. Fixed behavior of case-modifiying word expansions to not work on
4423 individual words within a variable's value.
4424
4425d. Fixed a bug that caused mapfile to not be interruptible when run in an
4426 interactive shell.
4427
4428e. Fixed a bug that caused mapfile to not run callbacks for the first line
4429 read.
4430
4431f. Fixed a bug that caused mapfile to not honor EOF typed in an interactive
4432 shell.
4433
4434g. Fixed the coprocess reaping code to not run straight from a signal handler.
4435
4436h. Fixed a bug that caused printf -b to ignore the first % conversion specifier
4437 in the format string on 64-bit systems.
4438
4439i. Fixed a bug that caused incorrect word splitting when `:', `=', or `~'
4440 appeared in $IFS.
4441
4442j. Fixed a bug that caused data corruption in the programmable completion code
4443 when a shell function called from a completion aborted execution.
4444
4445k. Fixed a bug that caused the CPU usage reported by the `time' builtin to be
4446 capped at 100%.
4447
4448l. Changed behavior of shell when -e option is in effect to reflect consensus
4449 of Posix shell standardization working group.
4450
4451m. Fixed a bug introduced in bash-4.0-alpha that caused redirections to not
4452 be displayed by `type' or `declare' when appearing in functions under
4453 certain circumstances.
4454
44552. Changes to Readline
4456
4457a. Fixed a bug that caused !(...) extended glob patterns to inhibit later
4458 history expansion.
4459
4460b. Reworked the signal handling to avoid calling disallowed functions from a
4461 signal handler.
4462
44633. New Features in Bash
4464
4465a. `readarray' is now a synonym for `mapfile'.
4466------------------------------------------------------------------------------
3185942a
JA
4467This document details the changes between this version, bash-4.0-rc1,
4468and the previous version, bash-4.0-beta2.
4469
44701. Changes to Bash
4471
4472a. Fixed a bug that caused parsing errors when a $()-style command
4473 substitution was follwed immediately by a quoted newline.
4474
4475b. Fixed a bug that caused extended shell globbing patterns beginning with
4476 `*(' to not work when used with pattern substitution word expansions.
4477
4478------------------------------------------------------------------------------
4479This document details the changes between this version, bash-4.0-beta2,
4480and the previous version, bash-4.0-beta.
4481
44821. Changes to Bash
4483
4484a. Fixed a bug that caused failed word expansions to set $? but not
4485 PIPESTATUS.
4486
4487b. Changed filename completion to quote the tilde in a filename with a
4488 leading tilde that exists in the current directory.
4489
4490c. Fixed a bug that caused a file descriptor leak when performing
4491 redirections attached to a compound command.
4492
4493d. Fixed a bug that caused expansions of $@ and $* to not exit the shell if
4494 the -u option was enabled and there were no posititional parameters.
4495
4496e. Fixed a bug that resulted in bash not terminating immediately if a
4497 terminating signal was received while performing output.
4498
4499f. Fixed a bug that caused the shell to crash after creating 256 process
4500 substitutions during word completion.
4501
45022. Changes to Readline
4503
4504a. Fixed a bug that caused redisplay errors when using prompts with invisible
4505 characters and numeric arguments to a command in a multibyte locale.
4506
4507b. Fixed a bug that caused redisplay errors when using prompts with invisible
4508 characters spanning more than two physical screen lines.
4509
4510------------------------------------------------------------------------------
4511This document details the changes between this version, bash-4.0-beta,
17345e5a 4512and the previous version, bash-4.0-alpha.
3185942a
JA
4513
45141. Changes to Bash
4515
4516a. Fixed a typo that caused a variable to be used before initialization
4517 while parsing Posix-style command substitutions.
4518
4519b. Fixed a bug that caused stray ^? when the expansion of a parameter used
4520 as part of a pattern removal expansion is empty, but part of a non-
4521 empty string.
4522
4523c. Fixed a bug that could cause strings not converted to numbers by strtol
4524 to be treated as if the conversion had been successful.
4525
4526d. The `return' builtin now accepts no options and requires a `--' before
4527 a negative return value, as Posix requires.
4528
4529e. Fixed a bug that caused local variables to be created with the empty
4530 string for a value rather than no value.
4531
4532f. Changed behavior so the shell now acts as if it received an interrupt
4533 when a pipeline is killed by SIGINT while executing a list.
4534
4535g. Fixed a bug that caused `declare var' and `typeset var' to initialize
4536 `var' to the empty string.
4537
4538h. Changed `bind' builtin to print a warning but proceed if invoked when
4539 line editing is not active.
4540
4541i. Fixed a bug that caused the shell to exit when the `errexit' option is
4542 set and a command in a pipeline returns a non-zero exit status.
4543
4544j. Fixed a bug that caused the shell to not run the exit trap in a command
4545 run with `bash -c' under some circumstances.
4546
4547k. Fixed a bug that caused parser errors to occasionally not set $? when
4548 running commands with `eval'.
4549
4550l. Fixed a bug that caused stray control characters when evaluating compound
4551 array assignments containing $'\x7f' escapes.
4552
4553m. Fixed a bug that caused redirections involving file descriptor 10 as the
4554 target to behave incorrectly.
4555
4556n. Fixed a bug that could cause memory to be freed multiple times when
4557 assigning to COMP_WORDBREAKS.
4558
4559o. Fixed a bug that could cause NULL pointer dereferences when COMP_WORDBREAKS
4560 was unset.
4561
45622. Changes to Readline
4563
45643. New Features in Bash
4565
4566a. A value of 0 for the -t option to `read' now returns success if there is
4567 input available to be read from the specified file descriptor.
4568
4569b. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
4570 mode.
4571
4572c. New bindable readline functions shell-forward-word and shell-backward-word,
4573 which move forward and backward words delimited by shell metacharacters
4574 and honor shell quoting.
4575
4576d. New bindable readline functions shell-backward-kill-word and shell-kill-word
4577 which kill words backward and forward, but use the same word boundaries
4578 as shell-forward-word and shell-backward-word.
4579
45804. New Features in Readline
4581
4582a. If the kernel supports it, readline displays special characters
4583 corresponding to a keyboard-generated signal when the signal is received.
4584
4585------------------------------------------------------------------------------
4586This document details the changes between this version, bash-4.0-alpha,
4587and the previous version, bash-3.2-release.
4588
45891. Changes to Bash
4590
4591a. Fixed several bugs in old-style `` command substitution parsing, including
4592 comment parsing and quoted string handling.
4593
4594b. Fixed problems parsing arguments to the [[ command's =~ regular expression
4595 matching operator: metacharacter and whitespace parsing.
4596
4597c. Fixed a bug that caused the shell to inappropriately reuse high-numbered
4598 file descriptors it used internally.
4599
4600d. Fixed a bug in pattern replacement word expansions that caused a `/' as
4601 the first character of an expanded pattern to be mistaken for a global
4602 replacement specifier.
4603
4604e. Fixed several problems with the asprintf and snprintf replacement functions
4605 that caused hangs and crashes.
4606
4607f. Fixed a bug in the calculation of the current and previous job that caused
4608 it to refer to incorrect jobs.
4609
4610g. Fixed a bug in the check for the validity of a hashed command pathname that
4611 caused unnecessary hash table deletions and additions.
4612
4613h. Fixed a bug that caused child processes to inherit the wrong value for $!.
4614
4615i. Fixed a bug that caused `.' to fail to read and execute commands from non-
4616 regular files such as devices or named pipes.
4617
4618j. Fixed a bug in printf formatting for the %x and %X expansions that occurred
4619 on some systems.
4620
4621k. Fixed a bug that caused the shell to crash when creating temporary files if
4622 $TMPDIR named a non-writable directory.
4623
4624l. Fixed a bug that caused the shell to ignore $TMPDIR when creating temporary
4625 files under some circumstances.
4626
4627m. Fixed a bug that caused named pipes created by process substitution to not
4628 be cleaned up.
4629
4630n. Fixed a bug that caused HISTTIMEFORMAT to not be honored when it appeared
4631 in the initial shell environment.
4632
4633o. Fixed several bugs in the expansion of $* and $@ (quoted and unquoted)
4634 when IFS is null or contains non-whitespace characters; the same changes
4635 apply to arrays subscripted with * or @.
4636
4637p. Fixed several problems with pattern substitution expansions on the
4638 positional parameters and arrays subscripted with * or @ that occurred
4639 when $IFS was set to the empty string.
4640
4641q. Made a change to the default locale initialization code that should
4642 result in better behavior from the locale-aware library functions.
4643
4644r. Fixed a bug that caused compacting the jobs list to drop jobs.
4645
4646s. Fixed a bug that caused jumps back to the top-level processing loop from
4647 a builtin command to leave the shell in an inconsistent state.
4648
4649t. Fixed a bug that caused characters that would be escaped internally to be
4650 doubled when escaped with a backslash.
4651
4652u. Fixed the initialization of mailboxes to not cause maildirs to be read
4653 (and stat(2) called for every message file) at shell startup.
4654
4655v. Fixed a bug that caused the shell to not display $PS2 when the read builtin
4656 reads a line continued with a backslash.
4657
4658w. Fixed a bug that caused errors in word splitting when $IFS contained
4659 characters used for internal quoting.
4660
4661x. Fixed bugs that caused problems with output from shell builtins not being
4662 completely displayed on some systems.
4663
4664y. Fixed a bug that caused output to be lost when a redirection is acting on
4665 the shell's output file descriptor.
4666
4667z. Fixed bugs caused by shell builtins not checking for all write errors.
4668
4669aa. Fixed a problem that caused the shell to dump core if expansions on the
4670 pattern passed to the pattern removal word expansions resulted in expansion
4671 errors.
4672
4673bb. Fixed a bug that caused bash to loop infinitely after creating and
4674 waiting for 4096 jobs.
4675
4676cc. Fixed a bug that caused bash to lose the status of a background job under
4677 certain circumstances.
4678
4679dd. Fixed a bug that caused bash to not look in the temporary environment
4680 when performing variable lookup under certain circumstances.
4681
4682ee. Fixed a bug that caused bash to close file descriptors greater than 10
4683 when they were used in redirections.
4684
4685ff. Fixed a problem that caused the shell to attempt to read from the standard
4686 input when called as `bash -i script'.
4687
4688gg. Fixed a memory leak and variable initialization problems when the -v option
4689 was supplied to `printf' that could cause incorrect results.
4690
4691hh. Fixed a bug that caused the `read' builtin to count bytes when the -n option
4692 was supplied, rather than (possibly multibyte) characters.
4693
4694ii. Fixed a bug when displaying a function due to not converting the function
4695 to an external form.
4696
4697jj. Changed job control initialization to ensure that the shell has a tty
4698 as its controlling terminal before enabling job control.
4699
4700kk. Fixed a bug with the `test' builtin that caused it to misinterpret
4701 arguments beginning with `-' but containing more than one character.
4702
4703ll. Fixed bug that could cause the shell to dump core in certain cases where
4704 a command sets the SIGINT disposition to the default.
4705
4706mm. Fixed a bug in the pattern replacement (affecting both word expansion
4707 and the `fc' builtin) that occurred when the pattern and replacement
4708 strings were empty.
4709
4710nn. Fixed a bug that caused an arithmetic evaluation error to disable all
4711 further evaluation.
4712
4713oo. Fixed a bug in pathname expansion that caused it to interpret backslashes
4714 in the pathname as quoting characters.
4715
4716pp. Fixed a bug in the replacement getcwd() implementation that could cause
4717 memory to be overwritten.
4718
4719qq. When in Posix mode, the `ulimit' builtin now uses a block size of 512 for
4720 the `-c' and `-f' options.
4721
4722rr. Brace expansion now allows process substitutions to pass through unchanged.
4723
4724ss. Fixed a problem in the command name completion code to avoid quoting
4725 escaped special characters twice when the command name begins with a tilde.
4726
4727tt. Fixed a problem in the printf builtin that resulted in single-byte
4728 output for the "'" escape, even when using multibyte characters.
4729
4730uu. Fixed a bug that caused the failure exit status to be lost when redirections
4731 attached to a compound command failed.
4732
4733vv. Fixed a bug that caused the internal random number generator to not be
4734 re-seeded correctly when creating a subshell.
4735
4736ww. Fixed a bug that could cause the bash replacement getcwd to overwrite
4737 memory.
4738
4739xx. Fixed a bug that caused the shell to not receive SIGINT if it was sent
4740 while the shell was waiting for a command substitution to terminate, and
4741 make sure the exit status is correct when it does.
4742
4743yy. Fixed a bug that resulted in the second and subsequent children spawned
4744 by a shell begun to run a command substitution being placed into the
4745 wrong process group.
4746
4747zz. Fixed a bug that caused the results of successful tilde expansion to be
4748 subject to pathname expansion and word splitting.
4749
4750aaa. Fixed a bug that could cause the shell to hang if it encountered an
4751 error that caused it to jump back to the top processing loop during a
4752 command substitution or `eval' command.
4753
4754bbb. Fixed a bug that caused the `read' builtin to use the tty's attributes
4755 instead of those of the file descriptor passed with the -u option when
4756 processing the -n and -d options.
4757
4758ccc. Fixed a bug that caused incorrect expansion of ${array[@]:foo} if the
4759 first character of $IFS was not whitespace.
4760
4761ddd. Fixed a bug that occurred when scanning for the ending delimiter of a
4762 ${parameter/pat/sub} expansion.
4763
4764eee. Fixed a bug that caused the shell to inappropriately expand command
4765 substitutions in words when expanding directory names for completion.
4766
4767fff. Fixed a bug that caused the `fc' builtin to look too far back in the
4768 history list under certain circumstances.
4769
4770ggg. Fixed a bug that caused a shell running in Posix mode to search $PWD for
4771 a file specified as an argument to source/. when the file was not found
4772 in $PATH.
4773
4774hhh. Fixed a bug that caused the shell to modify the case of a command word
4775 found via command completion when the shell was performing case-
4776 insensitive completion.
4777
4778iii. Fixed a bug that caused the shell to search $PATH for an argument to
4779 source/. even when it contained a `/'.
4780
4781jjj. Fixed a bug that caused brace expansion to misorder expansions when the
4782 locale did not have a collating order like aAbBcC...zZ.
4783
4784kkk. Fixed a bug that did not allow `set +o history' to have any effect when
4785 run in a startup file or from a sourced file.
4786
4787lll. Fixed a bug with the precedence of the ?: conditional arithmetic operator.
4788
4789mmm. Fixed a bug that caused side effects of temporary variable assignments
4790 to persist in the shell environment.
4791
4792nnn. Fixed a bug that caused the terminal to be left in non-canonical mode
4793 when using editing commands that invoke the an editor on the current
4794 command line.
4795
4796ooo. Fixed a bug that caused globbing characters and characters in $IFS to not
4797 be quoted appropriately when displaying assignment statements.
4798
4799ppp. Fixed a bug that caused the `-e' option to be inherited when sourcing a
4800 file or evaluating a command with `eval' even if the return value of the
4801 command was supposed to be ignored.
4802
4803qqq. Fixed a bug that caused the shell to attempt to created variables with
4804 invalid names if such names appeared in the initial environment.
4805
4806rrr. Fixed a bug with quote removal in strings where the final character is a
4807 backslash.
4808
4809sss. Fixed a bug that caused the effects of special variables to persist even
4810 when the variables were unset as part of the shell reinitializing itself
4811 to execute a shell script.
4812
4813ttt. Fixed a bug that caused the history to not be saved after `history -c' or
4814 `history -d' was executed until a sufficient number of commands had been
4815 saved to the history.
4816
4817uuu. Bash now parses command substitutions according to Posix rules: parsing
4818 the command contained in $() to find the closing delimiter.
4819
4820vvv. Fixed a bug that caused traps on SIGCHLD set in a SIGCHLD handler to
4821 not persist.
4822
4823www. Fixed a bug that didn't allow SIGCHLD to interrupt the `wait' builtin
4824 as Posix specifies.
4825
4826xxx. Invalid numeric arguments to shell builtins no longer cause the shell to
4827 short-circuit any executing compound command.
4828
4829yyy. Fixed a bug that caused the exit status to be lost when `break' was
4830 used to short-circuit a loop's execution.
4831
4832zzz. Fixed a bug that caused stray ^? characters to be left in expansions of
4833 "${array[*]}".
4834
4835aaaa. Bash now prints better error messages for here documents terminated by
4836 EOF and for identifying the incorrect token in an invalid arithmetic
4837 expression.
4838
4839bbbb. Fixed a bug in the variable length word expansion that caused it to
4840 incorrectly calculate the number of multibyte characters.
4841
4842cccc. Fixed a race condition that could result in the top-level shell setting
4843 the terminal's process group to an incorrect value if the process
4844 group was changed by a child of a child of the shell.
4845
4846dddd. Fixed a bug that caused here documents belonging to commands within a
4847 compound command to be displayed in a syntactially-incorrect form, which
4848 prevented them from being re-read as input.
4849
4850eeee. The shell displays more warnings about failures to set the locale.
4851
4852ffff. Fixed a bug that caused the body of a here-document to not be saved to
4853 the history list.
4854
4855gggg. Fixed a bug that caused configure to incorrectly conclude that FreeBSD
4856 had /dev/fd available, resulting in problems with process substitution.
4857
48582. Changes to Readline
4859
4860a. Fixed a number of redisplay errors in environments supporting multibyte
4861 characters.
4862
4863b. Fixed bugs in vi command mode that caused motion commands to inappropriately
4864 set the mark.
4865
4866c. When using the arrow keys in vi insertion mode, readline allows movement
4867 beyond the current end of the line (unlike command mode).
4868
4869d. Fixed bugs that caused readline to loop when the terminal has been taken
4870 away and reads return -1/EIO.
4871
4872e. Fixed bugs in redisplay occurring when displaying prompts containing
4873 invisible characters.
4874
4875f. Fixed a bug that caused the completion append character to not be reset to
4876 the default after an application-specified completion function changed it.
4877
4878g. Fixed a problem that caused incorrect positioning of the cursor while in
4879 emacs editing mode when moving forward at the end of a line while using
4880 a locale supporting multibyte characters.
4881
4882h. Fixed an off-by-one error that caused readline to drop every 511th
4883 character of buffered input.
4884
4885i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up.
4886
4887j. Fixed redisplay bugs caused by multiline prompts with invisible characters
4888 or no characters following the final newline.
4889
4890k. Fixed redisplay bug caused by prompts consisting solely of invisible
4891 characters.
4892
4893l. Fixed a bug in the code that buffers characters received very quickly in
4894 succession which caused characters to be dropped.
4895
4896m. Fixed a bug that caused readline to reference uninitialized data structures
8868edaf 4897 if it received a SIGWINCH before completing initialization.
3185942a
JA
4898
4899n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly
4900 and therefore unrepeatable.
4901
4902o. Fixed a bug that caused readline to disable echoing when it was being used
4903 with an output file descriptor that was not a terminal.
4904
4905p. Readline now blocks SIGINT while manipulating internal data structures
4906 during redisplay.
4907
4908q. Fixed a bug in redisplay that caused readline to segfault when pasting a
4909 very long line (over 130,000 characters).
4910
4911r. Fixed bugs in redisplay when using prompts with no visible printing
4912 characters.
4913
49143. New Features in Bash
4915
4916a. When using substring expansion on the positional parameters, a starting
4917 index of 0 now causes $0 to be prefixed to the list.
4918
4919b. The `help' builtin now prints its columns with entries sorted vertically
4920 rather than horizontally.
4921
4922c. There is a new variable, $BASHPID, which always returns the process id of
4923 the current shell.
4924
4925d. There is a new `autocd' option that, when enabled, causes bash to attempt
4926 to `cd' to a directory name that is supplied as the first word of a
4927 simple command.
4928
4929e. There is a new `checkjobs' option that causes the shell to check for and
4930 report any running or stopped jobs at exit.
4931
4932f. The programmable completion code exports a new COMP_TYPE variable, set to
4933 a character describing the type of completion being attempted.
4934
4935g. The programmable completion code exports a new COMP_KEY variable, set to
4936 the character that caused the completion to be invoked (e.g., TAB).
4937
4938h. If creation of a child process fails due to insufficient resources, bash
4939 will try again several times before reporting failure.
4940
4941i. The programmable completion code now uses the same set of characters as
4942 readline when breaking the command line into a list of words.
4943
4944j. The block multiplier for the ulimit -c and -f options is now 512 when in
4945 Posix mode, as Posix specifies.
4946
4947k. Changed the behavior of the read builtin to save any partial input received
4948 in the specified variable when the read builtin times out. This also
4949 results in variables specified as arguments to read to be set to the empty
4950 string when there is no input available. When the read builtin times out,
4951 it returns an exit status greater than 128.
4952
4953l. The shell now has the notion of a `compatibility level', controlled by
4954 new variables settable by `shopt'. Setting this variable currently
4955 restores the bash-3.1 behavior when processing quoted strings on the rhs
4956 of the `=~' operator to the `[[' command.
4957
4958m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number
4959 of threads) options.
4960
4961n. The -p option to `declare' now displays all variable values and attributes
4962 (or function values and attributes if used with -f).
4963
4964o. There is a new `compopt' builtin that allows completion functions to modify
4965 completion options for existing completions or the completion currently
4966 being executed.
4967
4968p. The `read' builtin has a new -i option which inserts text into the reply
4969 buffer when using readline.
4970
4971q. A new `-E' option to the complete builtin allows control of the default
4972 behavior for completion on an empty line.
4973
4974r. There is now limited support for completing command name words containing
4975 globbing characters.
4976
4977s. Changed format of internal help documentation for all builtins to roughly
4978 follow man page format.
4979
4980t. The `help' builtin now has a new -d option, to display a short description,
4981 and a -m option, to print help information in a man page-like format.
4982
4983u. There is a new `mapfile' builtin to populate an array with lines from a
4984 given file.
4985
4986v. If a command is not found, the shell attempts to execute a shell function
4987 named `command_not_found_handle', supplying the command words as the
4988 function arguments.
4989
4990w. There is a new shell option: `globstar'. When enabled, the globbing code
4991 treats `**' specially -- it matches all directories (and files within
4992 them, when appropriate) recursively.
4993
4994x. There is a new shell option: `dirspell'. When enabled, the filename
4995 completion code performs spelling correction on directory names during
4996 completion.
4997
4998y. The `-t' option to the `read' builtin now supports fractional timeout
4999 values.
5000
5001z. Brace expansion now allows zero-padding of expanded numeric values and
5002 will add the proper number of zeroes to make sure all values contain the
5003 same number of digits.
5004
5005aa. There is a new bash-specific bindable readline function: `dabbrev-expand'.
5006 It uses menu completion on a set of words taken from the history list.
5007
5008bb. The command assigned to a key sequence with `bind -x' now sets two new
5009 variables in the environment of the executed command: READLINE_LINE_BUFFER
5010 and READLINE_POINT. The command can change the current readline line
5011 and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT,
5012 respectively.
5013
0001803f 5014cc. There is a new &>> redirection operator, which appends the standard output
3185942a
JA
5015 and standard error to the named file.
5016
5017dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects
5018 the standard error for a command through a pipe.
5019
5020ee. The new `;&' case statement action list terminator causes execution to
5021 continue with the action associated with the next pattern in the
5022 statement rather than terminating the command.
5023
5024ff. The new `;;&' case statement action list terminator causes the shell to
5025 test the next set of patterns after completing execution of the current
5026 action, rather than terminating the command.
5027
5028gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an
5029 integer value greater than zero, prompt expansion of \w and \W will
5030 retain only that number of trailing pathname components and replace
5031 the intervening characters with `...'.
5032
5033hh. There are new case-modifying word expansions: uppercase (^[^]) and
5034 lowercase (,[,]). They can work on either the first character or
5035 array element, or globally. They accept an optional shell pattern
5036 that determines which characters to modify. There is an optionally-
5037 configured feature to include capitalization operators.
5038
5039ii. The shell provides associative array variables, with the appropriate
5040 support to create, delete, assign values to, and expand them.
5041
5042jj. The `declare' builtin now has new -l (convert value to lowercase upon
5043 assignment) and -u (convert value to uppercase upon assignment) options.
5044 There is an optionally-configurable -c option to capitalize a value at
5045 assignment.
5046
5047kk. There is a new `coproc' reserved word that specifies a coprocess: an
5048 asynchronous command run with two pipes connected to the creating shell.
5049 Coprocs can be named. The input and output file descriptors and the
5050 PID of the coprocess are available to the calling shell in variables
5051 with coproc-specific names.
5052
50534. New Features in Readline
5054
5055a. A new variable, rl_sort_completion_matches; allows applications to inhibit
5056 match list sorting (but beware: some things don't work right if
5057 applications do this).
5058
5059b. A new variable, rl_completion_invoking_key; allows applications to discover
5060 the key that invoked rl_complete or rl_menu_complete.
5061
5062c. The functions rl_block_sigint and rl_release_sigint are now public and
5063 available to calling applications who want to protect critical sections
5064 (like redisplay).
5065
5066d. The functions rl_save_state and rl_restore_state are now public and
5067 available to calling applications; documented rest of readline's state
5068 flag values.
5069
5070e. A new user-settable variable, `history-size', allows setting the maximum
5071 number of entries in the history list.
5072
5073f. There is a new implementation of menu completion, with several improvements
5074 over the old; the most notable improvement is a better `completions
5075 browsing' mode.
5076
5077g. The menu completion code now uses the rl_menu_completion_entry_function
5078 variable, allowing applications to provide their own menu completion
5079 generators.
5080
5081h. There is support for replacing a prefix of a pathname with a `...' when
5082 displaying possible completions. This is controllable by setting the
5083 `completion-prefix-display-length' variable. Matches with a common prefix
5084 longer than this value have the common prefix replaced with `...'.
5085
5086i. There is a new `revert-all-at-newline' variable. If enabled, readline will
5087 undo all outstanding changes to all history lines when `accept-line' is
5088 executed.
5089
5090------------------------------------------------------------------------------
0628567a
JA
5091This document details the changes between this version, bash-3.2-release,
5092and the previous version, bash-3.2-beta.
5093
50941. Changes to Bash
5095
5096a. Fixed a bug that caused the temporary environment passed to a command to
5097 affect the shell's environment under certain circumstances.
5098
5099b. Fixed a bug in the printf builtin that caused the %q format specifier to
5100 ignore empty string arguments.
5101
5102c. Improved multibyte character environment detection at configuration time.
5103
5104d. Fixed a bug in the read builtin that left spurious escape characters in the
5105 input after processing backslashes when assigning to an array variable.
5106
51072. Changes to Readline
5108
5109a. Fixed a redisplay bug that occurred in multibyte-capable locales when the
5110 prompt was one character longer than the screen width.
5111------------------------------------------------------------------------------
5112This document details the changes between this version, bash-3.2-beta,
5113and the previous version, bash-3.2-alpha.
5114
51151. Changes to Bash
5116
5117a. Changed the lexical analyzer to treat locale-specific blank characters as
5118 white space.
5119
5120b. Fixed a bug in command printing to avoid confusion between redirections and
5121 process substitution.
5122
5123c. Fixed problems with cross-compiling originating from inherited environment
5124 variables.
5125
5126d. Added write error reporting to printf builtin.
5127
5128e. Fixed a bug in the variable expansion code that could cause a core dump in
5129 a multi-byte locale.
5130
5131f. Fixed a bug that caused substring expansion of a null string to return
5132 incorrect results.
5133
5134g. BASH_COMMAND now retains its previous value while executing commands as the
5135 result of a trap, as the documentation states.
5136
51372. Changes to Readline
5138
5139a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
5140 the prompt and input line multiple times.
5141
5142b. Fixed history expansion to not be confused by here-string redirection.
5143
5144c. Readline no longer treats read errors by converting them to newlines, as
5145 it does with EOF. This caused partial lines to be returned from readline().
5146
5147------------------------------------------------------------------------------
5148This document details the changes between this version, bash-3.2-alpha,
5149and the previous version, bash-3.1-release.
5150
51511. Changes to Bash
5152
5153a. Fixed a source bug that caused the minimal configuration to not compile.
5154
5155b. Fixed memory leaks in error handling for the `read' builtin.
5156
5157c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit
5158 status.
5159
5160d. Fixed some parsing problems with compound array assignments.
5161
5162e. Added additional configuration changes for: NetBSD (incomplete multibyte
5163 character support)
5164
5165f. Fixed two bugs with local array variable creation when shadowing a variable
5166 of the same name from a previous context.
5167
5168g. Fixed the `read' builtin to restore the correct set of completion functions
5169 if a timeout occurs.
5170
5171h. Added code to defer the initialization of HISTSIZE (and its stifling of the
5172 history list) until the history file is loaded, allowing a startup file to
5173 override the default value.
5174
5175i. Tightened up the arithmetic expression parsing to produce better error
5176 messages when presented with invalid operators.
5177
5178j. Fixed the cross-compilation support to build the signal list at shell
5179 invocation rather than compile time if cross-compiling.
5180
5181k. Fixed multibyte support for non-gcc compilers (or compilers that do not
5182 allow automatic array variable sizing based on a non-constant value).
5183
5184l. Several fixes to the code that manages the list of terminated jobs and
5185 their exit statuses, and the list of active and recently-terminated jobs
5186 to avoid pid aliasing/wraparound and allocation errors.
5187
5188m. Fixed a problem that allowed scripts to die due to SIGINT while waiting
5189 for children, even when started in the background or otherwise ignoring
5190 SIGINT.
5191
5192n. Fixed a bug that caused shells invoked as -/bin/bash from not being
5193 recognized as login shells.
5194
5195o. Fixed a problem that caused shells in the background to give the terminal
5196 to a process group other than the foreground shell process group.
5197
5198p. Fixed a problem with extracting the `varname' in ${#varname}.
5199
5200q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby
5201 calling functions that may not be called in a signal handler context --
5202 but set a flag and exit afterward (like SIGINT).
5203
5204r. Changed the brace expansion code to skip over braces that don't begin a
5205 valid matched brace expansion construct.
5206
5207s. Fixed `typeset' and `declare' to not require that their shell function
5208 operands to be valid shell identifiers.
5209
5210t. Changed `test' to use access(2) with a temporary uid/euid swap when testing
5211 file attributes and running setuid, and access(2) in most other cases.
5212
5213u. Changed completion code to not attempt command name completion on a line
5214 consisting solely of whitespace when no_empty_command_completion is set.
5215
5216v. The `hash' builtin now prints nothing in posix mode when the hash table is
5217 empty, and prints a message to that effect to stdout instead of stderr
5218 when not in posix mode.
5219
5220w. Fixed a bug in the extended pattern matching code that caused it to fail to
5221 match periods with certain patterns.
5222
5223x. Fixed a bug that caused the shell to dump core when performing filename
5224 generation in directories with thousands of files.
5225
5226y. Returned to the original Bourne shell rules for parsing ``: no recursive
5227 parsing of embedded quoted strings or ${...} constructs.
5228
8868edaf 5229z. The inheritance of the DEBUG, RETURN, and ERR traps is now dependent only
0628567a
JA
5230 on the settings of the `functrace' and `errtrace' shell options, rather
5231 than whether or not the shell is in debugging mode.
5232
5233aa. Fixed a problem with $HOME being converted to ~ in the expansion of
5234 members of the DIRSTACK array.
5235
5236bb. Fixed a problem with quoted arguments to arithmetic expansions in certain
5237 constructs.
5238
5239cc. The command word completion code now no longer returns matching directories
5240 while searching $PATH.
5241
5242dd. Fixed a bug with zero-padding and precision handling in snprintf()
5243 replacement.
5244
5245ee. Fixed a bug that caused the command substitution code not to take embedded
5246 shell comments into account.
5247
5248ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an
5249 arithmetic substitution.
5250
5251gg. Fixed a bug in the prompt expansion code that inappropriately added a
5252 \001 before a \002 under certain circumstances.
5253
5254hh. Fixed a bug that caused `unset LANG' to not properly reset the locale
5255 (previous versions would set the locale back to what it was when bash
5256 was started rather than the system's "native" locale).
5257
5258ii. Fixed a bug that could cause file descriptors > 10 to not be closed even
5259 when closed explicitly by a script.
5260
5261jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting
5262 inside double-quoted command substitutions.
5263
5264kk. Fixed a bug that could cause core dumps when `return' was executed as the
5265 last element of a pipeline inside a shell function.
5266
5267ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in
5268 the jobs list.
5269
52702. Changes to Readline
5271
5272a. Fixed a problem that caused segmentation faults when using readline in
5273 callback mode and typing consecutive DEL characters on an empty line.
5274
5275b. Fixed several redisplay problems with multibyte characters, all having to
5276 do with the different code paths and variable meanings between single-byte
5277 and multibyte character redisplay.
5278
5279c. Fixed a problem with key sequence translation when presented with the
5280 sequence \M-\C-x.
5281
5282d. Fixed a problem that prevented the `a' command in vi mode from being
5283 undone and redone properly.
5284
5285e. Fixed a problem that prevented empty inserts in vi mode from being undone
5286 properly.
5287
5288f. Fixed a problem that caused readline to initialize with an incorrect idea
5289 of whether or not the terminal can autowrap.
5290
5291g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
5292 convert-meta and use \e where appropriate.
5293
5294h. Changed the default filename completion function to call the filename
5295 dequoting function if the directory completion hook isn't set. This means
5296 that any directory completion hooks need to dequote the directory name,
5297 since application-specific hooks need to know how the word was quoted,
5298 even if no other changes are made.
5299
5300i. Fixed a bug with creating the prompt for a non-interactive search string
5301 when there are non-printing characters in the primary prompt.
5302
5303j. Fixed a bug that caused prompts with invisible characters to be redrawn
5304 multiple times in a multibyte locale.
5305
5306k. Fixed a bug that could cause the key sequence scanning code to return the
5307 wrong function.
5308
5309l. Fixed a problem with the callback interface that caused it to fail when
5310 using multi-character keyboard macros.
5311
5312m. Fixed a bug that could cause a core dump when an edited history entry was
5313 re-executed under certain conditions.
5314
5315n. Fixed a bug that caused readline to reference freed memory when attmpting
5316 to display a portion of the prompt.
5317
53183. New Features in Bash
5319
5320a. Changed the parameter pattern replacement functions to not anchor the
5321 pattern at the beginning of the string if doing global replacement - that
5322 combination doesn't make any sense.
5323
5324b. When running in `word expansion only' mode (--wordexp option), inhibit
5325 process substitution.
5326
5327c. Loadable builtins now work on MacOS X 10.[34].
5328
5329d. Shells running in posix mode no longer set $HOME, as POSIX requires.
5330
5331e. The code that checks for binary files being executed as shell scripts now
5332 checks only for NUL rather than any non-printing character.
5333
5334f. Quoting the string argument to the [[ command's =~ operator now forces
5335 string matching, as with the other pattern-matching operators.
5336
53374. New Features in Readline
5338
5339a. Calling applications can now set the keyboard timeout to 0, allowing
5340 poll-like behavior.
5341
5342b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
5343 the default last-ditch startup file.
5344
5345c. The history file reading functions now allow windows-like \r\n line
5346 terminators.
5347
5348------------------------------------------------------------------------------
95732b49
JA
5349This document details the changes between this version, bash-3.1-release,
5350and the previous version, bash-3.1-rc2.
5351
53521. Changes to Readline
5353
5354a. Several changes to the multibyte redisplay code to fix problems with
5355 prompts containing invisible characters.
5356
5357------------------------------------------------------------------------------
5358This document details the changes between this version, bash-3.1-rc2,
5359and the previous version, bash-3.1-rc1.
5360
53611. Changes to Bash
5362
5363a. Fixed a bug that caused a DEBUG trap to overwrite a command string that's
5364 eventually attached to a background job.
5365
5366b. Changed some code so that filenames with leading tildes with spaces in the
5367 name aren't tilde-expanded by the bash completion code.
5368
5369c. Fixed a bug that caused the pushd builtin to fail to change to
5370 directories with leading `-'.
5371
5372d. Fixed a small memory leak in the programmable completion code.
5373
53742. Changes to Readline
5375
5376a. Fixed a redisplay bug caused by moving the cursor vertically to a line
5377 with invisible characters in the prompt in a multibyte locale.
5378
5379b. Fixed a bug that could cause the terminal special chars to be bound in the
5380 wrong keymap in vi mode.
5381
53823. New Features in Bash
5383
5384a. If compiled for strict POSIX conformance, LINES and COLUMNS may now
5385 override the true terminal size.
5386
53874. New Features in Readline
5388
5389a. A new external application-controllable variable that allows the LINES
5390 and COLUMNS environment variables to set the window size regardless of
5391 what the kernel returns.
5392
5393------------------------------------------------------------------------------
5394This document details the changes between this version, bash-3.1-rc1,
5395and the previous version, bash-3.1-beta1.
5396
53971. Changes to Bash
5398
0628567a 5399a. Fixed a bug that could cause core dumps due to accessing the current
95732b49
JA
5400 pipeline while in the middle of modifying it.
5401
5402b. Fixed a bug that caused pathnames with backslashes still quoting characters
5403 to be passed to opendir().
5404
5405c. Command word completion now obeys the setting of completion-ignore-case.
5406
5407d. Fixed a problem with redirection that caused file descriptors greater than
5408 2 to be inappropriately marked as close-on-exec.
5409
5410e. In Posix mode, after `wait' is called to wait for a particular process
5411 explicitly, that process is removed from the list of processes known to
5412 the shell, and subsequent attempts to wait for it return errors.
5413
5414f. Fixed a bug that caused extended pattern matching to incorrectly scan
5415 backslash-escaped pattern characters.
5416
5417g. Fixed a synchronization problem that could cause core dumps when handling
5418 a SIGWINCH.
5419
5420h. Fixed a bug that caused an unmatched backquote to be accepted without an
5421 error when processing here documents.
5422
5423i. Fixed a small memory leak in the `cd' builtin.
5424
5425j. Fix for MacOS X so it gets the values for the HOSTTYPE, MACHTYPE, and
5426 OSTYPE variables at build time, to support universal binaries.
5427
5428k. Fixed a bug that could cause an exit trap to return the exit status of
5429 the trap command rather than the status as it was before the trap was
5430 run as the shell's exit status.
5431
54322. New Features in Bash
5433
54343. Changes to Readline
5435
5436a. Fixed a bug that caused reversing the incremental search direction to
5437 not work correctly.
5438
5439b. Fixed the vi-mode `U' command to only undo up to the first time insert mode
5440 was entered, as Posix specifies.
5441
5442c. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
5443 place.
5444
54454. New Features in Readline
5446
5447a. New application-callable auxiliary function, rl_variable_value, returns
5448 a string corresponding to a readline variable's value.
5449
5450b. When parsing inputrc files and variable binding commands, the parser
5451 strips trailing whitespace from values assigned to boolean variables
5452 before checking them.
5453
5454
5455------------------------------------------------------------------------------
5456This document details the changes between this version, bash-3.1-beta1,
5457and the previous version, bash-3.1-alpha1.
5458
54591. Changes to Bash
5460
5461a. Added some system-specific signal names.
5462
5463b. Fixed a typo in the ulimit builtin to make `x' the right option to
8868edaf 5464 manipulate the limit on file locks.
95732b49
JA
5465
5466c. Fixed a problem with using += to append to index 0 of an array variable
5467 when not using subscript syntax.
5468
5469d. A few changes to configure.in to remove calls to obsolete or outdated
5470 macros.
5471
5472e. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
5473 made when the variable is set in the temporary environment to a command.
5474
5475f. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
5476 made when the variable is modified using `printf -v'.
5477
5478g. The export environment is now remade on cygwin when HOME is changed, so
5479 DLLs bash is linked against pick up the new value. This fixes problems
5480 with tilde expansion when linking against and already-installed readline.
5481
5482h. Small fix to the logic for performing tilde expansion in posix mode, so
5483 expansion on the right-hand side of an assignment statement takes place.
5484
5485i. Fixed a bug that prevented redirections associated with a shell function
5486 from being executed when in a subshell.
5487
5488j. Fixed `source' and `.' builtins to not require an executable file when
5489 searching $PATH for a file to source.
5490
5491k. Fixed a bug that caused incorrect word splitting in a function when IFS
5492 was declared local, then unset.
5493
5494l. Fixed a problem with the `kill' builtin that prevented sending signals
5495 to a process group under certain circumstances when providing a pid < 0.
5496
5497m. When in POSIX mode, `pwd' now checks that the value it prints is the same
5498 directory as `.', even when displaying $PWD.
5499
5500n. Fixed a problem with the `read' builtin when reading a script from standard
5501 input and reading data from the same file.
5502
5503o. Fixed a problem with the `type' and `command' builtins that caused absolute
5504 pathnames to be displayed incorrectly.
5505
5506p. Some changes to the `bg' builtin for POSIX conformance.
5507
5508q. The `fc' builtin now removes the `fc' command that caused it to invoke an
5509 editor on specified history entries from the history entirely, rather than
5510 simply ignoring it.
5511
5512r. When in POSIX mode, the `v' command in vi editing mode simply invokes vi
5513 on the current command, rather than checking $FCEDIT and $EDITOR.
5514
5515s. Fixed a small memory leak in the pathname canonicalization code.
5516
5517t. Fixed a bug that caused the expanded value of a $'...' string to be
5518 incorrectly re-quoted if it occurred within a double-quoted ${...}
5519 parameter expansion.
5520
5521u. Restored default emacs-mode key binding of M-TAB to dynamic-complete-history.
5522
5523v. Fixed a bug that caused core dumps when interrupting loops running builtins
5524 on some systems.
5525
5526w. Make sure that some of the functions bash provides replacements for are
5527 not cpp defines.
5528
5529x. The code that scans embedded commands for the parser (`...` and $(...)) is
5530 now more aware of embedded comments and their effect on quoted strings.
5531
5532y. Changed the `-n' option to the `history' builtin to not reset the number of
5533 history lines read in the current session after reading the new lines from
5534 the history file if the history is being appended when it is written to
5535 the file, since the appending takes care of the problem that the adjustment
5536 was intended to solve.
5537
5538z. Improved the error message displayed when a shell script fails to execute
5539 because the environment and size of command line arguments are too large.
5540
5541aa. A small fix to make sure that $HISTCMD is evaluated whenever the shell is
5542 saving commands to the history list, not just when HISTSIZE is defined.
5543
55442. Changes to Readline
5545
5546a. The `change-case' command now correctly changes the case of multibyte
5547 characters.
5548
5549b. Changes to the shared library construction scripts to deal with Windows
5550 DLL naming conventions for Cygwin.
5551
5552c. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
5553 SIGWINCH.
5554
5555d. Fixed the non-incremental search code in vi mode to dispose of any current
5556 undo list when copying a line from the history into the current editing
5557 buffer.
5558
5559e. The variable assignment code now ignores whitespace at the end of lines
5560 when assigning to boolean variables.
5561
5562f. The `C-w' binding in incremental search now understands multibyte
5563 characters.
5564
55653. New Features in Bash
5566
5567a. A new configuration option, `--enable-strict-posix-default', which will
5568 build bash to be POSIX conforming by default.
5569
55704. New Features in Readline
5571
5572a. If the rl_completion_query_items is set to a value < 0, readline never
5573 asks the user whether or not to view the possible completions.
5574
5575------------------------------------------------------------------------------
5576This document details the changes between this version, bash-3.1-alpha1,
5577and the previous version, bash-3.0-release.
5578
55791. Changes to Bash
5580
5581a. Fixed a bug that caused bash to crash if referencing an unset local array.
5582
5583b. Fixed a problem that caused tilde expansion to not be performed before
5584 attempting globbing word completion.
5585
5586c. Fixed an incompatibility so that a first argument to trap that's a valid
5587 signal number will be trated as a signal rather than a command to execute.
5588
5589d. Fixed ${#word} expansion to correctly compute the length of a string
5590 containing multibyte characters.
5591
5592e. Fixed a bug that caused bash to not pass the correct flags for signal
5593 disposition to child processes.
5594
5595f. Fixed a bug that caused `fc -l' to list one too many history entries.
5596
5597g. Some fixes to `fc' for POSIX conformance.
5598
5599h. Some fixes to job status display for POSIX conformance.
5600
5601i. Fixed a bug that caused `command -v' to display output if a command was not
5602 found -- it should be silent.
5603
5604j. In POSIX mode, `type' and `command -[vV]' do not report non-executable
5605 files, even if the shell will attempt to execute them.
5606
5607k. Fixed a bug that caused the `==' operator to the [[ command to not attempt
5608 extended pattern matching.
5609
5610l. Fixed the brace expansion code to handle characters whose value exceeds 128.
5611
5612m. Fixed `printf' to handle strings with a leading `\0' whose length is
5613 non-zero.
5614
5615n. Fixed a couple of problems with brace expansion where `${' was handled
5616 incorrectly.
5617
5618o. Fixed off-by-one error when calculating the upper bound of `offset' when
5619 processing the ${array[@]:offset:length} expansion.
5620
5621p. System-specific configuration changes for: FreeBSD 5.x, Interix, MacOS X
5622 10.4, Linux 2.4+ kernels, Linux 3.x kernels, Dragonfly BSD, QNX 6.x,
5623 Cygwin
5624
5625q. Fixed a bug that caused the shell to ignore the status of the rightmost
5626 command in a pipeline when the `pipefail' option was enabled.
5627
5628r. Fixed a completion bug that caused core dumps when expanding a directory
5629 name.
5630
5631s. Fixed a bug that prevented `hash -d' from removing commands from the hash
5632 table.
5633
5634t. Fixed word splitting to avoid really bad quadratic performance when
5635 expanding long lists.
5636
5637u. Fixed a bug that caused negative offsets in substring expansion to use the
5638 wrong values.
5639
5640v. Fixed a bug in printf that caused it to not return failure on write errors.
5641
5642w. Fixed a bug that caused commands in subshells to not be properly timed.
5643
5644x. The shell parser no longer attempts to parse a compound assignment specially
5645 unless in a position where an assignment statement is acceptable or parsing
5646 arguments to a builtin that accepts assignment statements.
5647
5648y. Fixed a problem that caused a `case' statement to be added to the history
5649 incorrectly as a single command if the `case word' was on one line and the
5650 `in' on another.
5651
5652z. Fixed a problem that caused internal shell quoting characters to be
5653 incorrectly quoted with backslashes under some circumstances.
5654
5655aa. The shell now performs correct word splitting when IFS contains multibyte
5656 characters.
5657
5658bb. The mail checking code now resets the cached file information if the size
5659 drops to 0, even if the times don't change.
5660
5661cc. A completed command name that is found in $PATH as well as the name of a
5662 directory in the current directory no longer has a slash appended in certain
5663 circumstances: a single instance found in $PATH when `.' is not in $PATH,
5664 and multiple instances found in $PATH, even when `.' is in $PATH.
5665
5666dd. Incorporated tilde expansion into the word expansion code rather than as a
5667 separately-called function, fixing some cases where it was performed
5668 inappropriately (e.g., after the second `=' in an assignment statement or
5669 in a double-quoted parameter expansion).
5670
5671ee. Fixed several bugs encountered when parsing compound assignment statements,
5672 so that compound assignments appearing as arguments to builtins are no
5673 longer double-expanded.
5674
5675ff. Fixed a bug in the command execution code that caused asynchronous commands
5676 containing command substitutions to not put the terminal in the wrong
5677 process group.
5678
5679gg. Bash now handles the case where the WCONTINUED flag causes waitpid() to
5680 return -1/EINVAL at runtime as well as configuration time.
5681
5682hh. Fixed parser to generate an error when the pipeline `argument' to `!' or
5683 `time' is NULL.
5684
5685ii. The shell now takes a little more care when manipulating file descriptors
5686 greater than 9 with the `exec' builtin.
5687
5688jj. Fixed a bug that caused variable assignments preceding the `command' builtin
5689 preceding a special builtin to be preserved after the command completed in
5690 POSIX mode.
5691
5692kk. Fixed a bug that allowed variables beginning with a digit to be created.
5693
5694ll. Fixed a bug that caused a \<newline> to be removed when parsing a $'...'
5695 construct.
5696
5697mm. A shell whose name begins with `-' will now be a restricted shell if the
5698 remainder of the name indicates it should be restricted.
5699
5700nn. Fixed a bug that could cause a core dump if FUNCNAME were changed or unset
5701 during a function's execution.
5702
5703oo. Fixed a bug that caused executing a `return' in a function to not execute
5704 a RETURN trap. The RETURN trap is inherited by shell functions only if
5705 function tracing is globally enabled or has been enabled for that function.
5706
5707pp. Fixed cases where var[@] was not handled exactly like var, when var is a
5708 scalar variable.
5709
5710qq. Fixed a bug that caused the first character after a SIGINT to be discarded
5711 under certain circumstances.
5712
5713rr. Fixed exit status code so that a suspended job returns 128+signal as its
5714 exit status (preventing commands after it in `&&' lists from being
5715 executed).
5716
5717ss. Fixed a bug that caused the shell parser state to be changed by executing
5718 a shell function as a result of word completion.
5719
5720tt. Fixed a long-standing bug that caused '\177' characters in variable
5721 values to be discarded when expanded in double-quoted strings.
5722
5723uu. Fixed a bug that caused $RANDOM to be re-seeded multiple times in a
5724 subshell environment.
5725
5726vv. Extensive changes to the job management code to avoid the pid-reuse and
5727 pid-aliasing problems caused by retaining the exit status of too many jobs,
5728 but still retain as many background job statuses as POSIX requires.
5729
5730ww. Fixed a parser bug in processing \<newline> that caused things like
5731
5732 ((echo 5) \
5733 (echo 6))
5734
5735 to not work correctly.
5736
5737xx. `pwd -P' now sets $PWD to a directory name containing no symbolic links
5738 when in posix mode, as POSIX requires.
5739
5740yy. In posix mode, bash no longer sets $PWD to a name containing no symbolic
5741 links if a directory is chosen from $CDPATH.
5742
5743zz. The word splitting code now treats an IFS character that is not space,
5744 tab, or newline and any adjacent IFS white space as a single delimiter, as
5745 SUSv3/XPG6 require.
5746
5747aaa. The `read' builtin now checks whether or not the number of fields read is
5748 exactly the same as the number of variables instead of just assigning the
5749 rest of the line (minus any trailing IFS white space) to the last
5750 variable. This is what POSIX/SUS/XPG all require.
5751
5752bbb. Fixed a bug that caused `read' to always check whether or not fd 0 was a
5753 pipe, even when reading from another file descriptor.
5754
5755ccc. Fixed a bug that caused short-circuiting of execution even if the return
5756 value was being inverted.
5757
5758ddd. Fixed a bug that caused a core dump while decoding \W escapes in PS1 if
5759 PWD was unset.
5760
5761eee. Fixed a bug in `read' that counted internal quoting characters for the
5762 purposes of `read -n'.
5763
5764fff. Fixed a bug so that a function definition in a pipeline causes a child
5765 process to be forked at the right time.
5766
5767ggg. Bash will not attempt to link against a readline library that doesn't
5768 have rl_gnu_readline_p == 1.
5769
5770hhh. Fixed a bug that caused `read' to consume one too many characters when
5771 reading a fixed number of characters and the Nth character is a backslash.
5772
5773iii. Fixed a bug that caused `unset' on variables in the temporary environment
5774 to leave them set when `unset' completed.
5775
5776jjj. Fixed a bug that caused bash to close fd 2 if an `exec' failed and the
5777 shell didn't exit.
5778
5779kkk. The completion code is more careful to not turn `/' or `///' into `//',
5780 for those systems on which `//' has special meaning.
5781
5782lll. Fixed a bug that caused command substitution in asynchronous commands to
5783 close the wrong file descriptors.
5784
5785mmm. The shell no longer prints status messages about terminated background
5786 processes unless job control is active.
5787
5788nnn. Fixed a bug that prevented multiple consecutive invocations of `history -s'
5789 from adding all the commands to the history list.
5790
5791ooo. Added a couple of changes to make arithmetic expansion more consistent in
5792 all its contexts (still not perfect).
5793
5794ppp. Fixed a bug that caused the parser to occasionally not find the right
5795 terminating "`" in an old-style command substitution.
5796
5797qqq. Fixed a bug that caused core dumps when the shell was reading its non-
5798 interactive input from fd 0 and fd 0 was duplicated and restored using a
5799 combination of `exec' (to save) and redirection (to restore).
5800
5801rrr. Fixed a problem that caused loops in sourced scripts to not be cleaned
5802 up properly when a `return' is executed.
5803
5804sss. Change internal command substitution completion function to append a slash
5805 to directory names in the command.
5806
58072. Changes to Readline
5808
5809a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
5810 incorrectly.
5811
5812b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
5813 line correctly.
5814
5815c. Fixed a problem in computing the number of invisible characters on the first
5816 line of a prompt whose length exceeds the screen width.
5817
5818d. Fixed vi-mode searching so that failure preserves the current line rather
5819 than the last line in the history list.
5820
5821e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
5822 end-of-line when manipulating multibyte characters.
5823
5824f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
5825 end-of-line when manipulating multibyte characters.
5826
5827g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
5828 prompts longer than the screen width containing multibyte characters,
5829
5830h. Fix the calculation of the number of physical characters in the prompt
5831 string when it contains multibyte characters.
5832
5833i. A non-zero value for the `rl_complete_suppress_append' variable now causes
5834 no `/' to be appended to a directory name.
5835
5836j. Fixed forward-word and backward-word to work when words contained
5837 multibyte characters.
5838
5839k. Fixed a bug in finding the delimiter of a `?' substring when performing
5840 history expansion in a locale that supports multibyte characters.
5841
5842l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
5843
5844m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
5845 of the `convert-meta' variable.
5846
5847n. Fixed saving and restoring primary prompt when prompting for incremental
5848 and non-incremental searches; search prompts now display multibyte
5849 characters correctly.
5850
5851o. Fixed a bug that caused keys originally bound to self-insert but shadowed
5852 by a multi-character key sequence to not be inserted.
5853
5854p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
5855 dereferenced if NULL (matching the documentation).
5856
5857q. Extensive changes to readline to add enough state so that commands
5858 requiring additional characters (searches, multi-key sequences, numeric
5859 arguments, commands requiring an additional specifier character like
5860 vi-mode change-char, etc.) work without synchronously waiting for
5861 additional input.
5862
5863r. Lots of changes so readline builds and runs on MinGW.
5864
5865s. Readline no longer tries to modify the terminal settings when running in
5866 callback mode.
5867
5868t. The Readline display code no longer sets the location of the last invisible
5869 character in the prompt if the \[\] sequence is empty.
5870
58713. New Features in Bash
5872
5873a. Bash now understands LC_TIME as a special variable so that time display
5874 tracks the current locale.
5875
5876b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created
5877 as `invisible' variables and may not be unset.
5878
5879c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't
5880 try to interpret any options at all, as POSIX requires.
5881
5882d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.
5883
5884e. Fixed vi-mode word completion and glob expansion to perform tilde
5885 expansion.
5886
5887f. The `**' mathematic exponentiation operator is now right-associative.
5888
5889g. The `ulimit' builtin has new options: -i (max number of pending signals),
5890 -q (max size of POSIX message queues), and -x (max number of file locks).
5891
5892h. A bare `%' once again expands to the current job when used as a job
5893 specifier.
5894
5895i. The `+=' assignment operator (append to the value of a string or array) is
5896 now supported for assignment statements and arguments to builtin commands
5897 that accept assignment statements.
5898
5899j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.
5900
5901k. The `gnu_errfmt' option is enabled automatically if the shell is running
5902 in an emacs terminal window.
5903
5904l. New configuration option: --single-help-strings. Causes long help text
5905 to be written as a single string; intended to ease translation.
5906
5907m. The COMP_WORDBREAKS variable now causes the list of word break characters
5908 to be emptied when the variable is unset.
5909
5910n. An unquoted expansion of $* when $IFS is empty now causes the positional
5911 parameters to be concatenated if the expansion doesn't undergo word
5912 splitting.
5913
5914o. Bash now inherits $_ from the environment if it appears there at startup.
5915
5916p. New shell option: nocasematch. If non-zero, shell pattern matching ignores
5917 case when used by `case' and `[[' commands.
5918
5919q. The `printf' builtin takes a new option: -v var. That causes the output
5920 to be placed into var instead of on stdout.
5921
5922r. By default, the shell no longer reports processes dying from SIGPIPE.
5923
5924s. Bash now sets the extern variable `environ' to the export environment it
5925 creates, so C library functions that call getenv() (and can't use the
5926 shell-provided replacement) get current values of environment variables.
5927
59284. New Features in Readline
5929
5930a. The key sequence sent by the keypad `delete' key is now automatically
5931 bound to delete-char.
5932
5933b. A negative argument to menu-complete now cycles backward through the
5934 completion list.
5935
5936c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
5937 readline will bind the terminal special characters to their readline
5938 equivalents when it's called (on by default).
5939
5940d. New bindable command: vi-rubout. Saves deleted text for possible
5941 reinsertion, as with any vi-mode `text modification' command; `X' is bound
5942 to this in vi command mode.
5943
5944------------------------------------------------------------------------------
b80f6443
JA
5945This document details the changes between this version, bash-3.0-release,
5946and the previous version, bash-3.0-rc1.
5947
59481. Changes to Bash
5949
5950a. Fixed a boundary overrun that could cause segmentation faults when the
5951 completion code hands an incomplete construct to the word expansion
5952 functions.
5953
5954b. Changed posix mode behavior so that an error in a variable assignment
5955 preceding a special builtin causes a non-interactive shell to exit.
5956
5957c. Change the directory expansion portion of the completion code to not
5958 expand embedded command substitutions if the directory name appears in
5959 the file system.
5960
5961d. Fixed a problem that caused `bash -r' to turn on restrictions before
5962 reading the startup files.
5963
5964e. Fixed a problem with the default operation of the `umask' builtin.
5965
59662. Changes to Readline
5967
5968a. Fixed a problem with readline saving the contents of the current line
5969 before beginning a non-interactive search.
5970
5971b. Fixed a problem with EOF detection when using rl_event_hook.
5972
5973c. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
5974 arguments.
5975
5976------------------------------------------------------------------------------
5977This document details the changes between this version, bash-3.0-rc1,
5978and the previous version, bash-3.0-beta1.
5979
59801. Changes to Bash
5981
5982a. Fixed a bug that caused incorrect behavior when referecing element 0 of
5983 an array using $array, element 0 was unset, and `set -u' was enabled.
5984
5985b. System-specific changes for: SCO Unix 3.2, Tandem.
5986
5987c. Fixed a bug that caused inappropriate word splitting when a variable was
5988 expanded within a double-quoted string that also included $@.
5989
5990d. Fixed a bug that caused `pwd' to not display anything in physical mode
5991 when the file system had changed underneath the shell.
5992
5993e. Fixed a bug in the pre- and post- increment and decrement parsing in the
5994 expression evaluator that caused errors when the operands and corresponding
5995 operators were separated by whitespace.
5996
5997f. Fixed a bug that caused `history -p' to add an entry to the history list,
5998 counter to the documentation. (Keeps the history expansions invoked by
5999 emacs-mode command line editing from doing that as well.)
6000
6001g. Fixed a bug that could cause a core dump if `cd' is asked to print out a
6002 pathname longer than PATH_MAX characters.
6003
6004h. Fixed a bug that caused jobs to be put into the wrong process group under
6005 some circumstances after enabling job control with `set -m'.
6006
6007i. `unalias' now returns failure if no alias name arguments are supplied.
6008
6009j. Documented the characters not allowed to appear in an alias name.
6010
6011k. $* is no longer expanded as if in double quotes when it appears in the
6012 body of a here document, as the SUS seems to require.
6013
6014l. The `bashbug' script now uses a directory in $TMPDIR for exclusive
6015 access rather than trying to guess how the underlying OS provides for
6016 secure temporary file creation.
6017
6018m. Fixed a few problems with `cd' and `pwd' when asked to operate on pathnames
6019 longer than PATH_MAX characters.
6020
6021n. Fixed a memory leak caused when creating multiple local array variables
6022 with identical names.
6023
6024o. Fixed a problem with calls to getcwd() so that bash now operates better
6025 when the full pathname to the current directory is longer than PATH_MAX
6026 bytes.
6027
6028p. The `trap' builtin now reports an error if a single non-signal argument
6029 is specified.
6030
6031q. Fixed a bug that caused `umask' to not work correctly when presented
6032 with a mask of all 0s.
6033
6034r. When `getopts' reaches the end of options, OPTARG is unset, as POSIX
6035 appears to specify.
6036
6037s. Interactive mode now depends on whether or not stdin and stderr are
6038 connected to a tty; formerly it was stdin and stdout. POSIX requires
6039 this.
6040
6041t. Fixed vi-mode completion to work more as POSIX specifies (e.g., doing the
6042 right kind of filename generation).
6043
60442. Changes to Readline
6045
6046a. Fixed a problem that could cause readline to refer to freed memory when
6047 moving between history lines while doing searches.
6048
6049b. Improvements to the code that expands and displays prompt strings
6050 containing multibyte characters.
6051
6052c. Fixed a problem with vi-mode not correctly remembering the numeric argument
6053 to the last `c'hange command for later use with `.'.
6054
6055d. Fixed a bug in vi-mode that caused multi-digit count arguments to work
6056 incorrectly.
6057
6058e. Fixed a problem in vi-mode that caused the last text modification command
6059 to not be remembered across different command lines.
6060
6061f. Fixed problems with changing characters and changing case at the end of
6062 the line.
6063
60643. New Features in Bash
6065
6066a. The `jobs', `kill', and `wait' builtins now accept job control notation
6067 even if job control is not enabled.
6068
6069b. The historical behavior of `trap' that allows a missing `action' argument
6070 to cause each specified signal's handling to be reset to its default is
6071 now only supported when `trap' is given a single non-option argument.
6072
60734. New Features in Readline
6074
6075a. When listing completions, directories have a `/' appended if the
6076 `mark-directories' option has been enabled.
6077
6078------------------------------------------------------------------------------
6079This document details the changes between this version, bash-3.0-beta1,
6080and the previous version, bash-3.0-alpha.
6081
60821. Changes to Bash
6083
6084a. Fixes to build correctly when arrays are not compiled into the shell.
6085
6086b. Fixed command substitution to run any exit trap defined in the command
6087 substitution before returning; the exit trap is not inherited from the
6088 calling shell.
6089
6090c. Fixes to process group synchronization code so that every child process
6091 attempts to set the terminal's process group; fixes some synchronization
6092 problems on Linux kernels that schedule the child to always run before
6093 the parent.
6094
6095d. Fixed processing of octal and hex constants in printf builtin for POSIX.2
6096 compliance.
6097
6098e. Fixed a couple of core dumps in the pattern removal code.
6099
6100f. Fixes to the array subrange extraction code to deal better with sparse
6101 arrays.
6102
6103g. Parser errors and other errors that result in the shell exiting now cause
6104 the exit trap to be run.
6105
6106h. Change the command substitution completion functions to not append any
6107 closing quote, because it would be inserted a closing "`" or ")".
6108
6109i. Fix history initialization so assignments to $histchars made in startup
6110 files are honored.
6111
6112j. If an exit trap does not contain a call to `exit', the shell now uses
6113 the exit status of the last command executed before the trap as the exit
6114 status of the shell.
6115
6116k. The parser now prompts with $PS2 if it reads a newline while parsing a
6117 compound array assignment statement.
6118
6119l. When performing a compound array assignment, the parser doesn't treat
6120 words of the form [index]=value as assignments if they're the result of
6121 expansions.
6122
6123m. Fixed a bug that caused `return' executed in a trap command to make the
6124 shell think it was still running the trap.
6125
6126n. Fixed the value of errno set by the pathname canonicalization functions.
6127
6128o. Changed the grammar so that `time' alone on a line times a null command
6129 rather than being a syntax error.
6130
95732b49 6131p. The pattern substitution code no longer performs quote removal on the
b80f6443
JA
6132 pattern before trying to match it, as the pattern removal functions do.
6133
6134q. Fixed a bug that could cause core dumps when checking whether a quoted
6135 command name was being completed.
6136
6137r. Fixes to the pattern removal and pattern replacement expansions to deal
6138 with multibyte characters better (and faster).
6139
6140s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly
6141 multibyte) characters instead of raw bytes.
6142
6143t. Fixed a bug that caused some key bindings set in an inputrc to be ignored
6144 at shell startup.
6145
6146u. Fixed a bug that caused unsetting a local variable within a function to
6147 not work correctly.
6148
6149v. Fixed a bug that caused invalid variables to be created when using
6150 `read -a'.
6151
6152w. Fixed a bug that caused "$@" to expand incorrectly when used as the right
6153 hand side of a parameter expansion such as ${word:="$@"} if the first
6154 character of $IFS was not a space.
6155
6156x. Fixed a slight cosmetic problem when printing commands containing a
6157 `>&word' redirection.
6158
6159y. Fixed a problem that could cause here documents to not be created correctly
6160 if the system temporary directory did not allow writing.
6161
61622. Changes to Readline
6163
6164a. Change to history expansion functions to treat `^' as equivalent to word
8868edaf 6165 one, as the documentation states.
b80f6443
JA
6166
6167b. Some changes to the display code to improve display and redisplay of
6168 multibyte characters.
6169
6170c. Changes to speed up the multibyte character redisplay code.
6171
6172d. Fixed a bug in the vi-mode `E' command that caused it to skip over the
6173 last character of a word if invoked while point was on the word's
6174 next-to-last character.
6175
6176e. Fixed a bug that could cause incorrect filename quoting when
6177 case-insensitive completion was enabled and the word being completed
6178 contained backslashes quoting word break characters.
6179
6180f. Fixed a bug in redisplay triggered when the prompt string contains
6181 invisible characters.
6182
6183g. Fixed some display (and other) bugs encountered in multibyte locales
6184 when a non-ascii character was the last character on a line.
6185
6186h. Fixed some display bugs caused by multibyte characters in prompt strings.
6187
6188i. Fixed a problem with history expansion caused by non-whitespace characters
6189 used as history word delimiters.
6190
61913. New Features in Bash
6192
6193a. printf builtin understands two new escape sequences: \" and \?.
6194
6195b. `echo -e' understands two new escape sequences: \" and \?.
6196
6197c. The GNU `gettext' package and libintl have been integrated; the shell's
6198 messages can be translated into different languages.
6199
6200d. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.
6201
6202e. The error message printed when bash cannot open a shell script supplied
6203 as argument 1 now includes the name of the shell, to better identify
6204 the error as coming from bash.
6205
62064. New Features in Readline
6207
6208a. New application variable, rl_completion_quote_character, set to any
6209 quote character readline finds before it calls the application completion
6210 function.
6211
6212b. New application variable, rl_completion_suppress_quote, settable by an
6213 application completion function. If set to non-zero, readline does not
6214 attempt to append a closing quote to a completed word.
6215
6216c. New application variable, rl_completion_found_quote, set to a non-zero
6217 value if readline determines that the word to be completed is quoted.
6218 Set before readline calls any application completion function.
6219
6220d. New function hook, rl_completion_word_break_hook, called when readline
6221 needs to break a line into words when completion is attempted. Allows
6222 the word break characters to vary based on position in the line.
6223
6224e. New bindable command: unix-filename-rubout. Does the same thing as
6225 unix-word-rubout, but adds `/' to the set of word delimiters.
6226
6227------------------------------------------------------------------------------
6228This document details the changes between this version, bash-3.0-alpha,
6229and the previous version, bash-2.05b-release.
6230
62311. Changes to Bash
6232
6233a. Fixes so that the shell will compile without some of the default options
6234 defined.
6235
6236b. Fixed an error message that did not pass enough arguments to printf.
6237
6238c. Fixed a bug that caused input redirection to a builtin inside a script
6239 being read from standard input to result in the rest of the already-
6240 read and buffered script to be discarded.
6241
6242d. Fixed a bug that caused subshell initialization to close the file
6243 descriptor from which the shell was reading a script under certain
6244 circumstances.
6245
6246e. Fixed a bug that caused the shell to not advance a string pointer over
6247 a null wide character when doing string operations.
6248
6249f. Fixed the internal logout code so that shells that time out waiting for
6250 input (using $TMOUT) run ~/.bash_logout.
6251
6252g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD.
6253
6254h. The parser no longer adds implicit double quotes to ((...)) arithmetic
6255 commands.
6256
6257i. The ((...)) arithmetic command evaluation code was fixed to not dump core
6258 when the expanded string is null.
6259
6260j. The ((...)) arithmetic command evaluation code was fixed to not perform
6261 variable assignments while expanding the expression.
6262
6263k. Fixed a bug that caused word splitting to be performed incorrectly when
6264 IFS is set, but null.
6265
6266l. Fixed a bug in brace expansion that caused a quoted `$' preceding an
6267 open brace to inhibit brace expansion.
6268
6269m. Fixed a bug that caused a leading `-' in the shell's name to cause it to
6270 not be recognized as a restricted shell.
6271
6272n. Fixed a bug in the arithmetic evaluation code that could cause longjmps
6273 to an invalid location and result in a core dump.
6274
6275o. Fixed a bug in the calculation of how many history lines are new in a
6276 single shell session when reading new history lines from a file with
6277 `history -n'.
6278
6279p. Fixed a bug in pathname canonicalization that caused the shell to dump
6280 core when presented with a pathname longer than PATH_MAX.
6281
6282q. Fixed the parser so that it doesn't try to compare a char variable to
6283 EOF, which fails when chars are unsigned.
6284
6285r. Fixed a bug in the simple command execution code that caused occasional
6286 core dumps.
6287
6288s. The shell does a better job of saving any partial parsing state during
6289 operations which cause a command to be executed while a line is being
6290 entered and parsed.
6291
6292t. The completion code now splits words more like the expansion code when
6293 $IFS is used to split.
6294
6295u. The locale code does a better job of recomputing the various locale
6296 variable values when LC_ALL is unset.
6297
6298v. The programmable completion code does a better job of dequoting expanded
6299 word lists before comparing them against the word to be matched.
6300
6301w. The shell no longer seg faults if the expanded value of $PS4 is null
6302 and `set -x' is enabled.
6303
6304x. Fixed a bug that caused core dumps when a here string expanded to NULL.
6305
6306y. The mail checking code now makes sure the mailbox is bigger before
6307 reporting the existence of new mail.
6308
6309z. The parser does not try to expand $'...' and $"..." when the appear
6310 within double quotes unless the `extquote' option has been enabled with
6311 `shopt'. For backwards compatibility, it is enabled by default.
6312
6313aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use
6314 $@ instead of "$@" for the implicit list of arguments.
6315
6316bb. Fixed a bug that caused a subshell of a restricted shell (e.g., one
6317 spawned to execute a pipeline) to not exit immediately if attempting
6318 to use a command containing a slash.
6319
6320cc. Fixed a problem with empty replacements for a pattern that doesn't match
6321 when performing ${param/word/} expansion.
6322
6323dd. Word expansions performed while expanding redirections no longer search
6324 a command's temporary environment to expand variable values.
6325
6326ee. Improvements to the alias expansion code when expanding subsequent words
6327 because an aliase's value ends with a space.
6328
6329ff. `cd -' now prints the current working directory after a successful chdir
6330 even when the shell is not interactive, as the standard requires.
6331
6332gg. The shell does a better job of ensuring a child process dies of SIGINT
6333 before resending SIGINT to itself.
6334
6335hh. The arithmetic expansion variable assignment code now does the right
6336 thing when assigning to `special' variables like OPTIND.
6337
6338ii. When history expansion verification is enabled, the bash readline helper
6339 functions that do history expansion on the current line don't print
6340 the results.
6341
6342jj. Fixed bugs with multiple consecutive alias expansion when one of the
6343 expansions ends with a space.
6344
6345kk. Fixed a problem in the programmable completion code that could cause core
6346 dumps when trying to initialize a set of possible completions from a
6347 list of variables.
6348
6349ll. The \[ and \] escape characters are now ignored when decoding the prompt
6350 string if the shell is started with editing disabled.
6351
6352mm. Fixed a bug that could leave extra characters in a string when doing
6353 quoted null character removal.
6354
6355nn. Command substitution and other subshell operations no longer reset the
6356 line number (aids the bash debugger).
6357
6358oo. Better line number management when executing simple commands, conditional
6359 commands, for commands, and select commands.
6360
6361pp. The globbing code now uses malloc, with its better failure properties,
6362 rather than alloca().
6363
6364qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the
6365 appropriate array element instead of a variable named `a[2]'.
6366
6367rr. Fixed a bug in the handling of a `?(...)' pattern immediately following
6368 a `*' when extglob is enabled.
6369
6370ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is
6371 invoked in a function to misbehave.
6372
6373tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped
6374 by the internal shell string quoting functions.
6375
6376uu. Fixed a bug that caused quoted null characters in an expanded word list
6377 to be inappropriately assigned to an array variable when using `read -a'.
6378
6379vv. Fixed a bug that caused redirections accompanying a null command to persist
6380 in the current shell.
6381
6382ww. Fixed a bug that caused the prompt to be printed when the shell was
6383 expanding a multiline alias.
6384
6385xx. Fixed a bug that resulted in core dumps when the completion for a command
6386 changed the compspec.
6387
6388yy. Fixed a bug that caused evaluation of programmable completions to print
6389 notifications of completed jobs.
6390
6391zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb'
6392 (which is what emacs shell windows do).
6393
6394aaa. In posix mode, `kill -l' causes signal names to be displayed without
6395 a leading `SIG'.
6396
6397bbb. Clear error flag on standard output so it doesn't persist across multiple
6398 builtin commands.
6399
6400ccc. In posix mode, `alias' displays alias values without the leading `alias',
6401 so the output cannot be used as subsequent input.
6402
6403ddd. In posix mode, the `trap' builtin doesn't check whether or not its
6404 first argument is a signal specification and revert the signal handling
6405 to its original disposition if it is.
6406
6407eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the
6408 pattern substitution and removal expansions.
6409
6410fff. Fixed several problems with the handling of ${array[@]}, ${array[*]},
6411 $@, and $* by the indirect variable expansion code.
6412
6413ggg. Fixed a bug that did not allow `time' to be aliased.
6414
6415hhh. Improved the mail checking code so it won't check (and possibly cause an
6416 NFS file system mount) until MAILPATH or MAIL is given a value -- there
6417 is no default if DEFAULT_MAIL_DIRECTORY is not defined at compile time.
6418 (It is computed by configure, but can be #undef'd in config-bot.h.)
6419
6420iii. If the `chkwinsize' option is enabled, the shell checks for window size
6421 changes if a child process exits due to a signal.
6422
6423jjj. Removed the attempts to avoid adding a slash at the end of a completed
6424 executable name if there was a directory with the same name in the
6425 current directory.
6426
6427kkk. Fixed PATH lookup code so it treats the permission bits separately for
6428 owner, group, and other, rather than checking them all.
6429
6430lll. Fixed the locale code to reset the parser's idea of the character class
6431 <blank>, which controls how it splits tokens, when the locale changes.
6432
6433mmm. The shell now binds its special readline functions and key bindings only
6434 if the user's inputrc file has not already bound them.
6435
6436nnn. The shell now reports on processes that dump core due to signals when
6437 invoked as `-c command'.
6438
64392. Changes to Readline
6440
6441a. Fixes to avoid core dumps because of null pointer references in the
6442 multibyte character code.
6443
6444b. Fix to avoid infinite recursion caused by certain key combinations.
6445
6446c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
6447
6448d. Readline no longer tries to read ahead more than one line of input, even
6449 when more is available.
6450
6451e. Fixed the code that adjusts the point to not mishandle null wide
6452 characters.
6453
6454f. Fixed a bug in the history expansion `g' modifier that caused it to skip
6455 every other match.
6456
6457g. Fixed a bug that caused the prompt to overwrite previous output when the
6458 output doesn't contain a newline and the locale supports multibyte
6459 characters. This same change fixes the problem of readline redisplay
6460 slowing down dramatically as the line gets longer in multibyte locales.
6461
6462h. History traversal with arrow keys in vi insertion mode causes the cursor
6463 to be placed at the end of the new line, like in emacs mode.
6464
6465i. The locale initialization code does a better job of using the right
6466 precedence and defaulting when checking the appropriate environment
6467 variables.
6468
6469j. Fixed the history word tokenizer to handle <( and >( better when used as
6470 part of bash.
6471
6472k. The overwrite mode code received several bug fixes to improve undo.
6473
6474l. Many speedups to the multibyte character redisplay code.
6475
6476m. The callback character reading interface should not hang waiting to read
6477 keyboard input.
6478
6479n. Fixed a bug with redoing vi-mode `s' command.
6480
6481o. The code that initializes the terminal tracks changes made to the terminal
6482 special characters with stty(1) (or equivalent), so that these changes
6483 are reflected in the readline bindings. New application-callable function
6484 to make it work: rl_tty_unset_default_bindings().
6485
6486p. Fixed a bug that could cause garbage to be inserted in the buffer when
6487 changing character case in vi mode when using a multibyte locale.
6488
6489q. Fixed a bug in the redisplay code that caused problems on systems
6490 supporting multibyte characters when moving between history lines when the
6491 new line has more glyphs but fewer bytes.
6492
6493r. Undo and redo now work better after exiting vi insertion mode.
6494
6495s. Make sure system calls are restarted after a SIGWINCH is received using
6496 SA_RESTART.
6497
6498t. Improvements to the code that displays possible completions when using
6499 multibyte characters.
6500
6501u. Fixed a problem when parsing nested if statements in inputrc files.
6502
6503v. The completer now takes multibyte characters into account when looking for
6504 quoted substrings on which to perform completion.
6505
6506w. The history search functions now perform better bounds checking on the
6507 history list.
6508
65093. New Features in Bash
6510
6511a. ANSI string expansion now implements the \x{hexdigits} escape.
6512
6513b. There is a new loadable `strftime' builtin.
6514
6515c. New variable, COMP_WORDBREAKS, which controls the readline completer's
6516 idea of word break characters.
6517
6518d. The `type' builtin no longer reports on aliases unless alias expansion
6519 will actually be performed.
6520
6521e. HISTCONTROL is now a colon-separated list of values, which permits
6522 more extensibility and backwards compatibility.
6523
6524f. HISTCONTROL may now include the `erasedups' option, which causes all lines
6525 matching a line being added to be removed from the history list.
6526
6527g. `configure' has a new `--enable-multibyte' argument that permits multibyte
6528 character support to be disabled even on systems that support it.
6529
6530h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
6531 BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
6532 BASH_COMMAND
6533
6534i. FUNCNAME has been changed to support the debugger: it's now an array
6535 variable.
6536
6537j. for, case, select, arithmetic commands now keep line number information
6538 for the debugger.
6539
6540k. There is a new `RETURN' trap executed when a function or sourced script
6541 returns (not inherited child processes; inherited by command substitution
6542 if function tracing is enabled and the debugger is active).
6543
6544l. New invocation option: --debugger. Enables debugging and turns on new
6545 `extdebug' shell option.
6546
6547m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR
6548 traps, respectively, to be inherited by shell functions. Equivalent to
6549 `set -T' and `set -E' respectively. The `functrace' option also controls
6550 whether or not the DEBUG trap is inherited by sourced scripts.
6551
6552n. The DEBUG trap is run before binding the variable and running the action
6553 list in a `for' command, binding the selection variable and running the
6554 query in a `select' command, and before attempting a match in a `case'
6555 command.
6556
6557o. New `--enable-debugger' option to `configure' to compile in the debugger
6558 support code.
6559
6560p. `declare -F' now prints out extra line number and source file information
6561 if the `extdebug' option is set.
6562
6563q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes
6564 the next command to be skipped, and a return value of 2 while in a
6565 function or sourced script forces a `return'.
6566
6567r. New `caller' builtin to provide a call stack for the bash debugger.
6568
6569s. The DEBUG trap is run just before the first command in a function body is
6570 executed, for the debugger.
6571
6572t. `for', `select', and `case' command heads are printed when `set -x' is
6573 enabled.
6574
6575u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1,
6576 x+2,...,y}. x and y can be integers or single characters; the sequence
6577 may ascend or descend; the increment is always 1.
6578
6579v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
6580 of array.
6581
6582w. New `force_fignore' shopt option; if enabled, suffixes specified by
6583 FIGNORE cause words to be ignored when performing word completion even
6584 if they're the only possibilities.
6585
6586x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
6587 style' (filename:lineno:message) format.
6588
6589y. New `-o bashdefault' option to complete and compgen; if set, causes the
6590 whole set of bash completions to be performed if the compspec doesn't
6591 result in a match.
6592
6593z. New `-o plusdirs' option to complete and compgen; if set, causes directory
6594 name completion to be performed and the results added to the rest of the
6595 possible completions.
6596
6597aa. `kill' is available as a builtin even when the shell is built without
6598 job control.
6599
6600bb. New HISTTIMEFORMAT variable; value is a format string to pass to
6601 strftime(3). If set and not null, the `history' builtin prints out
6602 timestamp information according to the specified format when displaying
6603 history entries. If set, bash tells the history library to write out
6604 timestamp information when the history file is written.
6605
6606cc. The [[ ... ]] command has a new binary `=~' operator that performs
6607 extended regular expression (egrep-like) matching.
6608
6609dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
6610 to enable the =~ operator and regexp matching in [[ ... ]].
6611
6612ee. Subexpressions matched by the =~ operator are placed in the new
6613 BASH_REMATCH array variable.
6614
6615ff. New `failglob' option that causes an expansion error when pathname
6616 expansion fails to produce a match.
6617
6618gg. New `set -o pipefail' option that causes a pipeline to return a failure
6619 status if any of the processes in the pipeline fail, not just the last
6620 one.
6621
66224. New Features in Readline
6623
6624a. History expansion has a new `a' modifier equivalent to the `g' modifier
6625 for compatibility with the BSD csh.
6626
6627b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
6628 modifier, which performs a substitution once per word.
6629
6630c. All non-incremental search operations may now undo the operation of
6631 replacing the current line with the history line.
6632
6633d. The text inserted by an `a' command in vi mode can be reinserted with
6634 `.'.
6635
6636e. New bindable variable, `show-all-if-unmodified'. If set, the readline
6637 completer will list possible completions immediately if there is more
6638 than one completion and partial completion cannot be performed.
6639
6640f. There is a new application-callable `free_history_entry()' function.
6641
6642g. History list entries now contain timestamp information; the history file
6643 functions know how to read and write timestamp information associated
6644 with each entry.
6645
6646h. Four new key binding functions have been added:
6647
6648 rl_bind_key_if_unbound()
6649 rl_bind_key_if_unbound_in_map()
6650 rl_bind_keyseq_if_unbound()
6651 rl_bind_keyseq_if_unbound_in_map()
6652
6653------------------------------------------------------------------------------
7117c2d2
JA
6654This document details the changes between this version, bash-2.05b-release,
6655and the previous version, bash-2.05b-beta2.
6656
66571. Changes to Bash
6658
6659a. Fixed an off-by-one error in the function that translates job
6660 specifications.
6661
6662b. Note that we're running under Emacs and disable line editing if
6663 $EMACS == `t'.
6664
6665------------------------------------------------------------------------------
6666This document details the changes between this version, bash-2.05b-beta2,
6667and the previous version, bash-2.05b-beta1.
6668
66691. Changes to Bash
6670
6671a. Fixed the /= and %= arithmetic operators to catch division by zero.
6672
6673b. Added putenv, setenv, unsetenv to getenv replacement for completeness.
6674
6675c. Fixed a bug that could cause the -O expand_aliases invocation option
6676 to not take effect.
6677
6678d. Fixed a problem with process substitution that resulted in incorrect
6679 behavior when the number of process substitutions in an individual
6680 command approached 64.
6681
66822. Changes to Readline
6683
6684a. Fixed a problem with backward-char-search when on a system with support
6685 for multibyte characters when running in a locale without any multibyte
6686 characters.
6687
6688------------------------------------------------------------------------------
6689This document details the changes between this version, bash-2.05b-beta1,
6690and the previous version, bash-2.05b-alpha1.
6691
66921. Changes to Bash
6693
6694a. Fixed a problem when parsing a POSIX.2 character class name while
6695 evaluating a bracket expression containing multibyte characters.
6696
6697b. Changed the help text for `bind' to make it clear that any command
6698 that may be placed in ~/.inputrc is a valid argument to `bind'.
6699
6700c. Added `help' builtin entries for `((', `[[', and arithmetic for.
6701
6702d. malloc updated again:
6703 o slightly better overflow and underflow detection by putting the
6704 chunk size at the beginning and end of the chunk and making
6705 sure they match in free/realloc
6706 o partial page allocated to make things page-aligned no longer
6707 completely wasted
6708 o block coalescing now enabled by default
6709 o splitting and coalescing enabled for 32-byte chunks, the most
6710 common size requested
6711 o fixed a problem that resulted in spurious underflow messages and
6712 aborts
6713 o bin sizes are precomputed and stored in an array rather than
6714 being computed at run time
6715 o malloc will return memory blocks back to the system if the block
6716 being freed is at the top of the heap and of sufficient size to
6717 make it worthwhile
6718 o malloc/free/realloc now inline memset instead of calling the
6719 libc function; uses Duff's device for good performance
6720
6721e. Check for getservent(); make the service name completion code dependent
6722 on its presence.
6723
6724f. Changed the readline callback that executes a command bound to a key
6725 sequence to not save the executed command on the history list and to
6726 save and restore the parsing state.
6727
6728g. Changes to lib/sh/snprintf.c: fixed some bugs in the `g' and `G'
6729 floating point format display; implemented the "'" flag character
6730 that turns on thousands' grouping; fixed behavior on systems where
6731 MB_CUR_MAX does not evaluate to a constant.
6732
6733h. The `unset' builtin no longer returns a failure status when asked to
6734 unset a previously-unset variable or function.
6735
6736i. Changes to the build system to make it easier to cross-compile bash
6737 for different systems.
6738
6739j. Added `,' to the characters that are backslash-escaped during filename
6740 completion, to avoid problems with complete-into-braces and RCS filenames
6741 containing commas.
6742
6743k. Some changes to the multibyte character support code to avoid many calls
6744 to strlen().
6745
6746l. Bash now correctly honors setting LANG to some value when LC_ALL does not
6747 already have a value.
6748
6749m. Fixed a bug that could cause SIGSEGV when processing nested traps with
6750 trap handlers.
6751
6752n. The `source/.' builtin now restores the positional parameters when it
6753 returns unless they were changed using the `set' builtin during the file's
6754 execution.
6755
6756o. Fixed a bug that caused a syntax error when a command was terminated by
6757 EOF.
6758
67592. New Features in Bash
6760
6761a. There is now support for placing the long help text into separate files
6762 installed into ${datadir}/bash. Not enabled by default; can be turned
6763 on with `--enable-separate-helpfiles' option to configure.
6764
6765b. All builtins that take operands accept a `--' pseudo-option, except
6766 `echo'.
6767
6768c. The `echo' builtin now accepts \0xxx (zero to three octal digits following
6769 the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
6770 POSIX.1-2001 compliance.
6771
67723. Changes to Readline
6773
6774a. Fixed a small problem in _rl_insert_char with multibyte characters.
6775
6776b. Fixes from IBM for line wrapping problems when using multibyte characters.
6777
6778c. Fixed a problem which caused the display to be messed up when the last
6779 line of a multi-line prompt (possibly containing invisible characters)
6780 was longer than the screen width.
6781
8868edaf 6782d. Fixed a problem with the vi-mode `r' command that occurred on systems with
7117c2d2
JA
6783 support for multibyte characters when running in a locale without any
6784 multibyte characters.
6785
6786------------------------------------------------------------------------------
6787This document details the changes between this version, bash-2.05b-alpha1,
6788and the previous version, bash-2.05a-release.
6789
67901. Changes to Bash
6791
6792a. Some changes to work around inlining differences between compilers.
6793
6794b. Added more prototypes for internal shell typedefs, to catch argument
6795 passing errors when using pointers to functions.
6796
6797c. The `cd' builtin now fails in posix mode when a valid directory cannot be
6798 constructed from a relative pathname argument and the $PWD using pathname
6799 canonicalization, and the -P option has not been supplied. Previously,
6800 the shell would attempt to use what the user typed, leading to weird
6801 values for $PWD and discrepancies between the value of $PWD and the
6802 actual working directory.
6803
6804d. The `cd' builtin now resets $PWD when canonicalization fails but a chdir
6805 to the pathname passed as an argument succeeds (when not in posix mode).
6806
6807e. The `fc' builtin has been fixed, as POSIX requires, to use the closest
6808 history position in range when given an out-of-range argument.
6809
6810f. The history file loading code was changed to allow lines to be saved in
6811 the history list from the shell startup files.
6812
b80f6443 6813g. `history -s args' now works better in compound commands.
7117c2d2
JA
6814
6815h. The tilde expansion code was fixed to better recognize when it's being
6816 invoked in an assignment context, which enables expansion after `='
6817 and `:'.
6818
6819i. Fixed the command name completion code so a slash is no longer appended
6820 to a single match if there happens to be a directory with that name in
6821 $PWD.
6822
6823j. Fixed compound array assignment to no longer perform alias expansion, to
6824 allow reserved words as array members, and to not produce extra output
6825 when the `-v' option had been enabled.
6826
6827k. Fixed the programmable completion code to better handle newlines in lists
6828 of possible completions (e.g., `complete -W').
6829
6830l. Removed the reserved words from the `bash-builtins' manual page.
6831
6832m. Parser error reporting now attempts to do a better job of identifying the
6833 token in error rather than doing straight textual analysis.
6834
6835n. Fixes for Inf/NaN, locales, wide/multibyte characters and zero-length
6836 arguments in the library snprintf(3) replacement.
6837
6838o. `read -e' no longer does command name completion on the first word on
6839 the line being read.
6840
6841p. `select' now returns failure if the read of the user's selection fails.
6842
6843q. Fixed a bug that could cause a core dump when setting $PIPESTATUS.
6844
6845r. Fixes to not allocate so many job slots when the shell is running a loop
6846 with job control enabled in a subshell of an interactive shell.
6847
6848s. Fixed a bug in the trap code that caused traps to be inherited by
6849 command substitutions in some cases.
6850
6851t. Fixed a bug that could cause alias expansion to inappropriately expand
6852 the word following the alias.
6853
6854u. Fixed a bug in the `kill' builtin that mishandled negative pid arguments.
6855
6856v. The parser is less lenient when parsing assignment statements where the
6857 characters before the `=' don't comprise a valid identifier.
6858
6859w. The arithmetic expression evaluation code now honors the setting of the
6860 `-u' option when expanding variable names.
6861
6862x. Fixed the arithmetic evaluation code to allow array subscripts to be
6863 assigned (`let b[7]=42') and auto-incremented and auto-decremented
6864 (e.g., b[7]++).
6865
6866y. Reimplemented the existing prompt string date and time expansions using
6867 strftime(3), which changed the output of \@ in some locales.
6868
6869z. Fixed a bug that could cause a core dump when a special shell variable
6870 (like RANDOM) was converted to an array with a variable assignment.
6871
6872aa. Fixed a bug that would reset the handler for a signal the user had
6873 trapped to a function that would exit the shell when setting the exit
6874 trap in a non-interactive shell.
6875
6876bb. Changed the execve(2) wrapper code to check whether or not a failing
6877 command is a directory before looking at whether a `#!' interpreter
6878 failed for some reason.
6879
6880cc. Fixed a bug in the command printing code so it no longer inserts a `;'
6881 after a newline, which produces a syntax error when reused as input.
6882
6883dd. The code that expands $PS4 no longer inherits the `-x' flag.
6884
6885ee. The bash-specific completion functions may now take advantage of the
6886 double-TAB and M-? features of the standard readline completion
6887 functions.
6888
6889ff. The mail checking code no longer prints a message if the checked file's
6890 size has not increased, even if the access time is less than the modification time.
6891
6892gg. Rewrote the variable symbol table code: there is now a stack of
6893 contexts, each possibly including a separate symbol table; there can
6894 be more than one temporary environment supplied to nested invocations
6895 of `./source'; the temporary environments no longer require so much
6896 special-case code; shell functions now handle the temporary environment
6897 and local variables more consistently; function scope exit is faster now
6898 that the entire symbol table does not have to be traversed to dispose of
6899 local variables; it is now easier to push vars from the temporary
6900 environment to the shell's variable table in posix mode; some duplicated
6901 code has been removed.
6902
6903hh. Regularized the error message printing code; builtin_error is now called
6904 more consistently, and common error message strings are handled by small
6905 functions. This should make eventual message translation easier.
6906
6907ii. Error messages now include the line number in a script when the shell
6908 is not interactive.
6909
6910jj. Array subscript expansion now takes place even when the array variable is
6911 unset, so side effects will take place.
6912
6913kk. Fixed a bug in the SICGHLD child-reaping code so that it won't find
6914 jobs already marked as terminated if the OS reuses pids quickly enough.
6915
6916ll. Fixed a bug that could cause a signal to not interrupt the `wait'
6917 builtin while it was waiting for a background process to terminate.
6918
6919mm. A couple of changes to make it easier for multiple shells to share history
6920 files using `history -n', `history -r', and `history -w'.
6921
6922nn. The `getopts' builtin always increments OPTIND to point to the next
6923 option to be handled when an option is returned, whether it's valid
6924 or not, as POSIX 1003.x-2001 requires.
6925
6926oo. Changed some parts of the expansion code to avoid allocating and
6927 immediately freeing memory without using the results for anything.
6928
6929pp. The shell now keeps track of $IFS internally, updating its internal map
6930 each time the variable is assigned a new value (or at local scope exit).
6931 This saves thousands of hash lookups for IFS, which, while individually
6932 cheap, add up.
6933
6934qq. Rewrote the hash table code: searching and insertion are much faster now,
6935 and it uses a better string hashing function; augmented the function
6936 interface to simplify other parts of the code and remove duplicated code
6937
6938rr. The shell now uses a simple, generic `object cache' for allocating and
6939 caching words and word lists, which were the major users of
6940 malloc/free.
6941
6942ss. Fixed the assignment statement parsing code to allow whitespace and
6943 newlines in subscripts when performing array element assignment.
6944
6945tt. The shell now issues many fewer calls to sigprocmask and other signal
6946 masking system calls.
6947
6948uu. Fixed the `test' and conditional command file comparison operators to
6949 work right when one file has a non-positive timestamp and the other
6950 does not exist.
6951
6952vv. Fixed some cases where the special characters '\001' and '\177' in the
6953 values of variables or positional parameters caused incorrect expansion
6954 results.
6955
69562. Changes to Readline
6957
6958a. Fixed output of comment-begin character when listing variable values.
6959
6960b. Added some default key bindings for common escape sequences produced by
6961 HOME and END keys.
6962
6963c. Fixed the mark handling code to be more emacs-compatible.
6964
6965d. A bug was fixed in the code that prints possible completions to keep it
6966 from printing empty strings in certain circumstances.
6967
6968e. Change the key sequence printing code to print ESC as M\- if ESC is a
6969 meta-prefix character -- it's easier for users to understand than \e.
6970
6971f. Fixed unstifle_history() to return values that match the documentation.
6972
6973g. Fixed the event loop (rl_event_hook) to handle the case where the input
6974 file descriptor is invalidated.
6975
6976h. Fixed the prompt display code to work better when the application has a
6977 custom redisplay function.
6978
6979i. Changes to make reading and writing the history file a little faster, and
6980 to cope with huge history files without calling abort(3) from xmalloc.
6981
6982j. The vi-mode `S' and `s' commands are now undone correctly.
6983
69843. New Features in Bash
6985
6986a. If set, TMOUT is the default timeout for the `read' builtin.
6987
6988b. `type' has two new options: `-f' suppresses shell function lookup, and
6989 `-P' forces a $PATH search.
6990
6991c. New code to handle multibyte characters.
6992
6993d. `select' was changed to be more ksh-compatible, in that the menu is
6994 reprinted each time through the loop only if REPLY is set to NULL.
6995 The previous behavior is available as a compile-time option.
6996
6997e. `complete -d' and `complete -o dirnames' now force a slash to be
6998 appended to names which are symlinks to directories.
6999
7000f. There is now a bindable edit-and-execute-command readline command,
7001 like the vi-mode `v' command, bound to C-xC-e in emacs mode.
7002
7003g. Added support for ksh93-like [:word:] character class in pattern matching.
7004
7005h. The $'...' quoting construct now expands \cX to Control-X.
7006
7007i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
7008 the result into the expanded prompt.
7009
7010j. The shell now performs arithmetic in the largest integer size the
7011 machine supports (intmax_t), instead of long.
7012
7013k. If a numeric argument is supplied to one of the bash globbing completion
7014 functions, a `*' is appended to the word before expansion is attempted.
7015
7016l. The bash globbing completion functions now allow completions to be listed
7017 with double tabs or if `show-all-if-ambiguous' is set.
7018
7019m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
7020 readline's appending a space to the completed word.
7021
7022n. New `here-string' redirection operator: <<< word.
7023
7024o. When displaying variables, function attributes and definitions are shown
7025 separately, allowing them to be re-used as input (attempting to re-use
7026 the old output would result in syntax errors).
7027
7028p. There is a new configuration option `--enable-mem-scramble', controls
7029 bash malloc behavior of writing garbage characters into memory at
7030 allocation and free time.
7031
7032q. The `complete' and `compgen' builtins now have a new `-s/-A service'
7033 option to complete on names from /etc/services.
7034
7035r. `read' has a new `-u fd' option to read from a specified file descriptor.
7036
7037s. Fix the completion code so that expansion errors in a directory name
7038 don't cause a longjmp back to the command loop.
7039
7040t. Fixed word completion inside command substitution to work a little more
7041 intuitively.
7042
7043u. The `printf' %q format specifier now uses $'...' quoting to print the
7044 argument if it contains non-printing characters.
7045
7046v. The `declare' and `typeset' builtins have a new `-t' option. When applied
7047 to functions, it causes the DEBUG trap to be inherited by the named
7048 function. Currently has no effect on variables.
7049
7050w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
7051 [[...]] conditional commands, and for ((...)) loops.
7052
7053x. The expansion of $LINENO inside a shell function is only relative to the
7054 function start if the shell is interactive -- if the shell is running a
7055 script, $LINENO expands to the line number in the script. This is as
7056 POSIX-2001 requires.
7057
7058y. The bash debugger in examples/bashdb has been modified to work with the
7059 new DEBUG trap semantics, the command set has been made more gdb-like,
7060 and the changes to $LINENO make debugging functions work better. Code
7061 from Gary Vaughan.
7062
7063z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
7064 and close).
7065
7066aa. There is a new `-l' invocation option, equivalent to `--login'.
7067
7068bb. The `hash' builtin has a new `-l' option to list contents in a reusable
7069 format, and a `-d' option to remove a name from the hash table.
7070
70714. New Features in Readline
7072
7073a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
7074 be bound to readline functions. Now the arrow keys may be used in vi
7075 insert mode.
7076
7077b. When listing completions, and the number of lines displayed is more than
7078 the screen length, readline uses an internal pager to display the results.
7079 This is controlled by the `page-completions' variable (default on).
7080
7081c. New code to handle editing and displaying multibyte characters.
7082
7083d. The behavior introduced in bash-2.05a of deciding whether or not to
7084 append a slash to a completed name that is a symlink to a directory has
7085 been made optional, controlled by the `mark-symlinked-directories'
7086 variable (default is the 2.05a behavior).
7087
7088e. The `insert-comment' command now acts as a toggle if given a numeric
7089 argument: if the first characters on the line don't specify a
7090 comment, insert one; if they do, delete the comment text
7091
7092f. New application-settable completion variable:
7093 rl_completion_mark_symlink_dirs, allows an application's completion
7094 function to temporarily override the user's preference for appending
7095 slashes to names which are symlinks to directories.
7096
7097g. New function available to application completion functions:
7098 rl_completion_mode, to tell how the completion function was invoked
7099 and decide which argument to supply to rl_complete_internal (to list
7100 completions, etc.).
7101
7102h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
7103 bindable command, which could be bound to `Insert'.
7104
7105i. New application-settable completion variable:
7106 rl_completion_suppress_append, inhibits appending of
7107 rl_completion_append_character to completed words.
7108
7109j. New key bindings when reading an incremental search string: ^W yanks
7110 the currently-matched word out of the current line into the search
7111 string; ^Y yanks the rest of the current line into the search string,
7112 DEL or ^H deletes characters from the search string.
7113
7114------------------------------------------------------------------------------
f73dda09
JA
7115This document details the changes between this version, bash-2.05a-release,
7116and the previous version, bash-2.05a-rc1.
7117
71181. Changes to Bash
7119
7120a. Fixed the `printf' builtin so that the variable name supplied as an
7121 argument to a %n conversion must be a valid shell identifier.
7122
7123b. Improved the random number generator slightly.
7124
7125c. Changes to configuration to not put -I/usr/include into $CFLAGS, since
7126 it messes up some includes.
7127
7128d. Corrected description of POSIXLY_CORRECT in man page and info manual.
7129
7130e. Fixed a couple of cases of incorrect function prototypes that sneaked
7131 through and caused compilation problems.
7132
7133f. A few changes to avoid potential core dumps in the programmable completion
7134 code.
7135
7136g. Fixed a configure problem that could cause a non-existent file to show
7137 up in LIBOBJS.
7138
7139h. Fixed a configure problem that could cause siglist.o to not be built when
7140 required.
7141
7142i. Changes to the strtoimax and strtoumax replacement functions to work
7143 around buggy compilers.
7144
7145j. Fixed a problem with the snprintf replacement function that could
7146 potentially cause a core dump.
7147
71482. Changes to Readline
7149
7150a. Fixed a locale-specific problem in the vi-mode `goto mark' command.
7151
7152b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
7153 include file problems.
7154
7155------------------------------------------------------------------------------
7156This document details the changes between this version, bash-2.05a-rc1,
7157and the previous version, bash-2.05a-beta1.
7158
71591. Changes to Bash
7160
7161a. Fixed the snprintf replacement to correctly implement the `alternate form'
7162 of the %g and %G conversions.
7163
7164b. Fixed snprintf to correctly handle the optional precision with the %g and
7165 %G conversions.
7166
7167c. Fixed the arithmetic evaluation code to correct the values of `@' and `_'
7168 when translating base-64 constants (they were backwards).
7169
7170d. New library functions for formatting long and long long ints.
7171
7172e. Fixed a few places where negative array subscripts could have occurred,
7173 mostly as the result of systems using signed characters.
7174
7175f. Fixed a few places that assumed a pid_t was no wider than an int.
7176
7177g. Fixed the `maildir' mail checking code to work on systems where a
7178 `struct stat' doesn't include an `st_blocks' member.
7179
7180h. Fixed snprintf to make `unsigned long long' conversion formats (%llu)
7181 work better.
7182
7183i. Fixed snprintf to not print a sign when asked to do an unsigned conversion.
7184
7185j. Made configure changes to avoid compiling empty source files in lib/sh.
7186
7187k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax,
7188 strtoumax.
7189
7190l. The `printf' builtin now handles the `ll' and `j' length modifiers
7191 directly, since they can affect the type and width of the argument
7192 passed to printf(3).
7193
7194m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to
8868edaf 7195 have more systematic naming, with accompanying changes to configure.in.
f73dda09
JA
7196
7197n. Fixed snprintf to handle long doubles and the %a/%A conversions by
7198 falling back to sprintf, as long as sprintf supports them.
7199
7200o. Fixed return value from vsnprintf/snprintf to be the number of characters
7201 that would have been printed, even if that number exceeds the buffer
7202 size passed as an argument.
7203
7204p. Bash no longer attempts to define its own versions of some ctype macros
7205 if they are implemented as functions in libc but not as macros in
7206 <ctype.h>.
7207
7208q. Changed the variable printing code (used by `set', `export', etc.) to
7209 not use the $'...' syntax when in posix mode, since that caused
7210 interoperability problems with other shells (most notably with autoconf).
7211 When not in posix mode, it uses $'...' if the string to be printed
7212 contains non-printing characters and regular single quotes otherwise.
7213
7214r. snprintf now recognizes the %F conversion.
7215
7216s. Fixed a bug that could cause the wrong status to be returned by a shell
7217 function when the shell is compiled without job control and a null
7218 command containing a command substutition was executed in the function.
7219
7220t. When in posix mode, the default value for MAILCHECK is 600.
7221
7222u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables
7223 if they're not in the initial environment.
7224
7225v. If SECONDS appears in the initial environment with a valid integer value,
7226 bash uses that as the starting value, as if an assignment had been
7227 performed.
7228
7229w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it
7230 gives them default values if they don't appear in the initial environment.
7231
7232x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE,
7233 even if it assigns them default values.
7234
7235y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT
7236 if they appear in the initial environment.
7237
7238z. Bash no longer attempts to discover if it's being run by sshd in order to
7239 run the startup files. If the SSH_SOURCE_BASHRC is uncommented in
7240 config-top.h it will attempt to do so as previously, but that's commented
7241 out in the distributed version.
7242
7243aa. Fixed a typo in the code that tests for LC_NUMERIC.
7244
7245bb. The POSIXLY_CORRECT shell variable and its effects are now documented.
7246
7247cc. Some changes to several of the support shell scripts included in the
7248 definitions to try to avoid race conditions and attacks.
7249
7250dd. Several changes to avoid warnings from `gcc -Wall'.
7251
7252ee. Fixed a problem with the `unset' builtin that could cause incorrect
7253 results if asked to unset a variable and an array subscript in the
7254 same command.
7255
7256ff. A few changes to the shell's temporary file creation code to avoid
7257 potential file descriptor leaks and to prefer the system's idea of
7258 the temporary directory to use.
7259
7260gg. Fixes to build with the C alloca in lib/malloc/alloca.c if the system
7261 requires it but the shell has been configured --without-bash-malloc.
7262
7263hh. Updated the documentation to note that only interactive shells resend
7264 SIGHUP to all jobs before exiting.
7265
7266ii. Fixes to only pass unquoted tilde words to tilde_expand, rather than
7267 rely on tilde_expand or getpwnam(3) to handle the quotes (MacOS 10.x
7268 will remove backslashes in any login name passed to getpwnam(3)).
7269
7270jj. Small change from Paul Eggert to make LINENO right in commands run with
7271 `bash -c'.
7272
72732. New Features in Bash
7274
7275a. The `printf' builtin now handles the %a and %A conversions if they're
7276 implemented by printf(3).
7277
7278b. The `printf' builtin now handles the %F conversion (just about like %f).
7279
7280c. The `printf' builtin now handles the %n conversion like printf(3). The
7281 corresponding argument is the name of a shell variable to which the
7282 value is assigned.
7283
72843. Changes to Readline
7285
7286a. Fixed a few places where negative array subscripts could have occurred.
7287
7288b. Fixed the vi-mode code to use a better method to determine the bounds of
7289 the array used to hold the marks.
7290
7291c. Fixed the defines in chardefs.h to work better when chars are signed.
7292
7293d. Fixed configure.in to use the new names for bash autoconf macros.
7294
7295e. Readline no longer attempts to define its own versions of some ctype
7296 macros if they are implemented as functions in libc but not as macros in
7297 <ctype.h>.
7298
7299f. Fixed a problem where rl_backward could possibly set point to before
7300 the beginning of the line.
7301
7302------------------------------------------------------------------------------
7303This document details the changes between this version, bash-2.05a-beta1,
7304and the previous version, bash-2.05a-alpha1.
7305
73061. Changes to Bash
7307
8868edaf 7308a. Fixed a bug in the evaluation of arithmetic `for' statements when the
f73dda09
JA
7309 expanded expression is NULL.
7310
7311b. Fixed an unassigned variable problem in the redirection printing code.
7312
7313c. Added more prototypes to extern function declarations in the header
7314 files and to static function declarations in C source files.
7315
7316d. Make sure called functions have a prototype in scope, to get the arguments
7317 and return values right instead of casting. Removed extern function
7318 declarations from C source files that were already included in header
7319 files.
7320
7321e. Changed some function arguments to use function typedefs in general.h so
7322 the prototypes can be checked. The only use of Function and VFunction
7323 now is for unwind-protects.
7324
7325f. More const changes to function arguments and appropriate variables.
7326
7327g. Changed the mail checking support to handle `maildir'-style mail
7328 directories.
7329
7330h. Augmented the bash malloc to pass in the file and line number information
7331 for each malloc, realloc, and free. This should result in better error
7332 messages.
7333
7334i. The `old' gnu malloc is no longer a configuration option.
7335
7336j. Augmented the bash malloc with optional tracing and registering allocated
7337 and freed memory.
7338
7339k. Prompt string decoding now saves and restores the value of $? when it
7340 expands the prompt string, so command substitutions don't change $?.
7341
7342i. Array indices are now `long', since shell arithmetic is performed as long,
7343 and the internal arrayind_t type is used consistently.
7344
7345j. Some more `unsigned char *' fixes from Paul Eggert.
7346
7347k. Fixed a bad call to builtin_error that could cause core dumps when making
7348 local variables.
7349
7350l. `return' may no longer be used to terminate a `select' command, for
7351 compatibility with ksh.
7352
7353m. Changed code that reads octal numbers to do a better job of detecting
7354 overflows.
7355
7356n. The time formatting code no longer uses absolute indices into a buffer,
7357 because the buffer size changes depending on the size of a `time_t'.
7358
7359o. `umask' now prints four digits when printing in octal mode, for
7360 compatibility with other shells.
7361
7362p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L'
7363 formats and long doubles better, and internal functions have been
8868edaf 7364 simplified where appropriate.
f73dda09
JA
7365
7366q. Some `time_t' fixes for machines were a time_t is bigger than a long.
7367
7368r. Replaced some bash-specific autoconf macros with standard equivalents.
7369
7370s. Improvmed the code that constructs temporary filenames to make the
7371 generated names a bit more random.
7372
7373t. Added code that checks for ascii before calling any of the is* ctype
7374 functions.
7375
7376u. Changed some places where a `char' was used as an array subscript to use
7377 `unsigned char', since a `char' can be negative if it's signed by default.
7378
7379v. Lots of changes to the `ulimit' builtin from Paul Eggert to add support
7380 for the new POSIX-200x RLIM_SAVED_CUR and RLIM_SAVED_MAX values and
7381 simplify the code.
7382
7383w. `ulimit' now prints the description of a resource in any error message
7384 relating to fetching or setting that resource's limits.
7385
7386x. The `snprintf' replacement now computes maximum values at compile
7387 time rather than using huge constants for things like long long.
7388
7389y. Interactive shells now ignore `set -n'.
7390
7391z. Changed the malloc bookkeeping information so that it's now 8 bytes
7392 instead of 12 on most 32-bit machines (saving 4 bytes per allocation),
7393 restoring 8-byte alignment.
7394
7395aa. The malloc error reporting code now attempts to print the file and line
7396 number of the call that caused the error.
7397
7398bb. Changed the redirection error reporting code to catch EBADF errors and
7399 report the file descriptor number rather than the file being redirected
7400 to or from (e.g., things like `exec 4242<x' where 4242 is an out-of-range
7401 file descriptor).
7402
7403cc. `printf', `echo -e', and the $'...' code now process only two hex digits
7404 after a `\x' escape sequence for compatibility with other shells, and
7405 the documentation was changed to note that the octal and hex escape
7406 sequences result in an eight-bit value rather than strict ASCII.
7407
74082. Changes to Readline
7409
7410a. The completion code now attempts to do a better job of preserving the
7411 case of the word the user typed if ignoring case in completions.
7412
7413b. Readline defaults to not echoing the input and lets the terminal
7414 initialization code enable echoing if there is a controlling terminal.
7415
7416c. The key binding code now processes only two hex digits after a `\x'
7417 escape sequence, and the documentation was changed to note that the
7418 octal and hex escape sequences result in an eight-bit value rather
7419 than strict ASCII.
7420
74213. New Features in Bash
7422
7423a. The builtin `ulimit' now takes two new non-numeric arguments: `hard',
7424 meaning the current hard limit, and `soft', meaning the current soft
7425 limit, in addition to `unlimited'
7426
7427b. `ulimit' now prints the option letter associated with a particular
7428 resource when printing more than one limit.
7429
7430c. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
7431 one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
7432
74334. New Features in Readline
7434
7435a. New bindable variable `history-preserve-point'. If set, the history
7436 code attempts to place the user at the same location on each history
8868edaf 7437 line retrieved with previous-history or next-history.
f73dda09
JA
7438
7439------------------------------------------------------------------------------
7440This document details the changes between this version, bash-2.05a-alpha1,
7441and the previous version, bash-2.05-release.
7442
74431. Changes to Bash
7444
7445a. Better checks in the redirection code for write errors.
7446
7447b. bashbug now uses $TMPDIR, defaulting to /tmp, and uses mktemp(1) more
7448 portably.
7449
7450c. System-specific configuration changes for: Interix, OpenBSD, FreeBSD,
7451 MacOS X.
7452
7453d. Some more `const' cleanups through the code.
7454
7455e. Fixed a typo in the /dev/fd redirection code, better checks for valid
7456 numeric fds in /dev/fd.
7457
7458f. Fixed many parts of the shell to handle integer overflow more gracefully
7459 and to do more stringent checks for valid numbers.
7460
7461g. Fixed mksignames to include config.h.
7462
7463h. Fixed an uninitialized variable problem that could cause the shell to core
7464 dump when replacing characters in a string.
7465
7466i. New mechanism for updating the patch level when official patches are
7467 released (patchlevel.h).
7468
7469j. configure.in changed to no longer require external files _distribution and
7470 _patchlevel.
7471
7472k. Fixed non-interactive shell initialization problem when bash started as
7473 `bash -i filename'.
7474
7475l. Fixed printf builtin conversion error handling to be POSIX.2-conformant.
7476
7477m. autoconf-2.52 is now used to build configure; autoconf-2.50 or newer is
7478 required. Some of the bash-specific macros were removed, since they are
7479 now standard.
7480
7481n. Startup files and files read with source or `.' are no longer required to
7482 be regular files.
7483
7484o. Fixed core dump in builtin printf when user-supplied precision or field
7485 width is 0.
7486
7487p. Fixed builtin printf to treat a negative field width as a positive field
7488 width with left-justification.
7489
7490r. New unwind-protect implementation from Paul Eggert.
7491
7492s. Fixed an inadvertently-unclosed comment in the bash completion code that
7493 caused programmable completions to not add trailing slashes or spaces to
7494 completions.
7495
7496t. Fixed the process substitution code to cope better when stdin is closed.
7497
7498v. Fixes, mostly from Paul Eggert, for a few possible buffer overflows in
7499 the shell.
7500
7501w. Fixes from Paul Eggert to avoid most of the type casts in the shell code,
7502 and use more appropriate types for a number of variables.
7503
8868edaf 7504x. Command substitution no longer inherits the DEBUG trap.
f73dda09 7505
8868edaf 7506y. Some fixes to the process substitution code on machines without /dev/fd so
f73dda09
JA
7507 that named pipes are not removed inappropriately.
7508
7509z. The loadable `getconf' builtin is now much more complete, and will become
7510 part of the shell in the future.
7511
7512aa. The select command no longer terminates on a `return', so it can be used
7513 to return from an enclosing function (as ksh does it).
7514
7515bb. Fixed the extended pattern matching code to behave better when presented
7516 with incorrectly-formed patterns.
7517
7518cc. Some changes were made with the intent of making cross-compilation easier.
7519
7520dd. The network code (/dev/tcp and /dev/udp redirections) uses getaddrinfo(3)
7521 if it's available, which adds support for IPv6.
7522
7523ee. Subshells of login shells no longer source ~/.bash_logout when they exit.
7524
7525ff. Fixes so that subshells don't exit inappropriately if the -e option has
7526 been set.
7527
7528gg. Restricted shells no longer allow functions to be exported.
7529
7530hh. Changes to the pattern matching code so extended pattern matching works
7531 on systems with deficient shared library implementations, like MacOS X.
7532
7533ii. Better error messages when a script with a leading `#!interp' fails
7534 to execute because of problems with `interp'.
7535
7536jj. Fixed `compgen' to handle the `-o default' option better.
7537
7538kk. Fixed the job control code to force an asynchronous process's standard
7539 input to /dev/null only if job control is not active.
7540
7541ll. Fixed a possible infinite recursion problem when `fc ""=abc' (a null
7542 pattern) is used to re-execute a previous command.
7543
7544mm. Fixed `declare [-a] var=value' to assign VALUE to element 0 if VAR is an
7545 array variable. Similarly for `declare [-a] var[N]=value'. This is like
7546 ksh93.
7547
7548nn. Fixed a bug that caused `read -a aname' to work even if ANAME had been
7549 declared readonly.
7550
7551oo. Fixed a possible integer overflow problem when constructing names for
7552 temporary files.
7553
75542. New Features in Bash
7555
7556a. Added support for DESTDIR installation root prefix, so you can do a
7557 `make install DESTDIR=bash-root' and do easier binary packaging.
7558
7559b. Added support for builtin printf "'" flag character as per latest POSIX
7560 drafts.
7561
7562c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
7563 ISO C99).
7564
7565d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
7566 (bash doesn't use very much of what it returns).
7567
7568e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
7569 but ignored.
7570
7571f. New read-only `shopt' option: login_shell. Set to non-zero value if the
7572 shell is a login shell.
7573
7574g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
7575
7576h. New `-A group/-g' option to complete and compgen; does group name
7577 completion.
7578
7579i. New `-t' option to `hash' to list hash values for each filename argument.
7580
7581j. New [-+]O invocation option to set and unset `shopt' options at startup.
7582
7583k. configure's `--with-installed-readline' option now takes an optional
7584 `=PATH' suffix to set the root of the tree where readline is installed
7585 to PATH.
7586
7587l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run
7588 whenever the shell would have exited if the -e option were enabled.
7589 It is not inherited by shell functions.
7590
7591m. `readonly', `export', and `declare' now print variables which have been
7592 given attributes but not set by assigning a value as just a command and
7593 a variable name (like `export foo') when listing, as the latest POSIX
7594 drafts require.
7595
7596n. `bashbug' now requires that the subject be changed from the default.
7597
7598o. configure has a new `--enable-largefile' option, like other GNU utilities.
7599
7600p. `for' loops now allow empty word lists after `in', like the latest POSIX
7601 drafts require.
7602
76033. Changes to Readline
7604
7605a. More `const' and type casting fixes.
7606
7607b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
7608 overflow problems.
7609
7610c. The completion code no longer appends a `/' or ` ' to a match when
7611 completing a symbolic link that resolves to a directory name, unless
7612 the match does not add anything to the word being completed. This
7613 means that a tab will complete the word up to the full name, but not
7614 add anything, and a subsequent tab will add a slash.
7615
7616d. Fixed a trivial typo that made the vi-mode `dT' command not work.
7617
7618e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
7619
7620f. Fixed the tty code so that ^V works more than once.
7621
7622g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
7623 because the use of __P in typedefs conflicted g++ and glibc.
7624
76254. New Features in Readline
7626
7627a. Added extern declaration for rl_get_termcap to readline.h, making it a
7628 public function (it was always there, just not in readline.h).
7629
7630b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
7631 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
7632
7633c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
7634
7635d. New bindable boolean readline variable: match-hidden-files. Controls
7636 completion of files beginning with a `.' (on Unix). Enabled by default.
7637
7638e. The history expansion code now allows any character to terminate a
7639 `:first-' modifier, like csh.
7640
7641f. The incremental search code remembers the last search string and uses
7642 it if ^R^R is typed without a search string.
7643
7644------------------------------------------------------------------------------
28ef6c31
JA
7645This document details the changes between this version, bash-2.05-release,
7646and the previous version, bash-2.05-beta2.
7647
76481. Changes to Bash
7649
7650a. Make sure we note that the first line of a multi-line command was not
7651 saved in the history if the tests for HISTCONTROL succeed, but the
7652 HISTIGNORE check fails.
7653
7654b. Fixed a bug in the pattern matching code that caused `[' to be treated
7655 as a special character inside a `[...]' bracket expression.
7656
7657c. Fixed a bug in the pattern matching code that caused `]' to terminate
7658 a bracket expression even if it was the first character after the `['
7659 (or a leading `!' or `^').
7660
7661d. Made a small change to report a more user-friendly error message if
7662 execve(2) fails because of an error with the interpreter in a script
7663 with a leading `#! interpreter'.
7664
7665e. If the OS does not support an exec(2) magic number of `#!', make sure we
7666 have a non-null interpreter name before attempting to execute it.
7667
7668f. Fixed a bug that caused the shell process to end up in a different
7669 process group than the controlling terminal if a job-control shell was
7670 run with `exec' in the startup files.
7671
7672g. When started in POSIX mode, either by `bash --posix', `bash -o posix', or
7673 `sh', $SHELLOPTS includes `posix' and POSIXLY_CORRECT is set.
7674
7675h. Fixed a problem that caused the `\W' prompt string escape sequence to
7676 expand to nothing when $PWD was `//'.
7677
7678i. The `bashbug' shell script no longer uses $(...) command substitution.
7679
7680j. When `set' is invoked without options in POSIX mode, it no longer prints
7681 the names and definitions of shell functions.
7682
76832. Changes to Readline
7684
7685a. rl_set_paren_blink_timeout() is now documented.
7686
7687b. Corrected history.3 man page: `$' is not in the default value of
7688 history_word_delimiters.
7689
7690c. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
7691 value, rl_read_key() now immediately returns '\n' (which is assumed to
7692 be bound to accept-line).
7693
76943. New Features in Bash
7695
7696a. The `>&word' redirection now works in POSIX mode as it does by default,
7697 since POSIX.2 leaves it unspecified.
7698
7699------------------------------------------------------------------------------
7700This document details the changes between this version, bash-2.05-beta2,
7701and the previous version, bash-2.05-beta1.
7702
77031. Changes to Bash
7704
7705a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported.
7706
7707b. Fixed startup so posixly_correct is retained across subshells begun to
7708 execute scripts without a leading `#!'.
7709
7710c. Fixed a bug that caused $(< file) to not work in a (...) subshell.
7711
7712d. Added config support for Linux running on the IBM S390.
7713
7714e. Fixed a bug that caused bash to get its input pointer out of sync when
7715 reading commands through a pipe and running a command with standard
7716 input redirected from a file.
7717
7718f. Made a change so that command completion now makes about half as many
7719 stat(2) calls when searching the $PATH.
7720
7721g. Fixed a bug that caused variable assignments preceding `return' to not
7722 be propagated to the shell environment in POSIX mode.
7723
7724h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed
7725 on `word'.
7726
7727i. In POSIX mode, `break' and `continue' do not complain and return success
7728 if called when the shell is not executing a loop.
7729
7730j. Fixed `bash -o posix' to work the same as `bash --posix'.
7731
7732k. Fixed a bug where variable assignments preceding `eval' or `source/.'
7733 would not show up in the environment exported to subshells run by the
7734 commands.
7735
7736l. In POSIX mode, shells started to execute command substitutions inherit
7737 the value of the `-e' option from their parent shell.
7738
7739m. In POSIX mode, aliases are expanded even in non-interactive shells.
7740
7741n. Changed some of the job control messages to display the text required by
7742 POSIX.2 when the shell is in POSIX mode.
7743
7744o. Fixed a bug in `test' that caused it to occasionally return incorrect
7745 results when non-numeric arguments were supplied to `-t'.
7746
77472. Changes to Readline
7748
7749a. Some changes were made to avoid gcc warnings with -Wall.
7750
7751b. rl_get_keymap_by_name now finds keymaps case-insensitively, so
7752 `set keymap EMACS' works.
7753
7754c. The history file writing and truncation functions now return a useful
7755 status on error.
7756
7757d. Fixed a bug that could cause applications to dereference a NULL pointer
7758 if a NULL second argument was passed to history_expand().
7759
77603. New Features in Bash
7761
7762a. doc/readline.3 has been moved to the readline distribution.
7763
77644. New Features in Readline
7765
7766a. New function, rl_get_screen_size (int *rows, int *columns), returns
7767 readline's idea of the screen dimensions.
7768
7769b. The timeout in rl_gather_tyi (readline keyboard input polling function)
7770 is now settable via a function (rl_set_keyboard_input_timeout()).
7771
7772c. Renamed the max_input_history variable to history_max_entries; the old
7773 variable is maintained for backwards compatibility.
7774
7775d. The list of characters that separate words for the history tokenizer is
7776 now settable with a variable: history_word_delimiters. The default
7777 value is as before.
7778
7779------------------------------------------------------------------------------
7780This document details the changes between this version, bash-2.05-beta1,
7781and the previous version, bash-2.05-alpha1.
7782
77831. Changes to Bash
7784
7785a. Changes to allow shared library and object building on the GNU Hurd.
7786
7787b. Fixes to the way exported functions are placed into the environment and
7788 cached.
7789
7790c. The globbing library once again respects locales when processing ranges
7791 in bracket expressions while doing pattern matching.
7792
7793d. System-specific configuration changes for: Tru 64, Interix
7794
7795e. Bashbug now uses /usr/bin/editor as one of the editing alternatives, and
7796 will use mktemp(1) or tempfile(1), if present, for temporary file creation.
7797
7798f. Bash no longer performs a binary file check on a script argument that's
7799 really a tty (like /dev/fd/0 or /dev/stdin).
7800
7801g. Fixed a bug in the execution of shell scripts that caused the effects of
7802 $BASH_ENV to be undone in some cases.
7803
7804h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly.
7805
7806i. Several changes to the job control code to avoid some signal state
7807 manipulation.
7808
7809j. The Bash malloc no longer blocks signals as often, which should make it
7810 faster.
7811
7812k. Fixed a parsing bug that did not allow backslash to escape a single quote
7813 inside a $'...' construct.
7814
7815l. Fixed a bug that caused things like ${var:=$'value'} to be parsed
7816 incorrectly. This showed up in newer versions of autoconf.
7817
7818m. Fixed a bug in the bash-specific readline initialization that caused
7819 key bindings to bash-specific function names appearing in .inputrc to
7820 not be honored.
7821
7822n. Bash now sets the file descriptor it uses to save the file descriptor
7823 opened on a shell script to close on exec.
7824
7825o. Fixed a bug in the prompt string decoding that caused it to misbehave
7826 when presented an octal sequence of fewer than three characters.
7827
7828p. Fixed the `test' builtin to return an error if `[' is supplied a single
7829 argument that is not `]'.
7830
7831q. Fixed a bug that caused subshells started to run executable shell scripts
7832 without a leading `#!' to incorrectly inherit an argument list preceding
7833 a shell builtin (like such a script called from a script sourced with `.',
7834 where there were variable assignments preceding the `.' command)
7835
7836r. Fixed a bug that caused changes to variables supplied in an assignment
7837 statement preceding a shell builtin to not be honored (like a script
7838 run with `.').
7839
7840s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values
7841 when the shell is started.
7842
7843t. Fixed a bug that caused SIGINT to kill shell scripts after the script
7844 called `wait'.
7845
7846u. The `fc' builtin now tries to create its temporary files in the directory
7847 named by $TMPDIR.
7848
7849v. Bash no longer calls any Readline functions or uses any Readline variables
7850 not declared in readline.h.
7851
7852w. Fixed a bug that caused some substitutions involving $@ to not be split
7853 correctly, especially expansions of the form ${paramterOPword}.
7854
7855x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it
7856 appears in the initial environment.
7857
7858y. Fixed a couple of problems with shell scripts without a leading `#!'
7859 being executed out of shell functions that could cause core dumps if
7860 such a script attempted to execute `return'.
7861
7862z. Fixed a problem with the `-nt' and `-ot' binary operators for the
7863 `test/[' builtin and the `[[' conditional command that caused wrong
7864 return values if one of the file arguments did not exist.
7865
7866aa. Fixed a bug that caused non-interactive shells which had previously
7867 executed `shopt -s expand_aliases' to fail to expand aliases in a
7868 command like `(command) &'.
7869
78702. Changes to Readline
7871
7872a. Changes to make most (but not yet all -- there is still crlf()) of the
7873 exported readline functions declared in readline.h have an rl_ prefix.
7874
7875b. More `const' changes in function arguments, mostly for completion
7876 functions.
7877
7878c. Fixed a bug in rl_forward that could cause the point to be set to before
7879 the beginning of the line in vi mode.
7880
7881d. Fixed a bug in the callback read-char interface to make it work when a
7882 readline function pushes some input onto the input stream with
7883 rl_execute_next (like the incremental search functions).
7884
7885e. Fixed a file descriptor leak in the history file manipulation code that
7886 was tripped when attempting to truncate a non-regular file (like
7887 /dev/null).
7888
7889f. Some existing variables are now documented and part of the public
7890 interface (declared in readline.h): rl_explict_arg, rl_numeric_arg,
7891 rl_editing_mode, rl_last_func.
7892
7893g. Renamed rltty_set_default_bindings to rl_tty_set_default_bindings and
7894 crlf to rl_crlf, so there are no public functions declared in readline.h
7895 without an `rl_' prefix. The old functions still exist for backwards
7896 compatibility.
7897
78983. New Features in Bash
7899
7900a. A new loadable builtin, realpath, which canonicalizes and expands symlinks
7901 in pathname arguments.
7902
8868edaf 7903b. When `set' is called without options, it prints function definitions in a
28ef6c31
JA
7904 way that allows them to be reused as input. This affects `declare' and
7905 `declare -p' as well.
7906
79074. New Features in Readline
7908
7909a. New application-callable function rl_set_prompt(const char *prompt):
7910 expands its prompt string argument and sets rl_prompt to the result.
7911
7912b. New application-callable function rl_set_screen_size(int rows, int cols):
7913 public method for applications to set readline's idea of the screen
7914 dimensions.
7915
7916c. The history example program (examples/histexamp.c) is now built as one
7917 of the examples.
7918
7919------------------------------------------------------------------------------
7920This document details the changes between this version, bash-2.05-alpha1,
7921and the previous version, bash-2.04-release.
7922
79231. Changes to Bash
7924
7925a. A fix was made to allow newlines in compond array assignments.
7926
7927b. configure now checks for real-time signals with unusable values.
7928
7929c. Interactive shells no longer exit if a substitution fails because of an
7930 unset variable within a sourced file.
7931
7932d. Fixed a problem with incorrect matching of extended glob patterns when
7933 doing pattern substitution.
7934
7935e. `{' is now quoted by the completion code when it appears in a filename.
7936
7937f. Fixed an error in pattern matching that caused the matcher to not
7938 correctly skip the rest of a bracket expression after a character
7939 matched.
7940
7941g. Fixed a bug in the IFS word splitting code to make a non-whitespace IFS
7942 character preceded by IFS whitespace part of the current delimiter rather
7943 than generating a separate field.
7944
7945h. The {!prefix@} expansion now generates separate words, analogous to $@,
7946 when double-quoted.
7947
7948i. Command substitution now ignores NUL bytes in the command output, and the
7949 parser ignores them on input.
7950
7951j. A fix was made to the job control code to prevent hanging processes when
7952 the shell thinks background processes are running but the kernel returns
7953 -1/ECHILD from waitpid().
7954
7955k. `pwd' now prints an error message if the write fails when displaying the
7956 current directory.
7957
7958l. When in POSIX mode, the shell prints trap dispostions without a leading
7959 `SIG' in the signal specification.
7960
7961m. Fixed a parser bug that caused the current command's line count to be
7962 messed up by a compound array assignment.
7963
7964n. Fixed a bug in the unwind-protect code that caused bad behavior on machines
7965 where ints and pointers are not the same size.
7966
7967o. System-specific configure changes for: MacOS X.
7968
7969p. Changes for Cygwin to translate \r\n and \r to \n and to set file
7970 descriptors used for reading input to text mode in various places.
7971
7972q. Fixed a bug that caused `!' to occasionally not be honored when in
7973 a (...) subshell.
7974
7975r. Bash no longer assumes that getcwd() will return any useful error message
7976 in the buffer passed as an argument if the call fails.
7977
7978s. The `source', `.', and `fc' builtins no longer check whether a file is
7979 binary before reading commands from it.
7980
7981t. Subshells no longer turn off job control when they exit, since that
7982 sometimes resulted in the terminal being reset to the wrong process
7983 group.
7984
7985u. The history code no longer tries to save the second and subsequent lines
7986 of a multi-line command if the first line was not saved.
7987
7988v. The history saving code now does a better job of saving blank lines in a
7989 multi-line command.
7990
7991w. Removed a `feature' that made `ulimit' silently translate `unlimited' to
7992 the current hard limit, which obscured some kernel error returns.
7993
7994x. Fixed the grammar so that `}' is recognized as a reserved word after
7995 another reserved word, rather than requiring a `;' or newline. This
7996 means that constructs like
7997
7998 { { echo a b c ; } }
7999
8000 work as expected.
8001
8002y. Conditional commands ([[...]]) now perform tilde expansion on their
8003 arguments.
8004
8005z. Noted in the documentation that `set -a' will cause functions to be
8006 exported if they are defined after `set -a' is executed.
8007
8008aa. When an interactive login shell starts, if $PWD and $HOME refer to the
8009 same directory but are not the same string, $PWD is set to $HOME.
8010
8011bb. Fixed `printf' to handle invalid floating point numbers better.
8012
8013cc. Temporary files are now created with random filenames, to improve security.
8014
8015dd. The readline initialization code now binds the custom bash functions and
8016 key bindings after the readline defaults are set up.
8017
8018ee. Fixed the `source' builtin to no longer overwrite a shell function's
8019 argument list, even if the sourced file changes the positional parameters.
8020
8021ff. A bug fix was made in the expansion of `$*' in contexts where it should
8022 not be split, like assignment statements.
8023
8024gg. Fixed a bug in the parameter substring expansion to handle conditional
8025 arithmetic expressions ( exp ? val1 : val2 ) without cutting the expression
8026 off at the wrong `:'.
8027
8028hh. The `<>' redirection is no longer subject to the current setting of
8029 `noclobber', as POSIX.2 specifies.
8030
8031ii. Fixed a bug in the conditional command parsing code that caused expressions
8032 in parentheses to occasionally be parsed incorrectly.
8033
8034jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or
8035 {...} to follow the )) without an intervening list terminator.
8036
8037kk. `printf' now treats `\E' the same as `\e' when performing backslash escape
8038 expansion for the `%b' format specifier.
8039
8040ll. When in POSIX mode, the shell no longer searches the current directory for
8041 a file to be sourced with `.' or `source' if `.' is not in $PATH.
8042
8043mm. Interactive comments are no longer turned off when POSIX mode is disabled.
8044
8045nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's
8046 environment when it starts up.
8047
8048oo. Fixed a bug in the `command' builtin so the effect of a command like
8049 `command exec 4<file' is as if the `command' had been omitted.
8050
8051pp. ${foo[@]} and ${foo[*]} now work as in ksh93 if `foo' is not an array
8052 variable.
8053
8054qq. ${#foo[X]}, where X is 0, @, or *, now work as in ksh93 if `foo' is not
8055 an array variable.
8056
8057rr. The shell's idea of an absolute pathname now takes into account a
8058 possible drive specification on Cygwin and other Windows systems.
8059
8060ss. Fixed a bug which caused incorrect parsing of some multi-character
8061 constructs if they were split across input lines with backslash-newline
8062 line continuation.
8063
8064tt. Fixed a bug that caused restricted shell mode to be set inappropriately
8065 when trying to execute a shell script without a leading `#!'.
8066
8067uu. Shell function definitions no longer require that the body be a group
8068 command ( {...} ), as POSIX.2 requires.
8069
8070vv. The `cd' and `pwd' builtins now process symlinks in pathnames internally
8071 and should require many fewer calls to getcwd().
8072
8073ww. Fixed a bug that caused a pipeline's process group to be set incorrectly
8074 if one of the pipeline elements contained a command substitution.
8075
8076xx. Fixed a bug that caused core dumps when expanding the value of HISTIGNORE.
8077
8078yy. The output of `set' is now quoted using $'...' so invisible characters are
8079 displayed as escape sequences.
8080
8081zz. Fixed the help text for `unset', since PATH and IFS may both be unset.
8082
8083aaa. The shell no longer puts directory names into the command hash table.
8084
8085bbb. Fixed a bug in `read' that caused it to occasionally free memory twice if
8086 it was interrupted after reading a large amount of data.
8087
8088ccc. Assignment statements that attempt to assign values to readonly variables
8089 now cause the command to return an error status.
8090
8091ddd. Fixed a bug that could cause incorrect output if a $(<file) construct was
8092 interrupted.
8093
8094eee. GROUPS and FUNCNAME now return an error status when assignment is
8095 attempted, but may be unset (in which case they lose their special
8096 properties). In all respects except unsetting, they are readonly.
8097
8098fff. The string-to-integer conversion code now ignores trailing whitespace in
8099 the string, even if strtol(3) does not.
8100
8101ggg. The tcsh magic-space function now does a better job of inserting the
8102 space close to where the point was before the history expansion, rather
8103 than just appending it.
8104
8105hhh. Fixed a bug which caused a file sourced from an interactive shell to
8106 fill up the jobs table if it ran lots of jobs.
8107
8108iii. Fixed a bug in the parameter pattern substitution code to avoid infinite
8109 recursion on zero-length matches.
8110
81112. Changes to Readline
8112
8113a. When setting the terminal attributes on systems using `struct termio',
8114 readline waits for output to drain before changing the attributes.
8115
8116b. A fix was made to the history word tokenization code to avoid attempts to
8117 dereference a null pointer.
8118
8119c. Readline now defaults rl_terminal_name to $TERM if the calling application
8120 has left it unset, and tries to initialize with the resultant value.
8121
8122d. Instead of calling (*rl_getc_function)() directly to get input in certain
8123 places, readline now calls rl_read_key() consistently.
8124
8125e. Fixed a bug in the completion code that allowed a backslash to quote a
8126 single quote inside a single-quoted string.
8127
8128f. rl_prompt is no longer assigned directly from the argument to readline(),
8129 but uses memory allocated by readline. This allows constant strings to
8130 be passed to readline without problems arising when the prompt processing
8131 code wants to modify the string.
8132
8133g. Fixed a bug that caused non-interactive history searches to return the
8134 wrong line when performing multiple searches backward for the same string.
8135
8136h. Many variables, function arguments, and function return values are now
8137 declared `const' where appropriate, to improve behavior when linking with
8138 C++ code.
8139
8140i. The control character detection code now works better on systems where
8141 `char' is unsigned by default.
8142
8143j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
8144
8145k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been
8146 replaced with a set of specific prototyped typedefs, though they are
8147 still in the readline header files for backwards compatibility.
8148
8149m. Nearly all of the (undocumented) internal global variables in the library
8150 now have an _rl_ prefix -- there were a number that did not, like
8151 screenheight, screenwidth, alphabetic, etc.
8152
8153n. The ding() convenience function has been renamed to rl_ding(), though the
8154 old function is still defined for backwards compatibility.
8155
8156o. The completion convenience functions filename_completion_function,
8157 username_completion_function, and completion_matches now have an rl_
8158 prefix, though the old names are still defined for backwards compatibility.
8159
8160p. The functions shared by readline and bash (linkage is satisfied from bash
8161 when compiling with bash, and internally otherwise) now have an sh_ prefix.
8162
8163q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so
8164 that the `soname' contains only the major version number rather than the
8165 major and minor numbers.
8166
8167r. Fixed a redisplay bug that occurred when the prompt spanned more than one
8168 physical line and contained invisible characters.
8169
81703. New Features in Bash
8171
8172a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
8173 per the new GNU coding standards.
8174
8175b. The /dev/tcp and /dev/udp redirections now accept service names as well as
8176 port numbers.
8177
8178c. `complete' and `compgen' now take a `-o value' option, which controls some
8179 of the aspects of that compspec. Valid values are:
8180
8181 default - perform bash default completion if programmable
8182 completion produces no matches
8183 dirnames - perform directory name completion if programmable
8184 completion produces no matches
8185 filenames - tell readline that the compspec produces filenames,
8186 so it can do things like append slashes to
8187 directory names and suppress trailing spaces
8188
81894. New Features in Readline
8190
8191a. The blink timeout for paren matching is now settable by applications.
8192
8193b. _rl_executing_macro has been renamed to rl_executing_macro, which means
8194 it's now part of the public interface.
8195
8196c. Readline has a new variable, rl_readline_state, which is a bitmap that
8197 encapsulates the current state of the library; intended for use by
8198 callbacks and hook functions.
8199
8200------------------------------------------------------------------------------
bb70624e
JA
8201This document details the changes between this version, bash-2.04-release,
8202and the previous version, bash-2.04-beta5.
8203
82041. Changes to Bash
8205
8206a. Better compile-time and configure-time checks for the necessity of
8207 inet_aton().
8208
8209b. A bug was fixed in the expansion of "${@:-}" when there are positional
8210 parameters.
8211
8212c. A typo was fixed in the output of `complete'.
8213
8214d. The matches generated for a word by the `-W' argument to complete and
8215 compgen are now matched against the word being completed, and only
8216 matches are returned as the result.
8217
8218e. Some fixes were made for systems which do not restart read(2) when a
8219 signal caught by bash is received.
8220
8221f. A bug was fixed which caused the umask to be set to 0 when an invalid
8222 symbolic mode mask was parsed.
8223
8224g. Fixed a bug that could cause a core dump if a SIGCHLD was received while
8225 performing an assignment statement using command substitution.
8226
8227h. Changed the word splitting function for programmable completion so cases
8228 in which the cursor is between words are handled a bit better.
8229
82302. Changes to Readline
8231
8232a. rl_funmap_names() is now documented.
8233
82343. New Features in Bash
8235
8236a. The LC_NUMERIC variable is now treated specially, and used to set the
8237 LC_NUMERIC locale category for number formatting, e.g., when `printf'
8238 displays floating-point numbers.
8239
8240------------------------------------------------------------------------------
8241This document details the changes between this version, bash-2.04-beta5,
8242and the previous version, bash-2.04-beta4.
8243
82441. Changes to Bash
8245
8246a. A couple of changes were made to the Makefiles for easier building on
8247 non-Unix systems.
8248
8249b. Fixed a bug where the current prompt would be set to $PS2 at startup.
8250
8251c. The shell script that tests an already-installed version was changed to
8252 remove the directory it created its test programs in at exit.
8253
8254d. Several changes were made to the code that tokenizes an input line for
8255 the programmable completion code. Shell metacharacters will now appear
8256 as individual words in the word list passed to the completion functions.
8257 Some of the example completion shell functions were changed to understand
8258 redirection operators.
8259
8260e. A bug was fixed that, under obscure circumstances, could confuse the
8261 parser when a shell function was run by the programmable completion code.
8262
8263f. A bug was fixed in the ulimit builtin for systems not using getrlimit().
8264
8265g. The execution code now propagates the correct exit status back to the rest
8266 of the code if the return value of a subshell command was being inverted.
8267 Some new test cases for inverting return values with the `!' reserved
8268 word have been added.
8269
8270h. Negative exponents in the arithmetic evaluation of v**e now return an
8271 evaluation error.
8272
8273i. A bug that caused bash to check the wrong process in a pipeline for
8274 abnormal termination (and consequently resetting the terminal attributes)
8275 was fixed.
8276
8277j. Fixed a bug that caused $PS2 to be displayed after PROMPT_COMMAND was
8278 executed.
8279
82802. Changes to Readline
8281
82821. Fixed a bug in a C preprocessor define that caused the keypad control
8283 functions to be compiled out for all platforms except DJGPP.
8284
8285------------------------------------------------------------------------------
8286This document details the changes between this version, bash-2.04-beta4,
8287and the previous version, bash-2.04-beta3.
8288
82891. Changes to Bash
8290
8291a. A couple of changes were made to the redirection to attempt to avoid
8292 race conditions and malicious file replacement.
8293
82942. A change was made to the string evaluation code (used for command
8295 substitution, `eval', and the `.' builtin) to fix an obscure core
8296 dump on alpha machines.
8297
82983. A bug that caused $LINENO to be wrong when executing arithmetic for
8299 commands was fixed.
8300
83014. A couple of memory leaks in the programmable completion code were fixed.
8302
83035. A bug that could cause a core dump by freeing memory twice during a call
8304 to `eval' if `set -u' had been enabled and an undefined variable was
8305 referenced was fixed.
8306
8307------------------------------------------------------------------------------
8308This document details the changes between this version, bash-2.04-beta3,
8309and the previous version, bash-2.04-beta2.
8310
83111. Changes to Bash
8312
8313a. Bash should run the appropriate startup files when invoked by ssh2.
8314
8315b. Fixed a bug in the parsing of conditional commands that could cause a
8316 core dump.
8317
8318c. Fixed a bug in parsing job specifications that occasionally caused
8319 core dumps when an out-of-range job was referenced.
8320
8321d. Fixed the `type' and `command' builtins to do better reporting of
8322 commands that are not found in $PATH or the hash table.
8323
8324e. Fixed a POSIX.2 compliance problem in the command builtin -- commands
8325 are supposed to be reported as full pathnames.
8326
8327f. The `echo' builtin now returns failure if a write error occurs.
8328
8329g. Fixed a bug which caused the locale to not be reset correctly when
8330 LC_ALL was unset.
8331
8332h. Changed description of `getopts' in man page and reference manual to make
8333 it clear that option characters may be characters other than letters.
8334
8335i. If the shell exits while in a function, make sure that any trap on EXIT
8336 doesn't think the function is still executing.
8337
8338j. Bashbug now tries harder to find a usable editor if $EDITOR is not set,
8339 rather than simply defaulting to `emacs'.
8340
8341k. Changes to the scripts that guess and canonicalize the system type, from
8342 the latest `automake' distribution via Debian.
8343
8344l. When using named pipes for process substitution, make sure the file
8345 descriptors opened for reading are set to non-blocking mode.
8346
8347m. Fixed a bug that caused termination of pipelines that are killed by a
8348 signal to not be reported in some cases.
8349
8350n. When not in literal-history mode, shell comment lines are not added to
8351 the history list.
8352
8353o. When running in POSIX.2 mode, bash no longer performs word splitting on
8354 the expanded value of the word supplied as the filename argument to
8355 redirection operators.
8356
8357p. The prompt string decoding code now backslash-quotes only characters that
8358 are special within double quotes when expanding the \w and \W escape
8359 sequences.
8360
8361q. Fixed a bug in the prompt decoding code that could cause a non-interactive
8362 shell to seg fault if `\u' was used in PS4 and the shell was in xtrace
8363 mode.
8364
8365r. Fixed a bug that caused function definitions to be printed with any
8366 redirections that should be attached to the entire function before the
8367 closing brace.
8368
8369s. Changed the tilde expansion code for Cygwin systems to avoid creating
8370 pathnames beginning with `//' if $HOME == `/'.
8371
8372t. Fixed a couple of autoconf tests to avoid creating files with fixed names
8373 in /tmp.
8374
8375u. The `trap' and `kill' builtins now know the names of the POSIX.1b real-
8376 time signals on systems which support them.
8377
83782. Changes to Readline
8379
8380a. Fixed a problem with the single-quote quoting function that could cause
8381 buffer overflows.
8382
8383b. Fixed a bug that caused incorrect `stat characters' to be printed if
8384 the files being completed were in the root directory and visible-stats
8385 was enabled.
8386
83873. New Features in Bash
8388
8389a. There is a new `rbash.1' manual page, from the Debian release.
8390
8391b. The `--enable-usg-echo-default' option to `configure' has been renamed to
8392 `--enable-xpg-echo-default'. The old option is still there for backwards
8393 compatibility.
8394
8395------------------------------------------------------------------------------
8396This document details the changes between this version, bash-2.04-beta2,
8397and the previous version, bash-2.04-beta1.
8398
83991. Changes to Bash
8400
8401a. Fixed a bug that could cause pipes to be closed inappropriately in
8402 some obscure cases.
8403
8404b. Fixed a bug that caused creation of the exported environment to clobber
8405 the current command string if there were any exported shell functions.
8406
8407c. Some changes were made to reduce bash's memory usage.
8408
8409d. Fixed a problem with programmable completion and filenames to be
8410 completed containing quote characters.
8411
8412e. Changed the code the removes named pipes created for the <(...) and >(...)
8413 expansions to defer removal until after any current shell function has
8414 finished executing.
8415
8416f. Fixed a bug in `select' which caused it to not handle the `continue'
8417 builtin correctly.
8418
8419g. Autoconf tests added for cygwin32 and mingw32.
8420
84212. New Features in Bash
8422
8423a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc'
8424 (which is still there for backwards compatibility).
8425
8426------------------------------------------------------------------------------
8427This document details the changes between this version, bash-2.04-beta1,
8428and the previous version, bash-2.04-alpha1.
8429
84301. Changes to Bash
8431
8432a. Fixed a bug in the programmable completion code that occurred when
8433 trying to complete command lines containing a `;' or `@'.
8434
8435b. The file descriptor from which the shell is reading a script is now
8436 moved to a file descriptor above the user-addressible range.
8437
8438c. Changes to `printf' so that it can handle integers beginning with 0
8439 or 0x as octal and hex, respectively.
8440
8441d. Fixes to the programmable completion code so it handles nonsense like
8442 `compgen -C xyz' gracefully.
8443
8444e. The shell no longer modifies the signal handler for SIGPROF, allowing
8445 profiling again on certain systems.
8446
8447f. The shell checks for a new window size, if the user has requested it,
8448 after a process exits due to a signal.
8449
8450g. Fixed a bug with variables with null values in a program's temporary
8451 environment and the bash getenv() replacement.
8452
8453h. `declare' and the other builtins that take variable assignments as
8454 arguments now honor `set -a' and mark modified variables for export.
8455
8456i. Some changes were made for --dump-po-strings mode when writing strings
8457 with embedded newlines.
8458
8459j. The code that caches export strings from the initial environment now
8460 duplicates the string rather than just pointing into the environment.
8461
8462k. The filename completion quoting code now uses single quotes by default
8463 if the filename being completed contains newlines, since \<newline>
8464 has a special meaning to the parser.
8465
8466l. Bash now uses typedefs bits32_t and u_bits32_t instead of int32_t and
8467 u_int32_t, respectively to avoid conflicts on certain Unix versions.
8468
8469m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x.
8470
8471n. Fixed a problem with hostname-to-ip-address translation in the
8472 /dev/(tcp|udp)/hostname/port redirection code.
8473
8474o. The texinfo manual has been reorganized slightly.
8475
8476p. Filename generation (globbing) range comparisons in bracket expressions
8477 no longer use strcoll(3) even if it is available, since it has unwanted
8478 effects in certain locales.
8479
8480q. Fixed a cosmetic problem in the source that caused the shell to not
8481 compile if DPAREN_ARITHMETIC was not defined but ARITH_FOR_COMMAND was.
8482
8483r. Fixed a bug in the here-document code tripped when the file descriptor
8484 opened to the file containing the text of the here document was the
8485 same as a redirector specified by the user.
8486
8487s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline'
8488 in `time ! pipeline'.
8489
8490t. Fixed a bug with the `wait' builtin which manifested itself when an
8491 interrupt was received while the shell was waiting for asynchronous
8492 processes in a shell script.
8493
8494u. Fixed the DEBUG trap code so that it has the correct value of $?.
8495
8496v. Fixed a bug in the parameter pattern substitution code that could cause
8497 the shell to attempt to free unallocated memory if the pattern started
8498 with `/' and an expansion error occurs.
8499
8500w. Fixed a bug in the positional parameter substring code that could
8501 cause the shell to loop freeing freed memory.
8502
8503x. Fixed a bug in the positional parameter pattern substitution code so
8504 that it correctly handles null replacement strings with a pattern
8505 string prefixed with `%' or `#'.
8506
8507y. The shell no longer attempts to import functions from the environment if
8508 started with `-n'.
8509
8510z. Fixed a bug that caused `return' in a command substitution executed in
8511 a shell function to return from the function in a subshell and continue
8512 execution.
8513
8514aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell
8515 is restricted.
8516
8517bb. The wait* job control functions now behave better if called when there
8518 are no unwaited-for children.
8519
8520cc. Command substitution no longer unconditionally disables job control in
8521 the subshell started to run the command.
8522
8523dd. A bug was fixed that occasionally caused traps to mess up the parser
8524 state.
8525
8526ee. `bashbug' now honors user headers in the mail message it sends.
8527
8528ff. A bug was fixed that caused the `:p' history modifier to not print the
8529 history expansion if the `histverify' option was set.
8530
85312. Changes to Readline
8532
8533a. Fixed a bug in the redisplay code for lines with more than 256 line
8534 breaks.
8535
8536b. A bug was fixed which caused invisible character markers to not be
8537 stripped from the prompt string if the terminal was in no-echo mode.
8538
8539c. Readline no longer tries to get the variables it needs for redisplay
8540 from the termcap entry if the calling application has specified its
8541 own redisplay function. Readline treats the terminal as `dumb' in
8542 this case.
8543
8544d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
8545 sequences is redrawn correctly.
8546
85473. New Features in Bash
8548
8549a. `bashbug' now accepts `--help' and `--version' options.
8550
8551b. There is a new `xpg_echo' option to `shopt' that controls the behavior
8552 of echo with respect to backslash-escaped characters at runtime.
8553
8554------------------------------------------------------------------------------
8555This document details the changes between this version, bash-2.04-alpha1,
8556and the previous version, bash-2.04-devel.
8557
85581. Changes to Bash
8559
8560a. Fixed a bug that could cause core dumps when performing substring
8561 expansion.
8562
8563b. Shared object configuration changes for: Solaris, OSF/1
8564
8565c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities
8566 for pathname expansion now understands GLOBIGNORE.
8567
8568d. The code that implements `eval' was changed to save the value of the
8569 current prompt, so an eval in a shell function called by the programmable
8570 completion code will not change the prompt to $PS2.
8571
8572e. Restored the undocumented NON_INTERACTIVE_LOGIN_SHELLS #define to
8573 config-top.h. If this is defined, all login shells will read the
8574 startup files, not just interactive and non-interactive started with
8575 the `--login' option.
8576
8577f. Fixed a bug that caused the expansion code to occasionally dump core if
8578 IFS contained characters > 128.
8579
8580g. Fixed a problem with the grammar so that a newline is not required
8581 after the `))' in the new-style arithmetic for statement; a semicolon
8582 may be used as expected.
8583
8584h. Variable indirection may now reference the shell's special variables.
8585
8586i. The $'...' and $"..." constructs are now added to the history correctly
8587 if they contain newlines and command-oriented history is enabled.
8588
8589j. It is now an error to try to assign a value to a function-local copy
8590 of a readonly shell variable (declared with the `local' builtin).
8591
85922. Changes to Readline
8593
8594a. The history file code now uses O_BINARY mode when reading and writing
8595 the history file on cygwin32.
8596
85973. New Features in Bash
8598
8599a. A new programmable completion facility, with two new builtin commands:
8600 complete and compgen.
8601
8602b. configure has a new option, `--enable-progcomp', to compile in the
8603 programmable completion features (enabled by default).
8604
8605c. `shopt' has a new option, `progcomp', to enable and disable programmable
8606 completion at runtime.
8607
8608d. Unsetting HOSTFILE now clears the list of hostnames used for completion.
8609
86104. New Features in Readline
8611
8612a. A new variable, rl_gnu_readline_p, always 1. The intent is that an
8613 application can verify whether or not it is linked with the `real'
8614 readline library or some substitute.
8615
8616------------------------------------------------------------------------------
8617This document details the changes between this version, bash-2.04-devel,
8618and the previous version, bash-2.03-release.
8619
86201. Changes to Bash
8621
8622a. System-specific configuration and source changes for: Interix, Rhapsody
8623
8624b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if
8625 JOB_CONTROL was not defined.
8626
8627c. An obscure race condition in the trap code was fixed.
8628
8629d. The string resulting from $'...' is now requoted to avoid any further
8630 expansion.
8631
8632e. The $'...' quoting syntax now allows backslash to escape a single quote,
8633 for ksh-93 compatibility.
8634
8635f. The $"..." quoting syntax now escapes backslashes and double quotes in
8636 the translated string when displaying them with the --dump-po-strings
8637 option.
8638
8639g. `echo -e' no longer converts \' to '.
8640
8641h. Fixes were made to the extended globbing code to handle embedded (...)
8642 patterns better.
8643
8644i. Some improvements were made to the code that unsets `nodelay' mode on
8645 the file descriptor from which bash is reading input.
8646
8647j. Some changes were made to the replacement termcap library for better
8648 operation on MS-DOS.
8649
8650k. Some changes were made to the tilde expansion code to handle backslash
8651 as a pathname separator on MS-DOS.
8652
8653l. The source has been reorganized a little bit -- there is now an `include'
8654 subdirectory, and lib/posixheaders has been removed.
8655
8656m. Improvements were made to the `read' builtin so that it makes many
8657 fewer read(2) system calls.
8658
8659n. The expansion of $- will include `c' and `s' when those options are
8660 supplied at shell invocation.
8661
8868edaf 8662o. Several improvements were made to the completion code: variable completion
bb70624e
JA
8663 now works better when there are unterminated expansions, command
8664 completion understands quotes better, and completion now works in certain
8665 unclosed $(... constructs.
8666
8667p. The arithmetic expansion code was fixed to not need the value of a
8668 variable being assigned a value (fixes the "ss=09; let ss=10" bug).
8669
8670q. Some changes were made to make exported environment creation faster.
8671
8672r. The html documentation will be installed into $(htmldir) if that variable
8673 has a value when `make install' is run.
8674
8675s. Fixed a bug that would cause the bashrc file to be sourced inappropriately
8676 when bash is started by sshd.
8677
8678t. The SSH_CLIENT environment variable is no longer auto-exported.
8679
8680u. A bug that caused redirections with (...) subshells to be performed in
8681 the wrong order was fixed.
8682
28ef6c31 8683v. A bug that occasionally caused inappropriate expansion of assignment
bb70624e
JA
8684 statements in compound array assignments was fixed.
8685
8686w. The code that parses the words in a compound array assignment was
8687 simplified considerably and should work better now.
8688
8689x. Fixes to the non-job-control code in nojobs.c to make it POSIX.2-compliant
8690 when a user attempts to retrieve the status of a terminated background
8691 process.
8692
8693y. Fixes to the `printf' builtin so that it doesn't try to expand all
8694 backslash escape sequences in the format string before parsing it for
8695 % format specifiers.
8696
86972. Changes to Readline
8698
8699a. The history library tries to truncate the history file only if it is a
8700 regular file.
8701
8702b. A bug that caused _rl_dispatch to address negative array indices on
8703 systems with signed chars was fixed.
8704
8705c. rl-yank-nth-arg now leaves the history position the same as when it was
8706 called.
8707
8708d. Changes to the completion code to handle MS-DOS drive-letter:pathname
8709 filenames.
8710
8711e. Completion is now case-insensitive by default on MS-DOS.
8712
8713f. Fixes to the history file manipulation code for MS-DOS.
8714
8715g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
8716
8717h. Some fixes were made to the redisplay code for better operation on MS-DOS.
8718
8719i. The quoted-insert code will now insert tty special chars like ^C.
8720
8721j. A bug was fixed that caused the display code to reference memory before
8722 the start of the prompt string.
8723
8724k. More support for __EMX__ (OS/2).
8725
8726l. A bug was fixed in readline's signal handling that could cause infinite
8727 recursion in signal handlers.
8728
8729m. A bug was fixed that caused the point to be less than zero when rl_forward
8730 was given a very large numeric argument.
8731
8732n. The vi-mode code now gets characters via the application-settable value
8733 of rl_getc_function rather than calling rl_getc directly.
8734
87353. New Features in Bash
8736
8737a. The history builtin has a `-d offset' option to delete the history entry
8738 at position `offset'.
8739
8740b. The prompt expansion code has two new escape sequences: \j, the number of
8741 active jobs; and \l, the basename of the shell's tty device name.
8742
8743c. The `bind' builtin has a new `-x' option to bind key sequences to shell
8744 commands.
8745
8746d. There is a new shell option, no_empty_command_completion, which, when
8747 enabled, disables command completion when TAB is typed on an empty line.
8748
8749e. The `help' builtin has a `-s' option to just print a builtin's usage
8868edaf 8750 synopsis.
bb70624e
JA
8751
8752f. There are several new arithmetic operators: id++, id-- (variable
8753 post-increment/decrement), ++id, --id (variabl pre-increment/decrement),
8754 expr1 , expr2 (comma operator).
8755
8756g. There is a new ksh-93 style arithmetic for command:
8757 for ((expr1 ; expr2; expr3 )); do list; done
8758
8759h. The `read' builtin has a number of new options:
8760 -t timeout only wait timeout seconds for input
8761 -n nchars only read nchars from input instead of a full line
8762 -d delim read until delim rather than newline
8763 -s don't echo input chars as they are read
8764
8765i. The redirection code now handles several filenames specially:
8766 /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
8767 not they are present in the file system.
8768
8769j. The redirection code now recognizes pathnames of the form
8770 /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
8771 of the appropriate type to the specified port on the specified host.
8772
8773k. The ksh-93 ${!prefix*} expansion, which expands to the names of all
8774 shell variables whose names start with prefix, has been implemented.
8775
8776l. There is a new dynamic variable, FUNCNAME, which expands to the name of
8777 a currently-executing function. Assignments to FUNCNAME have no effect.
8778
8779m. The GROUPS variable is no longer readonly; assignments to it are silently
8780 discarded. This means it can be unset.
8781
87824. New Features in Readline
8783
8784a. Parentheses matching is now always compiled into readline, and enabled
8785 or disabled when the value of the `blink-matching-paren' variable is
8786 changed.
8787
8788b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
8789
8790c. MS-DOS systems now use ~/_history as the default history file.
8791
8792d. history-search-{forward,backward} now leave the point at the end of the
8793 line when the string to search for is empty, like
8794 {reverse,forward}-search-history.
8795
8796e. history-search-{forward,backward} now leave the last history line found
8797 in the readline buffer if the second or subsequent search fails.
8798
8799f. New function for use by applications: rl_on_new_line_with_prompt, used
8800 when an application displays the prompt itself before calling readline().
8801
8802g. New variable for use by applications: rl_already_prompted. An application
8803 that displays the prompt itself before calling readline() must set this to
8804 a non-zero value.
8805
8806------------------------------------------------------------------------------
b72432fd
JA
8807This document details the changes between this version, bash-2.03-release,
8808and the previous version, bash-2.03-beta2.
8809
88101. Changes to Bash
8811
8812a. A file descriptor leak in the `fc' builtin was fixed.
8813
8814b. A bug was fixed in the `read' builtin that caused occasional spurious
8815 failures when using `read -e'.
8816
8817c. The version code needed to use the value of the cpp variable
8818 CONF_MACHTYPE rather than MACHTYPE.
8819
8820d. A new test was added to exercise the command printing and copying code.
8821
8822e. A bug was fixed that caused `time' to be recognized as a reserved word
8823 if it was the first pattern in a `case' statement pattern list.
8824
8825------------------------------------------------------------------------------
8826This document details the changes between this version, bash-2.03-beta2,
8827and the previous version, bash-2.03-beta1.
8828
88291. Changes to Bash
8830
8831a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2.
8832
8833b. config.{guess,sub} support added for the NEC SX4.
8834
8835c. Changed some of the cross-compiling sections of the configure macros in
8836 aclocal.m4 so that configure won't abort.
8837
8838d. Slight changes to how the HTML versions of the bash and readline manuals
8839 are generated.
8840
8841e. Fixed conditional command printing to avoid interpreting printf `%'-escapes
8842 in arguments to [[.
8843
8844f. Don't include the bash malloc on all variants of the alpha processor.
8845
8846g. Changes to configure to make --enable-profiling work on Solaris 2.x.
8847
8848h. Fixed a bug that manifested itself when shell functions were called
8849 between calls to `getopts'.
8850
8851i. Fixed pattern substitution so that a bare `#'as a pattern causes the
8852 replacement string to be prefixed to the search string, and a bare
8853 `%' causes the replacement string to be appended to the search string.
8854
8855j. Fixed a bug in the command execution code that caused child processes
8856 to occasionally have the wrong value for $!.
8857
88582. Changes to Readline
8859
8860a. Added code to the history library to catch history substitutions using
8861 `&' without a previous history substitution or search having been
8862 performed.
8863
88643. New Features in Bash
8865
88664. New Features in Readline
8867
8868a. New bindable variable: `isearch-terminators'.
8869
8870b. New bindable function: `forward-backward-delete-char' (unbound by default).
8871
8872------------------------------------------------------------------------------
8873This document details the changes between this version, bash-2.03-beta1,
8874and the previous version, bash-2.03-alpha.
8875
88761. Changes to Bash
8877
8878a. A change was made to the help text for `{...}' to make it clear that a
8879 semicolon is required before the closing brace.
8880
8881b. A fix was made to the `test' builtin so that syntax errors cause test
8882 to return an exit status > 1.
8883
8884c. Globbing is no longer performed on assignment statements that appear as
8885 arguments to `assignment builtins' such as `export'.
8886
8887d. System-specific configuration changes were made for: Rhapsody,
8888 AIX 4.2/gcc, BSD/OS 4.0.
8889
8890e. New loadable builtins: ln, unlink.
8891
8892f. Some fixes were made to the globbing code to handle extended glob patterns
8893 which immediately follow a `*'.
8894
8895g. A fix was made to the command printing code to ensure that redirections
8896 following compound commands have a space separating them from the rest
8897 of the command.
8898
8899h. The pathname canonicalization code was changed to produce fewer leading
8900 `//' sequences, since those are interpreted as network file system
8901 pathnames on some systems.
8902
8903i. A fix was made so that loops containing `eval' commands in commands passed
8904 to `bash -c' would not exit prematurely.
8905
8906j. Some changes were made to the job reaping code when the shell is not
8907 interactive, so the shell will retain exit statuses longer for examination
8908 by `wait'.
8909
8910k. A fix was made so that `jobs | command' works again.
8911
8912l. The erroneous compound array assignment var=((...)) is now a syntax error.
8913
8914m. A change was made to the dynamic loading code in `enable' to support
8915 Tenon's MachTen.
8916
8917n. A fix was made to the globbing code so that extended globbing patterns
8918 will correctly match `.' in a bracket expression.
8919
89202. Changes to Readline
8921
8922a. A fix was made to the completion code in which a typo caused the wrong
8923 value to be passed to the function that computed the longest common
8924 prefix of the list of matches.
8925
8926b. The completion code now checks the value of rl_filename_completion_desired,
8927 which is set by application-supplied completion functions to indicate
8928 that filename completion is being performed, to decide whether or not to
8929 call an application-supplied `ignore completions' function.
8930
89313. New Features in Bash
8932
8933a. A change was made to the startup file code so that any shell begun with
8934 the `--login' option, even non-interactive shells, will source the login
8935 shell startup files.
8936
89374. New Features in Readline
8938
8939a. A new variable, rl_erase_empty_line, which, if set by an application using
8940 readline, will cause readline to erase, prompt and all, lines on which the
8941 only thing typed was a newline.
8942
8943------------------------------------------------------------------------------
8944This document details the changes between this version, bash-2.03-alpha,
8945and the previous version, bash-2.02.1-release.
8946
89471. Changes to Bash
8948
8949a. System-specific configuration changes were made for: Irix 6.x, Unixware 7.
8950
8951b. The texi2dvi and texi2html scripts were updated to the latest versions
8952 from the net.
8953
8954c. The configure tests that determine which native type is 32 bits were
8955 changed to not require a compiled program.
8956
8957d. Fixed a bug in shell_execve that could cause memory to be freed twice
8958 after a failed exec.
8959
8960e. The `printf' test uses `diff -a' if it's available to prevent confusion
8961 due to the non-ascii output.
8962
8963f. Shared object configuration is now performed by a shell script,
8964 support/shobj-conf, which generates values to be substituted into
8965 makefiles by configure.
8966
8967g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a
8968 return value.
8969
8970h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar
8971 handling of RLIMIT_FILESIZE.
8972
8973i. Some new loadable builtins were added: id, printenv, sync, whoami, push,
8974 mkdir. `pushd', `popd', and `dirs' can now be built as regular or
8975 loadable builtins from the same source file.
8976
8977j. Changes were made to `printf' to handle NUL bytes in the expanded format
8978 string.
8979
8980k. The various `make clean' Makefile targets now descend into lib/sh.
8981
8982l. The `type' builtin was changed to use the internal `getopt' so that things
8983 like `type -ap' work as expected.
8984
8985m. There is a new configuration option, --with-installed-readline, to link
8986 bash with a locally-installed version of readline. Only readline version
8987 4.0 and later releases can support this. Shared and static libraries
8988 are supported. The installed include files are used.
8989
8990n. There is a new autoconf macro used to find which basic type is 64 bits.
8991
8992o. Dynamic linking and loadable builtins should now work on SCO 3.2v5*,
8993 AIX 4.2 with gcc, Unixware 7, and many other systems using gcc, where
8994 the `-shared' options works correctly.
8995
8996p. A bug was fixed in the bash filename completion code that caused memory to
8997 be freed twice if a directory name containing an unset variable was
8998 completed and the -u option was set.
8999
9000q. The prompt expansion code now quotes the `$' in the `\$' expansion so it
9001 is not processed by subsequent parameter expansion.
9002
9003r. Fixed a parsing bug that caused a single or double quote after a `$$' to
9004 trigger ANSI C expansion or locale translation.
9005
9006s. Fixed a bug in the globbing code that caused quoted filenames containing
9007 no globbing characters to sometimes be incorrectly expanded.
9008
9009t. Changes to the default prompt strings if prompt string decoding is not
9010 compiled into the shell.
9011
9012u. Added `do', `then', `else', `{', and `(' to the list of keywords that may
9013 precede the `time' reserved word.
9014
9015v. The shell may now be cross-built for BeOS as well as cygwin32.
9016
9017w. The conditional command execution code now treats `=' the same as `=='
9018 for deciding when to perform pattern matching.
9019
9020x. The `-e' option no longer causes the shell to exit if a command exits
9021 with a non-zero status while running the startup files.
9022
9023y. The `printf' builtin no longer dumps core if a modifier is supplied in
9024 the format string without a conversion character (e.g. `%h').
9025
9026z. Array assignments of the form a=(...) no longer show up in the history
9027 list.
9028
9029aa. The parser was fixed to obey the POSIX.2 rules for finding the closing
9030 `}' in a ${...} expression.
9031
9032bb. The history file is now opened with mode 0600 rather than 0666, so bash
9033 no longer relies on the user's umask being set appropriately.
9034
9035cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now
9036 relies on proper behavior from the C library.
9037
9038dd. Minor changes were made to allow quoted variable expansions using
9039 ${...} to be completed correctly if there is no closing `"'.
9040
9041ee. Changes were made to builtins/Makefile.in so that configuring the shell
9042 with `--enable-profiling' works right and builtins/mkbuiltins is
9043 generated.
9044
90452. Changes to Readline
9046
9047a. The version number is now 4.0.
9048
9049b. There is no longer any #ifdef SHELL code in the source files.
9050
9051c. Some changes were made to the key binding code to fix memory leaks and
9052 better support Win32 systems.
9053
9054d. Fixed a silly typo in the paren matching code -- it's microseconds, not
9055 milliseconds.
9056
9057e. The readline library should be compilable by C++ compilers.
9058
9059f. The readline.h public header file now includes function prototypes for
9060 all readline functions, and some changes were made to fix errors in the
9061 source files uncovered by the use of prototypes.
9062
9063g. The maximum numeric argument is now clamped at 1000000.
9064
9065h. Fixes to rl_yank_last_arg to make it behave better.
9066
9067i. Fixed a bug in the display code that caused core dumps if the prompt
9068 string length exceeded 1024 characters.
9069
9070j. The menu completion code was fixed to properly insert a single completion
9071 if there is only one match.
9072
9073k. A bug was fixed that caused the display code to improperly display tabs
9074 after newlines.
9075
90763. New Features in Bash
9077
9078a. New `shopt' option, `restricted_shell', indicating whether or not the
9079 shell was started in restricted mode, for use in startup files.
9080
9081b. Filename generation is now performed on the words between ( and ) in
9082 array assignments (which it probably should have done all along).
9083
9084c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
9085
9086d. ENV and BASH_ENV are read-only variables in a restricted shell.
9087
90884. New Features in Readline
9089
9090a. Many changes to the signal handling:
9091 o Readline now catches SIGQUIT and cleans up the tty before returning;
9092 o A new variable, rl_catch_signals, is available to application writers
9093 to indicate to readline whether or not it should install its own
9094 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
9095 SIGTTIN, and SIGTTOU;
9096 o A new variable, rl_catch_sigwinch, is available to application
9097 writers to indicate to readline whether or not it should install its
9098 own signal handler for SIGWINCH, which will chain to the calling
9099 applications's SIGWINCH handler, if one is installed;
9100 o There is a new function, rl_free_line_state, for application signal
9101 handlers to call to free up the state associated with the current
9102 line after receiving a signal;
9103 o There is a new function, rl_cleanup_after_signal, to clean up the
9104 display and terminal state after receiving a signal;
9105 o There is a new function, rl_reset_after_signal, to reinitialize the
9106 terminal and display state after an application signal handler
9107 returns and readline continues
9108
9109b. There is a new function, rl_resize_terminal, to reset readline's idea of
9110 the screen size after a SIGWINCH.
9111
9112c. New public functions: rl_save_prompt and rl_restore_prompt. These were
9113 previously private functions with a `_' prefix.
9114
9115d. New function hook: rl_pre_input_hook, called just before readline starts
9116 reading input, after initialization.
9117
9118e. New function hook: rl_display_matches_hook, called when readline would
9119 display the list of completion matches. The new function
9120 rl_display_match_list is what readline uses internally, and is available
9121 for use by application functions called via this hook.
9122
9123f. New bindable function, delete-char-or-list, like tcsh.
9124
9125------------------------------------------------------------------------------
bc4cd23c
JA
9126This document details the changes between this version, bash-2.02.1-release,
9127and the previous version, bash-2.02-release.
9128
91291. Changes to Bash
9130
9131a. A bug that caused the bash readline support to not compile unless aliases
9132 and csh-style history were configured into the shell was fixed.
9133
9134b. Fixed a bug that could cause a core dump when here documents contained
9135 more than 1000 characters.
9136
9137c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same
9138 as the current directory when in POSIX mode.
9139
9140d. Fixed an alignment problem with the memory returned by the bash malloc,
9141 so returned memory is now 64-bit aligned.
9142
9143e. Fixed a bug that caused command substitutions executed within pipelines
9144 to put the terminal in the wrong process group.
9145
9146f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop,
9147 Unixware 2, and Unixware 7.
9148
9149g. Fixes to the pattern matching code to make it work correctly for eight-bit
9150 characters.
9151
9152h. Fixed a problem that occasionally caused the shell to display the wrong
9153 value for the new working directory when changing to a directory found
9154 in $CDPATH when in physical mode.
9155
9156i. Fixed a bug that caused core dumps when using conditional commands in
9157 shell functions.
9158
9159j. Fixed a bug that caused the printf builtin to loop forever if the format
9160 string did not consume any of the arguments.
9161
9162k. Fixed a bug in the parameter expansion code that caused "$@" to be
9163 incorrectly split if $IFS did not contain a space character.
9164
9165l. Fixed a bug that could cause a core dump when completing hostnames if
9166 the number of matching hostnames was an exact multiple of 16.
9167
9168m. Fixed a bug that caused the shell to fork too early when a command
9169 such as `%2 &' was given.
9170
91712. Changes to Readline
9172
9173a. Fixed a problem with redisplay that showed up when the prompt string was
9174 longer than the screen width and the prompt contained invisible characters.
9175
9176------------------------------------------------------------------------------
9177This document details the changes between this version, bash-2.02-release,
9178and the previous version, bash-2.02-beta2.
cce855bc
JA
9179
91801. Changes to Bash
9181
9182a. A bug was fixed that caused the terminal process group to be set
9183 incorrectly when performing command substitution of builtins in a
9184 pipeline.
9185
9186------------------------------------------------------------------------------
9187This document details the changes between this version, bash-2.02-beta2,
9188and the previous version, bash-2.02-beta1.
9189
91901. Changes to Bash
9191
9192a. Attempting to `wait' for stopped jobs now generates a warning message.
9193
9194b. Pipelines which exit due to SIGPIPE in non-interactive shells are now
9195 not reported if the shell is compiled -DDONT_REPORT_SIGPIPE.
9196
9197c. Some changes were made to builtins/psize.sh and support/bashbug.sh to
9198 attempt to avoid some /tmp file races and surreptitious file
9199 substitutions.
9200
9201d. Fixed a bug that caused the shell not to compile if configured with
9202 dparen arithmetic but without aliases.
9203
9204e. Fixed a bug that caused the input stream to be switched when assigning
9205 empty arrays with `bash -c'.
9206
9207f. A bug was fixed in the readline expansion glue code that caused bash to
9208 dump core when expanding lines with an unclosed single quote.
9209
9210g. A fix was made to the `cd' builtin so that using a non-empty directory
9211 from $CDPATH results in an absolute pathname of the new current working
9212 directory to be displayed after the current directory is changed.
9213
9214h. Fixed a bug in the variable assignment code that caused the shell to
9215 dump core when referencing an unset variable with `set -u' enabled in
9216 an assignment statement preceding a command.
9217
9218i. Fixed a bug in the exit trap code that caused reserved words to not be
9219 recognized under certain circumstances.
9220
9221j. Fixed a bug in the parameter pattern substitution code so that quote
9222 removal is performed.
9223
9224k. The shell should now configure correctly on Apple Rhapsody systems.
9225
9226l. The `kill' builtin now prints a usage message if it is not passed any
9227 arguments.
9228
9229------------------------------------------------------------------------------
9230This document details the changes between this version, bash-2.02-beta1,
9231and the previous version, bash-2.02-alpha1.
9232
92331. Changes to Bash
9234
9235a. A few compilation bugs were fixed in the new extended globbing code.
9236
9237b. Executing arithmetic commands now sets the command name to `((' so
9238 error messages look right.
9239
9240c. Fixed some build problems with various configuration options.
9241
9242d. The `printf' builtin now aborts immediately if an illegal format
9243 character is encountered.
9244
9245e. The code that creates here-documents now behaves better if the file it's
9246 trying to create already exists for some reason.
9247
9248f. Fixed a problem with the extended globbing code that made patterns like
9249 `x+*' expand incorrectly.
9250
9251g. The prompt string expansion code no longer quotes tildes with backslashes.
9252
9253h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in
9254 the presence of lstat(2) failures.
9255
9256i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'.
9257
9258j. The mail checking code now ensures that it has a valid default mailpath.
9259
9260k. A bug was fixed that caused local variables to be unset inappropriately
9261 when sourcing a script from within another sourced script.
9262
9263l. A bug was fixed in the history saving code so that functions are saved
9264 in the history list correctly if `cmdhist' is enabled, but `lithist'
9265 is not.
9266
9267m. A bug was fixed that caused printf overflows when displaying error
9268 messages.
9269
9270n. It should be easier to build the loadble builtins in examples/loadables,
9271 though some manual editing of the generated Makefile is still required.
9272
9273o. The user's primary group is now always ${GROUPS[0]}.
9274
9275p. Some updates were made to support/config.guess from the GNU master copy.
9276
9277q. Some changes were made to the autoconf support for Solaris 2.6 large
9278 files.
9279
9280r. The `command' builtins now does the right thing when confstr(3) cannot
9281 find a value for _CS_PATH.
9282
9283s. Extended globbing expressions like `*.!(c)' are not history expanded if
9284 `extglob' is enabled.
9285
9286t. Using the `-P' option to `cd' will force the value that is assigned to
9287 PWD to not contain any symbolic links.
9288
92892. Changes to Readline
9290
9291a. The code that prints completion listings now behaves better if one or
9292 more of the filenames contains non-printable characters.
9293
9294b. The time delay when showing matching parentheses is now 0.5 seconds.
9295
9296------------------------------------------------------------------------------
9297This document details the changes between this version, bash-2.02-alpha1,
9298and the previous version, bash-2.01.1-release.
9299
93001. Changes to Bash
9301
9302a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x,
9303 Solaris 2.6, SINIX SVR4.
9304
9305b. Changes were made to the generated `info' files so that `install-info'
9306 works correctly.
9307
9308c. PWD is now auto-exported.
9309
9310d. A fix was made to the pipeline code to make sure that the shell forks
9311 to execute simple commands consisting solely of assignment statements.
9312
9313e. Changes to the test suite for systems with 14-character filenames.
9314
9315f. The default sizes of some internal hash tables have been made smaller
9316 to reduce the shell's memory footprint.
9317
9318g. The `((...))' arithmetic command is now executed directly instead of
9319 being translated into `let "..."'.
9320
9321h. Fixes were made to the expansion code so that "$*", "$@", "${array[@]}",
9322 and "${array[@]}" expand correctly when IFS does not contain a space
9323 character, is unset, or is set to NULL.
9324
9325i. The indirect expansion code (${!var}) was changed so that the only
9326 valid values of `var' are variable names, positional parameters, `#',
9327 `@', and `*'.
9328
9329j. An arithmetic expression error in a $((...)) expansion now causes a
9330 non-interactive shell running in posix mode to exit.
9331
9332k. Compound array assignment now splits the words within the parentheses
9333 on shell metacharacters like the parser would before expansing them
9334 and performing the assignment. This is for compatibility with ksh-93.
9335
9336l. The internal shell backslash-quoting code (used in the output of `set'
9337 and completion) now quotes tildes if they appear at the start of the
9338 string or after a `=' or `:'.
9339
9340m. A couple of bugs with `shopt -o' were fixed.
9341
9342n. `bash +o' now displays the same output as `set +o' before starting an
9343 interactive shell.
9344
9345o. A bug that caused command substitution and the `eval' builtin to
9346 occasionally free memory twice when an error was encountered was fixed.
9347
9348p. The filename globbing code no longer requires read permission for a
9349 directory when the filename to be matched does not contain any globbing
9350 characters, as POSIX.2 specifies.
9351
9352q. A bug was fixed so that the job containing the last asynchronous
9353 process is not removed from the job table until a `wait' is executed
9354 for that process or another asynchronous process is started. This
9355 satisfies a POSIX.2 requirement.
9356
9357r. A `select' bug was fixed so that a non-numeric user response is treated
9358 the same as a numeric response that is out of range.
9359
9360s. The shell no longer parses the value of SHELLOPTS from the environment
9361 if it is restricted, running setuid, or running in `privileged mode'.
9362
9363t. Fixes were made to enable large file support on systems such as
9364 Solaris 2.6, where the size of a file may be larger than can be held
9365 in an `int'.
9366
9367u. The filename hashing code was fixed to not add `./' to the beginning of
9368 filenames which already begin with `./'.
9369
9370v. The configure script was changed so that the GNU termcap library is not
9371 compiled in if `prefer-curses' has been specified.
9372
9373w. HISTCONTROL and HISTIGNORE are no longer applied to the second and
9374 subsequent lines of a multi-line command.
9375
9376x. A fix was made to `disown' so that it does a better job of catching
9377 out-of-range jobs.
9378
9379y. Non-interactive shells no longer report the status of processes terminated
9380 due to SIGINT, even if the standard output is a terminal.
9381
9382z. A bug that caused the output of `jobs' to have extra carriage returns
9383 was fixed.
9384
9385aa. A bug that caused PIPESTATUS to not be set when builtins or shell
9386 functions were executed in the foreground was fixed.
9387
9388bb. Bash now attempts to detect when it is being run by sshd, and treats
9389 that case identically to being run by rshd.
9390
9391cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell
9392 options was changed was fixed.
9393
9394dd. The `kill' builtin now disallows empty or missing process id arguments
9395 instead of treating them as identical to `0', which means the current
9396 process.
9397
9398ee. `var=value declare -x var' now behaves identically to
9399 `var=value export var'. Similarly for `var=value declare -r var' and
9400 `var=value readonly var'.
9401
9402ff. A few memory leaks were fixed.
9403
9404gg. `alias' and `unalias' now print error messages when passed an argument
9405 that is not an alias for printing or deletion, even when the shell is
9406 not interactive, as POSIX.2 specifies.
9407
9408hh. `alias' and `alias -p' now return a status of 0 when no aliases are
9409 defined, as POSIX.2 specifes.
9410
9411ii. `cd -' now prints the pathname of the new working directory if the shell
9412 is interactive.
9413
9414jj. A fix was made so that the code that binds $PWD now copes with getcwd()
9415 returning NULL.
9416
9417kk. `unset' now checks whether or not a function name it's trying to unset
9418 is a valid shell identifier only when the shell is running in posix mode.
9419
9420ll. A change was made to the code that generates filenames for here documents
9421 to make them less prone to name collisions.
9422
9423mm. The parser was changed so that `time' is recognized as a reserved word
9424 only at the beginning of a pipeline.
9425
9426nn. The pathname canonicalization code was changed so that `//' is converted
9427 into `/', but all other pathnames beginning with `//' are left alone, as
9428 POSIX.2 specifies.
9429
9430oo. The `logout' builtin will no longer exit a non-interactive non-login
9431 shell.
9432
94332. Changes to Readline
9434
9435a. Fixed a problem in the readline test program rltest.c that caused a core
9436 dump.
9437
9438b. The code that handles parser directives in inputrc files now displays
9439 more error messages.
9440
9441c. The history expansion code was fixed so that the appearance of the
9442 history comment character at the beginning of a word inhibits history
9443 expansion for that word and the rest of the input line.
9444
94453. New Features in Bash
9446
9447a. A new version of malloc, based on the older GNU malloc, that has many
9448 changes, is more page-based, is more conservative with memory usage,
9449 and does not `orphan' large blocks when they are freed.
9450
9451b. A new version of gmalloc, based on the old GLIBC malloc, with many
9452 changes and range checking included by default.
9453
9454c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic
9455 Regular Expression matching, including character classes, collating
9456 symbols, equivalence classes, and support for case-insensitive pattern
9457 matching.
9458
9459d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
9460 implemented, controlled by a new `shopt' option, `extglob'.
9461
9462e. There is a new ksh-like `[[' compound command, which implements
9463 extended `test' functionality.
9464
9465f. There is a new `printf' builtin, implemented according to the POSIX.2
9466 specification.
9467
9468g. There is a new feature for command substitution: $(< filename) now expands
9469 to the contents of `filename', with any trailing newlines removed
9470 (equivalent to $(cat filename)).
9471
9472h. There are new tilde prefixes which expand to directories from the
9473 directory stack.
9474
9475i. There is a new `**' arithmetic operator to do exponentiation.
9476
9477j. There are new configuration options to control how bash is linked:
9478 `--enable-profiling', to allow bash to be profiled with gprof, and
9479 `--enable-static-link', to allow bash to be linked statically.
9480
9481k. There is a new configuration option, `--enable-cond-command', which
9482 controls whether or not the `[[' command is included. It is on by
9483 default.
9484
9485l. There is a new configuration option, `--enable-extended-glob', which
9486 controls whether or not the ksh extended globbing feature is included.
9487 It is enabled by default.
9488
9489m. There is a new configuration #define in config.h.top that, when enabled,
9490 will cause all login shells to source /etc/profile and one of the user-
9491 specific login shell startup files, whether or not the shell is
9492 interactive.
9493
9494n. There is a new invocation option, `--dump-po-strings', to dump
9495 a shell script's translatable strings ($"...") in GNU `po' format.
9496
9497o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
9498 pattern matching when globbing filenames and using the `case' construct.
9499
9500p. There is a new `shopt' option, `huponexit', which, when enabled, causes
9501 the shell to send SIGHUP to all jobs when an interactive login shell
9502 exits.
9503
9504q. `bind' has a new `-u' option, which takes a readline function name as an
9505 argument and unbinds all key sequences bound to that function in a
9506 specified keymap.
9507
9508r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
9509 and running jobs, respectively.
9510
9511s. The `shopt' `-p' option now causes output to be displayed in a reusable
9512 format.
9513
9514t. `test' has a new `-N' option, which returns true if the filename argument
9515 has been modified since it was last accessed.
9516
9517u. `umask' now has a `-p' option to print output in a reusable format.
9518
9519v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
9520 translation code. It expands to the character whose ascii code is NNN
9521 in hexadecimal.
9522
9523w. The prompt string expansion code has a new `\r' escape sequence.
9524
9525x. The shell may now be cross-compiled for the CYGWIN32 environment on
9526 a Unix machine.
9527
95284. New Features in Readline
9529
9530a. There is now an option for `iterative' yank-last-arg handline, so a user
9531 can keep entering `M-.', yanking the last argument of successive history
9532 lines.
9533
9534b. New variable, `print-completions-horizontally', which causes completion
9535 matches to be displayed across the screen (like `ls -x') rather than up
9536 and down the screen (like `ls').
9537
9538c. New variable, `completion-ignore-case', which causes filename completion
9539 and matching to be performed case-insensitively.
9540
9541d. There is a new bindable command, `magic-space', which causes history
9542 expansion to be performed on the current readline buffer and a space to
9543 be inserted into the result.
9544
9545e. There is a new bindable command, `menu-complete', which enables tcsh-like
9546 menu completion (successive executions of menu-complete insert a single
9547 completion match, cycling through the list of possible completions).
9548
9549f. There is a new bindable command, `paste-from-clipboard', for use on Win32
9550 systems, to insert the text from the Win32 clipboard into the editing
9551 buffer.
9552
9553g. The key sequence translation code now understands printf-style backslash
9554 escape sequences, including \NNN octal escapes. These escape sequences
9555 may be used in key sequence definitions or macro values.
9556
9557h. An `$include' inputrc file parser directive has been added.
9558
9559------------------------------------------------------------------------------
e8ce775d
JA
9560This document details the changes between this version, bash-2.01.1-release,
9561and the previous version, bash-2.01-release.
9562
95631. Changes to Bash
9564
9565a. The select command was fixed to check the validity of the user's
9566 input more strenuously.
9567
9568b. A bug was fixed that prevented `time' from timing commands correctly
9569 when supplied as an argument to `bash -c'.
9570
9571c. A fix was made to the mail checking code to keep from adding the same
9572 mail file to the list of files to check multiple times when parsing
9573 $MAILPATH.
9574
9575d. Fixed an off-by-one error in the tilde expansion library.
9576
9577e. When using the compound array assignment syntax, the old value of
9578 the array is cleared before assigning the new value.
9579
9580f. Fixed a bug that could cause a core dump when a trap handler was reset
9581 to the default in the trap command associated with that signal.
9582
9583g. Fixed a bug in the locale code that occurred when assigning a value
9584 to LC_ALL.
9585
9586h. A change was made to the parser so that words of the form xxx=(...)
9587 are not considered compound assignment statements unless there are
9588 characters before the `='.
9589
9590i. A fix was made to the command tracing code to correctly quote each
9591 word of output.
9592
9593j. Some changes were made to the bash-specific autoconf tests to make them
9594 more portable.
9595
9596k. Completion of words with globbing characters now correctly quotes the
9597 result.
9598
9599l. The directory /var/spool/mail is now preferred to /usr/spool/mail when
9600 configure is deciding on the default mail directory.
9601
9602m. The brace completion code was fixed to not quote the `{' and `}'.
9603
9604n. Some fixes were made to make $RANDOM more random in subshells.
9605
9606o. System-specific changes were made to configure for: SVR4.2
9607
9608p. Changes were made so that completion of words containing globbing chars
9609 substitutes the result only if a single filename was matched.
9610
9611q. The window size is now recomputed after a job is stopped with SIGTSTP if
9612 the user has set `checkwinsize' with `shopt'.
9613
9614r. When doing substring expansion, out-of-range substring specifiers now
9615 cause nothing to be substituted rather than an expansion error.
9616
9617s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' --
9618 only `EXIT' and `DEBUG' are accepted.
9619
9620t. The display of trapped signals now uses the signal number if signals
9621 for which bash does not know the name are trapped.
9622
9623u. A fix was made so that `bash -r' does not turn on restricted mode until
9624 after the startup files are executed.
9625
9626v. A bug was fixed that occasionally caused a core dump when a variable
9627 found in the temporary environment of export/declare/readonly had a
9628 null value.
9629
9630w. A bug that occasionally caused unallocated memory to be passed to free()
9631 when doing arithmetic substitution was fixed.
9632
9633x. A bug that caused a buffer overrun when expanding a prompt string
9634 containing `\w' and ${#PWD} exceeded PATH_MAX was fixed.
9635
9636y. A problem with the completion code that occasionally caused it to
9637 refer to a character before the beginning of the readline line buffer
9638 was fixed.
9639
9640z. A bug was fixed so that the `read' builtin restarts reads when
9641 interrupted by signals other than SIGINT.
9642
9643aa. Fixed a bug that caused a command to be freed twice when there was
9644 an evaluation error in the `eval' command.
9645
96462. Changes to Readline
9647
9648a. Added a missing `extern' to a declaration in readline.h that kept
9649 readline from compiling cleanly on some systems.
9650
9651b. The history file is now opened with mode 0600 when it is written for
9652 better security.
9653
9654c. Changes were made to the SIGWINCH handling code so that prompt redisplay
9655 is done better.
9656
9657d. ^G now interrupts incremental searches correctly.
9658
9659e. A bug that caused a core dump when the set of characters to be quoted
9660 when completing words was empty was fixed.
9661
9662------------------------------------------------------------------------------
d166f048
JA
9663This document details the changes between this version, bash-2.01-release,
9664and the previous version, bash-2.01-beta2.
9665
96661. Changes to Bash
9667
9668a. The `distclean' target should remove the `printenv' executable if it
9669 has been created.
9670
9671b. The test suite was changed slightly to ensure that the error messages
9672 are printed in English.
9673
9674c. A bug that caused the shell to dump core when a filename containing a
9675 `/' was passed to `hash' was fixed.
9676
9677d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1
9678 requires.
9679
9680e. A memory leak when completing commands was fixed.
9681
9682f. A memory leak that occurred when checking the hash table for commands
9683 with relative paths was fixed.
9684
9685------------------------------------------------------------------------------
9686This document details the changes between this version, bash-2.01-beta2,
9687and the previous version, bash-2.01-beta1.
9688
96891. Changes to Bash
9690
9691a. The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if
9692 the current (soft) limit is less than or equal to the hard limit.
9693
9694b. Fixed a bug that caused the bash emulation of strcasecmp to produce
9695 incorrect results.
9696
9697c. A bug that caused memory to be freed twice when a trap handler resets
9698 the trap more than once was fixed.
9699
9700d. A bug that caused machines where sizeof (pointer) > sizeof (int) to
9701 fail (and possibly dump core) when trying to unwind-protect a null
9702 pointer was fixed.
9703
9704e. The startup files should not be run with job control enabled. This fix
9705 allows SIGINT to once again interrupt startup file execution.
9706
9707f. Bash should not change the SIGPROF handler if it is set to something
9708 other than SIG_DFL.
9709
9710g. The completion code that provides bash-specific completions for readline
9711 now quotes characters that the readline code would treat as word break
9712 characters if they appear in a file name.
9713
9714h. The completion code now correctly quotes filenames containing a `!',
9715 even if the user attempted to use double quotes when attempting
9716 completion.
9717
9718i. A bug that caused the shell to dump core when `disown' was called without
9719 arguments and there was no current job was fixed.
9720
9721j. A construct like $((foo);bar) is now processed as a command substitution
9722 rather than as a bad arithmetic substitution.
9723
9724k. A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist'
9725 shell options when editing and re-executing a series of commands were
9726 fixed.
9727
9728l. A fix was made to the grammar -- the list of commands between `do' and
9729 `done' in the body of a `for' command should be treated the same as a
9730 while loop.
9731
97322. Changes to Readline
9733
9734a. A couple of bugs that caused the history search functions to attempt to
9735 free a NULL pointer were fixed.
9736
9737b. If the C library provides setlocale(3), readline does not need to look
9738 at various environment variables to decide whether or not to go into
9739 eight-bit mode automatically -- just check whether the current locale
9740 is not `C' or `POSIX'.
9741
9742c. If the filename completion function finds that a directory was not closed
9743 by a previous (interrupted) completion, it closes the directory with
9744 closedir().
9745
97463. New Features in Bash
9747
9748a. New bindable readline commands: history-and-alias-expand-line and
9749 alias-expand-line. The code was always in there, there was just no
9750 way to execute it.
9751
9752------------------------------------------------------------------------------
9753This document details the changes between this version, bash-2.01-beta1,
9754and the previous version, bash-2.01-alpha1.
9755
97561. Changes to Bash
9757
9758a. Fixed a problem that could cause file descriptors used for process
9759 substitution to conflict with those used explicitly in redirections.
9760
9761b. Made it easier to regenerate configure if the user changes configure.in.
9762
9763c. ${GROUPS[0]} should always be the primary group, even on systems without
9764 multiple groups.
9765
9766d. Spelling correction is no longer enabled by default.
9767
9768e. Fixes to quoting problems in `bashbug'.
9769
9770f. OS-specific configuration changes were made for: Irix 6.
9771
9772g. OS-specific code changes were made for: QNX.
9773
9774h. A more meaningful message is now printed when the file in /tmp for a
9775 here document cannot be created.
9776
9777i. Many changes to the shell's variable initialization code to speed
9778 non-interactive startup.
9779
9780j. Changes to the non-job-control code so that it does not try to open
9781 /dev/tty.
9782
9783k. The output of `set' and `export' is once again sorted, as POSIX wants.
9784
9785l. Fixed a problem caused by a recursive call reparsing the value of
9786 $SHELLOPTS.
9787
9788m. The tilde code no longer calls getenv() when it's compiled as part of
9789 the shell, which should eliminate problems on systems that cannot
9790 redefine getenv(), like the NeXT OS.
9791
9792n. Fixed a problem that caused `bash -o' or `bash +o' to not list all
9793 the shell options.
9794
9795o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit
9796 only if the hard limit is greater than the current (soft) limit.
9797
9798p. Fixed a problem that arose when building bash in a different directory
9799 than the source and y.tab.[ch] were remade with something other than
9800 bison. This came up most often on NetBSD.
9801
9802q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated
9803 an unfinished command completion (`/), which generated errors.
9804
9805r. The bash special tilde expansions (~-, ~+) are now attempted before
9806 calling the standard tilde expansion code, which should eliminate the
9807 problems people have been seeing with this on Solaris 2.5.1.
9808
9809s. Added support for <stdarg.h> to places where it was missing.
9810
9811t. Changed the code that reads the output of a command substitution to not
9812 go through stdio. This reduces the memory requirements and is faster.
9813
9814u. A number of changes to speed up export environment creation were made.
9815
9816v. A number of memory leaks were fixed as the result of running the test
9817 scripts through Purify.
9818
9819w. Fixed a bug that caused subshells forked to interpret executable
9820 scripts without a leading `#!' to not reinitialize the values of
9821 the shell options.
9822
98232. Changes to Readline
9824
9825a. History library has less `#ifdef SHELL' code -- abstracted stuff out
9826 into application-specific function hooks.
9827
9828b. Readline no longer calls getenv() if it's compiled as part of the shell,
9829 which should eliminate problems on systems that cannot redefine getenv(),
9830 like the NeXT OS.
9831
9832c. Fixed translation of ESC when `untranslating' macro values.
9833
9834d. The region kill operation now fixes the mark if it ends up beyond the
9835 boundaries of the line after the region is deleted.
9836
98373. New Features in Bash
9838
9839a. New argument for `configure': `--with-curses'. This can be used to
9840 override the selection of the termcap library on systems where it is
9841 deficient.
9842
9843------------------------------------------------------------------------------
9844This document details the changes between this version, bash-2.01-alpha1,
9845and the previous version, bash-2.0-release.
9846
98471. Changes to Bash
9848
9849a. System-specific configuration changes for: FreeBSD, SunOS4, Irix,
9850 MachTen, QNX 4.2, Harris Night Hawk, SunOS5.
9851
9852b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2,
9853 HP-UX, AIX 4.2.
9854
9855c. A bug that caused the exec builtin to fail because the full pathname of
9856 the command could not be found was fixed.
9857
9858d. The code that performs output redirections is now more resistant to
9859 race conditions and possible security exploits.
9860
9861e. A bug that caused the shell to dump core when performing pattern
9862 substitutions on variable values was fixed.
9863
9864f. More hosts are now recognized by the auto-configuration mechanism
9865 (OpenBSD, QNX, others).
9866
9867g. Assignments to read-only variables that attempt to convert them to
9868 arrays are now errors.
9869
9870h. A bug that caused shell scripts using array assignments in POSIX mode
9871 to exit after the assignment was performed was fixed.
9872
9873i. The substring expansion code is now more careful about running off the
9874 ends of the expanded variable value.
9875
9876j. A bug that caused completion to fail if a backquoted command substitution
9877 appeared anywhere on the line was fixed.
9878
9879k. The `source' builtin no longer turns off history if it has been enabled
9880 in a non-interactive shell.
9881
9882l. A bug that caused the shell to crash when `disown' was given a pid
9883 instead of a job number was fixed.
9884
9885m. The `cd' spelling correction code will not try to change to `.' if no
9886 directory entries match a single-character argument.
9887
9888n. A bad variable name supplied to `declare', `export', or `readonly' no
9889 longer causes a non-interactive shell in POSIX mode to exit.
9890
9891o. Some fixes were made to the test suite to handle peculiarities of
9892 various Unix versions.
9893
9894p. The bash completion code now quotes characters that readline would
9895 treat as word breaks for completion but are not shell metacharacters.
9896
9897q. Bad options supplied at invocation now cause a usage message to be
9898 displayed.
9899
9900r. Fixes were made to the code that handles DEBUG traps so that the trap
9901 string is not freed inappropriately.
9902
9903s. Some changes were made to the bash debugger in examples/bashdb -- it
9904 should be closer to working now.
9905
9906t. A problem that caused the default filename used for mail checking to be
9907 wrong was fixed.
9908
9909u. A fix was made to the `echo' builtin so that NUL characters printed with
9910 `echo -e' do not cause the output to be truncated.
9911
9912v. A fix was made to the job control code so that the shell behaves better
9913 when monitor mode is enabled in a non-interactive shell.
9914
9915w. Bash no longer catches all of the terminating signals in a non-
9916 interactive shell until a trap is set on EXIT, which should result in
9917 quicker startup.
9918
9919x. A fix was made to the command timing code so that `time' can be used in
9920 a loop.
9921
9922y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as
b72432fd 9923 a nested subshell rather than strictly as an (erroneous) arithmetic
d166f048
JA
9924 command.
9925
9926z. A fix was made to the globbing code so that it correctly matches quoted
9927 filenames beginning with a `.'.
9928
9929aa. A bug in `fc' that caused some multi-line commands to not be stored as
9930 one command in the history when they were re-executed after editing
9931 (with `fc -e') was fixed.
9932
9933bb. The `ulimit' builtin now attempts to catch some classes of integer
9934 overflows.
9935
9936cc. The command-oriented-history code no longer attempts to add `;'
9937 inappropriately when a newline appears while reading a $(...) command
9938 substitution.
9939
9940dd. A bug that caused the shell to dump core when `help --' was executed
9941 was fixed.
9942
9943ee. A bug that caused the shell to crash when an unset variable appeared
9944 in the body of a here document after `set -u' had been executed was
9945 fixed.
9946
9947ff. Implicit input redirections from /dev/null for asynchronous commands
9948 are now handled better.
9949
9950gg. A bug that caused the shell to fail to compile when configured with
9951 `--disable-readline' was fixed.
9952
9953hh. The globbing code should now be interruptible.
9954
9955ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a
9956 stopped job and adjusts the data structures accordingly, as if `bg' had
9957 been executed instead.
9958
9959jj. A bug that caused the shell to crash when mixing calls to `getopts'
9960 and `shift' on the same set of positional parameters was fixed.
9961
9962kk. The command printing code now preserves the `-p' flag to `time'.
9963
9964ll. The command printing code now handles here documents better when there
9965 are other redirections associated with the command.
9966
9967mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_)
9968 is no longer placed into the environment of executed commands -- users
9969 of glibc had too many problems with it.
9970
9971nn. Reorganized the code that generates signames.h. The signal_names list
9972 is now more complete but may be slightly different (SIGABRT is favored
9973 over SIGIOT, for example). The preferred signal names are those
9974 listed in the POSIX.2 standard.
9975
9976oo. `bashbug' now uses a filename shorter than 14 characters for its
9977 temporary file, and asks for confirmation before sending the bug
9978 report.
9979
9980pp. A bug that caused TAB completion in vi editing mode to not be turned
9981 off when `set -o posix' was executed or back on when `set +o posix'
9982 was executed was fixed.
9983
9984qq. A bug in the brace expansion code that caused brace expansions appearing
9985 in new-style $(...) command substitutions to be inappropriately expanded
9986 was fixed.
9987
9988rr. A bug in the readline hook shell-expand-line that could cause memory to
9989 be inappropriately freed was fixed.
9990
9991ss. A bug that caused some arithmetic expressions containing `&&' and `||'
9992 to be parsed with the wrong precedence has been fixed.
9993
9994tt. References to unbound variables after `set -u' has been executed now
9995 cause the shell to exit immediately, as they should.
9996
9997uu. A bug that caused the shell to exit inappropriately when `set -e' had
9998 been executed and a command's return status was being inverted with the
9999 `!' reserved word was fixed.
10000
10001vv. A bug that could occasionally cause the shell to crash with a
10002 divide-by-zero error when timing a command was fixed.
10003
10004ww. A bug that caused parameter pattern substitution to leave stray
10005 backslashes in the replacement string when the expression is in
10006 double quotes was fixed.
10007
10008xx. The `break' and `continue' builtins now break out of all loops when an
10009 invalid count argument is supplied.
10010
10011yy. Fixed a bug that caused PATH to be set to the empty string if
10012 `command -p' is executed with PATH unset.
10013
10014zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix,
10015 as POSIX specifies.
10016
10017aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS
10018 if there were no shell options set.
10019
10020bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX
10021 mode, their output is as POSIX.2 specifies.
10022
10023ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually
10024 creates an array variable.
10025
10026ddd. Fixed a bug that prevented `time' from correctly timing background
10027 pipelines.
10028
100292. Changes to Readline
10030
10031a. A bug that caused an extra newline to be printed when the cursor was on
10032 an otherwise empty line was fixed.
10033
10034b. An instance of memory being used after it was freed was corrected.
10035
10036c. The redisplay code now works when the prompt is longer than the screen
10037 width.
10038
10039d. `dump-macros' is now a bindable name, as it should have been all along.
10040
10041e. Non-printable characters are now expanded when displaying macros and
10042 their values.
10043
10044f. The `dump-variables' and `dump-macros' commands now output a leading
10045 newline if they're called as the result of a key sequence, rather
10046 than directly by an application.
10047
100483. New Features in Bash
10049
10050a. There is a new builtin array variable: GROUPS, the set of groups to which
10051 the user belongs. This is used by the test suite.
10052
100534. New Features in Readline
10054
10055a. If a key sequence bound to `universal-argument' is read while reading a
10056 numeric argument started with `universal-argument', it terminates the
10057 argument but is otherwise ignored. This provides a way to insert multiple
10058 instances of a digit string, and is how GNU emacs does it.
10059
10060------------------------------------------------------------------------------
ccc6cda3
JA
10061This document details the changes between this version, bash-2.0-release,
10062and the previous version, bash-2.0-beta3.
10063
100641. Changes to Bash
10065
10066a. Fix to the `getopts' builtin so that it does the right thing when a
10067 required option argument is not present.
10068
10069b. The completion code now updates the common prefix of matched names
10070 after FIGNORE processing is done, since any names that were removed
10071 may have changed the common prefix.
10072
10073c. Fixed a bug that made messages in MAILPATH entries not work correctly.
10074
10075d. Fixed a serious documentation error in the description of the new
10076 ${parameter:offset[:length]} expansion.
10077
10078e. Fixes to make parameter substring expansion ({$param:offset[:length]})
10079 work when within double quotes.
10080
10081f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional
10082 parameters.
10083
10084g. Corrected a misspelling of `unlimited' in the output of `ulimit'.
10085
10086h. Fixed a bug that caused executable scripts without a leading `#!' to
10087 occasionally pick up the wrong set of positional parameters.
10088
10089i. Linux systems now have a working `ulimit -v', using RLIMIT_AS.
10090
10091j. Updated config.guess so that many more machine types are recognized.
10092
10093k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]}
10094 expansion.
10095
10096l. If the shell is named `-su', and `-c command' is supplied, read and
10097 execute the login shell startup files even though the shell is not
10098 interactive. This is to support the `-' option to `su'.
10099
10100m. Fixed a bug that caused core dumps when the DEBUG trap was ignored
10101 with `trap "" DEBUG' and a shell function was subsequently executed.
10102
10103n. Fixed a bug that caused core dumps in the read builtin when IFS was
10104 set to the null string and the input had leading whitespace.
10105
101062. Changes to Readline
10107
10108a. Fixed a bug that caused a numeric argument of 1024 to be ignored when
10109 inserting text.
10110
10111b. Fixed the display code so that the numeric argument is displayed as it's
10112 being entered.
10113
10114c. Fixed the numeric argument reading code so that `M-- command' is
10115 equivalent to `M--1 command', as the prompt implies.
10116
101173. New Features in Bash
10118
10119a. `ulimit' now sets both hard and soft limits and reports the soft limit
10120 by default (when neither -H nor -S is specified). This is compatible
10121 with versions of sh and ksh that implement `ulimit'.
10122
10123b. Integer constants have been extended to base 64.
10124
101254. New Features in Readline
10126
10127a. The `home' and `end' keys are now bound to beginning-of-line and
10128 end-of-line, respectively, if the corresponding termcap capabilities
10129 are present.
10130
10131------------------------------------------------------------------------------
10132This document details the changes between this version, bash-2.0-beta3,
10133and the previous version, bash-2.0-beta2.
10134
101351. Changes to Bash
10136
10137a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX.
10138
10139b. When in POSIX mode, variable assignments preceding a special builtin
10140 persist in the shell environment after the builtin completes.
10141
10142c. Changed all calls to getwd() to getcwd(). Improved check for systems
10143 where the libc getcwd() calls popen(), since that breaks on some
10144 systems when job control is being used.
10145
10146d. Fixed a bug that caused seg faults when executing scripts with the
10147 execute bit set but without a leading `#!'.
10148
10149e. The environment passed to executed commands is never sorted.
10150
10151f. A bug was fixed in the code that expands ${name[@]} to the number of
10152 elements in an array variable.
10153
10154g. A bug was fixed in the array compound assignment code ( A=( ... ) ).
10155
10156h. Window size changes now correctly propagate down to readline if
10157 the shopt `checkwinsize' option is enabled.
10158
10159i. A fix was made in the code that expands to the length of a variable
10160 value (${#var}).
10161
10162j. A fix was made to the command builtin so that it did not turn on the
10163 `no fork' flag inappropriately.
10164
10165k. A fix was made to make `set -n' work more reliably.
10166
10167l. A fix was made to the job control initialization code so that the
10168 terminal process group is set to the shell's process group if the
10169 shell changes its own process group.
10170
101712. Changes to Readline
10172
10173a. System-specific changes for: SCO 3.2v[45].
10174
10175b. The behavior of the vi-mode `.' when redoing an `i' command was changed
10176 to insert the text previously inserted by the `i' command rather than
10177 simply entering insert mode.
10178
101793. New features in Bash
10180
10181a. There is a new version of the autoload function package, in
10182 examples/functions/autoload.v2, that uses arrays and provides more
10183 functionality.
10184
10185b. Support for LC_COLLATE and locale-specific sorting of the results of
10186 pathname expansion if strcoll() is available.
10187
101884. New Features in Readline
10189
10190a. Support for locale-specific sorting of completion possibilities if
10191 strcoll() is available.
10192
10193------------------------------------------------------------------------------
10194This document details the changes between this version, bash-2.0-beta2,
10195and the previous version, bash-2.0-beta1.
10196
101971. Changes to Bash
10198
10199a. `pushd -' is once again equivalent to `pushd $OLDPWD'.
10200
10201b. OS-specific changes for: SCO 3.2v[45].
10202
10203c. A change was made to the fix for the recently-reported security hole
10204 when reading characters with octal value 255 to make it work better on
10205 systems with restartable system calls when not using readline.
10206
10207d. Some changes were made to the test suite so that it works if you
10208 configure bash with --enable-usg-echo-default.
10209
10210e. A fix was made to the parsing of conditional arithmetic expressions.
10211
10212f. Illegal arithmetic bases now cause an arithmetic evaluation error rather
10213 than being silently reset.
10214
10215g. Multiple arithmetic bases now cause an arithmetic evaluation error
10216 instead of being ignored.
10217
10218h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2.
10219
10220i. A bug that sometimes caused array indices to be evaluated twice (which
10221 would cause errors when they contained assignment statements) was fixed.
10222
10223j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning
10224 unsigned values and to simplify the code.
10225
10226k. A bug in the command-oriented-history code that caused it to sometimes
10227 put semicolons after right parens inappropriately was fixed.
10228
10229l. The values inserted into the prompt by the \w and \W escape sequences
10230 are now quoted to prevent further expansion.
10231
10232m. An interactive shell invoked as `sh' now reads and executes commands
10233 from the file named by $ENV when it starts up. If it's a login shell,
10234 it does this after reading /etc/profile and ~/.profile.
10235
10236n. The file named by $ENV is never read by non-interactive shells.
10237
102382. Changes to Readline
10239
10240a. A few changes were made to hide some macros and functions that should not
10241 be public.
10242
10243b. An off-by-one error that caused seg faults in the history expansion code
10244 was fixed.
10245
102463. New Features in Bash
10247
10248a. The ksh-style ((...)) arithmetic command was implemented. It is exactly
10249 identical to let "...". This is controlled by a new option to configure,
10250 `--enable-dparen-arithmetic', which is on by default.
10251
10252b. There is a new #define available in config.h.top: SYS_BASH_LOGOUT. If
10253 defined to a filename, bash reads and executes commands from that file
10254 when a login shell exits. It's commented out by default.
10255
10256c. `ulimit' has a `-l' option that reports the maximum amount of data that
10257 may be locked into memory on 4.4BSD-based systems.
10258
10259------------------------------------------------------------------------------
10260This document details the changes between this version, bash-2.0-beta1,
10261and the previous version, bash-2.0-alpha4.
10262
102631. Changes to Bash
10264
10265a. A bug that sometimes caused traps to be ignored on signals the
10266 shell treats specially was fixed.
10267
10268b. The internationalization code was changed to track the values of
10269 LC_* variables and call setlocale() as appropriate. The TEXTDOMAIN
10270 and TEXTDOMAINDIR variables are also tracked; changes cause calls
10271 to textdomain() and bindtextdomain(), if available.
10272
10273c. A bug was fixed that sometimes caused double-quoted strings to be
10274 parsed incorrectly.
10275
10276d. Changes were made so that the siglist code compiles correctly on
10277 Solaris 2.5.
10278
10279e. Added `:' to the set of characters that cause word breaks for the
10280 completion code so that pathnames in assignments to $PATH can be
10281 completed.
10282
10283f. The `select' command was fixed to print $PS3 to stderr.
10284
10285g. Fixed an error in the manual page section describing the effect that
10286 setting and unsetting GLOBIGNORE has on the setting of the `dotglob'
10287 option.
10288
10289h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC
10290 on systems without gettimeofday() and resources.
10291
10292i. The getopt static variables are now initialized each time a subshell
10293 is started, so subshells using `getopts' work right.
10294
10295j. A sign-extension bug that caused a possible security hole was fixed.
10296
10297k. The parser now reads characters between backquotes within a double-
10298 quoted string as a single word, so double quotes in the backquoted
10299 string don't terminate the enclosing double-quoted string.
10300
10301l. A bug that caused `^O' to work incorrectly when typed as the first
10302 thing to an interactive shell was fixed.
10303
10304m. A rarely-exercised off-by-one error in the code that quotes variable
10305 values was fixed.
10306
10307n. Some memory and file descriptor leaks encountered when running a
10308 shell script that is executable but does not have a leading `#!'
10309 were plugged.
10310
103112. Changes to Readline
10312
10313a. A bug that sometimes caused incorrect results when trying to read
10314 typeahead on systems without FIONREAD was fixed.
10315
103163. New Features in Bash
10317
10318a. The command timing code now uses the value of the TIMEFORMAT variable
10319 to format and display timing statistics.
10320
10321b. The `time' reserved word now accepts a `-p' option to force the
10322 POSIX.2 output format.
10323
10324c. There are a couple of new and updated scripts to convert csh startup
10325 files to bash format.
10326
10327d. There is a new builtin array variable: BASH_VERSINFO. The various
10328 members hold the parts of the version information in BASH_VERSION,
10329 plus the value of MACHTYPE.
10330
103314. New Features in Readline
10332
10333a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter
10334 eight-bit mode.
10335
10336------------------------------------------------------------------------------
10337This document details the changes between this version, bash-2.0-alpha4,
10338and the previous version, bash-2.0-alpha3.
10339
103401. Changes to Bash
10341
10342a. There is better detection of rsh connections on Solaris 2.
10343
10344b. Assignments to read-only variables preceding a command name are now
10345 variable assignment errors. Variable assignment errors cause
10346 non-interactive shells running in posix mode to exit.
10347
10348c. The word tokenizer was rewritten to handle nested quotes and pairs
10349 ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...))
10350 correctly. Some of the parameter expansion code was updated as a
10351 consequence.
10352
10353d. A fix was made to `test' when given three arguments so that a binary
10354 operator is checked for first, before checking that the first argument
10355 is `!'.
10356
10357e. 2''>/dev/null is no longer equivalent to 2>/dev/null.
10358
10359f. Parser error messages were regularized, and in most cases the name of
10360 the shell script being read by a non-interactive shell is not printed
10361 twice.
10362
10363g. A fix was made to the completion code so that it no longer removes the
10364 text the user typed in some cases.
10365
10366h. The special glibc `getopt' environment variable is no longer put into
10367 the environment on machines with small values of ARG_MAX.
10368
10369i. The expansion of ${...} now follows the POSIX.2 rules for finding the
10370 closing `}'.
10371
10372j. The shell no longer displays spurious status messages for background
10373 jobs in shell scripts that complete successfully when the script is
10374 run from a terminal.
10375
10376k. `shopt -o' now correctly updates $SHELLOPTS.
10377
10378l. A bug that caused the $PATH searching code to return a non-executable
10379 file even when an executable file with the same name appeared later in
10380 $PATH was fixed.
10381
10382m. The shell now does tilde expansions on unquoted `:~' in assignment
10383 statements when not in posix mode.
10384
10385n. Variable assignment errors when a command consists only of assignments
10386 now cause non-interactive shells to exit when in posix mode.
10387
10388o. If the variable in a `for' or `select' command is read-only, or not a
10389 legal shell identifier, a variable assignment error occurs.
10390
10391p. `test' now handles `-a' and `-o' as binary operators when three arguments
10392 are supplied, and correctly parses `( word )' as equivalent to `word'.
10393
10394q. `test' was fixed so that file names of the form /dev/fd/NN mean the same
10395 thing on all systems, even Linux.
10396
10397r. Fixed a bug in the globbing code that caused patterns with multiple
10398 consecutive `*'s to not be matched correctly.
10399
10400s. Fixed a bug that caused $PS2 to not be printed when an interactive shell
10401 not using readline is reading a here document.
10402
10403t. Fixed a bug that caused history expansion to be performed inappropriately
10404 when a single-quoted string spanned more than one line.
10405
10406u. `getopts' now checks that the variable name passed by the user as the
10407 second argument is a legal shell identifier and that the variable is
10408 not read-only.
10409
10410v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it
10411 encounters an error.
10412
10413w. Fixed `set' to display variable values in a form that can be re-read.
10414
10415x. Fixed a bug in the code that keeps track of whether or not local variables
10416 have been declared at the current level of function nesting.
10417
10418y. Non-interactive shells in posix mode now exit if the name in a function
10419 declaration is not a legal identifier.
10420
10421z. The job control code now ignores stopped children when the shell is not
10422 interactive.
10423
10424aa. The `cd' builtin no longer attempts spelling correction on the directory
10425 name if the shell is not interactive, regardless of the setting of the
10426 `cdspell' option.
10427
10428bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2.
10429
10430cc. `time' now prints its output to stderr, as POSIX.2 specifies.
10431
104322. Fixes to Readline
10433
10434a. After printing possible completions, all lines of a multi-line prompt
10435 are redisplayed.
10436
10437b. Some changes were made to the terminal handling code in rltty.c to
10438 work around AIX 4.2 bugs.
10439
104403. New Features in Bash
10441
10442a. There is a new loadable builtin: sprintf, with calling syntax
10443 sprintf var format [args]
10444 This provides an easy way to simulate ksh left- and right-justified
10445 variable values.
10446
10447b. The expansions of \h and \H in prompt strings were swapped. \h now
10448 expands to the hostname up to the first `.', as in bash-1.14.
10449
104504. New Features in Readline
10451
10452a. The bash-1.14 behavior when ^M is typed while doing an incremental
10453 search was restored. ^J may now be used to terminate the search without
10454 accepting the line.
10455
10456b. There is a new bindable variable: disable-completion. This inhibits
10457 word completion and causes the completion character to be inserted as
10458 if it had been bound to self-insert.
10459
10460------------------------------------------------------------------------------
10461This document details the changes between this version, bash-2.0-alpha3,
10462and the previous version, bash-2.0-alpha2.
10463
10464There is now a file `COMPAT' included in the distribution that lists the
10465user-visible incompatibilities between 1.14 and 2.0.
10466
104671. Changes to Bash
10468
10469a. Some work was done so that word splitting of the rhs of assignment
10470 statements conforms more closely to historical practice.
10471
10472b. A couple of errant memory frees were fixed.
10473
10474c. A fix was made to the test builtin so it recognizes `<' and `>' as
10475 binary operators.
10476
10477d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's
10478 allocated and freed. This is to catch callers that refer to freed
10479 memory or assume something about newly-allocated memory.
10480
10481e. Fixed a problem with conversion to 12-hour time in the prompt
10482 expansion code.
10483
10484f. Fixed a problem with configure's argument parsing order. Now you can
10485 correctly turn on specific options after using --enable-minimal-config.
10486
10487g. The configure script now automatically disables the use of GNU malloc
10488 on systems where it's appropriate (better than having people read the
10489 NOTES file and do it manually).
10490
10491h. There are new prompt expansions (\v and \V) to insert version information
10492 into the prompt strings.
10493
10494i. The default prompt string now includes the version number.
10495
10496j. Most of the builtins that take no options were changed to use the
10497 internal getopt so they can produce proper error messages for -?
10498 and incorrect options.
10499
10500k. Some system-specific changes were made for SVR4.2 and Solaris 2.5.
10501
10502l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of
10503 MAXNAMLEN.
10504
10505m. A couple of problems caused by uninitialized variables were fixed.
10506
10507n. There are a number of new loadable builtin examples: logname, basename,
10508 dirname, tty, pathchk, tee, head, and rmdir. All of these conform to
10509 POSIX.2.
10510
10511o. Bash now notices changes in TZ and calls tzset() if present, so
10512 changing TZ will alter the time printed by prompt expansions.
10513
10514p. The source was reorganized a bit so I don't have to wait so long for
10515 some files to compile, and to facilitate the creation of a `shell
10516 library' at some future point.
10517
10518q. Bash no longer turns off job control if called as `sh', since the
10519 POSIX.2 spec includes job control as a standard feature.
10520
10521r. `bash -o posix' now works as intended.
10522
10523s. Fixed a problem with the completion code: when completing a filename
10524 that contained globbing characters, if show-all-if-ambiguous was set,
10525 the completion code would remove the user's text.
10526
10527t. Fixed ulimit so that (hopefully) the full range of limits is available
10528 on HPUX systems.
10529
10530u. A new `shopt' option (`hostcomplete') enables and disables hostname
10531 completion.
10532
10533v. The shell no longer attempts to save the history on an abort(),
10534 which is usually called by programming_error().
10535
10536w. The `-s' option to `fc' was changed to echo the command to be executed
10537 to stderr instead of stdout.
10538
10539x. If the editor invoked by `fc -e' exits with a non-zero status, no
10540 commands are executed.
10541
10542y. Fixed a bug that made the shopt `histverify' option work incorrectly.
10543
10544z. There is a new variable `MACHTYPE' whose value is the GNU-style
10545 `cpu-company-system' system description as set by configure. (The
10546 values of MACHTYPE and HOSTTYPE should really be swapped.)
10547
10548aa. The `ulimit' builtin now allows the maximum virtual memory size to be
10549 set via setrlimit(2) if RLIMIT_VMEM is defined.
10550
10551bb. `bash -nc 'command'' no longer runs `command'.
10552
105532. Changes to Readline
10554
10555a. Fixed a typo in the code that checked for FIONREAD in input.c.
10556
10557b. Fixed a bug in the code that outputs keybindings, so things like C-\
10558 are quoted properly.
10559
10560c. Fixed a bug in the inputrc file parsing code to handle the problems
10561 caused by inputrc files created from the output of `bind -p' in
10562 previous versions of bash. The problem was due to the bug fixed
10563 in item b above.
10564
10565d. Readline no longer turns off the terminal's meta key, and turns it on
10566 once the first time it's called.
10567
10568------------------------------------------------------------------------------
10569This file documents the changes between this version, bash-2.0-alpha2,
10570and the previous version, bash-2.0-alpha.
10571
105721. Changes to Bash
10573
10574a. The shell no longer thinks directories are executable.
10575
10576b. `disown' has a new option, `h', which inhibits the resending of SIGHUP
10577 but does not remove the job from the jobs table.
10578
10579c. The varargs functions in error.c now use ANSI-C `stdarg' if available.
10580
10581d. The build process now treats the `build version' in .build as local to
10582 the build directory, so different versions built from the same source
10583 tree have different `build versions'.
10584
10585e. Some problems with the grammar have been fixed. (It used `list' in a few
10586 productions where `compound_list' was needed. A `list' must be terminated
10587 with a newline or semicolon; a `compound_list' need not be.)
10588
10589f. A fix was made to keep `wait' from hanging when waiting for all background
10590 jobs.
10591
10592g. `bash --help' now writes its output to stdout, like the GNU Coding Standards
10593 specify, and includes the machine type (the value of MACHTYPE).
10594
10595h. `bash --version' now prints more information and exits successfully, like
10596 the GNU Coding Standards specify.
10597
10598i. The output of `time' and `times' now prints fractional seconds with three
10599 places after the decimal point.
10600
10601j. A bug that caused process substitutions to screw up the pipeline printed
10602 by `jobs' was fixed.
10603
10604k. Fixes were made to the code that implements $'...' and $"..." so they
10605 work as documented.
10606
10607l. The process substitution code now opens named pipes for reading with
10608 O_NONBLOCK to avoid hanging.
10609
10610m. Fixes were made to the trap code so the shell cleans up correctly if the
10611 trap command contains a `return' and we're executing a function or
10612 sourcing a script with `.'.
10613
10614n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the
10615 documentation (ps, dvi, etc.) on a `make install'.
10616
10617o. Fixed an auto-increment error that caused bash -c args to sometimes dump
10618 core.
10619
10620p. Fixed a bug that caused $HISTIGNORE to fail when the history line
10621 contained globbing characters.
10622
106232. Changes to Readline
10624
10625a. There is a new string variable, rl_library_version, available for use by
10626 applications. The current value is "2.1".
10627
10628b. A bug encountered when expand-tilde was enabled and file completion was
10629 attempted on a word beginning with `~/' was fixed.
10630
10631c. A slight change was made to the incremental search termination behavior.
10632 ESC still terminates the search, but if input is pending or arrives
10633 within 0.1 seconds (on systems with select(2)), it is used as a prefix
8868edaf 10634 character. This is intended to allow users to terminate searches with
ccc6cda3 10635 the arrow keys and get the behavior they expect.