]> git.ipfire.org Git - thirdparty/bash.git/blame - CHANGES
Bash-5.1 patch 11: save and restore alias parsing when performing compound array...
[thirdparty/bash.git] / CHANGES
CommitLineData
8868edaf
CR
1This document details the changes between this version, bash-5.1-rc3, and
2the previous version, bash-5.1-rc2.
3
41. Changes to Bash
5
6a. The `assoc_expand_once' option now affects the evaluation of the -v primary
7 to test and the [[ compound command.
8
92. Changes to Readline
10
11a. Fixed a bug that could cause point to be set beyond the end of the line
12 buffer when aborting an incremental search.
13
143. New Features in Bash
15
164. New Features in Readline
17
18------------------------------------------------------------------------------
19This document details the changes between this version, bash-5.1-rc2, and
20the previous version, bash-5.1-rc1.
21
221. Changes to Bash
23
24a. Process substitutions started from an interactive shell no longer have their
25 standard input implicitly redirected from /dev/null.
26
27b. Fixed an issue with setting the SIGINT trap handler in an interactive shell
28 when temporarily running $PROMPT_COMMAND non-interactively.
29
302. Changes to Readline
31
32a. Terminals that are named "dumb" or unknown do not enable bracketed paste
33 by default.
34
35b. Ensure that disabling bracketed paste turns off highlighting the incremental
36 search string when the search is successful.
37
383. New Features in Bash
39
404. New Features in Readline
41
42------------------------------------------------------------------------------
43This document details the changes between this version, bash-5.1-rc1, and
44the previous version, bash-5.1-beta.
45
461. Changes to Bash
47
48a. Fixed an inconsistency in the way HISTCMD is calculated when it's expanded
49 during a multi-line command.
50
51b. Modified the change to here-document expansion containing backslash-quoted
52 double quotes.
53
54c. Fixed a case where the shells's exit status could be greater than 255.
55
56d. Modified changed to process substitution so the executed command has its
57 stdin redirected from /dev/null if it was previously interactive and
58 reading commands from the terminal.
59
602. New Features in Bash
61
62a. There is a new contributed loadable builtin: asort.
63
643. Changes to Readline
65
66a. Fixed a bug that could cause an application with an application-specific
67 redisplay function to crash if the line data structures had not been
68 initialized.
69
704. New Features in Readline
71
72------------------------------------------------------------------------------
73This document details the changes between this version, bash-5.1-beta, and
74the previous version, bash-5.1-alpha.
75
761. Changes to Bash
77
78a. Fixed a bug that caused name references to variables to not update the
79 referenced variable's assignment side effects.
80
81b. Tightened up the parameter transformation error checking for invalid
82 transformation operators.
83
84c. System-specific changes for: FreeBSD
85
86d. A few minor changes to move potential uses of stdio functions out of signal
87 handling paths.
88
89e. Make sure SIGCHLD is blocked in all cases where waitchld() is not called
90 from a signal handler.
91
92f. Changed `command' builtin processing so it no longer starts an extra process
93 when run asynchronously (command x &).
94
95g. Avoid performing tilde expansion after `:' in words that look like assignment
96 statements when in posix mode.
97
98h. Slight changes to how the `complete' builtin prints out options and actions
99 for completion specifications.
100
101i. Several changes to how `local -' restores the values of options and
102 $SHELLOPTS.
103
104j. Don't treat a word in a compound assignment as an assignment statement
105 unless it has a valid subscript before the `='.
106
107k. Fixed a bug with the DEBUG trap and process substitution that caused the
108 terminal's process group to be set incorrectly.
109
110l. Fixed a bug that left readline's signal handlers installed while running a
111 shell command from a bindable readline command.
112
113m. Fixed the `fc' builtin to clamp out of range history specifications at the
114 boundaries of the history list for POSIX conformance.
115
116n. Fixed a bug that caused ${foo@a} to treat foo as an unset variable if it
117 was an array without a value for subscript 0/"0" but had other set
118 elements.
119
120o. Fixed a bug that caused the history code to attempt to parse command
121 substitutions looking for shell comments before adding them to the history,
122 even while parsing here-documents.
123
124p. Fixed a bug that could cause a syntax error in a command read by `eval' to
125 exit an interactive shell.
126
1272. New Features in Bash
128
129a. If the hash builtin is listing hashed filenames portably, don't print
130 anything if the table is empty.
131
132b. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component.
133
134c. Bash attempts to optimize away forks in the last command in a function body
135 under appropriate circumstances.
136
137d. The globbing code now uses fnmatch(3) to check collation elements (if
138 available) even in cases without multibyte characters.
139
140e. The `fg' and `bg' builtins now return an error in a command substitution
141 when asked to restart a job inherited from the parent shell.
142
143f. The shell now attempts to unlink all FIFOs on exit, whether a consuming
144 process has finished with them or not.
145
1463. Changes to Readline
147
148a. Make sure that all undo groups are closed when leaving vi insertion mode.
149
150b. Make sure that the vi-mode `C' and `c' commands enter insert mode even if
151 the motion command doesn't have any effect.
152
153c. Fixed several potential memory leaks in the callback mode context handling.
154
155d. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while
156 executing the terminal cleanup code, since it's no longer run in a signal
157 handling context.
158
1594. New Features in Readline
160
161a. The signal cleanup code now blocks SIGINT while processing after a SIGINT.
162
163------------------------------------------------------------------------------
164This document details the changes between this version, bash-5.1-alpha, and
165the previous version, bash-5.0-release.
166
1671. Changes to Bash
168
169a. Fixed a bug that caused a posix-mode shell to not exit if the return builtin
170 was executed outside a function or dot script.
171
172b. Fixed a bug where `declare +f' could potentially turn off the function
173 attribute.
174
175c. Restored bash-4.4 pathname expansion behavior when a word to be expanded had
176 only backslashes, not any of the other globbing characters. This came after
177 an extensive POSIX group discussion (interp #1234).
178
179d. There are more changes to avoid performing word expansions multiple times on
180 arithmetic expressions.
181
182e. Fixed a bug with alias expansion when the alias ends with a TAB.
183
184f. Fixed a bug that caused programmable completion to return an error if the
185 shell function name supplied as an argument to `complete -F' was invalid.
186
187g. There are several fixes to buffer overflows found as the result of fuzzing
188 with random input.
189
190h. Fixed a bug that caused the edit-and-execute-command editing command to
191 start with the previous history line if invoked on an empty line.
192
193i. Fixed a bug that potentially caused `bind --help' to change readline's
194 output stream.
195
196j. Turning off posix mode now restores the vi-insertion mode binding for TAB
197 that was in effect when posix mode was enabled.
198
199k. Restore the previous state of job control being enabled if `exec' fails in
200 an interactive shell.
201
202l. Fixed a bug that caused the terminal's process group to be set incorrectly
203 if job control was turned off before starting an interactive shell.
204
205m. Fixed a bug that caused a crash when HISTSIZE=0.
206
207n. Fixed a word expansion bug that caused null strings on the rhs of expansions
208 to be discarded incorrectly.
209
210o. History list management does a better job of handling the situation where
211 the number of history entries from the current shell session is greater than
212 the number of entries in the history list.
213
214p. Fixed a bug that caused the `fc' builtin to attempt to dereference a newly-
215 freed history entry.
216
217q. Fixed a bug that made the `Q' variable transformation not work well with
218 `set -u'.
219
220r. There are several word expansion fixes for expanding $* and $@ in contexts
221 where word splitting is not going to be performed, since each positional
222 parameter must expand to a separate word.
223
224s. Fixed a bug that could cause ^D to exit bash immediately even if there were
225 stopped jobs.
226
227t. Fixed a bug with double-quoting and backslash-quoting strings containing
228 multibyte characters for reuse.
229
230u. Fixed a bug that caused the line number to be reported incorrectly if the
231 shell executed a (command) subshell.
232
233v. Fixed a bug that caused the shell to fail to reap process substitutions
234 when they went out of scope, which had unpredictable results.
235
236w. Fixed a bug that caused null strings in arguments to [[ conditional command
237 operators to compare incorrectly.
238
239x. Changed the behavior of `wait' without arguments to only wait for background
240 processes the current shell instance started, not background children it may
241 have inherited.
242
243y. Fixed a bug that could cause command substitution to leave file descriptors
244 open if the shell received many SIGINTs.
245
246z. Bash now behaves better if the `**' filename expansion operator encounters a
247 symbolic link to a directory, avoiding more cases where it might return
248 duplicate pathnames.
249
250aa. Programmable completion now canonicalizes directory names in the same way
251 as bash word completion, so `..' is handled consistently.
252
253bb. Fixed a bug when using RETURN as the delimiter to the read builtin; it
254 caused readline to set the binding for RETURN incorrectly.
255
256cc. Fixed a bug that caused `history -d' to delay printing an out-of-range
257 error message.
258
259dd. Fixed a bug with `bash -c command' where `command' ends with an expanded
260 alias.
261
262ee. Fixed a bug that could result in `history -n' adding spurious line feeds to
263 commands in the history list.
264
265ff. The $RANDOM random number generator now XORs the top and bottom halves of
266 the internal 32-bit value to introduce more randomness. Setting the shell
267 compatibility level to 50 or lower undoes this.
268
269gg. Fixed several problems caused by running the DEBUG trap on simple commands
270 executed as part of a pipeline.
271
272ii. Fixed a bug that didn't allow `bind -r' to remove the binding for \C-@.
273
274jj. Several fixes to the bash-backward-shellword bindable readline command to
275 behave better when at the last character on the line.
276
277kk. If `set -x' is enabled, bash doesn't print a command twice if it's run by
278 the `command' builtin.
279
280ll. Fixed a bug with printing function definitions containing here documents.
281
282mm. Fixed a bug that could cause the `bind' builtin to set $? to -1.
283
284nn. Fixed a bug that didn't reset the timezone information correctly when the
285 TZ variable was unset.
286
287oo. Fixed several issues with assigning an associative array variable using a
288 compound assignment that expands the value of the same variable.
289
290pp. Fixed several places where the shell set $? without setting PIPESTATUS.
291
292qq. Fixed a problem with glob bracket expressions containing invalid character
293 classes, collating symbols, or equivalence classes -- they should not
294 require a closing right bracket.
295
296rr. Fixed a bug where running a builtin in a subshell did not run the EXIT trap.
297
298ss. Fixed several problems with posix-mode variable assignments preceding
299 shell function calls and posix special builtins, so that they create and
300 modify variables at the current scope.
301
302tt. Fix history initialization so `bash +o history' works as expected.
303
304uu. Fixed a bug in the bindable edit-and-execute-command command that could
305 interfere with the shell's parsing state.
306
307vv. Fixed an issue with nested traps running command substitutions in command
308 lines with command substitutions.
309
310ww. Fixed a bug with globbing pathnames that contain invalid multibyte
311 characters (sequences that don't correspond to a character in the current
312 locale).
313
314xx. Fixed a bug that caused the shell not to exit if a function definition
315 failed while errexit was enabled.
316
317yy. Process substitution processes now get their input from /dev/null, since
318 they are asynchronous, not interactive, and not jobs.
319
320zz. Setting nocaseglob no longer turns on case-insensitive regexp matching.
321
322aaa. Fixed a bug that resulted in extra blank lines being added to some history
323 entries containing here-documents.
324
325bbb. Fixed a bug that resulted in incorrect matching of some patterns in word
326 expansion if they expanded to the empty string.
327
328ccc. Fixed here-string expansion so it behaves the same as expansion of the
329 rhs of an assignment statement.
330
331ddd. Changed here-document parsing to no longer allow the end of the here
332 document to delimit a command substitution.
333
334eee. Several fixes to history expansion: multiple :p modifiers work, a ^ word
335 designator works as part of a range, and a `-' is treated as part of a
336 search string if it immediately follows a `!'.
337
338fff. Fixed a bug in pattern substitution with null matches in a string
339 containing multibyte characters.
340
341ggg. Unbinding a key sequence bound with `bind -x' now removes the key sequence
342 from the additional keymap `bind -x' uses.
343
344hhh. Fixed a bug with command start detection for completion so that it doesn't
345 mistake brace expansion for the start of a command.
346
347iii. Fixed a bug that caused local variables with the same name as variables
348 appearing in a function's temporary environment to not be marked as local.
349
350jjj. Fixed a bug that could cause SIGCHLD to be blocked when executing return
351 or exec in the rightmost pipeline element with lastpipe enabled.
352
353kkk. Fixed a bug that could result in commands without the execute bit set
354 being added to the command hash table.
355
356lll. Fixed a bug that allowed non-digits to follow the `#' in a `base#number'
357 integer constant.
358
359mmm. Fixed a bug that made `time -- command' attempt to execute `--'.
360
361nnn. Fixed a couple of bugs with variable transformation using arrays
362 subscripted with `*' or `@'.
363
364ooo. A failure to create a variable using `declare' in a function no longer
365 causes the function to return immediately.
366
367ppp. Fixed a bug that could cause the := word expansion to add a non-null
368 value if attempting to assign a null string when double-quoted.
369
370qqq. Fixed a bug that could cause backslashes quoting double quotes in here
371 document bodies to not be removed when expanding the body.
372
373rrr. Fixed a bug that caused commands following a subshell while the shell is
374 reading input from stdin but not interactive, while job control is
375 enabled, to be executed twice.
376
377sss. Fixed a bug where receiving SIGTERM from a different process while
378 readline was active could cause the shell to terminate.
379
380ttt. In posix mode, running a trap after the read builtin now sees the exit
381 status of the read builtin (e.g., 130 after a SIGINT) in $?.
382
383uuu. Fixed a bug with nameref variables referencing array subscripts used in
384 arithmetic expressions.
385
386vvv. Fixed a bug that caused the pipeline process group id to be reset in the
387 middle of a command list run by a shell started to run a command
388 substitution.
389
390www. Restricted shells can no longer read and write history files with pathnames
391 containing slashes.
392
393xxx. Fixed a couple of problems with 0 and -0 used as arguments to `fc' when
394 not listing commands from the history.
395
396yyy. When `test' is supplied four or more arguments, treat an argument that
397 looks like an operator (e.g., -e), but is in a place where only a string
398 is valid, as a string, as it would be when using the POSIX rules, instead
399 of an operator with a missing argument.
400
401zzz. There is no `compat50' shopt option. Changes to the shell compatibility
402 level should use the BASH_COMPAT variable.
403
404aaaa. Redirection failures with compound commands are now treated as errors
405 that cause the shell to exit if `errexit' is enabled.
406
407bbbb. Redirection failure error messages no longer expand the word in the
408 redirection again.
409
410cccc. History expansion is no longer performed while parsing a here-document
411 inside a command substitution.
412
4132. Changes to Readline
414
415a. There are a number of fixes that were found as the result of fuzzing with
416 random input.
417
418b. Changed the revert-all-at-newline behavior to make sure to start at the end
419 of the history list when doing it, instead of the line where the user hit
420 return.
421
422c. When parsing `set' commands from the inputrc file or an application, readline
423 now allows trailing whitespace.
424
425d. Fixed a bug that left a file descriptor open to the history file if the
426 file size was 0.
427
428e. Fixed a problem with binding key sequences containing meta characters.
429
430f. Fixed a bug that caused the wrong line to be displayed if the user tried to
431 move back beyond the beginning of the history list, or forward past the end
432 of the history list.
433
434g. If readline catches SIGTSTP, it now sets a hook that allows the calling
435 application to handle it if it desires.
436
437h. Fixed a redisplay problem with a prompt string containing embedded newlines.
438
439i. Fixed a problem with completing filenames containing invalid multibyte
440 sequences when case-insensitive comparisons are enabled.
441
442j. Fixed a redisplay problem with prompt strings containing invisible multibyte
443 characters.
444
445k. Fixed a problem with multibyte characters mapped to editing commands that
446 modify the search string in incremental search.
447
448l. Fixed a bug with maintaining the key sequence while resolving a bound
449 command in the presence of ambiguous sequences (sequences with a common
450 prefix), in most cases while attempting to unbind it.
451
452m. Fixed several buffer overflows found as the result of fuzzing.
453
454n. Reworked backslash handling when translating key sequences for key binding
455 to be more uniform and consistent, which introduces a slight backwards
456 incompatibility.
457
458o. Fixed a bug with saving the history that resulted in errors not being
459 propagated to the calling application when the history file is not writable.
460
461p. Readline only calls chown(2) on a newly-written history file if it really
462 needs to, instead of having it be a no-op.
463
464q. Readline now behaves better when operate-and-get-next is used when the
465 history list is `full': when there are already $HISTSIZE entries.
466
467r. Fixed a bug that could cause vi redo (`.') of a replace command not to work
468 correctly in the C or POSIX locale.
469
470s. Fixed a bug with vi-mode digit arguments that caused the last command to be
471 set incorrectly. This prevents yank-last-arg from working as intended, for
472 example.
473
4743. New Features in Bash
475
476a. `bind -x' now supports different bindings for different editing modes and
477 keymaps.
478
479b. Bash attempts to optimize the number of times it forks when executing
480 commands in subshells and from `bash -c'.
481
482c. Here documents and here strings now use pipes for the expanded document if
483 it's smaller than the pipe buffer size, reverting to temporary files if it's
484 larger.
485
486d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut
487
488e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL
489 and those that were SIG_IGN when the shell starts.
490
491f. The shell now expands the history number (e.g., in PS1) even if it is not
492 currently saving commands to the history list.
493
494g. `read -e' may now be used with arbitrary file descriptors (`read -u N').
495
496h. The `select' builtin now runs traps if its internal call to the read builtin
497 is interrupted by a signal.
498
499i. SRANDOM: a new variable that expands to a 32-bit random number that is not
500 produced by an LCRNG, and uses getrandom/getentropy, falling back to
501 /dev/urandom or arc4random if available. There is a fallback generator if
502 none of these are available.
503
504j. shell-transpose-words: a new bindable readline command that uses the same
505 definition of word as shell-forward-word, etc.
506
507k. The shell now adds default bindings for shell-forward-word,
508 shell-backward-word, shell-transpose-words, and shell-kill-word.
509
510l. Bash now allows ARGV0 appearing in the initial shell environment to set $0.
511
512m. If `unset' is executed without option arguments, bash tries to unset a shell
513 function if a name argument cannot be a shell variable name because it's not
514 an identifier.
515
516n. The `test -N' operator uses nanosecond timestamp granularity if it's
517 available.
518
519o. Bash posix mode now treats assignment statements preceding shell function
520 definitions the same as in its default mode, since POSIX has changed and
521 no longer requires those assignments to persist after the function returns
522 (POSIX interp 654).
523
524p. BASH_REMATCH is no longer readonly.
525
526q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n'
527 or `wait' without arguments.
528
529r. Sorting the results of pathname expansion now uses byte-by-byte comparisons
530 if two strings collate equally to impose a total order; the result of a
531 POSIX interpretation (#963 and #1070).
532
533s. Bash now allows SIGINT trap handlers to execute recursively.
534
535t. Bash now saves and restores state around setting and unsetting posix mode,
536 instead of having unsetting posix mode set a known state.
537
538u. Process substitution is now available in posix mode.
539
540v. READLINE_MARK: a new variable available while executing commands bound with
541 `bind -x', contains the value of the mark.
542
543w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell
544 startup.
545
546x. `test -v N' can now test whether or not positional parameter N is set.
547
548y. `local' now honors the `-p' option to display all local variables at the
549 current context.
550
551z. The `@a' variable transformation now prints attributes for unset array
552 variables.
553
554aa. The `@A' variable transformation now prints a declare command that sets a
555 variable's attributes if the variable has attributes but is unset.
556
557bb. `declare' and `local' now have a -I option that inherits attributes and
558 value from a variable with the same name at a previous scope.
559
560cc. When run from a -c command, `jobs' now reports the status of completed jobs.
561
562dd. New `U', `u', and `L' parameter transformations to convert to uppercase,
563 convert first character to uppercase, and convert to lowercase,
564 respectively.
565
566ee. PROMPT_COMMAND: can now be an array variable, each element of which can
567 contain a command to be executed like a string PROMPT_COMMAND variable.
568
569ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource.
570
571gg. Associative arrays may be assigned using a list of key-value pairs within
572 a compound assignment. Compound assignments where the words are not of
573 the form [key]=value are assumed to be key-value assignments. A missing or
574 empty key is an error; a missing value is treated as NULL. Assignments may
575 not mix the two forms.
576
577hh. New `K' parameter transformation to display associative arrays as key-
578 value pairs.
579
580ii. Writing history to syslog now handles messages longer than the syslog max
581 length by writing multiple messages with a sequence number.
582
583jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since
584 they are nominally integer variables. LINENO is not an integer variable.
585
586kk. Bash temporarily suppresses the verbose option when running the DEBUG trap
587 while running a command from the `fc' builtin.
588
589ll. `wait -n' now accepts a list of job specifications as arguments and will
590 wait for the first one in the list to change state.
591
592mm. The associative array implementation can now dynamically increase the
593 size of the hash table based on insertion patterns.
594
595nn. HISTFILE is now readonly in a restricted shell.
596
597oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit
598 systems.
599
6004. New Features in Readline
601
602a. If a second consecutive completion attempt produces matches where the first
603 did not, treat it as a new completion attempt and insert a match as
604 appropriate.
605
606b. Bracketed paste mode works in more places: incremental search strings, vi
607 overstrike mode, character search, and reading numeric arguments.
608
609c. Readline automatically switches to horizontal scrolling if the terminal has
610 only one line.
611
612d. Unbinding all key sequences bound to a particular readline function now
613 descends into keymaps for multi-key sequences.
614
615e. rl-clear-display: new bindable command that clears the screen and, if
616 possible, the scrollback buffer (bound to emacs mode M-C-l by default).
617
618f. New active mark and face feature: when enabled, it will highlight the text
619 inserted by a bracketed paste (the `active region') and the text found by
620 incremental and non-incremental history searches. This is tied to bracketed
621 paste and can be disabled by turning off bracketed paste.
622
623g. Readline sets the mark in several additional commands.
624
625h. Bracketed paste mode is enabled by default.
626
627i. Readline tries to take advantage of the more regular structure of UTF-8
628 characters to identify the beginning and end of characters when moving
629 through the line buffer.
630
631j. The bindable operate-and-get-next command (and its default bindings) are
632 now part of readline instead of a bash-specific addition.
633
634------------------------------------------------------------------------------
d233b485
CR
635This document details the changes between this version, bash-5.0-release, and
636the previous version, bash-5.0-rc1.
637
6381. Changes to Bash
639
640a. Tilde expansion isn't performed on indexed array subscripts, even for
641 backwards compatibility.
642
643b. The shell doesn't exit in posix mode if the eval builtin gets a parse
644 error when run by the command builtin.
645
646c. Fixed a bug that caused a shell comment in an alias to not find the end
647 of the alias properly.
648
649d. Reverted a change from April, 2018 that caused strings containing
650 backslashes to be flagged as glob patterns.
651
6522. Changes to Readline
653
6543. New Features in Bash
655
6564. New Features in Readline
657
658------------------------------------------------------------------------------
659This document details the changes between this version, bash-5.0-rc1, and
660the previous version, bash-5.0-beta2.
661
6621. Changes to Bash
663
664a. Fix to initial word completion detection code.
665
666b. Fixed a bug that caused issues with assignment statements containing ^A in
667 the value assigned when IFS contains ^A.
668
669c. Added a fallback to fnmatch() when strcoll can't correctly deal with
670 bracket expression character equivalence classes.
671
672d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command
673 when running a trap handler containing [[ or (( commands.
674
675e. Fixed a bug that caused nameref assignments in the temporary environment
676 to potentially create variables with invalid names.
677
678f. Fixed a bug that caused `local -' to turn off alias expansion in scripts.
679
680g. Fixed a parser issue with a command string containing EOF after an invalid
681 command as an argument to a special builtin not causing a posix-mode shell
682 to exit.
683
684h. Made a slight change to the FNV-1 string hash algorithm used for associative
685 arrays (corrected the initial seed).
686
6872. Changes to Readline
688
6893. New Features in Bash
690
691a. The `select' command now supports command forms without a word list
692 following `in'.
693
6944. New Features in Readline
695
696------------------------------------------------------------------------------
697This document details the changes between this version, bash-5.0-beta2, and
698the previous version, bash-5.0-beta.
699
7001. Changes to Bash
701
702a. Fixed a bug that could cause a seg fault while parsing a subshell command
703 inside a command substitution.
704
705b. Fixed several small memory leaks uncovered by coverity.
706
707c. Fixed a problem with command substitution inside an interactive shell that
708 could cause the parent to receive a SIGHUP.
709
710d. Fixed a problem with using `*' and `@' as subscripts when assigning values
711 to an associative array with assoc_expand_once enabled.
712
713e. Fixed a bug that could cause a huge memory allocation when completing a
714 word beginning with an invalid tilde expansion.
715
8868edaf 716f. Cleaned up some incompatibilities with bash-4.4 when expanding indexed array
d233b485
CR
717 subscripts used in arithmetic expansions when assoc_expand_once is enabled.
718
719g. The ${parameter@a} expansion will display attributes even if `parameter' is
720 unset.
721
722h. Fixed a bug that caused the output of `set' to cut off some variables before
723 printing the value.
724
725i. Treat a failure to assign a variable when using the ${x:=value} expansion
726 as an expansion error, so non-interactive posix-mode shells exit
727
728j. Fixed a problem when expanding $* in a context where word splitting is not
729 performed when IFS is NULL.
730
731k. Temp files used to store here documents are forced readable, no matter what
732 the user's umask says.
733
734l. Fixed a problem where an interrupted brace expansion could cause the shell
735 to attempt to free an invalid memory location.
736
737m. Make sure to check for any terminating signals after running a trap
738 handler; don't wait until the next time we process traps.
739
740n. Fixed a bug that caused "return" to act like a special builtin with respect
741 to variable assignments even when preceded by "command".
742
743o. POSIX-mode shells now return failure if the cd builtin fails due to the
744 absolute directory name being longer than PATH_MAX, instead of trying
745 again with a relative pathname.
746
747p. Fixed a problem with FUNCNAME occasionally being visible when not executing
748 a shell function.
749
750q. Fixed a problem with the expansions performed on the WORD in the case
751 command.
752
753r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during
754 word splitting and the read builtin.
755
756s. Fixed a problem with expanding an array with subscript `*' when all the
757 elements expand to the empty string, and making sure the expansion honors
758 the `:' specifier.
759
7602. Changes to Readline
761
762a. Fixed a bug with adding multibyte characters to an incremental search string.
763
764b. Fixed a bug with redoing text insertions in vi mode.
765
766c. Fixed a bug with pasting text into an incremental search string if bracketed
767 paste mode is enabled. ESC cannot be one of the incremental search
768 terminator characters for this to work.
769
770d. Fixed a bug with anchored search patterns when performing searches in vi
771 mode.
772
7733. New Features in Bash
774
775a. Associative and indexed arrays now allow subscripts consisting solely of
776 whitespace.
777
778b. `checkwinsize' is now enabled by default.
779
780c. The `localvar_unset' shopt option is now visible and documented.
781
782d. The `progcomp_alias' shopt option is now visible and documented.
783
784e. The signal name processing code now understands `SIGRTMIN+n' all the way
785 up to SIGRTMAX.
786
787f. There is a new `seq' loadable builtin.
788
789g. Trap execution now honors the (internal) max invocations of `eval', since
790 traps are supposed to be executed as if using `eval'.
791
792h. The $_ variable doesn't change when the shell executes a command that forks.
793
794i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though
795 conforming applications aren't supposed to use them.
796
797j. POSIX mode now enables the `shift_verbose' option.
798
7994. New Features in Readline
800
801a. Readline now allows application-defined keymap names; there is a new public
802 function, rl_set_keymap_name(), to do that.
803
804b. The "Insert" keypad key, if available, now puts readline into overwrite
805 mode.
806
807------------------------------------------------------------------------------
808This document details the changes between this version, bash-5.0-beta, and
809the previous version, bash-5.0-alpha.
810
8111. Changes to Bash
812
813a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this
814 is where POSIX says the subshell is not "enclosed" by the loop.
815
816b. Added more UTF-8-specific versions of multibyte functions, and optimized
817 existing functions if the current locale uses UTF-8 encoding.
818
819c. In POSIX mode, assignments preceding regular builtins should not persist
820 when the builtin completes.
821
822d. Added additional checks to special array assignment (e.g., BASH_ALIASES)
823 so it can't be used to bypass validity checks performed in other places.
824
825e. The `!!' history expansion now refers to the previous history entry as
826 expected, even if used on the second or subsequent line of a multi-line
827 history entry.
828
829f. Fixed a bug that could cause the shell to dereference a NULL pointer if
830 the environment (`environ') is set to NULL.
831
832g. Bash uses slightly better integer overflow handling for brace sequence
833 expansion on systems where ints are 32 bits and intmax_t is 64 bits.
834
835h. Fixed a bug setting attributes for a variable named as an argument to
836 `declare' that also appears as a nameref in the temporary environment.
837
838i. Fixed several bugs that could cause assignments to namerefs to create
839 variables with invalid names.
840
841j. Fixed a bug that could result in the SIGINT handler being set incorrectly
842 in asynchronous subshells.
843
844k. Fixed a bug that could cause `bash -t' to not execute the specified command.
845
846l. Fixed several bugs that caused the shell to operate on the wrong variable
847 when using namerefs with the same name as a global variable in shell
848 functions.
849
850m. Internal changes to how the shell handles variables with invalid names in
851 the initial environment and to prevent variables with invalid names from
852 being added to the environment instead of passing them on to children.
853
854n. Changes to make sure that an expansion that results in a quoted null string
855 is reflected in the expansion, even if the word expands to nothing.
856
857o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand
858 the same way after the recent changes for POSIX interpretation 888.
859
860p. Saving and restoring the positional parameters at function entry and exit
861 is considerably more efficient; noticeably so when there are large numbers
862 of positional parameters.
863
864q. Fixed a bug that caused `lastpipe' and `pipefail' to return an incorrect
865 status for the pipeline if there was more than one external command in a
866 loop body appearing in the last pipeline element.
867
868r. Fixed a bug that caused value conversion errors with the printf builtin's
869 %u and %f conversion specifications and invalid constants.
870
8712. Changes to Readline
872
873a. Added more UTF-8-specific versions of multibyte functions, and optimized
874 existing functions if the current locale uses UTF-8 encoding.
875
876b. Fixed a problem with bracketed-paste inserting more than one character and
877 interacting with other readline functions.
878
879c. Fixed a bug that caused the history library to attempt to append a history
880 line to a non-existent history entry.
881
882d. If using bracketed paste mode, output a newline after the \r that is the
883 last character of the mode disable string to avoid overwriting output.
884
885e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better
886 handle multibyte characters.
887
888f. Fixed a redisplay problem that caused an extra newline to be generated on
889 accept-line when the line length is exactly the screenwidth.
890
8913. New Features in Bash
892
893a. Bash no longer allows variable assignments preceding a special builtin that
894 changes variable attributes to propagate back to the calling environment
895 unless the compatibility level is 44 or lower.
896
897b. You can set the default value for $HISTSIZE at build time in config-top.h.
898
899c. The `complete' builtin now accepts a -I option that applies the completion
900 to the initial word on the line.
901
902d. The internal bash malloc now uses mmap (if available) to satisfy requests
903 greater than 128K bytes, so free can use mfree to return the pages to the
904 kernel.
905
906e. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup
907 unless it's in debugging mode, as the documentation has always said, but
908 will dynamically create them if a script references them at the top level
909 without having enabled debugging mode.
910
911f. The localvar_inherit option will not attempt to inherit a value from a
912 variable of an incompatible type (indexed vs. associative arrays, for
913 example).
914
915g. The `globasciiranges' option is now enabled by default; it can be set to
916 off by default at configuration time.
917
9184. New Features in Readline
919
920a. The history expansion library now understands command and process
921 substitution and extended globbing and allows them to appear anywhere in a
922 word.
923
924b. The history library has a new variable that allows applications to set the
925 initial quoting state, so quoting state can be inherited from a previous
926 line.
927
928------------------------------------------------------------------------------
929This document details the changes between this version, bash-5.0-alpha, and
930the previous version, bash-4.4-release.
931
9321. Changes to Bash
933
934a. Fixed a bug that could cause traps in background jobs to give the terminal
935 to the wrong process group.
936
937b. Fixed a bug that caused `kill -l 0' to print an out-of-range error.
938
939c. Fixed a problem that could result in here-documents being displayed in
940 the wrong order.
941
942d. Fixed a number of out-of-bounds and free memory read errors found via
943 fuzzing.
944
945e. Fixed a subshell inheritance problem that could cause a subshell to wait for
946 the wrong process.
947
948f. Fixed a bug that caused SHLVL to be incremented one too many times when
949 creating subshells.
950
951g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with
952 job control enabled.
953
954h. Fixed a spurious warning about unterminated ${ or $( constructs during
955 word completion.
956
957i. The shell no longer runs traps if a signal arrives while reading command
958 substitution output.
959
960j. Fixed an arithmetic expansion error that could allow ++var++ as valid
961 syntax.
962
963k. Fixed an error that allowed out-of-bounds references to the directory stack.
964
965l. The shell does a better job of saving multi-line history entries with
966 embedded comments.
967
968m. Fixed a bug that could cause quoted bracket expressions in regular expression
969 arguments to `[[' to not match correctly.
970
971n. Fixed a bug that could cause an IFS character in a word to result in an
972 extra '\001' character in the expansion.
973
974o. A trailing backslash in a glob pattern can match a trailing backslash in the
975 string.
976
977p. Fixed a memory leak in the process creation code path when job control is
978 enabled.
979
980q. Fixed a bug that caused `printf' to output broken surrogate pairs for
981 Japanese locales.
982
983r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to
984 kill an interactive shell.
985
986s. Fixed a bug that could cause the `read' builtin to not fully read a
987 multibyte character.
988
989t. Fixed a bug that could cause identifiers to be evaluated in conditional
990 arithmetic expressions even when evaluation is suppressed.
991
992u. Fixed a bug that could result in command substitution, when executed in a
993 context where word splitting is not performed, to leave a stray '\001'
994 character in the string.
995
996v. Fixed a bug that could cause history expansion to be disabled in a non-
997 interactive shell even if `-o histexpand' is supplied at startup.
998
999w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters.
1000
1001x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions.
1002
1003y. If indirect expansion attempts to indirectly reference through an unset
1004 variable, report an error.
1005
1006z. Added a guard to prevent the shell from looping while receiving an endless
1007 stream of SIGTTIN at shell startup.
1008
1009aa. Fixed a bug with parsing here documents inside a command substitution when
1010 looking for the closing delimiter.
1011
1012bb. Fixed a bug that caused printf to not quote all <blank> characters in the
1013 current locale when using the `%q' format specifier.
1014
1015cc. Fixed a bug with bash's internal buffered I/O system that caused the input
1016 pointer to not be reset when read(2) returned an EOF.
1017
1018dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will
1019 not interrupt open/read/write system calls.
1020
1021ee. The ERR trap now reports line numbers more reliably.
1022
1023ff. The shell no longer tries to manipulate the terminal process group if a
1024 command or process substitution is killed by SIGTERM when job control is
1025 enabled.
1026
1027gg. Fixed a bug that caused extglob patterns to match filenames beginning with
1028 a period.
1029
1030hh. File descriptors open for writing to here documents are no longer available
1031 to subshells.
1032
1033ii. Make sure word completion doesn't perform command or process substitution.
1034
1035jj. Fixed a bug with parsing $$'...' inside a command substitution.
1036
1037kk. Fixed a bug that caused bash to remove backslash-newline pairs from the
1038 body of a here-document with a quoted delimiter inside a command
1039 substitution.
1040
1041ll. Fixed a bug that could cause the shell to hang when adding a pid to the
1042 table of background process exit statuses.
1043
1044mm. Fixed a bug that could cause 0x01 characters to be doubled in the output
1045 of process substitution.
1046
1047nn. Restricted shells now clear the hash table before making the PATH variable
1048 read-only.
1049
1050oo. There are a number of changes to the expansion of $* and $@ in contexts
1051 where word splitting does not occur (quoted and unquoted), with IFS set
1052 to NULL or a non-standard value, mostly to deal with the consequences of
1053 the behavior defined in Posix interpretation 888.
1054
1055pp. There are a number of changes to nameref variable handling to avoid
1056 creating variables with invalid names.
1057
1058qq. A non-interactive posix mode shell no longer exits when an assignment
1059 statement fails if the assignment is utimately being performed by the
1060 `command' builtin.
1061
1062rr. When using character class names for globbing, don't allow case
1063 insensitivity, even if nocaseglob is enabled.
1064
1065ss. Fixed a bug that allowed some redirections to stay in place if a later
1066 redirection failed.
1067
1068tt. Fixed a bug in how command and process substitutions are recognized within
1069 other parameter expansions.
1070
1071uu. Fixed a bug that caused bash to loop under certain circumstances when
1072 performing arithmetic expansion on a variable whose value is an invalid
1073 expression.
1074
1075vv. Fixed a bug that could cause bash to expand aliases inappropriately while
1076 parsing compound commands like `case'.
1077
1078ww. Fixed a bug that could cause `read -N' to fail to read complete multibyte
1079 characters, even when the sequences are incomplete or invalid, with or
1080 without readline.
1081
1082xx. Fixed a bug that could cause `case' to fail to match patterns containing
1083 0x01 characters.
1084
1085yy. Fixed a bug that caused exported functions to contain stray 0x01 characters.
1086
1087zz. Fixed some inconsistencies with how the history number is handled in the
1088 various prompt strings.
1089
1090aaa. Fixed a bug that could cause a core dump if READLINE_LINE was unset
1091 inside a shell function bound to a key sequence with `bind -x'.
1092
1093bbb. Fixed a bug that could cause bash to not read a token terminator correctly
1094 if a command substitution was used inside an arithmetic `for' command.
1095
1096ccc. Fixed problems that could occur with a fatal arithmetic expansion error
1097 in a context (like prompt expansion) where you can't jump back to the
1098 top level.
1099
1100ddd. Expression errors in arithmetic `for' commands are treated more like
1101 shell syntax errors.
1102
1103eee. Fixed a parser synchronization error resulting from a syntax error
1104 followed immediately by an EOF.
1105
1106fff. When executing a shell function, the first line in the function ($LINENO)
1107 is line 1 instead of line 0, as Posix requires.
1108
1109ggg. In Posix mode, bash will canonicalize the value of PWD it inherits from
1110 the environment and use that to set its idea of the current directory.
1111
1112hhh. If LINENO is exported, bash needs to regenerate its value each time it
1113 constructs the environment.
1114
1115iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'.
1116
1117jjj. Make sure the `coproc' command returns an appropriate status if the NAME
1118 argument is invalid.
1119
1120kkk. Fixed a problem with arithmetic expressions containing array references
1121 that contain arithmetic expressions with syntax errors.
1122
1123lll. The `select' command and help builtin will use $COLUMNS before the window
1124 size returned from the kernel as the terminal width.
1125
1126mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to
1127 detect file descriptor errors.
1128
1129nnn. The `read' builtin now does a better job of acting on signals that don't
1130 interrupt read(2).
1131
1132ooo. Fixed some cases where `printf -v' did not return failure status on a
1133 variable assignment error.
1134
1135ppp. Fixed temporary environment propagation back to the current environment
1136 so that it doesn't happen for special builtins run by the `command'
1137 builtin.
1138
1139qqq. Fixed a bug when searching for the end of a here-document delimiter in a
1140 command substitution.
1141
1142rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail.
1143
1144sss. Fixed a bug that could cause reserved words to not be recognized in a
1145 for statement without the `in' inside a command substitution.
1146
1147ttt. Fixed a bug that could cause a double-free in a timed command with an
1148 expansion error.
1149
1150uuu. Fixed a bug that could cause a core dump if a script switches from a UTF-8
1151 locale to a different locale after displaying a lone surrogate character.
1152
1153vvv. Fixed cases where bash prematurely removed FIFOs attached to process
1154 substitutions.
1155
1156www. Fixed a problem with calculating the size of the table that stores exit
1157 statuses from background processes when the child process resource limit
1158 is very large.
1159
1160xxx. Fixed a memory leak with functions using `return' when using FIFOs for
1161 standard input.
1162
1163yyy. `wait' without arguments attempts to wait for all active process
1164 substitution processes.
1165
1166zzz. Fixed a bug where an indirect parameter was subjected to word splitting
1167 when trying to find the indirected variable name.
1168
1169aaaa. Fixed a bug that could allow restricted shell users to add commands to
1170 the hash table.
1171
1172bbbb. When using the `!(patlist)' extended globbing operator, a filename
1173 beginning with a `.' that doesn't match any of the patterns is not
1174 returned as a match if leading dots must be matched explicitly.
1175
1176cccc. Fixed a bug that could cause line number and source file information for
1177 a function definition to be incorrect if there are multiple definitions.
1178
1179dddd. Fixed a bug that could cause builtins like `readonly' to behave
1180 differently when applied to arrays and scalar variables within functions.
1181
1182eeee. Fixed a bug that could cause alias expansion to add an extra space to
1183 a quoted string that begins outside the alias expansion.
1184
1185ffff. Fixed a bug that could result in unwanted alias expansion after timing
1186 the null command.
1187
1188gggg. Fixed a bug that could cause a core dump if a timestamp in a history
1189 file overflowed a time_t.
1190
1191hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since
1192 the kernel calls make those file descriptors read-write.
1193
1194iiii. Fixed a problem with splitting double-quoted words for programmable
1195 completion when the double quote immediately follows another word
1196 delimiter.
1197
1198jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share
1199 the same input buffer.
1200
1201kkkk. The error message resulting from ${x:?} and ${x?} now differs depending
1202 on whether the variable is null or unset.
1203
1204llll. In Posix mode, the shell exits if a variable assignment fails and precedes
1205 an empty simple command (after expansion).
1206
1207mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to
1208 drop characters.
1209
1210nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal
1211 due to Linux pid namespace peculiarities.
1212
1213oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for
1214 `bind -x' commands.
1215
1216pppp. Fixed a bug that could cause SIGINT recursion when running an external
1217 command in a trap the shell takes after a command exits due to SIGINT.
1218
1219qqqq. Make sure the shell turns off job control before running the command-
1220 not-found handle, so the command doesn't try to manipulate process
1221 groups.
1222
1223rrrr. Fixed a problem with timing process substitutions that caused the shell
1224 to print timing information for the calling command.
1225
1226ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark
1227 the delimiter as quoted (inhibiting expansion of the here-document
1228 contents).
1229
1230tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and
1231 conditional command pattern matches.
1232
1233uuuu. Fixed a bug that could cause the pattern matching engine to not recognize
1234 locale-specific character classes.
1235
1236vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently.
1237
1238wwww. The `globstar' code now skips over symbolic links to directories,
1239 preventing them from being scanned twice.
1240
1241xxxx. When running `bind -x' commands, bash now sets READLINE_POINT based on
1242 the number of characters in the readline line buffer, not the number of
1243 bytes.
1244
1245yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN
1246 trap when using `eval return'.
1247
1248zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document.
1249
1250aaaaa. The process substitution code now closes and unlinks FIFOs when the
1251 process on the other side exits, in order to prevent SIGPIPE or
1252 waiting until a FIFO opened for read has a writer.
1253
1254bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in
1255 an {id}>foo construct.
1256
1257ccccc. After a Posix discussion, the pattern matching engine just skips over
1258 invalid character classes in bracket expressions, instead of matching
1259 them like individual characters in the expression.
1260
1261ddddd. Fixed a posix-mode problem with variable scoping when creating variables
1262 from assignment statements preceding special builtins.
1263
1264eeeee. Fixed a bug that could cause patterns containing backslashes to not be
1265 run through the pattern matching engine.
1266
1267fffff. Fixed a bug that could cause redirections to compound commands to not
1268 be `undone' if the file descriptor in the redirection was closed when
1269 the redirection was initially processed.
1270
1271ggggg. Fixed a bug that could cause buffer corruption when using `bind -x' in
1272 a command execute as a result of a key binding installed by `bind -x'.
1273
12742. Changes to Readline
1275
1276a. Added a guard to prevent nested macros from causing an infinite expansion
1277 loop.
1278
1279b. Instead of allocating enough history list entries to hold the maximum list
1280 size, cap the number allocated initially.
1281
1282c. Added a strategy to avoid allocating huge amounts of memory if a block of
1283 history entries without timestamps occurs after a block with timestamps.
1284
1285d. Added support for keyboard timeouts when an ESC character is the last
1286 character in a macro.
1287
1288e. There are several performance improvements when in a UTF-8 locale.
1289
1290f. Readline does a better job of preserving the original set of blocked
1291 signals when using pselect() to wait for input.
1292
1293g. Fixed a bug that caused multibyte characters in macros to be mishandled.
1294
1295h. Fixed several bugs in the code that calculates line breaks when expanding
1296 prompts that span several lines, contain multibyte characters, and contain
1297 invisible character seqeuences.
1298
1299i. Fixed several bugs in cursor positioning when displaying lines with prompts
1300 containing invisible characters and multibyte characters.
1301
1302j. When performing case-insensitive completion, Readline no longer sorts the
1303 list of matches unless directed to do so.
1304
1305k. Fixed a problem with key sequences ending with a backslash.
1306
1307l. Fixed out-of-bounds and free memory read errors found via fuzzing.
1308
1309m. Fixed several cases where the mark was set to an invalid value.
1310
1311n. Fixed a problem with the case-changing operators in the case where the
1312 lower and upper case versions of a character do not have the same number
1313 of bytes.
1314
1315o. Handle incremental and non-incremental search character reads returning EOF.
1316
1317p. Handle the case where a failing readline command at the end of a multi-key
1318 sequence could be misinterpreted.
1319
1320q. The history library now prints a meaningful error message if the history
1321 file isn't a regular file.
1322
1323r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace
1324 a multibyte character.
1325
1326s. The key binding code now attempts to remove a keymap if a key unbinding
1327 leaves it empty.
1328
1329t. Fixed a line-wrapping issue that caused problems for some terminal
1330 emulators.
1331
1332u. If there is a key bound to the tty's VDISCARD special character, readline
1333 disables VDISCARD while it is active.
1334
1335v. Fixed a problem with exiting bracketed paste mode on terminals that assume
1336 the bracketed paste mode character sequence contains visible characters.
1337
1338w. Fixed a bug that could cause a key binding command to refer to an
1339 uninitialized variable.
1340
13413. New Features in Bash
1342
1343a. The `wait' builtin can now wait for the last process substitution created.
1344
1345b. There is an EPOCHSECONDS variable, which expands to the time in seconds
1346 since the Unix epoch.
1347
1348c. There is an EPOCHREALTIME variable, which expands to the time in seconds
1349 since the Unix epoch with microsecond granularity.
1350
1351d. New loadable builtins: rm, stat, fdflags.
1352
1353e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment.
1354
1355f. When supplied a numeric argument, the shell-expand-line bindable readline
1356 command does not perform quote removal and suppresses command and process
1357 substitution.
1358
1359g. `history -d' understands negative arguments: negative arguments offset from
1360 the end of the history list.
1361
1362h. The `name' argument to the `coproc' reserved word now undergoes word
1363 expansion, so unique coprocs can be created in loops.
1364
1365i. A nameref name resolution loop in a function now resolves to a variable by
1366 that name in the global scope.
1367
8868edaf 1368j. The `wait' builtin now has a `-f' option, which signifies to wait until the
d233b485
CR
1369 specified job or process terminates, instead of waiting until it changes
1370 state.
1371
1372k. There is a define in config-top.h that allows the shell to use a static
1373 value for $PATH, overriding whatever is in the environment at startup, for
1374 use by the restricted shell.
1375
1376l. Process substitution does not inherit the `v' option, like command
1377 substitution.
1378
1379m. If a non-interactive shell with job control enabled detects that a foreground
1380 job died due to SIGINT, it acts as if it received the SIGINT.
1381
1382n. The SIGCHLD trap is run once for each exiting child process even if job
1383 control is not enabled when the shell is in Posix mode.
1384
1385o. A new shopt option: localvar_inherit; if set, a local variable inherits the
1386 value of a variable with the same name at the nearest preceding scope.
1387
1388p. `bind -r' now checks whether a key sequence is bound before binding it to
1389 NULL, to avoid creating keymaps for a multi-key sequence.
1390
1391q. A numeric argument to the line editing `operate-and-get-next' command
1392 specifies which history entry to use.
1393
1394r. The positional parameters are now assigned before running the shell startup
1395 files, so startup files can use $@.
1396
1397s. There is a compile-time option that forces the shell to disable the check
1398 for an inherited OLDPWD being a directory.
1399
1400t. The `history' builtin can now delete ranges of history entries using
1401 `-d start-end'.
1402
1403u. The `vi-edit-and-execute-command' bindable readline command now puts readline
1404 back in vi insertion mode after executing commands from the edited file.
1405
1406v. The command completion code now matches aliases and shell function names
1407 case-insensitively if the readline completion-ignore-case variable is set.
1408
1409w. There is a new `assoc_expand_once' shell option that attempts to expand
1410 associative array subscripts only once.
1411
1412x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended
1413 debugging mode is active. The old behavior of unconditionally setting them
1414 is available as part of the shell compatibility options.
1415
1416y. The `umask' builtin now allows modes and masks greater than octal 777.
1417
1418z. The `times' builtin now honors the current locale when printing a decimal
1419 point.
1420
1421aa. There is a new (disabled by default, undocumented) shell option to enable
1422 and disable sending history to syslog at runtime.
1423
14244. New Features in Readline
1425
1426a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
1427 Posix specifies (uses fnmatch(3) if available).
1428
1429b. There are new `next-screen-line' and `previous-screen-line' bindable
1430 commands, which move the cursor to the same column in the next, or previous,
1431 physical line, respectively.
1432
1433c. There are default key bindings for control-arrow-key key combinations.
1434
1435d. A negative argument (-N) to `quoted-insert' means to insert the next N
1436 characters using quoted-insert.
1437
1438e. New public function: rl_check_signals(), which allows applications to
1439 respond to signals that readline catches while waiting for input using
1440 a custom read function.
1441
1442f. There is new support for conditionally testing the readline version in an
1443 inputrc file, with a full set of arithmetic comparison operators available.
1444
1445g. There is a simple variable comparison facility available for use within an
1446 inputrc file. Allowable operators are equality and inequality; string
1447 variables may be compared to a value; boolean variables must be compared to
1448 either `on' or `off'; variable names are separated from the operator by
1449 whitespace.
1450
1451------------------------------------------------------------------------------
a0c0a00f
CR
1452This document details the changes between this version, bash-4.4-release, and
1453the previous version, bash-4.4-rc2.
1454
14551. Changes to Bash
1456
1457a. Fixed a bug that could potentially result in a crash due to an integer
1458 overflow.
1459
1460b. Fixed a bug in where commands printed due to `set -x' could be incorrectly
1461 quoted if being printed in contexts where they haven't yet been expanded.
1462
1463c. Fixed several memory leaks.
1464
1465d. Fixed a bug that could potentially cause the terminal attributes to be
1466 set incorrectly by a command run from a programmable completion.
1467
1468e. Fixed several potential buffer overflow issues in the word expansion code.
1469
14702. Changes to Readline
1471
14723. New Features in Bash
1473
14744. New Features in Readline
a0c0a00f
CR
1475------------------------------------------------------------------------------
1476This document details the changes between this version, bash-4.4-rc2, and
1477the previous version, bash-4.4-beta2.
1478
14791. Changes to Bash
1480
1481a. Fixed an out-of-bounds read in the redirection operator completion code.
1482
1483b. Fixed execution context so `until continue' doesn't disable execution for
1484 subsequent commands.
1485
1486c. Fixed trap handling code so traps don't inherit a command's temporary
1487 environment.
1488
1489d. Fixed a bug that resulted in incorrect line numbers when a function is
1490 defined as part of another function's execution.
1491
1492e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting
1493 is not performed and $IFS is not the default.
1494
1495f. Fixed a bug that caused ''"$@" to not expand to an empty argument when
1496 there are no positional parameters.
1497
1498g. Fixed a bug that caused a shell compiled without job control to use the
1499 incorrect exit status for builtin commands preceded by a command executed
1500 from the file system that causes the shell to call waitpid().
1501
1502h. Improved word completion for quoted strings containing unterminated command
1503 substitutions with embedded double quotes.
1504
15052. Changes to Readline
1506
1507a. Fixed a bug that caused mode strings to be displayed incorrectly if the
1508 prompt was shorter than the mode string.
1509
15103. New Features in Bash
1511
1512a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
1513 the nounset option is enabled no longer throws an unbound variable error.
1514
15154. New Features in Readline
1516
1517a. New application-callable function: rl_pending_signal(): returns the signal
1518 number of any signal readline has caught but not yet handled.
1519
1520b. New application-settable variable: rl_persistent_signal_handlers: if set
1521 to a non-zero value, readline will enable the readline-6.2 signal handler
1522 behavior in callback mode: handlers are installed when
1523 rl_callback_handler_install is called and removed removed when a complete
1524 line has been read.
1525
1526------------------------------------------------------------------------------
1527This document details the changes between this version, bash-4.4-beta2, and
1528the previous version, bash-4.4-rc1.
1529
15301. Changes to Bash
1531
1532a. Fixed a memory leak when processing ${!var[@]}.
1533
1534b. Fixed a bug that caused subshells to free trap strings associated with
1535 inherited signals.
1536
1537c. Inheriting BASHOPTS from the environment now works to force actions
1538 associated with enabling an option, instead of just marking the option
1539 as enabled.
1540
1541d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
1542 restricted mode.
1543
1544e. Fixed a bug caused by an accidental omission of part of the original patch
1545 for EXECIGNORE.
1546
1547e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
1548
1549f. Fixed a bug that caused parsing errors in command substitutions with
1550 consecutive case statements separated by newlines.
1551
1552g. Updated logic used to decide whether bash is running inside an emacs
1553 terminal emulator to work with future emacs versions.
1554
1555h. Fixed two extended pattern matching bugs caused by premature short-
1556 circuiting.
1557
1558i. Fixed a memory leak in the code that removes duplicate history entries.
1559
1560j. There are a number of bug fixes to coproc, mapfile, declare, unset,
1561 and assignment statements that prevent nameref variables from creating
1562 and unsetting variables with invalid names.
1563
1564k. Fixed a bug that caused variables to be inadvertently marked as both an
1565 associative and an indexed array.
1566
1567l. Fixed a bug that caused `bash -c' to not run a trap specified in the
1568 command string.
1569
1570j. There are a number of bug fixes to coproc, mapfile, declare, and assignment
1571 statements that prevent nameref variables from overwriting or modifying
1572 attributes of readonly variables.
1573
1574k. Fixed a bug that caused command substitution to attempt to set the
1575 terminal's process group incorrectly.
1576
1577l. Fixed a bug that could cause prompt string expansion to display error
1578 messages when the `nounset' shell option is set.
1579
1580m. Fixed a bug that caused "$@" to not expand to an empty string under the
1581 circumstances when Posix says it should ("${@-${@-$@}}").
1582
1583n. Fixed several bugs caused by referencing nameref variables whose values
1584 are names of unset variables (or names that are valid for referencing
1585 but not assignment), including creating variables in the temporary
1586 environment.
1587
1588o. Function tracing and error tracing are disabled if --debugger is supplied
1589 at startup but the shell can't find the debugger start file.
1590
1591p. Fixed a bug when IFS is used as the control variable in a for statement.
1592
1593q. Fixed a bug with SIGINT received by a command substitution in an interactive
1594 shell.
1595
1596r. The checks for nameref variable self-references are more thorough.
1597
1598s. Fixed several bugs with multi-line aliases.
1599
1600t. Fixed `test' to handle the four-argument case where $1 == '(' and
1601 $4 == ')'.
1602
1603u. Fixed a bug in the expansion of $* in the cases where word splitting is
1604 not performed.
1605
1606v. Fixed a bug in execution of case statements where IFS includes the
1607 pattern matching characters.
1608
16092. Changes to Readline
1610
1611a. When refreshing the line as the result of a key sequence, Readline attempts
1612 to redraw only the last line of a multiline prompt.
1613
1614b. Fixed an issue that caused completion of git commands to display
1615 incorrectly when using colored-completion-prefix.
1616
1617c. Fixed several redisplay bugs having to do with multibyte characters and
1618 invisible characters in prompt strings.
1619
16203. New Features in Bash
1621
1622a. Value conversions (arithmetic expansions, case modification, etc.) now
1623 happen when assigning elements of an array using compound assignment.
1624
1625b. There is a new option settable in config-top.h that makes multiple
1626 directory arguments to `cd' a fatal error.
1627
1628c. Bash now uses mktemp() when creating internal temporary files; it produces
1629 a warning at build time on many Linux systems.
1630
16314. New Features in Readline
1632
1633a. The default binding for ^W in vi mode now uses word boundaries specified
1634 by Posix (vi-unix-word-rubout is bindable command name).
1635
1636b. rl_clear_visible_line: new application-callable function; clears all
1637 screen lines occupied by the current visible readline line.
1638
1639c. rl_tty_set_echoing: application-callable function that controls whether
1640 or not readline thinks it is echoing terminal output.
1641
1642d. Handle >| and strings of digits preceding and following redirection
1643 specifications as single tokens when tokenizing the line for history
1644 expansion.
1645
1646e. Fixed a bug with displaying completions when the prefix display length
1647 is greater than the length of the completions to be displayed.
1648
1649f. The :p history modifier now applies to the entire line, so any expansion
1650 specifying :p causes the line to be printed instead of expanded.
1651
1652------------------------------------------------------------------------------
1653This document details the changes between this version, bash-4.4-rc1, and
1654the previous version, bash-4.4-beta.
1655
16561. Changes to Bash
1657
1658a. Fixed several problems with bash completion not special-casing bash syntax
1659 constructs.
1660
1661b. Fixed a bug that caused the mapfile builtin to not create array variables
1662 when a variable of the same name appears in the temporary environment.
1663
1664c. Fixed a bug that caused prompt expansion to loop when PS1 contained a
1665 syntax error.
1666
1667d. Fixed a bug that caused the ${array[@]@A} expansion to split the results
1668 even when double-quoted.
1669
1670e. There is a new implementation of the code that saves the last CHILD_MAX
1671 exited background pids so their status can be queried later.
1672
1673f. Bash-4.4 can now be configured and built on very old versions of Solaris 2.
1674
1675g. Fixed problems with --help support for several builtins.
1676
1677h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited
1678 from the environment.
1679
1680i. Fixed a bug that caused background processes run from non-interactive shells
1681 with job control enabled to place the terminal in the wrong process group
1682 under certain circumstances.
1683
1684j. Fixed a bug that caused `fc' to return an incorrect exit status when
1685 executing commands from the history list.
1686
1687k. Fixed a bug that caused the shell to exit when a process substitution
1688 received a SIGINT when run in certain terminal emulators.
1689
1690l. EXECIGNORE now honors the setting of `extglob' when attempting to match
1691 executable names.
1692
1693m. Fixed a bug where `return' used the wrong exit status when executed in a
1694 DEBUG trap.
1695
1696n. Fixed a bug that caused a command containing a here-document and an escaped
1697 newline to be stored in the history list incorrectly.
1698
1699o. Fixed a bug that caused set -e to be honored in cases of builtins invoking
1700 other builtins when it should be ignored.
1701
1702p. Fixed a bug that caused `readonly' and `export' to create local array
1703 variables when used within shell functions.
1704
1705q. Fixed a bug that allowed subshells begun to execute process substitutions
1706 to have access to the command's temporary environment.
1707
1708r. Fixed a bug that could cause the shell to dump core when receiving a
1709 SIGCHLD for which a trap has been set while running in posix mode.
1710
1711s. Fixed a bug that caused bash to not restore BASH_ARGC, BASH_ARGV,
1712 BASH_SOURCE, BASH_LINENO, and FUNCNAME if the shell received a SIGINT
1713 while reading commands from a file while executing `.'.
1714
1715t. Fixed a bug that caused the `-o history' option to have no effect when
1716 supplied on the command line when starting a new shell.
1717
1718u. Fixed a bug that caused history expansions occurring in command
1719 substitutions to not be performed.
1720
1721v. Fixed a bug that caused `eval' run in a non-interactive shell to disable
1722 history expansion for the remainder of the shell script, even if the script
1723 had previously enabled it.
1724
1725w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set
1726 to the empty string.
1727
1728x. Fixed a bug that caused process and command substitution to inherit output
1729 buffered in the stdio library but not written.
1730
1731y. Fixed a bug that caused a terminating signal received during `echo' to run
1732 an exit trap in a signal handler context.
1733
1734z. Fixed a bug that caused a builtin command containing a process substitution
1735 to return the wrong exit status.
1736
1737aa. Fixed a bug that caused `()' subshells with piped input to incorrectly
1738 redirect the standard input of some of the commands in the subshell from
1739 /dev/null.
1740
1741bb. The history builtin now uses more descriptive error messages for missing or
1742 invalid timestamps.
1743
17442. Changes to Readline
1745
1746a. The history file writing functions only attempt to create and use a backup
1747 history file if the history file exists and is a regular file.
1748
1749b. Fixed an out-of-bounds read in readline's internal tilde expansion
1750 interface.
1751
1752c. Fixed several redisplay bugs with prompt strings containing multibyte
1753 and non-visible characters whose physical length is longer than the screen
1754 width.
1755
1756d. Fixed a redisplay bug with prompt strings containing invisible characters
1757 whose physical length exceeds the screen width and using incremental search.
1758
1759e. Readline prints more descriptive error messages when it encounters errors
1760 while reading an inputrc file.
1761
1762f. Fixed a bug in the character insertion code that attempts to optimize
1763 typeahead when it reads a character that is not bound to self-insert and
1764 resets the key sequence state.
1765
17663. New Features in Bash
1767
1768a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
1769 environment.
1770
1771b. inherit_errexit: a new `shopt' option that, when set, causes command
1772 substitutions to inherit the -e option. By default, those subshells disable
1773 -e. It's enabled as part of turning on posix mode.
1774
1775c. New prompt string: PS0. Expanded and displayed by interactive shells after
1776 reading a complete command but before executing it.
1777
1778d. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to
1779 SIG_DFL when the shell is started, so they are set to SIG_DFL in child
1780 processes.
1781
1782e. Posix-mode shells now allow double quotes to quote the history expansion
1783 character.
1784
1785f. OLDPWD can be inherited from the environment if it names a directory.
1786
1787g. Shells running as root no longer inherit PS4 from the environment, closing
1788 a security hole involving PS4 expansion performing command substitution.
1789
1790h. If executing an implicit `cd' when the `autocd' option is set, bash will
1791 now invoke a function named `cd' if one exists before executing the `cd'
1792 builtin.
1793
17944. New Features in Readline
1795
1796a. If an incremental search string has its last character removed with DEL,
1797 the resulting empty search string no longer matches the previous line.
1798
1799b. If readline reads a history file that begins with `#' (or the value of
1800 the history comment character) and has enabled history timestamps, the
1801 history entries are assumed to be delimited by timestamps. This allows
1802 multi-line history entries.
1803
1804c. Readline now throws an error if it parses a key binding without a
1805 terminating `:' or whitespace.
1806
1807------------------------------------------------------------------------------
1808This document details the changes between this version, bash-4.4-beta, and
1809the previous version, bash-4.4-alpha.
1810
18111. Changes to Bash
1812
1813a. Fixed two bugs that caused out-of-bounds reads when skipping over assignment
1814 statements while finding the word on which to perform programmable
1815 completion.
1816
1817b. Fixed a memory leak in programmable completion.
1818
1819c. Fixed a bug that could cause the shell to crash when interrupting the
1820 wait builtin.
1821
1822d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new
1823 `@' operator.
1824
1825e. Fixed a bug that caused the && and || operators to be incorrectly optimized.
1826
1827f. The shell now undoes redirections before exiting the shell when the `-e'
1828 option is enabled, and a shell function fails.
1829
1830g. History expansion now skips over the history expansion character in command
1831 and process substitution.
1832
1833h. Fixed a bug that caused stray '\001' characters to be added to the output
1834 of `declare -p'.
1835
1836i. Fixed a memory leak when processing declare commands that perform compound
1837 array assignments.
1838
1839j. Fixed a bug that could cause the shell to crash when reading input from a
1840 file and the limit on open file descriptors is high.
1841
1842k. Fixed a bug that caused the ERR and RETURN traps to be unset if they were
1843 set in a shell function but unset previously.
1844
1845l. Fixed a bug that caused several signals to be ignored if `exec' failed in
1846 an interactive shell.
1847
1848m. A posix-mode non-interactive shell now considers a parameter expansion error
1849 to be a fatal error.
1850
1851n. The `time' command now prints timing statistics for failed commands when
1852 the -e option is enabled.
1853
1854o. Fixed a bug that caused the shell to crash when attempting to indirectly
1855 expand a shell variable with an invalid name.
1856
1857p. Fixed a bug that caused the shell to crash when running a trap containing
1858 a process substitution.
1859
1860q. Bash now prints the keyword `function' before a function with the same name
1861 as a reserved word when using `declare -f' to avoid parse errors when
1862 reusing the output as input.
1863
1864r. Fixed a bug that caused the shell to crash when using declare -g to attempt
1865 to redefine an existing global indexed array variable as an associative
1866 array.
1867
1868s. Fixed a memory leak that occurred when interrupting brace expansions
1869 generating a sequence.
1870
1871t. Fixed a bug that resulted in alias expansion in redirections.
1872
1873u. The `declare -a' and `declare -A' commands now print fewer warnings when
1874 attempting to create and initialize an array at the same time, but
1875 relying on word expansions to construct the compound assignment.
1876
1877v. The `help' builtin now behaves better in locales where each wide
1878 character occupies more than one display column.
1879
1880w. The `read' builtin no longer has a possible race condition when a timeout
1881 occurs.
1882
1883x. Fixed several expansion problems encountered when IFS="'".
1884
1885y. Fixed a problem with the expansion of $'\c?'.
1886
1887z. Bash no longer splits the expansion of here-strings, as the documentation
1888 has always said.
1889
1890aa. Bash now puts `s' in the value of $- if the shell is reading from standard
1891 input, as Posix requires.
1892
1893bb. Fixed a bug that caused the shell to crash if invoked with a NULL
1894 environment.
1895
1896cc. The shell now only trusts an inherited value for $PWD if it begins with a
1897 `/'.
1898
1899dd. Fixed a memory leak when creating local array variables and assigning to
1900 them using compound assignment with the `declare' builtin.
1901
1902ee. Fixed a bug that could cause the shell to crash when processing nested here
1903 documents inside a command substitution.
1904
1905ff. Array keys and values are now displayed using $'...' quoting where
1906 appropriate.
1907
1908gg. Fixed a bug that could cause the shell to crash if the replacement string
1909 in pattern substitution was NULL.
1910
1911hh. Fixed a bug that could cause the shell to crash if a command substitution
1912 contained a non-fatal syntax error.
1913
1914ii. Fixed a bug that could cause the shell to crash if variable indirection
1915 resulted in a NULL variable.
1916
1917jj. Fixed a bug that could cause the shell to crash if a long string contained
1918 multiple unterminated parameter expansion constructs.
1919
1920kk. Improved the code that acts on SIGINT received while waiting for a child
1921 process only if the child exits due to SIGINT.
1922
1923ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple
1924 commands.
1925
19262. Changes to Readline
1927
1928a. Colored completion prefixes are now displayed using a different color, less
1929 likely to collide with files.
1930
1931b. Fixed a bug that caused vi-mode character search to misbehave when
1932 running in callback mode.
1933
1934c. Fixed a bug that caused output to be delayed when input is coming from a
1935 macro in vi-mode.
1936
1937d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
1938 a multi-key key sequence via a macro.
1939
1940e. Fixed a bug that caused problems with applications that supply their own
1941 input function when performing completion.
1942
1943f. When read returns -1/EIO when attempting to read a key, return an error
1944 instead of line termination back to the caller.
1945
1946g. Updated tty auditing feature based on patch from Red Hat.
1947
1948h. Fixed a bug that could cause the history library to crash on overflows
1949 introduced by malicious editing of timestamps in the history file.
1950
19513. New Features in Bash
1952
1953a. `make install' now installs the example loadable builtins and a set of
1954 bash headers to use when developing new loadable builtins.
1955
1956b. `enable -f' now attempts to call functions named BUILTIN_builtin_load when
1957 loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows
1958 loadable builtins to run initialization and cleanup code.
1959
1960c. There is a new BASH_LOADABLES_PATH variable containing a list of directories
1961 where the `enable -f' command looks for shared objects containing loadable
1962 builtins.
1963
1964d. The `complete_fullquote' option to `shopt' changes filename completion to
1965 quote all shell metacharacters in filenames and directory names.
1966
1967e. The `kill' builtin now has a `-L' option, equivalent to `-l', for
1968 compatibility with Linux standalone versions of kill.
1969
19704. New Features in Readline
1971------------------------------------------------------------------------------
1972This document details the changes between this version, bash-4.4-alpha, and
1973the previous version, bash-4.3-release.
1974
19751. Changes to Bash
1976
1977a. A bug that caused pipelines to be corrupted while running the DEBUG trap
1978 was fixed.
1979
1980b. A bug that accidentally omitted the `-R' unary operator from `test' was
1981 fixed.
1982
1983c. A bug that could cause the shell to not restore the terminal's process
1984 group on shell exit was fixed.
1985
1986d. Several changes were made to programmable completion to accommodate
1987 assumptions made by the bash-completion package.
1988
1989e. Bash no longer inhibits C-style escape processing ($'...') while performing
1990 pattern substitution word expansions.
1991
1992f. Fixed a bug that caused `return' executed from a trap handler to use the
1993 wrong return status when one was not supplied as an argument.
1994
1995g. In Posix mode, defining a function with the same name as a special
1996 builtin is now an error, fatal only when the shell is not interactive.
1997
1998h. Fixed a bug that caused compound array assignments to discard unset or null
1999 variables used as subscripts, thereby making it appear as if the index was
2000 not present.
2001
2002i. Fixed a bug that caused extended glob patterns to incorrectly match
2003 filenames with a leading `.'.
2004
2005j. Fixed a bug involving sign extension when reallocating the input line
2006 after a history expansion, causing segmentation faults.
2007
2008k. Bash now does a better job at identifying syntax errors during word
2009 completion and tailoring completion appropriately.
2010
8868edaf 2011l. Bash now uses the current locale's decimal point in command timing output.
a0c0a00f
CR
2012
2013m. Fixed a bug that caused segmentation faults while reading here documents if
2014 PS2 contains a command substitution.
2015
2016n. There are several changes to how $@ is expanded when unquoted but in a
2017 context where word splitting is not performed (e.g., on the rhs of an
2018 assignment or in a conditional command).
2019
2020o. Bash now quotes command hash table entries that contain shell metacharacters
2021 when displaying hash table contents.
2022
2023p. Fixed a potential file descriptor leak when dup2() fails while performing a
2024 redirection.
2025
2026q. Fixed a bug that caused directory names evaluated during word completion to
2027 be dequoted twice.
2028
2029r. Fixed several bugs which could result in indirect variable expansion and
2030 namerefs creating variables with invalid names or referencing variables
2031 set to the empty string.
2032
2033s. Fixed a bug that caused bash to not expand $0 in word expansions where it
2034 should.
2035
2036t. Fixed a bug that caused bash to perform process substitution if <(
2037 appeared inside an arithmetic context.
2038
2039u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern
2040 to be confused as directory names.
2041
2042v. Fixed several bugs with treatment of invisible variables (variables with
2043 attributes that are unset because they have never been assigned values).
2044
2045w. Fixed a bug that caused the `read' builtin to not clean up readline's
2046 state when using the -e and -t options together and the read timed out.
2047
2048x. Fixed a bug that caused the shell to exit with the wrong (but non-zero)
2049 value if a command was not found or was not executable.
2050
2051y. Fixed a bug that caused the `time' reserved word to not be recognized as
2052 such in all contexts where it should have been.
2053
8868edaf 2054z. Fixed a bug that caused the shell to close process substitution file
a0c0a00f
CR
2055 descriptors when executing a script without the `#!' leading line.
2056
2057aa. Fixed a typo that caused the `compat42' shell option to set the wrong
2058 compatibility level.
2059
2060bb. The shell now handles process substitution commands with embedded
2061 parentheses the same way as it does when parsing command substitution.
2062
2063cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option
2064 to produce core dumps.
2065
2066dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases
2067 where slashes must be matched explicitly.
2068
2069ee. Fixed a problem with patterns containing `:' in colon-separated variables
2070 like GLOBIGNORE.
2071
2072ff. Fixed a bug that caused indirect variable expansion using indexed arrays to
2073 always use index 0.
2074
2075gg. Fixed a parsing problem that caused quoted newlines immediately following a
2076 command substitution to be mishandled in certain cases.
2077
2078hh. Fixed a potential buffer overflow on systems without locale_charset or the
2079 bash replacement.
2080
2081ii. Fixed a bug that caused background processes to modify the terminal's
2082 process group under certain circumstances.
2083
2084jj. Asynchronous commands now always set $? to 0 and are not affected by
2085 whether or not the command's exit status is being inverted.
2086
2087kk. Fixed a problem that caused a line ending with an escaped newline and
2088 containingh a prior `eval' to be incorrectly parsed.
2089
2090ll. Fixed an issue with programmable completion and `!' in extglob patterns
2091 used as arguments to `compgen -X'.
2092
2093mm. Word completion now treats the two-character token `>|' as requiring
2094 filename expansion.
2095
2096nn. Bash no longer expands tildes in $PATH elements while in Posix mode.
2097
2098oo. Fixed a bug that caused bash to not clean up readline's state, including
2099 the terminal settings, if it received a fatal signal while in a readline()
2100 call (including `read -e' and `read -s').
2101
2102pp. Fixed bug that caused importing shell functions from the environment to
2103 execute additional commands following the function.
2104
2105qq. Fixed a bug that caused the parser to return a lookahead character pushed
2106 back by a previous call, even when on another line.
2107
2108rr. Fixed a bug that caused many here-documents or many nested case statements
2109 to overflow an internal stack.
2110
2111ss. Changed the way bash encodes exported functions for inclusion in the
2112 environment to avoid name collisions with valid variable names and to
2113 indicate that they are exported functions.
2114
2115tt. Fixed a bug that could result in an invalid memory access when processing
2116 a here document delimited by end of file or end of string.
2117
2118uu. Fixed a bug that could cause an invalid memory access if a command was run
2119 before initializing the job control framework.
2120
2121vv. When in Posix mode, bash prints shell function definitions as Posix
2122 specifies them, without the leading `function' keyword.
2123
2124ww. The variable attribute display builtins no longer display variables with
2125 invalid names that were imported from the environment.
2126
2127xx. Fixed a bug that could allow `break' or `continue' executed from shell
2128 functions to affect loops running outside of the function.
2129
2130yy. Fixed a bug that could cause a restricted shell to attempt to import shell
2131 functions from the environment.
2132
2133zz. The shell now allows double-quoted identifiers in arithmetic expressions.
2134
2135aaa. Fixed a bug that could allow scalar variables subscripted using [@] in
2136 word expansions to be incorrectly quoted.
2137
2138bbb. The shell now makes sure to ignore SIGTSTP/SIGTTIN/SIGTTOU in child
2139 processes if they were ignored at shell startup, even if job control is
2140 in effect.
2141
2142ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to
2143 the empty string.
2144
2145ddd. Posix says that expanding $* in a pattern context where the expansion is
2146 double-quoted should not treat $* as if it were double quoted.
2147
2148eee. Bash now restores getopts' internal state between calls to getopts even if
2149 a shell function declares a local copy of OPTIND.
2150
2151fff. Fixed a bug that could cause `history -r' or `history -n' to read identical
2152 lines from the history file more than once.
2153
2154ggg. The commands executed by `bind -x' now redisplay at most the final line
2155 of a multi-line prompt, and those commands may return 124 to indicate that
2156 the entire prompt should be redrawn.
2157
2158hhh. Fixed a bug that could cause `mapfile' to create variables with invalid
2159 names.
2160
2161iii. The shell only goes into debugging mode when --debugger is supplied if
2162 the debugger initialization file is present.
2163
2164jjj. Fixed a bug that disallowed an assignment to (implicit) subscript 0 of an
2165 existing array in a declare command that set the readonly attribute.
2166
2167kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable
2168 its special status.
2169
2170lll. Appending to an existing array variable using the compound assignment
2171 syntax (var+=(aaa)) should not affect assignments to existing subscripts
2172 appearing in the compound assignment.
2173
2174mmm. Fixed a bug that could cause the shell to crash when a variable with a
2175 null value was passed in the temporary environment and the variable's
2176 attributes are modified using `declare' while performing a redirection.
2177
2178nnn. Fixed a bug in printf so that a missing precision specifier after a `.'
2179 is treated as 0.
2180
2181ooo. Fixed a bug that attempted to use the internal command timing to time
2182 pipeline components if the pipeline elements are separated by newlines.
2183
2184ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase
2185 the values on assignment.
2186
2187qqq. Bash does a better job of determining whether or not files are executable
2188 when running on Windows, since the X_OK flag to access(2) is not supported.
2189
2190rrr. Fixed a bug that caused some of the shell's internal traps (e.g., ERR) to
2191 be interrupted (and leave incorrect state) by pending SIGINTs.
2192
2193sss. Fixed a bug in the bash interface to history expansion to avoid attempting
2194 expansion if the history expansion character occurs in a command
2195 substitution.
2196
2197ttt. Fixed a bug that caused the select command to crash if the REPLY variable
2198 ends up empty (e.g., if it's made readonly)
2199
2200uuu. Bash handles backslash-quoting of multibyte characters better when quoting
2201 output that is intended to be reused.
2202
2203vvv. System-specific changes for: Windows, Cygwin.
2204
2205www. Fixes for upper and lower-casing multibyte characters, some locales have
2206 characters whose upper and lowercase versions have different numbers of
2207 bytes.
2208
2209xxx. Fixed a bug that caused the ERR trap in a shell function to have the
2210 wrong value for $LINENO.
2211
2212yyy. Fixed a bug that resulted in incorrect quoting of regexps for the =~
2213 operator when an open brace appears without a close brace.
2214
2215zzz. Fixed a bug in the array unset operation that caused it to attempt to
2216 parse embedded single and double quotes.
2217
2218aaaa. Fixed a bug that caused $* to not expand with the first character of
2219 $IFS as a separator in a context where word splitting will not take
2220 place.
2221
2222bbbb. Fixed two bugs that could cause the shell to dereference a null pointer
2223 while attempting to print an error message from arithmetic expansion.
2224
2225cccc. Fixed a bug that resulted in short-circuited evaluation when reading
2226 commands from a string ending in an unquoted backslash, or when sourcing
2227 a file that ends with an unquoted backslash.
2228
2229dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up
2230 any FIFOs created by process substitution.
2231
2232eeee. If the -T option is not set, allow the source builtin and shell functions
2233 to set a DEBUG trap that persists after the sourced file or function
2234 returns, instead of restoring the old (unset) value unconditionally.
2235
2236ffff. Fixed a bug that caused redirections to not be undone on some syntax
2237 errors, e.g., when parsing a command substitution.
2238
2239gggg. Bash only adds asynchronous commands to the table of background pids
2240 whose status it remembers, to avoid it growing too large during scripts
2241 that create and reap large numbers of child processes. This means that
2242 `wait' no longer works on synchronous jobs, but $? can be used to get
2243 the exit status in those cases.
2244
2245hhhh. Bash now checks whether or not a shell script argument is a directory
2246 before trying to open it; Posix says implementations may allow open(2)
2247 on a directory.
2248
2249iiii. Fixed a bug that could cause the shell to set the terminal's process
2250 group to a background process group when running as part of a pipeline.
2251
2252jjjj. Made a few changes to strings to avoid possible potential negative effects
2253 caused by malicious translations.
2254
2255kkkk. Fixed a bug that caused the `unset' builtin to continue to treat its
2256 arguments as functions after unsetting a function when invoked with no
2257 options.
2258
2259llll. Fixed a bug that would not replace empty strings using pattern
2260 substitution even if the pattern matched the empty string.
2261
2262mmmm. Fixed a bug with word completion that prevented some characters from
2263 being backslash-quoted (backquote, dollar sign).
2264
2265nnnn. Fixed a bug that prevented a command from the history re-executed by the
2266 `fc' builtin from setting verbose mode.
2267
2268oooo. Fixed a bug that caused the shell to not enable and disable function
2269 tracing with changes to the `extdebug' shell option.
2270
2271pppp. Fixed a bug that caused assignments to nameref variables pointing to
2272 unset variables with attributes but no values to create variables with
2273 incorrect names.
2274
2275qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to
2276 unset the wrong variable under certain circumstances.
2277
2278rrrr. Fixed a bug that caused close braces occurring in brace expansions within
2279 command substitutions to incorrectly terminate parameter expansions.
2280
2281ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH.
2282
2283tttt. Fixed a bug that caused interactive shells compiled without job control
2284 to return incorrect status values for child processes when running a
2285 single command that creates enough children to use the entire PID space.
2286
2287uuuu. `esac' should not be recognized as a reserved word when it appears as the
2288 second or later pattern in a case statement pattern list.
2289
2290vvvv. Fixed a bug that caused the completion code to read past the end of the
2291 readline line buffer while skipping assignment statements to find the
2292 command name.
2293
2294wwww. Fixed a bug that caused case statements within loops contained in a
2295 command substitution to be parsed incorrectly.
2296
2297xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after
2298 running `wait' with no arguments and interrupting it with ^C without
2299 a trap handler installed.
2300
23012. Changes to Readline
2302
2303a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
2304 commands with modifiers was fixed.
2305
2306b. Fixed a bug that caused callback mode to dump core when reading a
2307 multiple-key sequence (e.g., arrow keys).
2308
2309c. Fixed a bug that caused the redisplay code to erase some of the line when
2310 using horizontal scrolling with incremental search.
2311
2312d. Readline's input handler now performs signal processing if read(2) is
2313 interrupted by SIGALRM or SIGVTALRM.
2314
2315e. Fixed a problem with revert-all-at-newline freeing freed memory.
2316
2317f. Clarified the documentation for the history_quotes_inhibit_expansion
2318 variable to note that it inhibits scanning for the history comment
2319 character and that it only affects double-quoted strings.
2320
2321g. Fixed an off-by-one error in the prompt printed when performing searches.
2322
2323h. Use pselect(2), if available, to wait for input before calling read(2), so
2324 a SIGWINCH can interrupt it, since it doesn't interrupt read(2).
2325
2326i. Some memory leaks caused by signals interrupting filename completion have
2327 been fixed.
2328
2329j. Reading EOF twice on a non-empty line causes EOF to be returned, rather
2330 than the partial line. This can cause partial lines to be executed on
2331 SIGHUP, for example.
2332
2333k. Fixed a bug concerning deleting multibyte characters from the search
2334 string while performing an incremental search.
2335
2336l. Fixed a bug with tilde expanding directory names in filename completion.
2337
2338m. Fixed a bug that did not allow binding sequences beginning with a `\'.
2339
2340n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
2341 contains a multibyte character in the last screen column.
2342
2343o. Fixed a bug that caused history expansion to disregard characters that are
2344 documented to delimit a history event specifier without requiring `:'.
2345
2346p. Fixed a bug that could cause reading past the end of a string when reading
2347 the value when binding the set of isearch terminators.
2348
2349q. Fixed a bug that caused readline commands that depend on knowing which
2350 key invoked them to misbehave when dispatching key sequences that are
2351 prefixes of other key bindings.
2352
2353r. Paren matching now works in vi insert mode.
2354
23553. New Features in Bash
2356
2357a. There is now a settable configuration #define that will cause the shell
2358 to exit if the shell is running setuid without the -p option and setuid
2359 to the real uid fails.
2360
2361b. Command and process substitutions now turn off the `-v' option when
2362 executing, as other shells seem to do.
2363
2364c. The default value for the `checkhash' shell option may now be set at
2365 compile time with a #define.
2366
2367d. The `mapfile' builtin now has a -d option to use an arbitrary character
2368 as the record delimiter, and a -t option to strip the delimiter as
2369 supplied with -d.
2370
2371e. The maximum number of nested recursive calls to `eval' is now settable in
2372 config-top.h; the default is no limit.
2373
2374f. The `-p' option to declare and similar builtins will display attributes for
2375 named variables even when those variables have not been assigned values
2376 (which are technically unset).
2377
2378g. The maximum number of nested recursive calls to `source' is now settable
2379 in config-top.h; the default is no limit.
2380
2381h. All builtin commands recognize the `--help' option and print a usage
2382 summary.
2383
2384i. Bash does not allow function names containing `/' and `=' to be exported.
2385
2386j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
2387
2388k. The shell now allows `time ; othercommand' to time null commands.
2389
2390l. There is a new `--enable-function-import' configuration option to allow
2391 importing shell functions from the environment; import is enabled by
2392 default.
2393
2394m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
2395 had been executed.
2396
2397n. GLOBIGNORE, the pattern substitution word expansion, and programmable
2398 completion match filtering now honor the value of the `nocasematch' option.
2399
2400o. There is a new ${parameter@spec} family of operators to transform the
2401 value of `parameter'.
2402
2403p. Bash no longer attempts to perform compound assignment if a variable on the
2404 rhs of an assignment statement argument to `declare' has the form of a
2405 compound assignment (e.g., w='(word)' ; declare foo=$w); compound
2406 assignments are accepted if the variable was already declared as an array,
2407 but with a warning.
2408
2409q. The declare builtin no longer displays array variables using the compound
2410 assignment syntax with quotes; that will generate warnings when re-used as
2411 input, and isn't necessary.
2412
2413r. Executing the rhs of && and || will no longer cause the shell to fork if
2414 it's not necessary.
2415
2416s. The `local' builtin takes a new argument: `-', which will cause it to save
2417 the single-letter shell options and restore their previous values at
2418 function return.
2419
2420t. `complete' and `compgen' have a new `-o nosort' option, which forces
2421 readline to not sort the completion matches.
2422
2423u. Bash now allows waiting for the most recent process substitution, since it
2424 appears as $!.
2425
2426v. The `unset' builtin now unsets a scalar variable if it is subscripted with
2427 a `0', analogous to the ${var[0]} expansion.
2428
2429w. `set -i' is no longer valid, as in other shells.
2430
2431x. BASH_SUBSHELL is now updated for process substitution and group commands
2432 in pipelines, and is available with the same value when running any exit
2433 trap.
2434
2435y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
2436 not bash is being run in a GNU Emacs shell window.
2437
2438z. Bash now treats SIGINT received when running a non-builtin command in a
2439 loop the way it has traditionally treated running a builtin command:
2440 running any trap handler and breaking out of the loop.
2441
2442aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
2443 cause matching filenames to be ignored when searching for commands.
2444
2445bb. Aliases whose value ends in a shell metacharacter now expand in a way to
2446 allow them to be `pasted' to the next token, which can potentially change
2447 the meaning of a command (e.g., turning `&' into `&&').
2448
24494. New Features in Readline
2450
8868edaf 2451a. The history truncation code now uses the same error recovery mechanism as
a0c0a00f
CR
2452 the history writing code, and restores the old version of the history file
2453 on error. The error recovery mechanism handles symlinked history files.
2454
2455b. There is a new bindable variable, `enable-bracketed-paste', which enables
2456 support for a terminal's bracketed paste mode.
2457
2458c. The editing mode indicators can now be strings and are user-settable
2459 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
2460 variables). Mode strings can contain invisible character sequences.
2461 Setting mode strings to null strings restores the defaults.
2462
2463d. Prompt expansion adds the mode string to the last line of a multi-line
2464 prompt (one with embedded newlines).
2465
2466e. There is a new bindable variable, `colored-completion-prefix', which, if
2467 set, causes the common prefix of a set of possible completions to be
2468 displayed in color.
2469
2470f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
2471 mode yank-pop.
2472
2473g. The redisplay code underwent several efficiency improvements for multibyte
2474 locales.
2475
2476h. The insert-char function attempts to batch-insert all pending typeahead
2477 that maps to self-insert, as long as it is coming from the terminal.
2478
2479i. rl_callback_sigcleanup: a new application function that can clean up and
2480 unset any state set by readline's callback mode. Intended to be used
2481 after a signal.
2482
2483------------------------------------------------------------------------------
ac50fbac
CR
2484This document details the changes between this version, bash-4.3-release, and
2485the previous version, bash-4.3-rc2.
2486
24871. Changes to Bash
2488
2489a. Only Posix-mode shells should exit on an assignment failure in the
2490 temporary environment preceding a special builtin. This is how it's been
2491 documented.
2492
2493b. Fixed a bug that caused a failed special builtin to not exit a posix-mode
2494 shell if the failing builtin was on the LHS of a && or ||.
2495
2496c. Changed the handling of unquoted backslashes in regular expressions to be
2497 closer to bash-4.2.
2498
2499d. globstar (**) no longer traverses symbolic links that resolve to
2500 directories. This eliminates some duplicate entries.
2501
2502e. Fixed a bug that caused a SIGCHLD trap handler to not be able to change the
2503 SIGCHLD disposition.
2504
2505f. Fixed a bug that caused a crash when -x was enabled and a command
2506 contained a printable multibyte (wide) character.
2507
2508g. Fixed a bug that caused an interactive shell without line editing enabled
2509 to read invalid data after receiving a SIGINT.
2510
2511h. Fixed a bug that caused command word completion to fail if the directory in
2512 $PATH where the completion would be found contained single or double quotes.
2513
2514i. Fixed a bug that caused a shell with -v enabled to print commands in $()
2515 multiple times.
2516
25172. Changes to Readline
2518
2519a. Fixed a bug that caused `undo' to reference freed memory or null pointers.
2520
25213. New Features in Bash
2522
2523a. The [[ -v ]] option now understands array references (foo[1]) and returns
2524 success if the referenced element has a value.
2525
2526------------------------------------------------------------------------------
2527This document details the changes between this version, bash-4.3-rc2, and the
2528previous version, bash-4.3-rc1.
2529
25301. Changes to Bash
2531
2532a. Fixed a bug that left variables set by printf -v marked as invisible.
2533
2534b. Fixed an off-by-one error in a job control warning message.
2535
2536c. Fixed a bug that caused the shell to crash after declaring a nameref variable
2537 without a value.
2538
2539d. Fixed a bug that caused asynchronous commands to not set $? correctly.
2540
2541e. Fixed a bug that caused out-of-order execution when executing aliases with
2542 embedded newlines containing `.' commands.
2543
2544f. Fixed a bug that caused error messages generated by expansion errors in
2545 `for' commands to have the wrong line number.
2546
2547g. Fixed a bug that caused the `wait' builtin to not be interruptible in an
2548 interactive shell with job control enabled.
2549
2550h. Fixed a bug that caused SIGINT and SIGQUIT to not be trappable in
2551 asynchronous subshell commands.
2552
2553i. Bash now requires that the value assigned to a nameref variable be a valid
2554 shell identifier (variable name or array reference).
2555
2556j. Converting an existing variable to a nameref variable now turns off the
2557 -i/-l/-u/-c attributes.
2558
2559k. Displaying a nameref variable with `declare -p' now displays the nameref
2560 variable and its value rather than following the nameref chain.
2561
2562l. Fixed a problem with interrupt handling that caused a second and subsequent
2563 SIGINT to be ignored by interactive shells.
2564
2565m. Fixed a bug that caused certain positional parameter and array expansions
2566 to mishandle (discard) null positional parameters and array elements.
2567
2568n. The shell no longer blocks receipt of signals while running trap handlers
2569 for those signals, and allows most trap handlers to be run recursively
2570 (running trap handlers while a trap handler is executing).
2571
2572o. The shell now handles backslashes in regular expression arguments to the
2573 [[ command's =~ operator slightly differently, resulting in more
2574 consistent behavior.
2575
25762. Changes to Readline
2577
2578a. Fixed a bug that could cause readline to crash and seg fault attempting to
2579 expand an empty history entry.
2580
2581b. Fixed a bug that caused a bad entry in the $LS_COLORS variable to abort all
2582 color processing but leave color enabled.
2583
2584c. Fixed a bug that caused display problems with multi-line prompts containing
2585 invisible characters on multiple lines.
2586
2587d. Fixed a bug that caused effects made by undoing changes to a history line to
2588 be discarded.
2589
25903. New Features in Bash
2591
25924. New Features in Readline
2593
2594a. When creating shared libraries on Mac OS X, the pathname written into the
2595 library (install_name) no longer includes the minor version number.
2596------------------------------------------------------------------------------
2597This document details the changes between this version, bash-4.3-rc1, and the
2598previous version, bash-4.3-beta2.
2599
26001. Changes to Bash
2601
2602a. Fixed a bug in bash completion that caused a tilde to be expanded even if
2603 the `direxpand' option was not enabled.
2604
2605b. Fixed a potential bug that could cause corrupted input in interactive shells
2606 running without line editing and with `ignoreeof' enabled.
2607
2608c. Fixed a bug that could cause failures when opening pipes back to shells
2609 created to run process substitutions.
2610
2611d. Fixed a bug that caused an assignment to TEXTDOMAIN to require TEXTDOMAINDIR
2612 to be set in order to actually change the current text domain.
2613
2614e. Changed the way redirections are printed to avoid confusion when the target
2615 of an output redirection is a process substitution beginning with `>'.
2616
26172. Changes to Readline
2618
2619a. Shared library building is now supported on Mac OS X 10.9 (Darwin 13).
2620
26213. New Features in Bash
2622
2623a. `cd' has a new `-@' option to browse a file's extended attributes on
2624 systems that support O_XATTR.
2625
26264. New Features in Readline
2627
2628a. There are additional default key bindings for MinGW32
2629
2630------------------------------------------------------------------------------
2631This document details the changes between this version, bash-4.3-beta2, and the
2632previous version, bash-4.3-beta.
2633
26341. Changes to Bash
2635
2636a. Fixed a bug that caused assignment to an unset variable using a negative
2637 subscript to result in a segmentation fault.
2638
2639b. Fixed a bug that caused assignment to a string variable using a negative
2640 subscript to use the incorrect index.
2641
2642c. Fixed a bug that caused some strings to be interpreted as invalid
2643 extended globbing expressions when used with the help builtin.
2644
2645d. Fixed a bug that caused an attempt to trap a signal whose disposition
2646 cannot be changed to reference uninitialized memory.
2647
2648e. Command completion now skips assignment statements preceding a command
2649 name and completes the command.
2650
2651f. Fixed a bug that caused `compgen -f' in a non-interactive shell to dump
2652 core under certain circumstances.
2653
2654g. Fixed a bug that caused the `read -N' to misbehave when the input stream
2655 contains 0xff.
2656
26572. Changes to Readline
2658
2659a. Changed message when an incremental search fails to include "failed" in
2660 the prompt and display the entire search string instead of just the last
2661 matching portion.
2662
2663b. Fixed a bug that caused an arrow key typed to an incremental search prompt
2664 to process the key sequence incorrectly.
2665
2666c. Additional key bindings for arrow keys on MinGW.
2667
26683. New Features in Bash
2669
2670a. The help builtin now attempts substring matching (as it did through
2671 bash-4.2) if exact string matching fails.
2672
2673b. The fc builtin now interprets -0 as the current command line.
2674
2675c. Completing directory names containing shell variables now adds a trailing
2676 slash if the expanded result is a directory.
2677
26784. New Features in Readline
2679
2680a. rl_change_environment: new application-settable variable that controls
2681 whether or not Readline modifies the environment (currently readline
2682 modifies only LINES and COLUMNS).
2683
2684------------------------------------------------------------------------------
2685This document details the changes between this version, bash-4.3-beta, and the
2686previous version, bash-4.3-alpha.
2687
26881. Changes to Bash
2689
2690a. Fixed a bug in the prompt directory name "trimming" code that caused
2691 memory corruption and garbled the results.
2692
2693b. Fixed a bug that caused single quotes that resulted from $'...' quoting
2694 in the replacement portion of a double-quoted ${word/pat/rep} expansion
2695 to be treated as quote characters.
2696
2697c. Fixed a bug that caused assignment statements preceding a command word to
2698 result in assignment statements following a declaration command to not be
2699 expanded like assignment statements.
2700
2701d. Fixed a bug with variable search order in the presence of local variables
2702 with the same name as variables in the temporary environment supplied to
2703 a shell function.
2704
2705e. Fixed a bug that caused constructs like 1<(2) to be interpreted as process
2706 substitutions even in an arithmetic context.
2707
2708f. Fixed several cases where `invisible' variables (variables with attributes
2709 but no values, which are technically unset) were treated incorrectly.
2710
2711g. Fixed a bug that caused group commands in pipelines that were not the
2712 last element to not run the EXIT trap.
2713
2714h. Fixed a bug that caused `unset -n' to not unset a nameref variable in
2715 certain cases.
2716
2717i. Fixed the nameref circular reference checking to be less strict and only
2718 disallow a nameref variable with the same value as its name at the global
2719 scope.
2720
2721j. Fixed a bug that caused trap handlers to be executed recursively,
2722 corrupting internal data structures.
2723
2724k. Fixed a bug that could result in bash not compiling if certain options were
2725 not enabled.
2726
2727l. Fixed a bug that caused the arithmetic expansion code to attempt variable
2728 assignments when operator precedence prohibited them.
2729
2730m. Word expansions like ${foo##bar} now understand indirect variable references.
2731
2732n. Fixed a bug that caused `declare -fp name' to not display a function
2733 definition.
2734
2735o. Fixed a bug that caused asynchronous child processes to modify the stdin
2736 file pointer when bash was using it to read a script, which modified the
2737 parent's value as well.
2738
27392. Changes to Readline
2740
2741a. Fixed a bug in vi mode that caused the arrow keys to set the saved last
2742 vi-mode command to the wrong value.
2743
2744b. Fixed a bug that caused double-quoted strings to be scanned incorrectly
2745 when being used as the value of a readline variable assignment.
2746
2747c. Fixed a bug with vi mode that prevented `.' from repeating a command
2748 entered on a previous line (command).
2749
2750d. Fixed a bug that could cause completion to core dump if it was interrupted
2751 by a signal.
2752
2753e. Readline now sends the meta-key enable string to the terminal if the
2754 terminal has been successfully initialized.
2755
2756f. Readline now calls the signal hook after resizing the terminal when it
2757 receives a SIGWINCH.
2758
2759g. Fixed a bug that could cause the history list code to perform an out-of-
2760 bounds array reference if the history list is empty.
2761
27623. New Features in Bash
2763
2764a. Shells started to run process substitutions now run any trap set on EXIT.
2765
2766b. There is now a configure-time option to enable the globasciiranges option
2767 by default.
2768
2769c. The read builtin now checks its first variable argument for validity before
2770 trying to read any input.
2771
2772------------------------------------------------------------------------------
2773This document details the changes between this version, bash-4.3-alpha,
2774and the previous version, bash-4.2-release.
2775
27761. Changes to Bash
2777
2778a. Fixed several bugs concerning incomplete bracket expressions in filename
2779 generation (globbing) patterns.
2780
2781b. Fixed a bug with single quotes and WORD in ${param op WORD} when running
2782 in Posix mode.
2783
2784c. Fixed a bug that caused the pattern removal and pattern substitution word
2785 expansions and case statement word expansion to not match the empty string.
2786
2787d. Fixed a bug that caused the tzset() function to not work after changing
8868edaf 2788 the TZ environment variable.
ac50fbac
CR
2789
2790e. Fixed a bug that caused the RHS of an assignment statement to undergo
2791 word splitting when it contained an unquoted $@.
2792
2793f. Fixed bugs that caused the shell to not react to a SIGINT sent while
2794 waiting for a child process to exit.
2795
2796g. Bash doesn't try to run things in a signal handler context when it gets a
2797 signal (SIGINT/SIGHUP/etc) while reading input using readline but still
2798 be responsive to terminating signals.
2799
2800h. Fixed a bug that caused bash to go into an infinite loop if a filename
2801 to be matched contained an invalid multibyte character.
2802
2803i. Fixed a bug that caused PS4 to end up being truncated if it is longer
2804 than 128 bytes.
2805
2806j. Fixed a bug that caused brace expansion to not skip over double-quoted
2807 command substitution.
2808
2809k. System-specific updates for: DJGPP, HP/UX, Mac OS X
2810
2811l. Fixed a bug in displaying commands that caused redirections to be associated
2812 with the wrong part of the command.
2813
2814m. Fixed the coproc cleanup to unset the appropriate shell variables when a
2815 coproc terminates.
2816
2817n. Fixed a bug that caused `fc' to dump core due to incorrect calculation of
2818 the last history entry.
2819
2820o. Added workarounds for FreeBSD's implementation of faccessat/eaccess and
2821 `test -x'.
2822
2823p. Fixed a bug that caused the shell to not match patterns containing
2824 control-A.
2825
2826q. Fixed a bug that could result in doubled error messages when the `printf'
2827 builtin got a write error.
2828
2829r. Fixed a bug that caused the shell to not correctly expand words containing
2830 multiple consecutive quoted empty strings (""""""aa).
2831
2832s. Fixed a bug that caused the shell to not correctly parse multi-line
2833 process substitutions containing comments and quoted strings.
2834
2835t. Fixed a problem with the bash malloc's internal idea of the top of the
2836 memory heap that resulted in incorrect decisions to try to reduce the
2837 break and give memory back to the kernel.
2838
8868edaf 2839u. There are changes to the expansions performed on compound array assignments,
ac50fbac
CR
2840 in an effort to make foo=( [ind1]=bar [ind2]=baz ) identical to
2841 foo[ind1]=bar foo[ind2]=baz.
2842
2843v. Bash now reports an error if `read -a name' is used when `name' is an
2844 existing associative array.
2845
2846w. Fixed a bug that allowed an attempted assignment to a readonly variable
2847 in an arithmetic expression to not return failure.
2848
2849x. Fixed several bugs that caused completion functions to be invoked even when
2850 the cursor was before the first word in the command.
2851
2852y. Fixed a bug that caused parsing a command substitution to overwrite the
2853 parsing state associated with the complete input line.
2854
2855z. Fixed several bugs with the built-in snprintf replacement and field widths
2856 and floating point.
2857
2858aa. Fixed a bug that caused incorrect offset calculations and input buffer
2859 corruption when reading files longer than 2^31 bytes.
2860
2861bb. Fixed several bugs where bash performed arithmetic evaluation in contexts
2862 where evaluation is suppressed.
2863
2864cc. Fixed a bug that caused bash to close FIFOs used for process substitution
2865 too early when a shell function was executing, but protect against using
2866 all file descriptors when the shell functions are invoked inside loops.
2867
2868dd. Added checks for printable (and non-printable) multibyte characters for
2869 use in error messages.
2870
2871ee. Fixed a bug that caused ^O (operate-and-get-next) to not work correctly
2872 at the end of the history list.
2873
2874ff. Fixed a bug that caused command-oriented history to incorrectly combine
2875 here documents into one line.
2876
2877gg. Fixed a bug that caused importing SHELLOPTS from the environment into a
2878 Posix-mode shell to print an error message and refuse to parse it.
2879
2880hh. Fixed a bug that caused the shell to delete an extra history entry when
2881 using `history -s'.
2882
2883ii. Fixed a bug that caused floating-point exceptions and overflow errors
2884 for the / and % arithmetic operators when using INTMAX_MIN and -1.
2885
2886jj. Fixed a bug that caused parsing errors when reading an arithmetic for
2887 loop inside a command substitution.
2888
2889kk. Fixed a bug that caused a readonly function to be unset when unset was
2890 called without the -f or -v option.
2891
2892ll. Fixed several bugs in the code that quotes characters special to regular
2893 expressions when used in a quoted string on the RHS of the =~ operator
2894 to the [[ command.
2895
2896mm. Fixed a bug that caused redirections to fail because the file descriptor
2897 limit was set to a value less than 10.
2898
2899nn. Fixed a bug that caused the `read' builtin to execute code in a signal
2900 handler context if read timed out.
2901
2902oo. Fixed a bug that caused extended globbing patterns to not match files
2903 beginning with `.' correctly when a `.' was explicitly supplied in the
2904 pattern.
2905
2906pp. Fixed a bug that caused key sequences longer than two characters to not
2907 work when used with `bind -x'.
2908
2909qq. Fixed a bug that resulted in redefined functions having the wrong source
2910 file names in BASH_SOURCE.
2911
2912rr. Fixed a bug that caused the read builtin to assign null strings to variables
2913 when using `read -N', which caused core dumps when referenced
2914
2915ss. Fixed a bug that caused `bash -m script' to not enable job control while
2916 running the script.
2917
2918tt. Fixed a bug that caused `printf -v var' to dump core when used with the
2919 %b format code.
2920
2921uu. Fixed a bug that caused the shell to exit with the wrong status if -e was
2922 active and the shell exited on a substitution error.
2923
2924vv. Fixed a bug that caused the shell to seg fault if an array variable with
2925 the same name as an existing associative array was implicitly created by
2926 an assignment (declare a[n]=b).
2927
2928ww. Fixed a bug that caused a redirection to misbehave if the number specified
2929 for a file descriptor overflows an intmax_t.
2930
2931xx. Fixed several bugs with the handling of valid and invalid unicode character
2932 values when used with the \u and \U escape sequences to printf and $'...'.
2933
2934yy. Fixed a bug that caused tildes to not be escaped in expanded filenames,
2935 making them subject to later expansion.
2936
2937zz. When using the pattern substitution word expansion, bash now runs the
2938 replacement string through quote removal, since it allows quotes in that
2939 string to act as escape characters. This is not backwards compatible, so
2940 it can be disabled by setting the bash compatibility mode to 4.2.
2941
2942aaa. Fixed the rest of the cases where the shell runs non-allowed code in a
2943 signal handler context.
2944
2945bbb. Fixed a bug that caused spurious DEL characters (\177) to appear in
2946 double-quoted expansion where the RHS is evaluated to the empty string.
2947
2948ccc. Fixed a bug that caused the use of the shell's internal random number
2949 generator for temporary file names to perturb the random number
2950 sequence.
2951
2952ddd. Fixed several bugs that caused `declare -g' to not set the right global
2953 variables or to misbehave when declaring global indexed arrays.
2954
2955eee. Fixed a logic bug that caused extended globbing in a multibyte locale to
2956 cause failures when using the pattern substititution word expansions.
2957
2958fff. Fixed a bug that caused the `lastpipe' option to corrupt the file
2959 descriptor used to read the script.
2960
2961ggg. Fixed a bug that causes the shell to delete DEL characters in the
2962 expanded value of variables used in the same quoted string as variables
2963 that expand to nothing.
2964
2965hhh. Fixed a bug that caused the shell to assign the wrong value from an
2966 assignment like (( x=7 )) when `x' was an existing array variable.
2967
2968iii. Fixed a bug that caused the shell to misbehave when generating sequences
2969 and the boundary values overflow an intmax_t.
2970
2971jjj. Fixed a bug caused expansion errors if an expansion of "$@" appeared
2972 next to another expansion (e.g.. "${@}${x}").
2973
2974kkk. Fixed a potential buffer overflow bug when performing /dev/fd expansion.
2975
2976lll. Fixed a bug that resulted in an extra semicolon being added to compound
2977 assignments when they were added to the history list.
2978
2979mmm. Fixed a bug that caused mapfile to read one extra line from the input.
2980
2981nnn. Fixed a bug that caused the mail checking code to use uninitialized
2982 values.
2983
2984ooo. Fixed a bug that prevented history timestamps from being saved if the
2985 history comment character is unset.
2986
2987ppp. Fixed a bug that caused the case-modifying expansions to not work with
2988 multibyte characters.
2989
2990qqq. Fixed a bug that caused the edit-and-execute bindable readline command
2991 to see the wrong data if invoked in the middle of a multi-line quoted
2992 string.
2993
2994rrr. Fixed a bug that resulted in the shell returning the wrong exit status
2995 for a background command on systems that recycle PIDs very quickly.
2996
2997sss. Fixed a bug that caused asynchronous group commands to not run any EXIT
2998 trap defined in the body of the command.
2999
3000ttt. Fixed a bug that caused `eval "... ; return"' to not clean up properly.
3001
3002uuu. Fixed a bug that caused the shell to dump core if `read' reads an escaped
3003 IFS whitespace character.
3004
3005vvv. Fixed a bug that caused BASH_COMMAND to be set to an incorrect value when
3006 executing a (...) subshell.
3007
3008www. Fixed a couple of pointer aliasing bugs with the token string in arithmetic
3009 evaluation.
3010
3011xxx. Fixed a bug with parsing multi-line command substitutions when reading
3012 the `do' keyword followed by whitespace.
3013
3014yyy. Fixed a bug that caused the shell to seg fault if the time given to the
3015 printf %(...)T format overflowed the value accepted by localtime(3).
3016
3017zzz. Fixed a problem with displaying help topics in two columns when the
3018 translated text contained multibyte characters.
3019
3020aaaa. Fixed a bug with the extended globbing pattern matcher where a `*' was
3021 followed by a negated extended glob pattern.
3022
3023bbbb. Fixed a race condition with short-lived coproc creation and reaping that
3024 caused the child process to be reaped before the various coproc shell
3025 variables were initialized.
3026
3027cccc. Fixed a bug where turning off `errexit' in command substitution subshells
3028 was not reflected in $SHELLOPTS.
3029
3030dddd. Partially fixed an inconsistency in how the shell treated shell
3031 functions run from an EXIT trap.
3032
3033eeee. Fixed a bug in how the shell invalidated FIFOs used for process
3034 substitution when executing a pipeline (once rather than in every child).
3035
3036ffff. Fixed a bug that occurred when expanding a special variable ($@, $*)
3037 within double quotes and the expansion resulted in an empty string.
3038
3039gggg. Fixed bugs with executing a SIGCHLD trap handler to make sure that it's
3040 executed once per exited child.
3041
3042hhhh. Fixed a bug that caused `declare' and `test' to find variables that
3043 had been given attributes but not assigned values. Such variables are
3044 not set.
3045
3046iiii. Fixed a bug that caused commands in process substitutions to not look in
3047 the local temporary environment when performing word expansions.
3048
3049jjjj. Fixed several problems with globstar expansions (**/**) returning null
3050 filenames and multiple instances of the same pathname.
3051
3052kkkk. Fixed an oversight that did not allow the exit status of `coproc' to
3053 be inverted using `!'.
3054
3055llll. Fixed a bug that caused the -e option to be re-enabled using `set -e'
3056 even when executing in a context where -e is ignored.
3057
3058mmmm. Fixed a (mostly theoretical) bug with input lines longer than SIZE_MAX.
3059
3060nnnn. Fixed a bug that could result in double evaluation of command
3061 substitutions when they appear in failed redirections.
3062
3063oooo. Fixed a bug that could cause seg faults during `mapfile' callbacks if
3064 the callback unsets the array variable mapfile is using.
3065
3066pppp. Fixed several problems with variable assignments using ${var:=value}
3067 when the variable assignment is supposed to have side effects.
3068
3069qqqq. Fixed a bug that caused a failure of an assignment statement preceding a
3070 builtin caused the next invocation of a special builtin to exit the shell.
3071
3072rrrr. Fixed several problems with IFS when it appears in the temporary environment
3073 and is used in redirections.
3074
3075ssss. Fixed a problem that caused IFS changes using ${IFS:=value} to modify
3076 how preceding expansions were split.
3077
3078tttt. Fixed a problem that caused subshells to not run an EXIT trap they set.
3079
3080uuuu. Fixed a problem that caused shells started in posix mode to attempt to
3081 import shell functions with invalid names from the environment. We now
3082 print a warning.
3083
3084vvvv. Worked around a kernel problem that caused SIGCHLD to interrupt open(2)
3085 on a FIFO used for process substitution, even if the SIGCHLD handler was
3086 installed with the SA_RESTART flag.
3087
3088wwww. Fixed a problem that resulted in inconsistent expansion of $* and ${a[*]}.
3089
3090xxxx. Fixed a problem that caused `read -t' to crash when interrupted by
3091 SIGINT.
3092
3093yyyy. Fixed a problem that caused pattern removal to fail randomly because the
3094 pattern matcher read beyond the end of a string.
3095
3096zzzz. Fixed a bug that caused core dumps when shell functions tried to create
3097 local shadow copies of special variables like GROUPS.
3098
3099aaaaa. Fixed a bug that caused SIGTERM to be occasionally lost by children of
3100 interactive shells when it arrived before the child process reset the
3101 handler from SIG_DFL.
3102
3103bbbbb. Fixed a bug that caused redirections like <&n- to leave file descriptor
3104 n closed if executed with a builtin command.
3105
3106ccccc. Fixed a bug that caused incorrect completion quoting when completing a
3107 word containing a globbing character with `show-all-if-ambiguous' set.
3108
3109ddddd. Fixed a bug that caused printf's %q format specifier not to quote a
3110 tilde even if it appeared in a location where it would be subject to
3111 tilde expansion.
3112
31132. Changes to Readline
3114
3115a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode
3116 commands to work on the entire line.
3117
3118b. Fixed a bug that caused redisplay problems with prompts longer than 128
3119 characters and history searches.
3120
3121c. Fixed a bug that caused readline to try and run code to modify its idea
3122 of the screen size in a signal handler context upon receiving a SIGWINCH.
3123
3124d. Fixed a bug that caused the `meta' key to be enabled beyond the duration
3125 of an individual call top readline().
3126
3127e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's
3128 redisplay to mishandle zero-width combining characters.
3129
3130f. Fixed a bug that caused readline to `forget' part of a key sequence when
3131 a multiple-key sequence caused it to break out of an incremental search.
3132
3133g. Fixed bugs that caused readline to execute code in a signal handler
3134 context if interrupted while reading from the file system during completion.
3135
3136h. Fixed a bug that caused readline to `forget' part of a key sequence when
3137 reading an unbound multi-character key sequence.
3138
3139i. Fixed a bug that caused Readline's signal handlers to be installed beyond
3140 the bounds of a single call to readline().
3141
3142j. Fixed a bug that caused the `.' command to not redo the most recent `R'
3143 command in vi mode.
3144
3145k. Fixed a bug that caused ignoring case in completion matches to result in
3146 readline using the wrong match.
3147
3148l. Paren matching now works in vi insert mode.
3149
3150m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix
3151 work together.
3152
3153n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone
3154 in vi editing mode.
3155
3156o. Fixed a bug that caused the filename comparison code to not compare
3157 multibyte characters correctly when using case-sensitive or case-mapping
3158 comparisons.
3159
3160p. Fixed the input reading loop to call the input hook function only when there
3161 is no terminal input available.
3162
3163q. Fixed a bug that caused binding a macro to a multi-character key sequence
3164 where the sequence and macro value share a common prefix to not perform
3165 the macro replacement.
3166
3167r. Fixed several redisplay errors with multibyte characters and prompts
3168 containing invisible characters when using horizontal scrolling.
3169
3170s. Fixed a bug that caused redisplay errors when trying to overwrite
3171 existing characters using multibyte characters.
3172
31733. New Features in Bash
3174
3175a. The `helptopic' completion action now maps to all the help topics, not just
3176 the shell builtins.
3177
3178b. The `help' builtin no longer does prefix substring matching, so `help read'
3179 does not match `readonly'.
3180
3181c. The shell can be compiled to not display a message about processes that
3182 terminate due to SIGTERM.
3183
3184d. Non-interactive shells now react to the setting of checkwinsize and set
3185 LINES and COLUMNS after a foreground job exits.
3186
3187e. There is a new shell option, `globasciiranges', which, when set to on,
3188 forces globbing range comparisons to use character ordering as if they
3189 were run in the C locale.
3190
3191f. There is a new shell option, `direxpand', which makes filename completion
3192 expand variables in directory names in the way bash-4.1 did.
3193
3194g. In Posix mode, the `command' builtin does not change whether or not a
3195 builtin it shadows is treated as an assignment builtin.
3196
3197h. The `return' and `exit' builtins accept negative exit status arguments.
3198
3199i. The word completion code checks whether or not a filename containing a
3200 shell variable expands to a directory name and appends `/' to the word
3201 as appropriate. The same code expands shell variables in command names
3202 when performing command completion.
3203
3204j. In Posix mode, it is now an error to attempt to define a shell function
3205 with the same name as a Posix special builtin.
3206
3207k. When compiled for strict Posix conformance, history expansion is disabled
3208 by default.
3209
3210l. The history expansion character (!) does not cause history expansion when
3211 followed by the closing quote in a double-quoted string.
3212
3213m. `complete' and its siblings compgen/compopt now takes a new `-o noquote'
3214 option to inhibit quoting of the completions.
3215
3216n. Setting HISTSIZE to a value less than zero causes the history list to be
3217 unlimited (setting it 0 zero disables the history list).
3218
3219o. Setting HISTFILESIZE to a value less than zero causes the history file size
3220 to be unlimited (setting it to 0 causes the history file to be truncated
3221 to zero size).
3222
3223p. The `read' builtin now skips NUL bytes in the input.
3224
3225q. There is a new `bind -X' option to print all key sequences bound to Unix
3226 commands.
3227
3228r. When in Posix mode, `read' is interruptible by a trapped signal. After
3229 running the trap handler, read returns 128+signal and throws away any
3230 partially-read input.
3231
3232s. The command completion code skips whitespace and assignment statements
3233 before looking for the command name word to be completed.
3234
3235t. The build process has a new mechanism for constructing separate help files
3236 that better reflects the current set of compilation options.
3237
3238u. The -nt and -ot options to test now work with files with nanosecond
3239 timestamp resolution.
3240
3241v. The shell saves the command history in any shell for which history is
3242 enabled and HISTFILE is set, not just interactive shells.
3243
3244w. The shell has `nameref' variables and new -n(/+n) options to declare and
3245 unset to use them, and a `test -R' option to test for them.
3246
3247x. The shell now allows assigning, referencing, and unsetting elements of
3248 indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which
3249 count back from the last element of the array.
3250
3251y. The {x}<word redirection feature now allows words like {array[ind]} and
3252 can use variables with special meanings to the shell (e.g., BASH_XTRACEFD).
3253
3254z. There is a new CHILD_MAX special shell variable; its value controls the
a0c0a00f 3255 number of exited child statuses the shell remembers.
ac50fbac
CR
3256
3257aa. There is a new configuration option (--enable-direxpand-default) that
3258 causes the `direxpand' shell option to be enabled by default.
3259
3260bb. Bash does not do anything special to ensure that the file descriptor
3261 assigned to X in {x}<foo remains open after the block containing it
3262 completes.
3263
3264cc. The `wait' builtin has a new `-n' option to wait for the next child to
3265 change status.
3266
3267dd. The `printf' %(...)T format specifier now uses the current time if no
3268 argument is supplied.
3269
3270ee. There is a new variable, BASH_COMPAT, that controls the current shell
3271 compatibility level.
3272
3273ff. The `popd' builtin now treats additional arguments as errors.
3274
3275gg. The brace expansion code now treats a failed sequence expansion as a
3276 simple string and will continue to expand brace terms in the remainder
3277 of the word.
3278
32794. New Features in Readline
3280
3281a. Readline is now more responsive to SIGHUP and other fatal signals when
3282 reading input from the terminal or performing word completion but no
3283 longer attempts to run any not-allowable functions from a signal handler
3284 context.
3285
3286b. There are new bindable commands to search the history for the string of
3287 characters between the beginning of the line and the point
3288 (history-substring-search-forward, history-substring-search-backward)
3289
3290c. Readline allows quoted strings as the values of variables when setting
3291 them with `set'. As a side effect, trailing spaces and tabs are ignored
3292 when setting a string variable's value.
3293
3294d. The history library creates a backup of the history file when writing it
3295 and restores the backup on a write error.
3296
3297e. New application-settable variable: rl_filename_stat_hook: a function called
3298 with a filename before using it in a call to stat(2). Bash uses it to
3299 expand shell variables so things like $HOME/Downloads have a slash
3300 appended.
3301
3302f. New bindable function `print-last-kbd-macro', prints the most-recently-
3303 defined keyboard macro in a reusable format.
3304
3305g. New user-settable variable `colored-stats', enables use of colored text
3306 to denote file types when displaying possible completions (colored analog
3307 of visible-stats).
3308
3309h. New user-settable variable `keyseq-timout', acts as an inter-character
3310 timeout when reading input or incremental search strings.
3311
3312i. New application-callable function: rl_clear_history. Clears the history list
3313 and frees all readline-associated private data.
3314
3315j. New user-settable variable, show-mode-in-prompt, adds a characters to the
3316 beginning of the prompt indicating the current editing mode.
3317
3318k. New application-settable variable: rl_input_available_hook; function to be
3319 called when readline needs to check whether there is data available on its
3320 input source. The default hook checks rl_instream.
3321
3322l. Readline calls an application-set event hook (rl_signal_event_hook) after
3323 it gets a signal while reading input (read returns -1/EINTR but readline
3324 does not handle the signal immediately) to allow the application to handle
3325 or otherwise note it. Not currently called for SIGHUP or SIGTERM.
3326
3327m. If the user-settable variable `history-size' is set to a value less than
3328 0, the history list size is unlimited.
3329
3330------------------------------------------------------------------------------
495aee44
CR
3331This document details the changes between this version, bash-4.2-release,
3332and the previous version, bash-4.2-rc2.
3333
33341. Changes to Bash
3335
3336a. Fixed a bug that caused some variables to be clobbered by a longjmp,
3337 resulting in stack corruption.
3338
3339------------------------------------------------------------------------------
3340This document details the changes between this version, bash-4.2-rc2,
3341and the previous version, bash-4.2-rc1.
3342
33431. Changes to Bash
3344
3345a. Changes to bash_directory_completion_hook so that it's assigned to the
3346 readline rl_directory_rewrite_hook variable, which modifies the directory
3347 name passed to opendir without modifying the directory name the user
3348 typed.
3349
3350b. Fixed bug in select builtin that caused it to not terminate correctly if
3351 the read timed out due to $TMOUT.
3352
3353c. Fixed a problem that resulted in non-repeatable sequences of random
3354 numbers when RANDOM=0.
3355
3356------------------------------------------------------------------------------
3357This document details the changes between this version, bash-4.2-rc1,
3358and the previous version, bash-4.2-beta.
3359
33601. Changes to Bash
3361
3362a. Fixed a bug that caused some redirection errors to leak file descriptors.
3363
3364b. Fixed a bug that caused unary `+' and `-' arithmetic operators to have a
3365 higher precedence than unary `!' and `~'.
3366
3367c. Fixed a bug that caused simple commands in a pipeline to affect the exit
3368 status ($?) seen by subsequent pipeline commands.
3369
3370d. A number of cygwin-specific changes to avoid the use of text-mode files
3371 and file access, and to make sure that \r is handled correctly.
3372
3373e. Fixed a bug that caused the read builtin to not return failure if an
3374 attempt is made to assign to a readonly variable.
3375
3376f. Fixed a bug that caused some builtin usage messages to not be translated.
3377
3378g. Fixed a bug that caused the getopts builtin to not return failure if an
3379 attempt is made to assign to a readonly variable. Now it returns 2.
3380
3381h. Fixed the cd and pwd builtins to return failure if PWD is readonly and
3382 cannot be assigned to.
3383
3384i. Added code to check the return value of access(2) on Solaris systems,
3385 since it returns success for executable tests (e.g., `test -x') when
3386 run by root, even if the file permissions don't allow execution.
3387
33882. Changes to Readline
3389
3390a. Fixed a bug that caused directory names in words to be completed to not
3391 be dequoted correctly.
3392
33933. New Features in Bash
3394
33954. New Features in Readline
3396
3397------------------------------------------------------------------------------
3398This document details the changes between this version, bash-4.2-beta,
3399and the previous version, bash-4.2-alpha.
3400
34011. Changes to Bash
3402
3403a. Fixed a bug that caused the \W prompt string escape to not add a closing
3404 NULL.
3405
3406b. Fixed a bug that caused partially-quoted words that were not subject to
3407 word splitting to retained quoted NULLs.
3408
3409c. Added considerable efficiency speedups when pattern matching in multibyte
3410 locales by skipping multibyte character functions where possible.
3411
3412d. Added considerable speedups to variable expansion when in multibyte locales.
3413
3414e. Fixed a bug that caused the expansion of $* when there are no positional
3415 parameters to cause the shell to dump core when used in a pattern
3416 matching context.
3417
3418f. Fixed a bug that caused variable expansions preceding regular builtins to
3419 not change the shell environment during their execution.
3420
34212. Changes to Readline
3422
3423a. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave
3424 as if it were a negative argument.
3425
3426------------------------------------------------------------------------------
3427This document details the changes between this version, bash-4.2-alpha,
3428and the previous version, bash-4.1-release.
3429
34301. Changes to Bash
3431
3432a. Fixed a bug in the parser when processing alias expansions containing
3433 quoted newlines.
3434
3435b. Fixed a memory leak in associative array expansion.
3436
3437c. Fixed a bug that caused quoted here-strings to be requoted when printed.
3438
3439d. Fixed a bug in arithmetic expansion that caused the index in an array
3440 expansion to be evaluated twice under certain circumstances.
3441
3442e. Fixed several bugs with the expansion and display of variables that have
3443 been given attributes but not values and are technically unset.
3444
3445f. Fixed a bug that caused core dumps when using filename completion that
3446 expands to a filename containing a globbing character.
3447
3448g. Fixed a bug that caused assignment statements preceding a special builtin
3449 when running in Posix mode to not persist after the builtin completed
3450 when the special builtin was executed in a shell function without any
3451 local variables.
3452
3453h. Fixed a bug that caused a command to remain in the hash table even after
3454 `hash command' did not find anything if there was already an existing
3455 hashed pathname.
3456
3457i. Fixed several bugs caused by executing unsafe functions from a signal
3458 handler in the cases where a signal handler is executed immediately
3459 rather than setting a flag for later execution.
3460
3461j. Fixed a bug that caused some internal flag variables to be set
3462 incorrectly if `read -t' timed out.
3463
3464k. Fixed a Posix compatibility issue by making sure that a backslash escaping
3465 a `}' within a double-quoted ${...} parameter expansion is removed as part
3466 of the parameter expansion.
3467
3468l. Fixed a bug that caused execution of a trap to overwrite PIPESTATUS.
3469
3470m. Fixed a bug that caused here documents to not be displayed correctly
3471 when attached to commands inside compound commands.
3472
3473n. Fixed a bug that caused the printf builtin to use the wrong precision
3474 when using the `*' modifier.
3475
3476o. Fixed a bug that caused an arriving SIGCHLD to interrupt output functions
3477 like those invoked by echo or printf.
3478
3479p. Changed to use a more robust mechanism than eaccess(2) when test is
3480 checking filenames for execution permission.
3481
3482q. Fixed a bug that caused spurious semicolons to be added into the command
3483 history in certain cases.
3484
3485r. Fixed a bug that caused the shell to free non-allocated memory when
3486 unsetting element 0 of an associative array after it was assigned
3487 implicitly.
3488
3489s. Fixed a bug that could cause the shell to dump core if using the `v'
3490 vi editing command on a multi-line command.
3491
3492t. Fixed a bug that left FIFOs opened by process substitutions open long
3493 enough to potentially cause file descriptor exhaustion when running a
3494 shell function or shell builtin.
3495
3496u. Fixed a bug that caused the history expansion functions to not recognize
3497 process substitution or extended glob patterns as single words.
3498
3499v. Fixed a bug that caused restricted shells to set a restricted command's
3500 exit status incorrectly.
3501
3502w. Fixed a bug that caused bash to ignore the wrong set of filenames when
3503 completing a command using the `complete-filename' readline command.
3504
3505x. Fixed a bug that caused a -PID argument following a -s sig or -n sig to
3506 not be interpreted as a signal specification.
3507
3508y. Changed posix-mode behavior of a parse error in a `.' script or `eval'
3509 command to exit the shell under Posix-specified conditions. Previous
3510 versions printed a warning.
3511
3512z. Fixed a bug in \W prompt expansion that resulted in incorrect expansion
3513 in the event of overlapping strings.
3514
3515aa. Fixed a bug that caused the := parameter expansion operator to return the
3516 wrong value as the result of the expansion.
3517
3518bb. When in Posix mode, a single quote is not treated specially in a
3519 double-quoted ${...} expansion, unless the expansion operator is
3520 # or % or the non-Posix `//', `^', and `,'. In particular, it does
3521 not define a new quoting context. This is from Posix interpretation 221.
3522
3523cc. Fixed a bug that inadvertently allowed program names containing slashes
3524 to be entered into the command hash table.
3525
3526dd. Fixed a bug that caused the select builtin to incorrectly compute the
3527 display width of the arguments in the presence of multibyte characters.
3528
3529ee. Fixed a bug that caused bash to not change the xtrace file descriptor if
3530 BASH_XTRACEFD was found in the shell environment at startup.
3531
3532ff. Fixed a memory leak in the pattern removal parameter expansion.
3533
3534gg. Fixed a bug that caused SIGINT to fail to interrupt a nested loop if the
3535 loop was in a pipeline.
3536
3537hh. Fixed a problem in $(...) parsing that caused the parser to add an extra
3538 space to a here-document delimiter if the first word contained a `/'.
3539
3540ii. Fixed a bug that caused functions defined with the `function' reserved
3541 word to require braces around the function body.
3542
3543jj. Fixed a bug that caused bash to dump core when a variable expansion being
3544 used as an array subscript failed.
3545
3546kk. Fixed a bug that caused bash to dump core if the case-modification
3547 expansions were used on a variable with a null value.
3548
3549ll. Fixed a bug that caused partially-quoted strings to be split incorrectly
3550 if a variable with a null value was expanded within double quotes.
3551
3552mm. The pattern substitution word expansion has been sped up dramatically
3553 when running in a locale with multibyte characters.
3554
3555nn. Fixed a bug that caused history -a to not write the correct lines to
3556 the history file if all the new lines in the history list were added
3557 since the last time the history file was read or written.
3558
3559oo. Fixed a bug that caused completion of a word with an unclosed `` command
3560 substitution to set the prompt incorrectly.
3561
3562pp. Fixed a bug that caused extended globbing patterns in $HISTIGNORE or
3563 $GLOBIGNORE to be incorrectly scanned.
3564
3565qq. Fixed a bug caused by closing file descriptors 3-20 on shell startup. The
3566 shell now sets them to close-on-exec.
3567
3568rr. Fixed a bug that caused the exit status of `exec file' to be set incorrectly
3569 if `file' was a directory.
3570
3571ss. Fixed a bug in the `.' builtin to make a non-interactive posix-mode shell
3572 exit if the file argument to `.' is not found. Prefixing exec with
3573 `command' makes the shell not exit. Posix requires this behavior.
3574
3575tt. Fixed a bug that caused `sh -c 'command exec; exit 1' to hang.
3576
3577uu. Fixed a bug in $(...) command substitution parsing that caused the shell
3578 to treat backslash-newline incorrectly when parsing a comment.
3579
3580vv. Fixed bug that caused brace expansion sequence generation to misbehave
3581 when supplied integers greater than 2**31 - 1.
3582
3583ww. Fixed a bug that caused failure to save file descriptors for redirections
3584 to corrupt shell file descriptors.
3585
3586xx. Fixed a bug that caused bash-forward-shellword to not correctly handle
3587 quoted strings.
3588
35892. Changes to Readline
3590
3591a. Fixed a bug that caused the unconverted filename to be added to the list of
3592 completions when the application specified filename conversion functions.
3593
3594b. Fixed a bug that caused the wrong filename to be passed to opendir when the
3595 application has specified a filename dequoting function.
3596
3597c. Fixed a bug when repeating a character search in vi mode in the case where
3598 there was no search to repeat.
3599
3600d. When show-all-if-ambiguous is set, the completion routines no longer insert
3601 a common match prefix that is shorter than the text being completed.
3602
3603e. The full set of vi editing commands may now be used in callback mode.
3604
3605f. Fixed a bug that caused readline to not update its idea of the terminal
3606 dimensions while running in `no-echo' mode.
3607
3608h. Fixed a bug that caused readline to dump core if an application called
3609 rl_prep_terminal without setting rl_instream.
3610
3611i. Fixed a bug that caused meta-prefixed characters bound to incremental
3612 search forward or backward to not be recognized if they were typed
3613 subsequently.
3614
3615j. The incremental search code treats key sequences that map to the same
3616 functions as (default) ^G, ^W, and ^Y as equivalent to those characters.
3617
3618k. Fixed a bug in menu-complete that caused it to misbehave with large
3619 negative argument.
3620
3621l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked
3622 at the end of the line.
3623
36243. New Features in Bash
3625
3626a. `exec -a foo' now sets $0 to `foo' in an executable shell script without a
3627 leading #!.
3628
3629b. Subshells begun to execute command substitutions or run shell functions or
3630 builtins in subshells do not reset trap strings until a new trap is
3631 specified. This allows $(trap) to display the caller's traps and the
3632 trap strings to persist until a new trap is set.
3633
3634c. `trap -p' will now show signals ignored at shell startup, though their
3635 disposition still cannot be modified.
3636
3637d. $'...', echo, and printf understand \uXXXX and \UXXXXXXXX escape sequences.
3638
3639e. declare/typeset has a new `-g' option, which creates variables in the
3640 global scope even when run in a shell function.
3641
3642f. test/[/[[ have a new -v variable unary operator, which returns success if
3643 `variable' has been set.
3644
3645g. Posix parsing changes to allow `! time command' and multiple consecutive
3646 instances of `!' (which toggle) and `time' (which have no cumulative
3647 effect).
3648
3649h. Posix change to allow `time' as a command by itself to print the elapsed
3650 user, system, and real times for the shell and its children.
3651
3652j. $((...)) is always parsed as an arithmetic expansion first, instead of as
3653 a potential nested command substitution, as Posix requires.
3654
3655k. A new FUNCNEST variable to allow the user to control the maximum shell
3656 function nesting (recursive execution) level.
3657
3658l. The mapfile builtin now supplies a third argument to the callback command:
3659 the line about to be assigned to the supplied array index.
3660
3661m. The printf builtin has a new %(fmt)T specifier, which allows time values
3662 to use strftime-like formatting.
3663
3664n. There is a new `compat41' shell option.
3665
3666o. The cd builtin has a new Posix-mandated `-e' option.
3667
3668p. Negative subscripts to indexed arrays, previously errors, now are treated
3669 as offsets from the maximum assigned index + 1.
3670
3671q. Negative length specifications in the ${var:offset:length} expansion,
3672 previously errors, are now treated as offsets from the end of the variable.
3673
3674r. Parsing change to allow `time -p --'.
3675
3676s. Posix-mode parsing change to not recognize `time' as a keyword if the
3677 following token begins with a `-'. This means no more Posix-mode
3678 `time -p'. Posix interpretation 267.
3679
3680t. There is a new `lastpipe' shell option that runs the last command of a
3681 pipeline in the current shell context. The lastpipe option has no
3682 effect if job control is enabled.
3683
3684u. History expansion no longer expands the `$!' variable expansion.
3685
3686v. Posix mode shells no longer exit if a variable assignment error occurs
3687 with an assignment preceding a command that is not a special builtin.
3688
3689w. Non-interactive mode shells exit if -u is enabled and an attempt is made
3690 to use an unset variable with the % or # expansions, the `//', `^', or
3691 `,' expansions, or the parameter length expansion.
3692
3693x. Posix-mode shells use the argument passed to `.' as-is if a $PATH search
3694 fails, effectively searching the current directory. Posix-2008 change.
3695
36964. New Features in Readline
3697
3698a. The history library does not try to write the history filename in the
3699 current directory if $HOME is unset. This closes a potential security
3700 problem if the application does not specify a history filename.
3701
3702b. New bindable variable `completion-display-width' to set the number of
3703 columns used when displaying completions.
3704
3705c. New bindable variable `completion-case-map' to cause case-insensitive
3706 completion to treat `-' and `_' as identical.
3707
3708d. There are new bindable vi-mode command names to avoid readline's case-
3709 insensitive matching not allowing them to be bound separately.
3710
3711e. New bindable variable `menu-complete-display-prefix' causes the menu
3712 completion code to display the common prefix of the possible completions
3713 before cycling through the list, instead of after.
3714
3715------------------------------------------------------------------------------
0001803f
CR
3716This document details the changes between this version, bash-4.1-rc,
3717and the previous version, bash-4.1-beta.
3718
37191. Changes to Bash
3720
3721a. Fixed a bug that caused printf to not return a partial value when it
3722 encountered an error while converting an integer argument.
3723
3724b. Fixed a bug that caused setting one of the compatNN options to not
3725 turn off the others.
3726
3727c. The (undocumented) --wordexp option is no longer included by default.
3728
3729d. Fixed a bug in conditional command execution that caused it to not
3730 correctly ignore the exit status under certain circumstances.
3731
3732e. Added a configure-time check for correctly-working asprintf/snprintf.
3733
3734f. Fixed some problems with line number calculation and display when sourcing
3735 a file in an interactive shell.
3736
3737g. Fixed a bug that caused the shell to crash when using `declare -A foo=bar'.
3738
3739h. Fixed a bug that caused an off-by-one error when calculating the directories
3740 to display with the PROMPT_DIRTRIM option.
3741
37422. Changes to Readline
3743
3744a. Fixed a bug that caused applications using the callback interface to not
3745 react to SIGINT (or other signals) until another character arrived.
3746
3747------------------------------------------------------------------------------
3748This document details the changes between this version, bash-4.1-beta,
3749and the previous version, bash-4.1-alpha.
3750
37511. Changes to Bash
3752
3753a. Fixed a bug in mapfile that caused the shell to crash if it was passed the
3754 name of an associative array.
3755
3756b. Fixed a bug that caused the shell to incorrectly split case patterns if
3757 they contained characters in $IFS.
3758
3759c. Fixed a bug that caused the shell to set $? to the wrong value when using
3760 a construct ending with a variable assignment with set -x enabled and PS4
3761 containing a command substitution.
3762
3763d. Fixed a bug that caused the shell to read commands incorrectly if an
3764 expansion error occurred under certain conditions in a user-specified
3765 subshell.
3766
3767e. Fixed a bug that caused the shell to set $? incorrectly if a parse error
3768 occurred in an evaluation context ("eval", trap command, dot script, etc.)
3769
3770f. Fixed a bug that caused the shell to attempt command substitution
3771 completion within a single-quoted string.
3772
3773g. Fixed a bug that caused the shell to insert an extra single quote during
3774 word completion.
3775
3776h. Fixed a bug that caused the shell to crash if invoked with the environment
3777 variable EMACS having a null value.
3778
3779i. Fixed a bug that caused bash to incorrectly report the presence of new
3780 mail in a `maildir' environment.
3781
3782j. Fixed a bug that caused the shell to not recognize a here-document ending
3783 delimiter inside a command substitution.
3784
3785k. Fixed a bug that caused the shell to crash when a a dynamic array variable
3786 was assigned a scalar value.
3787
37882. Changes to Readline
3789
37903. New Features in Bash
3791
3792a. The mapfile/readarray builtin no longer stores the commands it invokes via
3793 callbacks in the history list.
3794
3795b. There is a new `compat40' shopt option.
3796
3797c. The < and > operators to [[ do string comparisons using the current locale
3798 only if the compatibility level is greater than 40 (set to 41 by default).
3799
38004. New Features in Readline
3801
3802------------------------------------------------------------------------------
3803This document details the changes between this version, bash-4.1-alpha,
3804and the previous version, bash-4.0-release.
3805
38061. Changes to Bash
3807
3808a. Fixed bugs in the parser involving new parsing of the commands contained
3809 in command substitution when the substitution is read.
3810
3811b. Fixed a bug that caused the shell to dump core when performing programmable
3812 completion using a shell function.
3813
3814c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong
3815 time.
3816
3817d. Fixed a bug that caused the shell to dump core when listing jobs in the
3818 `exit' builtin.
3819
3820e. Fixed several bugs encountered when reading subscripts in associative
3821 array assignments and expansions.
3822
3823f. Fixed a bug that under some circumstances caused an associative array to
3824 be converted to an indexed array.
3825
3826g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set
3827 $? to a value > 128.
3828
3829h. Fixed a bug that caused the shell to remove FIFOs associated with process
3830 substitution inside shell functions.
3831
3832i. Fixed a bug that caused terminal attributes to not be reset when the
3833 `read' builtin timed out.
3834
3835j. Fixed a bug in brace expansion that caused unwanted zero padding of the
3836 expanded terms.
3837
3838k. Fixed a bug that prevented the |& construct from working as intended when
3839 used with a simple command with additional redirections.
3840
8868edaf 3841l. Fixed a bug with the case statement ;& terminator that caused the shell to
0001803f
CR
3842 dereference a NULL pointer.
3843
3844m. Fixed a bug that caused assignment statements or redirections preceding
3845 a simple command name to inhibit alias expansion.
3846
3847n. Fixed the behavior of `set -u' to conform to the latest Posix interpretation:
3848 every expansion of an unset variable except $@ and $* will cause the
3849 shell to exit.
3850
3851o. Fixed a bug that caused double-quoted expansions of $* inside word
3852 expansions like ${x#$*} to not expand properly when $IFS is empty.
3853
3854p. Fixed a bug that caused traps to set $LINENO to the wrong value when they
3855 execute.
3856
3857q. Fixed a bug that caused off-by-one errors when computing history lines in
3858 the `fc' builtin.
3859
3860r. Fixed a bug that caused some terminating signals to not exit the shell
3861 quickly enough, forcing the kernel to send the signal (e.g., SIGSEGV)
3862 multiple times.
3863
3864s. Fixed a bug that caused the shell to attempt to add empty lines to the
3865 history list when reading here documents.
3866
3867t. Made some internal changes that dramatically speeds up sequential indexed
3868 array access.
3869
3870u. Fixed a bug that caused the shell to write past the end of a string when
3871 completing a double-quoted string ending in a backslash.
3872
3873v. Fixed a bug that caused the shell to replace too many characters when a
3874 pattern match was null in a ${foo//bar} expansion.
3875
3876w. Fixed bugs in the expansion of ** that caused duplicate directory names
3877 and the contents of the current directory to be omitted.
3878
3879x. Fixed a bug that caused $? to not be set correctly when referencing an
3880 unset variable with set -u and set -e enabled.
3881
3882y. Fixed a bug caused by executing an external program from the DEBUG trap
3883 while a pipeline was running. The effect was to disturb the pipeline
3884 state, occasionally causing it to hang.
3885
3886z. Fixed a bug that caused the ** glob expansion to dump core if it
3887 encountered an unsearchable directory.
3888
3889aa. Fixed a bug that caused `command -v' and `command -V' to not honor the
3890 path set by the -p option.
3891
3892bb. Fixed a bug that caused brace expansion to take place too soon in some
3893 compound array assignments.
3894
3895cc. Fixed a bug that caused programmable completion functions' changes to
3896 READLINE_POINT to not be reflected back to readline.
3897
3898dd. Fixed a bug that caused the shell to dump core if a trap was executed
3899 during a shell assignment statement.
3900
3901ee. Fixed an off-by-one error when computing the number of positional
3902 parameters for the ${@:0:n} expansion.
3903
3904ff. Fixed a problem with setting COMP_CWORD for programmable completion
3905 functions that could leave it set to -1.
3906
3907gg. Fixed a bug that caused the ERR trap to be triggered in some cases where
3908 `set -e' would not have caused the shell to exit.
3909
3910hh. Fixed a bug that caused changes made by `compopt' to not persist past the
3911 completion function in which compopt was executed.
3912
3913ii. Fixed a bug that caused the list of hostname completions to not be cleared
3914 when HOSTNAME was unset.
3915
3916jj. Fixed a bug that caused variable expansion in here documents to look in
3917 any temporary environment.
3918
3919kk. Bash and readline can now convert file names between precomposed and
3920 decomposed Unicode on Mac OS X ("keyboard" and file system forms,
3921 respectively). This affects filename completion (using new
3922 rl_filename_rewrite_hook), globbing, and readline redisplay.
3923
3924ll. The ERR and EXIT traps now see a non-zero value for $? when a parser
3925 error after set -e has been enabled causes the shell to exit.
3926
3927mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to
3928 not contain the correct number of digits.
3929
3930nn. Fixed a bug that caused the shell to free non-allocated memory when
3931 unsetting an associative array which had had a value implicitly assigned
3932 to index "0".
3933
3934oo. Fixed a memory leak in the ${!prefix@} expansion.
3935
3936pp. Fixed a bug that caused printf to not correctly report all write errors.
3937
3938qq. Fixed a bug that caused single and double quotes to act as delimiters
3939 when splitting a command line into words for programmable completion.
3940
3941rr. Fixed a bug that caused ** globbing that caused **/path/* to match every
3942 directory, not just those matching `path'.
3943
3944ss. Fixed a bug that caused the shell to dump core when running `help' without
3945 arguments if the terminal width was fewer than 7 characters.
3946
39472. Changes to Readline
3948
3949a. The SIGWINCH signal handler now avoids calling the redisplay code if
3950 one arrives while in the middle of redisplay.
3951
3952b. Changes to the timeout code to make sure that timeout values greater
3953 than one second are handled better.
3954
3955c. Fixed a bug in the redisplay code that was triggered by a prompt
3956 containing invisible characters exactly the width of the screen.
3957
3958d. Fixed a bug in the redisplay code encountered when running in horizontal
3959 scroll mode.
3960
3961e. Fixed a bug that prevented menu completion from properly completing
3962 filenames.
3963
3964f. Fixed a redisplay bug caused by a multibyte character causing a line to
3965 wrap.
3966
3967g. Fixed a bug that caused key sequences of two characters to not be
3968 recognized when a longer sequence identical in the first two characters
3969 was bound.
3970
3971h. Fixed a bug that caused history expansion to be attempted on $'...'
3972 single-quoted strings.
3973
3974i. Fixed a bug that caused incorrect redisplay when the prompt contained
3975 multibyte characters in an `invisible' sequence bracketed by \[ and
3976 \].
3977
3978j. Fixed a bug that caused history expansion to short-circuit after
3979 encountering a multibyte character.
3980
39813. New Features in Bash
3982
3983a. Here-documents within $(...) command substitutions may once more be
3984 delimited by the closing right paren, instead of requiring a newline.
3985
3986b. Bash's file status checks (executable, readable, etc.) now take file
3987 system ACLs into account on file systems that support them.
3988
3989c. Bash now passes environment variables with names that are not valid
3990 shell variable names through into the environment passed to child
3991 processes.
3992
3993d. The `execute-unix-command' readline function now attempts to clear and
3994 reuse the current line rather than move to a new one after the command
3995 executes.
3996
3997e. `printf -v' can now assign values to array indices.
3998
3999f. New `complete -E' and `compopt -E' options that work on the "empty"
4000 completion: completion attempted on an empty command line.
4001
4002g. New complete/compgen/compopt -D option to define a `default' completion:
4003 a completion to be invoked on command for which no completion has been
4004 defined. If this function returns 124, programmable completion is
4005 attempted again, allowing a user to dynamically build a set of completions
4006 as completion is attempted by having the default completion function
4007 install individual completion functions each time it is invoked.
4008
4009h. When displaying associative arrays, subscripts are now quoted.
4010
4011i. Changes to dabbrev-expand to make it more `emacs-like': no space appended
4012 after matches, completions are not sorted, and most recent history entries
4013 are presented first.
4014
4015j. The [[ and (( commands are now subject to the setting of `set -e' and the
4016 ERR trap.
4017
4018k. The source/. builtin now removes NUL bytes from the file before attempting
4019 to parse commands.
4020
4021l. There is a new configuration option (in config-top.h) that forces bash to
4022 forward all history entries to syslog.
4023
4024m. A new variable $BASHOPTS to export shell options settable using `shopt' to
4025 child processes.
4026
4027n. There is a new confgure option that forces the extglob option to be
4028 enabled by default.
4029
4030o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
4031 output to that file descriptor.
4032
4033p. If the optional left-hand-side of a redirection is of the form {var}, the
4034 shell assigns the file descriptor used to $var or uses $var as the file
4035 descriptor to move or close, depending on the redirection operator.
4036
4037q. The < and > operators to the [[ conditional command now do string
4038 comparison according to the current locale.
4039
4040r. Programmable completion now uses the completion for `b' instead of `a'
4041 when completion is attempted on a line like: a $(b c.
4042
4043s. Force extglob on temporarily when parsing the pattern argument to
4044 the == and != operators to the [[ command, for compatibility.
4045
4046t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is
4047 received and a trap on SIGCHLD is set to be Posix-mode only.
4048
4049u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS
4050 characters, ignoring delimiters like newline.
4051
40524. New Features in Readline
4053
4054a. New bindable function: menu-complete-backward.
4055
4056b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
4057 and C-p to menu-complete-backward.
4058
4059c. When in vi command mode, repeatedly hitting ESC now does nothing, even
4060 when ESC introduces a bound key sequence. This is closer to how
4061 historical vi behaves.
4062
4063d. New bindable function: skip-csi-sequence. Can be used as a default to
4064 consume key sequences generated by keys like Home and End without having
4065 to bind all keys.
4066
4067e. New application-settable function: rl_filename_rewrite_hook. Can be used
4068 to rewite or modify filenames read from the file system before they are
4069 compared to the word to be completed.
4070
4071f. New bindable variable: skip-completed-text, active when completing in the
4072 middle of a word. If enabled, it means that characters in the completion
4073 that match characters in the remainder of the word are "skipped" rather
4074 than inserted into the line.
4075
4076g. The pre-readline-6.0 version of menu completion is available as
4077 "old-menu-complete" for users who do not like the readline-6.0 version.
4078
4079h. New bindable variable: echo-control-characters. If enabled, and the
4080 tty ECHOCTL bit is set, controls the echoing of characters corresponding
4081 to keyboard-generated signals.
4082
4083i. New bindable variable: enable-meta-key. Controls whether or not readline
4084 sends the smm/rmm sequences if the terminal indicates it has a meta key
4085 that enables eight-bit characters.
4086
4087------------------------------------------------------------------------------
17345e5a
JA
4088This document details the changes between this version, bash-4.0-release,
4089and the previous version, bash-4.0-rc1.
4090
40911. Changes to Bash
4092
4093a. Changed the message printed when setlocale(3) fails to only include the
4094 strerror error text if the call changes errno.
4095
4096b. Changed trap command execution to reset the line number before running a
4097 trap (except DEBUG and RETURN traps).
4098
4099c. Fixed behavior of case-modifiying word expansions to not work on
4100 individual words within a variable's value.
4101
4102d. Fixed a bug that caused mapfile to not be interruptible when run in an
4103 interactive shell.
4104
4105e. Fixed a bug that caused mapfile to not run callbacks for the first line
4106 read.
4107
4108f. Fixed a bug that caused mapfile to not honor EOF typed in an interactive
4109 shell.
4110
4111g. Fixed the coprocess reaping code to not run straight from a signal handler.
4112
4113h. Fixed a bug that caused printf -b to ignore the first % conversion specifier
4114 in the format string on 64-bit systems.
4115
4116i. Fixed a bug that caused incorrect word splitting when `:', `=', or `~'
4117 appeared in $IFS.
4118
4119j. Fixed a bug that caused data corruption in the programmable completion code
4120 when a shell function called from a completion aborted execution.
4121
4122k. Fixed a bug that caused the CPU usage reported by the `time' builtin to be
4123 capped at 100%.
4124
4125l. Changed behavior of shell when -e option is in effect to reflect consensus
4126 of Posix shell standardization working group.
4127
4128m. Fixed a bug introduced in bash-4.0-alpha that caused redirections to not
4129 be displayed by `type' or `declare' when appearing in functions under
4130 certain circumstances.
4131
41322. Changes to Readline
4133
4134a. Fixed a bug that caused !(...) extended glob patterns to inhibit later
4135 history expansion.
4136
4137b. Reworked the signal handling to avoid calling disallowed functions from a
4138 signal handler.
4139
41403. New Features in Bash
4141
4142a. `readarray' is now a synonym for `mapfile'.
4143------------------------------------------------------------------------------
3185942a
JA
4144This document details the changes between this version, bash-4.0-rc1,
4145and the previous version, bash-4.0-beta2.
4146
41471. Changes to Bash
4148
4149a. Fixed a bug that caused parsing errors when a $()-style command
4150 substitution was follwed immediately by a quoted newline.
4151
4152b. Fixed a bug that caused extended shell globbing patterns beginning with
4153 `*(' to not work when used with pattern substitution word expansions.
4154
4155------------------------------------------------------------------------------
4156This document details the changes between this version, bash-4.0-beta2,
4157and the previous version, bash-4.0-beta.
4158
41591. Changes to Bash
4160
4161a. Fixed a bug that caused failed word expansions to set $? but not
4162 PIPESTATUS.
4163
4164b. Changed filename completion to quote the tilde in a filename with a
4165 leading tilde that exists in the current directory.
4166
4167c. Fixed a bug that caused a file descriptor leak when performing
4168 redirections attached to a compound command.
4169
4170d. Fixed a bug that caused expansions of $@ and $* to not exit the shell if
4171 the -u option was enabled and there were no posititional parameters.
4172
4173e. Fixed a bug that resulted in bash not terminating immediately if a
4174 terminating signal was received while performing output.
4175
4176f. Fixed a bug that caused the shell to crash after creating 256 process
4177 substitutions during word completion.
4178
41792. Changes to Readline
4180
4181a. Fixed a bug that caused redisplay errors when using prompts with invisible
4182 characters and numeric arguments to a command in a multibyte locale.
4183
4184b. Fixed a bug that caused redisplay errors when using prompts with invisible
4185 characters spanning more than two physical screen lines.
4186
4187------------------------------------------------------------------------------
4188This document details the changes between this version, bash-4.0-beta,
17345e5a 4189and the previous version, bash-4.0-alpha.
3185942a
JA
4190
41911. Changes to Bash
4192
4193a. Fixed a typo that caused a variable to be used before initialization
4194 while parsing Posix-style command substitutions.
4195
4196b. Fixed a bug that caused stray ^? when the expansion of a parameter used
4197 as part of a pattern removal expansion is empty, but part of a non-
4198 empty string.
4199
4200c. Fixed a bug that could cause strings not converted to numbers by strtol
4201 to be treated as if the conversion had been successful.
4202
4203d. The `return' builtin now accepts no options and requires a `--' before
4204 a negative return value, as Posix requires.
4205
4206e. Fixed a bug that caused local variables to be created with the empty
4207 string for a value rather than no value.
4208
4209f. Changed behavior so the shell now acts as if it received an interrupt
4210 when a pipeline is killed by SIGINT while executing a list.
4211
4212g. Fixed a bug that caused `declare var' and `typeset var' to initialize
4213 `var' to the empty string.
4214
4215h. Changed `bind' builtin to print a warning but proceed if invoked when
4216 line editing is not active.
4217
4218i. Fixed a bug that caused the shell to exit when the `errexit' option is
4219 set and a command in a pipeline returns a non-zero exit status.
4220
4221j. Fixed a bug that caused the shell to not run the exit trap in a command
4222 run with `bash -c' under some circumstances.
4223
4224k. Fixed a bug that caused parser errors to occasionally not set $? when
4225 running commands with `eval'.
4226
4227l. Fixed a bug that caused stray control characters when evaluating compound
4228 array assignments containing $'\x7f' escapes.
4229
4230m. Fixed a bug that caused redirections involving file descriptor 10 as the
4231 target to behave incorrectly.
4232
4233n. Fixed a bug that could cause memory to be freed multiple times when
4234 assigning to COMP_WORDBREAKS.
4235
4236o. Fixed a bug that could cause NULL pointer dereferences when COMP_WORDBREAKS
4237 was unset.
4238
42392. Changes to Readline
4240
42413. New Features in Bash
4242
4243a. A value of 0 for the -t option to `read' now returns success if there is
4244 input available to be read from the specified file descriptor.
4245
4246b. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
4247 mode.
4248
4249c. New bindable readline functions shell-forward-word and shell-backward-word,
4250 which move forward and backward words delimited by shell metacharacters
4251 and honor shell quoting.
4252
4253d. New bindable readline functions shell-backward-kill-word and shell-kill-word
4254 which kill words backward and forward, but use the same word boundaries
4255 as shell-forward-word and shell-backward-word.
4256
42574. New Features in Readline
4258
4259a. If the kernel supports it, readline displays special characters
4260 corresponding to a keyboard-generated signal when the signal is received.
4261
4262------------------------------------------------------------------------------
4263This document details the changes between this version, bash-4.0-alpha,
4264and the previous version, bash-3.2-release.
4265
42661. Changes to Bash
4267
4268a. Fixed several bugs in old-style `` command substitution parsing, including
4269 comment parsing and quoted string handling.
4270
4271b. Fixed problems parsing arguments to the [[ command's =~ regular expression
4272 matching operator: metacharacter and whitespace parsing.
4273
4274c. Fixed a bug that caused the shell to inappropriately reuse high-numbered
4275 file descriptors it used internally.
4276
4277d. Fixed a bug in pattern replacement word expansions that caused a `/' as
4278 the first character of an expanded pattern to be mistaken for a global
4279 replacement specifier.
4280
4281e. Fixed several problems with the asprintf and snprintf replacement functions
4282 that caused hangs and crashes.
4283
4284f. Fixed a bug in the calculation of the current and previous job that caused
4285 it to refer to incorrect jobs.
4286
4287g. Fixed a bug in the check for the validity of a hashed command pathname that
4288 caused unnecessary hash table deletions and additions.
4289
4290h. Fixed a bug that caused child processes to inherit the wrong value for $!.
4291
4292i. Fixed a bug that caused `.' to fail to read and execute commands from non-
4293 regular files such as devices or named pipes.
4294
4295j. Fixed a bug in printf formatting for the %x and %X expansions that occurred
4296 on some systems.
4297
4298k. Fixed a bug that caused the shell to crash when creating temporary files if
4299 $TMPDIR named a non-writable directory.
4300
4301l. Fixed a bug that caused the shell to ignore $TMPDIR when creating temporary
4302 files under some circumstances.
4303
4304m. Fixed a bug that caused named pipes created by process substitution to not
4305 be cleaned up.
4306
4307n. Fixed a bug that caused HISTTIMEFORMAT to not be honored when it appeared
4308 in the initial shell environment.
4309
4310o. Fixed several bugs in the expansion of $* and $@ (quoted and unquoted)
4311 when IFS is null or contains non-whitespace characters; the same changes
4312 apply to arrays subscripted with * or @.
4313
4314p. Fixed several problems with pattern substitution expansions on the
4315 positional parameters and arrays subscripted with * or @ that occurred
4316 when $IFS was set to the empty string.
4317
4318q. Made a change to the default locale initialization code that should
4319 result in better behavior from the locale-aware library functions.
4320
4321r. Fixed a bug that caused compacting the jobs list to drop jobs.
4322
4323s. Fixed a bug that caused jumps back to the top-level processing loop from
4324 a builtin command to leave the shell in an inconsistent state.
4325
4326t. Fixed a bug that caused characters that would be escaped internally to be
4327 doubled when escaped with a backslash.
4328
4329u. Fixed the initialization of mailboxes to not cause maildirs to be read
4330 (and stat(2) called for every message file) at shell startup.
4331
4332v. Fixed a bug that caused the shell to not display $PS2 when the read builtin
4333 reads a line continued with a backslash.
4334
4335w. Fixed a bug that caused errors in word splitting when $IFS contained
4336 characters used for internal quoting.
4337
4338x. Fixed bugs that caused problems with output from shell builtins not being
4339 completely displayed on some systems.
4340
4341y. Fixed a bug that caused output to be lost when a redirection is acting on
4342 the shell's output file descriptor.
4343
4344z. Fixed bugs caused by shell builtins not checking for all write errors.
4345
4346aa. Fixed a problem that caused the shell to dump core if expansions on the
4347 pattern passed to the pattern removal word expansions resulted in expansion
4348 errors.
4349
4350bb. Fixed a bug that caused bash to loop infinitely after creating and
4351 waiting for 4096 jobs.
4352
4353cc. Fixed a bug that caused bash to lose the status of a background job under
4354 certain circumstances.
4355
4356dd. Fixed a bug that caused bash to not look in the temporary environment
4357 when performing variable lookup under certain circumstances.
4358
4359ee. Fixed a bug that caused bash to close file descriptors greater than 10
4360 when they were used in redirections.
4361
4362ff. Fixed a problem that caused the shell to attempt to read from the standard
4363 input when called as `bash -i script'.
4364
4365gg. Fixed a memory leak and variable initialization problems when the -v option
4366 was supplied to `printf' that could cause incorrect results.
4367
4368hh. Fixed a bug that caused the `read' builtin to count bytes when the -n option
4369 was supplied, rather than (possibly multibyte) characters.
4370
4371ii. Fixed a bug when displaying a function due to not converting the function
4372 to an external form.
4373
4374jj. Changed job control initialization to ensure that the shell has a tty
4375 as its controlling terminal before enabling job control.
4376
4377kk. Fixed a bug with the `test' builtin that caused it to misinterpret
4378 arguments beginning with `-' but containing more than one character.
4379
4380ll. Fixed bug that could cause the shell to dump core in certain cases where
4381 a command sets the SIGINT disposition to the default.
4382
4383mm. Fixed a bug in the pattern replacement (affecting both word expansion
4384 and the `fc' builtin) that occurred when the pattern and replacement
4385 strings were empty.
4386
4387nn. Fixed a bug that caused an arithmetic evaluation error to disable all
4388 further evaluation.
4389
4390oo. Fixed a bug in pathname expansion that caused it to interpret backslashes
4391 in the pathname as quoting characters.
4392
4393pp. Fixed a bug in the replacement getcwd() implementation that could cause
4394 memory to be overwritten.
4395
4396qq. When in Posix mode, the `ulimit' builtin now uses a block size of 512 for
4397 the `-c' and `-f' options.
4398
4399rr. Brace expansion now allows process substitutions to pass through unchanged.
4400
4401ss. Fixed a problem in the command name completion code to avoid quoting
4402 escaped special characters twice when the command name begins with a tilde.
4403
4404tt. Fixed a problem in the printf builtin that resulted in single-byte
4405 output for the "'" escape, even when using multibyte characters.
4406
4407uu. Fixed a bug that caused the failure exit status to be lost when redirections
4408 attached to a compound command failed.
4409
4410vv. Fixed a bug that caused the internal random number generator to not be
4411 re-seeded correctly when creating a subshell.
4412
4413ww. Fixed a bug that could cause the bash replacement getcwd to overwrite
4414 memory.
4415
4416xx. Fixed a bug that caused the shell to not receive SIGINT if it was sent
4417 while the shell was waiting for a command substitution to terminate, and
4418 make sure the exit status is correct when it does.
4419
4420yy. Fixed a bug that resulted in the second and subsequent children spawned
4421 by a shell begun to run a command substitution being placed into the
4422 wrong process group.
4423
4424zz. Fixed a bug that caused the results of successful tilde expansion to be
4425 subject to pathname expansion and word splitting.
4426
4427aaa. Fixed a bug that could cause the shell to hang if it encountered an
4428 error that caused it to jump back to the top processing loop during a
4429 command substitution or `eval' command.
4430
4431bbb. Fixed a bug that caused the `read' builtin to use the tty's attributes
4432 instead of those of the file descriptor passed with the -u option when
4433 processing the -n and -d options.
4434
4435ccc. Fixed a bug that caused incorrect expansion of ${array[@]:foo} if the
4436 first character of $IFS was not whitespace.
4437
4438ddd. Fixed a bug that occurred when scanning for the ending delimiter of a
4439 ${parameter/pat/sub} expansion.
4440
4441eee. Fixed a bug that caused the shell to inappropriately expand command
4442 substitutions in words when expanding directory names for completion.
4443
4444fff. Fixed a bug that caused the `fc' builtin to look too far back in the
4445 history list under certain circumstances.
4446
4447ggg. Fixed a bug that caused a shell running in Posix mode to search $PWD for
4448 a file specified as an argument to source/. when the file was not found
4449 in $PATH.
4450
4451hhh. Fixed a bug that caused the shell to modify the case of a command word
4452 found via command completion when the shell was performing case-
4453 insensitive completion.
4454
4455iii. Fixed a bug that caused the shell to search $PATH for an argument to
4456 source/. even when it contained a `/'.
4457
4458jjj. Fixed a bug that caused brace expansion to misorder expansions when the
4459 locale did not have a collating order like aAbBcC...zZ.
4460
4461kkk. Fixed a bug that did not allow `set +o history' to have any effect when
4462 run in a startup file or from a sourced file.
4463
4464lll. Fixed a bug with the precedence of the ?: conditional arithmetic operator.
4465
4466mmm. Fixed a bug that caused side effects of temporary variable assignments
4467 to persist in the shell environment.
4468
4469nnn. Fixed a bug that caused the terminal to be left in non-canonical mode
4470 when using editing commands that invoke the an editor on the current
4471 command line.
4472
4473ooo. Fixed a bug that caused globbing characters and characters in $IFS to not
4474 be quoted appropriately when displaying assignment statements.
4475
4476ppp. Fixed a bug that caused the `-e' option to be inherited when sourcing a
4477 file or evaluating a command with `eval' even if the return value of the
4478 command was supposed to be ignored.
4479
4480qqq. Fixed a bug that caused the shell to attempt to created variables with
4481 invalid names if such names appeared in the initial environment.
4482
4483rrr. Fixed a bug with quote removal in strings where the final character is a
4484 backslash.
4485
4486sss. Fixed a bug that caused the effects of special variables to persist even
4487 when the variables were unset as part of the shell reinitializing itself
4488 to execute a shell script.
4489
4490ttt. Fixed a bug that caused the history to not be saved after `history -c' or
4491 `history -d' was executed until a sufficient number of commands had been
4492 saved to the history.
4493
4494uuu. Bash now parses command substitutions according to Posix rules: parsing
4495 the command contained in $() to find the closing delimiter.
4496
4497vvv. Fixed a bug that caused traps on SIGCHLD set in a SIGCHLD handler to
4498 not persist.
4499
4500www. Fixed a bug that didn't allow SIGCHLD to interrupt the `wait' builtin
4501 as Posix specifies.
4502
4503xxx. Invalid numeric arguments to shell builtins no longer cause the shell to
4504 short-circuit any executing compound command.
4505
4506yyy. Fixed a bug that caused the exit status to be lost when `break' was
4507 used to short-circuit a loop's execution.
4508
4509zzz. Fixed a bug that caused stray ^? characters to be left in expansions of
4510 "${array[*]}".
4511
4512aaaa. Bash now prints better error messages for here documents terminated by
4513 EOF and for identifying the incorrect token in an invalid arithmetic
4514 expression.
4515
4516bbbb. Fixed a bug in the variable length word expansion that caused it to
4517 incorrectly calculate the number of multibyte characters.
4518
4519cccc. Fixed a race condition that could result in the top-level shell setting
4520 the terminal's process group to an incorrect value if the process
4521 group was changed by a child of a child of the shell.
4522
4523dddd. Fixed a bug that caused here documents belonging to commands within a
4524 compound command to be displayed in a syntactially-incorrect form, which
4525 prevented them from being re-read as input.
4526
4527eeee. The shell displays more warnings about failures to set the locale.
4528
4529ffff. Fixed a bug that caused the body of a here-document to not be saved to
4530 the history list.
4531
4532gggg. Fixed a bug that caused configure to incorrectly conclude that FreeBSD
4533 had /dev/fd available, resulting in problems with process substitution.
4534
45352. Changes to Readline
4536
4537a. Fixed a number of redisplay errors in environments supporting multibyte
4538 characters.
4539
4540b. Fixed bugs in vi command mode that caused motion commands to inappropriately
4541 set the mark.
4542
4543c. When using the arrow keys in vi insertion mode, readline allows movement
4544 beyond the current end of the line (unlike command mode).
4545
4546d. Fixed bugs that caused readline to loop when the terminal has been taken
4547 away and reads return -1/EIO.
4548
4549e. Fixed bugs in redisplay occurring when displaying prompts containing
4550 invisible characters.
4551
4552f. Fixed a bug that caused the completion append character to not be reset to
4553 the default after an application-specified completion function changed it.
4554
4555g. Fixed a problem that caused incorrect positioning of the cursor while in
4556 emacs editing mode when moving forward at the end of a line while using
4557 a locale supporting multibyte characters.
4558
4559h. Fixed an off-by-one error that caused readline to drop every 511th
4560 character of buffered input.
4561
4562i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up.
4563
4564j. Fixed redisplay bugs caused by multiline prompts with invisible characters
4565 or no characters following the final newline.
4566
4567k. Fixed redisplay bug caused by prompts consisting solely of invisible
4568 characters.
4569
4570l. Fixed a bug in the code that buffers characters received very quickly in
4571 succession which caused characters to be dropped.
4572
4573m. Fixed a bug that caused readline to reference uninitialized data structures
8868edaf 4574 if it received a SIGWINCH before completing initialization.
3185942a
JA
4575
4576n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly
4577 and therefore unrepeatable.
4578
4579o. Fixed a bug that caused readline to disable echoing when it was being used
4580 with an output file descriptor that was not a terminal.
4581
4582p. Readline now blocks SIGINT while manipulating internal data structures
4583 during redisplay.
4584
4585q. Fixed a bug in redisplay that caused readline to segfault when pasting a
4586 very long line (over 130,000 characters).
4587
4588r. Fixed bugs in redisplay when using prompts with no visible printing
4589 characters.
4590
45913. New Features in Bash
4592
4593a. When using substring expansion on the positional parameters, a starting
4594 index of 0 now causes $0 to be prefixed to the list.
4595
4596b. The `help' builtin now prints its columns with entries sorted vertically
4597 rather than horizontally.
4598
4599c. There is a new variable, $BASHPID, which always returns the process id of
4600 the current shell.
4601
4602d. There is a new `autocd' option that, when enabled, causes bash to attempt
4603 to `cd' to a directory name that is supplied as the first word of a
4604 simple command.
4605
4606e. There is a new `checkjobs' option that causes the shell to check for and
4607 report any running or stopped jobs at exit.
4608
4609f. The programmable completion code exports a new COMP_TYPE variable, set to
4610 a character describing the type of completion being attempted.
4611
4612g. The programmable completion code exports a new COMP_KEY variable, set to
4613 the character that caused the completion to be invoked (e.g., TAB).
4614
4615h. If creation of a child process fails due to insufficient resources, bash
4616 will try again several times before reporting failure.
4617
4618i. The programmable completion code now uses the same set of characters as
4619 readline when breaking the command line into a list of words.
4620
4621j. The block multiplier for the ulimit -c and -f options is now 512 when in
4622 Posix mode, as Posix specifies.
4623
4624k. Changed the behavior of the read builtin to save any partial input received
4625 in the specified variable when the read builtin times out. This also
4626 results in variables specified as arguments to read to be set to the empty
4627 string when there is no input available. When the read builtin times out,
4628 it returns an exit status greater than 128.
4629
4630l. The shell now has the notion of a `compatibility level', controlled by
4631 new variables settable by `shopt'. Setting this variable currently
4632 restores the bash-3.1 behavior when processing quoted strings on the rhs
4633 of the `=~' operator to the `[[' command.
4634
4635m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number
4636 of threads) options.
4637
4638n. The -p option to `declare' now displays all variable values and attributes
4639 (or function values and attributes if used with -f).
4640
4641o. There is a new `compopt' builtin that allows completion functions to modify
4642 completion options for existing completions or the completion currently
4643 being executed.
4644
4645p. The `read' builtin has a new -i option which inserts text into the reply
4646 buffer when using readline.
4647
4648q. A new `-E' option to the complete builtin allows control of the default
4649 behavior for completion on an empty line.
4650
4651r. There is now limited support for completing command name words containing
4652 globbing characters.
4653
4654s. Changed format of internal help documentation for all builtins to roughly
4655 follow man page format.
4656
4657t. The `help' builtin now has a new -d option, to display a short description,
4658 and a -m option, to print help information in a man page-like format.
4659
4660u. There is a new `mapfile' builtin to populate an array with lines from a
4661 given file.
4662
4663v. If a command is not found, the shell attempts to execute a shell function
4664 named `command_not_found_handle', supplying the command words as the
4665 function arguments.
4666
4667w. There is a new shell option: `globstar'. When enabled, the globbing code
4668 treats `**' specially -- it matches all directories (and files within
4669 them, when appropriate) recursively.
4670
4671x. There is a new shell option: `dirspell'. When enabled, the filename
4672 completion code performs spelling correction on directory names during
4673 completion.
4674
4675y. The `-t' option to the `read' builtin now supports fractional timeout
4676 values.
4677
4678z. Brace expansion now allows zero-padding of expanded numeric values and
4679 will add the proper number of zeroes to make sure all values contain the
4680 same number of digits.
4681
4682aa. There is a new bash-specific bindable readline function: `dabbrev-expand'.
4683 It uses menu completion on a set of words taken from the history list.
4684
4685bb. The command assigned to a key sequence with `bind -x' now sets two new
4686 variables in the environment of the executed command: READLINE_LINE_BUFFER
4687 and READLINE_POINT. The command can change the current readline line
4688 and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT,
4689 respectively.
4690
0001803f 4691cc. There is a new &>> redirection operator, which appends the standard output
3185942a
JA
4692 and standard error to the named file.
4693
4694dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects
4695 the standard error for a command through a pipe.
4696
4697ee. The new `;&' case statement action list terminator causes execution to
4698 continue with the action associated with the next pattern in the
4699 statement rather than terminating the command.
4700
4701ff. The new `;;&' case statement action list terminator causes the shell to
4702 test the next set of patterns after completing execution of the current
4703 action, rather than terminating the command.
4704
4705gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an
4706 integer value greater than zero, prompt expansion of \w and \W will
4707 retain only that number of trailing pathname components and replace
4708 the intervening characters with `...'.
4709
4710hh. There are new case-modifying word expansions: uppercase (^[^]) and
4711 lowercase (,[,]). They can work on either the first character or
4712 array element, or globally. They accept an optional shell pattern
4713 that determines which characters to modify. There is an optionally-
4714 configured feature to include capitalization operators.
4715
4716ii. The shell provides associative array variables, with the appropriate
4717 support to create, delete, assign values to, and expand them.
4718
4719jj. The `declare' builtin now has new -l (convert value to lowercase upon
4720 assignment) and -u (convert value to uppercase upon assignment) options.
4721 There is an optionally-configurable -c option to capitalize a value at
4722 assignment.
4723
4724kk. There is a new `coproc' reserved word that specifies a coprocess: an
4725 asynchronous command run with two pipes connected to the creating shell.
4726 Coprocs can be named. The input and output file descriptors and the
4727 PID of the coprocess are available to the calling shell in variables
4728 with coproc-specific names.
4729
47304. New Features in Readline
4731
4732a. A new variable, rl_sort_completion_matches; allows applications to inhibit
4733 match list sorting (but beware: some things don't work right if
4734 applications do this).
4735
4736b. A new variable, rl_completion_invoking_key; allows applications to discover
4737 the key that invoked rl_complete or rl_menu_complete.
4738
4739c. The functions rl_block_sigint and rl_release_sigint are now public and
4740 available to calling applications who want to protect critical sections
4741 (like redisplay).
4742
4743d. The functions rl_save_state and rl_restore_state are now public and
4744 available to calling applications; documented rest of readline's state
4745 flag values.
4746
4747e. A new user-settable variable, `history-size', allows setting the maximum
4748 number of entries in the history list.
4749
4750f. There is a new implementation of menu completion, with several improvements
4751 over the old; the most notable improvement is a better `completions
4752 browsing' mode.
4753
4754g. The menu completion code now uses the rl_menu_completion_entry_function
4755 variable, allowing applications to provide their own menu completion
4756 generators.
4757
4758h. There is support for replacing a prefix of a pathname with a `...' when
4759 displaying possible completions. This is controllable by setting the
4760 `completion-prefix-display-length' variable. Matches with a common prefix
4761 longer than this value have the common prefix replaced with `...'.
4762
4763i. There is a new `revert-all-at-newline' variable. If enabled, readline will
4764 undo all outstanding changes to all history lines when `accept-line' is
4765 executed.
4766
4767------------------------------------------------------------------------------
0628567a
JA
4768This document details the changes between this version, bash-3.2-release,
4769and the previous version, bash-3.2-beta.
4770
47711. Changes to Bash
4772
4773a. Fixed a bug that caused the temporary environment passed to a command to
4774 affect the shell's environment under certain circumstances.
4775
4776b. Fixed a bug in the printf builtin that caused the %q format specifier to
4777 ignore empty string arguments.
4778
4779c. Improved multibyte character environment detection at configuration time.
4780
4781d. Fixed a bug in the read builtin that left spurious escape characters in the
4782 input after processing backslashes when assigning to an array variable.
4783
47842. Changes to Readline
4785
4786a. Fixed a redisplay bug that occurred in multibyte-capable locales when the
4787 prompt was one character longer than the screen width.
4788------------------------------------------------------------------------------
4789This document details the changes between this version, bash-3.2-beta,
4790and the previous version, bash-3.2-alpha.
4791
47921. Changes to Bash
4793
4794a. Changed the lexical analyzer to treat locale-specific blank characters as
4795 white space.
4796
4797b. Fixed a bug in command printing to avoid confusion between redirections and
4798 process substitution.
4799
4800c. Fixed problems with cross-compiling originating from inherited environment
4801 variables.
4802
4803d. Added write error reporting to printf builtin.
4804
4805e. Fixed a bug in the variable expansion code that could cause a core dump in
4806 a multi-byte locale.
4807
4808f. Fixed a bug that caused substring expansion of a null string to return
4809 incorrect results.
4810
4811g. BASH_COMMAND now retains its previous value while executing commands as the
4812 result of a trap, as the documentation states.
4813
48142. Changes to Readline
4815
4816a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
4817 the prompt and input line multiple times.
4818
4819b. Fixed history expansion to not be confused by here-string redirection.
4820
4821c. Readline no longer treats read errors by converting them to newlines, as
4822 it does with EOF. This caused partial lines to be returned from readline().
4823
4824------------------------------------------------------------------------------
4825This document details the changes between this version, bash-3.2-alpha,
4826and the previous version, bash-3.1-release.
4827
48281. Changes to Bash
4829
4830a. Fixed a source bug that caused the minimal configuration to not compile.
4831
4832b. Fixed memory leaks in error handling for the `read' builtin.
4833
4834c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit
4835 status.
4836
4837d. Fixed some parsing problems with compound array assignments.
4838
4839e. Added additional configuration changes for: NetBSD (incomplete multibyte
4840 character support)
4841
4842f. Fixed two bugs with local array variable creation when shadowing a variable
4843 of the same name from a previous context.
4844
4845g. Fixed the `read' builtin to restore the correct set of completion functions
4846 if a timeout occurs.
4847
4848h. Added code to defer the initialization of HISTSIZE (and its stifling of the
4849 history list) until the history file is loaded, allowing a startup file to
4850 override the default value.
4851
4852i. Tightened up the arithmetic expression parsing to produce better error
4853 messages when presented with invalid operators.
4854
4855j. Fixed the cross-compilation support to build the signal list at shell
4856 invocation rather than compile time if cross-compiling.
4857
4858k. Fixed multibyte support for non-gcc compilers (or compilers that do not
4859 allow automatic array variable sizing based on a non-constant value).
4860
4861l. Several fixes to the code that manages the list of terminated jobs and
4862 their exit statuses, and the list of active and recently-terminated jobs
4863 to avoid pid aliasing/wraparound and allocation errors.
4864
4865m. Fixed a problem that allowed scripts to die due to SIGINT while waiting
4866 for children, even when started in the background or otherwise ignoring
4867 SIGINT.
4868
4869n. Fixed a bug that caused shells invoked as -/bin/bash from not being
4870 recognized as login shells.
4871
4872o. Fixed a problem that caused shells in the background to give the terminal
4873 to a process group other than the foreground shell process group.
4874
4875p. Fixed a problem with extracting the `varname' in ${#varname}.
4876
4877q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby
4878 calling functions that may not be called in a signal handler context --
4879 but set a flag and exit afterward (like SIGINT).
4880
4881r. Changed the brace expansion code to skip over braces that don't begin a
4882 valid matched brace expansion construct.
4883
4884s. Fixed `typeset' and `declare' to not require that their shell function
4885 operands to be valid shell identifiers.
4886
4887t. Changed `test' to use access(2) with a temporary uid/euid swap when testing
4888 file attributes and running setuid, and access(2) in most other cases.
4889
4890u. Changed completion code to not attempt command name completion on a line
4891 consisting solely of whitespace when no_empty_command_completion is set.
4892
4893v. The `hash' builtin now prints nothing in posix mode when the hash table is
4894 empty, and prints a message to that effect to stdout instead of stderr
4895 when not in posix mode.
4896
4897w. Fixed a bug in the extended pattern matching code that caused it to fail to
4898 match periods with certain patterns.
4899
4900x. Fixed a bug that caused the shell to dump core when performing filename
4901 generation in directories with thousands of files.
4902
4903y. Returned to the original Bourne shell rules for parsing ``: no recursive
4904 parsing of embedded quoted strings or ${...} constructs.
4905
8868edaf 4906z. The inheritance of the DEBUG, RETURN, and ERR traps is now dependent only
0628567a
JA
4907 on the settings of the `functrace' and `errtrace' shell options, rather
4908 than whether or not the shell is in debugging mode.
4909
4910aa. Fixed a problem with $HOME being converted to ~ in the expansion of
4911 members of the DIRSTACK array.
4912
4913bb. Fixed a problem with quoted arguments to arithmetic expansions in certain
4914 constructs.
4915
4916cc. The command word completion code now no longer returns matching directories
4917 while searching $PATH.
4918
4919dd. Fixed a bug with zero-padding and precision handling in snprintf()
4920 replacement.
4921
4922ee. Fixed a bug that caused the command substitution code not to take embedded
4923 shell comments into account.
4924
4925ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an
4926 arithmetic substitution.
4927
4928gg. Fixed a bug in the prompt expansion code that inappropriately added a
4929 \001 before a \002 under certain circumstances.
4930
4931hh. Fixed a bug that caused `unset LANG' to not properly reset the locale
4932 (previous versions would set the locale back to what it was when bash
4933 was started rather than the system's "native" locale).
4934
4935ii. Fixed a bug that could cause file descriptors > 10 to not be closed even
4936 when closed explicitly by a script.
4937
4938jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting
4939 inside double-quoted command substitutions.
4940
4941kk. Fixed a bug that could cause core dumps when `return' was executed as the
4942 last element of a pipeline inside a shell function.
4943
4944ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in
4945 the jobs list.
4946
49472. Changes to Readline
4948
4949a. Fixed a problem that caused segmentation faults when using readline in
4950 callback mode and typing consecutive DEL characters on an empty line.
4951
4952b. Fixed several redisplay problems with multibyte characters, all having to
4953 do with the different code paths and variable meanings between single-byte
4954 and multibyte character redisplay.
4955
4956c. Fixed a problem with key sequence translation when presented with the
4957 sequence \M-\C-x.
4958
4959d. Fixed a problem that prevented the `a' command in vi mode from being
4960 undone and redone properly.
4961
4962e. Fixed a problem that prevented empty inserts in vi mode from being undone
4963 properly.
4964
4965f. Fixed a problem that caused readline to initialize with an incorrect idea
4966 of whether or not the terminal can autowrap.
4967
4968g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
4969 convert-meta and use \e where appropriate.
4970
4971h. Changed the default filename completion function to call the filename
4972 dequoting function if the directory completion hook isn't set. This means
4973 that any directory completion hooks need to dequote the directory name,
4974 since application-specific hooks need to know how the word was quoted,
4975 even if no other changes are made.
4976
4977i. Fixed a bug with creating the prompt for a non-interactive search string
4978 when there are non-printing characters in the primary prompt.
4979
4980j. Fixed a bug that caused prompts with invisible characters to be redrawn
4981 multiple times in a multibyte locale.
4982
4983k. Fixed a bug that could cause the key sequence scanning code to return the
4984 wrong function.
4985
4986l. Fixed a problem with the callback interface that caused it to fail when
4987 using multi-character keyboard macros.
4988
4989m. Fixed a bug that could cause a core dump when an edited history entry was
4990 re-executed under certain conditions.
4991
4992n. Fixed a bug that caused readline to reference freed memory when attmpting
4993 to display a portion of the prompt.
4994
49953. New Features in Bash
4996
4997a. Changed the parameter pattern replacement functions to not anchor the
4998 pattern at the beginning of the string if doing global replacement - that
4999 combination doesn't make any sense.
5000
5001b. When running in `word expansion only' mode (--wordexp option), inhibit
5002 process substitution.
5003
5004c. Loadable builtins now work on MacOS X 10.[34].
5005
5006d. Shells running in posix mode no longer set $HOME, as POSIX requires.
5007
5008e. The code that checks for binary files being executed as shell scripts now
5009 checks only for NUL rather than any non-printing character.
5010
5011f. Quoting the string argument to the [[ command's =~ operator now forces
5012 string matching, as with the other pattern-matching operators.
5013
50144. New Features in Readline
5015
5016a. Calling applications can now set the keyboard timeout to 0, allowing
5017 poll-like behavior.
5018
5019b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
5020 the default last-ditch startup file.
5021
5022c. The history file reading functions now allow windows-like \r\n line
5023 terminators.
5024
5025------------------------------------------------------------------------------
95732b49
JA
5026This document details the changes between this version, bash-3.1-release,
5027and the previous version, bash-3.1-rc2.
5028
50291. Changes to Readline
5030
5031a. Several changes to the multibyte redisplay code to fix problems with
5032 prompts containing invisible characters.
5033
5034------------------------------------------------------------------------------
5035This document details the changes between this version, bash-3.1-rc2,
5036and the previous version, bash-3.1-rc1.
5037
50381. Changes to Bash
5039
5040a. Fixed a bug that caused a DEBUG trap to overwrite a command string that's
5041 eventually attached to a background job.
5042
5043b. Changed some code so that filenames with leading tildes with spaces in the
5044 name aren't tilde-expanded by the bash completion code.
5045
5046c. Fixed a bug that caused the pushd builtin to fail to change to
5047 directories with leading `-'.
5048
5049d. Fixed a small memory leak in the programmable completion code.
5050
50512. Changes to Readline
5052
5053a. Fixed a redisplay bug caused by moving the cursor vertically to a line
5054 with invisible characters in the prompt in a multibyte locale.
5055
5056b. Fixed a bug that could cause the terminal special chars to be bound in the
5057 wrong keymap in vi mode.
5058
50593. New Features in Bash
5060
5061a. If compiled for strict POSIX conformance, LINES and COLUMNS may now
5062 override the true terminal size.
5063
50644. New Features in Readline
5065
5066a. A new external application-controllable variable that allows the LINES
5067 and COLUMNS environment variables to set the window size regardless of
5068 what the kernel returns.
5069
5070------------------------------------------------------------------------------
5071This document details the changes between this version, bash-3.1-rc1,
5072and the previous version, bash-3.1-beta1.
5073
50741. Changes to Bash
5075
0628567a 5076a. Fixed a bug that could cause core dumps due to accessing the current
95732b49
JA
5077 pipeline while in the middle of modifying it.
5078
5079b. Fixed a bug that caused pathnames with backslashes still quoting characters
5080 to be passed to opendir().
5081
5082c. Command word completion now obeys the setting of completion-ignore-case.
5083
5084d. Fixed a problem with redirection that caused file descriptors greater than
5085 2 to be inappropriately marked as close-on-exec.
5086
5087e. In Posix mode, after `wait' is called to wait for a particular process
5088 explicitly, that process is removed from the list of processes known to
5089 the shell, and subsequent attempts to wait for it return errors.
5090
5091f. Fixed a bug that caused extended pattern matching to incorrectly scan
5092 backslash-escaped pattern characters.
5093
5094g. Fixed a synchronization problem that could cause core dumps when handling
5095 a SIGWINCH.
5096
5097h. Fixed a bug that caused an unmatched backquote to be accepted without an
5098 error when processing here documents.
5099
5100i. Fixed a small memory leak in the `cd' builtin.
5101
5102j. Fix for MacOS X so it gets the values for the HOSTTYPE, MACHTYPE, and
5103 OSTYPE variables at build time, to support universal binaries.
5104
5105k. Fixed a bug that could cause an exit trap to return the exit status of
5106 the trap command rather than the status as it was before the trap was
5107 run as the shell's exit status.
5108
51092. New Features in Bash
5110
51113. Changes to Readline
5112
5113a. Fixed a bug that caused reversing the incremental search direction to
5114 not work correctly.
5115
5116b. Fixed the vi-mode `U' command to only undo up to the first time insert mode
5117 was entered, as Posix specifies.
5118
5119c. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
5120 place.
5121
51224. New Features in Readline
5123
5124a. New application-callable auxiliary function, rl_variable_value, returns
5125 a string corresponding to a readline variable's value.
5126
5127b. When parsing inputrc files and variable binding commands, the parser
5128 strips trailing whitespace from values assigned to boolean variables
5129 before checking them.
5130
5131
5132------------------------------------------------------------------------------
5133This document details the changes between this version, bash-3.1-beta1,
5134and the previous version, bash-3.1-alpha1.
5135
51361. Changes to Bash
5137
5138a. Added some system-specific signal names.
5139
5140b. Fixed a typo in the ulimit builtin to make `x' the right option to
8868edaf 5141 manipulate the limit on file locks.
95732b49
JA
5142
5143c. Fixed a problem with using += to append to index 0 of an array variable
5144 when not using subscript syntax.
5145
5146d. A few changes to configure.in to remove calls to obsolete or outdated
5147 macros.
5148
5149e. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
5150 made when the variable is set in the temporary environment to a command.
5151
5152f. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
5153 made when the variable is modified using `printf -v'.
5154
5155g. The export environment is now remade on cygwin when HOME is changed, so
5156 DLLs bash is linked against pick up the new value. This fixes problems
5157 with tilde expansion when linking against and already-installed readline.
5158
5159h. Small fix to the logic for performing tilde expansion in posix mode, so
5160 expansion on the right-hand side of an assignment statement takes place.
5161
5162i. Fixed a bug that prevented redirections associated with a shell function
5163 from being executed when in a subshell.
5164
5165j. Fixed `source' and `.' builtins to not require an executable file when
5166 searching $PATH for a file to source.
5167
5168k. Fixed a bug that caused incorrect word splitting in a function when IFS
5169 was declared local, then unset.
5170
5171l. Fixed a problem with the `kill' builtin that prevented sending signals
5172 to a process group under certain circumstances when providing a pid < 0.
5173
5174m. When in POSIX mode, `pwd' now checks that the value it prints is the same
5175 directory as `.', even when displaying $PWD.
5176
5177n. Fixed a problem with the `read' builtin when reading a script from standard
5178 input and reading data from the same file.
5179
5180o. Fixed a problem with the `type' and `command' builtins that caused absolute
5181 pathnames to be displayed incorrectly.
5182
5183p. Some changes to the `bg' builtin for POSIX conformance.
5184
5185q. The `fc' builtin now removes the `fc' command that caused it to invoke an
5186 editor on specified history entries from the history entirely, rather than
5187 simply ignoring it.
5188
5189r. When in POSIX mode, the `v' command in vi editing mode simply invokes vi
5190 on the current command, rather than checking $FCEDIT and $EDITOR.
5191
5192s. Fixed a small memory leak in the pathname canonicalization code.
5193
5194t. Fixed a bug that caused the expanded value of a $'...' string to be
5195 incorrectly re-quoted if it occurred within a double-quoted ${...}
5196 parameter expansion.
5197
5198u. Restored default emacs-mode key binding of M-TAB to dynamic-complete-history.
5199
5200v. Fixed a bug that caused core dumps when interrupting loops running builtins
5201 on some systems.
5202
5203w. Make sure that some of the functions bash provides replacements for are
5204 not cpp defines.
5205
5206x. The code that scans embedded commands for the parser (`...` and $(...)) is
5207 now more aware of embedded comments and their effect on quoted strings.
5208
5209y. Changed the `-n' option to the `history' builtin to not reset the number of
5210 history lines read in the current session after reading the new lines from
5211 the history file if the history is being appended when it is written to
5212 the file, since the appending takes care of the problem that the adjustment
5213 was intended to solve.
5214
5215z. Improved the error message displayed when a shell script fails to execute
5216 because the environment and size of command line arguments are too large.
5217
5218aa. A small fix to make sure that $HISTCMD is evaluated whenever the shell is
5219 saving commands to the history list, not just when HISTSIZE is defined.
5220
52212. Changes to Readline
5222
5223a. The `change-case' command now correctly changes the case of multibyte
5224 characters.
5225
5226b. Changes to the shared library construction scripts to deal with Windows
5227 DLL naming conventions for Cygwin.
5228
5229c. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
5230 SIGWINCH.
5231
5232d. Fixed the non-incremental search code in vi mode to dispose of any current
5233 undo list when copying a line from the history into the current editing
5234 buffer.
5235
5236e. The variable assignment code now ignores whitespace at the end of lines
5237 when assigning to boolean variables.
5238
5239f. The `C-w' binding in incremental search now understands multibyte
5240 characters.
5241
52423. New Features in Bash
5243
5244a. A new configuration option, `--enable-strict-posix-default', which will
5245 build bash to be POSIX conforming by default.
5246
52474. New Features in Readline
5248
5249a. If the rl_completion_query_items is set to a value < 0, readline never
5250 asks the user whether or not to view the possible completions.
5251
5252------------------------------------------------------------------------------
5253This document details the changes between this version, bash-3.1-alpha1,
5254and the previous version, bash-3.0-release.
5255
52561. Changes to Bash
5257
5258a. Fixed a bug that caused bash to crash if referencing an unset local array.
5259
5260b. Fixed a problem that caused tilde expansion to not be performed before
5261 attempting globbing word completion.
5262
5263c. Fixed an incompatibility so that a first argument to trap that's a valid
5264 signal number will be trated as a signal rather than a command to execute.
5265
5266d. Fixed ${#word} expansion to correctly compute the length of a string
5267 containing multibyte characters.
5268
5269e. Fixed a bug that caused bash to not pass the correct flags for signal
5270 disposition to child processes.
5271
5272f. Fixed a bug that caused `fc -l' to list one too many history entries.
5273
5274g. Some fixes to `fc' for POSIX conformance.
5275
5276h. Some fixes to job status display for POSIX conformance.
5277
5278i. Fixed a bug that caused `command -v' to display output if a command was not
5279 found -- it should be silent.
5280
5281j. In POSIX mode, `type' and `command -[vV]' do not report non-executable
5282 files, even if the shell will attempt to execute them.
5283
5284k. Fixed a bug that caused the `==' operator to the [[ command to not attempt
5285 extended pattern matching.
5286
5287l. Fixed the brace expansion code to handle characters whose value exceeds 128.
5288
5289m. Fixed `printf' to handle strings with a leading `\0' whose length is
5290 non-zero.
5291
5292n. Fixed a couple of problems with brace expansion where `${' was handled
5293 incorrectly.
5294
5295o. Fixed off-by-one error when calculating the upper bound of `offset' when
5296 processing the ${array[@]:offset:length} expansion.
5297
5298p. System-specific configuration changes for: FreeBSD 5.x, Interix, MacOS X
5299 10.4, Linux 2.4+ kernels, Linux 3.x kernels, Dragonfly BSD, QNX 6.x,
5300 Cygwin
5301
5302q. Fixed a bug that caused the shell to ignore the status of the rightmost
5303 command in a pipeline when the `pipefail' option was enabled.
5304
5305r. Fixed a completion bug that caused core dumps when expanding a directory
5306 name.
5307
5308s. Fixed a bug that prevented `hash -d' from removing commands from the hash
5309 table.
5310
5311t. Fixed word splitting to avoid really bad quadratic performance when
5312 expanding long lists.
5313
5314u. Fixed a bug that caused negative offsets in substring expansion to use the
5315 wrong values.
5316
5317v. Fixed a bug in printf that caused it to not return failure on write errors.
5318
5319w. Fixed a bug that caused commands in subshells to not be properly timed.
5320
5321x. The shell parser no longer attempts to parse a compound assignment specially
5322 unless in a position where an assignment statement is acceptable or parsing
5323 arguments to a builtin that accepts assignment statements.
5324
5325y. Fixed a problem that caused a `case' statement to be added to the history
5326 incorrectly as a single command if the `case word' was on one line and the
5327 `in' on another.
5328
5329z. Fixed a problem that caused internal shell quoting characters to be
5330 incorrectly quoted with backslashes under some circumstances.
5331
5332aa. The shell now performs correct word splitting when IFS contains multibyte
5333 characters.
5334
5335bb. The mail checking code now resets the cached file information if the size
5336 drops to 0, even if the times don't change.
5337
5338cc. A completed command name that is found in $PATH as well as the name of a
5339 directory in the current directory no longer has a slash appended in certain
5340 circumstances: a single instance found in $PATH when `.' is not in $PATH,
5341 and multiple instances found in $PATH, even when `.' is in $PATH.
5342
5343dd. Incorporated tilde expansion into the word expansion code rather than as a
5344 separately-called function, fixing some cases where it was performed
5345 inappropriately (e.g., after the second `=' in an assignment statement or
5346 in a double-quoted parameter expansion).
5347
5348ee. Fixed several bugs encountered when parsing compound assignment statements,
5349 so that compound assignments appearing as arguments to builtins are no
5350 longer double-expanded.
5351
5352ff. Fixed a bug in the command execution code that caused asynchronous commands
5353 containing command substitutions to not put the terminal in the wrong
5354 process group.
5355
5356gg. Bash now handles the case where the WCONTINUED flag causes waitpid() to
5357 return -1/EINVAL at runtime as well as configuration time.
5358
5359hh. Fixed parser to generate an error when the pipeline `argument' to `!' or
5360 `time' is NULL.
5361
5362ii. The shell now takes a little more care when manipulating file descriptors
5363 greater than 9 with the `exec' builtin.
5364
5365jj. Fixed a bug that caused variable assignments preceding the `command' builtin
5366 preceding a special builtin to be preserved after the command completed in
5367 POSIX mode.
5368
5369kk. Fixed a bug that allowed variables beginning with a digit to be created.
5370
5371ll. Fixed a bug that caused a \<newline> to be removed when parsing a $'...'
5372 construct.
5373
5374mm. A shell whose name begins with `-' will now be a restricted shell if the
5375 remainder of the name indicates it should be restricted.
5376
5377nn. Fixed a bug that could cause a core dump if FUNCNAME were changed or unset
5378 during a function's execution.
5379
5380oo. Fixed a bug that caused executing a `return' in a function to not execute
5381 a RETURN trap. The RETURN trap is inherited by shell functions only if
5382 function tracing is globally enabled or has been enabled for that function.
5383
5384pp. Fixed cases where var[@] was not handled exactly like var, when var is a
5385 scalar variable.
5386
5387qq. Fixed a bug that caused the first character after a SIGINT to be discarded
5388 under certain circumstances.
5389
5390rr. Fixed exit status code so that a suspended job returns 128+signal as its
5391 exit status (preventing commands after it in `&&' lists from being
5392 executed).
5393
5394ss. Fixed a bug that caused the shell parser state to be changed by executing
5395 a shell function as a result of word completion.
5396
5397tt. Fixed a long-standing bug that caused '\177' characters in variable
5398 values to be discarded when expanded in double-quoted strings.
5399
5400uu. Fixed a bug that caused $RANDOM to be re-seeded multiple times in a
5401 subshell environment.
5402
5403vv. Extensive changes to the job management code to avoid the pid-reuse and
5404 pid-aliasing problems caused by retaining the exit status of too many jobs,
5405 but still retain as many background job statuses as POSIX requires.
5406
5407ww. Fixed a parser bug in processing \<newline> that caused things like
5408
5409 ((echo 5) \
5410 (echo 6))
5411
5412 to not work correctly.
5413
5414xx. `pwd -P' now sets $PWD to a directory name containing no symbolic links
5415 when in posix mode, as POSIX requires.
5416
5417yy. In posix mode, bash no longer sets $PWD to a name containing no symbolic
5418 links if a directory is chosen from $CDPATH.
5419
5420zz. The word splitting code now treats an IFS character that is not space,
5421 tab, or newline and any adjacent IFS white space as a single delimiter, as
5422 SUSv3/XPG6 require.
5423
5424aaa. The `read' builtin now checks whether or not the number of fields read is
5425 exactly the same as the number of variables instead of just assigning the
5426 rest of the line (minus any trailing IFS white space) to the last
5427 variable. This is what POSIX/SUS/XPG all require.
5428
5429bbb. Fixed a bug that caused `read' to always check whether or not fd 0 was a
5430 pipe, even when reading from another file descriptor.
5431
5432ccc. Fixed a bug that caused short-circuiting of execution even if the return
5433 value was being inverted.
5434
5435ddd. Fixed a bug that caused a core dump while decoding \W escapes in PS1 if
5436 PWD was unset.
5437
5438eee. Fixed a bug in `read' that counted internal quoting characters for the
5439 purposes of `read -n'.
5440
5441fff. Fixed a bug so that a function definition in a pipeline causes a child
5442 process to be forked at the right time.
5443
5444ggg. Bash will not attempt to link against a readline library that doesn't
5445 have rl_gnu_readline_p == 1.
5446
5447hhh. Fixed a bug that caused `read' to consume one too many characters when
5448 reading a fixed number of characters and the Nth character is a backslash.
5449
5450iii. Fixed a bug that caused `unset' on variables in the temporary environment
5451 to leave them set when `unset' completed.
5452
5453jjj. Fixed a bug that caused bash to close fd 2 if an `exec' failed and the
5454 shell didn't exit.
5455
5456kkk. The completion code is more careful to not turn `/' or `///' into `//',
5457 for those systems on which `//' has special meaning.
5458
5459lll. Fixed a bug that caused command substitution in asynchronous commands to
5460 close the wrong file descriptors.
5461
5462mmm. The shell no longer prints status messages about terminated background
5463 processes unless job control is active.
5464
5465nnn. Fixed a bug that prevented multiple consecutive invocations of `history -s'
5466 from adding all the commands to the history list.
5467
5468ooo. Added a couple of changes to make arithmetic expansion more consistent in
5469 all its contexts (still not perfect).
5470
5471ppp. Fixed a bug that caused the parser to occasionally not find the right
5472 terminating "`" in an old-style command substitution.
5473
5474qqq. Fixed a bug that caused core dumps when the shell was reading its non-
5475 interactive input from fd 0 and fd 0 was duplicated and restored using a
5476 combination of `exec' (to save) and redirection (to restore).
5477
5478rrr. Fixed a problem that caused loops in sourced scripts to not be cleaned
5479 up properly when a `return' is executed.
5480
5481sss. Change internal command substitution completion function to append a slash
5482 to directory names in the command.
5483
54842. Changes to Readline
5485
5486a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
5487 incorrectly.
5488
5489b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
5490 line correctly.
5491
5492c. Fixed a problem in computing the number of invisible characters on the first
5493 line of a prompt whose length exceeds the screen width.
5494
5495d. Fixed vi-mode searching so that failure preserves the current line rather
5496 than the last line in the history list.
5497
5498e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
5499 end-of-line when manipulating multibyte characters.
5500
5501f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
5502 end-of-line when manipulating multibyte characters.
5503
5504g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
5505 prompts longer than the screen width containing multibyte characters,
5506
5507h. Fix the calculation of the number of physical characters in the prompt
5508 string when it contains multibyte characters.
5509
5510i. A non-zero value for the `rl_complete_suppress_append' variable now causes
5511 no `/' to be appended to a directory name.
5512
5513j. Fixed forward-word and backward-word to work when words contained
5514 multibyte characters.
5515
5516k. Fixed a bug in finding the delimiter of a `?' substring when performing
5517 history expansion in a locale that supports multibyte characters.
5518
5519l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
5520
5521m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
5522 of the `convert-meta' variable.
5523
5524n. Fixed saving and restoring primary prompt when prompting for incremental
5525 and non-incremental searches; search prompts now display multibyte
5526 characters correctly.
5527
5528o. Fixed a bug that caused keys originally bound to self-insert but shadowed
5529 by a multi-character key sequence to not be inserted.
5530
5531p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
5532 dereferenced if NULL (matching the documentation).
5533
5534q. Extensive changes to readline to add enough state so that commands
5535 requiring additional characters (searches, multi-key sequences, numeric
5536 arguments, commands requiring an additional specifier character like
5537 vi-mode change-char, etc.) work without synchronously waiting for
5538 additional input.
5539
5540r. Lots of changes so readline builds and runs on MinGW.
5541
5542s. Readline no longer tries to modify the terminal settings when running in
5543 callback mode.
5544
5545t. The Readline display code no longer sets the location of the last invisible
5546 character in the prompt if the \[\] sequence is empty.
5547
55483. New Features in Bash
5549
5550a. Bash now understands LC_TIME as a special variable so that time display
5551 tracks the current locale.
5552
5553b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created
5554 as `invisible' variables and may not be unset.
5555
5556c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't
5557 try to interpret any options at all, as POSIX requires.
5558
5559d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.
5560
5561e. Fixed vi-mode word completion and glob expansion to perform tilde
5562 expansion.
5563
5564f. The `**' mathematic exponentiation operator is now right-associative.
5565
5566g. The `ulimit' builtin has new options: -i (max number of pending signals),
5567 -q (max size of POSIX message queues), and -x (max number of file locks).
5568
5569h. A bare `%' once again expands to the current job when used as a job
5570 specifier.
5571
5572i. The `+=' assignment operator (append to the value of a string or array) is
5573 now supported for assignment statements and arguments to builtin commands
5574 that accept assignment statements.
5575
5576j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.
5577
5578k. The `gnu_errfmt' option is enabled automatically if the shell is running
5579 in an emacs terminal window.
5580
5581l. New configuration option: --single-help-strings. Causes long help text
5582 to be written as a single string; intended to ease translation.
5583
5584m. The COMP_WORDBREAKS variable now causes the list of word break characters
5585 to be emptied when the variable is unset.
5586
5587n. An unquoted expansion of $* when $IFS is empty now causes the positional
5588 parameters to be concatenated if the expansion doesn't undergo word
5589 splitting.
5590
5591o. Bash now inherits $_ from the environment if it appears there at startup.
5592
5593p. New shell option: nocasematch. If non-zero, shell pattern matching ignores
5594 case when used by `case' and `[[' commands.
5595
5596q. The `printf' builtin takes a new option: -v var. That causes the output
5597 to be placed into var instead of on stdout.
5598
5599r. By default, the shell no longer reports processes dying from SIGPIPE.
5600
5601s. Bash now sets the extern variable `environ' to the export environment it
5602 creates, so C library functions that call getenv() (and can't use the
5603 shell-provided replacement) get current values of environment variables.
5604
56054. New Features in Readline
5606
5607a. The key sequence sent by the keypad `delete' key is now automatically
5608 bound to delete-char.
5609
5610b. A negative argument to menu-complete now cycles backward through the
5611 completion list.
5612
5613c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
5614 readline will bind the terminal special characters to their readline
5615 equivalents when it's called (on by default).
5616
5617d. New bindable command: vi-rubout. Saves deleted text for possible
5618 reinsertion, as with any vi-mode `text modification' command; `X' is bound
5619 to this in vi command mode.
5620
5621------------------------------------------------------------------------------
b80f6443
JA
5622This document details the changes between this version, bash-3.0-release,
5623and the previous version, bash-3.0-rc1.
5624
56251. Changes to Bash
5626
5627a. Fixed a boundary overrun that could cause segmentation faults when the
5628 completion code hands an incomplete construct to the word expansion
5629 functions.
5630
5631b. Changed posix mode behavior so that an error in a variable assignment
5632 preceding a special builtin causes a non-interactive shell to exit.
5633
5634c. Change the directory expansion portion of the completion code to not
5635 expand embedded command substitutions if the directory name appears in
5636 the file system.
5637
5638d. Fixed a problem that caused `bash -r' to turn on restrictions before
5639 reading the startup files.
5640
5641e. Fixed a problem with the default operation of the `umask' builtin.
5642
56432. Changes to Readline
5644
5645a. Fixed a problem with readline saving the contents of the current line
5646 before beginning a non-interactive search.
5647
5648b. Fixed a problem with EOF detection when using rl_event_hook.
5649
5650c. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
5651 arguments.
5652
5653------------------------------------------------------------------------------
5654This document details the changes between this version, bash-3.0-rc1,
5655and the previous version, bash-3.0-beta1.
5656
56571. Changes to Bash
5658
5659a. Fixed a bug that caused incorrect behavior when referecing element 0 of
5660 an array using $array, element 0 was unset, and `set -u' was enabled.
5661
5662b. System-specific changes for: SCO Unix 3.2, Tandem.
5663
5664c. Fixed a bug that caused inappropriate word splitting when a variable was
5665 expanded within a double-quoted string that also included $@.
5666
5667d. Fixed a bug that caused `pwd' to not display anything in physical mode
5668 when the file system had changed underneath the shell.
5669
5670e. Fixed a bug in the pre- and post- increment and decrement parsing in the
5671 expression evaluator that caused errors when the operands and corresponding
5672 operators were separated by whitespace.
5673
5674f. Fixed a bug that caused `history -p' to add an entry to the history list,
5675 counter to the documentation. (Keeps the history expansions invoked by
5676 emacs-mode command line editing from doing that as well.)
5677
5678g. Fixed a bug that could cause a core dump if `cd' is asked to print out a
5679 pathname longer than PATH_MAX characters.
5680
5681h. Fixed a bug that caused jobs to be put into the wrong process group under
5682 some circumstances after enabling job control with `set -m'.
5683
5684i. `unalias' now returns failure if no alias name arguments are supplied.
5685
5686j. Documented the characters not allowed to appear in an alias name.
5687
5688k. $* is no longer expanded as if in double quotes when it appears in the
5689 body of a here document, as the SUS seems to require.
5690
5691l. The `bashbug' script now uses a directory in $TMPDIR for exclusive
5692 access rather than trying to guess how the underlying OS provides for
5693 secure temporary file creation.
5694
5695m. Fixed a few problems with `cd' and `pwd' when asked to operate on pathnames
5696 longer than PATH_MAX characters.
5697
5698n. Fixed a memory leak caused when creating multiple local array variables
5699 with identical names.
5700
5701o. Fixed a problem with calls to getcwd() so that bash now operates better
5702 when the full pathname to the current directory is longer than PATH_MAX
5703 bytes.
5704
5705p. The `trap' builtin now reports an error if a single non-signal argument
5706 is specified.
5707
5708q. Fixed a bug that caused `umask' to not work correctly when presented
5709 with a mask of all 0s.
5710
5711r. When `getopts' reaches the end of options, OPTARG is unset, as POSIX
5712 appears to specify.
5713
5714s. Interactive mode now depends on whether or not stdin and stderr are
5715 connected to a tty; formerly it was stdin and stdout. POSIX requires
5716 this.
5717
5718t. Fixed vi-mode completion to work more as POSIX specifies (e.g., doing the
5719 right kind of filename generation).
5720
57212. Changes to Readline
5722
5723a. Fixed a problem that could cause readline to refer to freed memory when
5724 moving between history lines while doing searches.
5725
5726b. Improvements to the code that expands and displays prompt strings
5727 containing multibyte characters.
5728
5729c. Fixed a problem with vi-mode not correctly remembering the numeric argument
5730 to the last `c'hange command for later use with `.'.
5731
5732d. Fixed a bug in vi-mode that caused multi-digit count arguments to work
5733 incorrectly.
5734
5735e. Fixed a problem in vi-mode that caused the last text modification command
5736 to not be remembered across different command lines.
5737
5738f. Fixed problems with changing characters and changing case at the end of
5739 the line.
5740
57413. New Features in Bash
5742
5743a. The `jobs', `kill', and `wait' builtins now accept job control notation
5744 even if job control is not enabled.
5745
5746b. The historical behavior of `trap' that allows a missing `action' argument
5747 to cause each specified signal's handling to be reset to its default is
5748 now only supported when `trap' is given a single non-option argument.
5749
57504. New Features in Readline
5751
5752a. When listing completions, directories have a `/' appended if the
5753 `mark-directories' option has been enabled.
5754
5755------------------------------------------------------------------------------
5756This document details the changes between this version, bash-3.0-beta1,
5757and the previous version, bash-3.0-alpha.
5758
57591. Changes to Bash
5760
5761a. Fixes to build correctly when arrays are not compiled into the shell.
5762
5763b. Fixed command substitution to run any exit trap defined in the command
5764 substitution before returning; the exit trap is not inherited from the
5765 calling shell.
5766
5767c. Fixes to process group synchronization code so that every child process
5768 attempts to set the terminal's process group; fixes some synchronization
5769 problems on Linux kernels that schedule the child to always run before
5770 the parent.
5771
5772d. Fixed processing of octal and hex constants in printf builtin for POSIX.2
5773 compliance.
5774
5775e. Fixed a couple of core dumps in the pattern removal code.
5776
5777f. Fixes to the array subrange extraction code to deal better with sparse
5778 arrays.
5779
5780g. Parser errors and other errors that result in the shell exiting now cause
5781 the exit trap to be run.
5782
5783h. Change the command substitution completion functions to not append any
5784 closing quote, because it would be inserted a closing "`" or ")".
5785
5786i. Fix history initialization so assignments to $histchars made in startup
5787 files are honored.
5788
5789j. If an exit trap does not contain a call to `exit', the shell now uses
5790 the exit status of the last command executed before the trap as the exit
5791 status of the shell.
5792
5793k. The parser now prompts with $PS2 if it reads a newline while parsing a
5794 compound array assignment statement.
5795
5796l. When performing a compound array assignment, the parser doesn't treat
5797 words of the form [index]=value as assignments if they're the result of
5798 expansions.
5799
5800m. Fixed a bug that caused `return' executed in a trap command to make the
5801 shell think it was still running the trap.
5802
5803n. Fixed the value of errno set by the pathname canonicalization functions.
5804
5805o. Changed the grammar so that `time' alone on a line times a null command
5806 rather than being a syntax error.
5807
95732b49 5808p. The pattern substitution code no longer performs quote removal on the
b80f6443
JA
5809 pattern before trying to match it, as the pattern removal functions do.
5810
5811q. Fixed a bug that could cause core dumps when checking whether a quoted
5812 command name was being completed.
5813
5814r. Fixes to the pattern removal and pattern replacement expansions to deal
5815 with multibyte characters better (and faster).
5816
5817s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly
5818 multibyte) characters instead of raw bytes.
5819
5820t. Fixed a bug that caused some key bindings set in an inputrc to be ignored
5821 at shell startup.
5822
5823u. Fixed a bug that caused unsetting a local variable within a function to
5824 not work correctly.
5825
5826v. Fixed a bug that caused invalid variables to be created when using
5827 `read -a'.
5828
5829w. Fixed a bug that caused "$@" to expand incorrectly when used as the right
5830 hand side of a parameter expansion such as ${word:="$@"} if the first
5831 character of $IFS was not a space.
5832
5833x. Fixed a slight cosmetic problem when printing commands containing a
5834 `>&word' redirection.
5835
5836y. Fixed a problem that could cause here documents to not be created correctly
5837 if the system temporary directory did not allow writing.
5838
58392. Changes to Readline
5840
5841a. Change to history expansion functions to treat `^' as equivalent to word
8868edaf 5842 one, as the documentation states.
b80f6443
JA
5843
5844b. Some changes to the display code to improve display and redisplay of
5845 multibyte characters.
5846
5847c. Changes to speed up the multibyte character redisplay code.
5848
5849d. Fixed a bug in the vi-mode `E' command that caused it to skip over the
5850 last character of a word if invoked while point was on the word's
5851 next-to-last character.
5852
5853e. Fixed a bug that could cause incorrect filename quoting when
5854 case-insensitive completion was enabled and the word being completed
5855 contained backslashes quoting word break characters.
5856
5857f. Fixed a bug in redisplay triggered when the prompt string contains
5858 invisible characters.
5859
5860g. Fixed some display (and other) bugs encountered in multibyte locales
5861 when a non-ascii character was the last character on a line.
5862
5863h. Fixed some display bugs caused by multibyte characters in prompt strings.
5864
5865i. Fixed a problem with history expansion caused by non-whitespace characters
5866 used as history word delimiters.
5867
58683. New Features in Bash
5869
5870a. printf builtin understands two new escape sequences: \" and \?.
5871
5872b. `echo -e' understands two new escape sequences: \" and \?.
5873
5874c. The GNU `gettext' package and libintl have been integrated; the shell's
5875 messages can be translated into different languages.
5876
5877d. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.
5878
5879e. The error message printed when bash cannot open a shell script supplied
5880 as argument 1 now includes the name of the shell, to better identify
5881 the error as coming from bash.
5882
58834. New Features in Readline
5884
5885a. New application variable, rl_completion_quote_character, set to any
5886 quote character readline finds before it calls the application completion
5887 function.
5888
5889b. New application variable, rl_completion_suppress_quote, settable by an
5890 application completion function. If set to non-zero, readline does not
5891 attempt to append a closing quote to a completed word.
5892
5893c. New application variable, rl_completion_found_quote, set to a non-zero
5894 value if readline determines that the word to be completed is quoted.
5895 Set before readline calls any application completion function.
5896
5897d. New function hook, rl_completion_word_break_hook, called when readline
5898 needs to break a line into words when completion is attempted. Allows
5899 the word break characters to vary based on position in the line.
5900
5901e. New bindable command: unix-filename-rubout. Does the same thing as
5902 unix-word-rubout, but adds `/' to the set of word delimiters.
5903
5904------------------------------------------------------------------------------
5905This document details the changes between this version, bash-3.0-alpha,
5906and the previous version, bash-2.05b-release.
5907
59081. Changes to Bash
5909
5910a. Fixes so that the shell will compile without some of the default options
5911 defined.
5912
5913b. Fixed an error message that did not pass enough arguments to printf.
5914
5915c. Fixed a bug that caused input redirection to a builtin inside a script
5916 being read from standard input to result in the rest of the already-
5917 read and buffered script to be discarded.
5918
5919d. Fixed a bug that caused subshell initialization to close the file
5920 descriptor from which the shell was reading a script under certain
5921 circumstances.
5922
5923e. Fixed a bug that caused the shell to not advance a string pointer over
5924 a null wide character when doing string operations.
5925
5926f. Fixed the internal logout code so that shells that time out waiting for
5927 input (using $TMOUT) run ~/.bash_logout.
5928
5929g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD.
5930
5931h. The parser no longer adds implicit double quotes to ((...)) arithmetic
5932 commands.
5933
5934i. The ((...)) arithmetic command evaluation code was fixed to not dump core
5935 when the expanded string is null.
5936
5937j. The ((...)) arithmetic command evaluation code was fixed to not perform
5938 variable assignments while expanding the expression.
5939
5940k. Fixed a bug that caused word splitting to be performed incorrectly when
5941 IFS is set, but null.
5942
5943l. Fixed a bug in brace expansion that caused a quoted `$' preceding an
5944 open brace to inhibit brace expansion.
5945
5946m. Fixed a bug that caused a leading `-' in the shell's name to cause it to
5947 not be recognized as a restricted shell.
5948
5949n. Fixed a bug in the arithmetic evaluation code that could cause longjmps
5950 to an invalid location and result in a core dump.
5951
5952o. Fixed a bug in the calculation of how many history lines are new in a
5953 single shell session when reading new history lines from a file with
5954 `history -n'.
5955
5956p. Fixed a bug in pathname canonicalization that caused the shell to dump
5957 core when presented with a pathname longer than PATH_MAX.
5958
5959q. Fixed the parser so that it doesn't try to compare a char variable to
5960 EOF, which fails when chars are unsigned.
5961
5962r. Fixed a bug in the simple command execution code that caused occasional
5963 core dumps.
5964
5965s. The shell does a better job of saving any partial parsing state during
5966 operations which cause a command to be executed while a line is being
5967 entered and parsed.
5968
5969t. The completion code now splits words more like the expansion code when
5970 $IFS is used to split.
5971
5972u. The locale code does a better job of recomputing the various locale
5973 variable values when LC_ALL is unset.
5974
5975v. The programmable completion code does a better job of dequoting expanded
5976 word lists before comparing them against the word to be matched.
5977
5978w. The shell no longer seg faults if the expanded value of $PS4 is null
5979 and `set -x' is enabled.
5980
5981x. Fixed a bug that caused core dumps when a here string expanded to NULL.
5982
5983y. The mail checking code now makes sure the mailbox is bigger before
5984 reporting the existence of new mail.
5985
5986z. The parser does not try to expand $'...' and $"..." when the appear
5987 within double quotes unless the `extquote' option has been enabled with
5988 `shopt'. For backwards compatibility, it is enabled by default.
5989
5990aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use
5991 $@ instead of "$@" for the implicit list of arguments.
5992
5993bb. Fixed a bug that caused a subshell of a restricted shell (e.g., one
5994 spawned to execute a pipeline) to not exit immediately if attempting
5995 to use a command containing a slash.
5996
5997cc. Fixed a problem with empty replacements for a pattern that doesn't match
5998 when performing ${param/word/} expansion.
5999
6000dd. Word expansions performed while expanding redirections no longer search
6001 a command's temporary environment to expand variable values.
6002
6003ee. Improvements to the alias expansion code when expanding subsequent words
6004 because an aliase's value ends with a space.
6005
6006ff. `cd -' now prints the current working directory after a successful chdir
6007 even when the shell is not interactive, as the standard requires.
6008
6009gg. The shell does a better job of ensuring a child process dies of SIGINT
6010 before resending SIGINT to itself.
6011
6012hh. The arithmetic expansion variable assignment code now does the right
6013 thing when assigning to `special' variables like OPTIND.
6014
6015ii. When history expansion verification is enabled, the bash readline helper
6016 functions that do history expansion on the current line don't print
6017 the results.
6018
6019jj. Fixed bugs with multiple consecutive alias expansion when one of the
6020 expansions ends with a space.
6021
6022kk. Fixed a problem in the programmable completion code that could cause core
6023 dumps when trying to initialize a set of possible completions from a
6024 list of variables.
6025
6026ll. The \[ and \] escape characters are now ignored when decoding the prompt
6027 string if the shell is started with editing disabled.
6028
6029mm. Fixed a bug that could leave extra characters in a string when doing
6030 quoted null character removal.
6031
6032nn. Command substitution and other subshell operations no longer reset the
6033 line number (aids the bash debugger).
6034
6035oo. Better line number management when executing simple commands, conditional
6036 commands, for commands, and select commands.
6037
6038pp. The globbing code now uses malloc, with its better failure properties,
6039 rather than alloca().
6040
6041qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the
6042 appropriate array element instead of a variable named `a[2]'.
6043
6044rr. Fixed a bug in the handling of a `?(...)' pattern immediately following
6045 a `*' when extglob is enabled.
6046
6047ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is
6048 invoked in a function to misbehave.
6049
6050tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped
6051 by the internal shell string quoting functions.
6052
6053uu. Fixed a bug that caused quoted null characters in an expanded word list
6054 to be inappropriately assigned to an array variable when using `read -a'.
6055
6056vv. Fixed a bug that caused redirections accompanying a null command to persist
6057 in the current shell.
6058
6059ww. Fixed a bug that caused the prompt to be printed when the shell was
6060 expanding a multiline alias.
6061
6062xx. Fixed a bug that resulted in core dumps when the completion for a command
6063 changed the compspec.
6064
6065yy. Fixed a bug that caused evaluation of programmable completions to print
6066 notifications of completed jobs.
6067
6068zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb'
6069 (which is what emacs shell windows do).
6070
6071aaa. In posix mode, `kill -l' causes signal names to be displayed without
6072 a leading `SIG'.
6073
6074bbb. Clear error flag on standard output so it doesn't persist across multiple
6075 builtin commands.
6076
6077ccc. In posix mode, `alias' displays alias values without the leading `alias',
6078 so the output cannot be used as subsequent input.
6079
6080ddd. In posix mode, the `trap' builtin doesn't check whether or not its
6081 first argument is a signal specification and revert the signal handling
6082 to its original disposition if it is.
6083
6084eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the
6085 pattern substitution and removal expansions.
6086
6087fff. Fixed several problems with the handling of ${array[@]}, ${array[*]},
6088 $@, and $* by the indirect variable expansion code.
6089
6090ggg. Fixed a bug that did not allow `time' to be aliased.
6091
6092hhh. Improved the mail checking code so it won't check (and possibly cause an
6093 NFS file system mount) until MAILPATH or MAIL is given a value -- there
6094 is no default if DEFAULT_MAIL_DIRECTORY is not defined at compile time.
6095 (It is computed by configure, but can be #undef'd in config-bot.h.)
6096
6097iii. If the `chkwinsize' option is enabled, the shell checks for window size
6098 changes if a child process exits due to a signal.
6099
6100jjj. Removed the attempts to avoid adding a slash at the end of a completed
6101 executable name if there was a directory with the same name in the
6102 current directory.
6103
6104kkk. Fixed PATH lookup code so it treats the permission bits separately for
6105 owner, group, and other, rather than checking them all.
6106
6107lll. Fixed the locale code to reset the parser's idea of the character class
6108 <blank>, which controls how it splits tokens, when the locale changes.
6109
6110mmm. The shell now binds its special readline functions and key bindings only
6111 if the user's inputrc file has not already bound them.
6112
6113nnn. The shell now reports on processes that dump core due to signals when
6114 invoked as `-c command'.
6115
61162. Changes to Readline
6117
6118a. Fixes to avoid core dumps because of null pointer references in the
6119 multibyte character code.
6120
6121b. Fix to avoid infinite recursion caused by certain key combinations.
6122
6123c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
6124
6125d. Readline no longer tries to read ahead more than one line of input, even
6126 when more is available.
6127
6128e. Fixed the code that adjusts the point to not mishandle null wide
6129 characters.
6130
6131f. Fixed a bug in the history expansion `g' modifier that caused it to skip
6132 every other match.
6133
6134g. Fixed a bug that caused the prompt to overwrite previous output when the
6135 output doesn't contain a newline and the locale supports multibyte
6136 characters. This same change fixes the problem of readline redisplay
6137 slowing down dramatically as the line gets longer in multibyte locales.
6138
6139h. History traversal with arrow keys in vi insertion mode causes the cursor
6140 to be placed at the end of the new line, like in emacs mode.
6141
6142i. The locale initialization code does a better job of using the right
6143 precedence and defaulting when checking the appropriate environment
6144 variables.
6145
6146j. Fixed the history word tokenizer to handle <( and >( better when used as
6147 part of bash.
6148
6149k. The overwrite mode code received several bug fixes to improve undo.
6150
6151l. Many speedups to the multibyte character redisplay code.
6152
6153m. The callback character reading interface should not hang waiting to read
6154 keyboard input.
6155
6156n. Fixed a bug with redoing vi-mode `s' command.
6157
6158o. The code that initializes the terminal tracks changes made to the terminal
6159 special characters with stty(1) (or equivalent), so that these changes
6160 are reflected in the readline bindings. New application-callable function
6161 to make it work: rl_tty_unset_default_bindings().
6162
6163p. Fixed a bug that could cause garbage to be inserted in the buffer when
6164 changing character case in vi mode when using a multibyte locale.
6165
6166q. Fixed a bug in the redisplay code that caused problems on systems
6167 supporting multibyte characters when moving between history lines when the
6168 new line has more glyphs but fewer bytes.
6169
6170r. Undo and redo now work better after exiting vi insertion mode.
6171
6172s. Make sure system calls are restarted after a SIGWINCH is received using
6173 SA_RESTART.
6174
6175t. Improvements to the code that displays possible completions when using
6176 multibyte characters.
6177
6178u. Fixed a problem when parsing nested if statements in inputrc files.
6179
6180v. The completer now takes multibyte characters into account when looking for
6181 quoted substrings on which to perform completion.
6182
6183w. The history search functions now perform better bounds checking on the
6184 history list.
6185
61863. New Features in Bash
6187
6188a. ANSI string expansion now implements the \x{hexdigits} escape.
6189
6190b. There is a new loadable `strftime' builtin.
6191
6192c. New variable, COMP_WORDBREAKS, which controls the readline completer's
6193 idea of word break characters.
6194
6195d. The `type' builtin no longer reports on aliases unless alias expansion
6196 will actually be performed.
6197
6198e. HISTCONTROL is now a colon-separated list of values, which permits
6199 more extensibility and backwards compatibility.
6200
6201f. HISTCONTROL may now include the `erasedups' option, which causes all lines
6202 matching a line being added to be removed from the history list.
6203
6204g. `configure' has a new `--enable-multibyte' argument that permits multibyte
6205 character support to be disabled even on systems that support it.
6206
6207h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
6208 BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
6209 BASH_COMMAND
6210
6211i. FUNCNAME has been changed to support the debugger: it's now an array
6212 variable.
6213
6214j. for, case, select, arithmetic commands now keep line number information
6215 for the debugger.
6216
6217k. There is a new `RETURN' trap executed when a function or sourced script
6218 returns (not inherited child processes; inherited by command substitution
6219 if function tracing is enabled and the debugger is active).
6220
6221l. New invocation option: --debugger. Enables debugging and turns on new
6222 `extdebug' shell option.
6223
6224m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR
6225 traps, respectively, to be inherited by shell functions. Equivalent to
6226 `set -T' and `set -E' respectively. The `functrace' option also controls
6227 whether or not the DEBUG trap is inherited by sourced scripts.
6228
6229n. The DEBUG trap is run before binding the variable and running the action
6230 list in a `for' command, binding the selection variable and running the
6231 query in a `select' command, and before attempting a match in a `case'
6232 command.
6233
6234o. New `--enable-debugger' option to `configure' to compile in the debugger
6235 support code.
6236
6237p. `declare -F' now prints out extra line number and source file information
6238 if the `extdebug' option is set.
6239
6240q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes
6241 the next command to be skipped, and a return value of 2 while in a
6242 function or sourced script forces a `return'.
6243
6244r. New `caller' builtin to provide a call stack for the bash debugger.
6245
6246s. The DEBUG trap is run just before the first command in a function body is
6247 executed, for the debugger.
6248
6249t. `for', `select', and `case' command heads are printed when `set -x' is
6250 enabled.
6251
6252u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1,
6253 x+2,...,y}. x and y can be integers or single characters; the sequence
6254 may ascend or descend; the increment is always 1.
6255
6256v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
6257 of array.
6258
6259w. New `force_fignore' shopt option; if enabled, suffixes specified by
6260 FIGNORE cause words to be ignored when performing word completion even
6261 if they're the only possibilities.
6262
6263x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
6264 style' (filename:lineno:message) format.
6265
6266y. New `-o bashdefault' option to complete and compgen; if set, causes the
6267 whole set of bash completions to be performed if the compspec doesn't
6268 result in a match.
6269
6270z. New `-o plusdirs' option to complete and compgen; if set, causes directory
6271 name completion to be performed and the results added to the rest of the
6272 possible completions.
6273
6274aa. `kill' is available as a builtin even when the shell is built without
6275 job control.
6276
6277bb. New HISTTIMEFORMAT variable; value is a format string to pass to
6278 strftime(3). If set and not null, the `history' builtin prints out
6279 timestamp information according to the specified format when displaying
6280 history entries. If set, bash tells the history library to write out
6281 timestamp information when the history file is written.
6282
6283cc. The [[ ... ]] command has a new binary `=~' operator that performs
6284 extended regular expression (egrep-like) matching.
6285
6286dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
6287 to enable the =~ operator and regexp matching in [[ ... ]].
6288
6289ee. Subexpressions matched by the =~ operator are placed in the new
6290 BASH_REMATCH array variable.
6291
6292ff. New `failglob' option that causes an expansion error when pathname
6293 expansion fails to produce a match.
6294
6295gg. New `set -o pipefail' option that causes a pipeline to return a failure
6296 status if any of the processes in the pipeline fail, not just the last
6297 one.
6298
62994. New Features in Readline
6300
6301a. History expansion has a new `a' modifier equivalent to the `g' modifier
6302 for compatibility with the BSD csh.
6303
6304b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
6305 modifier, which performs a substitution once per word.
6306
6307c. All non-incremental search operations may now undo the operation of
6308 replacing the current line with the history line.
6309
6310d. The text inserted by an `a' command in vi mode can be reinserted with
6311 `.'.
6312
6313e. New bindable variable, `show-all-if-unmodified'. If set, the readline
6314 completer will list possible completions immediately if there is more
6315 than one completion and partial completion cannot be performed.
6316
6317f. There is a new application-callable `free_history_entry()' function.
6318
6319g. History list entries now contain timestamp information; the history file
6320 functions know how to read and write timestamp information associated
6321 with each entry.
6322
6323h. Four new key binding functions have been added:
6324
6325 rl_bind_key_if_unbound()
6326 rl_bind_key_if_unbound_in_map()
6327 rl_bind_keyseq_if_unbound()
6328 rl_bind_keyseq_if_unbound_in_map()
6329
6330------------------------------------------------------------------------------
7117c2d2
JA
6331This document details the changes between this version, bash-2.05b-release,
6332and the previous version, bash-2.05b-beta2.
6333
63341. Changes to Bash
6335
6336a. Fixed an off-by-one error in the function that translates job
6337 specifications.
6338
6339b. Note that we're running under Emacs and disable line editing if
6340 $EMACS == `t'.
6341
6342------------------------------------------------------------------------------
6343This document details the changes between this version, bash-2.05b-beta2,
6344and the previous version, bash-2.05b-beta1.
6345
63461. Changes to Bash
6347
6348a. Fixed the /= and %= arithmetic operators to catch division by zero.
6349
6350b. Added putenv, setenv, unsetenv to getenv replacement for completeness.
6351
6352c. Fixed a bug that could cause the -O expand_aliases invocation option
6353 to not take effect.
6354
6355d. Fixed a problem with process substitution that resulted in incorrect
6356 behavior when the number of process substitutions in an individual
6357 command approached 64.
6358
63592. Changes to Readline
6360
6361a. Fixed a problem with backward-char-search when on a system with support
6362 for multibyte characters when running in a locale without any multibyte
6363 characters.
6364
6365------------------------------------------------------------------------------
6366This document details the changes between this version, bash-2.05b-beta1,
6367and the previous version, bash-2.05b-alpha1.
6368
63691. Changes to Bash
6370
6371a. Fixed a problem when parsing a POSIX.2 character class name while
6372 evaluating a bracket expression containing multibyte characters.
6373
6374b. Changed the help text for `bind' to make it clear that any command
6375 that may be placed in ~/.inputrc is a valid argument to `bind'.
6376
6377c. Added `help' builtin entries for `((', `[[', and arithmetic for.
6378
6379d. malloc updated again:
6380 o slightly better overflow and underflow detection by putting the
6381 chunk size at the beginning and end of the chunk and making
6382 sure they match in free/realloc
6383 o partial page allocated to make things page-aligned no longer
6384 completely wasted
6385 o block coalescing now enabled by default
6386 o splitting and coalescing enabled for 32-byte chunks, the most
6387 common size requested
6388 o fixed a problem that resulted in spurious underflow messages and
6389 aborts
6390 o bin sizes are precomputed and stored in an array rather than
6391 being computed at run time
6392 o malloc will return memory blocks back to the system if the block
6393 being freed is at the top of the heap and of sufficient size to
6394 make it worthwhile
6395 o malloc/free/realloc now inline memset instead of calling the
6396 libc function; uses Duff's device for good performance
6397
6398e. Check for getservent(); make the service name completion code dependent
6399 on its presence.
6400
6401f. Changed the readline callback that executes a command bound to a key
6402 sequence to not save the executed command on the history list and to
6403 save and restore the parsing state.
6404
6405g. Changes to lib/sh/snprintf.c: fixed some bugs in the `g' and `G'
6406 floating point format display; implemented the "'" flag character
6407 that turns on thousands' grouping; fixed behavior on systems where
6408 MB_CUR_MAX does not evaluate to a constant.
6409
6410h. The `unset' builtin no longer returns a failure status when asked to
6411 unset a previously-unset variable or function.
6412
6413i. Changes to the build system to make it easier to cross-compile bash
6414 for different systems.
6415
6416j. Added `,' to the characters that are backslash-escaped during filename
6417 completion, to avoid problems with complete-into-braces and RCS filenames
6418 containing commas.
6419
6420k. Some changes to the multibyte character support code to avoid many calls
6421 to strlen().
6422
6423l. Bash now correctly honors setting LANG to some value when LC_ALL does not
6424 already have a value.
6425
6426m. Fixed a bug that could cause SIGSEGV when processing nested traps with
6427 trap handlers.
6428
6429n. The `source/.' builtin now restores the positional parameters when it
6430 returns unless they were changed using the `set' builtin during the file's
6431 execution.
6432
6433o. Fixed a bug that caused a syntax error when a command was terminated by
6434 EOF.
6435
64362. New Features in Bash
6437
6438a. There is now support for placing the long help text into separate files
6439 installed into ${datadir}/bash. Not enabled by default; can be turned
6440 on with `--enable-separate-helpfiles' option to configure.
6441
6442b. All builtins that take operands accept a `--' pseudo-option, except
6443 `echo'.
6444
6445c. The `echo' builtin now accepts \0xxx (zero to three octal digits following
6446 the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
6447 POSIX.1-2001 compliance.
6448
64493. Changes to Readline
6450
6451a. Fixed a small problem in _rl_insert_char with multibyte characters.
6452
6453b. Fixes from IBM for line wrapping problems when using multibyte characters.
6454
6455c. Fixed a problem which caused the display to be messed up when the last
6456 line of a multi-line prompt (possibly containing invisible characters)
6457 was longer than the screen width.
6458
8868edaf 6459d. Fixed a problem with the vi-mode `r' command that occurred on systems with
7117c2d2
JA
6460 support for multibyte characters when running in a locale without any
6461 multibyte characters.
6462
6463------------------------------------------------------------------------------
6464This document details the changes between this version, bash-2.05b-alpha1,
6465and the previous version, bash-2.05a-release.
6466
64671. Changes to Bash
6468
6469a. Some changes to work around inlining differences between compilers.
6470
6471b. Added more prototypes for internal shell typedefs, to catch argument
6472 passing errors when using pointers to functions.
6473
6474c. The `cd' builtin now fails in posix mode when a valid directory cannot be
6475 constructed from a relative pathname argument and the $PWD using pathname
6476 canonicalization, and the -P option has not been supplied. Previously,
6477 the shell would attempt to use what the user typed, leading to weird
6478 values for $PWD and discrepancies between the value of $PWD and the
6479 actual working directory.
6480
6481d. The `cd' builtin now resets $PWD when canonicalization fails but a chdir
6482 to the pathname passed as an argument succeeds (when not in posix mode).
6483
6484e. The `fc' builtin has been fixed, as POSIX requires, to use the closest
6485 history position in range when given an out-of-range argument.
6486
6487f. The history file loading code was changed to allow lines to be saved in
6488 the history list from the shell startup files.
6489
b80f6443 6490g. `history -s args' now works better in compound commands.
7117c2d2
JA
6491
6492h. The tilde expansion code was fixed to better recognize when it's being
6493 invoked in an assignment context, which enables expansion after `='
6494 and `:'.
6495
6496i. Fixed the command name completion code so a slash is no longer appended
6497 to a single match if there happens to be a directory with that name in
6498 $PWD.
6499
6500j. Fixed compound array assignment to no longer perform alias expansion, to
6501 allow reserved words as array members, and to not produce extra output
6502 when the `-v' option had been enabled.
6503
6504k. Fixed the programmable completion code to better handle newlines in lists
6505 of possible completions (e.g., `complete -W').
6506
6507l. Removed the reserved words from the `bash-builtins' manual page.
6508
6509m. Parser error reporting now attempts to do a better job of identifying the
6510 token in error rather than doing straight textual analysis.
6511
6512n. Fixes for Inf/NaN, locales, wide/multibyte characters and zero-length
6513 arguments in the library snprintf(3) replacement.
6514
6515o. `read -e' no longer does command name completion on the first word on
6516 the line being read.
6517
6518p. `select' now returns failure if the read of the user's selection fails.
6519
6520q. Fixed a bug that could cause a core dump when setting $PIPESTATUS.
6521
6522r. Fixes to not allocate so many job slots when the shell is running a loop
6523 with job control enabled in a subshell of an interactive shell.
6524
6525s. Fixed a bug in the trap code that caused traps to be inherited by
6526 command substitutions in some cases.
6527
6528t. Fixed a bug that could cause alias expansion to inappropriately expand
6529 the word following the alias.
6530
6531u. Fixed a bug in the `kill' builtin that mishandled negative pid arguments.
6532
6533v. The parser is less lenient when parsing assignment statements where the
6534 characters before the `=' don't comprise a valid identifier.
6535
6536w. The arithmetic expression evaluation code now honors the setting of the
6537 `-u' option when expanding variable names.
6538
6539x. Fixed the arithmetic evaluation code to allow array subscripts to be
6540 assigned (`let b[7]=42') and auto-incremented and auto-decremented
6541 (e.g., b[7]++).
6542
6543y. Reimplemented the existing prompt string date and time expansions using
6544 strftime(3), which changed the output of \@ in some locales.
6545
6546z. Fixed a bug that could cause a core dump when a special shell variable
6547 (like RANDOM) was converted to an array with a variable assignment.
6548
6549aa. Fixed a bug that would reset the handler for a signal the user had
6550 trapped to a function that would exit the shell when setting the exit
6551 trap in a non-interactive shell.
6552
6553bb. Changed the execve(2) wrapper code to check whether or not a failing
6554 command is a directory before looking at whether a `#!' interpreter
6555 failed for some reason.
6556
6557cc. Fixed a bug in the command printing code so it no longer inserts a `;'
6558 after a newline, which produces a syntax error when reused as input.
6559
6560dd. The code that expands $PS4 no longer inherits the `-x' flag.
6561
6562ee. The bash-specific completion functions may now take advantage of the
6563 double-TAB and M-? features of the standard readline completion
6564 functions.
6565
6566ff. The mail checking code no longer prints a message if the checked file's
6567 size has not increased, even if the access time is less than the modification time.
6568
6569gg. Rewrote the variable symbol table code: there is now a stack of
6570 contexts, each possibly including a separate symbol table; there can
6571 be more than one temporary environment supplied to nested invocations
6572 of `./source'; the temporary environments no longer require so much
6573 special-case code; shell functions now handle the temporary environment
6574 and local variables more consistently; function scope exit is faster now
6575 that the entire symbol table does not have to be traversed to dispose of
6576 local variables; it is now easier to push vars from the temporary
6577 environment to the shell's variable table in posix mode; some duplicated
6578 code has been removed.
6579
6580hh. Regularized the error message printing code; builtin_error is now called
6581 more consistently, and common error message strings are handled by small
6582 functions. This should make eventual message translation easier.
6583
6584ii. Error messages now include the line number in a script when the shell
6585 is not interactive.
6586
6587jj. Array subscript expansion now takes place even when the array variable is
6588 unset, so side effects will take place.
6589
6590kk. Fixed a bug in the SICGHLD child-reaping code so that it won't find
6591 jobs already marked as terminated if the OS reuses pids quickly enough.
6592
6593ll. Fixed a bug that could cause a signal to not interrupt the `wait'
6594 builtin while it was waiting for a background process to terminate.
6595
6596mm. A couple of changes to make it easier for multiple shells to share history
6597 files using `history -n', `history -r', and `history -w'.
6598
6599nn. The `getopts' builtin always increments OPTIND to point to the next
6600 option to be handled when an option is returned, whether it's valid
6601 or not, as POSIX 1003.x-2001 requires.
6602
6603oo. Changed some parts of the expansion code to avoid allocating and
6604 immediately freeing memory without using the results for anything.
6605
6606pp. The shell now keeps track of $IFS internally, updating its internal map
6607 each time the variable is assigned a new value (or at local scope exit).
6608 This saves thousands of hash lookups for IFS, which, while individually
6609 cheap, add up.
6610
6611qq. Rewrote the hash table code: searching and insertion are much faster now,
6612 and it uses a better string hashing function; augmented the function
6613 interface to simplify other parts of the code and remove duplicated code
6614
6615rr. The shell now uses a simple, generic `object cache' for allocating and
6616 caching words and word lists, which were the major users of
6617 malloc/free.
6618
6619ss. Fixed the assignment statement parsing code to allow whitespace and
6620 newlines in subscripts when performing array element assignment.
6621
6622tt. The shell now issues many fewer calls to sigprocmask and other signal
6623 masking system calls.
6624
6625uu. Fixed the `test' and conditional command file comparison operators to
6626 work right when one file has a non-positive timestamp and the other
6627 does not exist.
6628
6629vv. Fixed some cases where the special characters '\001' and '\177' in the
6630 values of variables or positional parameters caused incorrect expansion
6631 results.
6632
66332. Changes to Readline
6634
6635a. Fixed output of comment-begin character when listing variable values.
6636
6637b. Added some default key bindings for common escape sequences produced by
6638 HOME and END keys.
6639
6640c. Fixed the mark handling code to be more emacs-compatible.
6641
6642d. A bug was fixed in the code that prints possible completions to keep it
6643 from printing empty strings in certain circumstances.
6644
6645e. Change the key sequence printing code to print ESC as M\- if ESC is a
6646 meta-prefix character -- it's easier for users to understand than \e.
6647
6648f. Fixed unstifle_history() to return values that match the documentation.
6649
6650g. Fixed the event loop (rl_event_hook) to handle the case where the input
6651 file descriptor is invalidated.
6652
6653h. Fixed the prompt display code to work better when the application has a
6654 custom redisplay function.
6655
6656i. Changes to make reading and writing the history file a little faster, and
6657 to cope with huge history files without calling abort(3) from xmalloc.
6658
6659j. The vi-mode `S' and `s' commands are now undone correctly.
6660
66613. New Features in Bash
6662
6663a. If set, TMOUT is the default timeout for the `read' builtin.
6664
6665b. `type' has two new options: `-f' suppresses shell function lookup, and
6666 `-P' forces a $PATH search.
6667
6668c. New code to handle multibyte characters.
6669
6670d. `select' was changed to be more ksh-compatible, in that the menu is
6671 reprinted each time through the loop only if REPLY is set to NULL.
6672 The previous behavior is available as a compile-time option.
6673
6674e. `complete -d' and `complete -o dirnames' now force a slash to be
6675 appended to names which are symlinks to directories.
6676
6677f. There is now a bindable edit-and-execute-command readline command,
6678 like the vi-mode `v' command, bound to C-xC-e in emacs mode.
6679
6680g. Added support for ksh93-like [:word:] character class in pattern matching.
6681
6682h. The $'...' quoting construct now expands \cX to Control-X.
6683
6684i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
6685 the result into the expanded prompt.
6686
6687j. The shell now performs arithmetic in the largest integer size the
6688 machine supports (intmax_t), instead of long.
6689
6690k. If a numeric argument is supplied to one of the bash globbing completion
6691 functions, a `*' is appended to the word before expansion is attempted.
6692
6693l. The bash globbing completion functions now allow completions to be listed
6694 with double tabs or if `show-all-if-ambiguous' is set.
6695
6696m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
6697 readline's appending a space to the completed word.
6698
6699n. New `here-string' redirection operator: <<< word.
6700
6701o. When displaying variables, function attributes and definitions are shown
6702 separately, allowing them to be re-used as input (attempting to re-use
6703 the old output would result in syntax errors).
6704
6705p. There is a new configuration option `--enable-mem-scramble', controls
6706 bash malloc behavior of writing garbage characters into memory at
6707 allocation and free time.
6708
6709q. The `complete' and `compgen' builtins now have a new `-s/-A service'
6710 option to complete on names from /etc/services.
6711
6712r. `read' has a new `-u fd' option to read from a specified file descriptor.
6713
6714s. Fix the completion code so that expansion errors in a directory name
6715 don't cause a longjmp back to the command loop.
6716
6717t. Fixed word completion inside command substitution to work a little more
6718 intuitively.
6719
6720u. The `printf' %q format specifier now uses $'...' quoting to print the
6721 argument if it contains non-printing characters.
6722
6723v. The `declare' and `typeset' builtins have a new `-t' option. When applied
6724 to functions, it causes the DEBUG trap to be inherited by the named
6725 function. Currently has no effect on variables.
6726
6727w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
6728 [[...]] conditional commands, and for ((...)) loops.
6729
6730x. The expansion of $LINENO inside a shell function is only relative to the
6731 function start if the shell is interactive -- if the shell is running a
6732 script, $LINENO expands to the line number in the script. This is as
6733 POSIX-2001 requires.
6734
6735y. The bash debugger in examples/bashdb has been modified to work with the
6736 new DEBUG trap semantics, the command set has been made more gdb-like,
6737 and the changes to $LINENO make debugging functions work better. Code
6738 from Gary Vaughan.
6739
6740z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
6741 and close).
6742
6743aa. There is a new `-l' invocation option, equivalent to `--login'.
6744
6745bb. The `hash' builtin has a new `-l' option to list contents in a reusable
6746 format, and a `-d' option to remove a name from the hash table.
6747
67484. New Features in Readline
6749
6750a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
6751 be bound to readline functions. Now the arrow keys may be used in vi
6752 insert mode.
6753
6754b. When listing completions, and the number of lines displayed is more than
6755 the screen length, readline uses an internal pager to display the results.
6756 This is controlled by the `page-completions' variable (default on).
6757
6758c. New code to handle editing and displaying multibyte characters.
6759
6760d. The behavior introduced in bash-2.05a of deciding whether or not to
6761 append a slash to a completed name that is a symlink to a directory has
6762 been made optional, controlled by the `mark-symlinked-directories'
6763 variable (default is the 2.05a behavior).
6764
6765e. The `insert-comment' command now acts as a toggle if given a numeric
6766 argument: if the first characters on the line don't specify a
6767 comment, insert one; if they do, delete the comment text
6768
6769f. New application-settable completion variable:
6770 rl_completion_mark_symlink_dirs, allows an application's completion
6771 function to temporarily override the user's preference for appending
6772 slashes to names which are symlinks to directories.
6773
6774g. New function available to application completion functions:
6775 rl_completion_mode, to tell how the completion function was invoked
6776 and decide which argument to supply to rl_complete_internal (to list
6777 completions, etc.).
6778
6779h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
6780 bindable command, which could be bound to `Insert'.
6781
6782i. New application-settable completion variable:
6783 rl_completion_suppress_append, inhibits appending of
6784 rl_completion_append_character to completed words.
6785
6786j. New key bindings when reading an incremental search string: ^W yanks
6787 the currently-matched word out of the current line into the search
6788 string; ^Y yanks the rest of the current line into the search string,
6789 DEL or ^H deletes characters from the search string.
6790
6791------------------------------------------------------------------------------
f73dda09
JA
6792This document details the changes between this version, bash-2.05a-release,
6793and the previous version, bash-2.05a-rc1.
6794
67951. Changes to Bash
6796
6797a. Fixed the `printf' builtin so that the variable name supplied as an
6798 argument to a %n conversion must be a valid shell identifier.
6799
6800b. Improved the random number generator slightly.
6801
6802c. Changes to configuration to not put -I/usr/include into $CFLAGS, since
6803 it messes up some includes.
6804
6805d. Corrected description of POSIXLY_CORRECT in man page and info manual.
6806
6807e. Fixed a couple of cases of incorrect function prototypes that sneaked
6808 through and caused compilation problems.
6809
6810f. A few changes to avoid potential core dumps in the programmable completion
6811 code.
6812
6813g. Fixed a configure problem that could cause a non-existent file to show
6814 up in LIBOBJS.
6815
6816h. Fixed a configure problem that could cause siglist.o to not be built when
6817 required.
6818
6819i. Changes to the strtoimax and strtoumax replacement functions to work
6820 around buggy compilers.
6821
6822j. Fixed a problem with the snprintf replacement function that could
6823 potentially cause a core dump.
6824
68252. Changes to Readline
6826
6827a. Fixed a locale-specific problem in the vi-mode `goto mark' command.
6828
6829b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
6830 include file problems.
6831
6832------------------------------------------------------------------------------
6833This document details the changes between this version, bash-2.05a-rc1,
6834and the previous version, bash-2.05a-beta1.
6835
68361. Changes to Bash
6837
6838a. Fixed the snprintf replacement to correctly implement the `alternate form'
6839 of the %g and %G conversions.
6840
6841b. Fixed snprintf to correctly handle the optional precision with the %g and
6842 %G conversions.
6843
6844c. Fixed the arithmetic evaluation code to correct the values of `@' and `_'
6845 when translating base-64 constants (they were backwards).
6846
6847d. New library functions for formatting long and long long ints.
6848
6849e. Fixed a few places where negative array subscripts could have occurred,
6850 mostly as the result of systems using signed characters.
6851
6852f. Fixed a few places that assumed a pid_t was no wider than an int.
6853
6854g. Fixed the `maildir' mail checking code to work on systems where a
6855 `struct stat' doesn't include an `st_blocks' member.
6856
6857h. Fixed snprintf to make `unsigned long long' conversion formats (%llu)
6858 work better.
6859
6860i. Fixed snprintf to not print a sign when asked to do an unsigned conversion.
6861
6862j. Made configure changes to avoid compiling empty source files in lib/sh.
6863
6864k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax,
6865 strtoumax.
6866
6867l. The `printf' builtin now handles the `ll' and `j' length modifiers
6868 directly, since they can affect the type and width of the argument
6869 passed to printf(3).
6870
6871m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to
8868edaf 6872 have more systematic naming, with accompanying changes to configure.in.
f73dda09
JA
6873
6874n. Fixed snprintf to handle long doubles and the %a/%A conversions by
6875 falling back to sprintf, as long as sprintf supports them.
6876
6877o. Fixed return value from vsnprintf/snprintf to be the number of characters
6878 that would have been printed, even if that number exceeds the buffer
6879 size passed as an argument.
6880
6881p. Bash no longer attempts to define its own versions of some ctype macros
6882 if they are implemented as functions in libc but not as macros in
6883 <ctype.h>.
6884
6885q. Changed the variable printing code (used by `set', `export', etc.) to
6886 not use the $'...' syntax when in posix mode, since that caused
6887 interoperability problems with other shells (most notably with autoconf).
6888 When not in posix mode, it uses $'...' if the string to be printed
6889 contains non-printing characters and regular single quotes otherwise.
6890
6891r. snprintf now recognizes the %F conversion.
6892
6893s. Fixed a bug that could cause the wrong status to be returned by a shell
6894 function when the shell is compiled without job control and a null
6895 command containing a command substutition was executed in the function.
6896
6897t. When in posix mode, the default value for MAILCHECK is 600.
6898
6899u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables
6900 if they're not in the initial environment.
6901
6902v. If SECONDS appears in the initial environment with a valid integer value,
6903 bash uses that as the starting value, as if an assignment had been
6904 performed.
6905
6906w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it
6907 gives them default values if they don't appear in the initial environment.
6908
6909x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE,
6910 even if it assigns them default values.
6911
6912y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT
6913 if they appear in the initial environment.
6914
6915z. Bash no longer attempts to discover if it's being run by sshd in order to
6916 run the startup files. If the SSH_SOURCE_BASHRC is uncommented in
6917 config-top.h it will attempt to do so as previously, but that's commented
6918 out in the distributed version.
6919
6920aa. Fixed a typo in the code that tests for LC_NUMERIC.
6921
6922bb. The POSIXLY_CORRECT shell variable and its effects are now documented.
6923
6924cc. Some changes to several of the support shell scripts included in the
6925 definitions to try to avoid race conditions and attacks.
6926
6927dd. Several changes to avoid warnings from `gcc -Wall'.
6928
6929ee. Fixed a problem with the `unset' builtin that could cause incorrect
6930 results if asked to unset a variable and an array subscript in the
6931 same command.
6932
6933ff. A few changes to the shell's temporary file creation code to avoid
6934 potential file descriptor leaks and to prefer the system's idea of
6935 the temporary directory to use.
6936
6937gg. Fixes to build with the C alloca in lib/malloc/alloca.c if the system
6938 requires it but the shell has been configured --without-bash-malloc.
6939
6940hh. Updated the documentation to note that only interactive shells resend
6941 SIGHUP to all jobs before exiting.
6942
6943ii. Fixes to only pass unquoted tilde words to tilde_expand, rather than
6944 rely on tilde_expand or getpwnam(3) to handle the quotes (MacOS 10.x
6945 will remove backslashes in any login name passed to getpwnam(3)).
6946
6947jj. Small change from Paul Eggert to make LINENO right in commands run with
6948 `bash -c'.
6949
69502. New Features in Bash
6951
6952a. The `printf' builtin now handles the %a and %A conversions if they're
6953 implemented by printf(3).
6954
6955b. The `printf' builtin now handles the %F conversion (just about like %f).
6956
6957c. The `printf' builtin now handles the %n conversion like printf(3). The
6958 corresponding argument is the name of a shell variable to which the
6959 value is assigned.
6960
69613. Changes to Readline
6962
6963a. Fixed a few places where negative array subscripts could have occurred.
6964
6965b. Fixed the vi-mode code to use a better method to determine the bounds of
6966 the array used to hold the marks.
6967
6968c. Fixed the defines in chardefs.h to work better when chars are signed.
6969
6970d. Fixed configure.in to use the new names for bash autoconf macros.
6971
6972e. Readline no longer attempts to define its own versions of some ctype
6973 macros if they are implemented as functions in libc but not as macros in
6974 <ctype.h>.
6975
6976f. Fixed a problem where rl_backward could possibly set point to before
6977 the beginning of the line.
6978
6979------------------------------------------------------------------------------
6980This document details the changes between this version, bash-2.05a-beta1,
6981and the previous version, bash-2.05a-alpha1.
6982
69831. Changes to Bash
6984
8868edaf 6985a. Fixed a bug in the evaluation of arithmetic `for' statements when the
f73dda09
JA
6986 expanded expression is NULL.
6987
6988b. Fixed an unassigned variable problem in the redirection printing code.
6989
6990c. Added more prototypes to extern function declarations in the header
6991 files and to static function declarations in C source files.
6992
6993d. Make sure called functions have a prototype in scope, to get the arguments
6994 and return values right instead of casting. Removed extern function
6995 declarations from C source files that were already included in header
6996 files.
6997
6998e. Changed some function arguments to use function typedefs in general.h so
6999 the prototypes can be checked. The only use of Function and VFunction
7000 now is for unwind-protects.
7001
7002f. More const changes to function arguments and appropriate variables.
7003
7004g. Changed the mail checking support to handle `maildir'-style mail
7005 directories.
7006
7007h. Augmented the bash malloc to pass in the file and line number information
7008 for each malloc, realloc, and free. This should result in better error
7009 messages.
7010
7011i. The `old' gnu malloc is no longer a configuration option.
7012
7013j. Augmented the bash malloc with optional tracing and registering allocated
7014 and freed memory.
7015
7016k. Prompt string decoding now saves and restores the value of $? when it
7017 expands the prompt string, so command substitutions don't change $?.
7018
7019i. Array indices are now `long', since shell arithmetic is performed as long,
7020 and the internal arrayind_t type is used consistently.
7021
7022j. Some more `unsigned char *' fixes from Paul Eggert.
7023
7024k. Fixed a bad call to builtin_error that could cause core dumps when making
7025 local variables.
7026
7027l. `return' may no longer be used to terminate a `select' command, for
7028 compatibility with ksh.
7029
7030m. Changed code that reads octal numbers to do a better job of detecting
7031 overflows.
7032
7033n. The time formatting code no longer uses absolute indices into a buffer,
7034 because the buffer size changes depending on the size of a `time_t'.
7035
7036o. `umask' now prints four digits when printing in octal mode, for
7037 compatibility with other shells.
7038
7039p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L'
7040 formats and long doubles better, and internal functions have been
8868edaf 7041 simplified where appropriate.
f73dda09
JA
7042
7043q. Some `time_t' fixes for machines were a time_t is bigger than a long.
7044
7045r. Replaced some bash-specific autoconf macros with standard equivalents.
7046
7047s. Improvmed the code that constructs temporary filenames to make the
7048 generated names a bit more random.
7049
7050t. Added code that checks for ascii before calling any of the is* ctype
7051 functions.
7052
7053u. Changed some places where a `char' was used as an array subscript to use
7054 `unsigned char', since a `char' can be negative if it's signed by default.
7055
7056v. Lots of changes to the `ulimit' builtin from Paul Eggert to add support
7057 for the new POSIX-200x RLIM_SAVED_CUR and RLIM_SAVED_MAX values and
7058 simplify the code.
7059
7060w. `ulimit' now prints the description of a resource in any error message
7061 relating to fetching or setting that resource's limits.
7062
7063x. The `snprintf' replacement now computes maximum values at compile
7064 time rather than using huge constants for things like long long.
7065
7066y. Interactive shells now ignore `set -n'.
7067
7068z. Changed the malloc bookkeeping information so that it's now 8 bytes
7069 instead of 12 on most 32-bit machines (saving 4 bytes per allocation),
7070 restoring 8-byte alignment.
7071
7072aa. The malloc error reporting code now attempts to print the file and line
7073 number of the call that caused the error.
7074
7075bb. Changed the redirection error reporting code to catch EBADF errors and
7076 report the file descriptor number rather than the file being redirected
7077 to or from (e.g., things like `exec 4242<x' where 4242 is an out-of-range
7078 file descriptor).
7079
7080cc. `printf', `echo -e', and the $'...' code now process only two hex digits
7081 after a `\x' escape sequence for compatibility with other shells, and
7082 the documentation was changed to note that the octal and hex escape
7083 sequences result in an eight-bit value rather than strict ASCII.
7084
70852. Changes to Readline
7086
7087a. The completion code now attempts to do a better job of preserving the
7088 case of the word the user typed if ignoring case in completions.
7089
7090b. Readline defaults to not echoing the input and lets the terminal
7091 initialization code enable echoing if there is a controlling terminal.
7092
7093c. The key binding code now processes only two hex digits after a `\x'
7094 escape sequence, and the documentation was changed to note that the
7095 octal and hex escape sequences result in an eight-bit value rather
7096 than strict ASCII.
7097
70983. New Features in Bash
7099
7100a. The builtin `ulimit' now takes two new non-numeric arguments: `hard',
7101 meaning the current hard limit, and `soft', meaning the current soft
7102 limit, in addition to `unlimited'
7103
7104b. `ulimit' now prints the option letter associated with a particular
7105 resource when printing more than one limit.
7106
7107c. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
7108 one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
7109
71104. New Features in Readline
7111
7112a. New bindable variable `history-preserve-point'. If set, the history
7113 code attempts to place the user at the same location on each history
8868edaf 7114 line retrieved with previous-history or next-history.
f73dda09
JA
7115
7116------------------------------------------------------------------------------
7117This document details the changes between this version, bash-2.05a-alpha1,
7118and the previous version, bash-2.05-release.
7119
71201. Changes to Bash
7121
7122a. Better checks in the redirection code for write errors.
7123
7124b. bashbug now uses $TMPDIR, defaulting to /tmp, and uses mktemp(1) more
7125 portably.
7126
7127c. System-specific configuration changes for: Interix, OpenBSD, FreeBSD,
7128 MacOS X.
7129
7130d. Some more `const' cleanups through the code.
7131
7132e. Fixed a typo in the /dev/fd redirection code, better checks for valid
7133 numeric fds in /dev/fd.
7134
7135f. Fixed many parts of the shell to handle integer overflow more gracefully
7136 and to do more stringent checks for valid numbers.
7137
7138g. Fixed mksignames to include config.h.
7139
7140h. Fixed an uninitialized variable problem that could cause the shell to core
7141 dump when replacing characters in a string.
7142
7143i. New mechanism for updating the patch level when official patches are
7144 released (patchlevel.h).
7145
7146j. configure.in changed to no longer require external files _distribution and
7147 _patchlevel.
7148
7149k. Fixed non-interactive shell initialization problem when bash started as
7150 `bash -i filename'.
7151
7152l. Fixed printf builtin conversion error handling to be POSIX.2-conformant.
7153
7154m. autoconf-2.52 is now used to build configure; autoconf-2.50 or newer is
7155 required. Some of the bash-specific macros were removed, since they are
7156 now standard.
7157
7158n. Startup files and files read with source or `.' are no longer required to
7159 be regular files.
7160
7161o. Fixed core dump in builtin printf when user-supplied precision or field
7162 width is 0.
7163
7164p. Fixed builtin printf to treat a negative field width as a positive field
7165 width with left-justification.
7166
7167r. New unwind-protect implementation from Paul Eggert.
7168
7169s. Fixed an inadvertently-unclosed comment in the bash completion code that
7170 caused programmable completions to not add trailing slashes or spaces to
7171 completions.
7172
7173t. Fixed the process substitution code to cope better when stdin is closed.
7174
7175v. Fixes, mostly from Paul Eggert, for a few possible buffer overflows in
7176 the shell.
7177
7178w. Fixes from Paul Eggert to avoid most of the type casts in the shell code,
7179 and use more appropriate types for a number of variables.
7180
8868edaf 7181x. Command substitution no longer inherits the DEBUG trap.
f73dda09 7182
8868edaf 7183y. Some fixes to the process substitution code on machines without /dev/fd so
f73dda09
JA
7184 that named pipes are not removed inappropriately.
7185
7186z. The loadable `getconf' builtin is now much more complete, and will become
7187 part of the shell in the future.
7188
7189aa. The select command no longer terminates on a `return', so it can be used
7190 to return from an enclosing function (as ksh does it).
7191
7192bb. Fixed the extended pattern matching code to behave better when presented
7193 with incorrectly-formed patterns.
7194
7195cc. Some changes were made with the intent of making cross-compilation easier.
7196
7197dd. The network code (/dev/tcp and /dev/udp redirections) uses getaddrinfo(3)
7198 if it's available, which adds support for IPv6.
7199
7200ee. Subshells of login shells no longer source ~/.bash_logout when they exit.
7201
7202ff. Fixes so that subshells don't exit inappropriately if the -e option has
7203 been set.
7204
7205gg. Restricted shells no longer allow functions to be exported.
7206
7207hh. Changes to the pattern matching code so extended pattern matching works
7208 on systems with deficient shared library implementations, like MacOS X.
7209
7210ii. Better error messages when a script with a leading `#!interp' fails
7211 to execute because of problems with `interp'.
7212
7213jj. Fixed `compgen' to handle the `-o default' option better.
7214
7215kk. Fixed the job control code to force an asynchronous process's standard
7216 input to /dev/null only if job control is not active.
7217
7218ll. Fixed a possible infinite recursion problem when `fc ""=abc' (a null
7219 pattern) is used to re-execute a previous command.
7220
7221mm. Fixed `declare [-a] var=value' to assign VALUE to element 0 if VAR is an
7222 array variable. Similarly for `declare [-a] var[N]=value'. This is like
7223 ksh93.
7224
7225nn. Fixed a bug that caused `read -a aname' to work even if ANAME had been
7226 declared readonly.
7227
7228oo. Fixed a possible integer overflow problem when constructing names for
7229 temporary files.
7230
72312. New Features in Bash
7232
7233a. Added support for DESTDIR installation root prefix, so you can do a
7234 `make install DESTDIR=bash-root' and do easier binary packaging.
7235
7236b. Added support for builtin printf "'" flag character as per latest POSIX
7237 drafts.
7238
7239c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
7240 ISO C99).
7241
7242d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
7243 (bash doesn't use very much of what it returns).
7244
7245e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
7246 but ignored.
7247
7248f. New read-only `shopt' option: login_shell. Set to non-zero value if the
7249 shell is a login shell.
7250
7251g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
7252
7253h. New `-A group/-g' option to complete and compgen; does group name
7254 completion.
7255
7256i. New `-t' option to `hash' to list hash values for each filename argument.
7257
7258j. New [-+]O invocation option to set and unset `shopt' options at startup.
7259
7260k. configure's `--with-installed-readline' option now takes an optional
7261 `=PATH' suffix to set the root of the tree where readline is installed
7262 to PATH.
7263
7264l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run
7265 whenever the shell would have exited if the -e option were enabled.
7266 It is not inherited by shell functions.
7267
7268m. `readonly', `export', and `declare' now print variables which have been
7269 given attributes but not set by assigning a value as just a command and
7270 a variable name (like `export foo') when listing, as the latest POSIX
7271 drafts require.
7272
7273n. `bashbug' now requires that the subject be changed from the default.
7274
7275o. configure has a new `--enable-largefile' option, like other GNU utilities.
7276
7277p. `for' loops now allow empty word lists after `in', like the latest POSIX
7278 drafts require.
7279
72803. Changes to Readline
7281
7282a. More `const' and type casting fixes.
7283
7284b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
7285 overflow problems.
7286
7287c. The completion code no longer appends a `/' or ` ' to a match when
7288 completing a symbolic link that resolves to a directory name, unless
7289 the match does not add anything to the word being completed. This
7290 means that a tab will complete the word up to the full name, but not
7291 add anything, and a subsequent tab will add a slash.
7292
7293d. Fixed a trivial typo that made the vi-mode `dT' command not work.
7294
7295e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
7296
7297f. Fixed the tty code so that ^V works more than once.
7298
7299g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
7300 because the use of __P in typedefs conflicted g++ and glibc.
7301
73024. New Features in Readline
7303
7304a. Added extern declaration for rl_get_termcap to readline.h, making it a
7305 public function (it was always there, just not in readline.h).
7306
7307b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
7308 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
7309
7310c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
7311
7312d. New bindable boolean readline variable: match-hidden-files. Controls
7313 completion of files beginning with a `.' (on Unix). Enabled by default.
7314
7315e. The history expansion code now allows any character to terminate a
7316 `:first-' modifier, like csh.
7317
7318f. The incremental search code remembers the last search string and uses
7319 it if ^R^R is typed without a search string.
7320
7321------------------------------------------------------------------------------
28ef6c31
JA
7322This document details the changes between this version, bash-2.05-release,
7323and the previous version, bash-2.05-beta2.
7324
73251. Changes to Bash
7326
7327a. Make sure we note that the first line of a multi-line command was not
7328 saved in the history if the tests for HISTCONTROL succeed, but the
7329 HISTIGNORE check fails.
7330
7331b. Fixed a bug in the pattern matching code that caused `[' to be treated
7332 as a special character inside a `[...]' bracket expression.
7333
7334c. Fixed a bug in the pattern matching code that caused `]' to terminate
7335 a bracket expression even if it was the first character after the `['
7336 (or a leading `!' or `^').
7337
7338d. Made a small change to report a more user-friendly error message if
7339 execve(2) fails because of an error with the interpreter in a script
7340 with a leading `#! interpreter'.
7341
7342e. If the OS does not support an exec(2) magic number of `#!', make sure we
7343 have a non-null interpreter name before attempting to execute it.
7344
7345f. Fixed a bug that caused the shell process to end up in a different
7346 process group than the controlling terminal if a job-control shell was
7347 run with `exec' in the startup files.
7348
7349g. When started in POSIX mode, either by `bash --posix', `bash -o posix', or
7350 `sh', $SHELLOPTS includes `posix' and POSIXLY_CORRECT is set.
7351
7352h. Fixed a problem that caused the `\W' prompt string escape sequence to
7353 expand to nothing when $PWD was `//'.
7354
7355i. The `bashbug' shell script no longer uses $(...) command substitution.
7356
7357j. When `set' is invoked without options in POSIX mode, it no longer prints
7358 the names and definitions of shell functions.
7359
73602. Changes to Readline
7361
7362a. rl_set_paren_blink_timeout() is now documented.
7363
7364b. Corrected history.3 man page: `$' is not in the default value of
7365 history_word_delimiters.
7366
7367c. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
7368 value, rl_read_key() now immediately returns '\n' (which is assumed to
7369 be bound to accept-line).
7370
73713. New Features in Bash
7372
7373a. The `>&word' redirection now works in POSIX mode as it does by default,
7374 since POSIX.2 leaves it unspecified.
7375
7376------------------------------------------------------------------------------
7377This document details the changes between this version, bash-2.05-beta2,
7378and the previous version, bash-2.05-beta1.
7379
73801. Changes to Bash
7381
7382a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported.
7383
7384b. Fixed startup so posixly_correct is retained across subshells begun to
7385 execute scripts without a leading `#!'.
7386
7387c. Fixed a bug that caused $(< file) to not work in a (...) subshell.
7388
7389d. Added config support for Linux running on the IBM S390.
7390
7391e. Fixed a bug that caused bash to get its input pointer out of sync when
7392 reading commands through a pipe and running a command with standard
7393 input redirected from a file.
7394
7395f. Made a change so that command completion now makes about half as many
7396 stat(2) calls when searching the $PATH.
7397
7398g. Fixed a bug that caused variable assignments preceding `return' to not
7399 be propagated to the shell environment in POSIX mode.
7400
7401h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed
7402 on `word'.
7403
7404i. In POSIX mode, `break' and `continue' do not complain and return success
7405 if called when the shell is not executing a loop.
7406
7407j. Fixed `bash -o posix' to work the same as `bash --posix'.
7408
7409k. Fixed a bug where variable assignments preceding `eval' or `source/.'
7410 would not show up in the environment exported to subshells run by the
7411 commands.
7412
7413l. In POSIX mode, shells started to execute command substitutions inherit
7414 the value of the `-e' option from their parent shell.
7415
7416m. In POSIX mode, aliases are expanded even in non-interactive shells.
7417
7418n. Changed some of the job control messages to display the text required by
7419 POSIX.2 when the shell is in POSIX mode.
7420
7421o. Fixed a bug in `test' that caused it to occasionally return incorrect
7422 results when non-numeric arguments were supplied to `-t'.
7423
74242. Changes to Readline
7425
7426a. Some changes were made to avoid gcc warnings with -Wall.
7427
7428b. rl_get_keymap_by_name now finds keymaps case-insensitively, so
7429 `set keymap EMACS' works.
7430
7431c. The history file writing and truncation functions now return a useful
7432 status on error.
7433
7434d. Fixed a bug that could cause applications to dereference a NULL pointer
7435 if a NULL second argument was passed to history_expand().
7436
74373. New Features in Bash
7438
7439a. doc/readline.3 has been moved to the readline distribution.
7440
74414. New Features in Readline
7442
7443a. New function, rl_get_screen_size (int *rows, int *columns), returns
7444 readline's idea of the screen dimensions.
7445
7446b. The timeout in rl_gather_tyi (readline keyboard input polling function)
7447 is now settable via a function (rl_set_keyboard_input_timeout()).
7448
7449c. Renamed the max_input_history variable to history_max_entries; the old
7450 variable is maintained for backwards compatibility.
7451
7452d. The list of characters that separate words for the history tokenizer is
7453 now settable with a variable: history_word_delimiters. The default
7454 value is as before.
7455
7456------------------------------------------------------------------------------
7457This document details the changes between this version, bash-2.05-beta1,
7458and the previous version, bash-2.05-alpha1.
7459
74601. Changes to Bash
7461
7462a. Changes to allow shared library and object building on the GNU Hurd.
7463
7464b. Fixes to the way exported functions are placed into the environment and
7465 cached.
7466
7467c. The globbing library once again respects locales when processing ranges
7468 in bracket expressions while doing pattern matching.
7469
7470d. System-specific configuration changes for: Tru 64, Interix
7471
7472e. Bashbug now uses /usr/bin/editor as one of the editing alternatives, and
7473 will use mktemp(1) or tempfile(1), if present, for temporary file creation.
7474
7475f. Bash no longer performs a binary file check on a script argument that's
7476 really a tty (like /dev/fd/0 or /dev/stdin).
7477
7478g. Fixed a bug in the execution of shell scripts that caused the effects of
7479 $BASH_ENV to be undone in some cases.
7480
7481h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly.
7482
7483i. Several changes to the job control code to avoid some signal state
7484 manipulation.
7485
7486j. The Bash malloc no longer blocks signals as often, which should make it
7487 faster.
7488
7489k. Fixed a parsing bug that did not allow backslash to escape a single quote
7490 inside a $'...' construct.
7491
7492l. Fixed a bug that caused things like ${var:=$'value'} to be parsed
7493 incorrectly. This showed up in newer versions of autoconf.
7494
7495m. Fixed a bug in the bash-specific readline initialization that caused
7496 key bindings to bash-specific function names appearing in .inputrc to
7497 not be honored.
7498
7499n. Bash now sets the file descriptor it uses to save the file descriptor
7500 opened on a shell script to close on exec.
7501
7502o. Fixed a bug in the prompt string decoding that caused it to misbehave
7503 when presented an octal sequence of fewer than three characters.
7504
7505p. Fixed the `test' builtin to return an error if `[' is supplied a single
7506 argument that is not `]'.
7507
7508q. Fixed a bug that caused subshells started to run executable shell scripts
7509 without a leading `#!' to incorrectly inherit an argument list preceding
7510 a shell builtin (like such a script called from a script sourced with `.',
7511 where there were variable assignments preceding the `.' command)
7512
7513r. Fixed a bug that caused changes to variables supplied in an assignment
7514 statement preceding a shell builtin to not be honored (like a script
7515 run with `.').
7516
7517s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values
7518 when the shell is started.
7519
7520t. Fixed a bug that caused SIGINT to kill shell scripts after the script
7521 called `wait'.
7522
7523u. The `fc' builtin now tries to create its temporary files in the directory
7524 named by $TMPDIR.
7525
7526v. Bash no longer calls any Readline functions or uses any Readline variables
7527 not declared in readline.h.
7528
7529w. Fixed a bug that caused some substitutions involving $@ to not be split
7530 correctly, especially expansions of the form ${paramterOPword}.
7531
7532x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it
7533 appears in the initial environment.
7534
7535y. Fixed a couple of problems with shell scripts without a leading `#!'
7536 being executed out of shell functions that could cause core dumps if
7537 such a script attempted to execute `return'.
7538
7539z. Fixed a problem with the `-nt' and `-ot' binary operators for the
7540 `test/[' builtin and the `[[' conditional command that caused wrong
7541 return values if one of the file arguments did not exist.
7542
7543aa. Fixed a bug that caused non-interactive shells which had previously
7544 executed `shopt -s expand_aliases' to fail to expand aliases in a
7545 command like `(command) &'.
7546
75472. Changes to Readline
7548
7549a. Changes to make most (but not yet all -- there is still crlf()) of the
7550 exported readline functions declared in readline.h have an rl_ prefix.
7551
7552b. More `const' changes in function arguments, mostly for completion
7553 functions.
7554
7555c. Fixed a bug in rl_forward that could cause the point to be set to before
7556 the beginning of the line in vi mode.
7557
7558d. Fixed a bug in the callback read-char interface to make it work when a
7559 readline function pushes some input onto the input stream with
7560 rl_execute_next (like the incremental search functions).
7561
7562e. Fixed a file descriptor leak in the history file manipulation code that
7563 was tripped when attempting to truncate a non-regular file (like
7564 /dev/null).
7565
7566f. Some existing variables are now documented and part of the public
7567 interface (declared in readline.h): rl_explict_arg, rl_numeric_arg,
7568 rl_editing_mode, rl_last_func.
7569
7570g. Renamed rltty_set_default_bindings to rl_tty_set_default_bindings and
7571 crlf to rl_crlf, so there are no public functions declared in readline.h
7572 without an `rl_' prefix. The old functions still exist for backwards
7573 compatibility.
7574
75753. New Features in Bash
7576
7577a. A new loadable builtin, realpath, which canonicalizes and expands symlinks
7578 in pathname arguments.
7579
8868edaf 7580b. When `set' is called without options, it prints function definitions in a
28ef6c31
JA
7581 way that allows them to be reused as input. This affects `declare' and
7582 `declare -p' as well.
7583
75844. New Features in Readline
7585
7586a. New application-callable function rl_set_prompt(const char *prompt):
7587 expands its prompt string argument and sets rl_prompt to the result.
7588
7589b. New application-callable function rl_set_screen_size(int rows, int cols):
7590 public method for applications to set readline's idea of the screen
7591 dimensions.
7592
7593c. The history example program (examples/histexamp.c) is now built as one
7594 of the examples.
7595
7596------------------------------------------------------------------------------
7597This document details the changes between this version, bash-2.05-alpha1,
7598and the previous version, bash-2.04-release.
7599
76001. Changes to Bash
7601
7602a. A fix was made to allow newlines in compond array assignments.
7603
7604b. configure now checks for real-time signals with unusable values.
7605
7606c. Interactive shells no longer exit if a substitution fails because of an
7607 unset variable within a sourced file.
7608
7609d. Fixed a problem with incorrect matching of extended glob patterns when
7610 doing pattern substitution.
7611
7612e. `{' is now quoted by the completion code when it appears in a filename.
7613
7614f. Fixed an error in pattern matching that caused the matcher to not
7615 correctly skip the rest of a bracket expression after a character
7616 matched.
7617
7618g. Fixed a bug in the IFS word splitting code to make a non-whitespace IFS
7619 character preceded by IFS whitespace part of the current delimiter rather
7620 than generating a separate field.
7621
7622h. The {!prefix@} expansion now generates separate words, analogous to $@,
7623 when double-quoted.
7624
7625i. Command substitution now ignores NUL bytes in the command output, and the
7626 parser ignores them on input.
7627
7628j. A fix was made to the job control code to prevent hanging processes when
7629 the shell thinks background processes are running but the kernel returns
7630 -1/ECHILD from waitpid().
7631
7632k. `pwd' now prints an error message if the write fails when displaying the
7633 current directory.
7634
7635l. When in POSIX mode, the shell prints trap dispostions without a leading
7636 `SIG' in the signal specification.
7637
7638m. Fixed a parser bug that caused the current command's line count to be
7639 messed up by a compound array assignment.
7640
7641n. Fixed a bug in the unwind-protect code that caused bad behavior on machines
7642 where ints and pointers are not the same size.
7643
7644o. System-specific configure changes for: MacOS X.
7645
7646p. Changes for Cygwin to translate \r\n and \r to \n and to set file
7647 descriptors used for reading input to text mode in various places.
7648
7649q. Fixed a bug that caused `!' to occasionally not be honored when in
7650 a (...) subshell.
7651
7652r. Bash no longer assumes that getcwd() will return any useful error message
7653 in the buffer passed as an argument if the call fails.
7654
7655s. The `source', `.', and `fc' builtins no longer check whether a file is
7656 binary before reading commands from it.
7657
7658t. Subshells no longer turn off job control when they exit, since that
7659 sometimes resulted in the terminal being reset to the wrong process
7660 group.
7661
7662u. The history code no longer tries to save the second and subsequent lines
7663 of a multi-line command if the first line was not saved.
7664
7665v. The history saving code now does a better job of saving blank lines in a
7666 multi-line command.
7667
7668w. Removed a `feature' that made `ulimit' silently translate `unlimited' to
7669 the current hard limit, which obscured some kernel error returns.
7670
7671x. Fixed the grammar so that `}' is recognized as a reserved word after
7672 another reserved word, rather than requiring a `;' or newline. This
7673 means that constructs like
7674
7675 { { echo a b c ; } }
7676
7677 work as expected.
7678
7679y. Conditional commands ([[...]]) now perform tilde expansion on their
7680 arguments.
7681
7682z. Noted in the documentation that `set -a' will cause functions to be
7683 exported if they are defined after `set -a' is executed.
7684
7685aa. When an interactive login shell starts, if $PWD and $HOME refer to the
7686 same directory but are not the same string, $PWD is set to $HOME.
7687
7688bb. Fixed `printf' to handle invalid floating point numbers better.
7689
7690cc. Temporary files are now created with random filenames, to improve security.
7691
7692dd. The readline initialization code now binds the custom bash functions and
7693 key bindings after the readline defaults are set up.
7694
7695ee. Fixed the `source' builtin to no longer overwrite a shell function's
7696 argument list, even if the sourced file changes the positional parameters.
7697
7698ff. A bug fix was made in the expansion of `$*' in contexts where it should
7699 not be split, like assignment statements.
7700
7701gg. Fixed a bug in the parameter substring expansion to handle conditional
7702 arithmetic expressions ( exp ? val1 : val2 ) without cutting the expression
7703 off at the wrong `:'.
7704
7705hh. The `<>' redirection is no longer subject to the current setting of
7706 `noclobber', as POSIX.2 specifies.
7707
7708ii. Fixed a bug in the conditional command parsing code that caused expressions
7709 in parentheses to occasionally be parsed incorrectly.
7710
7711jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or
7712 {...} to follow the )) without an intervening list terminator.
7713
7714kk. `printf' now treats `\E' the same as `\e' when performing backslash escape
7715 expansion for the `%b' format specifier.
7716
7717ll. When in POSIX mode, the shell no longer searches the current directory for
7718 a file to be sourced with `.' or `source' if `.' is not in $PATH.
7719
7720mm. Interactive comments are no longer turned off when POSIX mode is disabled.
7721
7722nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's
7723 environment when it starts up.
7724
7725oo. Fixed a bug in the `command' builtin so the effect of a command like
7726 `command exec 4<file' is as if the `command' had been omitted.
7727
7728pp. ${foo[@]} and ${foo[*]} now work as in ksh93 if `foo' is not an array
7729 variable.
7730
7731qq. ${#foo[X]}, where X is 0, @, or *, now work as in ksh93 if `foo' is not
7732 an array variable.
7733
7734rr. The shell's idea of an absolute pathname now takes into account a
7735 possible drive specification on Cygwin and other Windows systems.
7736
7737ss. Fixed a bug which caused incorrect parsing of some multi-character
7738 constructs if they were split across input lines with backslash-newline
7739 line continuation.
7740
7741tt. Fixed a bug that caused restricted shell mode to be set inappropriately
7742 when trying to execute a shell script without a leading `#!'.
7743
7744uu. Shell function definitions no longer require that the body be a group
7745 command ( {...} ), as POSIX.2 requires.
7746
7747vv. The `cd' and `pwd' builtins now process symlinks in pathnames internally
7748 and should require many fewer calls to getcwd().
7749
7750ww. Fixed a bug that caused a pipeline's process group to be set incorrectly
7751 if one of the pipeline elements contained a command substitution.
7752
7753xx. Fixed a bug that caused core dumps when expanding the value of HISTIGNORE.
7754
7755yy. The output of `set' is now quoted using $'...' so invisible characters are
7756 displayed as escape sequences.
7757
7758zz. Fixed the help text for `unset', since PATH and IFS may both be unset.
7759
7760aaa. The shell no longer puts directory names into the command hash table.
7761
7762bbb. Fixed a bug in `read' that caused it to occasionally free memory twice if
7763 it was interrupted after reading a large amount of data.
7764
7765ccc. Assignment statements that attempt to assign values to readonly variables
7766 now cause the command to return an error status.
7767
7768ddd. Fixed a bug that could cause incorrect output if a $(<file) construct was
7769 interrupted.
7770
7771eee. GROUPS and FUNCNAME now return an error status when assignment is
7772 attempted, but may be unset (in which case they lose their special
7773 properties). In all respects except unsetting, they are readonly.
7774
7775fff. The string-to-integer conversion code now ignores trailing whitespace in
7776 the string, even if strtol(3) does not.
7777
7778ggg. The tcsh magic-space function now does a better job of inserting the
7779 space close to where the point was before the history expansion, rather
7780 than just appending it.
7781
7782hhh. Fixed a bug which caused a file sourced from an interactive shell to
7783 fill up the jobs table if it ran lots of jobs.
7784
7785iii. Fixed a bug in the parameter pattern substitution code to avoid infinite
7786 recursion on zero-length matches.
7787
77882. Changes to Readline
7789
7790a. When setting the terminal attributes on systems using `struct termio',
7791 readline waits for output to drain before changing the attributes.
7792
7793b. A fix was made to the history word tokenization code to avoid attempts to
7794 dereference a null pointer.
7795
7796c. Readline now defaults rl_terminal_name to $TERM if the calling application
7797 has left it unset, and tries to initialize with the resultant value.
7798
7799d. Instead of calling (*rl_getc_function)() directly to get input in certain
7800 places, readline now calls rl_read_key() consistently.
7801
7802e. Fixed a bug in the completion code that allowed a backslash to quote a
7803 single quote inside a single-quoted string.
7804
7805f. rl_prompt is no longer assigned directly from the argument to readline(),
7806 but uses memory allocated by readline. This allows constant strings to
7807 be passed to readline without problems arising when the prompt processing
7808 code wants to modify the string.
7809
7810g. Fixed a bug that caused non-interactive history searches to return the
7811 wrong line when performing multiple searches backward for the same string.
7812
7813h. Many variables, function arguments, and function return values are now
7814 declared `const' where appropriate, to improve behavior when linking with
7815 C++ code.
7816
7817i. The control character detection code now works better on systems where
7818 `char' is unsigned by default.
7819
7820j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
7821
7822k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been
7823 replaced with a set of specific prototyped typedefs, though they are
7824 still in the readline header files for backwards compatibility.
7825
7826m. Nearly all of the (undocumented) internal global variables in the library
7827 now have an _rl_ prefix -- there were a number that did not, like
7828 screenheight, screenwidth, alphabetic, etc.
7829
7830n. The ding() convenience function has been renamed to rl_ding(), though the
7831 old function is still defined for backwards compatibility.
7832
7833o. The completion convenience functions filename_completion_function,
7834 username_completion_function, and completion_matches now have an rl_
7835 prefix, though the old names are still defined for backwards compatibility.
7836
7837p. The functions shared by readline and bash (linkage is satisfied from bash
7838 when compiling with bash, and internally otherwise) now have an sh_ prefix.
7839
7840q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so
7841 that the `soname' contains only the major version number rather than the
7842 major and minor numbers.
7843
7844r. Fixed a redisplay bug that occurred when the prompt spanned more than one
7845 physical line and contained invisible characters.
7846
78473. New Features in Bash
7848
7849a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
7850 per the new GNU coding standards.
7851
7852b. The /dev/tcp and /dev/udp redirections now accept service names as well as
7853 port numbers.
7854
7855c. `complete' and `compgen' now take a `-o value' option, which controls some
7856 of the aspects of that compspec. Valid values are:
7857
7858 default - perform bash default completion if programmable
7859 completion produces no matches
7860 dirnames - perform directory name completion if programmable
7861 completion produces no matches
7862 filenames - tell readline that the compspec produces filenames,
7863 so it can do things like append slashes to
7864 directory names and suppress trailing spaces
7865
78664. New Features in Readline
7867
7868a. The blink timeout for paren matching is now settable by applications.
7869
7870b. _rl_executing_macro has been renamed to rl_executing_macro, which means
7871 it's now part of the public interface.
7872
7873c. Readline has a new variable, rl_readline_state, which is a bitmap that
7874 encapsulates the current state of the library; intended for use by
7875 callbacks and hook functions.
7876
7877------------------------------------------------------------------------------
bb70624e
JA
7878This document details the changes between this version, bash-2.04-release,
7879and the previous version, bash-2.04-beta5.
7880
78811. Changes to Bash
7882
7883a. Better compile-time and configure-time checks for the necessity of
7884 inet_aton().
7885
7886b. A bug was fixed in the expansion of "${@:-}" when there are positional
7887 parameters.
7888
7889c. A typo was fixed in the output of `complete'.
7890
7891d. The matches generated for a word by the `-W' argument to complete and
7892 compgen are now matched against the word being completed, and only
7893 matches are returned as the result.
7894
7895e. Some fixes were made for systems which do not restart read(2) when a
7896 signal caught by bash is received.
7897
7898f. A bug was fixed which caused the umask to be set to 0 when an invalid
7899 symbolic mode mask was parsed.
7900
7901g. Fixed a bug that could cause a core dump if a SIGCHLD was received while
7902 performing an assignment statement using command substitution.
7903
7904h. Changed the word splitting function for programmable completion so cases
7905 in which the cursor is between words are handled a bit better.
7906
79072. Changes to Readline
7908
7909a. rl_funmap_names() is now documented.
7910
79113. New Features in Bash
7912
7913a. The LC_NUMERIC variable is now treated specially, and used to set the
7914 LC_NUMERIC locale category for number formatting, e.g., when `printf'
7915 displays floating-point numbers.
7916
7917------------------------------------------------------------------------------
7918This document details the changes between this version, bash-2.04-beta5,
7919and the previous version, bash-2.04-beta4.
7920
79211. Changes to Bash
7922
7923a. A couple of changes were made to the Makefiles for easier building on
7924 non-Unix systems.
7925
7926b. Fixed a bug where the current prompt would be set to $PS2 at startup.
7927
7928c. The shell script that tests an already-installed version was changed to
7929 remove the directory it created its test programs in at exit.
7930
7931d. Several changes were made to the code that tokenizes an input line for
7932 the programmable completion code. Shell metacharacters will now appear
7933 as individual words in the word list passed to the completion functions.
7934 Some of the example completion shell functions were changed to understand
7935 redirection operators.
7936
7937e. A bug was fixed that, under obscure circumstances, could confuse the
7938 parser when a shell function was run by the programmable completion code.
7939
7940f. A bug was fixed in the ulimit builtin for systems not using getrlimit().
7941
7942g. The execution code now propagates the correct exit status back to the rest
7943 of the code if the return value of a subshell command was being inverted.
7944 Some new test cases for inverting return values with the `!' reserved
7945 word have been added.
7946
7947h. Negative exponents in the arithmetic evaluation of v**e now return an
7948 evaluation error.
7949
7950i. A bug that caused bash to check the wrong process in a pipeline for
7951 abnormal termination (and consequently resetting the terminal attributes)
7952 was fixed.
7953
7954j. Fixed a bug that caused $PS2 to be displayed after PROMPT_COMMAND was
7955 executed.
7956
79572. Changes to Readline
7958
79591. Fixed a bug in a C preprocessor define that caused the keypad control
7960 functions to be compiled out for all platforms except DJGPP.
7961
7962------------------------------------------------------------------------------
7963This document details the changes between this version, bash-2.04-beta4,
7964and the previous version, bash-2.04-beta3.
7965
79661. Changes to Bash
7967
7968a. A couple of changes were made to the redirection to attempt to avoid
7969 race conditions and malicious file replacement.
7970
79712. A change was made to the string evaluation code (used for command
7972 substitution, `eval', and the `.' builtin) to fix an obscure core
7973 dump on alpha machines.
7974
79753. A bug that caused $LINENO to be wrong when executing arithmetic for
7976 commands was fixed.
7977
79784. A couple of memory leaks in the programmable completion code were fixed.
7979
79805. A bug that could cause a core dump by freeing memory twice during a call
7981 to `eval' if `set -u' had been enabled and an undefined variable was
7982 referenced was fixed.
7983
7984------------------------------------------------------------------------------
7985This document details the changes between this version, bash-2.04-beta3,
7986and the previous version, bash-2.04-beta2.
7987
79881. Changes to Bash
7989
7990a. Bash should run the appropriate startup files when invoked by ssh2.
7991
7992b. Fixed a bug in the parsing of conditional commands that could cause a
7993 core dump.
7994
7995c. Fixed a bug in parsing job specifications that occasionally caused
7996 core dumps when an out-of-range job was referenced.
7997
7998d. Fixed the `type' and `command' builtins to do better reporting of
7999 commands that are not found in $PATH or the hash table.
8000
8001e. Fixed a POSIX.2 compliance problem in the command builtin -- commands
8002 are supposed to be reported as full pathnames.
8003
8004f. The `echo' builtin now returns failure if a write error occurs.
8005
8006g. Fixed a bug which caused the locale to not be reset correctly when
8007 LC_ALL was unset.
8008
8009h. Changed description of `getopts' in man page and reference manual to make
8010 it clear that option characters may be characters other than letters.
8011
8012i. If the shell exits while in a function, make sure that any trap on EXIT
8013 doesn't think the function is still executing.
8014
8015j. Bashbug now tries harder to find a usable editor if $EDITOR is not set,
8016 rather than simply defaulting to `emacs'.
8017
8018k. Changes to the scripts that guess and canonicalize the system type, from
8019 the latest `automake' distribution via Debian.
8020
8021l. When using named pipes for process substitution, make sure the file
8022 descriptors opened for reading are set to non-blocking mode.
8023
8024m. Fixed a bug that caused termination of pipelines that are killed by a
8025 signal to not be reported in some cases.
8026
8027n. When not in literal-history mode, shell comment lines are not added to
8028 the history list.
8029
8030o. When running in POSIX.2 mode, bash no longer performs word splitting on
8031 the expanded value of the word supplied as the filename argument to
8032 redirection operators.
8033
8034p. The prompt string decoding code now backslash-quotes only characters that
8035 are special within double quotes when expanding the \w and \W escape
8036 sequences.
8037
8038q. Fixed a bug in the prompt decoding code that could cause a non-interactive
8039 shell to seg fault if `\u' was used in PS4 and the shell was in xtrace
8040 mode.
8041
8042r. Fixed a bug that caused function definitions to be printed with any
8043 redirections that should be attached to the entire function before the
8044 closing brace.
8045
8046s. Changed the tilde expansion code for Cygwin systems to avoid creating
8047 pathnames beginning with `//' if $HOME == `/'.
8048
8049t. Fixed a couple of autoconf tests to avoid creating files with fixed names
8050 in /tmp.
8051
8052u. The `trap' and `kill' builtins now know the names of the POSIX.1b real-
8053 time signals on systems which support them.
8054
80552. Changes to Readline
8056
8057a. Fixed a problem with the single-quote quoting function that could cause
8058 buffer overflows.
8059
8060b. Fixed a bug that caused incorrect `stat characters' to be printed if
8061 the files being completed were in the root directory and visible-stats
8062 was enabled.
8063
80643. New Features in Bash
8065
8066a. There is a new `rbash.1' manual page, from the Debian release.
8067
8068b. The `--enable-usg-echo-default' option to `configure' has been renamed to
8069 `--enable-xpg-echo-default'. The old option is still there for backwards
8070 compatibility.
8071
8072------------------------------------------------------------------------------
8073This document details the changes between this version, bash-2.04-beta2,
8074and the previous version, bash-2.04-beta1.
8075
80761. Changes to Bash
8077
8078a. Fixed a bug that could cause pipes to be closed inappropriately in
8079 some obscure cases.
8080
8081b. Fixed a bug that caused creation of the exported environment to clobber
8082 the current command string if there were any exported shell functions.
8083
8084c. Some changes were made to reduce bash's memory usage.
8085
8086d. Fixed a problem with programmable completion and filenames to be
8087 completed containing quote characters.
8088
8089e. Changed the code the removes named pipes created for the <(...) and >(...)
8090 expansions to defer removal until after any current shell function has
8091 finished executing.
8092
8093f. Fixed a bug in `select' which caused it to not handle the `continue'
8094 builtin correctly.
8095
8096g. Autoconf tests added for cygwin32 and mingw32.
8097
80982. New Features in Bash
8099
8100a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc'
8101 (which is still there for backwards compatibility).
8102
8103------------------------------------------------------------------------------
8104This document details the changes between this version, bash-2.04-beta1,
8105and the previous version, bash-2.04-alpha1.
8106
81071. Changes to Bash
8108
8109a. Fixed a bug in the programmable completion code that occurred when
8110 trying to complete command lines containing a `;' or `@'.
8111
8112b. The file descriptor from which the shell is reading a script is now
8113 moved to a file descriptor above the user-addressible range.
8114
8115c. Changes to `printf' so that it can handle integers beginning with 0
8116 or 0x as octal and hex, respectively.
8117
8118d. Fixes to the programmable completion code so it handles nonsense like
8119 `compgen -C xyz' gracefully.
8120
8121e. The shell no longer modifies the signal handler for SIGPROF, allowing
8122 profiling again on certain systems.
8123
8124f. The shell checks for a new window size, if the user has requested it,
8125 after a process exits due to a signal.
8126
8127g. Fixed a bug with variables with null values in a program's temporary
8128 environment and the bash getenv() replacement.
8129
8130h. `declare' and the other builtins that take variable assignments as
8131 arguments now honor `set -a' and mark modified variables for export.
8132
8133i. Some changes were made for --dump-po-strings mode when writing strings
8134 with embedded newlines.
8135
8136j. The code that caches export strings from the initial environment now
8137 duplicates the string rather than just pointing into the environment.
8138
8139k. The filename completion quoting code now uses single quotes by default
8140 if the filename being completed contains newlines, since \<newline>
8141 has a special meaning to the parser.
8142
8143l. Bash now uses typedefs bits32_t and u_bits32_t instead of int32_t and
8144 u_int32_t, respectively to avoid conflicts on certain Unix versions.
8145
8146m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x.
8147
8148n. Fixed a problem with hostname-to-ip-address translation in the
8149 /dev/(tcp|udp)/hostname/port redirection code.
8150
8151o. The texinfo manual has been reorganized slightly.
8152
8153p. Filename generation (globbing) range comparisons in bracket expressions
8154 no longer use strcoll(3) even if it is available, since it has unwanted
8155 effects in certain locales.
8156
8157q. Fixed a cosmetic problem in the source that caused the shell to not
8158 compile if DPAREN_ARITHMETIC was not defined but ARITH_FOR_COMMAND was.
8159
8160r. Fixed a bug in the here-document code tripped when the file descriptor
8161 opened to the file containing the text of the here document was the
8162 same as a redirector specified by the user.
8163
8164s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline'
8165 in `time ! pipeline'.
8166
8167t. Fixed a bug with the `wait' builtin which manifested itself when an
8168 interrupt was received while the shell was waiting for asynchronous
8169 processes in a shell script.
8170
8171u. Fixed the DEBUG trap code so that it has the correct value of $?.
8172
8173v. Fixed a bug in the parameter pattern substitution code that could cause
8174 the shell to attempt to free unallocated memory if the pattern started
8175 with `/' and an expansion error occurs.
8176
8177w. Fixed a bug in the positional parameter substring code that could
8178 cause the shell to loop freeing freed memory.
8179
8180x. Fixed a bug in the positional parameter pattern substitution code so
8181 that it correctly handles null replacement strings with a pattern
8182 string prefixed with `%' or `#'.
8183
8184y. The shell no longer attempts to import functions from the environment if
8185 started with `-n'.
8186
8187z. Fixed a bug that caused `return' in a command substitution executed in
8188 a shell function to return from the function in a subshell and continue
8189 execution.
8190
8191aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell
8192 is restricted.
8193
8194bb. The wait* job control functions now behave better if called when there
8195 are no unwaited-for children.
8196
8197cc. Command substitution no longer unconditionally disables job control in
8198 the subshell started to run the command.
8199
8200dd. A bug was fixed that occasionally caused traps to mess up the parser
8201 state.
8202
8203ee. `bashbug' now honors user headers in the mail message it sends.
8204
8205ff. A bug was fixed that caused the `:p' history modifier to not print the
8206 history expansion if the `histverify' option was set.
8207
82082. Changes to Readline
8209
8210a. Fixed a bug in the redisplay code for lines with more than 256 line
8211 breaks.
8212
8213b. A bug was fixed which caused invisible character markers to not be
8214 stripped from the prompt string if the terminal was in no-echo mode.
8215
8216c. Readline no longer tries to get the variables it needs for redisplay
8217 from the termcap entry if the calling application has specified its
8218 own redisplay function. Readline treats the terminal as `dumb' in
8219 this case.
8220
8221d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
8222 sequences is redrawn correctly.
8223
82243. New Features in Bash
8225
8226a. `bashbug' now accepts `--help' and `--version' options.
8227
8228b. There is a new `xpg_echo' option to `shopt' that controls the behavior
8229 of echo with respect to backslash-escaped characters at runtime.
8230
8231------------------------------------------------------------------------------
8232This document details the changes between this version, bash-2.04-alpha1,
8233and the previous version, bash-2.04-devel.
8234
82351. Changes to Bash
8236
8237a. Fixed a bug that could cause core dumps when performing substring
8238 expansion.
8239
8240b. Shared object configuration changes for: Solaris, OSF/1
8241
8242c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities
8243 for pathname expansion now understands GLOBIGNORE.
8244
8245d. The code that implements `eval' was changed to save the value of the
8246 current prompt, so an eval in a shell function called by the programmable
8247 completion code will not change the prompt to $PS2.
8248
8249e. Restored the undocumented NON_INTERACTIVE_LOGIN_SHELLS #define to
8250 config-top.h. If this is defined, all login shells will read the
8251 startup files, not just interactive and non-interactive started with
8252 the `--login' option.
8253
8254f. Fixed a bug that caused the expansion code to occasionally dump core if
8255 IFS contained characters > 128.
8256
8257g. Fixed a problem with the grammar so that a newline is not required
8258 after the `))' in the new-style arithmetic for statement; a semicolon
8259 may be used as expected.
8260
8261h. Variable indirection may now reference the shell's special variables.
8262
8263i. The $'...' and $"..." constructs are now added to the history correctly
8264 if they contain newlines and command-oriented history is enabled.
8265
8266j. It is now an error to try to assign a value to a function-local copy
8267 of a readonly shell variable (declared with the `local' builtin).
8268
82692. Changes to Readline
8270
8271a. The history file code now uses O_BINARY mode when reading and writing
8272 the history file on cygwin32.
8273
82743. New Features in Bash
8275
8276a. A new programmable completion facility, with two new builtin commands:
8277 complete and compgen.
8278
8279b. configure has a new option, `--enable-progcomp', to compile in the
8280 programmable completion features (enabled by default).
8281
8282c. `shopt' has a new option, `progcomp', to enable and disable programmable
8283 completion at runtime.
8284
8285d. Unsetting HOSTFILE now clears the list of hostnames used for completion.
8286
82874. New Features in Readline
8288
8289a. A new variable, rl_gnu_readline_p, always 1. The intent is that an
8290 application can verify whether or not it is linked with the `real'
8291 readline library or some substitute.
8292
8293------------------------------------------------------------------------------
8294This document details the changes between this version, bash-2.04-devel,
8295and the previous version, bash-2.03-release.
8296
82971. Changes to Bash
8298
8299a. System-specific configuration and source changes for: Interix, Rhapsody
8300
8301b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if
8302 JOB_CONTROL was not defined.
8303
8304c. An obscure race condition in the trap code was fixed.
8305
8306d. The string resulting from $'...' is now requoted to avoid any further
8307 expansion.
8308
8309e. The $'...' quoting syntax now allows backslash to escape a single quote,
8310 for ksh-93 compatibility.
8311
8312f. The $"..." quoting syntax now escapes backslashes and double quotes in
8313 the translated string when displaying them with the --dump-po-strings
8314 option.
8315
8316g. `echo -e' no longer converts \' to '.
8317
8318h. Fixes were made to the extended globbing code to handle embedded (...)
8319 patterns better.
8320
8321i. Some improvements were made to the code that unsets `nodelay' mode on
8322 the file descriptor from which bash is reading input.
8323
8324j. Some changes were made to the replacement termcap library for better
8325 operation on MS-DOS.
8326
8327k. Some changes were made to the tilde expansion code to handle backslash
8328 as a pathname separator on MS-DOS.
8329
8330l. The source has been reorganized a little bit -- there is now an `include'
8331 subdirectory, and lib/posixheaders has been removed.
8332
8333m. Improvements were made to the `read' builtin so that it makes many
8334 fewer read(2) system calls.
8335
8336n. The expansion of $- will include `c' and `s' when those options are
8337 supplied at shell invocation.
8338
8868edaf 8339o. Several improvements were made to the completion code: variable completion
bb70624e
JA
8340 now works better when there are unterminated expansions, command
8341 completion understands quotes better, and completion now works in certain
8342 unclosed $(... constructs.
8343
8344p. The arithmetic expansion code was fixed to not need the value of a
8345 variable being assigned a value (fixes the "ss=09; let ss=10" bug).
8346
8347q. Some changes were made to make exported environment creation faster.
8348
8349r. The html documentation will be installed into $(htmldir) if that variable
8350 has a value when `make install' is run.
8351
8352s. Fixed a bug that would cause the bashrc file to be sourced inappropriately
8353 when bash is started by sshd.
8354
8355t. The SSH_CLIENT environment variable is no longer auto-exported.
8356
8357u. A bug that caused redirections with (...) subshells to be performed in
8358 the wrong order was fixed.
8359
28ef6c31 8360v. A bug that occasionally caused inappropriate expansion of assignment
bb70624e
JA
8361 statements in compound array assignments was fixed.
8362
8363w. The code that parses the words in a compound array assignment was
8364 simplified considerably and should work better now.
8365
8366x. Fixes to the non-job-control code in nojobs.c to make it POSIX.2-compliant
8367 when a user attempts to retrieve the status of a terminated background
8368 process.
8369
8370y. Fixes to the `printf' builtin so that it doesn't try to expand all
8371 backslash escape sequences in the format string before parsing it for
8372 % format specifiers.
8373
83742. Changes to Readline
8375
8376a. The history library tries to truncate the history file only if it is a
8377 regular file.
8378
8379b. A bug that caused _rl_dispatch to address negative array indices on
8380 systems with signed chars was fixed.
8381
8382c. rl-yank-nth-arg now leaves the history position the same as when it was
8383 called.
8384
8385d. Changes to the completion code to handle MS-DOS drive-letter:pathname
8386 filenames.
8387
8388e. Completion is now case-insensitive by default on MS-DOS.
8389
8390f. Fixes to the history file manipulation code for MS-DOS.
8391
8392g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
8393
8394h. Some fixes were made to the redisplay code for better operation on MS-DOS.
8395
8396i. The quoted-insert code will now insert tty special chars like ^C.
8397
8398j. A bug was fixed that caused the display code to reference memory before
8399 the start of the prompt string.
8400
8401k. More support for __EMX__ (OS/2).
8402
8403l. A bug was fixed in readline's signal handling that could cause infinite
8404 recursion in signal handlers.
8405
8406m. A bug was fixed that caused the point to be less than zero when rl_forward
8407 was given a very large numeric argument.
8408
8409n. The vi-mode code now gets characters via the application-settable value
8410 of rl_getc_function rather than calling rl_getc directly.
8411
84123. New Features in Bash
8413
8414a. The history builtin has a `-d offset' option to delete the history entry
8415 at position `offset'.
8416
8417b. The prompt expansion code has two new escape sequences: \j, the number of
8418 active jobs; and \l, the basename of the shell's tty device name.
8419
8420c. The `bind' builtin has a new `-x' option to bind key sequences to shell
8421 commands.
8422
8423d. There is a new shell option, no_empty_command_completion, which, when
8424 enabled, disables command completion when TAB is typed on an empty line.
8425
8426e. The `help' builtin has a `-s' option to just print a builtin's usage
8868edaf 8427 synopsis.
bb70624e
JA
8428
8429f. There are several new arithmetic operators: id++, id-- (variable
8430 post-increment/decrement), ++id, --id (variabl pre-increment/decrement),
8431 expr1 , expr2 (comma operator).
8432
8433g. There is a new ksh-93 style arithmetic for command:
8434 for ((expr1 ; expr2; expr3 )); do list; done
8435
8436h. The `read' builtin has a number of new options:
8437 -t timeout only wait timeout seconds for input
8438 -n nchars only read nchars from input instead of a full line
8439 -d delim read until delim rather than newline
8440 -s don't echo input chars as they are read
8441
8442i. The redirection code now handles several filenames specially:
8443 /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
8444 not they are present in the file system.
8445
8446j. The redirection code now recognizes pathnames of the form
8447 /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
8448 of the appropriate type to the specified port on the specified host.
8449
8450k. The ksh-93 ${!prefix*} expansion, which expands to the names of all
8451 shell variables whose names start with prefix, has been implemented.
8452
8453l. There is a new dynamic variable, FUNCNAME, which expands to the name of
8454 a currently-executing function. Assignments to FUNCNAME have no effect.
8455
8456m. The GROUPS variable is no longer readonly; assignments to it are silently
8457 discarded. This means it can be unset.
8458
84594. New Features in Readline
8460
8461a. Parentheses matching is now always compiled into readline, and enabled
8462 or disabled when the value of the `blink-matching-paren' variable is
8463 changed.
8464
8465b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
8466
8467c. MS-DOS systems now use ~/_history as the default history file.
8468
8469d. history-search-{forward,backward} now leave the point at the end of the
8470 line when the string to search for is empty, like
8471 {reverse,forward}-search-history.
8472
8473e. history-search-{forward,backward} now leave the last history line found
8474 in the readline buffer if the second or subsequent search fails.
8475
8476f. New function for use by applications: rl_on_new_line_with_prompt, used
8477 when an application displays the prompt itself before calling readline().
8478
8479g. New variable for use by applications: rl_already_prompted. An application
8480 that displays the prompt itself before calling readline() must set this to
8481 a non-zero value.
8482
8483------------------------------------------------------------------------------
b72432fd
JA
8484This document details the changes between this version, bash-2.03-release,
8485and the previous version, bash-2.03-beta2.
8486
84871. Changes to Bash
8488
8489a. A file descriptor leak in the `fc' builtin was fixed.
8490
8491b. A bug was fixed in the `read' builtin that caused occasional spurious
8492 failures when using `read -e'.
8493
8494c. The version code needed to use the value of the cpp variable
8495 CONF_MACHTYPE rather than MACHTYPE.
8496
8497d. A new test was added to exercise the command printing and copying code.
8498
8499e. A bug was fixed that caused `time' to be recognized as a reserved word
8500 if it was the first pattern in a `case' statement pattern list.
8501
8502------------------------------------------------------------------------------
8503This document details the changes between this version, bash-2.03-beta2,
8504and the previous version, bash-2.03-beta1.
8505
85061. Changes to Bash
8507
8508a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2.
8509
8510b. config.{guess,sub} support added for the NEC SX4.
8511
8512c. Changed some of the cross-compiling sections of the configure macros in
8513 aclocal.m4 so that configure won't abort.
8514
8515d. Slight changes to how the HTML versions of the bash and readline manuals
8516 are generated.
8517
8518e. Fixed conditional command printing to avoid interpreting printf `%'-escapes
8519 in arguments to [[.
8520
8521f. Don't include the bash malloc on all variants of the alpha processor.
8522
8523g. Changes to configure to make --enable-profiling work on Solaris 2.x.
8524
8525h. Fixed a bug that manifested itself when shell functions were called
8526 between calls to `getopts'.
8527
8528i. Fixed pattern substitution so that a bare `#'as a pattern causes the
8529 replacement string to be prefixed to the search string, and a bare
8530 `%' causes the replacement string to be appended to the search string.
8531
8532j. Fixed a bug in the command execution code that caused child processes
8533 to occasionally have the wrong value for $!.
8534
85352. Changes to Readline
8536
8537a. Added code to the history library to catch history substitutions using
8538 `&' without a previous history substitution or search having been
8539 performed.
8540
85413. New Features in Bash
8542
85434. New Features in Readline
8544
8545a. New bindable variable: `isearch-terminators'.
8546
8547b. New bindable function: `forward-backward-delete-char' (unbound by default).
8548
8549------------------------------------------------------------------------------
8550This document details the changes between this version, bash-2.03-beta1,
8551and the previous version, bash-2.03-alpha.
8552
85531. Changes to Bash
8554
8555a. A change was made to the help text for `{...}' to make it clear that a
8556 semicolon is required before the closing brace.
8557
8558b. A fix was made to the `test' builtin so that syntax errors cause test
8559 to return an exit status > 1.
8560
8561c. Globbing is no longer performed on assignment statements that appear as
8562 arguments to `assignment builtins' such as `export'.
8563
8564d. System-specific configuration changes were made for: Rhapsody,
8565 AIX 4.2/gcc, BSD/OS 4.0.
8566
8567e. New loadable builtins: ln, unlink.
8568
8569f. Some fixes were made to the globbing code to handle extended glob patterns
8570 which immediately follow a `*'.
8571
8572g. A fix was made to the command printing code to ensure that redirections
8573 following compound commands have a space separating them from the rest
8574 of the command.
8575
8576h. The pathname canonicalization code was changed to produce fewer leading
8577 `//' sequences, since those are interpreted as network file system
8578 pathnames on some systems.
8579
8580i. A fix was made so that loops containing `eval' commands in commands passed
8581 to `bash -c' would not exit prematurely.
8582
8583j. Some changes were made to the job reaping code when the shell is not
8584 interactive, so the shell will retain exit statuses longer for examination
8585 by `wait'.
8586
8587k. A fix was made so that `jobs | command' works again.
8588
8589l. The erroneous compound array assignment var=((...)) is now a syntax error.
8590
8591m. A change was made to the dynamic loading code in `enable' to support
8592 Tenon's MachTen.
8593
8594n. A fix was made to the globbing code so that extended globbing patterns
8595 will correctly match `.' in a bracket expression.
8596
85972. Changes to Readline
8598
8599a. A fix was made to the completion code in which a typo caused the wrong
8600 value to be passed to the function that computed the longest common
8601 prefix of the list of matches.
8602
8603b. The completion code now checks the value of rl_filename_completion_desired,
8604 which is set by application-supplied completion functions to indicate
8605 that filename completion is being performed, to decide whether or not to
8606 call an application-supplied `ignore completions' function.
8607
86083. New Features in Bash
8609
8610a. A change was made to the startup file code so that any shell begun with
8611 the `--login' option, even non-interactive shells, will source the login
8612 shell startup files.
8613
86144. New Features in Readline
8615
8616a. A new variable, rl_erase_empty_line, which, if set by an application using
8617 readline, will cause readline to erase, prompt and all, lines on which the
8618 only thing typed was a newline.
8619
8620------------------------------------------------------------------------------
8621This document details the changes between this version, bash-2.03-alpha,
8622and the previous version, bash-2.02.1-release.
8623
86241. Changes to Bash
8625
8626a. System-specific configuration changes were made for: Irix 6.x, Unixware 7.
8627
8628b. The texi2dvi and texi2html scripts were updated to the latest versions
8629 from the net.
8630
8631c. The configure tests that determine which native type is 32 bits were
8632 changed to not require a compiled program.
8633
8634d. Fixed a bug in shell_execve that could cause memory to be freed twice
8635 after a failed exec.
8636
8637e. The `printf' test uses `diff -a' if it's available to prevent confusion
8638 due to the non-ascii output.
8639
8640f. Shared object configuration is now performed by a shell script,
8641 support/shobj-conf, which generates values to be substituted into
8642 makefiles by configure.
8643
8644g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a
8645 return value.
8646
8647h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar
8648 handling of RLIMIT_FILESIZE.
8649
8650i. Some new loadable builtins were added: id, printenv, sync, whoami, push,
8651 mkdir. `pushd', `popd', and `dirs' can now be built as regular or
8652 loadable builtins from the same source file.
8653
8654j. Changes were made to `printf' to handle NUL bytes in the expanded format
8655 string.
8656
8657k. The various `make clean' Makefile targets now descend into lib/sh.
8658
8659l. The `type' builtin was changed to use the internal `getopt' so that things
8660 like `type -ap' work as expected.
8661
8662m. There is a new configuration option, --with-installed-readline, to link
8663 bash with a locally-installed version of readline. Only readline version
8664 4.0 and later releases can support this. Shared and static libraries
8665 are supported. The installed include files are used.
8666
8667n. There is a new autoconf macro used to find which basic type is 64 bits.
8668
8669o. Dynamic linking and loadable builtins should now work on SCO 3.2v5*,
8670 AIX 4.2 with gcc, Unixware 7, and many other systems using gcc, where
8671 the `-shared' options works correctly.
8672
8673p. A bug was fixed in the bash filename completion code that caused memory to
8674 be freed twice if a directory name containing an unset variable was
8675 completed and the -u option was set.
8676
8677q. The prompt expansion code now quotes the `$' in the `\$' expansion so it
8678 is not processed by subsequent parameter expansion.
8679
8680r. Fixed a parsing bug that caused a single or double quote after a `$$' to
8681 trigger ANSI C expansion or locale translation.
8682
8683s. Fixed a bug in the globbing code that caused quoted filenames containing
8684 no globbing characters to sometimes be incorrectly expanded.
8685
8686t. Changes to the default prompt strings if prompt string decoding is not
8687 compiled into the shell.
8688
8689u. Added `do', `then', `else', `{', and `(' to the list of keywords that may
8690 precede the `time' reserved word.
8691
8692v. The shell may now be cross-built for BeOS as well as cygwin32.
8693
8694w. The conditional command execution code now treats `=' the same as `=='
8695 for deciding when to perform pattern matching.
8696
8697x. The `-e' option no longer causes the shell to exit if a command exits
8698 with a non-zero status while running the startup files.
8699
8700y. The `printf' builtin no longer dumps core if a modifier is supplied in
8701 the format string without a conversion character (e.g. `%h').
8702
8703z. Array assignments of the form a=(...) no longer show up in the history
8704 list.
8705
8706aa. The parser was fixed to obey the POSIX.2 rules for finding the closing
8707 `}' in a ${...} expression.
8708
8709bb. The history file is now opened with mode 0600 rather than 0666, so bash
8710 no longer relies on the user's umask being set appropriately.
8711
8712cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now
8713 relies on proper behavior from the C library.
8714
8715dd. Minor changes were made to allow quoted variable expansions using
8716 ${...} to be completed correctly if there is no closing `"'.
8717
8718ee. Changes were made to builtins/Makefile.in so that configuring the shell
8719 with `--enable-profiling' works right and builtins/mkbuiltins is
8720 generated.
8721
87222. Changes to Readline
8723
8724a. The version number is now 4.0.
8725
8726b. There is no longer any #ifdef SHELL code in the source files.
8727
8728c. Some changes were made to the key binding code to fix memory leaks and
8729 better support Win32 systems.
8730
8731d. Fixed a silly typo in the paren matching code -- it's microseconds, not
8732 milliseconds.
8733
8734e. The readline library should be compilable by C++ compilers.
8735
8736f. The readline.h public header file now includes function prototypes for
8737 all readline functions, and some changes were made to fix errors in the
8738 source files uncovered by the use of prototypes.
8739
8740g. The maximum numeric argument is now clamped at 1000000.
8741
8742h. Fixes to rl_yank_last_arg to make it behave better.
8743
8744i. Fixed a bug in the display code that caused core dumps if the prompt
8745 string length exceeded 1024 characters.
8746
8747j. The menu completion code was fixed to properly insert a single completion
8748 if there is only one match.
8749
8750k. A bug was fixed that caused the display code to improperly display tabs
8751 after newlines.
8752
87533. New Features in Bash
8754
8755a. New `shopt' option, `restricted_shell', indicating whether or not the
8756 shell was started in restricted mode, for use in startup files.
8757
8758b. Filename generation is now performed on the words between ( and ) in
8759 array assignments (which it probably should have done all along).
8760
8761c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
8762
8763d. ENV and BASH_ENV are read-only variables in a restricted shell.
8764
87654. New Features in Readline
8766
8767a. Many changes to the signal handling:
8768 o Readline now catches SIGQUIT and cleans up the tty before returning;
8769 o A new variable, rl_catch_signals, is available to application writers
8770 to indicate to readline whether or not it should install its own
8771 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
8772 SIGTTIN, and SIGTTOU;
8773 o A new variable, rl_catch_sigwinch, is available to application
8774 writers to indicate to readline whether or not it should install its
8775 own signal handler for SIGWINCH, which will chain to the calling
8776 applications's SIGWINCH handler, if one is installed;
8777 o There is a new function, rl_free_line_state, for application signal
8778 handlers to call to free up the state associated with the current
8779 line after receiving a signal;
8780 o There is a new function, rl_cleanup_after_signal, to clean up the
8781 display and terminal state after receiving a signal;
8782 o There is a new function, rl_reset_after_signal, to reinitialize the
8783 terminal and display state after an application signal handler
8784 returns and readline continues
8785
8786b. There is a new function, rl_resize_terminal, to reset readline's idea of
8787 the screen size after a SIGWINCH.
8788
8789c. New public functions: rl_save_prompt and rl_restore_prompt. These were
8790 previously private functions with a `_' prefix.
8791
8792d. New function hook: rl_pre_input_hook, called just before readline starts
8793 reading input, after initialization.
8794
8795e. New function hook: rl_display_matches_hook, called when readline would
8796 display the list of completion matches. The new function
8797 rl_display_match_list is what readline uses internally, and is available
8798 for use by application functions called via this hook.
8799
8800f. New bindable function, delete-char-or-list, like tcsh.
8801
8802------------------------------------------------------------------------------
bc4cd23c
JA
8803This document details the changes between this version, bash-2.02.1-release,
8804and the previous version, bash-2.02-release.
8805
88061. Changes to Bash
8807
8808a. A bug that caused the bash readline support to not compile unless aliases
8809 and csh-style history were configured into the shell was fixed.
8810
8811b. Fixed a bug that could cause a core dump when here documents contained
8812 more than 1000 characters.
8813
8814c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same
8815 as the current directory when in POSIX mode.
8816
8817d. Fixed an alignment problem with the memory returned by the bash malloc,
8818 so returned memory is now 64-bit aligned.
8819
8820e. Fixed a bug that caused command substitutions executed within pipelines
8821 to put the terminal in the wrong process group.
8822
8823f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop,
8824 Unixware 2, and Unixware 7.
8825
8826g. Fixes to the pattern matching code to make it work correctly for eight-bit
8827 characters.
8828
8829h. Fixed a problem that occasionally caused the shell to display the wrong
8830 value for the new working directory when changing to a directory found
8831 in $CDPATH when in physical mode.
8832
8833i. Fixed a bug that caused core dumps when using conditional commands in
8834 shell functions.
8835
8836j. Fixed a bug that caused the printf builtin to loop forever if the format
8837 string did not consume any of the arguments.
8838
8839k. Fixed a bug in the parameter expansion code that caused "$@" to be
8840 incorrectly split if $IFS did not contain a space character.
8841
8842l. Fixed a bug that could cause a core dump when completing hostnames if
8843 the number of matching hostnames was an exact multiple of 16.
8844
8845m. Fixed a bug that caused the shell to fork too early when a command
8846 such as `%2 &' was given.
8847
88482. Changes to Readline
8849
8850a. Fixed a problem with redisplay that showed up when the prompt string was
8851 longer than the screen width and the prompt contained invisible characters.
8852
8853------------------------------------------------------------------------------
8854This document details the changes between this version, bash-2.02-release,
8855and the previous version, bash-2.02-beta2.
cce855bc
JA
8856
88571. Changes to Bash
8858
8859a. A bug was fixed that caused the terminal process group to be set
8860 incorrectly when performing command substitution of builtins in a
8861 pipeline.
8862
8863------------------------------------------------------------------------------
8864This document details the changes between this version, bash-2.02-beta2,
8865and the previous version, bash-2.02-beta1.
8866
88671. Changes to Bash
8868
8869a. Attempting to `wait' for stopped jobs now generates a warning message.
8870
8871b. Pipelines which exit due to SIGPIPE in non-interactive shells are now
8872 not reported if the shell is compiled -DDONT_REPORT_SIGPIPE.
8873
8874c. Some changes were made to builtins/psize.sh and support/bashbug.sh to
8875 attempt to avoid some /tmp file races and surreptitious file
8876 substitutions.
8877
8878d. Fixed a bug that caused the shell not to compile if configured with
8879 dparen arithmetic but without aliases.
8880
8881e. Fixed a bug that caused the input stream to be switched when assigning
8882 empty arrays with `bash -c'.
8883
8884f. A bug was fixed in the readline expansion glue code that caused bash to
8885 dump core when expanding lines with an unclosed single quote.
8886
8887g. A fix was made to the `cd' builtin so that using a non-empty directory
8888 from $CDPATH results in an absolute pathname of the new current working
8889 directory to be displayed after the current directory is changed.
8890
8891h. Fixed a bug in the variable assignment code that caused the shell to
8892 dump core when referencing an unset variable with `set -u' enabled in
8893 an assignment statement preceding a command.
8894
8895i. Fixed a bug in the exit trap code that caused reserved words to not be
8896 recognized under certain circumstances.
8897
8898j. Fixed a bug in the parameter pattern substitution code so that quote
8899 removal is performed.
8900
8901k. The shell should now configure correctly on Apple Rhapsody systems.
8902
8903l. The `kill' builtin now prints a usage message if it is not passed any
8904 arguments.
8905
8906------------------------------------------------------------------------------
8907This document details the changes between this version, bash-2.02-beta1,
8908and the previous version, bash-2.02-alpha1.
8909
89101. Changes to Bash
8911
8912a. A few compilation bugs were fixed in the new extended globbing code.
8913
8914b. Executing arithmetic commands now sets the command name to `((' so
8915 error messages look right.
8916
8917c. Fixed some build problems with various configuration options.
8918
8919d. The `printf' builtin now aborts immediately if an illegal format
8920 character is encountered.
8921
8922e. The code that creates here-documents now behaves better if the file it's
8923 trying to create already exists for some reason.
8924
8925f. Fixed a problem with the extended globbing code that made patterns like
8926 `x+*' expand incorrectly.
8927
8928g. The prompt string expansion code no longer quotes tildes with backslashes.
8929
8930h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in
8931 the presence of lstat(2) failures.
8932
8933i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'.
8934
8935j. The mail checking code now ensures that it has a valid default mailpath.
8936
8937k. A bug was fixed that caused local variables to be unset inappropriately
8938 when sourcing a script from within another sourced script.
8939
8940l. A bug was fixed in the history saving code so that functions are saved
8941 in the history list correctly if `cmdhist' is enabled, but `lithist'
8942 is not.
8943
8944m. A bug was fixed that caused printf overflows when displaying error
8945 messages.
8946
8947n. It should be easier to build the loadble builtins in examples/loadables,
8948 though some manual editing of the generated Makefile is still required.
8949
8950o. The user's primary group is now always ${GROUPS[0]}.
8951
8952p. Some updates were made to support/config.guess from the GNU master copy.
8953
8954q. Some changes were made to the autoconf support for Solaris 2.6 large
8955 files.
8956
8957r. The `command' builtins now does the right thing when confstr(3) cannot
8958 find a value for _CS_PATH.
8959
8960s. Extended globbing expressions like `*.!(c)' are not history expanded if
8961 `extglob' is enabled.
8962
8963t. Using the `-P' option to `cd' will force the value that is assigned to
8964 PWD to not contain any symbolic links.
8965
89662. Changes to Readline
8967
8968a. The code that prints completion listings now behaves better if one or
8969 more of the filenames contains non-printable characters.
8970
8971b. The time delay when showing matching parentheses is now 0.5 seconds.
8972
8973------------------------------------------------------------------------------
8974This document details the changes between this version, bash-2.02-alpha1,
8975and the previous version, bash-2.01.1-release.
8976
89771. Changes to Bash
8978
8979a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x,
8980 Solaris 2.6, SINIX SVR4.
8981
8982b. Changes were made to the generated `info' files so that `install-info'
8983 works correctly.
8984
8985c. PWD is now auto-exported.
8986
8987d. A fix was made to the pipeline code to make sure that the shell forks
8988 to execute simple commands consisting solely of assignment statements.
8989
8990e. Changes to the test suite for systems with 14-character filenames.
8991
8992f. The default sizes of some internal hash tables have been made smaller
8993 to reduce the shell's memory footprint.
8994
8995g. The `((...))' arithmetic command is now executed directly instead of
8996 being translated into `let "..."'.
8997
8998h. Fixes were made to the expansion code so that "$*", "$@", "${array[@]}",
8999 and "${array[@]}" expand correctly when IFS does not contain a space
9000 character, is unset, or is set to NULL.
9001
9002i. The indirect expansion code (${!var}) was changed so that the only
9003 valid values of `var' are variable names, positional parameters, `#',
9004 `@', and `*'.
9005
9006j. An arithmetic expression error in a $((...)) expansion now causes a
9007 non-interactive shell running in posix mode to exit.
9008
9009k. Compound array assignment now splits the words within the parentheses
9010 on shell metacharacters like the parser would before expansing them
9011 and performing the assignment. This is for compatibility with ksh-93.
9012
9013l. The internal shell backslash-quoting code (used in the output of `set'
9014 and completion) now quotes tildes if they appear at the start of the
9015 string or after a `=' or `:'.
9016
9017m. A couple of bugs with `shopt -o' were fixed.
9018
9019n. `bash +o' now displays the same output as `set +o' before starting an
9020 interactive shell.
9021
9022o. A bug that caused command substitution and the `eval' builtin to
9023 occasionally free memory twice when an error was encountered was fixed.
9024
9025p. The filename globbing code no longer requires read permission for a
9026 directory when the filename to be matched does not contain any globbing
9027 characters, as POSIX.2 specifies.
9028
9029q. A bug was fixed so that the job containing the last asynchronous
9030 process is not removed from the job table until a `wait' is executed
9031 for that process or another asynchronous process is started. This
9032 satisfies a POSIX.2 requirement.
9033
9034r. A `select' bug was fixed so that a non-numeric user response is treated
9035 the same as a numeric response that is out of range.
9036
9037s. The shell no longer parses the value of SHELLOPTS from the environment
9038 if it is restricted, running setuid, or running in `privileged mode'.
9039
9040t. Fixes were made to enable large file support on systems such as
9041 Solaris 2.6, where the size of a file may be larger than can be held
9042 in an `int'.
9043
9044u. The filename hashing code was fixed to not add `./' to the beginning of
9045 filenames which already begin with `./'.
9046
9047v. The configure script was changed so that the GNU termcap library is not
9048 compiled in if `prefer-curses' has been specified.
9049
9050w. HISTCONTROL and HISTIGNORE are no longer applied to the second and
9051 subsequent lines of a multi-line command.
9052
9053x. A fix was made to `disown' so that it does a better job of catching
9054 out-of-range jobs.
9055
9056y. Non-interactive shells no longer report the status of processes terminated
9057 due to SIGINT, even if the standard output is a terminal.
9058
9059z. A bug that caused the output of `jobs' to have extra carriage returns
9060 was fixed.
9061
9062aa. A bug that caused PIPESTATUS to not be set when builtins or shell
9063 functions were executed in the foreground was fixed.
9064
9065bb. Bash now attempts to detect when it is being run by sshd, and treats
9066 that case identically to being run by rshd.
9067
9068cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell
9069 options was changed was fixed.
9070
9071dd. The `kill' builtin now disallows empty or missing process id arguments
9072 instead of treating them as identical to `0', which means the current
9073 process.
9074
9075ee. `var=value declare -x var' now behaves identically to
9076 `var=value export var'. Similarly for `var=value declare -r var' and
9077 `var=value readonly var'.
9078
9079ff. A few memory leaks were fixed.
9080
9081gg. `alias' and `unalias' now print error messages when passed an argument
9082 that is not an alias for printing or deletion, even when the shell is
9083 not interactive, as POSIX.2 specifies.
9084
9085hh. `alias' and `alias -p' now return a status of 0 when no aliases are
9086 defined, as POSIX.2 specifes.
9087
9088ii. `cd -' now prints the pathname of the new working directory if the shell
9089 is interactive.
9090
9091jj. A fix was made so that the code that binds $PWD now copes with getcwd()
9092 returning NULL.
9093
9094kk. `unset' now checks whether or not a function name it's trying to unset
9095 is a valid shell identifier only when the shell is running in posix mode.
9096
9097ll. A change was made to the code that generates filenames for here documents
9098 to make them less prone to name collisions.
9099
9100mm. The parser was changed so that `time' is recognized as a reserved word
9101 only at the beginning of a pipeline.
9102
9103nn. The pathname canonicalization code was changed so that `//' is converted
9104 into `/', but all other pathnames beginning with `//' are left alone, as
9105 POSIX.2 specifies.
9106
9107oo. The `logout' builtin will no longer exit a non-interactive non-login
9108 shell.
9109
91102. Changes to Readline
9111
9112a. Fixed a problem in the readline test program rltest.c that caused a core
9113 dump.
9114
9115b. The code that handles parser directives in inputrc files now displays
9116 more error messages.
9117
9118c. The history expansion code was fixed so that the appearance of the
9119 history comment character at the beginning of a word inhibits history
9120 expansion for that word and the rest of the input line.
9121
91223. New Features in Bash
9123
9124a. A new version of malloc, based on the older GNU malloc, that has many
9125 changes, is more page-based, is more conservative with memory usage,
9126 and does not `orphan' large blocks when they are freed.
9127
9128b. A new version of gmalloc, based on the old GLIBC malloc, with many
9129 changes and range checking included by default.
9130
9131c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic
9132 Regular Expression matching, including character classes, collating
9133 symbols, equivalence classes, and support for case-insensitive pattern
9134 matching.
9135
9136d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
9137 implemented, controlled by a new `shopt' option, `extglob'.
9138
9139e. There is a new ksh-like `[[' compound command, which implements
9140 extended `test' functionality.
9141
9142f. There is a new `printf' builtin, implemented according to the POSIX.2
9143 specification.
9144
9145g. There is a new feature for command substitution: $(< filename) now expands
9146 to the contents of `filename', with any trailing newlines removed
9147 (equivalent to $(cat filename)).
9148
9149h. There are new tilde prefixes which expand to directories from the
9150 directory stack.
9151
9152i. There is a new `**' arithmetic operator to do exponentiation.
9153
9154j. There are new configuration options to control how bash is linked:
9155 `--enable-profiling', to allow bash to be profiled with gprof, and
9156 `--enable-static-link', to allow bash to be linked statically.
9157
9158k. There is a new configuration option, `--enable-cond-command', which
9159 controls whether or not the `[[' command is included. It is on by
9160 default.
9161
9162l. There is a new configuration option, `--enable-extended-glob', which
9163 controls whether or not the ksh extended globbing feature is included.
9164 It is enabled by default.
9165
9166m. There is a new configuration #define in config.h.top that, when enabled,
9167 will cause all login shells to source /etc/profile and one of the user-
9168 specific login shell startup files, whether or not the shell is
9169 interactive.
9170
9171n. There is a new invocation option, `--dump-po-strings', to dump
9172 a shell script's translatable strings ($"...") in GNU `po' format.
9173
9174o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
9175 pattern matching when globbing filenames and using the `case' construct.
9176
9177p. There is a new `shopt' option, `huponexit', which, when enabled, causes
9178 the shell to send SIGHUP to all jobs when an interactive login shell
9179 exits.
9180
9181q. `bind' has a new `-u' option, which takes a readline function name as an
9182 argument and unbinds all key sequences bound to that function in a
9183 specified keymap.
9184
9185r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
9186 and running jobs, respectively.
9187
9188s. The `shopt' `-p' option now causes output to be displayed in a reusable
9189 format.
9190
9191t. `test' has a new `-N' option, which returns true if the filename argument
9192 has been modified since it was last accessed.
9193
9194u. `umask' now has a `-p' option to print output in a reusable format.
9195
9196v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
9197 translation code. It expands to the character whose ascii code is NNN
9198 in hexadecimal.
9199
9200w. The prompt string expansion code has a new `\r' escape sequence.
9201
9202x. The shell may now be cross-compiled for the CYGWIN32 environment on
9203 a Unix machine.
9204
92054. New Features in Readline
9206
9207a. There is now an option for `iterative' yank-last-arg handline, so a user
9208 can keep entering `M-.', yanking the last argument of successive history
9209 lines.
9210
9211b. New variable, `print-completions-horizontally', which causes completion
9212 matches to be displayed across the screen (like `ls -x') rather than up
9213 and down the screen (like `ls').
9214
9215c. New variable, `completion-ignore-case', which causes filename completion
9216 and matching to be performed case-insensitively.
9217
9218d. There is a new bindable command, `magic-space', which causes history
9219 expansion to be performed on the current readline buffer and a space to
9220 be inserted into the result.
9221
9222e. There is a new bindable command, `menu-complete', which enables tcsh-like
9223 menu completion (successive executions of menu-complete insert a single
9224 completion match, cycling through the list of possible completions).
9225
9226f. There is a new bindable command, `paste-from-clipboard', for use on Win32
9227 systems, to insert the text from the Win32 clipboard into the editing
9228 buffer.
9229
9230g. The key sequence translation code now understands printf-style backslash
9231 escape sequences, including \NNN octal escapes. These escape sequences
9232 may be used in key sequence definitions or macro values.
9233
9234h. An `$include' inputrc file parser directive has been added.
9235
9236------------------------------------------------------------------------------
e8ce775d
JA
9237This document details the changes between this version, bash-2.01.1-release,
9238and the previous version, bash-2.01-release.
9239
92401. Changes to Bash
9241
9242a. The select command was fixed to check the validity of the user's
9243 input more strenuously.
9244
9245b. A bug was fixed that prevented `time' from timing commands correctly
9246 when supplied as an argument to `bash -c'.
9247
9248c. A fix was made to the mail checking code to keep from adding the same
9249 mail file to the list of files to check multiple times when parsing
9250 $MAILPATH.
9251
9252d. Fixed an off-by-one error in the tilde expansion library.
9253
9254e. When using the compound array assignment syntax, the old value of
9255 the array is cleared before assigning the new value.
9256
9257f. Fixed a bug that could cause a core dump when a trap handler was reset
9258 to the default in the trap command associated with that signal.
9259
9260g. Fixed a bug in the locale code that occurred when assigning a value
9261 to LC_ALL.
9262
9263h. A change was made to the parser so that words of the form xxx=(...)
9264 are not considered compound assignment statements unless there are
9265 characters before the `='.
9266
9267i. A fix was made to the command tracing code to correctly quote each
9268 word of output.
9269
9270j. Some changes were made to the bash-specific autoconf tests to make them
9271 more portable.
9272
9273k. Completion of words with globbing characters now correctly quotes the
9274 result.
9275
9276l. The directory /var/spool/mail is now preferred to /usr/spool/mail when
9277 configure is deciding on the default mail directory.
9278
9279m. The brace completion code was fixed to not quote the `{' and `}'.
9280
9281n. Some fixes were made to make $RANDOM more random in subshells.
9282
9283o. System-specific changes were made to configure for: SVR4.2
9284
9285p. Changes were made so that completion of words containing globbing chars
9286 substitutes the result only if a single filename was matched.
9287
9288q. The window size is now recomputed after a job is stopped with SIGTSTP if
9289 the user has set `checkwinsize' with `shopt'.
9290
9291r. When doing substring expansion, out-of-range substring specifiers now
9292 cause nothing to be substituted rather than an expansion error.
9293
9294s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' --
9295 only `EXIT' and `DEBUG' are accepted.
9296
9297t. The display of trapped signals now uses the signal number if signals
9298 for which bash does not know the name are trapped.
9299
9300u. A fix was made so that `bash -r' does not turn on restricted mode until
9301 after the startup files are executed.
9302
9303v. A bug was fixed that occasionally caused a core dump when a variable
9304 found in the temporary environment of export/declare/readonly had a
9305 null value.
9306
9307w. A bug that occasionally caused unallocated memory to be passed to free()
9308 when doing arithmetic substitution was fixed.
9309
9310x. A bug that caused a buffer overrun when expanding a prompt string
9311 containing `\w' and ${#PWD} exceeded PATH_MAX was fixed.
9312
9313y. A problem with the completion code that occasionally caused it to
9314 refer to a character before the beginning of the readline line buffer
9315 was fixed.
9316
9317z. A bug was fixed so that the `read' builtin restarts reads when
9318 interrupted by signals other than SIGINT.
9319
9320aa. Fixed a bug that caused a command to be freed twice when there was
9321 an evaluation error in the `eval' command.
9322
93232. Changes to Readline
9324
9325a. Added a missing `extern' to a declaration in readline.h that kept
9326 readline from compiling cleanly on some systems.
9327
9328b. The history file is now opened with mode 0600 when it is written for
9329 better security.
9330
9331c. Changes were made to the SIGWINCH handling code so that prompt redisplay
9332 is done better.
9333
9334d. ^G now interrupts incremental searches correctly.
9335
9336e. A bug that caused a core dump when the set of characters to be quoted
9337 when completing words was empty was fixed.
9338
9339------------------------------------------------------------------------------
d166f048
JA
9340This document details the changes between this version, bash-2.01-release,
9341and the previous version, bash-2.01-beta2.
9342
93431. Changes to Bash
9344
9345a. The `distclean' target should remove the `printenv' executable if it
9346 has been created.
9347
9348b. The test suite was changed slightly to ensure that the error messages
9349 are printed in English.
9350
9351c. A bug that caused the shell to dump core when a filename containing a
9352 `/' was passed to `hash' was fixed.
9353
9354d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1
9355 requires.
9356
9357e. A memory leak when completing commands was fixed.
9358
9359f. A memory leak that occurred when checking the hash table for commands
9360 with relative paths was fixed.
9361
9362------------------------------------------------------------------------------
9363This document details the changes between this version, bash-2.01-beta2,
9364and the previous version, bash-2.01-beta1.
9365
93661. Changes to Bash
9367
9368a. The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if
9369 the current (soft) limit is less than or equal to the hard limit.
9370
9371b. Fixed a bug that caused the bash emulation of strcasecmp to produce
9372 incorrect results.
9373
9374c. A bug that caused memory to be freed twice when a trap handler resets
9375 the trap more than once was fixed.
9376
9377d. A bug that caused machines where sizeof (pointer) > sizeof (int) to
9378 fail (and possibly dump core) when trying to unwind-protect a null
9379 pointer was fixed.
9380
9381e. The startup files should not be run with job control enabled. This fix
9382 allows SIGINT to once again interrupt startup file execution.
9383
9384f. Bash should not change the SIGPROF handler if it is set to something
9385 other than SIG_DFL.
9386
9387g. The completion code that provides bash-specific completions for readline
9388 now quotes characters that the readline code would treat as word break
9389 characters if they appear in a file name.
9390
9391h. The completion code now correctly quotes filenames containing a `!',
9392 even if the user attempted to use double quotes when attempting
9393 completion.
9394
9395i. A bug that caused the shell to dump core when `disown' was called without
9396 arguments and there was no current job was fixed.
9397
9398j. A construct like $((foo);bar) is now processed as a command substitution
9399 rather than as a bad arithmetic substitution.
9400
9401k. A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist'
9402 shell options when editing and re-executing a series of commands were
9403 fixed.
9404
9405l. A fix was made to the grammar -- the list of commands between `do' and
9406 `done' in the body of a `for' command should be treated the same as a
9407 while loop.
9408
94092. Changes to Readline
9410
9411a. A couple of bugs that caused the history search functions to attempt to
9412 free a NULL pointer were fixed.
9413
9414b. If the C library provides setlocale(3), readline does not need to look
9415 at various environment variables to decide whether or not to go into
9416 eight-bit mode automatically -- just check whether the current locale
9417 is not `C' or `POSIX'.
9418
9419c. If the filename completion function finds that a directory was not closed
9420 by a previous (interrupted) completion, it closes the directory with
9421 closedir().
9422
94233. New Features in Bash
9424
9425a. New bindable readline commands: history-and-alias-expand-line and
9426 alias-expand-line. The code was always in there, there was just no
9427 way to execute it.
9428
9429------------------------------------------------------------------------------
9430This document details the changes between this version, bash-2.01-beta1,
9431and the previous version, bash-2.01-alpha1.
9432
94331. Changes to Bash
9434
9435a. Fixed a problem that could cause file descriptors used for process
9436 substitution to conflict with those used explicitly in redirections.
9437
9438b. Made it easier to regenerate configure if the user changes configure.in.
9439
9440c. ${GROUPS[0]} should always be the primary group, even on systems without
9441 multiple groups.
9442
9443d. Spelling correction is no longer enabled by default.
9444
9445e. Fixes to quoting problems in `bashbug'.
9446
9447f. OS-specific configuration changes were made for: Irix 6.
9448
9449g. OS-specific code changes were made for: QNX.
9450
9451h. A more meaningful message is now printed when the file in /tmp for a
9452 here document cannot be created.
9453
9454i. Many changes to the shell's variable initialization code to speed
9455 non-interactive startup.
9456
9457j. Changes to the non-job-control code so that it does not try to open
9458 /dev/tty.
9459
9460k. The output of `set' and `export' is once again sorted, as POSIX wants.
9461
9462l. Fixed a problem caused by a recursive call reparsing the value of
9463 $SHELLOPTS.
9464
9465m. The tilde code no longer calls getenv() when it's compiled as part of
9466 the shell, which should eliminate problems on systems that cannot
9467 redefine getenv(), like the NeXT OS.
9468
9469n. Fixed a problem that caused `bash -o' or `bash +o' to not list all
9470 the shell options.
9471
9472o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit
9473 only if the hard limit is greater than the current (soft) limit.
9474
9475p. Fixed a problem that arose when building bash in a different directory
9476 than the source and y.tab.[ch] were remade with something other than
9477 bison. This came up most often on NetBSD.
9478
9479q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated
9480 an unfinished command completion (`/), which generated errors.
9481
9482r. The bash special tilde expansions (~-, ~+) are now attempted before
9483 calling the standard tilde expansion code, which should eliminate the
9484 problems people have been seeing with this on Solaris 2.5.1.
9485
9486s. Added support for <stdarg.h> to places where it was missing.
9487
9488t. Changed the code that reads the output of a command substitution to not
9489 go through stdio. This reduces the memory requirements and is faster.
9490
9491u. A number of changes to speed up export environment creation were made.
9492
9493v. A number of memory leaks were fixed as the result of running the test
9494 scripts through Purify.
9495
9496w. Fixed a bug that caused subshells forked to interpret executable
9497 scripts without a leading `#!' to not reinitialize the values of
9498 the shell options.
9499
95002. Changes to Readline
9501
9502a. History library has less `#ifdef SHELL' code -- abstracted stuff out
9503 into application-specific function hooks.
9504
9505b. Readline no longer calls getenv() if it's compiled as part of the shell,
9506 which should eliminate problems on systems that cannot redefine getenv(),
9507 like the NeXT OS.
9508
9509c. Fixed translation of ESC when `untranslating' macro values.
9510
9511d. The region kill operation now fixes the mark if it ends up beyond the
9512 boundaries of the line after the region is deleted.
9513
95143. New Features in Bash
9515
9516a. New argument for `configure': `--with-curses'. This can be used to
9517 override the selection of the termcap library on systems where it is
9518 deficient.
9519
9520------------------------------------------------------------------------------
9521This document details the changes between this version, bash-2.01-alpha1,
9522and the previous version, bash-2.0-release.
9523
95241. Changes to Bash
9525
9526a. System-specific configuration changes for: FreeBSD, SunOS4, Irix,
9527 MachTen, QNX 4.2, Harris Night Hawk, SunOS5.
9528
9529b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2,
9530 HP-UX, AIX 4.2.
9531
9532c. A bug that caused the exec builtin to fail because the full pathname of
9533 the command could not be found was fixed.
9534
9535d. The code that performs output redirections is now more resistant to
9536 race conditions and possible security exploits.
9537
9538e. A bug that caused the shell to dump core when performing pattern
9539 substitutions on variable values was fixed.
9540
9541f. More hosts are now recognized by the auto-configuration mechanism
9542 (OpenBSD, QNX, others).
9543
9544g. Assignments to read-only variables that attempt to convert them to
9545 arrays are now errors.
9546
9547h. A bug that caused shell scripts using array assignments in POSIX mode
9548 to exit after the assignment was performed was fixed.
9549
9550i. The substring expansion code is now more careful about running off the
9551 ends of the expanded variable value.
9552
9553j. A bug that caused completion to fail if a backquoted command substitution
9554 appeared anywhere on the line was fixed.
9555
9556k. The `source' builtin no longer turns off history if it has been enabled
9557 in a non-interactive shell.
9558
9559l. A bug that caused the shell to crash when `disown' was given a pid
9560 instead of a job number was fixed.
9561
9562m. The `cd' spelling correction code will not try to change to `.' if no
9563 directory entries match a single-character argument.
9564
9565n. A bad variable name supplied to `declare', `export', or `readonly' no
9566 longer causes a non-interactive shell in POSIX mode to exit.
9567
9568o. Some fixes were made to the test suite to handle peculiarities of
9569 various Unix versions.
9570
9571p. The bash completion code now quotes characters that readline would
9572 treat as word breaks for completion but are not shell metacharacters.
9573
9574q. Bad options supplied at invocation now cause a usage message to be
9575 displayed.
9576
9577r. Fixes were made to the code that handles DEBUG traps so that the trap
9578 string is not freed inappropriately.
9579
9580s. Some changes were made to the bash debugger in examples/bashdb -- it
9581 should be closer to working now.
9582
9583t. A problem that caused the default filename used for mail checking to be
9584 wrong was fixed.
9585
9586u. A fix was made to the `echo' builtin so that NUL characters printed with
9587 `echo -e' do not cause the output to be truncated.
9588
9589v. A fix was made to the job control code so that the shell behaves better
9590 when monitor mode is enabled in a non-interactive shell.
9591
9592w. Bash no longer catches all of the terminating signals in a non-
9593 interactive shell until a trap is set on EXIT, which should result in
9594 quicker startup.
9595
9596x. A fix was made to the command timing code so that `time' can be used in
9597 a loop.
9598
9599y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as
b72432fd 9600 a nested subshell rather than strictly as an (erroneous) arithmetic
d166f048
JA
9601 command.
9602
9603z. A fix was made to the globbing code so that it correctly matches quoted
9604 filenames beginning with a `.'.
9605
9606aa. A bug in `fc' that caused some multi-line commands to not be stored as
9607 one command in the history when they were re-executed after editing
9608 (with `fc -e') was fixed.
9609
9610bb. The `ulimit' builtin now attempts to catch some classes of integer
9611 overflows.
9612
9613cc. The command-oriented-history code no longer attempts to add `;'
9614 inappropriately when a newline appears while reading a $(...) command
9615 substitution.
9616
9617dd. A bug that caused the shell to dump core when `help --' was executed
9618 was fixed.
9619
9620ee. A bug that caused the shell to crash when an unset variable appeared
9621 in the body of a here document after `set -u' had been executed was
9622 fixed.
9623
9624ff. Implicit input redirections from /dev/null for asynchronous commands
9625 are now handled better.
9626
9627gg. A bug that caused the shell to fail to compile when configured with
9628 `--disable-readline' was fixed.
9629
9630hh. The globbing code should now be interruptible.
9631
9632ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a
9633 stopped job and adjusts the data structures accordingly, as if `bg' had
9634 been executed instead.
9635
9636jj. A bug that caused the shell to crash when mixing calls to `getopts'
9637 and `shift' on the same set of positional parameters was fixed.
9638
9639kk. The command printing code now preserves the `-p' flag to `time'.
9640
9641ll. The command printing code now handles here documents better when there
9642 are other redirections associated with the command.
9643
9644mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_)
9645 is no longer placed into the environment of executed commands -- users
9646 of glibc had too many problems with it.
9647
9648nn. Reorganized the code that generates signames.h. The signal_names list
9649 is now more complete but may be slightly different (SIGABRT is favored
9650 over SIGIOT, for example). The preferred signal names are those
9651 listed in the POSIX.2 standard.
9652
9653oo. `bashbug' now uses a filename shorter than 14 characters for its
9654 temporary file, and asks for confirmation before sending the bug
9655 report.
9656
9657pp. A bug that caused TAB completion in vi editing mode to not be turned
9658 off when `set -o posix' was executed or back on when `set +o posix'
9659 was executed was fixed.
9660
9661qq. A bug in the brace expansion code that caused brace expansions appearing
9662 in new-style $(...) command substitutions to be inappropriately expanded
9663 was fixed.
9664
9665rr. A bug in the readline hook shell-expand-line that could cause memory to
9666 be inappropriately freed was fixed.
9667
9668ss. A bug that caused some arithmetic expressions containing `&&' and `||'
9669 to be parsed with the wrong precedence has been fixed.
9670
9671tt. References to unbound variables after `set -u' has been executed now
9672 cause the shell to exit immediately, as they should.
9673
9674uu. A bug that caused the shell to exit inappropriately when `set -e' had
9675 been executed and a command's return status was being inverted with the
9676 `!' reserved word was fixed.
9677
9678vv. A bug that could occasionally cause the shell to crash with a
9679 divide-by-zero error when timing a command was fixed.
9680
9681ww. A bug that caused parameter pattern substitution to leave stray
9682 backslashes in the replacement string when the expression is in
9683 double quotes was fixed.
9684
9685xx. The `break' and `continue' builtins now break out of all loops when an
9686 invalid count argument is supplied.
9687
9688yy. Fixed a bug that caused PATH to be set to the empty string if
9689 `command -p' is executed with PATH unset.
9690
9691zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix,
9692 as POSIX specifies.
9693
9694aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS
9695 if there were no shell options set.
9696
9697bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX
9698 mode, their output is as POSIX.2 specifies.
9699
9700ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually
9701 creates an array variable.
9702
9703ddd. Fixed a bug that prevented `time' from correctly timing background
9704 pipelines.
9705
97062. Changes to Readline
9707
9708a. A bug that caused an extra newline to be printed when the cursor was on
9709 an otherwise empty line was fixed.
9710
9711b. An instance of memory being used after it was freed was corrected.
9712
9713c. The redisplay code now works when the prompt is longer than the screen
9714 width.
9715
9716d. `dump-macros' is now a bindable name, as it should have been all along.
9717
9718e. Non-printable characters are now expanded when displaying macros and
9719 their values.
9720
9721f. The `dump-variables' and `dump-macros' commands now output a leading
9722 newline if they're called as the result of a key sequence, rather
9723 than directly by an application.
9724
97253. New Features in Bash
9726
9727a. There is a new builtin array variable: GROUPS, the set of groups to which
9728 the user belongs. This is used by the test suite.
9729
97304. New Features in Readline
9731
9732a. If a key sequence bound to `universal-argument' is read while reading a
9733 numeric argument started with `universal-argument', it terminates the
9734 argument but is otherwise ignored. This provides a way to insert multiple
9735 instances of a digit string, and is how GNU emacs does it.
9736
9737------------------------------------------------------------------------------
ccc6cda3
JA
9738This document details the changes between this version, bash-2.0-release,
9739and the previous version, bash-2.0-beta3.
9740
97411. Changes to Bash
9742
9743a. Fix to the `getopts' builtin so that it does the right thing when a
9744 required option argument is not present.
9745
9746b. The completion code now updates the common prefix of matched names
9747 after FIGNORE processing is done, since any names that were removed
9748 may have changed the common prefix.
9749
9750c. Fixed a bug that made messages in MAILPATH entries not work correctly.
9751
9752d. Fixed a serious documentation error in the description of the new
9753 ${parameter:offset[:length]} expansion.
9754
9755e. Fixes to make parameter substring expansion ({$param:offset[:length]})
9756 work when within double quotes.
9757
9758f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional
9759 parameters.
9760
9761g. Corrected a misspelling of `unlimited' in the output of `ulimit'.
9762
9763h. Fixed a bug that caused executable scripts without a leading `#!' to
9764 occasionally pick up the wrong set of positional parameters.
9765
9766i. Linux systems now have a working `ulimit -v', using RLIMIT_AS.
9767
9768j. Updated config.guess so that many more machine types are recognized.
9769
9770k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]}
9771 expansion.
9772
9773l. If the shell is named `-su', and `-c command' is supplied, read and
9774 execute the login shell startup files even though the shell is not
9775 interactive. This is to support the `-' option to `su'.
9776
9777m. Fixed a bug that caused core dumps when the DEBUG trap was ignored
9778 with `trap "" DEBUG' and a shell function was subsequently executed.
9779
9780n. Fixed a bug that caused core dumps in the read builtin when IFS was
9781 set to the null string and the input had leading whitespace.
9782
97832. Changes to Readline
9784
9785a. Fixed a bug that caused a numeric argument of 1024 to be ignored when
9786 inserting text.
9787
9788b. Fixed the display code so that the numeric argument is displayed as it's
9789 being entered.
9790
9791c. Fixed the numeric argument reading code so that `M-- command' is
9792 equivalent to `M--1 command', as the prompt implies.
9793
97943. New Features in Bash
9795
9796a. `ulimit' now sets both hard and soft limits and reports the soft limit
9797 by default (when neither -H nor -S is specified). This is compatible
9798 with versions of sh and ksh that implement `ulimit'.
9799
9800b. Integer constants have been extended to base 64.
9801
98024. New Features in Readline
9803
9804a. The `home' and `end' keys are now bound to beginning-of-line and
9805 end-of-line, respectively, if the corresponding termcap capabilities
9806 are present.
9807
9808------------------------------------------------------------------------------
9809This document details the changes between this version, bash-2.0-beta3,
9810and the previous version, bash-2.0-beta2.
9811
98121. Changes to Bash
9813
9814a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX.
9815
9816b. When in POSIX mode, variable assignments preceding a special builtin
9817 persist in the shell environment after the builtin completes.
9818
9819c. Changed all calls to getwd() to getcwd(). Improved check for systems
9820 where the libc getcwd() calls popen(), since that breaks on some
9821 systems when job control is being used.
9822
9823d. Fixed a bug that caused seg faults when executing scripts with the
9824 execute bit set but without a leading `#!'.
9825
9826e. The environment passed to executed commands is never sorted.
9827
9828f. A bug was fixed in the code that expands ${name[@]} to the number of
9829 elements in an array variable.
9830
9831g. A bug was fixed in the array compound assignment code ( A=( ... ) ).
9832
9833h. Window size changes now correctly propagate down to readline if
9834 the shopt `checkwinsize' option is enabled.
9835
9836i. A fix was made in the code that expands to the length of a variable
9837 value (${#var}).
9838
9839j. A fix was made to the command builtin so that it did not turn on the
9840 `no fork' flag inappropriately.
9841
9842k. A fix was made to make `set -n' work more reliably.
9843
9844l. A fix was made to the job control initialization code so that the
9845 terminal process group is set to the shell's process group if the
9846 shell changes its own process group.
9847
98482. Changes to Readline
9849
9850a. System-specific changes for: SCO 3.2v[45].
9851
9852b. The behavior of the vi-mode `.' when redoing an `i' command was changed
9853 to insert the text previously inserted by the `i' command rather than
9854 simply entering insert mode.
9855
98563. New features in Bash
9857
9858a. There is a new version of the autoload function package, in
9859 examples/functions/autoload.v2, that uses arrays and provides more
9860 functionality.
9861
9862b. Support for LC_COLLATE and locale-specific sorting of the results of
9863 pathname expansion if strcoll() is available.
9864
98654. New Features in Readline
9866
9867a. Support for locale-specific sorting of completion possibilities if
9868 strcoll() is available.
9869
9870------------------------------------------------------------------------------
9871This document details the changes between this version, bash-2.0-beta2,
9872and the previous version, bash-2.0-beta1.
9873
98741. Changes to Bash
9875
9876a. `pushd -' is once again equivalent to `pushd $OLDPWD'.
9877
9878b. OS-specific changes for: SCO 3.2v[45].
9879
9880c. A change was made to the fix for the recently-reported security hole
9881 when reading characters with octal value 255 to make it work better on
9882 systems with restartable system calls when not using readline.
9883
9884d. Some changes were made to the test suite so that it works if you
9885 configure bash with --enable-usg-echo-default.
9886
9887e. A fix was made to the parsing of conditional arithmetic expressions.
9888
9889f. Illegal arithmetic bases now cause an arithmetic evaluation error rather
9890 than being silently reset.
9891
9892g. Multiple arithmetic bases now cause an arithmetic evaluation error
9893 instead of being ignored.
9894
9895h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2.
9896
9897i. A bug that sometimes caused array indices to be evaluated twice (which
9898 would cause errors when they contained assignment statements) was fixed.
9899
9900j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning
9901 unsigned values and to simplify the code.
9902
9903k. A bug in the command-oriented-history code that caused it to sometimes
9904 put semicolons after right parens inappropriately was fixed.
9905
9906l. The values inserted into the prompt by the \w and \W escape sequences
9907 are now quoted to prevent further expansion.
9908
9909m. An interactive shell invoked as `sh' now reads and executes commands
9910 from the file named by $ENV when it starts up. If it's a login shell,
9911 it does this after reading /etc/profile and ~/.profile.
9912
9913n. The file named by $ENV is never read by non-interactive shells.
9914
99152. Changes to Readline
9916
9917a. A few changes were made to hide some macros and functions that should not
9918 be public.
9919
9920b. An off-by-one error that caused seg faults in the history expansion code
9921 was fixed.
9922
99233. New Features in Bash
9924
9925a. The ksh-style ((...)) arithmetic command was implemented. It is exactly
9926 identical to let "...". This is controlled by a new option to configure,
9927 `--enable-dparen-arithmetic', which is on by default.
9928
9929b. There is a new #define available in config.h.top: SYS_BASH_LOGOUT. If
9930 defined to a filename, bash reads and executes commands from that file
9931 when a login shell exits. It's commented out by default.
9932
9933c. `ulimit' has a `-l' option that reports the maximum amount of data that
9934 may be locked into memory on 4.4BSD-based systems.
9935
9936------------------------------------------------------------------------------
9937This document details the changes between this version, bash-2.0-beta1,
9938and the previous version, bash-2.0-alpha4.
9939
99401. Changes to Bash
9941
9942a. A bug that sometimes caused traps to be ignored on signals the
9943 shell treats specially was fixed.
9944
9945b. The internationalization code was changed to track the values of
9946 LC_* variables and call setlocale() as appropriate. The TEXTDOMAIN
9947 and TEXTDOMAINDIR variables are also tracked; changes cause calls
9948 to textdomain() and bindtextdomain(), if available.
9949
9950c. A bug was fixed that sometimes caused double-quoted strings to be
9951 parsed incorrectly.
9952
9953d. Changes were made so that the siglist code compiles correctly on
9954 Solaris 2.5.
9955
9956e. Added `:' to the set of characters that cause word breaks for the
9957 completion code so that pathnames in assignments to $PATH can be
9958 completed.
9959
9960f. The `select' command was fixed to print $PS3 to stderr.
9961
9962g. Fixed an error in the manual page section describing the effect that
9963 setting and unsetting GLOBIGNORE has on the setting of the `dotglob'
9964 option.
9965
9966h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC
9967 on systems without gettimeofday() and resources.
9968
9969i. The getopt static variables are now initialized each time a subshell
9970 is started, so subshells using `getopts' work right.
9971
9972j. A sign-extension bug that caused a possible security hole was fixed.
9973
9974k. The parser now reads characters between backquotes within a double-
9975 quoted string as a single word, so double quotes in the backquoted
9976 string don't terminate the enclosing double-quoted string.
9977
9978l. A bug that caused `^O' to work incorrectly when typed as the first
9979 thing to an interactive shell was fixed.
9980
9981m. A rarely-exercised off-by-one error in the code that quotes variable
9982 values was fixed.
9983
9984n. Some memory and file descriptor leaks encountered when running a
9985 shell script that is executable but does not have a leading `#!'
9986 were plugged.
9987
99882. Changes to Readline
9989
9990a. A bug that sometimes caused incorrect results when trying to read
9991 typeahead on systems without FIONREAD was fixed.
9992
99933. New Features in Bash
9994
9995a. The command timing code now uses the value of the TIMEFORMAT variable
9996 to format and display timing statistics.
9997
9998b. The `time' reserved word now accepts a `-p' option to force the
9999 POSIX.2 output format.
10000
10001c. There are a couple of new and updated scripts to convert csh startup
10002 files to bash format.
10003
10004d. There is a new builtin array variable: BASH_VERSINFO. The various
10005 members hold the parts of the version information in BASH_VERSION,
10006 plus the value of MACHTYPE.
10007
100084. New Features in Readline
10009
10010a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter
10011 eight-bit mode.
10012
10013------------------------------------------------------------------------------
10014This document details the changes between this version, bash-2.0-alpha4,
10015and the previous version, bash-2.0-alpha3.
10016
100171. Changes to Bash
10018
10019a. There is better detection of rsh connections on Solaris 2.
10020
10021b. Assignments to read-only variables preceding a command name are now
10022 variable assignment errors. Variable assignment errors cause
10023 non-interactive shells running in posix mode to exit.
10024
10025c. The word tokenizer was rewritten to handle nested quotes and pairs
10026 ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...))
10027 correctly. Some of the parameter expansion code was updated as a
10028 consequence.
10029
10030d. A fix was made to `test' when given three arguments so that a binary
10031 operator is checked for first, before checking that the first argument
10032 is `!'.
10033
10034e. 2''>/dev/null is no longer equivalent to 2>/dev/null.
10035
10036f. Parser error messages were regularized, and in most cases the name of
10037 the shell script being read by a non-interactive shell is not printed
10038 twice.
10039
10040g. A fix was made to the completion code so that it no longer removes the
10041 text the user typed in some cases.
10042
10043h. The special glibc `getopt' environment variable is no longer put into
10044 the environment on machines with small values of ARG_MAX.
10045
10046i. The expansion of ${...} now follows the POSIX.2 rules for finding the
10047 closing `}'.
10048
10049j. The shell no longer displays spurious status messages for background
10050 jobs in shell scripts that complete successfully when the script is
10051 run from a terminal.
10052
10053k. `shopt -o' now correctly updates $SHELLOPTS.
10054
10055l. A bug that caused the $PATH searching code to return a non-executable
10056 file even when an executable file with the same name appeared later in
10057 $PATH was fixed.
10058
10059m. The shell now does tilde expansions on unquoted `:~' in assignment
10060 statements when not in posix mode.
10061
10062n. Variable assignment errors when a command consists only of assignments
10063 now cause non-interactive shells to exit when in posix mode.
10064
10065o. If the variable in a `for' or `select' command is read-only, or not a
10066 legal shell identifier, a variable assignment error occurs.
10067
10068p. `test' now handles `-a' and `-o' as binary operators when three arguments
10069 are supplied, and correctly parses `( word )' as equivalent to `word'.
10070
10071q. `test' was fixed so that file names of the form /dev/fd/NN mean the same
10072 thing on all systems, even Linux.
10073
10074r. Fixed a bug in the globbing code that caused patterns with multiple
10075 consecutive `*'s to not be matched correctly.
10076
10077s. Fixed a bug that caused $PS2 to not be printed when an interactive shell
10078 not using readline is reading a here document.
10079
10080t. Fixed a bug that caused history expansion to be performed inappropriately
10081 when a single-quoted string spanned more than one line.
10082
10083u. `getopts' now checks that the variable name passed by the user as the
10084 second argument is a legal shell identifier and that the variable is
10085 not read-only.
10086
10087v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it
10088 encounters an error.
10089
10090w. Fixed `set' to display variable values in a form that can be re-read.
10091
10092x. Fixed a bug in the code that keeps track of whether or not local variables
10093 have been declared at the current level of function nesting.
10094
10095y. Non-interactive shells in posix mode now exit if the name in a function
10096 declaration is not a legal identifier.
10097
10098z. The job control code now ignores stopped children when the shell is not
10099 interactive.
10100
10101aa. The `cd' builtin no longer attempts spelling correction on the directory
10102 name if the shell is not interactive, regardless of the setting of the
10103 `cdspell' option.
10104
10105bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2.
10106
10107cc. `time' now prints its output to stderr, as POSIX.2 specifies.
10108
101092. Fixes to Readline
10110
10111a. After printing possible completions, all lines of a multi-line prompt
10112 are redisplayed.
10113
10114b. Some changes were made to the terminal handling code in rltty.c to
10115 work around AIX 4.2 bugs.
10116
101173. New Features in Bash
10118
10119a. There is a new loadable builtin: sprintf, with calling syntax
10120 sprintf var format [args]
10121 This provides an easy way to simulate ksh left- and right-justified
10122 variable values.
10123
10124b. The expansions of \h and \H in prompt strings were swapped. \h now
10125 expands to the hostname up to the first `.', as in bash-1.14.
10126
101274. New Features in Readline
10128
10129a. The bash-1.14 behavior when ^M is typed while doing an incremental
10130 search was restored. ^J may now be used to terminate the search without
10131 accepting the line.
10132
10133b. There is a new bindable variable: disable-completion. This inhibits
10134 word completion and causes the completion character to be inserted as
10135 if it had been bound to self-insert.
10136
10137------------------------------------------------------------------------------
10138This document details the changes between this version, bash-2.0-alpha3,
10139and the previous version, bash-2.0-alpha2.
10140
10141There is now a file `COMPAT' included in the distribution that lists the
10142user-visible incompatibilities between 1.14 and 2.0.
10143
101441. Changes to Bash
10145
10146a. Some work was done so that word splitting of the rhs of assignment
10147 statements conforms more closely to historical practice.
10148
10149b. A couple of errant memory frees were fixed.
10150
10151c. A fix was made to the test builtin so it recognizes `<' and `>' as
10152 binary operators.
10153
10154d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's
10155 allocated and freed. This is to catch callers that refer to freed
10156 memory or assume something about newly-allocated memory.
10157
10158e. Fixed a problem with conversion to 12-hour time in the prompt
10159 expansion code.
10160
10161f. Fixed a problem with configure's argument parsing order. Now you can
10162 correctly turn on specific options after using --enable-minimal-config.
10163
10164g. The configure script now automatically disables the use of GNU malloc
10165 on systems where it's appropriate (better than having people read the
10166 NOTES file and do it manually).
10167
10168h. There are new prompt expansions (\v and \V) to insert version information
10169 into the prompt strings.
10170
10171i. The default prompt string now includes the version number.
10172
10173j. Most of the builtins that take no options were changed to use the
10174 internal getopt so they can produce proper error messages for -?
10175 and incorrect options.
10176
10177k. Some system-specific changes were made for SVR4.2 and Solaris 2.5.
10178
10179l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of
10180 MAXNAMLEN.
10181
10182m. A couple of problems caused by uninitialized variables were fixed.
10183
10184n. There are a number of new loadable builtin examples: logname, basename,
10185 dirname, tty, pathchk, tee, head, and rmdir. All of these conform to
10186 POSIX.2.
10187
10188o. Bash now notices changes in TZ and calls tzset() if present, so
10189 changing TZ will alter the time printed by prompt expansions.
10190
10191p. The source was reorganized a bit so I don't have to wait so long for
10192 some files to compile, and to facilitate the creation of a `shell
10193 library' at some future point.
10194
10195q. Bash no longer turns off job control if called as `sh', since the
10196 POSIX.2 spec includes job control as a standard feature.
10197
10198r. `bash -o posix' now works as intended.
10199
10200s. Fixed a problem with the completion code: when completing a filename
10201 that contained globbing characters, if show-all-if-ambiguous was set,
10202 the completion code would remove the user's text.
10203
10204t. Fixed ulimit so that (hopefully) the full range of limits is available
10205 on HPUX systems.
10206
10207u. A new `shopt' option (`hostcomplete') enables and disables hostname
10208 completion.
10209
10210v. The shell no longer attempts to save the history on an abort(),
10211 which is usually called by programming_error().
10212
10213w. The `-s' option to `fc' was changed to echo the command to be executed
10214 to stderr instead of stdout.
10215
10216x. If the editor invoked by `fc -e' exits with a non-zero status, no
10217 commands are executed.
10218
10219y. Fixed a bug that made the shopt `histverify' option work incorrectly.
10220
10221z. There is a new variable `MACHTYPE' whose value is the GNU-style
10222 `cpu-company-system' system description as set by configure. (The
10223 values of MACHTYPE and HOSTTYPE should really be swapped.)
10224
10225aa. The `ulimit' builtin now allows the maximum virtual memory size to be
10226 set via setrlimit(2) if RLIMIT_VMEM is defined.
10227
10228bb. `bash -nc 'command'' no longer runs `command'.
10229
102302. Changes to Readline
10231
10232a. Fixed a typo in the code that checked for FIONREAD in input.c.
10233
10234b. Fixed a bug in the code that outputs keybindings, so things like C-\
10235 are quoted properly.
10236
10237c. Fixed a bug in the inputrc file parsing code to handle the problems
10238 caused by inputrc files created from the output of `bind -p' in
10239 previous versions of bash. The problem was due to the bug fixed
10240 in item b above.
10241
10242d. Readline no longer turns off the terminal's meta key, and turns it on
10243 once the first time it's called.
10244
10245------------------------------------------------------------------------------
10246This file documents the changes between this version, bash-2.0-alpha2,
10247and the previous version, bash-2.0-alpha.
10248
102491. Changes to Bash
10250
10251a. The shell no longer thinks directories are executable.
10252
10253b. `disown' has a new option, `h', which inhibits the resending of SIGHUP
10254 but does not remove the job from the jobs table.
10255
10256c. The varargs functions in error.c now use ANSI-C `stdarg' if available.
10257
10258d. The build process now treats the `build version' in .build as local to
10259 the build directory, so different versions built from the same source
10260 tree have different `build versions'.
10261
10262e. Some problems with the grammar have been fixed. (It used `list' in a few
10263 productions where `compound_list' was needed. A `list' must be terminated
10264 with a newline or semicolon; a `compound_list' need not be.)
10265
10266f. A fix was made to keep `wait' from hanging when waiting for all background
10267 jobs.
10268
10269g. `bash --help' now writes its output to stdout, like the GNU Coding Standards
10270 specify, and includes the machine type (the value of MACHTYPE).
10271
10272h. `bash --version' now prints more information and exits successfully, like
10273 the GNU Coding Standards specify.
10274
10275i. The output of `time' and `times' now prints fractional seconds with three
10276 places after the decimal point.
10277
10278j. A bug that caused process substitutions to screw up the pipeline printed
10279 by `jobs' was fixed.
10280
10281k. Fixes were made to the code that implements $'...' and $"..." so they
10282 work as documented.
10283
10284l. The process substitution code now opens named pipes for reading with
10285 O_NONBLOCK to avoid hanging.
10286
10287m. Fixes were made to the trap code so the shell cleans up correctly if the
10288 trap command contains a `return' and we're executing a function or
10289 sourcing a script with `.'.
10290
10291n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the
10292 documentation (ps, dvi, etc.) on a `make install'.
10293
10294o. Fixed an auto-increment error that caused bash -c args to sometimes dump
10295 core.
10296
10297p. Fixed a bug that caused $HISTIGNORE to fail when the history line
10298 contained globbing characters.
10299
103002. Changes to Readline
10301
10302a. There is a new string variable, rl_library_version, available for use by
10303 applications. The current value is "2.1".
10304
10305b. A bug encountered when expand-tilde was enabled and file completion was
10306 attempted on a word beginning with `~/' was fixed.
10307
10308c. A slight change was made to the incremental search termination behavior.
10309 ESC still terminates the search, but if input is pending or arrives
10310 within 0.1 seconds (on systems with select(2)), it is used as a prefix
8868edaf 10311 character. This is intended to allow users to terminate searches with
ccc6cda3 10312 the arrow keys and get the behavior they expect.