1 This document details the changes between this version, bash-5.0-release, and
2 the previous version, bash-5.0-rc1.
6 a. Tilde expansion isn't performed on indexed array subscripts, even for
7 backwards compatibility.
9 b. The shell doesn't exit in posix mode if the eval builtin gets a parse
10 error when run by the command builtin.
12 c. Fixed a bug that caused a shell comment in an alias to not find the end
13 of the alias properly.
15 d. Reverted a change from April, 2018 that caused strings containing
16 backslashes to be flagged as glob patterns.
18 2. Changes to Readline
20 3. New Features in Bash
22 4. New Features in Readline
24 ------------------------------------------------------------------------------
25 This document details the changes between this version, bash-5.0-rc1, and
26 the previous version, bash-5.0-beta2.
30 a. Fix to initial word completion detection code.
32 b. Fixed a bug that caused issues with assignment statements containing ^A in
33 the value assigned when IFS contains ^A.
35 c. Added a fallback to fnmatch() when strcoll can't correctly deal with
36 bracket expression character equivalence classes.
38 d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command
39 when running a trap handler containing [[ or (( commands.
41 e. Fixed a bug that caused nameref assignments in the temporary environment
42 to potentially create variables with invalid names.
44 f. Fixed a bug that caused `local -' to turn off alias expansion in scripts.
46 g. Fixed a parser issue with a command string containing EOF after an invalid
47 command as an argument to a special builtin not causing a posix-mode shell
50 h. Made a slight change to the FNV-1 string hash algorithm used for associative
51 arrays (corrected the initial seed).
53 2. Changes to Readline
55 3. New Features in Bash
57 a. The `select' command now supports command forms without a word list
60 4. New Features in Readline
62 ------------------------------------------------------------------------------
63 This document details the changes between this version, bash-5.0-beta2, and
64 the previous version, bash-5.0-beta.
68 a. Fixed a bug that could cause a seg fault while parsing a subshell command
69 inside a command substitution.
71 b. Fixed several small memory leaks uncovered by coverity.
73 c. Fixed a problem with command substitution inside an interactive shell that
74 could cause the parent to receive a SIGHUP.
76 d. Fixed a problem with using `*' and `@' as subscripts when assigning values
77 to an associative array with assoc_expand_once enabled.
79 e. Fixed a bug that could cause a huge memory allocation when completing a
80 word beginning with an invalid tilde expansion.
82 f. Cleaned up some incompatiblities with bash-4.4 when expanding indexed array
83 subscripts used in arithmetic expansions when assoc_expand_once is enabled.
85 g. The ${parameter@a} expansion will display attributes even if `parameter' is
88 h. Fixed a bug that caused the output of `set' to cut off some variables before
91 i. Treat a failure to assign a variable when using the ${x:=value} expansion
92 as an expansion error, so non-interactive posix-mode shells exit
94 j. Fixed a problem when expanding $* in a context where word splitting is not
95 performed when IFS is NULL.
97 k. Temp files used to store here documents are forced readable, no matter what
98 the user's umask says.
100 l. Fixed a problem where an interrupted brace expansion could cause the shell
101 to attempt to free an invalid memory location.
103 m. Make sure to check for any terminating signals after running a trap
104 handler; don't wait until the next time we process traps.
106 n. Fixed a bug that caused "return" to act like a special builtin with respect
107 to variable assignments even when preceded by "command".
109 o. POSIX-mode shells now return failure if the cd builtin fails due to the
110 absolute directory name being longer than PATH_MAX, instead of trying
111 again with a relative pathname.
113 p. Fixed a problem with FUNCNAME occasionally being visible when not executing
116 q. Fixed a problem with the expansions performed on the WORD in the case
119 r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during
120 word splitting and the read builtin.
122 s. Fixed a problem with expanding an array with subscript `*' when all the
123 elements expand to the empty string, and making sure the expansion honors
126 2. Changes to Readline
128 a. Fixed a bug with adding multibyte characters to an incremental search string.
130 b. Fixed a bug with redoing text insertions in vi mode.
132 c. Fixed a bug with pasting text into an incremental search string if bracketed
133 paste mode is enabled. ESC cannot be one of the incremental search
134 terminator characters for this to work.
136 d. Fixed a bug with anchored search patterns when performing searches in vi
139 3. New Features in Bash
141 a. Associative and indexed arrays now allow subscripts consisting solely of
144 b. `checkwinsize' is now enabled by default.
146 c. The `localvar_unset' shopt option is now visible and documented.
148 d. The `progcomp_alias' shopt option is now visible and documented.
150 e. The signal name processing code now understands `SIGRTMIN+n' all the way
153 f. There is a new `seq' loadable builtin.
155 g. Trap execution now honors the (internal) max invocations of `eval', since
156 traps are supposed to be executed as if using `eval'.
158 h. The $_ variable doesn't change when the shell executes a command that forks.
160 i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though
161 conforming applications aren't supposed to use them.
163 j. POSIX mode now enables the `shift_verbose' option.
165 4. New Features in Readline
167 a. Readline now allows application-defined keymap names; there is a new public
168 function, rl_set_keymap_name(), to do that.
170 b. The "Insert" keypad key, if available, now puts readline into overwrite
173 ------------------------------------------------------------------------------
174 This document details the changes between this version, bash-5.0-beta, and
175 the previous version, bash-5.0-alpha.
179 a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this
180 is where POSIX says the subshell is not "enclosed" by the loop.
182 b. Added more UTF-8-specific versions of multibyte functions, and optimized
183 existing functions if the current locale uses UTF-8 encoding.
185 c. In POSIX mode, assignments preceding regular builtins should not persist
186 when the builtin completes.
188 d. Added additional checks to special array assignment (e.g., BASH_ALIASES)
189 so it can't be used to bypass validity checks performed in other places.
191 e. The `!!' history expansion now refers to the previous history entry as
192 expected, even if used on the second or subsequent line of a multi-line
195 f. Fixed a bug that could cause the shell to dereference a NULL pointer if
196 the environment (`environ') is set to NULL.
198 g. Bash uses slightly better integer overflow handling for brace sequence
199 expansion on systems where ints are 32 bits and intmax_t is 64 bits.
201 h. Fixed a bug setting attributes for a variable named as an argument to
202 `declare' that also appears as a nameref in the temporary environment.
204 i. Fixed several bugs that could cause assignments to namerefs to create
205 variables with invalid names.
207 j. Fixed a bug that could result in the SIGINT handler being set incorrectly
208 in asynchronous subshells.
210 k. Fixed a bug that could cause `bash -t' to not execute the specified command.
212 l. Fixed several bugs that caused the shell to operate on the wrong variable
213 when using namerefs with the same name as a global variable in shell
216 m. Internal changes to how the shell handles variables with invalid names in
217 the initial environment and to prevent variables with invalid names from
218 being added to the environment instead of passing them on to children.
220 n. Changes to make sure that an expansion that results in a quoted null string
221 is reflected in the expansion, even if the word expands to nothing.
223 o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand
224 the same way after the recent changes for POSIX interpretation 888.
226 p. Saving and restoring the positional parameters at function entry and exit
227 is considerably more efficient; noticeably so when there are large numbers
228 of positional parameters.
230 q. Fixed a bug that caused `lastpipe' and `pipefail' to return an incorrect
231 status for the pipeline if there was more than one external command in a
232 loop body appearing in the last pipeline element.
234 r. Fixed a bug that caused value conversion errors with the printf builtin's
235 %u and %f conversion specifications and invalid constants.
237 2. Changes to Readline
239 a. Added more UTF-8-specific versions of multibyte functions, and optimized
240 existing functions if the current locale uses UTF-8 encoding.
242 b. Fixed a problem with bracketed-paste inserting more than one character and
243 interacting with other readline functions.
245 c. Fixed a bug that caused the history library to attempt to append a history
246 line to a non-existent history entry.
248 d. If using bracketed paste mode, output a newline after the \r that is the
249 last character of the mode disable string to avoid overwriting output.
251 e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better
252 handle multibyte characters.
254 f. Fixed a redisplay problem that caused an extra newline to be generated on
255 accept-line when the line length is exactly the screenwidth.
257 3. New Features in Bash
259 a. Bash no longer allows variable assignments preceding a special builtin that
260 changes variable attributes to propagate back to the calling environment
261 unless the compatibility level is 44 or lower.
263 b. You can set the default value for $HISTSIZE at build time in config-top.h.
265 c. The `complete' builtin now accepts a -I option that applies the completion
266 to the initial word on the line.
268 d. The internal bash malloc now uses mmap (if available) to satisfy requests
269 greater than 128K bytes, so free can use mfree to return the pages to the
272 e. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup
273 unless it's in debugging mode, as the documentation has always said, but
274 will dynamically create them if a script references them at the top level
275 without having enabled debugging mode.
277 f. The localvar_inherit option will not attempt to inherit a value from a
278 variable of an incompatible type (indexed vs. associative arrays, for
281 g. The `globasciiranges' option is now enabled by default; it can be set to
282 off by default at configuration time.
284 4. New Features in Readline
286 a. The history expansion library now understands command and process
287 substitution and extended globbing and allows them to appear anywhere in a
290 b. The history library has a new variable that allows applications to set the
291 initial quoting state, so quoting state can be inherited from a previous
294 ------------------------------------------------------------------------------
295 This document details the changes between this version, bash-5.0-alpha, and
296 the previous version, bash-4.4-release.
300 a. Fixed a bug that could cause traps in background jobs to give the terminal
301 to the wrong process group.
303 b. Fixed a bug that caused `kill -l 0' to print an out-of-range error.
305 c. Fixed a problem that could result in here-documents being displayed in
308 d. Fixed a number of out-of-bounds and free memory read errors found via
311 e. Fixed a subshell inheritance problem that could cause a subshell to wait for
314 f. Fixed a bug that caused SHLVL to be incremented one too many times when
317 g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with
320 h. Fixed a spurious warning about unterminated ${ or $( constructs during
323 i. The shell no longer runs traps if a signal arrives while reading command
326 j. Fixed an arithmetic expansion error that could allow ++var++ as valid
329 k. Fixed an error that allowed out-of-bounds references to the directory stack.
331 l. The shell does a better job of saving multi-line history entries with
334 m. Fixed a bug that could cause quoted bracket expressions in regular expression
335 arguments to `[[' to not match correctly.
337 n. Fixed a bug that could cause an IFS character in a word to result in an
338 extra '\001' character in the expansion.
340 o. A trailing backslash in a glob pattern can match a trailing backslash in the
343 p. Fixed a memory leak in the process creation code path when job control is
346 q. Fixed a bug that caused `printf' to output broken surrogate pairs for
349 r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to
350 kill an interactive shell.
352 s. Fixed a bug that could cause the `read' builtin to not fully read a
355 t. Fixed a bug that could cause identifiers to be evaluated in conditional
356 arithmetic expressions even when evaluation is suppressed.
358 u. Fixed a bug that could result in command substitution, when executed in a
359 context where word splitting is not performed, to leave a stray '\001'
360 character in the string.
362 v. Fixed a bug that could cause history expansion to be disabled in a non-
363 interactive shell even if `-o histexpand' is supplied at startup.
365 w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters.
367 x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions.
369 y. If indirect expansion attempts to indirectly reference through an unset
370 variable, report an error.
372 z. Added a guard to prevent the shell from looping while receiving an endless
373 stream of SIGTTIN at shell startup.
375 aa. Fixed a bug with parsing here documents inside a command substitution when
376 looking for the closing delimiter.
378 bb. Fixed a bug that caused printf to not quote all <blank> characters in the
379 current locale when using the `%q' format specifier.
381 cc. Fixed a bug with bash's internal buffered I/O system that caused the input
382 pointer to not be reset when read(2) returned an EOF.
384 dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will
385 not interrupt open/read/write system calls.
387 ee. The ERR trap now reports line numbers more reliably.
389 ff. The shell no longer tries to manipulate the terminal process group if a
390 command or process substitution is killed by SIGTERM when job control is
393 gg. Fixed a bug that caused extglob patterns to match filenames beginning with
396 hh. File descriptors open for writing to here documents are no longer available
399 ii. Make sure word completion doesn't perform command or process substitution.
401 jj. Fixed a bug with parsing $$'...' inside a command substitution.
403 kk. Fixed a bug that caused bash to remove backslash-newline pairs from the
404 body of a here-document with a quoted delimiter inside a command
407 ll. Fixed a bug that could cause the shell to hang when adding a pid to the
408 table of background process exit statuses.
410 mm. Fixed a bug that could cause 0x01 characters to be doubled in the output
411 of process substitution.
413 nn. Restricted shells now clear the hash table before making the PATH variable
416 oo. There are a number of changes to the expansion of $* and $@ in contexts
417 where word splitting does not occur (quoted and unquoted), with IFS set
418 to NULL or a non-standard value, mostly to deal with the consequences of
419 the behavior defined in Posix interpretation 888.
421 pp. There are a number of changes to nameref variable handling to avoid
422 creating variables with invalid names.
424 qq. A non-interactive posix mode shell no longer exits when an assignment
425 statement fails if the assignment is utimately being performed by the
428 rr. When using character class names for globbing, don't allow case
429 insensitivity, even if nocaseglob is enabled.
431 ss. Fixed a bug that allowed some redirections to stay in place if a later
434 tt. Fixed a bug in how command and process substitutions are recognized within
435 other parameter expansions.
437 uu. Fixed a bug that caused bash to loop under certain circumstances when
438 performing arithmetic expansion on a variable whose value is an invalid
441 vv. Fixed a bug that could cause bash to expand aliases inappropriately while
442 parsing compound commands like `case'.
444 ww. Fixed a bug that could cause `read -N' to fail to read complete multibyte
445 characters, even when the sequences are incomplete or invalid, with or
448 xx. Fixed a bug that could cause `case' to fail to match patterns containing
451 yy. Fixed a bug that caused exported functions to contain stray 0x01 characters.
453 zz. Fixed some inconsistencies with how the history number is handled in the
454 various prompt strings.
456 aaa. Fixed a bug that could cause a core dump if READLINE_LINE was unset
457 inside a shell function bound to a key sequence with `bind -x'.
459 bbb. Fixed a bug that could cause bash to not read a token terminator correctly
460 if a command substitution was used inside an arithmetic `for' command.
462 ccc. Fixed problems that could occur with a fatal arithmetic expansion error
463 in a context (like prompt expansion) where you can't jump back to the
466 ddd. Expression errors in arithmetic `for' commands are treated more like
469 eee. Fixed a parser synchronization error resulting from a syntax error
470 followed immediately by an EOF.
472 fff. When executing a shell function, the first line in the function ($LINENO)
473 is line 1 instead of line 0, as Posix requires.
475 ggg. In Posix mode, bash will canonicalize the value of PWD it inherits from
476 the environment and use that to set its idea of the current directory.
478 hhh. If LINENO is exported, bash needs to regenerate its value each time it
479 constructs the environment.
481 iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'.
483 jjj. Make sure the `coproc' command returns an appropriate status if the NAME
486 kkk. Fixed a problem with arithmetic expressions containing array references
487 that contain arithmetic expressions with syntax errors.
489 lll. The `select' command and help builtin will use $COLUMNS before the window
490 size returned from the kernel as the terminal width.
492 mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to
493 detect file descriptor errors.
495 nnn. The `read' builtin now does a better job of acting on signals that don't
498 ooo. Fixed some cases where `printf -v' did not return failure status on a
499 variable assignment error.
501 ppp. Fixed temporary environment propagation back to the current environment
502 so that it doesn't happen for special builtins run by the `command'
505 qqq. Fixed a bug when searching for the end of a here-document delimiter in a
506 command substitution.
508 rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail.
510 sss. Fixed a bug that could cause reserved words to not be recognized in a
511 for statement without the `in' inside a command substitution.
513 ttt. Fixed a bug that could cause a double-free in a timed command with an
516 uuu. Fixed a bug that could cause a core dump if a script switches from a UTF-8
517 locale to a different locale after displaying a lone surrogate character.
519 vvv. Fixed cases where bash prematurely removed FIFOs attached to process
522 www. Fixed a problem with calculating the size of the table that stores exit
523 statuses from background processes when the child process resource limit
526 xxx. Fixed a memory leak with functions using `return' when using FIFOs for
529 yyy. `wait' without arguments attempts to wait for all active process
530 substitution processes.
532 zzz. Fixed a bug where an indirect parameter was subjected to word splitting
533 when trying to find the indirected variable name.
535 aaaa. Fixed a bug that could allow restricted shell users to add commands to
538 bbbb. When using the `!(patlist)' extended globbing operator, a filename
539 beginning with a `.' that doesn't match any of the patterns is not
540 returned as a match if leading dots must be matched explicitly.
542 cccc. Fixed a bug that could cause line number and source file information for
543 a function definition to be incorrect if there are multiple definitions.
545 dddd. Fixed a bug that could cause builtins like `readonly' to behave
546 differently when applied to arrays and scalar variables within functions.
548 eeee. Fixed a bug that could cause alias expansion to add an extra space to
549 a quoted string that begins outside the alias expansion.
551 ffff. Fixed a bug that could result in unwanted alias expansion after timing
554 gggg. Fixed a bug that could cause a core dump if a timestamp in a history
555 file overflowed a time_t.
557 hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since
558 the kernel calls make those file descriptors read-write.
560 iiii. Fixed a problem with splitting double-quoted words for programmable
561 completion when the double quote immediately follows another word
564 jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share
565 the same input buffer.
567 kkkk. The error message resulting from ${x:?} and ${x?} now differs depending
568 on whether the variable is null or unset.
570 llll. In Posix mode, the shell exits if a variable assignment fails and precedes
571 an empty simple command (after expansion).
573 mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to
576 nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal
577 due to Linux pid namespace peculiarities.
579 oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for
582 pppp. Fixed a bug that could cause SIGINT recursion when running an external
583 command in a trap the shell takes after a command exits due to SIGINT.
585 qqqq. Make sure the shell turns off job control before running the command-
586 not-found handle, so the command doesn't try to manipulate process
589 rrrr. Fixed a problem with timing process substitutions that caused the shell
590 to print timing information for the calling command.
592 ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark
593 the delimiter as quoted (inhibiting expansion of the here-document
596 tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and
597 conditional command pattern matches.
599 uuuu. Fixed a bug that could cause the pattern matching engine to not recognize
600 locale-specific character classes.
602 vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently.
604 wwww. The `globstar' code now skips over symbolic links to directories,
605 preventing them from being scanned twice.
607 xxxx. When running `bind -x' commands, bash now sets READLINE_POINT based on
608 the number of characters in the readline line buffer, not the number of
611 yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN
612 trap when using `eval return'.
614 zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document.
616 aaaaa. The process substitution code now closes and unlinks FIFOs when the
617 process on the other side exits, in order to prevent SIGPIPE or
618 waiting until a FIFO opened for read has a writer.
620 bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in
621 an {id}>foo construct.
623 ccccc. After a Posix discussion, the pattern matching engine just skips over
624 invalid character classes in bracket expressions, instead of matching
625 them like individual characters in the expression.
627 ddddd. Fixed a posix-mode problem with variable scoping when creating variables
628 from assignment statements preceding special builtins.
630 eeeee. Fixed a bug that could cause patterns containing backslashes to not be
631 run through the pattern matching engine.
633 fffff. Fixed a bug that could cause redirections to compound commands to not
634 be `undone' if the file descriptor in the redirection was closed when
635 the redirection was initially processed.
637 ggggg. Fixed a bug that could cause buffer corruption when using `bind -x' in
638 a command execute as a result of a key binding installed by `bind -x'.
640 2. Changes to Readline
642 a. Added a guard to prevent nested macros from causing an infinite expansion
645 b. Instead of allocating enough history list entries to hold the maximum list
646 size, cap the number allocated initially.
648 c. Added a strategy to avoid allocating huge amounts of memory if a block of
649 history entries without timestamps occurs after a block with timestamps.
651 d. Added support for keyboard timeouts when an ESC character is the last
652 character in a macro.
654 e. There are several performance improvements when in a UTF-8 locale.
656 f. Readline does a better job of preserving the original set of blocked
657 signals when using pselect() to wait for input.
659 g. Fixed a bug that caused multibyte characters in macros to be mishandled.
661 h. Fixed several bugs in the code that calculates line breaks when expanding
662 prompts that span several lines, contain multibyte characters, and contain
663 invisible character seqeuences.
665 i. Fixed several bugs in cursor positioning when displaying lines with prompts
666 containing invisible characters and multibyte characters.
668 j. When performing case-insensitive completion, Readline no longer sorts the
669 list of matches unless directed to do so.
671 k. Fixed a problem with key sequences ending with a backslash.
673 l. Fixed out-of-bounds and free memory read errors found via fuzzing.
675 m. Fixed several cases where the mark was set to an invalid value.
677 n. Fixed a problem with the case-changing operators in the case where the
678 lower and upper case versions of a character do not have the same number
681 o. Handle incremental and non-incremental search character reads returning EOF.
683 p. Handle the case where a failing readline command at the end of a multi-key
684 sequence could be misinterpreted.
686 q. The history library now prints a meaningful error message if the history
687 file isn't a regular file.
689 r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace
690 a multibyte character.
692 s. The key binding code now attempts to remove a keymap if a key unbinding
695 t. Fixed a line-wrapping issue that caused problems for some terminal
698 u. If there is a key bound to the tty's VDISCARD special character, readline
699 disables VDISCARD while it is active.
701 v. Fixed a problem with exiting bracketed paste mode on terminals that assume
702 the bracketed paste mode character sequence contains visible characters.
704 w. Fixed a bug that could cause a key binding command to refer to an
705 uninitialized variable.
707 3. New Features in Bash
709 a. The `wait' builtin can now wait for the last process substitution created.
711 b. There is an EPOCHSECONDS variable, which expands to the time in seconds
712 since the Unix epoch.
714 c. There is an EPOCHREALTIME variable, which expands to the time in seconds
715 since the Unix epoch with microsecond granularity.
717 d. New loadable builtins: rm, stat, fdflags.
719 e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment.
721 f. When supplied a numeric argument, the shell-expand-line bindable readline
722 command does not perform quote removal and suppresses command and process
725 g. `history -d' understands negative arguments: negative arguments offset from
726 the end of the history list.
728 h. The `name' argument to the `coproc' reserved word now undergoes word
729 expansion, so unique coprocs can be created in loops.
731 i. A nameref name resolution loop in a function now resolves to a variable by
732 that name in the global scope.
734 j. The `wait' builtin now has a `-f' option, which signfies to wait until the
735 specified job or process terminates, instead of waiting until it changes
738 k. There is a define in config-top.h that allows the shell to use a static
739 value for $PATH, overriding whatever is in the environment at startup, for
740 use by the restricted shell.
742 l. Process substitution does not inherit the `v' option, like command
745 m. If a non-interactive shell with job control enabled detects that a foreground
746 job died due to SIGINT, it acts as if it received the SIGINT.
748 n. The SIGCHLD trap is run once for each exiting child process even if job
749 control is not enabled when the shell is in Posix mode.
751 o. A new shopt option: localvar_inherit; if set, a local variable inherits the
752 value of a variable with the same name at the nearest preceding scope.
754 p. `bind -r' now checks whether a key sequence is bound before binding it to
755 NULL, to avoid creating keymaps for a multi-key sequence.
757 q. A numeric argument to the line editing `operate-and-get-next' command
758 specifies which history entry to use.
760 r. The positional parameters are now assigned before running the shell startup
761 files, so startup files can use $@.
763 s. There is a compile-time option that forces the shell to disable the check
764 for an inherited OLDPWD being a directory.
766 t. The `history' builtin can now delete ranges of history entries using
769 u. The `vi-edit-and-execute-command' bindable readline command now puts readline
770 back in vi insertion mode after executing commands from the edited file.
772 v. The command completion code now matches aliases and shell function names
773 case-insensitively if the readline completion-ignore-case variable is set.
775 w. There is a new `assoc_expand_once' shell option that attempts to expand
776 associative array subscripts only once.
778 x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended
779 debugging mode is active. The old behavior of unconditionally setting them
780 is available as part of the shell compatibility options.
782 y. The `umask' builtin now allows modes and masks greater than octal 777.
784 z. The `times' builtin now honors the current locale when printing a decimal
787 aa. There is a new (disabled by default, undocumented) shell option to enable
788 and disable sending history to syslog at runtime.
790 4. New Features in Readline
792 a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
793 Posix specifies (uses fnmatch(3) if available).
795 b. There are new `next-screen-line' and `previous-screen-line' bindable
796 commands, which move the cursor to the same column in the next, or previous,
797 physical line, respectively.
799 c. There are default key bindings for control-arrow-key key combinations.
801 d. A negative argument (-N) to `quoted-insert' means to insert the next N
802 characters using quoted-insert.
804 e. New public function: rl_check_signals(), which allows applications to
805 respond to signals that readline catches while waiting for input using
806 a custom read function.
808 f. There is new support for conditionally testing the readline version in an
809 inputrc file, with a full set of arithmetic comparison operators available.
811 g. There is a simple variable comparison facility available for use within an
812 inputrc file. Allowable operators are equality and inequality; string
813 variables may be compared to a value; boolean variables must be compared to
814 either `on' or `off'; variable names are separated from the operator by
817 ------------------------------------------------------------------------------
818 This document details the changes between this version, bash-4.4-release, and
819 the previous version, bash-4.4-rc2.
823 a. Fixed a bug that could potentially result in a crash due to an integer
826 b. Fixed a bug in where commands printed due to `set -x' could be incorrectly
827 quoted if being printed in contexts where they haven't yet been expanded.
829 c. Fixed several memory leaks.
831 d. Fixed a bug that could potentially cause the terminal attributes to be
832 set incorrectly by a command run from a programmable completion.
834 e. Fixed several potential buffer overflow issues in the word expansion code.
836 2. Changes to Readline
838 3. New Features in Bash
840 4. New Features in Readline
841 ------------------------------------------------------------------------------
842 This document details the changes between this version, bash-4.4-rc2, and
843 the previous version, bash-4.4-beta2.
847 a. Fixed an out-of-bounds read in the redirection operator completion code.
849 b. Fixed execution context so `until continue' doesn't disable execution for
852 c. Fixed trap handling code so traps don't inherit a command's temporary
855 d. Fixed a bug that resulted in incorrect line numbers when a function is
856 defined as part of another function's execution.
858 e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting
859 is not performed and $IFS is not the default.
861 f. Fixed a bug that caused ''"$@" to not expand to an empty argument when
862 there are no positional parameters.
864 g. Fixed a bug that caused a shell compiled without job control to use the
865 incorrect exit status for builtin commands preceded by a command executed
866 from the file system that causes the shell to call waitpid().
868 h. Improved word completion for quoted strings containing unterminated command
869 substitutions with embedded double quotes.
871 2. Changes to Readline
873 a. Fixed a bug that caused mode strings to be displayed incorrectly if the
874 prompt was shorter than the mode string.
876 3. New Features in Bash
878 a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
879 the nounset option is enabled no longer throws an unbound variable error.
881 4. New Features in Readline
883 a. New application-callable function: rl_pending_signal(): returns the signal
884 number of any signal readline has caught but not yet handled.
886 b. New application-settable variable: rl_persistent_signal_handlers: if set
887 to a non-zero value, readline will enable the readline-6.2 signal handler
888 behavior in callback mode: handlers are installed when
889 rl_callback_handler_install is called and removed removed when a complete
892 ------------------------------------------------------------------------------
893 This document details the changes between this version, bash-4.4-beta2, and
894 the previous version, bash-4.4-rc1.
898 a. Fixed a memory leak when processing ${!var[@]}.
900 b. Fixed a bug that caused subshells to free trap strings associated with
903 c. Inheriting BASHOPTS from the environment now works to force actions
904 associated with enabling an option, instead of just marking the option
907 d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
910 e. Fixed a bug caused by an accidental omission of part of the original patch
913 e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
915 f. Fixed a bug that caused parsing errors in command substitutions with
916 consecutive case statements separated by newlines.
918 g. Updated logic used to decide whether bash is running inside an emacs
919 terminal emulator to work with future emacs versions.
921 h. Fixed two extended pattern matching bugs caused by premature short-
924 i. Fixed a memory leak in the code that removes duplicate history entries.
926 j. There are a number of bug fixes to coproc, mapfile, declare, unset,
927 and assignment statements that prevent nameref variables from creating
928 and unsetting variables with invalid names.
930 k. Fixed a bug that caused variables to be inadvertently marked as both an
931 associative and an indexed array.
933 l. Fixed a bug that caused `bash -c' to not run a trap specified in the
936 j. There are a number of bug fixes to coproc, mapfile, declare, and assignment
937 statements that prevent nameref variables from overwriting or modifying
938 attributes of readonly variables.
940 k. Fixed a bug that caused command substitution to attempt to set the
941 terminal's process group incorrectly.
943 l. Fixed a bug that could cause prompt string expansion to display error
944 messages when the `nounset' shell option is set.
946 m. Fixed a bug that caused "$@" to not expand to an empty string under the
947 circumstances when Posix says it should ("${@-${@-$@}}").
949 n. Fixed several bugs caused by referencing nameref variables whose values
950 are names of unset variables (or names that are valid for referencing
951 but not assignment), including creating variables in the temporary
954 o. Function tracing and error tracing are disabled if --debugger is supplied
955 at startup but the shell can't find the debugger start file.
957 p. Fixed a bug when IFS is used as the control variable in a for statement.
959 q. Fixed a bug with SIGINT received by a command substitution in an interactive
962 r. The checks for nameref variable self-references are more thorough.
964 s. Fixed several bugs with multi-line aliases.
966 t. Fixed `test' to handle the four-argument case where $1 == '(' and
969 u. Fixed a bug in the expansion of $* in the cases where word splitting is
972 v. Fixed a bug in execution of case statements where IFS includes the
973 pattern matching characters.
975 2. Changes to Readline
977 a. When refreshing the line as the result of a key sequence, Readline attempts
978 to redraw only the last line of a multiline prompt.
980 b. Fixed an issue that caused completion of git commands to display
981 incorrectly when using colored-completion-prefix.
983 c. Fixed several redisplay bugs having to do with multibyte characters and
984 invisible characters in prompt strings.
986 3. New Features in Bash
988 a. Value conversions (arithmetic expansions, case modification, etc.) now
989 happen when assigning elements of an array using compound assignment.
991 b. There is a new option settable in config-top.h that makes multiple
992 directory arguments to `cd' a fatal error.
994 c. Bash now uses mktemp() when creating internal temporary files; it produces
995 a warning at build time on many Linux systems.
997 4. New Features in Readline
999 a. The default binding for ^W in vi mode now uses word boundaries specified
1000 by Posix (vi-unix-word-rubout is bindable command name).
1002 b. rl_clear_visible_line: new application-callable function; clears all
1003 screen lines occupied by the current visible readline line.
1005 c. rl_tty_set_echoing: application-callable function that controls whether
1006 or not readline thinks it is echoing terminal output.
1008 d. Handle >| and strings of digits preceding and following redirection
1009 specifications as single tokens when tokenizing the line for history
1012 e. Fixed a bug with displaying completions when the prefix display length
1013 is greater than the length of the completions to be displayed.
1015 f. The :p history modifier now applies to the entire line, so any expansion
1016 specifying :p causes the line to be printed instead of expanded.
1018 ------------------------------------------------------------------------------
1019 This document details the changes between this version, bash-4.4-rc1, and
1020 the previous version, bash-4.4-beta.
1024 a. Fixed several problems with bash completion not special-casing bash syntax
1027 b. Fixed a bug that caused the mapfile builtin to not create array variables
1028 when a variable of the same name appears in the temporary environment.
1030 c. Fixed a bug that caused prompt expansion to loop when PS1 contained a
1033 d. Fixed a bug that caused the ${array[@]@A} expansion to split the results
1034 even when double-quoted.
1036 e. There is a new implementation of the code that saves the last CHILD_MAX
1037 exited background pids so their status can be queried later.
1039 f. Bash-4.4 can now be configured and built on very old versions of Solaris 2.
1041 g. Fixed problems with --help support for several builtins.
1043 h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited
1044 from the environment.
1046 i. Fixed a bug that caused background processes run from non-interactive shells
1047 with job control enabled to place the terminal in the wrong process group
1048 under certain circumstances.
1050 j. Fixed a bug that caused `fc' to return an incorrect exit status when
1051 executing commands from the history list.
1053 k. Fixed a bug that caused the shell to exit when a process substitution
1054 received a SIGINT when run in certain terminal emulators.
1056 l. EXECIGNORE now honors the setting of `extglob' when attempting to match
1059 m. Fixed a bug where `return' used the wrong exit status when executed in a
1062 n. Fixed a bug that caused a command containing a here-document and an escaped
1063 newline to be stored in the history list incorrectly.
1065 o. Fixed a bug that caused set -e to be honored in cases of builtins invoking
1066 other builtins when it should be ignored.
1068 p. Fixed a bug that caused `readonly' and `export' to create local array
1069 variables when used within shell functions.
1071 q. Fixed a bug that allowed subshells begun to execute process substitutions
1072 to have access to the command's temporary environment.
1074 r. Fixed a bug that could cause the shell to dump core when receiving a
1075 SIGCHLD for which a trap has been set while running in posix mode.
1077 s. Fixed a bug that caused bash to not restore BASH_ARGC, BASH_ARGV,
1078 BASH_SOURCE, BASH_LINENO, and FUNCNAME if the shell received a SIGINT
1079 while reading commands from a file while executing `.'.
1081 t. Fixed a bug that caused the `-o history' option to have no effect when
1082 supplied on the command line when starting a new shell.
1084 u. Fixed a bug that caused history expansions occurring in command
1085 substitutions to not be performed.
1087 v. Fixed a bug that caused `eval' run in a non-interactive shell to disable
1088 history expansion for the remainder of the shell script, even if the script
1089 had previously enabled it.
1091 w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set
1092 to the empty string.
1094 x. Fixed a bug that caused process and command substitution to inherit output
1095 buffered in the stdio library but not written.
1097 y. Fixed a bug that caused a terminating signal received during `echo' to run
1098 an exit trap in a signal handler context.
1100 z. Fixed a bug that caused a builtin command containing a process substitution
1101 to return the wrong exit status.
1103 aa. Fixed a bug that caused `()' subshells with piped input to incorrectly
1104 redirect the standard input of some of the commands in the subshell from
1107 bb. The history builtin now uses more descriptive error messages for missing or
1110 2. Changes to Readline
1112 a. The history file writing functions only attempt to create and use a backup
1113 history file if the history file exists and is a regular file.
1115 b. Fixed an out-of-bounds read in readline's internal tilde expansion
1118 c. Fixed several redisplay bugs with prompt strings containing multibyte
1119 and non-visible characters whose physical length is longer than the screen
1122 d. Fixed a redisplay bug with prompt strings containing invisible characters
1123 whose physical length exceeds the screen width and using incremental search.
1125 e. Readline prints more descriptive error messages when it encounters errors
1126 while reading an inputrc file.
1128 f. Fixed a bug in the character insertion code that attempts to optimize
1129 typeahead when it reads a character that is not bound to self-insert and
1130 resets the key sequence state.
1132 3. New Features in Bash
1134 a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
1137 b. inherit_errexit: a new `shopt' option that, when set, causes command
1138 substitutions to inherit the -e option. By default, those subshells disable
1139 -e. It's enabled as part of turning on posix mode.
1141 c. New prompt string: PS0. Expanded and displayed by interactive shells after
1142 reading a complete command but before executing it.
1144 d. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to
1145 SIG_DFL when the shell is started, so they are set to SIG_DFL in child
1148 e. Posix-mode shells now allow double quotes to quote the history expansion
1151 f. OLDPWD can be inherited from the environment if it names a directory.
1153 g. Shells running as root no longer inherit PS4 from the environment, closing
1154 a security hole involving PS4 expansion performing command substitution.
1156 h. If executing an implicit `cd' when the `autocd' option is set, bash will
1157 now invoke a function named `cd' if one exists before executing the `cd'
1160 4. New Features in Readline
1162 a. If an incremental search string has its last character removed with DEL,
1163 the resulting empty search string no longer matches the previous line.
1165 b. If readline reads a history file that begins with `#' (or the value of
1166 the history comment character) and has enabled history timestamps, the
1167 history entries are assumed to be delimited by timestamps. This allows
1168 multi-line history entries.
1170 c. Readline now throws an error if it parses a key binding without a
1171 terminating `:' or whitespace.
1173 ------------------------------------------------------------------------------
1174 This document details the changes between this version, bash-4.4-beta, and
1175 the previous version, bash-4.4-alpha.
1179 a. Fixed two bugs that caused out-of-bounds reads when skipping over assignment
1180 statements while finding the word on which to perform programmable
1183 b. Fixed a memory leak in programmable completion.
1185 c. Fixed a bug that could cause the shell to crash when interrupting the
1188 d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new
1191 e. Fixed a bug that caused the && and || operators to be incorrectly optimized.
1193 f. The shell now undoes redirections before exiting the shell when the `-e'
1194 option is enabled, and a shell function fails.
1196 g. History expansion now skips over the history expansion character in command
1197 and process substitution.
1199 h. Fixed a bug that caused stray '\001' characters to be added to the output
1202 i. Fixed a memory leak when processing declare commands that perform compound
1205 j. Fixed a bug that could cause the shell to crash when reading input from a
1206 file and the limit on open file descriptors is high.
1208 k. Fixed a bug that caused the ERR and RETURN traps to be unset if they were
1209 set in a shell function but unset previously.
1211 l. Fixed a bug that caused several signals to be ignored if `exec' failed in
1212 an interactive shell.
1214 m. A posix-mode non-interactive shell now considers a parameter expansion error
1215 to be a fatal error.
1217 n. The `time' command now prints timing statistics for failed commands when
1218 the -e option is enabled.
1220 o. Fixed a bug that caused the shell to crash when attempting to indirectly
1221 expand a shell variable with an invalid name.
1223 p. Fixed a bug that caused the shell to crash when running a trap containing
1224 a process substitution.
1226 q. Bash now prints the keyword `function' before a function with the same name
1227 as a reserved word when using `declare -f' to avoid parse errors when
1228 reusing the output as input.
1230 r. Fixed a bug that caused the shell to crash when using declare -g to attempt
1231 to redefine an existing global indexed array variable as an associative
1234 s. Fixed a memory leak that occurred when interrupting brace expansions
1235 generating a sequence.
1237 t. Fixed a bug that resulted in alias expansion in redirections.
1239 u. The `declare -a' and `declare -A' commands now print fewer warnings when
1240 attempting to create and initialize an array at the same time, but
1241 relying on word expansions to construct the compound assignment.
1243 v. The `help' builtin now behaves better in locales where each wide
1244 character occupies more than one display column.
1246 w. The `read' builtin no longer has a possible race condition when a timeout
1249 x. Fixed several expansion problems encountered when IFS="'".
1251 y. Fixed a problem with the expansion of $'\c?'.
1253 z. Bash no longer splits the expansion of here-strings, as the documentation
1256 aa. Bash now puts `s' in the value of $- if the shell is reading from standard
1257 input, as Posix requires.
1259 bb. Fixed a bug that caused the shell to crash if invoked with a NULL
1262 cc. The shell now only trusts an inherited value for $PWD if it begins with a
1265 dd. Fixed a memory leak when creating local array variables and assigning to
1266 them using compound assignment with the `declare' builtin.
1268 ee. Fixed a bug that could cause the shell to crash when processing nested here
1269 documents inside a command substitution.
1271 ff. Array keys and values are now displayed using $'...' quoting where
1274 gg. Fixed a bug that could cause the shell to crash if the replacement string
1275 in pattern substitution was NULL.
1277 hh. Fixed a bug that could cause the shell to crash if a command substitution
1278 contained a non-fatal syntax error.
1280 ii. Fixed a bug that could cause the shell to crash if variable indirection
1281 resulted in a NULL variable.
1283 jj. Fixed a bug that could cause the shell to crash if a long string contained
1284 multiple unterminated parameter expansion constructs.
1286 kk. Improved the code that acts on SIGINT received while waiting for a child
1287 process only if the child exits due to SIGINT.
1289 ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple
1292 2. Changes to Readline
1294 a. Colored completion prefixes are now displayed using a different color, less
1295 likely to collide with files.
1297 b. Fixed a bug that caused vi-mode character search to misbehave when
1298 running in callback mode.
1300 c. Fixed a bug that caused output to be delayed when input is coming from a
1303 d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
1304 a multi-key key sequence via a macro.
1306 e. Fixed a bug that caused problems with applications that supply their own
1307 input function when performing completion.
1309 f. When read returns -1/EIO when attempting to read a key, return an error
1310 instead of line termination back to the caller.
1312 g. Updated tty auditing feature based on patch from Red Hat.
1314 h. Fixed a bug that could cause the history library to crash on overflows
1315 introduced by malicious editing of timestamps in the history file.
1317 3. New Features in Bash
1319 a. `make install' now installs the example loadable builtins and a set of
1320 bash headers to use when developing new loadable builtins.
1322 b. `enable -f' now attempts to call functions named BUILTIN_builtin_load when
1323 loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows
1324 loadable builtins to run initialization and cleanup code.
1326 c. There is a new BASH_LOADABLES_PATH variable containing a list of directories
1327 where the `enable -f' command looks for shared objects containing loadable
1330 d. The `complete_fullquote' option to `shopt' changes filename completion to
1331 quote all shell metacharacters in filenames and directory names.
1333 e. The `kill' builtin now has a `-L' option, equivalent to `-l', for
1334 compatibility with Linux standalone versions of kill.
1336 4. New Features in Readline
1337 ------------------------------------------------------------------------------
1338 This document details the changes between this version, bash-4.4-alpha, and
1339 the previous version, bash-4.3-release.
1343 a. A bug that caused pipelines to be corrupted while running the DEBUG trap
1346 b. A bug that accidentally omitted the `-R' unary operator from `test' was
1349 c. A bug that could cause the shell to not restore the terminal's process
1350 group on shell exit was fixed.
1352 d. Several changes were made to programmable completion to accommodate
1353 assumptions made by the bash-completion package.
1355 e. Bash no longer inhibits C-style escape processing ($'...') while performing
1356 pattern substitution word expansions.
1358 f. Fixed a bug that caused `return' executed from a trap handler to use the
1359 wrong return status when one was not supplied as an argument.
1361 g. In Posix mode, defining a function with the same name as a special
1362 builtin is now an error, fatal only when the shell is not interactive.
1364 h. Fixed a bug that caused compound array assignments to discard unset or null
1365 variables used as subscripts, thereby making it appear as if the index was
1368 i. Fixed a bug that caused extended glob patterns to incorrectly match
1369 filenames with a leading `.'.
1371 j. Fixed a bug involving sign extension when reallocating the input line
1372 after a history expansion, causing segmentation faults.
1374 k. Bash now does a better job at identifying syntax errors during word
1375 completion and tailoring completion appropriately.
1377 l. Bash now uses the current locale's decimal point in comamnd timing output.
1379 m. Fixed a bug that caused segmentation faults while reading here documents if
1380 PS2 contains a command substitution.
1382 n. There are several changes to how $@ is expanded when unquoted but in a
1383 context where word splitting is not performed (e.g., on the rhs of an
1384 assignment or in a conditional command).
1386 o. Bash now quotes command hash table entries that contain shell metacharacters
1387 when displaying hash table contents.
1389 p. Fixed a potential file descriptor leak when dup2() fails while performing a
1392 q. Fixed a bug that caused directory names evaluated during word completion to
1395 r. Fixed several bugs which could result in indirect variable expansion and
1396 namerefs creating variables with invalid names or referencing variables
1397 set to the empty string.
1399 s. Fixed a bug that caused bash to not expand $0 in word expansions where it
1402 t. Fixed a bug that caused bash to perform process substitution if <(
1403 appeared inside an arithmetic context.
1405 u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern
1406 to be confused as directory names.
1408 v. Fixed several bugs with treatment of invisible variables (variables with
1409 attributes that are unset because they have never been assigned values).
1411 w. Fixed a bug that caused the `read' builtin to not clean up readline's
1412 state when using the -e and -t options together and the read timed out.
1414 x. Fixed a bug that caused the shell to exit with the wrong (but non-zero)
1415 value if a command was not found or was not executable.
1417 y. Fixed a bug that caused the `time' reserved word to not be recognized as
1418 such in all contexts where it should have been.
1420 z. Fixed a bug that caused the shell to close process subsitution file
1421 descriptors when executing a script without the `#!' leading line.
1423 aa. Fixed a typo that caused the `compat42' shell option to set the wrong
1424 compatibility level.
1426 bb. The shell now handles process substitution commands with embedded
1427 parentheses the same way as it does when parsing command substitution.
1429 cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option
1430 to produce core dumps.
1432 dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases
1433 where slashes must be matched explicitly.
1435 ee. Fixed a problem with patterns containing `:' in colon-separated variables
1438 ff. Fixed a bug that caused indirect variable expansion using indexed arrays to
1441 gg. Fixed a parsing problem that caused quoted newlines immediately following a
1442 command substitution to be mishandled in certain cases.
1444 hh. Fixed a potential buffer overflow on systems without locale_charset or the
1447 ii. Fixed a bug that caused background processes to modify the terminal's
1448 process group under certain circumstances.
1450 jj. Asynchronous commands now always set $? to 0 and are not affected by
1451 whether or not the command's exit status is being inverted.
1453 kk. Fixed a problem that caused a line ending with an escaped newline and
1454 containingh a prior `eval' to be incorrectly parsed.
1456 ll. Fixed an issue with programmable completion and `!' in extglob patterns
1457 used as arguments to `compgen -X'.
1459 mm. Word completion now treats the two-character token `>|' as requiring
1462 nn. Bash no longer expands tildes in $PATH elements while in Posix mode.
1464 oo. Fixed a bug that caused bash to not clean up readline's state, including
1465 the terminal settings, if it received a fatal signal while in a readline()
1466 call (including `read -e' and `read -s').
1468 pp. Fixed bug that caused importing shell functions from the environment to
1469 execute additional commands following the function.
1471 qq. Fixed a bug that caused the parser to return a lookahead character pushed
1472 back by a previous call, even when on another line.
1474 rr. Fixed a bug that caused many here-documents or many nested case statements
1475 to overflow an internal stack.
1477 ss. Changed the way bash encodes exported functions for inclusion in the
1478 environment to avoid name collisions with valid variable names and to
1479 indicate that they are exported functions.
1481 tt. Fixed a bug that could result in an invalid memory access when processing
1482 a here document delimited by end of file or end of string.
1484 uu. Fixed a bug that could cause an invalid memory access if a command was run
1485 before initializing the job control framework.
1487 vv. When in Posix mode, bash prints shell function definitions as Posix
1488 specifies them, without the leading `function' keyword.
1490 ww. The variable attribute display builtins no longer display variables with
1491 invalid names that were imported from the environment.
1493 xx. Fixed a bug that could allow `break' or `continue' executed from shell
1494 functions to affect loops running outside of the function.
1496 yy. Fixed a bug that could cause a restricted shell to attempt to import shell
1497 functions from the environment.
1499 zz. The shell now allows double-quoted identifiers in arithmetic expressions.
1501 aaa. Fixed a bug that could allow scalar variables subscripted using [@] in
1502 word expansions to be incorrectly quoted.
1504 bbb. The shell now makes sure to ignore SIGTSTP/SIGTTIN/SIGTTOU in child
1505 processes if they were ignored at shell startup, even if job control is
1508 ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to
1511 ddd. Posix says that expanding $* in a pattern context where the expansion is
1512 double-quoted should not treat $* as if it were double quoted.
1514 eee. Bash now restores getopts' internal state between calls to getopts even if
1515 a shell function declares a local copy of OPTIND.
1517 fff. Fixed a bug that could cause `history -r' or `history -n' to read identical
1518 lines from the history file more than once.
1520 ggg. The commands executed by `bind -x' now redisplay at most the final line
1521 of a multi-line prompt, and those commands may return 124 to indicate that
1522 the entire prompt should be redrawn.
1524 hhh. Fixed a bug that could cause `mapfile' to create variables with invalid
1527 iii. The shell only goes into debugging mode when --debugger is supplied if
1528 the debugger initialization file is present.
1530 jjj. Fixed a bug that disallowed an assignment to (implicit) subscript 0 of an
1531 existing array in a declare command that set the readonly attribute.
1533 kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable
1536 lll. Appending to an existing array variable using the compound assignment
1537 syntax (var+=(aaa)) should not affect assignments to existing subscripts
1538 appearing in the compound assignment.
1540 mmm. Fixed a bug that could cause the shell to crash when a variable with a
1541 null value was passed in the temporary environment and the variable's
1542 attributes are modified using `declare' while performing a redirection.
1544 nnn. Fixed a bug in printf so that a missing precision specifier after a `.'
1547 ooo. Fixed a bug that attempted to use the internal command timing to time
1548 pipeline components if the pipeline elements are separated by newlines.
1550 ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase
1551 the values on assignment.
1553 qqq. Bash does a better job of determining whether or not files are executable
1554 when running on Windows, since the X_OK flag to access(2) is not supported.
1556 rrr. Fixed a bug that caused some of the shell's internal traps (e.g., ERR) to
1557 be interrupted (and leave incorrect state) by pending SIGINTs.
1559 sss. Fixed a bug in the bash interface to history expansion to avoid attempting
1560 expansion if the history expansion character occurs in a command
1563 ttt. Fixed a bug that caused the select command to crash if the REPLY variable
1564 ends up empty (e.g., if it's made readonly)
1566 uuu. Bash handles backslash-quoting of multibyte characters better when quoting
1567 output that is intended to be reused.
1569 vvv. System-specific changes for: Windows, Cygwin.
1571 www. Fixes for upper and lower-casing multibyte characters, some locales have
1572 characters whose upper and lowercase versions have different numbers of
1575 xxx. Fixed a bug that caused the ERR trap in a shell function to have the
1576 wrong value for $LINENO.
1578 yyy. Fixed a bug that resulted in incorrect quoting of regexps for the =~
1579 operator when an open brace appears without a close brace.
1581 zzz. Fixed a bug in the array unset operation that caused it to attempt to
1582 parse embedded single and double quotes.
1584 aaaa. Fixed a bug that caused $* to not expand with the first character of
1585 $IFS as a separator in a context where word splitting will not take
1588 bbbb. Fixed two bugs that could cause the shell to dereference a null pointer
1589 while attempting to print an error message from arithmetic expansion.
1591 cccc. Fixed a bug that resulted in short-circuited evaluation when reading
1592 commands from a string ending in an unquoted backslash, or when sourcing
1593 a file that ends with an unquoted backslash.
1595 dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up
1596 any FIFOs created by process substitution.
1598 eeee. If the -T option is not set, allow the source builtin and shell functions
1599 to set a DEBUG trap that persists after the sourced file or function
1600 returns, instead of restoring the old (unset) value unconditionally.
1602 ffff. Fixed a bug that caused redirections to not be undone on some syntax
1603 errors, e.g., when parsing a command substitution.
1605 gggg. Bash only adds asynchronous commands to the table of background pids
1606 whose status it remembers, to avoid it growing too large during scripts
1607 that create and reap large numbers of child processes. This means that
1608 `wait' no longer works on synchronous jobs, but $? can be used to get
1609 the exit status in those cases.
1611 hhhh. Bash now checks whether or not a shell script argument is a directory
1612 before trying to open it; Posix says implementations may allow open(2)
1615 iiii. Fixed a bug that could cause the shell to set the terminal's process
1616 group to a background process group when running as part of a pipeline.
1618 jjjj. Made a few changes to strings to avoid possible potential negative effects
1619 caused by malicious translations.
1621 kkkk. Fixed a bug that caused the `unset' builtin to continue to treat its
1622 arguments as functions after unsetting a function when invoked with no
1625 llll. Fixed a bug that would not replace empty strings using pattern
1626 substitution even if the pattern matched the empty string.
1628 mmmm. Fixed a bug with word completion that prevented some characters from
1629 being backslash-quoted (backquote, dollar sign).
1631 nnnn. Fixed a bug that prevented a command from the history re-executed by the
1632 `fc' builtin from setting verbose mode.
1634 oooo. Fixed a bug that caused the shell to not enable and disable function
1635 tracing with changes to the `extdebug' shell option.
1637 pppp. Fixed a bug that caused assignments to nameref variables pointing to
1638 unset variables with attributes but no values to create variables with
1641 qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to
1642 unset the wrong variable under certain circumstances.
1644 rrrr. Fixed a bug that caused close braces occurring in brace expansions within
1645 command substitutions to incorrectly terminate parameter expansions.
1647 ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH.
1649 tttt. Fixed a bug that caused interactive shells compiled without job control
1650 to return incorrect status values for child processes when running a
1651 single command that creates enough children to use the entire PID space.
1653 uuuu. `esac' should not be recognized as a reserved word when it appears as the
1654 second or later pattern in a case statement pattern list.
1656 vvvv. Fixed a bug that caused the completion code to read past the end of the
1657 readline line buffer while skipping assignment statements to find the
1660 wwww. Fixed a bug that caused case statements within loops contained in a
1661 command substitution to be parsed incorrectly.
1663 xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after
1664 running `wait' with no arguments and interrupting it with ^C without
1665 a trap handler installed.
1667 2. Changes to Readline
1669 a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
1670 commands with modifiers was fixed.
1672 b. Fixed a bug that caused callback mode to dump core when reading a
1673 multiple-key sequence (e.g., arrow keys).
1675 c. Fixed a bug that caused the redisplay code to erase some of the line when
1676 using horizontal scrolling with incremental search.
1678 d. Readline's input handler now performs signal processing if read(2) is
1679 interrupted by SIGALRM or SIGVTALRM.
1681 e. Fixed a problem with revert-all-at-newline freeing freed memory.
1683 f. Clarified the documentation for the history_quotes_inhibit_expansion
1684 variable to note that it inhibits scanning for the history comment
1685 character and that it only affects double-quoted strings.
1687 g. Fixed an off-by-one error in the prompt printed when performing searches.
1689 h. Use pselect(2), if available, to wait for input before calling read(2), so
1690 a SIGWINCH can interrupt it, since it doesn't interrupt read(2).
1692 i. Some memory leaks caused by signals interrupting filename completion have
1695 j. Reading EOF twice on a non-empty line causes EOF to be returned, rather
1696 than the partial line. This can cause partial lines to be executed on
1697 SIGHUP, for example.
1699 k. Fixed a bug concerning deleting multibyte characters from the search
1700 string while performing an incremental search.
1702 l. Fixed a bug with tilde expanding directory names in filename completion.
1704 m. Fixed a bug that did not allow binding sequences beginning with a `\'.
1706 n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
1707 contains a multibyte character in the last screen column.
1709 o. Fixed a bug that caused history expansion to disregard characters that are
1710 documented to delimit a history event specifier without requiring `:'.
1712 p. Fixed a bug that could cause reading past the end of a string when reading
1713 the value when binding the set of isearch terminators.
1715 q. Fixed a bug that caused readline commands that depend on knowing which
1716 key invoked them to misbehave when dispatching key sequences that are
1717 prefixes of other key bindings.
1719 r. Paren matching now works in vi insert mode.
1721 3. New Features in Bash
1723 a. There is now a settable configuration #define that will cause the shell
1724 to exit if the shell is running setuid without the -p option and setuid
1725 to the real uid fails.
1727 b. Command and process substitutions now turn off the `-v' option when
1728 executing, as other shells seem to do.
1730 c. The default value for the `checkhash' shell option may now be set at
1731 compile time with a #define.
1733 d. The `mapfile' builtin now has a -d option to use an arbitrary character
1734 as the record delimiter, and a -t option to strip the delimiter as
1737 e. The maximum number of nested recursive calls to `eval' is now settable in
1738 config-top.h; the default is no limit.
1740 f. The `-p' option to declare and similar builtins will display attributes for
1741 named variables even when those variables have not been assigned values
1742 (which are technically unset).
1744 g. The maximum number of nested recursive calls to `source' is now settable
1745 in config-top.h; the default is no limit.
1747 h. All builtin commands recognize the `--help' option and print a usage
1750 i. Bash does not allow function names containing `/' and `=' to be exported.
1752 j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
1754 k. The shell now allows `time ; othercommand' to time null commands.
1756 l. There is a new `--enable-function-import' configuration option to allow
1757 importing shell functions from the environment; import is enabled by
1760 m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
1763 n. GLOBIGNORE, the pattern substitution word expansion, and programmable
1764 completion match filtering now honor the value of the `nocasematch' option.
1766 o. There is a new ${parameter@spec} family of operators to transform the
1767 value of `parameter'.
1769 p. Bash no longer attempts to perform compound assignment if a variable on the
1770 rhs of an assignment statement argument to `declare' has the form of a
1771 compound assignment (e.g., w='(word)' ; declare foo=$w); compound
1772 assignments are accepted if the variable was already declared as an array,
1775 q. The declare builtin no longer displays array variables using the compound
1776 assignment syntax with quotes; that will generate warnings when re-used as
1777 input, and isn't necessary.
1779 r. Executing the rhs of && and || will no longer cause the shell to fork if
1782 s. The `local' builtin takes a new argument: `-', which will cause it to save
1783 the single-letter shell options and restore their previous values at
1786 t. `complete' and `compgen' have a new `-o nosort' option, which forces
1787 readline to not sort the completion matches.
1789 u. Bash now allows waiting for the most recent process substitution, since it
1792 v. The `unset' builtin now unsets a scalar variable if it is subscripted with
1793 a `0', analogous to the ${var[0]} expansion.
1795 w. `set -i' is no longer valid, as in other shells.
1797 x. BASH_SUBSHELL is now updated for process substitution and group commands
1798 in pipelines, and is available with the same value when running any exit
1801 y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
1802 not bash is being run in a GNU Emacs shell window.
1804 z. Bash now treats SIGINT received when running a non-builtin command in a
1805 loop the way it has traditionally treated running a builtin command:
1806 running any trap handler and breaking out of the loop.
1808 aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
1809 cause matching filenames to be ignored when searching for commands.
1811 bb. Aliases whose value ends in a shell metacharacter now expand in a way to
1812 allow them to be `pasted' to the next token, which can potentially change
1813 the meaning of a command (e.g., turning `&' into `&&').
1815 4. New Features in Readline
1817 a. The history truncation code now uses the same error recovery mechansim as
1818 the history writing code, and restores the old version of the history file
1819 on error. The error recovery mechanism handles symlinked history files.
1821 b. There is a new bindable variable, `enable-bracketed-paste', which enables
1822 support for a terminal's bracketed paste mode.
1824 c. The editing mode indicators can now be strings and are user-settable
1825 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
1826 variables). Mode strings can contain invisible character sequences.
1827 Setting mode strings to null strings restores the defaults.
1829 d. Prompt expansion adds the mode string to the last line of a multi-line
1830 prompt (one with embedded newlines).
1832 e. There is a new bindable variable, `colored-completion-prefix', which, if
1833 set, causes the common prefix of a set of possible completions to be
1836 f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
1839 g. The redisplay code underwent several efficiency improvements for multibyte
1842 h. The insert-char function attempts to batch-insert all pending typeahead
1843 that maps to self-insert, as long as it is coming from the terminal.
1845 i. rl_callback_sigcleanup: a new application function that can clean up and
1846 unset any state set by readline's callback mode. Intended to be used
1849 ------------------------------------------------------------------------------
1850 This document details the changes between this version, bash-4.3-release, and
1851 the previous version, bash-4.3-rc2.
1855 a. Only Posix-mode shells should exit on an assignment failure in the
1856 temporary environment preceding a special builtin. This is how it's been
1859 b. Fixed a bug that caused a failed special builtin to not exit a posix-mode
1860 shell if the failing builtin was on the LHS of a && or ||.
1862 c. Changed the handling of unquoted backslashes in regular expressions to be
1865 d. globstar (**) no longer traverses symbolic links that resolve to
1866 directories. This eliminates some duplicate entries.
1868 e. Fixed a bug that caused a SIGCHLD trap handler to not be able to change the
1869 SIGCHLD disposition.
1871 f. Fixed a bug that caused a crash when -x was enabled and a command
1872 contained a printable multibyte (wide) character.
1874 g. Fixed a bug that caused an interactive shell without line editing enabled
1875 to read invalid data after receiving a SIGINT.
1877 h. Fixed a bug that caused command word completion to fail if the directory in
1878 $PATH where the completion would be found contained single or double quotes.
1880 i. Fixed a bug that caused a shell with -v enabled to print commands in $()
1883 2. Changes to Readline
1885 a. Fixed a bug that caused `undo' to reference freed memory or null pointers.
1887 3. New Features in Bash
1889 a. The [[ -v ]] option now understands array references (foo[1]) and returns
1890 success if the referenced element has a value.
1892 ------------------------------------------------------------------------------
1893 This document details the changes between this version, bash-4.3-rc2, and the
1894 previous version, bash-4.3-rc1.
1898 a. Fixed a bug that left variables set by printf -v marked as invisible.
1900 b. Fixed an off-by-one error in a job control warning message.
1902 c. Fixed a bug that caused the shell to crash after declaring a nameref variable
1905 d. Fixed a bug that caused asynchronous commands to not set $? correctly.
1907 e. Fixed a bug that caused out-of-order execution when executing aliases with
1908 embedded newlines containing `.' commands.
1910 f. Fixed a bug that caused error messages generated by expansion errors in
1911 `for' commands to have the wrong line number.
1913 g. Fixed a bug that caused the `wait' builtin to not be interruptible in an
1914 interactive shell with job control enabled.
1916 h. Fixed a bug that caused SIGINT and SIGQUIT to not be trappable in
1917 asynchronous subshell commands.
1919 i. Bash now requires that the value assigned to a nameref variable be a valid
1920 shell identifier (variable name or array reference).
1922 j. Converting an existing variable to a nameref variable now turns off the
1923 -i/-l/-u/-c attributes.
1925 k. Displaying a nameref variable with `declare -p' now displays the nameref
1926 variable and its value rather than following the nameref chain.
1928 l. Fixed a problem with interrupt handling that caused a second and subsequent
1929 SIGINT to be ignored by interactive shells.
1931 m. Fixed a bug that caused certain positional parameter and array expansions
1932 to mishandle (discard) null positional parameters and array elements.
1934 n. The shell no longer blocks receipt of signals while running trap handlers
1935 for those signals, and allows most trap handlers to be run recursively
1936 (running trap handlers while a trap handler is executing).
1938 o. The shell now handles backslashes in regular expression arguments to the
1939 [[ command's =~ operator slightly differently, resulting in more
1940 consistent behavior.
1942 2. Changes to Readline
1944 a. Fixed a bug that could cause readline to crash and seg fault attempting to
1945 expand an empty history entry.
1947 b. Fixed a bug that caused a bad entry in the $LS_COLORS variable to abort all
1948 color processing but leave color enabled.
1950 c. Fixed a bug that caused display problems with multi-line prompts containing
1951 invisible characters on multiple lines.
1953 d. Fixed a bug that caused effects made by undoing changes to a history line to
1956 3. New Features in Bash
1958 4. New Features in Readline
1960 a. When creating shared libraries on Mac OS X, the pathname written into the
1961 library (install_name) no longer includes the minor version number.
1962 ------------------------------------------------------------------------------
1963 This document details the changes between this version, bash-4.3-rc1, and the
1964 previous version, bash-4.3-beta2.
1968 a. Fixed a bug in bash completion that caused a tilde to be expanded even if
1969 the `direxpand' option was not enabled.
1971 b. Fixed a potential bug that could cause corrupted input in interactive shells
1972 running without line editing and with `ignoreeof' enabled.
1974 c. Fixed a bug that could cause failures when opening pipes back to shells
1975 created to run process substitutions.
1977 d. Fixed a bug that caused an assignment to TEXTDOMAIN to require TEXTDOMAINDIR
1978 to be set in order to actually change the current text domain.
1980 e. Changed the way redirections are printed to avoid confusion when the target
1981 of an output redirection is a process substitution beginning with `>'.
1983 2. Changes to Readline
1985 a. Shared library building is now supported on Mac OS X 10.9 (Darwin 13).
1987 3. New Features in Bash
1989 a. `cd' has a new `-@' option to browse a file's extended attributes on
1990 systems that support O_XATTR.
1992 4. New Features in Readline
1994 a. There are additional default key bindings for MinGW32
1996 ------------------------------------------------------------------------------
1997 This document details the changes between this version, bash-4.3-beta2, and the
1998 previous version, bash-4.3-beta.
2002 a. Fixed a bug that caused assignment to an unset variable using a negative
2003 subscript to result in a segmentation fault.
2005 b. Fixed a bug that caused assignment to a string variable using a negative
2006 subscript to use the incorrect index.
2008 c. Fixed a bug that caused some strings to be interpreted as invalid
2009 extended globbing expressions when used with the help builtin.
2011 d. Fixed a bug that caused an attempt to trap a signal whose disposition
2012 cannot be changed to reference uninitialized memory.
2014 e. Command completion now skips assignment statements preceding a command
2015 name and completes the command.
2017 f. Fixed a bug that caused `compgen -f' in a non-interactive shell to dump
2018 core under certain circumstances.
2020 g. Fixed a bug that caused the `read -N' to misbehave when the input stream
2023 2. Changes to Readline
2025 a. Changed message when an incremental search fails to include "failed" in
2026 the prompt and display the entire search string instead of just the last
2029 b. Fixed a bug that caused an arrow key typed to an incremental search prompt
2030 to process the key sequence incorrectly.
2032 c. Additional key bindings for arrow keys on MinGW.
2034 3. New Features in Bash
2036 a. The help builtin now attempts substring matching (as it did through
2037 bash-4.2) if exact string matching fails.
2039 b. The fc builtin now interprets -0 as the current command line.
2041 c. Completing directory names containing shell variables now adds a trailing
2042 slash if the expanded result is a directory.
2044 4. New Features in Readline
2046 a. rl_change_environment: new application-settable variable that controls
2047 whether or not Readline modifies the environment (currently readline
2048 modifies only LINES and COLUMNS).
2050 ------------------------------------------------------------------------------
2051 This document details the changes between this version, bash-4.3-beta, and the
2052 previous version, bash-4.3-alpha.
2056 a. Fixed a bug in the prompt directory name "trimming" code that caused
2057 memory corruption and garbled the results.
2059 b. Fixed a bug that caused single quotes that resulted from $'...' quoting
2060 in the replacement portion of a double-quoted ${word/pat/rep} expansion
2061 to be treated as quote characters.
2063 c. Fixed a bug that caused assignment statements preceding a command word to
2064 result in assignment statements following a declaration command to not be
2065 expanded like assignment statements.
2067 d. Fixed a bug with variable search order in the presence of local variables
2068 with the same name as variables in the temporary environment supplied to
2071 e. Fixed a bug that caused constructs like 1<(2) to be interpreted as process
2072 substitutions even in an arithmetic context.
2074 f. Fixed several cases where `invisible' variables (variables with attributes
2075 but no values, which are technically unset) were treated incorrectly.
2077 g. Fixed a bug that caused group commands in pipelines that were not the
2078 last element to not run the EXIT trap.
2080 h. Fixed a bug that caused `unset -n' to not unset a nameref variable in
2083 i. Fixed the nameref circular reference checking to be less strict and only
2084 disallow a nameref variable with the same value as its name at the global
2087 j. Fixed a bug that caused trap handlers to be executed recursively,
2088 corrupting internal data structures.
2090 k. Fixed a bug that could result in bash not compiling if certain options were
2093 l. Fixed a bug that caused the arithmetic expansion code to attempt variable
2094 assignments when operator precedence prohibited them.
2096 m. Word expansions like ${foo##bar} now understand indirect variable references.
2098 n. Fixed a bug that caused `declare -fp name' to not display a function
2101 o. Fixed a bug that caused asynchronous child processes to modify the stdin
2102 file pointer when bash was using it to read a script, which modified the
2103 parent's value as well.
2105 2. Changes to Readline
2107 a. Fixed a bug in vi mode that caused the arrow keys to set the saved last
2108 vi-mode command to the wrong value.
2110 b. Fixed a bug that caused double-quoted strings to be scanned incorrectly
2111 when being used as the value of a readline variable assignment.
2113 c. Fixed a bug with vi mode that prevented `.' from repeating a command
2114 entered on a previous line (command).
2116 d. Fixed a bug that could cause completion to core dump if it was interrupted
2119 e. Readline now sends the meta-key enable string to the terminal if the
2120 terminal has been successfully initialized.
2122 f. Readline now calls the signal hook after resizing the terminal when it
2123 receives a SIGWINCH.
2125 g. Fixed a bug that could cause the history list code to perform an out-of-
2126 bounds array reference if the history list is empty.
2128 3. New Features in Bash
2130 a. Shells started to run process substitutions now run any trap set on EXIT.
2132 b. There is now a configure-time option to enable the globasciiranges option
2135 c. The read builtin now checks its first variable argument for validity before
2136 trying to read any input.
2138 ------------------------------------------------------------------------------
2139 This document details the changes between this version, bash-4.3-alpha,
2140 and the previous version, bash-4.2-release.
2144 a. Fixed several bugs concerning incomplete bracket expressions in filename
2145 generation (globbing) patterns.
2147 b. Fixed a bug with single quotes and WORD in ${param op WORD} when running
2150 c. Fixed a bug that caused the pattern removal and pattern substitution word
2151 expansions and case statement word expansion to not match the empty string.
2153 d. Fixed a bug that caused the tzset() function to not work after changing
2154 the TZ enviroment variable.
2156 e. Fixed a bug that caused the RHS of an assignment statement to undergo
2157 word splitting when it contained an unquoted $@.
2159 f. Fixed bugs that caused the shell to not react to a SIGINT sent while
2160 waiting for a child process to exit.
2162 g. Bash doesn't try to run things in a signal handler context when it gets a
2163 signal (SIGINT/SIGHUP/etc) while reading input using readline but still
2164 be responsive to terminating signals.
2166 h. Fixed a bug that caused bash to go into an infinite loop if a filename
2167 to be matched contained an invalid multibyte character.
2169 i. Fixed a bug that caused PS4 to end up being truncated if it is longer
2172 j. Fixed a bug that caused brace expansion to not skip over double-quoted
2173 command substitution.
2175 k. System-specific updates for: DJGPP, HP/UX, Mac OS X
2177 l. Fixed a bug in displaying commands that caused redirections to be associated
2178 with the wrong part of the command.
2180 m. Fixed the coproc cleanup to unset the appropriate shell variables when a
2183 n. Fixed a bug that caused `fc' to dump core due to incorrect calculation of
2184 the last history entry.
2186 o. Added workarounds for FreeBSD's implementation of faccessat/eaccess and
2189 p. Fixed a bug that caused the shell to not match patterns containing
2192 q. Fixed a bug that could result in doubled error messages when the `printf'
2193 builtin got a write error.
2195 r. Fixed a bug that caused the shell to not correctly expand words containing
2196 multiple consecutive quoted empty strings (""""""aa).
2198 s. Fixed a bug that caused the shell to not correctly parse multi-line
2199 process substitutions containing comments and quoted strings.
2201 t. Fixed a problem with the bash malloc's internal idea of the top of the
2202 memory heap that resulted in incorrect decisions to try to reduce the
2203 break and give memory back to the kernel.
2205 u. There are changes to the expansions peformed on compound array assignments,
2206 in an effort to make foo=( [ind1]=bar [ind2]=baz ) identical to
2207 foo[ind1]=bar foo[ind2]=baz.
2209 v. Bash now reports an error if `read -a name' is used when `name' is an
2210 existing associative array.
2212 w. Fixed a bug that allowed an attempted assignment to a readonly variable
2213 in an arithmetic expression to not return failure.
2215 x. Fixed several bugs that caused completion functions to be invoked even when
2216 the cursor was before the first word in the command.
2218 y. Fixed a bug that caused parsing a command substitution to overwrite the
2219 parsing state associated with the complete input line.
2221 z. Fixed several bugs with the built-in snprintf replacement and field widths
2224 aa. Fixed a bug that caused incorrect offset calculations and input buffer
2225 corruption when reading files longer than 2^31 bytes.
2227 bb. Fixed several bugs where bash performed arithmetic evaluation in contexts
2228 where evaluation is suppressed.
2230 cc. Fixed a bug that caused bash to close FIFOs used for process substitution
2231 too early when a shell function was executing, but protect against using
2232 all file descriptors when the shell functions are invoked inside loops.
2234 dd. Added checks for printable (and non-printable) multibyte characters for
2235 use in error messages.
2237 ee. Fixed a bug that caused ^O (operate-and-get-next) to not work correctly
2238 at the end of the history list.
2240 ff. Fixed a bug that caused command-oriented history to incorrectly combine
2241 here documents into one line.
2243 gg. Fixed a bug that caused importing SHELLOPTS from the environment into a
2244 Posix-mode shell to print an error message and refuse to parse it.
2246 hh. Fixed a bug that caused the shell to delete an extra history entry when
2249 ii. Fixed a bug that caused floating-point exceptions and overflow errors
2250 for the / and % arithmetic operators when using INTMAX_MIN and -1.
2252 jj. Fixed a bug that caused parsing errors when reading an arithmetic for
2253 loop inside a command substitution.
2255 kk. Fixed a bug that caused a readonly function to be unset when unset was
2256 called without the -f or -v option.
2258 ll. Fixed several bugs in the code that quotes characters special to regular
2259 expressions when used in a quoted string on the RHS of the =~ operator
2262 mm. Fixed a bug that caused redirections to fail because the file descriptor
2263 limit was set to a value less than 10.
2265 nn. Fixed a bug that caused the `read' builtin to execute code in a signal
2266 handler context if read timed out.
2268 oo. Fixed a bug that caused extended globbing patterns to not match files
2269 beginning with `.' correctly when a `.' was explicitly supplied in the
2272 pp. Fixed a bug that caused key sequences longer than two characters to not
2273 work when used with `bind -x'.
2275 qq. Fixed a bug that resulted in redefined functions having the wrong source
2276 file names in BASH_SOURCE.
2278 rr. Fixed a bug that caused the read builtin to assign null strings to variables
2279 when using `read -N', which caused core dumps when referenced
2281 ss. Fixed a bug that caused `bash -m script' to not enable job control while
2284 tt. Fixed a bug that caused `printf -v var' to dump core when used with the
2287 uu. Fixed a bug that caused the shell to exit with the wrong status if -e was
2288 active and the shell exited on a substitution error.
2290 vv. Fixed a bug that caused the shell to seg fault if an array variable with
2291 the same name as an existing associative array was implicitly created by
2292 an assignment (declare a[n]=b).
2294 ww. Fixed a bug that caused a redirection to misbehave if the number specified
2295 for a file descriptor overflows an intmax_t.
2297 xx. Fixed several bugs with the handling of valid and invalid unicode character
2298 values when used with the \u and \U escape sequences to printf and $'...'.
2300 yy. Fixed a bug that caused tildes to not be escaped in expanded filenames,
2301 making them subject to later expansion.
2303 zz. When using the pattern substitution word expansion, bash now runs the
2304 replacement string through quote removal, since it allows quotes in that
2305 string to act as escape characters. This is not backwards compatible, so
2306 it can be disabled by setting the bash compatibility mode to 4.2.
2308 aaa. Fixed the rest of the cases where the shell runs non-allowed code in a
2309 signal handler context.
2311 bbb. Fixed a bug that caused spurious DEL characters (\177) to appear in
2312 double-quoted expansion where the RHS is evaluated to the empty string.
2314 ccc. Fixed a bug that caused the use of the shell's internal random number
2315 generator for temporary file names to perturb the random number
2318 ddd. Fixed several bugs that caused `declare -g' to not set the right global
2319 variables or to misbehave when declaring global indexed arrays.
2321 eee. Fixed a logic bug that caused extended globbing in a multibyte locale to
2322 cause failures when using the pattern substititution word expansions.
2324 fff. Fixed a bug that caused the `lastpipe' option to corrupt the file
2325 descriptor used to read the script.
2327 ggg. Fixed a bug that causes the shell to delete DEL characters in the
2328 expanded value of variables used in the same quoted string as variables
2329 that expand to nothing.
2331 hhh. Fixed a bug that caused the shell to assign the wrong value from an
2332 assignment like (( x=7 )) when `x' was an existing array variable.
2334 iii. Fixed a bug that caused the shell to misbehave when generating sequences
2335 and the boundary values overflow an intmax_t.
2337 jjj. Fixed a bug caused expansion errors if an expansion of "$@" appeared
2338 next to another expansion (e.g.. "${@}${x}").
2340 kkk. Fixed a potential buffer overflow bug when performing /dev/fd expansion.
2342 lll. Fixed a bug that resulted in an extra semicolon being added to compound
2343 assignments when they were added to the history list.
2345 mmm. Fixed a bug that caused mapfile to read one extra line from the input.
2347 nnn. Fixed a bug that caused the mail checking code to use uninitialized
2350 ooo. Fixed a bug that prevented history timestamps from being saved if the
2351 history comment character is unset.
2353 ppp. Fixed a bug that caused the case-modifying expansions to not work with
2354 multibyte characters.
2356 qqq. Fixed a bug that caused the edit-and-execute bindable readline command
2357 to see the wrong data if invoked in the middle of a multi-line quoted
2360 rrr. Fixed a bug that resulted in the shell returning the wrong exit status
2361 for a background command on systems that recycle PIDs very quickly.
2363 sss. Fixed a bug that caused asynchronous group commands to not run any EXIT
2364 trap defined in the body of the command.
2366 ttt. Fixed a bug that caused `eval "... ; return"' to not clean up properly.
2368 uuu. Fixed a bug that caused the shell to dump core if `read' reads an escaped
2369 IFS whitespace character.
2371 vvv. Fixed a bug that caused BASH_COMMAND to be set to an incorrect value when
2372 executing a (...) subshell.
2374 www. Fixed a couple of pointer aliasing bugs with the token string in arithmetic
2377 xxx. Fixed a bug with parsing multi-line command substitutions when reading
2378 the `do' keyword followed by whitespace.
2380 yyy. Fixed a bug that caused the shell to seg fault if the time given to the
2381 printf %(...)T format overflowed the value accepted by localtime(3).
2383 zzz. Fixed a problem with displaying help topics in two columns when the
2384 translated text contained multibyte characters.
2386 aaaa. Fixed a bug with the extended globbing pattern matcher where a `*' was
2387 followed by a negated extended glob pattern.
2389 bbbb. Fixed a race condition with short-lived coproc creation and reaping that
2390 caused the child process to be reaped before the various coproc shell
2391 variables were initialized.
2393 cccc. Fixed a bug where turning off `errexit' in command substitution subshells
2394 was not reflected in $SHELLOPTS.
2396 dddd. Partially fixed an inconsistency in how the shell treated shell
2397 functions run from an EXIT trap.
2399 eeee. Fixed a bug in how the shell invalidated FIFOs used for process
2400 substitution when executing a pipeline (once rather than in every child).
2402 ffff. Fixed a bug that occurred when expanding a special variable ($@, $*)
2403 within double quotes and the expansion resulted in an empty string.
2405 gggg. Fixed bugs with executing a SIGCHLD trap handler to make sure that it's
2406 executed once per exited child.
2408 hhhh. Fixed a bug that caused `declare' and `test' to find variables that
2409 had been given attributes but not assigned values. Such variables are
2412 iiii. Fixed a bug that caused commands in process substitutions to not look in
2413 the local temporary environment when performing word expansions.
2415 jjjj. Fixed several problems with globstar expansions (**/**) returning null
2416 filenames and multiple instances of the same pathname.
2418 kkkk. Fixed an oversight that did not allow the exit status of `coproc' to
2419 be inverted using `!'.
2421 llll. Fixed a bug that caused the -e option to be re-enabled using `set -e'
2422 even when executing in a context where -e is ignored.
2424 mmmm. Fixed a (mostly theoretical) bug with input lines longer than SIZE_MAX.
2426 nnnn. Fixed a bug that could result in double evaluation of command
2427 substitutions when they appear in failed redirections.
2429 oooo. Fixed a bug that could cause seg faults during `mapfile' callbacks if
2430 the callback unsets the array variable mapfile is using.
2432 pppp. Fixed several problems with variable assignments using ${var:=value}
2433 when the variable assignment is supposed to have side effects.
2435 qqqq. Fixed a bug that caused a failure of an assignment statement preceding a
2436 builtin caused the next invocation of a special builtin to exit the shell.
2438 rrrr. Fixed several problems with IFS when it appears in the temporary environment
2439 and is used in redirections.
2441 ssss. Fixed a problem that caused IFS changes using ${IFS:=value} to modify
2442 how preceding expansions were split.
2444 tttt. Fixed a problem that caused subshells to not run an EXIT trap they set.
2446 uuuu. Fixed a problem that caused shells started in posix mode to attempt to
2447 import shell functions with invalid names from the environment. We now
2450 vvvv. Worked around a kernel problem that caused SIGCHLD to interrupt open(2)
2451 on a FIFO used for process substitution, even if the SIGCHLD handler was
2452 installed with the SA_RESTART flag.
2454 wwww. Fixed a problem that resulted in inconsistent expansion of $* and ${a[*]}.
2456 xxxx. Fixed a problem that caused `read -t' to crash when interrupted by
2459 yyyy. Fixed a problem that caused pattern removal to fail randomly because the
2460 pattern matcher read beyond the end of a string.
2462 zzzz. Fixed a bug that caused core dumps when shell functions tried to create
2463 local shadow copies of special variables like GROUPS.
2465 aaaaa. Fixed a bug that caused SIGTERM to be occasionally lost by children of
2466 interactive shells when it arrived before the child process reset the
2467 handler from SIG_DFL.
2469 bbbbb. Fixed a bug that caused redirections like <&n- to leave file descriptor
2470 n closed if executed with a builtin command.
2472 ccccc. Fixed a bug that caused incorrect completion quoting when completing a
2473 word containing a globbing character with `show-all-if-ambiguous' set.
2475 ddddd. Fixed a bug that caused printf's %q format specifier not to quote a
2476 tilde even if it appeared in a location where it would be subject to
2479 2. Changes to Readline
2481 a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode
2482 commands to work on the entire line.
2484 b. Fixed a bug that caused redisplay problems with prompts longer than 128
2485 characters and history searches.
2487 c. Fixed a bug that caused readline to try and run code to modify its idea
2488 of the screen size in a signal handler context upon receiving a SIGWINCH.
2490 d. Fixed a bug that caused the `meta' key to be enabled beyond the duration
2491 of an individual call top readline().
2493 e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's
2494 redisplay to mishandle zero-width combining characters.
2496 f. Fixed a bug that caused readline to `forget' part of a key sequence when
2497 a multiple-key sequence caused it to break out of an incremental search.
2499 g. Fixed bugs that caused readline to execute code in a signal handler
2500 context if interrupted while reading from the file system during completion.
2502 h. Fixed a bug that caused readline to `forget' part of a key sequence when
2503 reading an unbound multi-character key sequence.
2505 i. Fixed a bug that caused Readline's signal handlers to be installed beyond
2506 the bounds of a single call to readline().
2508 j. Fixed a bug that caused the `.' command to not redo the most recent `R'
2511 k. Fixed a bug that caused ignoring case in completion matches to result in
2512 readline using the wrong match.
2514 l. Paren matching now works in vi insert mode.
2516 m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix
2519 n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone
2522 o. Fixed a bug that caused the filename comparison code to not compare
2523 multibyte characters correctly when using case-sensitive or case-mapping
2526 p. Fixed the input reading loop to call the input hook function only when there
2527 is no terminal input available.
2529 q. Fixed a bug that caused binding a macro to a multi-character key sequence
2530 where the sequence and macro value share a common prefix to not perform
2531 the macro replacement.
2533 r. Fixed several redisplay errors with multibyte characters and prompts
2534 containing invisible characters when using horizontal scrolling.
2536 s. Fixed a bug that caused redisplay errors when trying to overwrite
2537 existing characters using multibyte characters.
2539 3. New Features in Bash
2541 a. The `helptopic' completion action now maps to all the help topics, not just
2544 b. The `help' builtin no longer does prefix substring matching, so `help read'
2545 does not match `readonly'.
2547 c. The shell can be compiled to not display a message about processes that
2548 terminate due to SIGTERM.
2550 d. Non-interactive shells now react to the setting of checkwinsize and set
2551 LINES and COLUMNS after a foreground job exits.
2553 e. There is a new shell option, `globasciiranges', which, when set to on,
2554 forces globbing range comparisons to use character ordering as if they
2555 were run in the C locale.
2557 f. There is a new shell option, `direxpand', which makes filename completion
2558 expand variables in directory names in the way bash-4.1 did.
2560 g. In Posix mode, the `command' builtin does not change whether or not a
2561 builtin it shadows is treated as an assignment builtin.
2563 h. The `return' and `exit' builtins accept negative exit status arguments.
2565 i. The word completion code checks whether or not a filename containing a
2566 shell variable expands to a directory name and appends `/' to the word
2567 as appropriate. The same code expands shell variables in command names
2568 when performing command completion.
2570 j. In Posix mode, it is now an error to attempt to define a shell function
2571 with the same name as a Posix special builtin.
2573 k. When compiled for strict Posix conformance, history expansion is disabled
2576 l. The history expansion character (!) does not cause history expansion when
2577 followed by the closing quote in a double-quoted string.
2579 m. `complete' and its siblings compgen/compopt now takes a new `-o noquote'
2580 option to inhibit quoting of the completions.
2582 n. Setting HISTSIZE to a value less than zero causes the history list to be
2583 unlimited (setting it 0 zero disables the history list).
2585 o. Setting HISTFILESIZE to a value less than zero causes the history file size
2586 to be unlimited (setting it to 0 causes the history file to be truncated
2589 p. The `read' builtin now skips NUL bytes in the input.
2591 q. There is a new `bind -X' option to print all key sequences bound to Unix
2594 r. When in Posix mode, `read' is interruptible by a trapped signal. After
2595 running the trap handler, read returns 128+signal and throws away any
2596 partially-read input.
2598 s. The command completion code skips whitespace and assignment statements
2599 before looking for the command name word to be completed.
2601 t. The build process has a new mechanism for constructing separate help files
2602 that better reflects the current set of compilation options.
2604 u. The -nt and -ot options to test now work with files with nanosecond
2605 timestamp resolution.
2607 v. The shell saves the command history in any shell for which history is
2608 enabled and HISTFILE is set, not just interactive shells.
2610 w. The shell has `nameref' variables and new -n(/+n) options to declare and
2611 unset to use them, and a `test -R' option to test for them.
2613 x. The shell now allows assigning, referencing, and unsetting elements of
2614 indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which
2615 count back from the last element of the array.
2617 y. The {x}<word redirection feature now allows words like {array[ind]} and
2618 can use variables with special meanings to the shell (e.g., BASH_XTRACEFD).
2620 z. There is a new CHILD_MAX special shell variable; its value controls the
2621 number of exited child statuses the shell remembers.
2623 aa. There is a new configuration option (--enable-direxpand-default) that
2624 causes the `direxpand' shell option to be enabled by default.
2626 bb. Bash does not do anything special to ensure that the file descriptor
2627 assigned to X in {x}<foo remains open after the block containing it
2630 cc. The `wait' builtin has a new `-n' option to wait for the next child to
2633 dd. The `printf' %(...)T format specifier now uses the current time if no
2634 argument is supplied.
2636 ee. There is a new variable, BASH_COMPAT, that controls the current shell
2637 compatibility level.
2639 ff. The `popd' builtin now treats additional arguments as errors.
2641 gg. The brace expansion code now treats a failed sequence expansion as a
2642 simple string and will continue to expand brace terms in the remainder
2645 4. New Features in Readline
2647 a. Readline is now more responsive to SIGHUP and other fatal signals when
2648 reading input from the terminal or performing word completion but no
2649 longer attempts to run any not-allowable functions from a signal handler
2652 b. There are new bindable commands to search the history for the string of
2653 characters between the beginning of the line and the point
2654 (history-substring-search-forward, history-substring-search-backward)
2656 c. Readline allows quoted strings as the values of variables when setting
2657 them with `set'. As a side effect, trailing spaces and tabs are ignored
2658 when setting a string variable's value.
2660 d. The history library creates a backup of the history file when writing it
2661 and restores the backup on a write error.
2663 e. New application-settable variable: rl_filename_stat_hook: a function called
2664 with a filename before using it in a call to stat(2). Bash uses it to
2665 expand shell variables so things like $HOME/Downloads have a slash
2668 f. New bindable function `print-last-kbd-macro', prints the most-recently-
2669 defined keyboard macro in a reusable format.
2671 g. New user-settable variable `colored-stats', enables use of colored text
2672 to denote file types when displaying possible completions (colored analog
2675 h. New user-settable variable `keyseq-timout', acts as an inter-character
2676 timeout when reading input or incremental search strings.
2678 i. New application-callable function: rl_clear_history. Clears the history list
2679 and frees all readline-associated private data.
2681 j. New user-settable variable, show-mode-in-prompt, adds a characters to the
2682 beginning of the prompt indicating the current editing mode.
2684 k. New application-settable variable: rl_input_available_hook; function to be
2685 called when readline needs to check whether there is data available on its
2686 input source. The default hook checks rl_instream.
2688 l. Readline calls an application-set event hook (rl_signal_event_hook) after
2689 it gets a signal while reading input (read returns -1/EINTR but readline
2690 does not handle the signal immediately) to allow the application to handle
2691 or otherwise note it. Not currently called for SIGHUP or SIGTERM.
2693 m. If the user-settable variable `history-size' is set to a value less than
2694 0, the history list size is unlimited.
2696 ------------------------------------------------------------------------------
2697 This document details the changes between this version, bash-4.2-release,
2698 and the previous version, bash-4.2-rc2.
2702 a. Fixed a bug that caused some variables to be clobbered by a longjmp,
2703 resulting in stack corruption.
2705 ------------------------------------------------------------------------------
2706 This document details the changes between this version, bash-4.2-rc2,
2707 and the previous version, bash-4.2-rc1.
2711 a. Changes to bash_directory_completion_hook so that it's assigned to the
2712 readline rl_directory_rewrite_hook variable, which modifies the directory
2713 name passed to opendir without modifying the directory name the user
2716 b. Fixed bug in select builtin that caused it to not terminate correctly if
2717 the read timed out due to $TMOUT.
2719 c. Fixed a problem that resulted in non-repeatable sequences of random
2720 numbers when RANDOM=0.
2722 ------------------------------------------------------------------------------
2723 This document details the changes between this version, bash-4.2-rc1,
2724 and the previous version, bash-4.2-beta.
2728 a. Fixed a bug that caused some redirection errors to leak file descriptors.
2730 b. Fixed a bug that caused unary `+' and `-' arithmetic operators to have a
2731 higher precedence than unary `!' and `~'.
2733 c. Fixed a bug that caused simple commands in a pipeline to affect the exit
2734 status ($?) seen by subsequent pipeline commands.
2736 d. A number of cygwin-specific changes to avoid the use of text-mode files
2737 and file access, and to make sure that \r is handled correctly.
2739 e. Fixed a bug that caused the read builtin to not return failure if an
2740 attempt is made to assign to a readonly variable.
2742 f. Fixed a bug that caused some builtin usage messages to not be translated.
2744 g. Fixed a bug that caused the getopts builtin to not return failure if an
2745 attempt is made to assign to a readonly variable. Now it returns 2.
2747 h. Fixed the cd and pwd builtins to return failure if PWD is readonly and
2748 cannot be assigned to.
2750 i. Added code to check the return value of access(2) on Solaris systems,
2751 since it returns success for executable tests (e.g., `test -x') when
2752 run by root, even if the file permissions don't allow execution.
2754 2. Changes to Readline
2756 a. Fixed a bug that caused directory names in words to be completed to not
2757 be dequoted correctly.
2759 3. New Features in Bash
2761 4. New Features in Readline
2763 ------------------------------------------------------------------------------
2764 This document details the changes between this version, bash-4.2-beta,
2765 and the previous version, bash-4.2-alpha.
2769 a. Fixed a bug that caused the \W prompt string escape to not add a closing
2772 b. Fixed a bug that caused partially-quoted words that were not subject to
2773 word splitting to retained quoted NULLs.
2775 c. Added considerable efficiency speedups when pattern matching in multibyte
2776 locales by skipping multibyte character functions where possible.
2778 d. Added considerable speedups to variable expansion when in multibyte locales.
2780 e. Fixed a bug that caused the expansion of $* when there are no positional
2781 parameters to cause the shell to dump core when used in a pattern
2784 f. Fixed a bug that caused variable expansions preceding regular builtins to
2785 not change the shell environment during their execution.
2787 2. Changes to Readline
2789 a. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave
2790 as if it were a negative argument.
2792 ------------------------------------------------------------------------------
2793 This document details the changes between this version, bash-4.2-alpha,
2794 and the previous version, bash-4.1-release.
2798 a. Fixed a bug in the parser when processing alias expansions containing
2801 b. Fixed a memory leak in associative array expansion.
2803 c. Fixed a bug that caused quoted here-strings to be requoted when printed.
2805 d. Fixed a bug in arithmetic expansion that caused the index in an array
2806 expansion to be evaluated twice under certain circumstances.
2808 e. Fixed several bugs with the expansion and display of variables that have
2809 been given attributes but not values and are technically unset.
2811 f. Fixed a bug that caused core dumps when using filename completion that
2812 expands to a filename containing a globbing character.
2814 g. Fixed a bug that caused assignment statements preceding a special builtin
2815 when running in Posix mode to not persist after the builtin completed
2816 when the special builtin was executed in a shell function without any
2819 h. Fixed a bug that caused a command to remain in the hash table even after
2820 `hash command' did not find anything if there was already an existing
2823 i. Fixed several bugs caused by executing unsafe functions from a signal
2824 handler in the cases where a signal handler is executed immediately
2825 rather than setting a flag for later execution.
2827 j. Fixed a bug that caused some internal flag variables to be set
2828 incorrectly if `read -t' timed out.
2830 k. Fixed a Posix compatibility issue by making sure that a backslash escaping
2831 a `}' within a double-quoted ${...} parameter expansion is removed as part
2832 of the parameter expansion.
2834 l. Fixed a bug that caused execution of a trap to overwrite PIPESTATUS.
2836 m. Fixed a bug that caused here documents to not be displayed correctly
2837 when attached to commands inside compound commands.
2839 n. Fixed a bug that caused the printf builtin to use the wrong precision
2840 when using the `*' modifier.
2842 o. Fixed a bug that caused an arriving SIGCHLD to interrupt output functions
2843 like those invoked by echo or printf.
2845 p. Changed to use a more robust mechanism than eaccess(2) when test is
2846 checking filenames for execution permission.
2848 q. Fixed a bug that caused spurious semicolons to be added into the command
2849 history in certain cases.
2851 r. Fixed a bug that caused the shell to free non-allocated memory when
2852 unsetting element 0 of an associative array after it was assigned
2855 s. Fixed a bug that could cause the shell to dump core if using the `v'
2856 vi editing command on a multi-line command.
2858 t. Fixed a bug that left FIFOs opened by process substitutions open long
2859 enough to potentially cause file descriptor exhaustion when running a
2860 shell function or shell builtin.
2862 u. Fixed a bug that caused the history expansion functions to not recognize
2863 process substitution or extended glob patterns as single words.
2865 v. Fixed a bug that caused restricted shells to set a restricted command's
2866 exit status incorrectly.
2868 w. Fixed a bug that caused bash to ignore the wrong set of filenames when
2869 completing a command using the `complete-filename' readline command.
2871 x. Fixed a bug that caused a -PID argument following a -s sig or -n sig to
2872 not be interpreted as a signal specification.
2874 y. Changed posix-mode behavior of a parse error in a `.' script or `eval'
2875 command to exit the shell under Posix-specified conditions. Previous
2876 versions printed a warning.
2878 z. Fixed a bug in \W prompt expansion that resulted in incorrect expansion
2879 in the event of overlapping strings.
2881 aa. Fixed a bug that caused the := parameter expansion operator to return the
2882 wrong value as the result of the expansion.
2884 bb. When in Posix mode, a single quote is not treated specially in a
2885 double-quoted ${...} expansion, unless the expansion operator is
2886 # or % or the non-Posix `//', `^', and `,'. In particular, it does
2887 not define a new quoting context. This is from Posix interpretation 221.
2889 cc. Fixed a bug that inadvertently allowed program names containing slashes
2890 to be entered into the command hash table.
2892 dd. Fixed a bug that caused the select builtin to incorrectly compute the
2893 display width of the arguments in the presence of multibyte characters.
2895 ee. Fixed a bug that caused bash to not change the xtrace file descriptor if
2896 BASH_XTRACEFD was found in the shell environment at startup.
2898 ff. Fixed a memory leak in the pattern removal parameter expansion.
2900 gg. Fixed a bug that caused SIGINT to fail to interrupt a nested loop if the
2901 loop was in a pipeline.
2903 hh. Fixed a problem in $(...) parsing that caused the parser to add an extra
2904 space to a here-document delimiter if the first word contained a `/'.
2906 ii. Fixed a bug that caused functions defined with the `function' reserved
2907 word to require braces around the function body.
2909 jj. Fixed a bug that caused bash to dump core when a variable expansion being
2910 used as an array subscript failed.
2912 kk. Fixed a bug that caused bash to dump core if the case-modification
2913 expansions were used on a variable with a null value.
2915 ll. Fixed a bug that caused partially-quoted strings to be split incorrectly
2916 if a variable with a null value was expanded within double quotes.
2918 mm. The pattern substitution word expansion has been sped up dramatically
2919 when running in a locale with multibyte characters.
2921 nn. Fixed a bug that caused history -a to not write the correct lines to
2922 the history file if all the new lines in the history list were added
2923 since the last time the history file was read or written.
2925 oo. Fixed a bug that caused completion of a word with an unclosed `` command
2926 substitution to set the prompt incorrectly.
2928 pp. Fixed a bug that caused extended globbing patterns in $HISTIGNORE or
2929 $GLOBIGNORE to be incorrectly scanned.
2931 qq. Fixed a bug caused by closing file descriptors 3-20 on shell startup. The
2932 shell now sets them to close-on-exec.
2934 rr. Fixed a bug that caused the exit status of `exec file' to be set incorrectly
2935 if `file' was a directory.
2937 ss. Fixed a bug in the `.' builtin to make a non-interactive posix-mode shell
2938 exit if the file argument to `.' is not found. Prefixing exec with
2939 `command' makes the shell not exit. Posix requires this behavior.
2941 tt. Fixed a bug that caused `sh -c 'command exec; exit 1' to hang.
2943 uu. Fixed a bug in $(...) command substitution parsing that caused the shell
2944 to treat backslash-newline incorrectly when parsing a comment.
2946 vv. Fixed bug that caused brace expansion sequence generation to misbehave
2947 when supplied integers greater than 2**31 - 1.
2949 ww. Fixed a bug that caused failure to save file descriptors for redirections
2950 to corrupt shell file descriptors.
2952 xx. Fixed a bug that caused bash-forward-shellword to not correctly handle
2955 2. Changes to Readline
2957 a. Fixed a bug that caused the unconverted filename to be added to the list of
2958 completions when the application specified filename conversion functions.
2960 b. Fixed a bug that caused the wrong filename to be passed to opendir when the
2961 application has specified a filename dequoting function.
2963 c. Fixed a bug when repeating a character search in vi mode in the case where
2964 there was no search to repeat.
2966 d. When show-all-if-ambiguous is set, the completion routines no longer insert
2967 a common match prefix that is shorter than the text being completed.
2969 e. The full set of vi editing commands may now be used in callback mode.
2971 f. Fixed a bug that caused readline to not update its idea of the terminal
2972 dimensions while running in `no-echo' mode.
2974 h. Fixed a bug that caused readline to dump core if an application called
2975 rl_prep_terminal without setting rl_instream.
2977 i. Fixed a bug that caused meta-prefixed characters bound to incremental
2978 search forward or backward to not be recognized if they were typed
2981 j. The incremental search code treats key sequences that map to the same
2982 functions as (default) ^G, ^W, and ^Y as equivalent to those characters.
2984 k. Fixed a bug in menu-complete that caused it to misbehave with large
2987 l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked
2988 at the end of the line.
2990 3. New Features in Bash
2992 a. `exec -a foo' now sets $0 to `foo' in an executable shell script without a
2995 b. Subshells begun to execute command substitutions or run shell functions or
2996 builtins in subshells do not reset trap strings until a new trap is
2997 specified. This allows $(trap) to display the caller's traps and the
2998 trap strings to persist until a new trap is set.
3000 c. `trap -p' will now show signals ignored at shell startup, though their
3001 disposition still cannot be modified.
3003 d. $'...', echo, and printf understand \uXXXX and \UXXXXXXXX escape sequences.
3005 e. declare/typeset has a new `-g' option, which creates variables in the
3006 global scope even when run in a shell function.
3008 f. test/[/[[ have a new -v variable unary operator, which returns success if
3009 `variable' has been set.
3011 g. Posix parsing changes to allow `! time command' and multiple consecutive
3012 instances of `!' (which toggle) and `time' (which have no cumulative
3015 h. Posix change to allow `time' as a command by itself to print the elapsed
3016 user, system, and real times for the shell and its children.
3018 j. $((...)) is always parsed as an arithmetic expansion first, instead of as
3019 a potential nested command substitution, as Posix requires.
3021 k. A new FUNCNEST variable to allow the user to control the maximum shell
3022 function nesting (recursive execution) level.
3024 l. The mapfile builtin now supplies a third argument to the callback command:
3025 the line about to be assigned to the supplied array index.
3027 m. The printf builtin has a new %(fmt)T specifier, which allows time values
3028 to use strftime-like formatting.
3030 n. There is a new `compat41' shell option.
3032 o. The cd builtin has a new Posix-mandated `-e' option.
3034 p. Negative subscripts to indexed arrays, previously errors, now are treated
3035 as offsets from the maximum assigned index + 1.
3037 q. Negative length specifications in the ${var:offset:length} expansion,
3038 previously errors, are now treated as offsets from the end of the variable.
3040 r. Parsing change to allow `time -p --'.
3042 s. Posix-mode parsing change to not recognize `time' as a keyword if the
3043 following token begins with a `-'. This means no more Posix-mode
3044 `time -p'. Posix interpretation 267.
3046 t. There is a new `lastpipe' shell option that runs the last command of a
3047 pipeline in the current shell context. The lastpipe option has no
3048 effect if job control is enabled.
3050 u. History expansion no longer expands the `$!' variable expansion.
3052 v. Posix mode shells no longer exit if a variable assignment error occurs
3053 with an assignment preceding a command that is not a special builtin.
3055 w. Non-interactive mode shells exit if -u is enabled and an attempt is made
3056 to use an unset variable with the % or # expansions, the `//', `^', or
3057 `,' expansions, or the parameter length expansion.
3059 x. Posix-mode shells use the argument passed to `.' as-is if a $PATH search
3060 fails, effectively searching the current directory. Posix-2008 change.
3062 4. New Features in Readline
3064 a. The history library does not try to write the history filename in the
3065 current directory if $HOME is unset. This closes a potential security
3066 problem if the application does not specify a history filename.
3068 b. New bindable variable `completion-display-width' to set the number of
3069 columns used when displaying completions.
3071 c. New bindable variable `completion-case-map' to cause case-insensitive
3072 completion to treat `-' and `_' as identical.
3074 d. There are new bindable vi-mode command names to avoid readline's case-
3075 insensitive matching not allowing them to be bound separately.
3077 e. New bindable variable `menu-complete-display-prefix' causes the menu
3078 completion code to display the common prefix of the possible completions
3079 before cycling through the list, instead of after.
3081 ------------------------------------------------------------------------------
3082 This document details the changes between this version, bash-4.1-rc,
3083 and the previous version, bash-4.1-beta.
3087 a. Fixed a bug that caused printf to not return a partial value when it
3088 encountered an error while converting an integer argument.
3090 b. Fixed a bug that caused setting one of the compatNN options to not
3091 turn off the others.
3093 c. The (undocumented) --wordexp option is no longer included by default.
3095 d. Fixed a bug in conditional command execution that caused it to not
3096 correctly ignore the exit status under certain circumstances.
3098 e. Added a configure-time check for correctly-working asprintf/snprintf.
3100 f. Fixed some problems with line number calculation and display when sourcing
3101 a file in an interactive shell.
3103 g. Fixed a bug that caused the shell to crash when using `declare -A foo=bar'.
3105 h. Fixed a bug that caused an off-by-one error when calculating the directories
3106 to display with the PROMPT_DIRTRIM option.
3108 2. Changes to Readline
3110 a. Fixed a bug that caused applications using the callback interface to not
3111 react to SIGINT (or other signals) until another character arrived.
3113 ------------------------------------------------------------------------------
3114 This document details the changes between this version, bash-4.1-beta,
3115 and the previous version, bash-4.1-alpha.
3119 a. Fixed a bug in mapfile that caused the shell to crash if it was passed the
3120 name of an associative array.
3122 b. Fixed a bug that caused the shell to incorrectly split case patterns if
3123 they contained characters in $IFS.
3125 c. Fixed a bug that caused the shell to set $? to the wrong value when using
3126 a construct ending with a variable assignment with set -x enabled and PS4
3127 containing a command substitution.
3129 d. Fixed a bug that caused the shell to read commands incorrectly if an
3130 expansion error occurred under certain conditions in a user-specified
3133 e. Fixed a bug that caused the shell to set $? incorrectly if a parse error
3134 occurred in an evaluation context ("eval", trap command, dot script, etc.)
3136 f. Fixed a bug that caused the shell to attempt command substitution
3137 completion within a single-quoted string.
3139 g. Fixed a bug that caused the shell to insert an extra single quote during
3142 h. Fixed a bug that caused the shell to crash if invoked with the environment
3143 variable EMACS having a null value.
3145 i. Fixed a bug that caused bash to incorrectly report the presence of new
3146 mail in a `maildir' environment.
3148 j. Fixed a bug that caused the shell to not recognize a here-document ending
3149 delimiter inside a command substitution.
3151 k. Fixed a bug that caused the shell to crash when a a dynamic array variable
3152 was assigned a scalar value.
3154 2. Changes to Readline
3156 3. New Features in Bash
3158 a. The mapfile/readarray builtin no longer stores the commands it invokes via
3159 callbacks in the history list.
3161 b. There is a new `compat40' shopt option.
3163 c. The < and > operators to [[ do string comparisons using the current locale
3164 only if the compatibility level is greater than 40 (set to 41 by default).
3166 4. New Features in Readline
3168 ------------------------------------------------------------------------------
3169 This document details the changes between this version, bash-4.1-alpha,
3170 and the previous version, bash-4.0-release.
3174 a. Fixed bugs in the parser involving new parsing of the commands contained
3175 in command substitution when the substitution is read.
3177 b. Fixed a bug that caused the shell to dump core when performing programmable
3178 completion using a shell function.
3180 c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong
3183 d. Fixed a bug that caused the shell to dump core when listing jobs in the
3186 e. Fixed several bugs encountered when reading subscripts in associative
3187 array assignments and expansions.
3189 f. Fixed a bug that under some circumstances caused an associative array to
3190 be converted to an indexed array.
3192 g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set
3193 $? to a value > 128.
3195 h. Fixed a bug that caused the shell to remove FIFOs associated with process
3196 substitution inside shell functions.
3198 i. Fixed a bug that caused terminal attributes to not be reset when the
3199 `read' builtin timed out.
3201 j. Fixed a bug in brace expansion that caused unwanted zero padding of the
3204 k. Fixed a bug that prevented the |& construct from working as intended when
3205 used with a simple command with additional redirections.
3207 l. Fixed a bug with the case statment ;& terminator that caused the shell to
3208 dereference a NULL pointer.
3210 m. Fixed a bug that caused assignment statements or redirections preceding
3211 a simple command name to inhibit alias expansion.
3213 n. Fixed the behavior of `set -u' to conform to the latest Posix interpretation:
3214 every expansion of an unset variable except $@ and $* will cause the
3217 o. Fixed a bug that caused double-quoted expansions of $* inside word
3218 expansions like ${x#$*} to not expand properly when $IFS is empty.
3220 p. Fixed a bug that caused traps to set $LINENO to the wrong value when they
3223 q. Fixed a bug that caused off-by-one errors when computing history lines in
3226 r. Fixed a bug that caused some terminating signals to not exit the shell
3227 quickly enough, forcing the kernel to send the signal (e.g., SIGSEGV)
3230 s. Fixed a bug that caused the shell to attempt to add empty lines to the
3231 history list when reading here documents.
3233 t. Made some internal changes that dramatically speeds up sequential indexed
3236 u. Fixed a bug that caused the shell to write past the end of a string when
3237 completing a double-quoted string ending in a backslash.
3239 v. Fixed a bug that caused the shell to replace too many characters when a
3240 pattern match was null in a ${foo//bar} expansion.
3242 w. Fixed bugs in the expansion of ** that caused duplicate directory names
3243 and the contents of the current directory to be omitted.
3245 x. Fixed a bug that caused $? to not be set correctly when referencing an
3246 unset variable with set -u and set -e enabled.
3248 y. Fixed a bug caused by executing an external program from the DEBUG trap
3249 while a pipeline was running. The effect was to disturb the pipeline
3250 state, occasionally causing it to hang.
3252 z. Fixed a bug that caused the ** glob expansion to dump core if it
3253 encountered an unsearchable directory.
3255 aa. Fixed a bug that caused `command -v' and `command -V' to not honor the
3256 path set by the -p option.
3258 bb. Fixed a bug that caused brace expansion to take place too soon in some
3259 compound array assignments.
3261 cc. Fixed a bug that caused programmable completion functions' changes to
3262 READLINE_POINT to not be reflected back to readline.
3264 dd. Fixed a bug that caused the shell to dump core if a trap was executed
3265 during a shell assignment statement.
3267 ee. Fixed an off-by-one error when computing the number of positional
3268 parameters for the ${@:0:n} expansion.
3270 ff. Fixed a problem with setting COMP_CWORD for programmable completion
3271 functions that could leave it set to -1.
3273 gg. Fixed a bug that caused the ERR trap to be triggered in some cases where
3274 `set -e' would not have caused the shell to exit.
3276 hh. Fixed a bug that caused changes made by `compopt' to not persist past the
3277 completion function in which compopt was executed.
3279 ii. Fixed a bug that caused the list of hostname completions to not be cleared
3280 when HOSTNAME was unset.
3282 jj. Fixed a bug that caused variable expansion in here documents to look in
3283 any temporary environment.
3285 kk. Bash and readline can now convert file names between precomposed and
3286 decomposed Unicode on Mac OS X ("keyboard" and file system forms,
3287 respectively). This affects filename completion (using new
3288 rl_filename_rewrite_hook), globbing, and readline redisplay.
3290 ll. The ERR and EXIT traps now see a non-zero value for $? when a parser
3291 error after set -e has been enabled causes the shell to exit.
3293 mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to
3294 not contain the correct number of digits.
3296 nn. Fixed a bug that caused the shell to free non-allocated memory when
3297 unsetting an associative array which had had a value implicitly assigned
3300 oo. Fixed a memory leak in the ${!prefix@} expansion.
3302 pp. Fixed a bug that caused printf to not correctly report all write errors.
3304 qq. Fixed a bug that caused single and double quotes to act as delimiters
3305 when splitting a command line into words for programmable completion.
3307 rr. Fixed a bug that caused ** globbing that caused **/path/* to match every
3308 directory, not just those matching `path'.
3310 ss. Fixed a bug that caused the shell to dump core when running `help' without
3311 arguments if the terminal width was fewer than 7 characters.
3313 2. Changes to Readline
3315 a. The SIGWINCH signal handler now avoids calling the redisplay code if
3316 one arrives while in the middle of redisplay.
3318 b. Changes to the timeout code to make sure that timeout values greater
3319 than one second are handled better.
3321 c. Fixed a bug in the redisplay code that was triggered by a prompt
3322 containing invisible characters exactly the width of the screen.
3324 d. Fixed a bug in the redisplay code encountered when running in horizontal
3327 e. Fixed a bug that prevented menu completion from properly completing
3330 f. Fixed a redisplay bug caused by a multibyte character causing a line to
3333 g. Fixed a bug that caused key sequences of two characters to not be
3334 recognized when a longer sequence identical in the first two characters
3337 h. Fixed a bug that caused history expansion to be attempted on $'...'
3338 single-quoted strings.
3340 i. Fixed a bug that caused incorrect redisplay when the prompt contained
3341 multibyte characters in an `invisible' sequence bracketed by \[ and
3344 j. Fixed a bug that caused history expansion to short-circuit after
3345 encountering a multibyte character.
3347 3. New Features in Bash
3349 a. Here-documents within $(...) command substitutions may once more be
3350 delimited by the closing right paren, instead of requiring a newline.
3352 b. Bash's file status checks (executable, readable, etc.) now take file
3353 system ACLs into account on file systems that support them.
3355 c. Bash now passes environment variables with names that are not valid
3356 shell variable names through into the environment passed to child
3359 d. The `execute-unix-command' readline function now attempts to clear and
3360 reuse the current line rather than move to a new one after the command
3363 e. `printf -v' can now assign values to array indices.
3365 f. New `complete -E' and `compopt -E' options that work on the "empty"
3366 completion: completion attempted on an empty command line.
3368 g. New complete/compgen/compopt -D option to define a `default' completion:
3369 a completion to be invoked on command for which no completion has been
3370 defined. If this function returns 124, programmable completion is
3371 attempted again, allowing a user to dynamically build a set of completions
3372 as completion is attempted by having the default completion function
3373 install individual completion functions each time it is invoked.
3375 h. When displaying associative arrays, subscripts are now quoted.
3377 i. Changes to dabbrev-expand to make it more `emacs-like': no space appended
3378 after matches, completions are not sorted, and most recent history entries
3379 are presented first.
3381 j. The [[ and (( commands are now subject to the setting of `set -e' and the
3384 k. The source/. builtin now removes NUL bytes from the file before attempting
3387 l. There is a new configuration option (in config-top.h) that forces bash to
3388 forward all history entries to syslog.
3390 m. A new variable $BASHOPTS to export shell options settable using `shopt' to
3393 n. There is a new confgure option that forces the extglob option to be
3396 o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
3397 output to that file descriptor.
3399 p. If the optional left-hand-side of a redirection is of the form {var}, the
3400 shell assigns the file descriptor used to $var or uses $var as the file
3401 descriptor to move or close, depending on the redirection operator.
3403 q. The < and > operators to the [[ conditional command now do string
3404 comparison according to the current locale.
3406 r. Programmable completion now uses the completion for `b' instead of `a'
3407 when completion is attempted on a line like: a $(b c.
3409 s. Force extglob on temporarily when parsing the pattern argument to
3410 the == and != operators to the [[ command, for compatibility.
3412 t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is
3413 received and a trap on SIGCHLD is set to be Posix-mode only.
3415 u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS
3416 characters, ignoring delimiters like newline.
3418 4. New Features in Readline
3420 a. New bindable function: menu-complete-backward.
3422 b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
3423 and C-p to menu-complete-backward.
3425 c. When in vi command mode, repeatedly hitting ESC now does nothing, even
3426 when ESC introduces a bound key sequence. This is closer to how
3427 historical vi behaves.
3429 d. New bindable function: skip-csi-sequence. Can be used as a default to
3430 consume key sequences generated by keys like Home and End without having
3433 e. New application-settable function: rl_filename_rewrite_hook. Can be used
3434 to rewite or modify filenames read from the file system before they are
3435 compared to the word to be completed.
3437 f. New bindable variable: skip-completed-text, active when completing in the
3438 middle of a word. If enabled, it means that characters in the completion
3439 that match characters in the remainder of the word are "skipped" rather
3440 than inserted into the line.
3442 g. The pre-readline-6.0 version of menu completion is available as
3443 "old-menu-complete" for users who do not like the readline-6.0 version.
3445 h. New bindable variable: echo-control-characters. If enabled, and the
3446 tty ECHOCTL bit is set, controls the echoing of characters corresponding
3447 to keyboard-generated signals.
3449 i. New bindable variable: enable-meta-key. Controls whether or not readline
3450 sends the smm/rmm sequences if the terminal indicates it has a meta key
3451 that enables eight-bit characters.
3453 ------------------------------------------------------------------------------
3454 This document details the changes between this version, bash-4.0-release,
3455 and the previous version, bash-4.0-rc1.
3459 a. Changed the message printed when setlocale(3) fails to only include the
3460 strerror error text if the call changes errno.
3462 b. Changed trap command execution to reset the line number before running a
3463 trap (except DEBUG and RETURN traps).
3465 c. Fixed behavior of case-modifiying word expansions to not work on
3466 individual words within a variable's value.
3468 d. Fixed a bug that caused mapfile to not be interruptible when run in an
3471 e. Fixed a bug that caused mapfile to not run callbacks for the first line
3474 f. Fixed a bug that caused mapfile to not honor EOF typed in an interactive
3477 g. Fixed the coprocess reaping code to not run straight from a signal handler.
3479 h. Fixed a bug that caused printf -b to ignore the first % conversion specifier
3480 in the format string on 64-bit systems.
3482 i. Fixed a bug that caused incorrect word splitting when `:', `=', or `~'
3485 j. Fixed a bug that caused data corruption in the programmable completion code
3486 when a shell function called from a completion aborted execution.
3488 k. Fixed a bug that caused the CPU usage reported by the `time' builtin to be
3491 l. Changed behavior of shell when -e option is in effect to reflect consensus
3492 of Posix shell standardization working group.
3494 m. Fixed a bug introduced in bash-4.0-alpha that caused redirections to not
3495 be displayed by `type' or `declare' when appearing in functions under
3496 certain circumstances.
3498 2. Changes to Readline
3500 a. Fixed a bug that caused !(...) extended glob patterns to inhibit later
3503 b. Reworked the signal handling to avoid calling disallowed functions from a
3506 3. New Features in Bash
3508 a. `readarray' is now a synonym for `mapfile'.
3509 ------------------------------------------------------------------------------
3510 This document details the changes between this version, bash-4.0-rc1,
3511 and the previous version, bash-4.0-beta2.
3515 a. Fixed a bug that caused parsing errors when a $()-style command
3516 substitution was follwed immediately by a quoted newline.
3518 b. Fixed a bug that caused extended shell globbing patterns beginning with
3519 `*(' to not work when used with pattern substitution word expansions.
3521 ------------------------------------------------------------------------------
3522 This document details the changes between this version, bash-4.0-beta2,
3523 and the previous version, bash-4.0-beta.
3527 a. Fixed a bug that caused failed word expansions to set $? but not
3530 b. Changed filename completion to quote the tilde in a filename with a
3531 leading tilde that exists in the current directory.
3533 c. Fixed a bug that caused a file descriptor leak when performing
3534 redirections attached to a compound command.
3536 d. Fixed a bug that caused expansions of $@ and $* to not exit the shell if
3537 the -u option was enabled and there were no posititional parameters.
3539 e. Fixed a bug that resulted in bash not terminating immediately if a
3540 terminating signal was received while performing output.
3542 f. Fixed a bug that caused the shell to crash after creating 256 process
3543 substitutions during word completion.
3545 2. Changes to Readline
3547 a. Fixed a bug that caused redisplay errors when using prompts with invisible
3548 characters and numeric arguments to a command in a multibyte locale.
3550 b. Fixed a bug that caused redisplay errors when using prompts with invisible
3551 characters spanning more than two physical screen lines.
3553 ------------------------------------------------------------------------------
3554 This document details the changes between this version, bash-4.0-beta,
3555 and the previous version, bash-4.0-alpha.
3559 a. Fixed a typo that caused a variable to be used before initialization
3560 while parsing Posix-style command substitutions.
3562 b. Fixed a bug that caused stray ^? when the expansion of a parameter used
3563 as part of a pattern removal expansion is empty, but part of a non-
3566 c. Fixed a bug that could cause strings not converted to numbers by strtol
3567 to be treated as if the conversion had been successful.
3569 d. The `return' builtin now accepts no options and requires a `--' before
3570 a negative return value, as Posix requires.
3572 e. Fixed a bug that caused local variables to be created with the empty
3573 string for a value rather than no value.
3575 f. Changed behavior so the shell now acts as if it received an interrupt
3576 when a pipeline is killed by SIGINT while executing a list.
3578 g. Fixed a bug that caused `declare var' and `typeset var' to initialize
3579 `var' to the empty string.
3581 h. Changed `bind' builtin to print a warning but proceed if invoked when
3582 line editing is not active.
3584 i. Fixed a bug that caused the shell to exit when the `errexit' option is
3585 set and a command in a pipeline returns a non-zero exit status.
3587 j. Fixed a bug that caused the shell to not run the exit trap in a command
3588 run with `bash -c' under some circumstances.
3590 k. Fixed a bug that caused parser errors to occasionally not set $? when
3591 running commands with `eval'.
3593 l. Fixed a bug that caused stray control characters when evaluating compound
3594 array assignments containing $'\x7f' escapes.
3596 m. Fixed a bug that caused redirections involving file descriptor 10 as the
3597 target to behave incorrectly.
3599 n. Fixed a bug that could cause memory to be freed multiple times when
3600 assigning to COMP_WORDBREAKS.
3602 o. Fixed a bug that could cause NULL pointer dereferences when COMP_WORDBREAKS
3605 2. Changes to Readline
3607 3. New Features in Bash
3609 a. A value of 0 for the -t option to `read' now returns success if there is
3610 input available to be read from the specified file descriptor.
3612 b. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
3615 c. New bindable readline functions shell-forward-word and shell-backward-word,
3616 which move forward and backward words delimited by shell metacharacters
3617 and honor shell quoting.
3619 d. New bindable readline functions shell-backward-kill-word and shell-kill-word
3620 which kill words backward and forward, but use the same word boundaries
3621 as shell-forward-word and shell-backward-word.
3623 4. New Features in Readline
3625 a. If the kernel supports it, readline displays special characters
3626 corresponding to a keyboard-generated signal when the signal is received.
3628 ------------------------------------------------------------------------------
3629 This document details the changes between this version, bash-4.0-alpha,
3630 and the previous version, bash-3.2-release.
3634 a. Fixed several bugs in old-style `` command substitution parsing, including
3635 comment parsing and quoted string handling.
3637 b. Fixed problems parsing arguments to the [[ command's =~ regular expression
3638 matching operator: metacharacter and whitespace parsing.
3640 c. Fixed a bug that caused the shell to inappropriately reuse high-numbered
3641 file descriptors it used internally.
3643 d. Fixed a bug in pattern replacement word expansions that caused a `/' as
3644 the first character of an expanded pattern to be mistaken for a global
3645 replacement specifier.
3647 e. Fixed several problems with the asprintf and snprintf replacement functions
3648 that caused hangs and crashes.
3650 f. Fixed a bug in the calculation of the current and previous job that caused
3651 it to refer to incorrect jobs.
3653 g. Fixed a bug in the check for the validity of a hashed command pathname that
3654 caused unnecessary hash table deletions and additions.
3656 h. Fixed a bug that caused child processes to inherit the wrong value for $!.
3658 i. Fixed a bug that caused `.' to fail to read and execute commands from non-
3659 regular files such as devices or named pipes.
3661 j. Fixed a bug in printf formatting for the %x and %X expansions that occurred
3664 k. Fixed a bug that caused the shell to crash when creating temporary files if
3665 $TMPDIR named a non-writable directory.
3667 l. Fixed a bug that caused the shell to ignore $TMPDIR when creating temporary
3668 files under some circumstances.
3670 m. Fixed a bug that caused named pipes created by process substitution to not
3673 n. Fixed a bug that caused HISTTIMEFORMAT to not be honored when it appeared
3674 in the initial shell environment.
3676 o. Fixed several bugs in the expansion of $* and $@ (quoted and unquoted)
3677 when IFS is null or contains non-whitespace characters; the same changes
3678 apply to arrays subscripted with * or @.
3680 p. Fixed several problems with pattern substitution expansions on the
3681 positional parameters and arrays subscripted with * or @ that occurred
3682 when $IFS was set to the empty string.
3684 q. Made a change to the default locale initialization code that should
3685 result in better behavior from the locale-aware library functions.
3687 r. Fixed a bug that caused compacting the jobs list to drop jobs.
3689 s. Fixed a bug that caused jumps back to the top-level processing loop from
3690 a builtin command to leave the shell in an inconsistent state.
3692 t. Fixed a bug that caused characters that would be escaped internally to be
3693 doubled when escaped with a backslash.
3695 u. Fixed the initialization of mailboxes to not cause maildirs to be read
3696 (and stat(2) called for every message file) at shell startup.
3698 v. Fixed a bug that caused the shell to not display $PS2 when the read builtin
3699 reads a line continued with a backslash.
3701 w. Fixed a bug that caused errors in word splitting when $IFS contained
3702 characters used for internal quoting.
3704 x. Fixed bugs that caused problems with output from shell builtins not being
3705 completely displayed on some systems.
3707 y. Fixed a bug that caused output to be lost when a redirection is acting on
3708 the shell's output file descriptor.
3710 z. Fixed bugs caused by shell builtins not checking for all write errors.
3712 aa. Fixed a problem that caused the shell to dump core if expansions on the
3713 pattern passed to the pattern removal word expansions resulted in expansion
3716 bb. Fixed a bug that caused bash to loop infinitely after creating and
3717 waiting for 4096 jobs.
3719 cc. Fixed a bug that caused bash to lose the status of a background job under
3720 certain circumstances.
3722 dd. Fixed a bug that caused bash to not look in the temporary environment
3723 when performing variable lookup under certain circumstances.
3725 ee. Fixed a bug that caused bash to close file descriptors greater than 10
3726 when they were used in redirections.
3728 ff. Fixed a problem that caused the shell to attempt to read from the standard
3729 input when called as `bash -i script'.
3731 gg. Fixed a memory leak and variable initialization problems when the -v option
3732 was supplied to `printf' that could cause incorrect results.
3734 hh. Fixed a bug that caused the `read' builtin to count bytes when the -n option
3735 was supplied, rather than (possibly multibyte) characters.
3737 ii. Fixed a bug when displaying a function due to not converting the function
3738 to an external form.
3740 jj. Changed job control initialization to ensure that the shell has a tty
3741 as its controlling terminal before enabling job control.
3743 kk. Fixed a bug with the `test' builtin that caused it to misinterpret
3744 arguments beginning with `-' but containing more than one character.
3746 ll. Fixed bug that could cause the shell to dump core in certain cases where
3747 a command sets the SIGINT disposition to the default.
3749 mm. Fixed a bug in the pattern replacement (affecting both word expansion
3750 and the `fc' builtin) that occurred when the pattern and replacement
3753 nn. Fixed a bug that caused an arithmetic evaluation error to disable all
3756 oo. Fixed a bug in pathname expansion that caused it to interpret backslashes
3757 in the pathname as quoting characters.
3759 pp. Fixed a bug in the replacement getcwd() implementation that could cause
3760 memory to be overwritten.
3762 qq. When in Posix mode, the `ulimit' builtin now uses a block size of 512 for
3763 the `-c' and `-f' options.
3765 rr. Brace expansion now allows process substitutions to pass through unchanged.
3767 ss. Fixed a problem in the command name completion code to avoid quoting
3768 escaped special characters twice when the command name begins with a tilde.
3770 tt. Fixed a problem in the printf builtin that resulted in single-byte
3771 output for the "'" escape, even when using multibyte characters.
3773 uu. Fixed a bug that caused the failure exit status to be lost when redirections
3774 attached to a compound command failed.
3776 vv. Fixed a bug that caused the internal random number generator to not be
3777 re-seeded correctly when creating a subshell.
3779 ww. Fixed a bug that could cause the bash replacement getcwd to overwrite
3782 xx. Fixed a bug that caused the shell to not receive SIGINT if it was sent
3783 while the shell was waiting for a command substitution to terminate, and
3784 make sure the exit status is correct when it does.
3786 yy. Fixed a bug that resulted in the second and subsequent children spawned
3787 by a shell begun to run a command substitution being placed into the
3788 wrong process group.
3790 zz. Fixed a bug that caused the results of successful tilde expansion to be
3791 subject to pathname expansion and word splitting.
3793 aaa. Fixed a bug that could cause the shell to hang if it encountered an
3794 error that caused it to jump back to the top processing loop during a
3795 command substitution or `eval' command.
3797 bbb. Fixed a bug that caused the `read' builtin to use the tty's attributes
3798 instead of those of the file descriptor passed with the -u option when
3799 processing the -n and -d options.
3801 ccc. Fixed a bug that caused incorrect expansion of ${array[@]:foo} if the
3802 first character of $IFS was not whitespace.
3804 ddd. Fixed a bug that occurred when scanning for the ending delimiter of a
3805 ${parameter/pat/sub} expansion.
3807 eee. Fixed a bug that caused the shell to inappropriately expand command
3808 substitutions in words when expanding directory names for completion.
3810 fff. Fixed a bug that caused the `fc' builtin to look too far back in the
3811 history list under certain circumstances.
3813 ggg. Fixed a bug that caused a shell running in Posix mode to search $PWD for
3814 a file specified as an argument to source/. when the file was not found
3817 hhh. Fixed a bug that caused the shell to modify the case of a command word
3818 found via command completion when the shell was performing case-
3819 insensitive completion.
3821 iii. Fixed a bug that caused the shell to search $PATH for an argument to
3822 source/. even when it contained a `/'.
3824 jjj. Fixed a bug that caused brace expansion to misorder expansions when the
3825 locale did not have a collating order like aAbBcC...zZ.
3827 kkk. Fixed a bug that did not allow `set +o history' to have any effect when
3828 run in a startup file or from a sourced file.
3830 lll. Fixed a bug with the precedence of the ?: conditional arithmetic operator.
3832 mmm. Fixed a bug that caused side effects of temporary variable assignments
3833 to persist in the shell environment.
3835 nnn. Fixed a bug that caused the terminal to be left in non-canonical mode
3836 when using editing commands that invoke the an editor on the current
3839 ooo. Fixed a bug that caused globbing characters and characters in $IFS to not
3840 be quoted appropriately when displaying assignment statements.
3842 ppp. Fixed a bug that caused the `-e' option to be inherited when sourcing a
3843 file or evaluating a command with `eval' even if the return value of the
3844 command was supposed to be ignored.
3846 qqq. Fixed a bug that caused the shell to attempt to created variables with
3847 invalid names if such names appeared in the initial environment.
3849 rrr. Fixed a bug with quote removal in strings where the final character is a
3852 sss. Fixed a bug that caused the effects of special variables to persist even
3853 when the variables were unset as part of the shell reinitializing itself
3854 to execute a shell script.
3856 ttt. Fixed a bug that caused the history to not be saved after `history -c' or
3857 `history -d' was executed until a sufficient number of commands had been
3858 saved to the history.
3860 uuu. Bash now parses command substitutions according to Posix rules: parsing
3861 the command contained in $() to find the closing delimiter.
3863 vvv. Fixed a bug that caused traps on SIGCHLD set in a SIGCHLD handler to
3866 www. Fixed a bug that didn't allow SIGCHLD to interrupt the `wait' builtin
3869 xxx. Invalid numeric arguments to shell builtins no longer cause the shell to
3870 short-circuit any executing compound command.
3872 yyy. Fixed a bug that caused the exit status to be lost when `break' was
3873 used to short-circuit a loop's execution.
3875 zzz. Fixed a bug that caused stray ^? characters to be left in expansions of
3878 aaaa. Bash now prints better error messages for here documents terminated by
3879 EOF and for identifying the incorrect token in an invalid arithmetic
3882 bbbb. Fixed a bug in the variable length word expansion that caused it to
3883 incorrectly calculate the number of multibyte characters.
3885 cccc. Fixed a race condition that could result in the top-level shell setting
3886 the terminal's process group to an incorrect value if the process
3887 group was changed by a child of a child of the shell.
3889 dddd. Fixed a bug that caused here documents belonging to commands within a
3890 compound command to be displayed in a syntactially-incorrect form, which
3891 prevented them from being re-read as input.
3893 eeee. The shell displays more warnings about failures to set the locale.
3895 ffff. Fixed a bug that caused the body of a here-document to not be saved to
3898 gggg. Fixed a bug that caused configure to incorrectly conclude that FreeBSD
3899 had /dev/fd available, resulting in problems with process substitution.
3901 2. Changes to Readline
3903 a. Fixed a number of redisplay errors in environments supporting multibyte
3906 b. Fixed bugs in vi command mode that caused motion commands to inappropriately
3909 c. When using the arrow keys in vi insertion mode, readline allows movement
3910 beyond the current end of the line (unlike command mode).
3912 d. Fixed bugs that caused readline to loop when the terminal has been taken
3913 away and reads return -1/EIO.
3915 e. Fixed bugs in redisplay occurring when displaying prompts containing
3916 invisible characters.
3918 f. Fixed a bug that caused the completion append character to not be reset to
3919 the default after an application-specified completion function changed it.
3921 g. Fixed a problem that caused incorrect positioning of the cursor while in
3922 emacs editing mode when moving forward at the end of a line while using
3923 a locale supporting multibyte characters.
3925 h. Fixed an off-by-one error that caused readline to drop every 511th
3926 character of buffered input.
3928 i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up.
3930 j. Fixed redisplay bugs caused by multiline prompts with invisible characters
3931 or no characters following the final newline.
3933 k. Fixed redisplay bug caused by prompts consisting solely of invisible
3936 l. Fixed a bug in the code that buffers characters received very quickly in
3937 succession which caused characters to be dropped.
3939 m. Fixed a bug that caused readline to reference uninitialized data structures
3940 if it received a SIGWINCH before completing initialzation.
3942 n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly
3943 and therefore unrepeatable.
3945 o. Fixed a bug that caused readline to disable echoing when it was being used
3946 with an output file descriptor that was not a terminal.
3948 p. Readline now blocks SIGINT while manipulating internal data structures
3951 q. Fixed a bug in redisplay that caused readline to segfault when pasting a
3952 very long line (over 130,000 characters).
3954 r. Fixed bugs in redisplay when using prompts with no visible printing
3957 3. New Features in Bash
3959 a. When using substring expansion on the positional parameters, a starting
3960 index of 0 now causes $0 to be prefixed to the list.
3962 b. The `help' builtin now prints its columns with entries sorted vertically
3963 rather than horizontally.
3965 c. There is a new variable, $BASHPID, which always returns the process id of
3968 d. There is a new `autocd' option that, when enabled, causes bash to attempt
3969 to `cd' to a directory name that is supplied as the first word of a
3972 e. There is a new `checkjobs' option that causes the shell to check for and
3973 report any running or stopped jobs at exit.
3975 f. The programmable completion code exports a new COMP_TYPE variable, set to
3976 a character describing the type of completion being attempted.
3978 g. The programmable completion code exports a new COMP_KEY variable, set to
3979 the character that caused the completion to be invoked (e.g., TAB).
3981 h. If creation of a child process fails due to insufficient resources, bash
3982 will try again several times before reporting failure.
3984 i. The programmable completion code now uses the same set of characters as
3985 readline when breaking the command line into a list of words.
3987 j. The block multiplier for the ulimit -c and -f options is now 512 when in
3988 Posix mode, as Posix specifies.
3990 k. Changed the behavior of the read builtin to save any partial input received
3991 in the specified variable when the read builtin times out. This also
3992 results in variables specified as arguments to read to be set to the empty
3993 string when there is no input available. When the read builtin times out,
3994 it returns an exit status greater than 128.
3996 l. The shell now has the notion of a `compatibility level', controlled by
3997 new variables settable by `shopt'. Setting this variable currently
3998 restores the bash-3.1 behavior when processing quoted strings on the rhs
3999 of the `=~' operator to the `[[' command.
4001 m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number
4002 of threads) options.
4004 n. The -p option to `declare' now displays all variable values and attributes
4005 (or function values and attributes if used with -f).
4007 o. There is a new `compopt' builtin that allows completion functions to modify
4008 completion options for existing completions or the completion currently
4011 p. The `read' builtin has a new -i option which inserts text into the reply
4012 buffer when using readline.
4014 q. A new `-E' option to the complete builtin allows control of the default
4015 behavior for completion on an empty line.
4017 r. There is now limited support for completing command name words containing
4018 globbing characters.
4020 s. Changed format of internal help documentation for all builtins to roughly
4021 follow man page format.
4023 t. The `help' builtin now has a new -d option, to display a short description,
4024 and a -m option, to print help information in a man page-like format.
4026 u. There is a new `mapfile' builtin to populate an array with lines from a
4029 v. If a command is not found, the shell attempts to execute a shell function
4030 named `command_not_found_handle', supplying the command words as the
4033 w. There is a new shell option: `globstar'. When enabled, the globbing code
4034 treats `**' specially -- it matches all directories (and files within
4035 them, when appropriate) recursively.
4037 x. There is a new shell option: `dirspell'. When enabled, the filename
4038 completion code performs spelling correction on directory names during
4041 y. The `-t' option to the `read' builtin now supports fractional timeout
4044 z. Brace expansion now allows zero-padding of expanded numeric values and
4045 will add the proper number of zeroes to make sure all values contain the
4046 same number of digits.
4048 aa. There is a new bash-specific bindable readline function: `dabbrev-expand'.
4049 It uses menu completion on a set of words taken from the history list.
4051 bb. The command assigned to a key sequence with `bind -x' now sets two new
4052 variables in the environment of the executed command: READLINE_LINE_BUFFER
4053 and READLINE_POINT. The command can change the current readline line
4054 and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT,
4057 cc. There is a new &>> redirection operator, which appends the standard output
4058 and standard error to the named file.
4060 dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects
4061 the standard error for a command through a pipe.
4063 ee. The new `;&' case statement action list terminator causes execution to
4064 continue with the action associated with the next pattern in the
4065 statement rather than terminating the command.
4067 ff. The new `;;&' case statement action list terminator causes the shell to
4068 test the next set of patterns after completing execution of the current
4069 action, rather than terminating the command.
4071 gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an
4072 integer value greater than zero, prompt expansion of \w and \W will
4073 retain only that number of trailing pathname components and replace
4074 the intervening characters with `...'.
4076 hh. There are new case-modifying word expansions: uppercase (^[^]) and
4077 lowercase (,[,]). They can work on either the first character or
4078 array element, or globally. They accept an optional shell pattern
4079 that determines which characters to modify. There is an optionally-
4080 configured feature to include capitalization operators.
4082 ii. The shell provides associative array variables, with the appropriate
4083 support to create, delete, assign values to, and expand them.
4085 jj. The `declare' builtin now has new -l (convert value to lowercase upon
4086 assignment) and -u (convert value to uppercase upon assignment) options.
4087 There is an optionally-configurable -c option to capitalize a value at
4090 kk. There is a new `coproc' reserved word that specifies a coprocess: an
4091 asynchronous command run with two pipes connected to the creating shell.
4092 Coprocs can be named. The input and output file descriptors and the
4093 PID of the coprocess are available to the calling shell in variables
4094 with coproc-specific names.
4096 4. New Features in Readline
4098 a. A new variable, rl_sort_completion_matches; allows applications to inhibit
4099 match list sorting (but beware: some things don't work right if
4100 applications do this).
4102 b. A new variable, rl_completion_invoking_key; allows applications to discover
4103 the key that invoked rl_complete or rl_menu_complete.
4105 c. The functions rl_block_sigint and rl_release_sigint are now public and
4106 available to calling applications who want to protect critical sections
4109 d. The functions rl_save_state and rl_restore_state are now public and
4110 available to calling applications; documented rest of readline's state
4113 e. A new user-settable variable, `history-size', allows setting the maximum
4114 number of entries in the history list.
4116 f. There is a new implementation of menu completion, with several improvements
4117 over the old; the most notable improvement is a better `completions
4120 g. The menu completion code now uses the rl_menu_completion_entry_function
4121 variable, allowing applications to provide their own menu completion
4124 h. There is support for replacing a prefix of a pathname with a `...' when
4125 displaying possible completions. This is controllable by setting the
4126 `completion-prefix-display-length' variable. Matches with a common prefix
4127 longer than this value have the common prefix replaced with `...'.
4129 i. There is a new `revert-all-at-newline' variable. If enabled, readline will
4130 undo all outstanding changes to all history lines when `accept-line' is
4133 ------------------------------------------------------------------------------
4134 This document details the changes between this version, bash-3.2-release,
4135 and the previous version, bash-3.2-beta.
4139 a. Fixed a bug that caused the temporary environment passed to a command to
4140 affect the shell's environment under certain circumstances.
4142 b. Fixed a bug in the printf builtin that caused the %q format specifier to
4143 ignore empty string arguments.
4145 c. Improved multibyte character environment detection at configuration time.
4147 d. Fixed a bug in the read builtin that left spurious escape characters in the
4148 input after processing backslashes when assigning to an array variable.
4150 2. Changes to Readline
4152 a. Fixed a redisplay bug that occurred in multibyte-capable locales when the
4153 prompt was one character longer than the screen width.
4154 ------------------------------------------------------------------------------
4155 This document details the changes between this version, bash-3.2-beta,
4156 and the previous version, bash-3.2-alpha.
4160 a. Changed the lexical analyzer to treat locale-specific blank characters as
4163 b. Fixed a bug in command printing to avoid confusion between redirections and
4164 process substitution.
4166 c. Fixed problems with cross-compiling originating from inherited environment
4169 d. Added write error reporting to printf builtin.
4171 e. Fixed a bug in the variable expansion code that could cause a core dump in
4172 a multi-byte locale.
4174 f. Fixed a bug that caused substring expansion of a null string to return
4177 g. BASH_COMMAND now retains its previous value while executing commands as the
4178 result of a trap, as the documentation states.
4180 2. Changes to Readline
4182 a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
4183 the prompt and input line multiple times.
4185 b. Fixed history expansion to not be confused by here-string redirection.
4187 c. Readline no longer treats read errors by converting them to newlines, as
4188 it does with EOF. This caused partial lines to be returned from readline().
4190 ------------------------------------------------------------------------------
4191 This document details the changes between this version, bash-3.2-alpha,
4192 and the previous version, bash-3.1-release.
4196 a. Fixed a source bug that caused the minimal configuration to not compile.
4198 b. Fixed memory leaks in error handling for the `read' builtin.
4200 c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit
4203 d. Fixed some parsing problems with compound array assignments.
4205 e. Added additional configuration changes for: NetBSD (incomplete multibyte
4208 f. Fixed two bugs with local array variable creation when shadowing a variable
4209 of the same name from a previous context.
4211 g. Fixed the `read' builtin to restore the correct set of completion functions
4212 if a timeout occurs.
4214 h. Added code to defer the initialization of HISTSIZE (and its stifling of the
4215 history list) until the history file is loaded, allowing a startup file to
4216 override the default value.
4218 i. Tightened up the arithmetic expression parsing to produce better error
4219 messages when presented with invalid operators.
4221 j. Fixed the cross-compilation support to build the signal list at shell
4222 invocation rather than compile time if cross-compiling.
4224 k. Fixed multibyte support for non-gcc compilers (or compilers that do not
4225 allow automatic array variable sizing based on a non-constant value).
4227 l. Several fixes to the code that manages the list of terminated jobs and
4228 their exit statuses, and the list of active and recently-terminated jobs
4229 to avoid pid aliasing/wraparound and allocation errors.
4231 m. Fixed a problem that allowed scripts to die due to SIGINT while waiting
4232 for children, even when started in the background or otherwise ignoring
4235 n. Fixed a bug that caused shells invoked as -/bin/bash from not being
4236 recognized as login shells.
4238 o. Fixed a problem that caused shells in the background to give the terminal
4239 to a process group other than the foreground shell process group.
4241 p. Fixed a problem with extracting the `varname' in ${#varname}.
4243 q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby
4244 calling functions that may not be called in a signal handler context --
4245 but set a flag and exit afterward (like SIGINT).
4247 r. Changed the brace expansion code to skip over braces that don't begin a
4248 valid matched brace expansion construct.
4250 s. Fixed `typeset' and `declare' to not require that their shell function
4251 operands to be valid shell identifiers.
4253 t. Changed `test' to use access(2) with a temporary uid/euid swap when testing
4254 file attributes and running setuid, and access(2) in most other cases.
4256 u. Changed completion code to not attempt command name completion on a line
4257 consisting solely of whitespace when no_empty_command_completion is set.
4259 v. The `hash' builtin now prints nothing in posix mode when the hash table is
4260 empty, and prints a message to that effect to stdout instead of stderr
4261 when not in posix mode.
4263 w. Fixed a bug in the extended pattern matching code that caused it to fail to
4264 match periods with certain patterns.
4266 x. Fixed a bug that caused the shell to dump core when performing filename
4267 generation in directories with thousands of files.
4269 y. Returned to the original Bourne shell rules for parsing ``: no recursive
4270 parsing of embedded quoted strings or ${...} constructs.
4272 z. The inheritence of the DEBUG, RETURN, and ERR traps is now dependent only
4273 on the settings of the `functrace' and `errtrace' shell options, rather
4274 than whether or not the shell is in debugging mode.
4276 aa. Fixed a problem with $HOME being converted to ~ in the expansion of
4277 members of the DIRSTACK array.
4279 bb. Fixed a problem with quoted arguments to arithmetic expansions in certain
4282 cc. The command word completion code now no longer returns matching directories
4283 while searching $PATH.
4285 dd. Fixed a bug with zero-padding and precision handling in snprintf()
4288 ee. Fixed a bug that caused the command substitution code not to take embedded
4289 shell comments into account.
4291 ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an
4292 arithmetic substitution.
4294 gg. Fixed a bug in the prompt expansion code that inappropriately added a
4295 \001 before a \002 under certain circumstances.
4297 hh. Fixed a bug that caused `unset LANG' to not properly reset the locale
4298 (previous versions would set the locale back to what it was when bash
4299 was started rather than the system's "native" locale).
4301 ii. Fixed a bug that could cause file descriptors > 10 to not be closed even
4302 when closed explicitly by a script.
4304 jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting
4305 inside double-quoted command substitutions.
4307 kk. Fixed a bug that could cause core dumps when `return' was executed as the
4308 last element of a pipeline inside a shell function.
4310 ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in
4313 2. Changes to Readline
4315 a. Fixed a problem that caused segmentation faults when using readline in
4316 callback mode and typing consecutive DEL characters on an empty line.
4318 b. Fixed several redisplay problems with multibyte characters, all having to
4319 do with the different code paths and variable meanings between single-byte
4320 and multibyte character redisplay.
4322 c. Fixed a problem with key sequence translation when presented with the
4325 d. Fixed a problem that prevented the `a' command in vi mode from being
4326 undone and redone properly.
4328 e. Fixed a problem that prevented empty inserts in vi mode from being undone
4331 f. Fixed a problem that caused readline to initialize with an incorrect idea
4332 of whether or not the terminal can autowrap.
4334 g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
4335 convert-meta and use \e where appropriate.
4337 h. Changed the default filename completion function to call the filename
4338 dequoting function if the directory completion hook isn't set. This means
4339 that any directory completion hooks need to dequote the directory name,
4340 since application-specific hooks need to know how the word was quoted,
4341 even if no other changes are made.
4343 i. Fixed a bug with creating the prompt for a non-interactive search string
4344 when there are non-printing characters in the primary prompt.
4346 j. Fixed a bug that caused prompts with invisible characters to be redrawn
4347 multiple times in a multibyte locale.
4349 k. Fixed a bug that could cause the key sequence scanning code to return the
4352 l. Fixed a problem with the callback interface that caused it to fail when
4353 using multi-character keyboard macros.
4355 m. Fixed a bug that could cause a core dump when an edited history entry was
4356 re-executed under certain conditions.
4358 n. Fixed a bug that caused readline to reference freed memory when attmpting
4359 to display a portion of the prompt.
4361 3. New Features in Bash
4363 a. Changed the parameter pattern replacement functions to not anchor the
4364 pattern at the beginning of the string if doing global replacement - that
4365 combination doesn't make any sense.
4367 b. When running in `word expansion only' mode (--wordexp option), inhibit
4368 process substitution.
4370 c. Loadable builtins now work on MacOS X 10.[34].
4372 d. Shells running in posix mode no longer set $HOME, as POSIX requires.
4374 e. The code that checks for binary files being executed as shell scripts now
4375 checks only for NUL rather than any non-printing character.
4377 f. Quoting the string argument to the [[ command's =~ operator now forces
4378 string matching, as with the other pattern-matching operators.
4380 4. New Features in Readline
4382 a. Calling applications can now set the keyboard timeout to 0, allowing
4385 b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
4386 the default last-ditch startup file.
4388 c. The history file reading functions now allow windows-like \r\n line
4391 ------------------------------------------------------------------------------
4392 This document details the changes between this version, bash-3.1-release,
4393 and the previous version, bash-3.1-rc2.
4395 1. Changes to Readline
4397 a. Several changes to the multibyte redisplay code to fix problems with
4398 prompts containing invisible characters.
4400 ------------------------------------------------------------------------------
4401 This document details the changes between this version, bash-3.1-rc2,
4402 and the previous version, bash-3.1-rc1.
4406 a. Fixed a bug that caused a DEBUG trap to overwrite a command string that's
4407 eventually attached to a background job.
4409 b. Changed some code so that filenames with leading tildes with spaces in the
4410 name aren't tilde-expanded by the bash completion code.
4412 c. Fixed a bug that caused the pushd builtin to fail to change to
4413 directories with leading `-'.
4415 d. Fixed a small memory leak in the programmable completion code.
4417 2. Changes to Readline
4419 a. Fixed a redisplay bug caused by moving the cursor vertically to a line
4420 with invisible characters in the prompt in a multibyte locale.
4422 b. Fixed a bug that could cause the terminal special chars to be bound in the
4423 wrong keymap in vi mode.
4425 3. New Features in Bash
4427 a. If compiled for strict POSIX conformance, LINES and COLUMNS may now
4428 override the true terminal size.
4430 4. New Features in Readline
4432 a. A new external application-controllable variable that allows the LINES
4433 and COLUMNS environment variables to set the window size regardless of
4434 what the kernel returns.
4436 ------------------------------------------------------------------------------
4437 This document details the changes between this version, bash-3.1-rc1,
4438 and the previous version, bash-3.1-beta1.
4442 a. Fixed a bug that could cause core dumps due to accessing the current
4443 pipeline while in the middle of modifying it.
4445 b. Fixed a bug that caused pathnames with backslashes still quoting characters
4446 to be passed to opendir().
4448 c. Command word completion now obeys the setting of completion-ignore-case.
4450 d. Fixed a problem with redirection that caused file descriptors greater than
4451 2 to be inappropriately marked as close-on-exec.
4453 e. In Posix mode, after `wait' is called to wait for a particular process
4454 explicitly, that process is removed from the list of processes known to
4455 the shell, and subsequent attempts to wait for it return errors.
4457 f. Fixed a bug that caused extended pattern matching to incorrectly scan
4458 backslash-escaped pattern characters.
4460 g. Fixed a synchronization problem that could cause core dumps when handling
4463 h. Fixed a bug that caused an unmatched backquote to be accepted without an
4464 error when processing here documents.
4466 i. Fixed a small memory leak in the `cd' builtin.
4468 j. Fix for MacOS X so it gets the values for the HOSTTYPE, MACHTYPE, and
4469 OSTYPE variables at build time, to support universal binaries.
4471 k. Fixed a bug that could cause an exit trap to return the exit status of
4472 the trap command rather than the status as it was before the trap was
4473 run as the shell's exit status.
4475 2. New Features in Bash
4477 3. Changes to Readline
4479 a. Fixed a bug that caused reversing the incremental search direction to
4482 b. Fixed the vi-mode `U' command to only undo up to the first time insert mode
4483 was entered, as Posix specifies.
4485 c. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
4488 4. New Features in Readline
4490 a. New application-callable auxiliary function, rl_variable_value, returns
4491 a string corresponding to a readline variable's value.
4493 b. When parsing inputrc files and variable binding commands, the parser
4494 strips trailing whitespace from values assigned to boolean variables
4495 before checking them.
4498 ------------------------------------------------------------------------------
4499 This document details the changes between this version, bash-3.1-beta1,
4500 and the previous version, bash-3.1-alpha1.
4504 a. Added some system-specific signal names.
4506 b. Fixed a typo in the ulimit builtin to make `x' the right option to
4507 maniuplate the limit on file locks.
4509 c. Fixed a problem with using += to append to index 0 of an array variable
4510 when not using subscript syntax.
4512 d. A few changes to configure.in to remove calls to obsolete or outdated
4515 e. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
4516 made when the variable is set in the temporary environment to a command.
4518 f. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
4519 made when the variable is modified using `printf -v'.
4521 g. The export environment is now remade on cygwin when HOME is changed, so
4522 DLLs bash is linked against pick up the new value. This fixes problems
4523 with tilde expansion when linking against and already-installed readline.
4525 h. Small fix to the logic for performing tilde expansion in posix mode, so
4526 expansion on the right-hand side of an assignment statement takes place.
4528 i. Fixed a bug that prevented redirections associated with a shell function
4529 from being executed when in a subshell.
4531 j. Fixed `source' and `.' builtins to not require an executable file when
4532 searching $PATH for a file to source.
4534 k. Fixed a bug that caused incorrect word splitting in a function when IFS
4535 was declared local, then unset.
4537 l. Fixed a problem with the `kill' builtin that prevented sending signals
4538 to a process group under certain circumstances when providing a pid < 0.
4540 m. When in POSIX mode, `pwd' now checks that the value it prints is the same
4541 directory as `.', even when displaying $PWD.
4543 n. Fixed a problem with the `read' builtin when reading a script from standard
4544 input and reading data from the same file.
4546 o. Fixed a problem with the `type' and `command' builtins that caused absolute
4547 pathnames to be displayed incorrectly.
4549 p. Some changes to the `bg' builtin for POSIX conformance.
4551 q. The `fc' builtin now removes the `fc' command that caused it to invoke an
4552 editor on specified history entries from the history entirely, rather than
4555 r. When in POSIX mode, the `v' command in vi editing mode simply invokes vi
4556 on the current command, rather than checking $FCEDIT and $EDITOR.
4558 s. Fixed a small memory leak in the pathname canonicalization code.
4560 t. Fixed a bug that caused the expanded value of a $'...' string to be
4561 incorrectly re-quoted if it occurred within a double-quoted ${...}
4562 parameter expansion.
4564 u. Restored default emacs-mode key binding of M-TAB to dynamic-complete-history.
4566 v. Fixed a bug that caused core dumps when interrupting loops running builtins
4569 w. Make sure that some of the functions bash provides replacements for are
4572 x. The code that scans embedded commands for the parser (`...` and $(...)) is
4573 now more aware of embedded comments and their effect on quoted strings.
4575 y. Changed the `-n' option to the `history' builtin to not reset the number of
4576 history lines read in the current session after reading the new lines from
4577 the history file if the history is being appended when it is written to
4578 the file, since the appending takes care of the problem that the adjustment
4579 was intended to solve.
4581 z. Improved the error message displayed when a shell script fails to execute
4582 because the environment and size of command line arguments are too large.
4584 aa. A small fix to make sure that $HISTCMD is evaluated whenever the shell is
4585 saving commands to the history list, not just when HISTSIZE is defined.
4587 2. Changes to Readline
4589 a. The `change-case' command now correctly changes the case of multibyte
4592 b. Changes to the shared library construction scripts to deal with Windows
4593 DLL naming conventions for Cygwin.
4595 c. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
4598 d. Fixed the non-incremental search code in vi mode to dispose of any current
4599 undo list when copying a line from the history into the current editing
4602 e. The variable assignment code now ignores whitespace at the end of lines
4603 when assigning to boolean variables.
4605 f. The `C-w' binding in incremental search now understands multibyte
4608 3. New Features in Bash
4610 a. A new configuration option, `--enable-strict-posix-default', which will
4611 build bash to be POSIX conforming by default.
4613 4. New Features in Readline
4615 a. If the rl_completion_query_items is set to a value < 0, readline never
4616 asks the user whether or not to view the possible completions.
4618 ------------------------------------------------------------------------------
4619 This document details the changes between this version, bash-3.1-alpha1,
4620 and the previous version, bash-3.0-release.
4624 a. Fixed a bug that caused bash to crash if referencing an unset local array.
4626 b. Fixed a problem that caused tilde expansion to not be performed before
4627 attempting globbing word completion.
4629 c. Fixed an incompatibility so that a first argument to trap that's a valid
4630 signal number will be trated as a signal rather than a command to execute.
4632 d. Fixed ${#word} expansion to correctly compute the length of a string
4633 containing multibyte characters.
4635 e. Fixed a bug that caused bash to not pass the correct flags for signal
4636 disposition to child processes.
4638 f. Fixed a bug that caused `fc -l' to list one too many history entries.
4640 g. Some fixes to `fc' for POSIX conformance.
4642 h. Some fixes to job status display for POSIX conformance.
4644 i. Fixed a bug that caused `command -v' to display output if a command was not
4645 found -- it should be silent.
4647 j. In POSIX mode, `type' and `command -[vV]' do not report non-executable
4648 files, even if the shell will attempt to execute them.
4650 k. Fixed a bug that caused the `==' operator to the [[ command to not attempt
4651 extended pattern matching.
4653 l. Fixed the brace expansion code to handle characters whose value exceeds 128.
4655 m. Fixed `printf' to handle strings with a leading `\0' whose length is
4658 n. Fixed a couple of problems with brace expansion where `${' was handled
4661 o. Fixed off-by-one error when calculating the upper bound of `offset' when
4662 processing the ${array[@]:offset:length} expansion.
4664 p. System-specific configuration changes for: FreeBSD 5.x, Interix, MacOS X
4665 10.4, Linux 2.4+ kernels, Linux 3.x kernels, Dragonfly BSD, QNX 6.x,
4668 q. Fixed a bug that caused the shell to ignore the status of the rightmost
4669 command in a pipeline when the `pipefail' option was enabled.
4671 r. Fixed a completion bug that caused core dumps when expanding a directory
4674 s. Fixed a bug that prevented `hash -d' from removing commands from the hash
4677 t. Fixed word splitting to avoid really bad quadratic performance when
4678 expanding long lists.
4680 u. Fixed a bug that caused negative offsets in substring expansion to use the
4683 v. Fixed a bug in printf that caused it to not return failure on write errors.
4685 w. Fixed a bug that caused commands in subshells to not be properly timed.
4687 x. The shell parser no longer attempts to parse a compound assignment specially
4688 unless in a position where an assignment statement is acceptable or parsing
4689 arguments to a builtin that accepts assignment statements.
4691 y. Fixed a problem that caused a `case' statement to be added to the history
4692 incorrectly as a single command if the `case word' was on one line and the
4695 z. Fixed a problem that caused internal shell quoting characters to be
4696 incorrectly quoted with backslashes under some circumstances.
4698 aa. The shell now performs correct word splitting when IFS contains multibyte
4701 bb. The mail checking code now resets the cached file information if the size
4702 drops to 0, even if the times don't change.
4704 cc. A completed command name that is found in $PATH as well as the name of a
4705 directory in the current directory no longer has a slash appended in certain
4706 circumstances: a single instance found in $PATH when `.' is not in $PATH,
4707 and multiple instances found in $PATH, even when `.' is in $PATH.
4709 dd. Incorporated tilde expansion into the word expansion code rather than as a
4710 separately-called function, fixing some cases where it was performed
4711 inappropriately (e.g., after the second `=' in an assignment statement or
4712 in a double-quoted parameter expansion).
4714 ee. Fixed several bugs encountered when parsing compound assignment statements,
4715 so that compound assignments appearing as arguments to builtins are no
4716 longer double-expanded.
4718 ff. Fixed a bug in the command execution code that caused asynchronous commands
4719 containing command substitutions to not put the terminal in the wrong
4722 gg. Bash now handles the case where the WCONTINUED flag causes waitpid() to
4723 return -1/EINVAL at runtime as well as configuration time.
4725 hh. Fixed parser to generate an error when the pipeline `argument' to `!' or
4728 ii. The shell now takes a little more care when manipulating file descriptors
4729 greater than 9 with the `exec' builtin.
4731 jj. Fixed a bug that caused variable assignments preceding the `command' builtin
4732 preceding a special builtin to be preserved after the command completed in
4735 kk. Fixed a bug that allowed variables beginning with a digit to be created.
4737 ll. Fixed a bug that caused a \<newline> to be removed when parsing a $'...'
4740 mm. A shell whose name begins with `-' will now be a restricted shell if the
4741 remainder of the name indicates it should be restricted.
4743 nn. Fixed a bug that could cause a core dump if FUNCNAME were changed or unset
4744 during a function's execution.
4746 oo. Fixed a bug that caused executing a `return' in a function to not execute
4747 a RETURN trap. The RETURN trap is inherited by shell functions only if
4748 function tracing is globally enabled or has been enabled for that function.
4750 pp. Fixed cases where var[@] was not handled exactly like var, when var is a
4753 qq. Fixed a bug that caused the first character after a SIGINT to be discarded
4754 under certain circumstances.
4756 rr. Fixed exit status code so that a suspended job returns 128+signal as its
4757 exit status (preventing commands after it in `&&' lists from being
4760 ss. Fixed a bug that caused the shell parser state to be changed by executing
4761 a shell function as a result of word completion.
4763 tt. Fixed a long-standing bug that caused '\177' characters in variable
4764 values to be discarded when expanded in double-quoted strings.
4766 uu. Fixed a bug that caused $RANDOM to be re-seeded multiple times in a
4767 subshell environment.
4769 vv. Extensive changes to the job management code to avoid the pid-reuse and
4770 pid-aliasing problems caused by retaining the exit status of too many jobs,
4771 but still retain as many background job statuses as POSIX requires.
4773 ww. Fixed a parser bug in processing \<newline> that caused things like
4778 to not work correctly.
4780 xx. `pwd -P' now sets $PWD to a directory name containing no symbolic links
4781 when in posix mode, as POSIX requires.
4783 yy. In posix mode, bash no longer sets $PWD to a name containing no symbolic
4784 links if a directory is chosen from $CDPATH.
4786 zz. The word splitting code now treats an IFS character that is not space,
4787 tab, or newline and any adjacent IFS white space as a single delimiter, as
4790 aaa. The `read' builtin now checks whether or not the number of fields read is
4791 exactly the same as the number of variables instead of just assigning the
4792 rest of the line (minus any trailing IFS white space) to the last
4793 variable. This is what POSIX/SUS/XPG all require.
4795 bbb. Fixed a bug that caused `read' to always check whether or not fd 0 was a
4796 pipe, even when reading from another file descriptor.
4798 ccc. Fixed a bug that caused short-circuiting of execution even if the return
4799 value was being inverted.
4801 ddd. Fixed a bug that caused a core dump while decoding \W escapes in PS1 if
4804 eee. Fixed a bug in `read' that counted internal quoting characters for the
4805 purposes of `read -n'.
4807 fff. Fixed a bug so that a function definition in a pipeline causes a child
4808 process to be forked at the right time.
4810 ggg. Bash will not attempt to link against a readline library that doesn't
4811 have rl_gnu_readline_p == 1.
4813 hhh. Fixed a bug that caused `read' to consume one too many characters when
4814 reading a fixed number of characters and the Nth character is a backslash.
4816 iii. Fixed a bug that caused `unset' on variables in the temporary environment
4817 to leave them set when `unset' completed.
4819 jjj. Fixed a bug that caused bash to close fd 2 if an `exec' failed and the
4822 kkk. The completion code is more careful to not turn `/' or `///' into `//',
4823 for those systems on which `//' has special meaning.
4825 lll. Fixed a bug that caused command substitution in asynchronous commands to
4826 close the wrong file descriptors.
4828 mmm. The shell no longer prints status messages about terminated background
4829 processes unless job control is active.
4831 nnn. Fixed a bug that prevented multiple consecutive invocations of `history -s'
4832 from adding all the commands to the history list.
4834 ooo. Added a couple of changes to make arithmetic expansion more consistent in
4835 all its contexts (still not perfect).
4837 ppp. Fixed a bug that caused the parser to occasionally not find the right
4838 terminating "`" in an old-style command substitution.
4840 qqq. Fixed a bug that caused core dumps when the shell was reading its non-
4841 interactive input from fd 0 and fd 0 was duplicated and restored using a
4842 combination of `exec' (to save) and redirection (to restore).
4844 rrr. Fixed a problem that caused loops in sourced scripts to not be cleaned
4845 up properly when a `return' is executed.
4847 sss. Change internal command substitution completion function to append a slash
4848 to directory names in the command.
4850 2. Changes to Readline
4852 a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
4855 b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
4858 c. Fixed a problem in computing the number of invisible characters on the first
4859 line of a prompt whose length exceeds the screen width.
4861 d. Fixed vi-mode searching so that failure preserves the current line rather
4862 than the last line in the history list.
4864 e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
4865 end-of-line when manipulating multibyte characters.
4867 f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
4868 end-of-line when manipulating multibyte characters.
4870 g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
4871 prompts longer than the screen width containing multibyte characters,
4873 h. Fix the calculation of the number of physical characters in the prompt
4874 string when it contains multibyte characters.
4876 i. A non-zero value for the `rl_complete_suppress_append' variable now causes
4877 no `/' to be appended to a directory name.
4879 j. Fixed forward-word and backward-word to work when words contained
4880 multibyte characters.
4882 k. Fixed a bug in finding the delimiter of a `?' substring when performing
4883 history expansion in a locale that supports multibyte characters.
4885 l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
4887 m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
4888 of the `convert-meta' variable.
4890 n. Fixed saving and restoring primary prompt when prompting for incremental
4891 and non-incremental searches; search prompts now display multibyte
4892 characters correctly.
4894 o. Fixed a bug that caused keys originally bound to self-insert but shadowed
4895 by a multi-character key sequence to not be inserted.
4897 p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
4898 dereferenced if NULL (matching the documentation).
4900 q. Extensive changes to readline to add enough state so that commands
4901 requiring additional characters (searches, multi-key sequences, numeric
4902 arguments, commands requiring an additional specifier character like
4903 vi-mode change-char, etc.) work without synchronously waiting for
4906 r. Lots of changes so readline builds and runs on MinGW.
4908 s. Readline no longer tries to modify the terminal settings when running in
4911 t. The Readline display code no longer sets the location of the last invisible
4912 character in the prompt if the \[\] sequence is empty.
4914 3. New Features in Bash
4916 a. Bash now understands LC_TIME as a special variable so that time display
4917 tracks the current locale.
4919 b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created
4920 as `invisible' variables and may not be unset.
4922 c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't
4923 try to interpret any options at all, as POSIX requires.
4925 d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.
4927 e. Fixed vi-mode word completion and glob expansion to perform tilde
4930 f. The `**' mathematic exponentiation operator is now right-associative.
4932 g. The `ulimit' builtin has new options: -i (max number of pending signals),
4933 -q (max size of POSIX message queues), and -x (max number of file locks).
4935 h. A bare `%' once again expands to the current job when used as a job
4938 i. The `+=' assignment operator (append to the value of a string or array) is
4939 now supported for assignment statements and arguments to builtin commands
4940 that accept assignment statements.
4942 j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.
4944 k. The `gnu_errfmt' option is enabled automatically if the shell is running
4945 in an emacs terminal window.
4947 l. New configuration option: --single-help-strings. Causes long help text
4948 to be written as a single string; intended to ease translation.
4950 m. The COMP_WORDBREAKS variable now causes the list of word break characters
4951 to be emptied when the variable is unset.
4953 n. An unquoted expansion of $* when $IFS is empty now causes the positional
4954 parameters to be concatenated if the expansion doesn't undergo word
4957 o. Bash now inherits $_ from the environment if it appears there at startup.
4959 p. New shell option: nocasematch. If non-zero, shell pattern matching ignores
4960 case when used by `case' and `[[' commands.
4962 q. The `printf' builtin takes a new option: -v var. That causes the output
4963 to be placed into var instead of on stdout.
4965 r. By default, the shell no longer reports processes dying from SIGPIPE.
4967 s. Bash now sets the extern variable `environ' to the export environment it
4968 creates, so C library functions that call getenv() (and can't use the
4969 shell-provided replacement) get current values of environment variables.
4971 4. New Features in Readline
4973 a. The key sequence sent by the keypad `delete' key is now automatically
4974 bound to delete-char.
4976 b. A negative argument to menu-complete now cycles backward through the
4979 c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
4980 readline will bind the terminal special characters to their readline
4981 equivalents when it's called (on by default).
4983 d. New bindable command: vi-rubout. Saves deleted text for possible
4984 reinsertion, as with any vi-mode `text modification' command; `X' is bound
4985 to this in vi command mode.
4987 ------------------------------------------------------------------------------
4988 This document details the changes between this version, bash-3.0-release,
4989 and the previous version, bash-3.0-rc1.
4993 a. Fixed a boundary overrun that could cause segmentation faults when the
4994 completion code hands an incomplete construct to the word expansion
4997 b. Changed posix mode behavior so that an error in a variable assignment
4998 preceding a special builtin causes a non-interactive shell to exit.
5000 c. Change the directory expansion portion of the completion code to not
5001 expand embedded command substitutions if the directory name appears in
5004 d. Fixed a problem that caused `bash -r' to turn on restrictions before
5005 reading the startup files.
5007 e. Fixed a problem with the default operation of the `umask' builtin.
5009 2. Changes to Readline
5011 a. Fixed a problem with readline saving the contents of the current line
5012 before beginning a non-interactive search.
5014 b. Fixed a problem with EOF detection when using rl_event_hook.
5016 c. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
5019 ------------------------------------------------------------------------------
5020 This document details the changes between this version, bash-3.0-rc1,
5021 and the previous version, bash-3.0-beta1.
5025 a. Fixed a bug that caused incorrect behavior when referecing element 0 of
5026 an array using $array, element 0 was unset, and `set -u' was enabled.
5028 b. System-specific changes for: SCO Unix 3.2, Tandem.
5030 c. Fixed a bug that caused inappropriate word splitting when a variable was
5031 expanded within a double-quoted string that also included $@.
5033 d. Fixed a bug that caused `pwd' to not display anything in physical mode
5034 when the file system had changed underneath the shell.
5036 e. Fixed a bug in the pre- and post- increment and decrement parsing in the
5037 expression evaluator that caused errors when the operands and corresponding
5038 operators were separated by whitespace.
5040 f. Fixed a bug that caused `history -p' to add an entry to the history list,
5041 counter to the documentation. (Keeps the history expansions invoked by
5042 emacs-mode command line editing from doing that as well.)
5044 g. Fixed a bug that could cause a core dump if `cd' is asked to print out a
5045 pathname longer than PATH_MAX characters.
5047 h. Fixed a bug that caused jobs to be put into the wrong process group under
5048 some circumstances after enabling job control with `set -m'.
5050 i. `unalias' now returns failure if no alias name arguments are supplied.
5052 j. Documented the characters not allowed to appear in an alias name.
5054 k. $* is no longer expanded as if in double quotes when it appears in the
5055 body of a here document, as the SUS seems to require.
5057 l. The `bashbug' script now uses a directory in $TMPDIR for exclusive
5058 access rather than trying to guess how the underlying OS provides for
5059 secure temporary file creation.
5061 m. Fixed a few problems with `cd' and `pwd' when asked to operate on pathnames
5062 longer than PATH_MAX characters.
5064 n. Fixed a memory leak caused when creating multiple local array variables
5065 with identical names.
5067 o. Fixed a problem with calls to getcwd() so that bash now operates better
5068 when the full pathname to the current directory is longer than PATH_MAX
5071 p. The `trap' builtin now reports an error if a single non-signal argument
5074 q. Fixed a bug that caused `umask' to not work correctly when presented
5075 with a mask of all 0s.
5077 r. When `getopts' reaches the end of options, OPTARG is unset, as POSIX
5080 s. Interactive mode now depends on whether or not stdin and stderr are
5081 connected to a tty; formerly it was stdin and stdout. POSIX requires
5084 t. Fixed vi-mode completion to work more as POSIX specifies (e.g., doing the
5085 right kind of filename generation).
5087 2. Changes to Readline
5089 a. Fixed a problem that could cause readline to refer to freed memory when
5090 moving between history lines while doing searches.
5092 b. Improvements to the code that expands and displays prompt strings
5093 containing multibyte characters.
5095 c. Fixed a problem with vi-mode not correctly remembering the numeric argument
5096 to the last `c'hange command for later use with `.'.
5098 d. Fixed a bug in vi-mode that caused multi-digit count arguments to work
5101 e. Fixed a problem in vi-mode that caused the last text modification command
5102 to not be remembered across different command lines.
5104 f. Fixed problems with changing characters and changing case at the end of
5107 3. New Features in Bash
5109 a. The `jobs', `kill', and `wait' builtins now accept job control notation
5110 even if job control is not enabled.
5112 b. The historical behavior of `trap' that allows a missing `action' argument
5113 to cause each specified signal's handling to be reset to its default is
5114 now only supported when `trap' is given a single non-option argument.
5116 4. New Features in Readline
5118 a. When listing completions, directories have a `/' appended if the
5119 `mark-directories' option has been enabled.
5121 ------------------------------------------------------------------------------
5122 This document details the changes between this version, bash-3.0-beta1,
5123 and the previous version, bash-3.0-alpha.
5127 a. Fixes to build correctly when arrays are not compiled into the shell.
5129 b. Fixed command substitution to run any exit trap defined in the command
5130 substitution before returning; the exit trap is not inherited from the
5133 c. Fixes to process group synchronization code so that every child process
5134 attempts to set the terminal's process group; fixes some synchronization
5135 problems on Linux kernels that schedule the child to always run before
5138 d. Fixed processing of octal and hex constants in printf builtin for POSIX.2
5141 e. Fixed a couple of core dumps in the pattern removal code.
5143 f. Fixes to the array subrange extraction code to deal better with sparse
5146 g. Parser errors and other errors that result in the shell exiting now cause
5147 the exit trap to be run.
5149 h. Change the command substitution completion functions to not append any
5150 closing quote, because it would be inserted a closing "`" or ")".
5152 i. Fix history initialization so assignments to $histchars made in startup
5155 j. If an exit trap does not contain a call to `exit', the shell now uses
5156 the exit status of the last command executed before the trap as the exit
5157 status of the shell.
5159 k. The parser now prompts with $PS2 if it reads a newline while parsing a
5160 compound array assignment statement.
5162 l. When performing a compound array assignment, the parser doesn't treat
5163 words of the form [index]=value as assignments if they're the result of
5166 m. Fixed a bug that caused `return' executed in a trap command to make the
5167 shell think it was still running the trap.
5169 n. Fixed the value of errno set by the pathname canonicalization functions.
5171 o. Changed the grammar so that `time' alone on a line times a null command
5172 rather than being a syntax error.
5174 p. The pattern substitution code no longer performs quote removal on the
5175 pattern before trying to match it, as the pattern removal functions do.
5177 q. Fixed a bug that could cause core dumps when checking whether a quoted
5178 command name was being completed.
5180 r. Fixes to the pattern removal and pattern replacement expansions to deal
5181 with multibyte characters better (and faster).
5183 s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly
5184 multibyte) characters instead of raw bytes.
5186 t. Fixed a bug that caused some key bindings set in an inputrc to be ignored
5189 u. Fixed a bug that caused unsetting a local variable within a function to
5192 v. Fixed a bug that caused invalid variables to be created when using
5195 w. Fixed a bug that caused "$@" to expand incorrectly when used as the right
5196 hand side of a parameter expansion such as ${word:="$@"} if the first
5197 character of $IFS was not a space.
5199 x. Fixed a slight cosmetic problem when printing commands containing a
5200 `>&word' redirection.
5202 y. Fixed a problem that could cause here documents to not be created correctly
5203 if the system temporary directory did not allow writing.
5205 2. Changes to Readline
5207 a. Change to history expansion functions to treat `^' as equivalent to word
5208 one, as the documention states.
5210 b. Some changes to the display code to improve display and redisplay of
5211 multibyte characters.
5213 c. Changes to speed up the multibyte character redisplay code.
5215 d. Fixed a bug in the vi-mode `E' command that caused it to skip over the
5216 last character of a word if invoked while point was on the word's
5217 next-to-last character.
5219 e. Fixed a bug that could cause incorrect filename quoting when
5220 case-insensitive completion was enabled and the word being completed
5221 contained backslashes quoting word break characters.
5223 f. Fixed a bug in redisplay triggered when the prompt string contains
5224 invisible characters.
5226 g. Fixed some display (and other) bugs encountered in multibyte locales
5227 when a non-ascii character was the last character on a line.
5229 h. Fixed some display bugs caused by multibyte characters in prompt strings.
5231 i. Fixed a problem with history expansion caused by non-whitespace characters
5232 used as history word delimiters.
5234 3. New Features in Bash
5236 a. printf builtin understands two new escape sequences: \" and \?.
5238 b. `echo -e' understands two new escape sequences: \" and \?.
5240 c. The GNU `gettext' package and libintl have been integrated; the shell's
5241 messages can be translated into different languages.
5243 d. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.
5245 e. The error message printed when bash cannot open a shell script supplied
5246 as argument 1 now includes the name of the shell, to better identify
5247 the error as coming from bash.
5249 4. New Features in Readline
5251 a. New application variable, rl_completion_quote_character, set to any
5252 quote character readline finds before it calls the application completion
5255 b. New application variable, rl_completion_suppress_quote, settable by an
5256 application completion function. If set to non-zero, readline does not
5257 attempt to append a closing quote to a completed word.
5259 c. New application variable, rl_completion_found_quote, set to a non-zero
5260 value if readline determines that the word to be completed is quoted.
5261 Set before readline calls any application completion function.
5263 d. New function hook, rl_completion_word_break_hook, called when readline
5264 needs to break a line into words when completion is attempted. Allows
5265 the word break characters to vary based on position in the line.
5267 e. New bindable command: unix-filename-rubout. Does the same thing as
5268 unix-word-rubout, but adds `/' to the set of word delimiters.
5270 ------------------------------------------------------------------------------
5271 This document details the changes between this version, bash-3.0-alpha,
5272 and the previous version, bash-2.05b-release.
5276 a. Fixes so that the shell will compile without some of the default options
5279 b. Fixed an error message that did not pass enough arguments to printf.
5281 c. Fixed a bug that caused input redirection to a builtin inside a script
5282 being read from standard input to result in the rest of the already-
5283 read and buffered script to be discarded.
5285 d. Fixed a bug that caused subshell initialization to close the file
5286 descriptor from which the shell was reading a script under certain
5289 e. Fixed a bug that caused the shell to not advance a string pointer over
5290 a null wide character when doing string operations.
5292 f. Fixed the internal logout code so that shells that time out waiting for
5293 input (using $TMOUT) run ~/.bash_logout.
5295 g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD.
5297 h. The parser no longer adds implicit double quotes to ((...)) arithmetic
5300 i. The ((...)) arithmetic command evaluation code was fixed to not dump core
5301 when the expanded string is null.
5303 j. The ((...)) arithmetic command evaluation code was fixed to not perform
5304 variable assignments while expanding the expression.
5306 k. Fixed a bug that caused word splitting to be performed incorrectly when
5307 IFS is set, but null.
5309 l. Fixed a bug in brace expansion that caused a quoted `$' preceding an
5310 open brace to inhibit brace expansion.
5312 m. Fixed a bug that caused a leading `-' in the shell's name to cause it to
5313 not be recognized as a restricted shell.
5315 n. Fixed a bug in the arithmetic evaluation code that could cause longjmps
5316 to an invalid location and result in a core dump.
5318 o. Fixed a bug in the calculation of how many history lines are new in a
5319 single shell session when reading new history lines from a file with
5322 p. Fixed a bug in pathname canonicalization that caused the shell to dump
5323 core when presented with a pathname longer than PATH_MAX.
5325 q. Fixed the parser so that it doesn't try to compare a char variable to
5326 EOF, which fails when chars are unsigned.
5328 r. Fixed a bug in the simple command execution code that caused occasional
5331 s. The shell does a better job of saving any partial parsing state during
5332 operations which cause a command to be executed while a line is being
5335 t. The completion code now splits words more like the expansion code when
5336 $IFS is used to split.
5338 u. The locale code does a better job of recomputing the various locale
5339 variable values when LC_ALL is unset.
5341 v. The programmable completion code does a better job of dequoting expanded
5342 word lists before comparing them against the word to be matched.
5344 w. The shell no longer seg faults if the expanded value of $PS4 is null
5345 and `set -x' is enabled.
5347 x. Fixed a bug that caused core dumps when a here string expanded to NULL.
5349 y. The mail checking code now makes sure the mailbox is bigger before
5350 reporting the existence of new mail.
5352 z. The parser does not try to expand $'...' and $"..." when the appear
5353 within double quotes unless the `extquote' option has been enabled with
5354 `shopt'. For backwards compatibility, it is enabled by default.
5356 aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use
5357 $@ instead of "$@" for the implicit list of arguments.
5359 bb. Fixed a bug that caused a subshell of a restricted shell (e.g., one
5360 spawned to execute a pipeline) to not exit immediately if attempting
5361 to use a command containing a slash.
5363 cc. Fixed a problem with empty replacements for a pattern that doesn't match
5364 when performing ${param/word/} expansion.
5366 dd. Word expansions performed while expanding redirections no longer search
5367 a command's temporary environment to expand variable values.
5369 ee. Improvements to the alias expansion code when expanding subsequent words
5370 because an aliase's value ends with a space.
5372 ff. `cd -' now prints the current working directory after a successful chdir
5373 even when the shell is not interactive, as the standard requires.
5375 gg. The shell does a better job of ensuring a child process dies of SIGINT
5376 before resending SIGINT to itself.
5378 hh. The arithmetic expansion variable assignment code now does the right
5379 thing when assigning to `special' variables like OPTIND.
5381 ii. When history expansion verification is enabled, the bash readline helper
5382 functions that do history expansion on the current line don't print
5385 jj. Fixed bugs with multiple consecutive alias expansion when one of the
5386 expansions ends with a space.
5388 kk. Fixed a problem in the programmable completion code that could cause core
5389 dumps when trying to initialize a set of possible completions from a
5392 ll. The \[ and \] escape characters are now ignored when decoding the prompt
5393 string if the shell is started with editing disabled.
5395 mm. Fixed a bug that could leave extra characters in a string when doing
5396 quoted null character removal.
5398 nn. Command substitution and other subshell operations no longer reset the
5399 line number (aids the bash debugger).
5401 oo. Better line number management when executing simple commands, conditional
5402 commands, for commands, and select commands.
5404 pp. The globbing code now uses malloc, with its better failure properties,
5405 rather than alloca().
5407 qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the
5408 appropriate array element instead of a variable named `a[2]'.
5410 rr. Fixed a bug in the handling of a `?(...)' pattern immediately following
5411 a `*' when extglob is enabled.
5413 ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is
5414 invoked in a function to misbehave.
5416 tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped
5417 by the internal shell string quoting functions.
5419 uu. Fixed a bug that caused quoted null characters in an expanded word list
5420 to be inappropriately assigned to an array variable when using `read -a'.
5422 vv. Fixed a bug that caused redirections accompanying a null command to persist
5423 in the current shell.
5425 ww. Fixed a bug that caused the prompt to be printed when the shell was
5426 expanding a multiline alias.
5428 xx. Fixed a bug that resulted in core dumps when the completion for a command
5429 changed the compspec.
5431 yy. Fixed a bug that caused evaluation of programmable completions to print
5432 notifications of completed jobs.
5434 zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb'
5435 (which is what emacs shell windows do).
5437 aaa. In posix mode, `kill -l' causes signal names to be displayed without
5440 bbb. Clear error flag on standard output so it doesn't persist across multiple
5443 ccc. In posix mode, `alias' displays alias values without the leading `alias',
5444 so the output cannot be used as subsequent input.
5446 ddd. In posix mode, the `trap' builtin doesn't check whether or not its
5447 first argument is a signal specification and revert the signal handling
5448 to its original disposition if it is.
5450 eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the
5451 pattern substitution and removal expansions.
5453 fff. Fixed several problems with the handling of ${array[@]}, ${array[*]},
5454 $@, and $* by the indirect variable expansion code.
5456 ggg. Fixed a bug that did not allow `time' to be aliased.
5458 hhh. Improved the mail checking code so it won't check (and possibly cause an
5459 NFS file system mount) until MAILPATH or MAIL is given a value -- there
5460 is no default if DEFAULT_MAIL_DIRECTORY is not defined at compile time.
5461 (It is computed by configure, but can be #undef'd in config-bot.h.)
5463 iii. If the `chkwinsize' option is enabled, the shell checks for window size
5464 changes if a child process exits due to a signal.
5466 jjj. Removed the attempts to avoid adding a slash at the end of a completed
5467 executable name if there was a directory with the same name in the
5470 kkk. Fixed PATH lookup code so it treats the permission bits separately for
5471 owner, group, and other, rather than checking them all.
5473 lll. Fixed the locale code to reset the parser's idea of the character class
5474 <blank>, which controls how it splits tokens, when the locale changes.
5476 mmm. The shell now binds its special readline functions and key bindings only
5477 if the user's inputrc file has not already bound them.
5479 nnn. The shell now reports on processes that dump core due to signals when
5480 invoked as `-c command'.
5482 2. Changes to Readline
5484 a. Fixes to avoid core dumps because of null pointer references in the
5485 multibyte character code.
5487 b. Fix to avoid infinite recursion caused by certain key combinations.
5489 c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
5491 d. Readline no longer tries to read ahead more than one line of input, even
5492 when more is available.
5494 e. Fixed the code that adjusts the point to not mishandle null wide
5497 f. Fixed a bug in the history expansion `g' modifier that caused it to skip
5500 g. Fixed a bug that caused the prompt to overwrite previous output when the
5501 output doesn't contain a newline and the locale supports multibyte
5502 characters. This same change fixes the problem of readline redisplay
5503 slowing down dramatically as the line gets longer in multibyte locales.
5505 h. History traversal with arrow keys in vi insertion mode causes the cursor
5506 to be placed at the end of the new line, like in emacs mode.
5508 i. The locale initialization code does a better job of using the right
5509 precedence and defaulting when checking the appropriate environment
5512 j. Fixed the history word tokenizer to handle <( and >( better when used as
5515 k. The overwrite mode code received several bug fixes to improve undo.
5517 l. Many speedups to the multibyte character redisplay code.
5519 m. The callback character reading interface should not hang waiting to read
5522 n. Fixed a bug with redoing vi-mode `s' command.
5524 o. The code that initializes the terminal tracks changes made to the terminal
5525 special characters with stty(1) (or equivalent), so that these changes
5526 are reflected in the readline bindings. New application-callable function
5527 to make it work: rl_tty_unset_default_bindings().
5529 p. Fixed a bug that could cause garbage to be inserted in the buffer when
5530 changing character case in vi mode when using a multibyte locale.
5532 q. Fixed a bug in the redisplay code that caused problems on systems
5533 supporting multibyte characters when moving between history lines when the
5534 new line has more glyphs but fewer bytes.
5536 r. Undo and redo now work better after exiting vi insertion mode.
5538 s. Make sure system calls are restarted after a SIGWINCH is received using
5541 t. Improvements to the code that displays possible completions when using
5542 multibyte characters.
5544 u. Fixed a problem when parsing nested if statements in inputrc files.
5546 v. The completer now takes multibyte characters into account when looking for
5547 quoted substrings on which to perform completion.
5549 w. The history search functions now perform better bounds checking on the
5552 3. New Features in Bash
5554 a. ANSI string expansion now implements the \x{hexdigits} escape.
5556 b. There is a new loadable `strftime' builtin.
5558 c. New variable, COMP_WORDBREAKS, which controls the readline completer's
5559 idea of word break characters.
5561 d. The `type' builtin no longer reports on aliases unless alias expansion
5562 will actually be performed.
5564 e. HISTCONTROL is now a colon-separated list of values, which permits
5565 more extensibility and backwards compatibility.
5567 f. HISTCONTROL may now include the `erasedups' option, which causes all lines
5568 matching a line being added to be removed from the history list.
5570 g. `configure' has a new `--enable-multibyte' argument that permits multibyte
5571 character support to be disabled even on systems that support it.
5573 h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
5574 BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
5577 i. FUNCNAME has been changed to support the debugger: it's now an array
5580 j. for, case, select, arithmetic commands now keep line number information
5583 k. There is a new `RETURN' trap executed when a function or sourced script
5584 returns (not inherited child processes; inherited by command substitution
5585 if function tracing is enabled and the debugger is active).
5587 l. New invocation option: --debugger. Enables debugging and turns on new
5588 `extdebug' shell option.
5590 m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR
5591 traps, respectively, to be inherited by shell functions. Equivalent to
5592 `set -T' and `set -E' respectively. The `functrace' option also controls
5593 whether or not the DEBUG trap is inherited by sourced scripts.
5595 n. The DEBUG trap is run before binding the variable and running the action
5596 list in a `for' command, binding the selection variable and running the
5597 query in a `select' command, and before attempting a match in a `case'
5600 o. New `--enable-debugger' option to `configure' to compile in the debugger
5603 p. `declare -F' now prints out extra line number and source file information
5604 if the `extdebug' option is set.
5606 q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes
5607 the next command to be skipped, and a return value of 2 while in a
5608 function or sourced script forces a `return'.
5610 r. New `caller' builtin to provide a call stack for the bash debugger.
5612 s. The DEBUG trap is run just before the first command in a function body is
5613 executed, for the debugger.
5615 t. `for', `select', and `case' command heads are printed when `set -x' is
5618 u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1,
5619 x+2,...,y}. x and y can be integers or single characters; the sequence
5620 may ascend or descend; the increment is always 1.
5622 v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
5625 w. New `force_fignore' shopt option; if enabled, suffixes specified by
5626 FIGNORE cause words to be ignored when performing word completion even
5627 if they're the only possibilities.
5629 x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
5630 style' (filename:lineno:message) format.
5632 y. New `-o bashdefault' option to complete and compgen; if set, causes the
5633 whole set of bash completions to be performed if the compspec doesn't
5636 z. New `-o plusdirs' option to complete and compgen; if set, causes directory
5637 name completion to be performed and the results added to the rest of the
5638 possible completions.
5640 aa. `kill' is available as a builtin even when the shell is built without
5643 bb. New HISTTIMEFORMAT variable; value is a format string to pass to
5644 strftime(3). If set and not null, the `history' builtin prints out
5645 timestamp information according to the specified format when displaying
5646 history entries. If set, bash tells the history library to write out
5647 timestamp information when the history file is written.
5649 cc. The [[ ... ]] command has a new binary `=~' operator that performs
5650 extended regular expression (egrep-like) matching.
5652 dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
5653 to enable the =~ operator and regexp matching in [[ ... ]].
5655 ee. Subexpressions matched by the =~ operator are placed in the new
5656 BASH_REMATCH array variable.
5658 ff. New `failglob' option that causes an expansion error when pathname
5659 expansion fails to produce a match.
5661 gg. New `set -o pipefail' option that causes a pipeline to return a failure
5662 status if any of the processes in the pipeline fail, not just the last
5665 4. New Features in Readline
5667 a. History expansion has a new `a' modifier equivalent to the `g' modifier
5668 for compatibility with the BSD csh.
5670 b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
5671 modifier, which performs a substitution once per word.
5673 c. All non-incremental search operations may now undo the operation of
5674 replacing the current line with the history line.
5676 d. The text inserted by an `a' command in vi mode can be reinserted with
5679 e. New bindable variable, `show-all-if-unmodified'. If set, the readline
5680 completer will list possible completions immediately if there is more
5681 than one completion and partial completion cannot be performed.
5683 f. There is a new application-callable `free_history_entry()' function.
5685 g. History list entries now contain timestamp information; the history file
5686 functions know how to read and write timestamp information associated
5689 h. Four new key binding functions have been added:
5691 rl_bind_key_if_unbound()
5692 rl_bind_key_if_unbound_in_map()
5693 rl_bind_keyseq_if_unbound()
5694 rl_bind_keyseq_if_unbound_in_map()
5696 ------------------------------------------------------------------------------
5697 This document details the changes between this version, bash-2.05b-release,
5698 and the previous version, bash-2.05b-beta2.
5702 a. Fixed an off-by-one error in the function that translates job
5705 b. Note that we're running under Emacs and disable line editing if
5708 ------------------------------------------------------------------------------
5709 This document details the changes between this version, bash-2.05b-beta2,
5710 and the previous version, bash-2.05b-beta1.
5714 a. Fixed the /= and %= arithmetic operators to catch division by zero.
5716 b. Added putenv, setenv, unsetenv to getenv replacement for completeness.
5718 c. Fixed a bug that could cause the -O expand_aliases invocation option
5721 d. Fixed a problem with process substitution that resulted in incorrect
5722 behavior when the number of process substitutions in an individual
5723 command approached 64.
5725 2. Changes to Readline
5727 a. Fixed a problem with backward-char-search when on a system with support
5728 for multibyte characters when running in a locale without any multibyte
5731 ------------------------------------------------------------------------------
5732 This document details the changes between this version, bash-2.05b-beta1,
5733 and the previous version, bash-2.05b-alpha1.
5737 a. Fixed a problem when parsing a POSIX.2 character class name while
5738 evaluating a bracket expression containing multibyte characters.
5740 b. Changed the help text for `bind' to make it clear that any command
5741 that may be placed in ~/.inputrc is a valid argument to `bind'.
5743 c. Added `help' builtin entries for `((', `[[', and arithmetic for.
5745 d. malloc updated again:
5746 o slightly better overflow and underflow detection by putting the
5747 chunk size at the beginning and end of the chunk and making
5748 sure they match in free/realloc
5749 o partial page allocated to make things page-aligned no longer
5751 o block coalescing now enabled by default
5752 o splitting and coalescing enabled for 32-byte chunks, the most
5753 common size requested
5754 o fixed a problem that resulted in spurious underflow messages and
5756 o bin sizes are precomputed and stored in an array rather than
5757 being computed at run time
5758 o malloc will return memory blocks back to the system if the block
5759 being freed is at the top of the heap and of sufficient size to
5761 o malloc/free/realloc now inline memset instead of calling the
5762 libc function; uses Duff's device for good performance
5764 e. Check for getservent(); make the service name completion code dependent
5767 f. Changed the readline callback that executes a command bound to a key
5768 sequence to not save the executed command on the history list and to
5769 save and restore the parsing state.
5771 g. Changes to lib/sh/snprintf.c: fixed some bugs in the `g' and `G'
5772 floating point format display; implemented the "'" flag character
5773 that turns on thousands' grouping; fixed behavior on systems where
5774 MB_CUR_MAX does not evaluate to a constant.
5776 h. The `unset' builtin no longer returns a failure status when asked to
5777 unset a previously-unset variable or function.
5779 i. Changes to the build system to make it easier to cross-compile bash
5780 for different systems.
5782 j. Added `,' to the characters that are backslash-escaped during filename
5783 completion, to avoid problems with complete-into-braces and RCS filenames
5786 k. Some changes to the multibyte character support code to avoid many calls
5789 l. Bash now correctly honors setting LANG to some value when LC_ALL does not
5790 already have a value.
5792 m. Fixed a bug that could cause SIGSEGV when processing nested traps with
5795 n. The `source/.' builtin now restores the positional parameters when it
5796 returns unless they were changed using the `set' builtin during the file's
5799 o. Fixed a bug that caused a syntax error when a command was terminated by
5802 2. New Features in Bash
5804 a. There is now support for placing the long help text into separate files
5805 installed into ${datadir}/bash. Not enabled by default; can be turned
5806 on with `--enable-separate-helpfiles' option to configure.
5808 b. All builtins that take operands accept a `--' pseudo-option, except
5811 c. The `echo' builtin now accepts \0xxx (zero to three octal digits following
5812 the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
5813 POSIX.1-2001 compliance.
5815 3. Changes to Readline
5817 a. Fixed a small problem in _rl_insert_char with multibyte characters.
5819 b. Fixes from IBM for line wrapping problems when using multibyte characters.
5821 c. Fixed a problem which caused the display to be messed up when the last
5822 line of a multi-line prompt (possibly containing invisible characters)
5823 was longer than the screen width.
5825 d. Fixed a problem with the vi-mode `r' command that ocurred on systems with
5826 support for multibyte characters when running in a locale without any
5827 multibyte characters.
5829 ------------------------------------------------------------------------------
5830 This document details the changes between this version, bash-2.05b-alpha1,
5831 and the previous version, bash-2.05a-release.
5835 a. Some changes to work around inlining differences between compilers.
5837 b. Added more prototypes for internal shell typedefs, to catch argument
5838 passing errors when using pointers to functions.
5840 c. The `cd' builtin now fails in posix mode when a valid directory cannot be
5841 constructed from a relative pathname argument and the $PWD using pathname
5842 canonicalization, and the -P option has not been supplied. Previously,
5843 the shell would attempt to use what the user typed, leading to weird
5844 values for $PWD and discrepancies between the value of $PWD and the
5845 actual working directory.
5847 d. The `cd' builtin now resets $PWD when canonicalization fails but a chdir
5848 to the pathname passed as an argument succeeds (when not in posix mode).
5850 e. The `fc' builtin has been fixed, as POSIX requires, to use the closest
5851 history position in range when given an out-of-range argument.
5853 f. The history file loading code was changed to allow lines to be saved in
5854 the history list from the shell startup files.
5856 g. `history -s args' now works better in compound commands.
5858 h. The tilde expansion code was fixed to better recognize when it's being
5859 invoked in an assignment context, which enables expansion after `='
5862 i. Fixed the command name completion code so a slash is no longer appended
5863 to a single match if there happens to be a directory with that name in
5866 j. Fixed compound array assignment to no longer perform alias expansion, to
5867 allow reserved words as array members, and to not produce extra output
5868 when the `-v' option had been enabled.
5870 k. Fixed the programmable completion code to better handle newlines in lists
5871 of possible completions (e.g., `complete -W').
5873 l. Removed the reserved words from the `bash-builtins' manual page.
5875 m. Parser error reporting now attempts to do a better job of identifying the
5876 token in error rather than doing straight textual analysis.
5878 n. Fixes for Inf/NaN, locales, wide/multibyte characters and zero-length
5879 arguments in the library snprintf(3) replacement.
5881 o. `read -e' no longer does command name completion on the first word on
5882 the line being read.
5884 p. `select' now returns failure if the read of the user's selection fails.
5886 q. Fixed a bug that could cause a core dump when setting $PIPESTATUS.
5888 r. Fixes to not allocate so many job slots when the shell is running a loop
5889 with job control enabled in a subshell of an interactive shell.
5891 s. Fixed a bug in the trap code that caused traps to be inherited by
5892 command substitutions in some cases.
5894 t. Fixed a bug that could cause alias expansion to inappropriately expand
5895 the word following the alias.
5897 u. Fixed a bug in the `kill' builtin that mishandled negative pid arguments.
5899 v. The parser is less lenient when parsing assignment statements where the
5900 characters before the `=' don't comprise a valid identifier.
5902 w. The arithmetic expression evaluation code now honors the setting of the
5903 `-u' option when expanding variable names.
5905 x. Fixed the arithmetic evaluation code to allow array subscripts to be
5906 assigned (`let b[7]=42') and auto-incremented and auto-decremented
5909 y. Reimplemented the existing prompt string date and time expansions using
5910 strftime(3), which changed the output of \@ in some locales.
5912 z. Fixed a bug that could cause a core dump when a special shell variable
5913 (like RANDOM) was converted to an array with a variable assignment.
5915 aa. Fixed a bug that would reset the handler for a signal the user had
5916 trapped to a function that would exit the shell when setting the exit
5917 trap in a non-interactive shell.
5919 bb. Changed the execve(2) wrapper code to check whether or not a failing
5920 command is a directory before looking at whether a `#!' interpreter
5921 failed for some reason.
5923 cc. Fixed a bug in the command printing code so it no longer inserts a `;'
5924 after a newline, which produces a syntax error when reused as input.
5926 dd. The code that expands $PS4 no longer inherits the `-x' flag.
5928 ee. The bash-specific completion functions may now take advantage of the
5929 double-TAB and M-? features of the standard readline completion
5932 ff. The mail checking code no longer prints a message if the checked file's
5933 size has not increased, even if the access time is less than the modification time.
5935 gg. Rewrote the variable symbol table code: there is now a stack of
5936 contexts, each possibly including a separate symbol table; there can
5937 be more than one temporary environment supplied to nested invocations
5938 of `./source'; the temporary environments no longer require so much
5939 special-case code; shell functions now handle the temporary environment
5940 and local variables more consistently; function scope exit is faster now
5941 that the entire symbol table does not have to be traversed to dispose of
5942 local variables; it is now easier to push vars from the temporary
5943 environment to the shell's variable table in posix mode; some duplicated
5944 code has been removed.
5946 hh. Regularized the error message printing code; builtin_error is now called
5947 more consistently, and common error message strings are handled by small
5948 functions. This should make eventual message translation easier.
5950 ii. Error messages now include the line number in a script when the shell
5953 jj. Array subscript expansion now takes place even when the array variable is
5954 unset, so side effects will take place.
5956 kk. Fixed a bug in the SICGHLD child-reaping code so that it won't find
5957 jobs already marked as terminated if the OS reuses pids quickly enough.
5959 ll. Fixed a bug that could cause a signal to not interrupt the `wait'
5960 builtin while it was waiting for a background process to terminate.
5962 mm. A couple of changes to make it easier for multiple shells to share history
5963 files using `history -n', `history -r', and `history -w'.
5965 nn. The `getopts' builtin always increments OPTIND to point to the next
5966 option to be handled when an option is returned, whether it's valid
5967 or not, as POSIX 1003.x-2001 requires.
5969 oo. Changed some parts of the expansion code to avoid allocating and
5970 immediately freeing memory without using the results for anything.
5972 pp. The shell now keeps track of $IFS internally, updating its internal map
5973 each time the variable is assigned a new value (or at local scope exit).
5974 This saves thousands of hash lookups for IFS, which, while individually
5977 qq. Rewrote the hash table code: searching and insertion are much faster now,
5978 and it uses a better string hashing function; augmented the function
5979 interface to simplify other parts of the code and remove duplicated code
5981 rr. The shell now uses a simple, generic `object cache' for allocating and
5982 caching words and word lists, which were the major users of
5985 ss. Fixed the assignment statement parsing code to allow whitespace and
5986 newlines in subscripts when performing array element assignment.
5988 tt. The shell now issues many fewer calls to sigprocmask and other signal
5989 masking system calls.
5991 uu. Fixed the `test' and conditional command file comparison operators to
5992 work right when one file has a non-positive timestamp and the other
5995 vv. Fixed some cases where the special characters '\001' and '\177' in the
5996 values of variables or positional parameters caused incorrect expansion
5999 2. Changes to Readline
6001 a. Fixed output of comment-begin character when listing variable values.
6003 b. Added some default key bindings for common escape sequences produced by
6006 c. Fixed the mark handling code to be more emacs-compatible.
6008 d. A bug was fixed in the code that prints possible completions to keep it
6009 from printing empty strings in certain circumstances.
6011 e. Change the key sequence printing code to print ESC as M\- if ESC is a
6012 meta-prefix character -- it's easier for users to understand than \e.
6014 f. Fixed unstifle_history() to return values that match the documentation.
6016 g. Fixed the event loop (rl_event_hook) to handle the case where the input
6017 file descriptor is invalidated.
6019 h. Fixed the prompt display code to work better when the application has a
6020 custom redisplay function.
6022 i. Changes to make reading and writing the history file a little faster, and
6023 to cope with huge history files without calling abort(3) from xmalloc.
6025 j. The vi-mode `S' and `s' commands are now undone correctly.
6027 3. New Features in Bash
6029 a. If set, TMOUT is the default timeout for the `read' builtin.
6031 b. `type' has two new options: `-f' suppresses shell function lookup, and
6032 `-P' forces a $PATH search.
6034 c. New code to handle multibyte characters.
6036 d. `select' was changed to be more ksh-compatible, in that the menu is
6037 reprinted each time through the loop only if REPLY is set to NULL.
6038 The previous behavior is available as a compile-time option.
6040 e. `complete -d' and `complete -o dirnames' now force a slash to be
6041 appended to names which are symlinks to directories.
6043 f. There is now a bindable edit-and-execute-command readline command,
6044 like the vi-mode `v' command, bound to C-xC-e in emacs mode.
6046 g. Added support for ksh93-like [:word:] character class in pattern matching.
6048 h. The $'...' quoting construct now expands \cX to Control-X.
6050 i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
6051 the result into the expanded prompt.
6053 j. The shell now performs arithmetic in the largest integer size the
6054 machine supports (intmax_t), instead of long.
6056 k. If a numeric argument is supplied to one of the bash globbing completion
6057 functions, a `*' is appended to the word before expansion is attempted.
6059 l. The bash globbing completion functions now allow completions to be listed
6060 with double tabs or if `show-all-if-ambiguous' is set.
6062 m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
6063 readline's appending a space to the completed word.
6065 n. New `here-string' redirection operator: <<< word.
6067 o. When displaying variables, function attributes and definitions are shown
6068 separately, allowing them to be re-used as input (attempting to re-use
6069 the old output would result in syntax errors).
6071 p. There is a new configuration option `--enable-mem-scramble', controls
6072 bash malloc behavior of writing garbage characters into memory at
6073 allocation and free time.
6075 q. The `complete' and `compgen' builtins now have a new `-s/-A service'
6076 option to complete on names from /etc/services.
6078 r. `read' has a new `-u fd' option to read from a specified file descriptor.
6080 s. Fix the completion code so that expansion errors in a directory name
6081 don't cause a longjmp back to the command loop.
6083 t. Fixed word completion inside command substitution to work a little more
6086 u. The `printf' %q format specifier now uses $'...' quoting to print the
6087 argument if it contains non-printing characters.
6089 v. The `declare' and `typeset' builtins have a new `-t' option. When applied
6090 to functions, it causes the DEBUG trap to be inherited by the named
6091 function. Currently has no effect on variables.
6093 w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
6094 [[...]] conditional commands, and for ((...)) loops.
6096 x. The expansion of $LINENO inside a shell function is only relative to the
6097 function start if the shell is interactive -- if the shell is running a
6098 script, $LINENO expands to the line number in the script. This is as
6099 POSIX-2001 requires.
6101 y. The bash debugger in examples/bashdb has been modified to work with the
6102 new DEBUG trap semantics, the command set has been made more gdb-like,
6103 and the changes to $LINENO make debugging functions work better. Code
6106 z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
6109 aa. There is a new `-l' invocation option, equivalent to `--login'.
6111 bb. The `hash' builtin has a new `-l' option to list contents in a reusable
6112 format, and a `-d' option to remove a name from the hash table.
6114 4. New Features in Readline
6116 a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
6117 be bound to readline functions. Now the arrow keys may be used in vi
6120 b. When listing completions, and the number of lines displayed is more than
6121 the screen length, readline uses an internal pager to display the results.
6122 This is controlled by the `page-completions' variable (default on).
6124 c. New code to handle editing and displaying multibyte characters.
6126 d. The behavior introduced in bash-2.05a of deciding whether or not to
6127 append a slash to a completed name that is a symlink to a directory has
6128 been made optional, controlled by the `mark-symlinked-directories'
6129 variable (default is the 2.05a behavior).
6131 e. The `insert-comment' command now acts as a toggle if given a numeric
6132 argument: if the first characters on the line don't specify a
6133 comment, insert one; if they do, delete the comment text
6135 f. New application-settable completion variable:
6136 rl_completion_mark_symlink_dirs, allows an application's completion
6137 function to temporarily override the user's preference for appending
6138 slashes to names which are symlinks to directories.
6140 g. New function available to application completion functions:
6141 rl_completion_mode, to tell how the completion function was invoked
6142 and decide which argument to supply to rl_complete_internal (to list
6145 h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
6146 bindable command, which could be bound to `Insert'.
6148 i. New application-settable completion variable:
6149 rl_completion_suppress_append, inhibits appending of
6150 rl_completion_append_character to completed words.
6152 j. New key bindings when reading an incremental search string: ^W yanks
6153 the currently-matched word out of the current line into the search
6154 string; ^Y yanks the rest of the current line into the search string,
6155 DEL or ^H deletes characters from the search string.
6157 ------------------------------------------------------------------------------
6158 This document details the changes between this version, bash-2.05a-release,
6159 and the previous version, bash-2.05a-rc1.
6163 a. Fixed the `printf' builtin so that the variable name supplied as an
6164 argument to a %n conversion must be a valid shell identifier.
6166 b. Improved the random number generator slightly.
6168 c. Changes to configuration to not put -I/usr/include into $CFLAGS, since
6169 it messes up some includes.
6171 d. Corrected description of POSIXLY_CORRECT in man page and info manual.
6173 e. Fixed a couple of cases of incorrect function prototypes that sneaked
6174 through and caused compilation problems.
6176 f. A few changes to avoid potential core dumps in the programmable completion
6179 g. Fixed a configure problem that could cause a non-existent file to show
6182 h. Fixed a configure problem that could cause siglist.o to not be built when
6185 i. Changes to the strtoimax and strtoumax replacement functions to work
6186 around buggy compilers.
6188 j. Fixed a problem with the snprintf replacement function that could
6189 potentially cause a core dump.
6191 2. Changes to Readline
6193 a. Fixed a locale-specific problem in the vi-mode `goto mark' command.
6195 b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
6196 include file problems.
6198 ------------------------------------------------------------------------------
6199 This document details the changes between this version, bash-2.05a-rc1,
6200 and the previous version, bash-2.05a-beta1.
6204 a. Fixed the snprintf replacement to correctly implement the `alternate form'
6205 of the %g and %G conversions.
6207 b. Fixed snprintf to correctly handle the optional precision with the %g and
6210 c. Fixed the arithmetic evaluation code to correct the values of `@' and `_'
6211 when translating base-64 constants (they were backwards).
6213 d. New library functions for formatting long and long long ints.
6215 e. Fixed a few places where negative array subscripts could have occurred,
6216 mostly as the result of systems using signed characters.
6218 f. Fixed a few places that assumed a pid_t was no wider than an int.
6220 g. Fixed the `maildir' mail checking code to work on systems where a
6221 `struct stat' doesn't include an `st_blocks' member.
6223 h. Fixed snprintf to make `unsigned long long' conversion formats (%llu)
6226 i. Fixed snprintf to not print a sign when asked to do an unsigned conversion.
6228 j. Made configure changes to avoid compiling empty source files in lib/sh.
6230 k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax,
6233 l. The `printf' builtin now handles the `ll' and `j' length modifiers
6234 directly, since they can affect the type and width of the argument
6235 passed to printf(3).
6237 m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to
6238 have more sytematic naming, with accompanying changes to configure.in.
6240 n. Fixed snprintf to handle long doubles and the %a/%A conversions by
6241 falling back to sprintf, as long as sprintf supports them.
6243 o. Fixed return value from vsnprintf/snprintf to be the number of characters
6244 that would have been printed, even if that number exceeds the buffer
6245 size passed as an argument.
6247 p. Bash no longer attempts to define its own versions of some ctype macros
6248 if they are implemented as functions in libc but not as macros in
6251 q. Changed the variable printing code (used by `set', `export', etc.) to
6252 not use the $'...' syntax when in posix mode, since that caused
6253 interoperability problems with other shells (most notably with autoconf).
6254 When not in posix mode, it uses $'...' if the string to be printed
6255 contains non-printing characters and regular single quotes otherwise.
6257 r. snprintf now recognizes the %F conversion.
6259 s. Fixed a bug that could cause the wrong status to be returned by a shell
6260 function when the shell is compiled without job control and a null
6261 command containing a command substutition was executed in the function.
6263 t. When in posix mode, the default value for MAILCHECK is 600.
6265 u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables
6266 if they're not in the initial environment.
6268 v. If SECONDS appears in the initial environment with a valid integer value,
6269 bash uses that as the starting value, as if an assignment had been
6272 w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it
6273 gives them default values if they don't appear in the initial environment.
6275 x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE,
6276 even if it assigns them default values.
6278 y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT
6279 if they appear in the initial environment.
6281 z. Bash no longer attempts to discover if it's being run by sshd in order to
6282 run the startup files. If the SSH_SOURCE_BASHRC is uncommented in
6283 config-top.h it will attempt to do so as previously, but that's commented
6284 out in the distributed version.
6286 aa. Fixed a typo in the code that tests for LC_NUMERIC.
6288 bb. The POSIXLY_CORRECT shell variable and its effects are now documented.
6290 cc. Some changes to several of the support shell scripts included in the
6291 definitions to try to avoid race conditions and attacks.
6293 dd. Several changes to avoid warnings from `gcc -Wall'.
6295 ee. Fixed a problem with the `unset' builtin that could cause incorrect
6296 results if asked to unset a variable and an array subscript in the
6299 ff. A few changes to the shell's temporary file creation code to avoid
6300 potential file descriptor leaks and to prefer the system's idea of
6301 the temporary directory to use.
6303 gg. Fixes to build with the C alloca in lib/malloc/alloca.c if the system
6304 requires it but the shell has been configured --without-bash-malloc.
6306 hh. Updated the documentation to note that only interactive shells resend
6307 SIGHUP to all jobs before exiting.
6309 ii. Fixes to only pass unquoted tilde words to tilde_expand, rather than
6310 rely on tilde_expand or getpwnam(3) to handle the quotes (MacOS 10.x
6311 will remove backslashes in any login name passed to getpwnam(3)).
6313 jj. Small change from Paul Eggert to make LINENO right in commands run with
6316 2. New Features in Bash
6318 a. The `printf' builtin now handles the %a and %A conversions if they're
6319 implemented by printf(3).
6321 b. The `printf' builtin now handles the %F conversion (just about like %f).
6323 c. The `printf' builtin now handles the %n conversion like printf(3). The
6324 corresponding argument is the name of a shell variable to which the
6327 3. Changes to Readline
6329 a. Fixed a few places where negative array subscripts could have occurred.
6331 b. Fixed the vi-mode code to use a better method to determine the bounds of
6332 the array used to hold the marks.
6334 c. Fixed the defines in chardefs.h to work better when chars are signed.
6336 d. Fixed configure.in to use the new names for bash autoconf macros.
6338 e. Readline no longer attempts to define its own versions of some ctype
6339 macros if they are implemented as functions in libc but not as macros in
6342 f. Fixed a problem where rl_backward could possibly set point to before
6343 the beginning of the line.
6345 ------------------------------------------------------------------------------
6346 This document details the changes between this version, bash-2.05a-beta1,
6347 and the previous version, bash-2.05a-alpha1.
6351 a. Fixed a bug in the evalution of arithmetic `for' statements when the
6352 expanded expression is NULL.
6354 b. Fixed an unassigned variable problem in the redirection printing code.
6356 c. Added more prototypes to extern function declarations in the header
6357 files and to static function declarations in C source files.
6359 d. Make sure called functions have a prototype in scope, to get the arguments
6360 and return values right instead of casting. Removed extern function
6361 declarations from C source files that were already included in header
6364 e. Changed some function arguments to use function typedefs in general.h so
6365 the prototypes can be checked. The only use of Function and VFunction
6366 now is for unwind-protects.
6368 f. More const changes to function arguments and appropriate variables.
6370 g. Changed the mail checking support to handle `maildir'-style mail
6373 h. Augmented the bash malloc to pass in the file and line number information
6374 for each malloc, realloc, and free. This should result in better error
6377 i. The `old' gnu malloc is no longer a configuration option.
6379 j. Augmented the bash malloc with optional tracing and registering allocated
6382 k. Prompt string decoding now saves and restores the value of $? when it
6383 expands the prompt string, so command substitutions don't change $?.
6385 i. Array indices are now `long', since shell arithmetic is performed as long,
6386 and the internal arrayind_t type is used consistently.
6388 j. Some more `unsigned char *' fixes from Paul Eggert.
6390 k. Fixed a bad call to builtin_error that could cause core dumps when making
6393 l. `return' may no longer be used to terminate a `select' command, for
6394 compatibility with ksh.
6396 m. Changed code that reads octal numbers to do a better job of detecting
6399 n. The time formatting code no longer uses absolute indices into a buffer,
6400 because the buffer size changes depending on the size of a `time_t'.
6402 o. `umask' now prints four digits when printing in octal mode, for
6403 compatibility with other shells.
6405 p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L'
6406 formats and long doubles better, and internal functions have been
6407 simpified where appropriate.
6409 q. Some `time_t' fixes for machines were a time_t is bigger than a long.
6411 r. Replaced some bash-specific autoconf macros with standard equivalents.
6413 s. Improvmed the code that constructs temporary filenames to make the
6414 generated names a bit more random.
6416 t. Added code that checks for ascii before calling any of the is* ctype
6419 u. Changed some places where a `char' was used as an array subscript to use
6420 `unsigned char', since a `char' can be negative if it's signed by default.
6422 v. Lots of changes to the `ulimit' builtin from Paul Eggert to add support
6423 for the new POSIX-200x RLIM_SAVED_CUR and RLIM_SAVED_MAX values and
6426 w. `ulimit' now prints the description of a resource in any error message
6427 relating to fetching or setting that resource's limits.
6429 x. The `snprintf' replacement now computes maximum values at compile
6430 time rather than using huge constants for things like long long.
6432 y. Interactive shells now ignore `set -n'.
6434 z. Changed the malloc bookkeeping information so that it's now 8 bytes
6435 instead of 12 on most 32-bit machines (saving 4 bytes per allocation),
6436 restoring 8-byte alignment.
6438 aa. The malloc error reporting code now attempts to print the file and line
6439 number of the call that caused the error.
6441 bb. Changed the redirection error reporting code to catch EBADF errors and
6442 report the file descriptor number rather than the file being redirected
6443 to or from (e.g., things like `exec 4242<x' where 4242 is an out-of-range
6446 cc. `printf', `echo -e', and the $'...' code now process only two hex digits
6447 after a `\x' escape sequence for compatibility with other shells, and
6448 the documentation was changed to note that the octal and hex escape
6449 sequences result in an eight-bit value rather than strict ASCII.
6451 2. Changes to Readline
6453 a. The completion code now attempts to do a better job of preserving the
6454 case of the word the user typed if ignoring case in completions.
6456 b. Readline defaults to not echoing the input and lets the terminal
6457 initialization code enable echoing if there is a controlling terminal.
6459 c. The key binding code now processes only two hex digits after a `\x'
6460 escape sequence, and the documentation was changed to note that the
6461 octal and hex escape sequences result in an eight-bit value rather
6464 3. New Features in Bash
6466 a. The builtin `ulimit' now takes two new non-numeric arguments: `hard',
6467 meaning the current hard limit, and `soft', meaning the current soft
6468 limit, in addition to `unlimited'
6470 b. `ulimit' now prints the option letter associated with a particular
6471 resource when printing more than one limit.
6473 c. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
6474 one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
6476 4. New Features in Readline
6478 a. New bindable variable `history-preserve-point'. If set, the history
6479 code attempts to place the user at the same location on each history
6480 line retrived with previous-history or next-history.
6482 ------------------------------------------------------------------------------
6483 This document details the changes between this version, bash-2.05a-alpha1,
6484 and the previous version, bash-2.05-release.
6488 a. Better checks in the redirection code for write errors.
6490 b. bashbug now uses $TMPDIR, defaulting to /tmp, and uses mktemp(1) more
6493 c. System-specific configuration changes for: Interix, OpenBSD, FreeBSD,
6496 d. Some more `const' cleanups through the code.
6498 e. Fixed a typo in the /dev/fd redirection code, better checks for valid
6499 numeric fds in /dev/fd.
6501 f. Fixed many parts of the shell to handle integer overflow more gracefully
6502 and to do more stringent checks for valid numbers.
6504 g. Fixed mksignames to include config.h.
6506 h. Fixed an uninitialized variable problem that could cause the shell to core
6507 dump when replacing characters in a string.
6509 i. New mechanism for updating the patch level when official patches are
6510 released (patchlevel.h).
6512 j. configure.in changed to no longer require external files _distribution and
6515 k. Fixed non-interactive shell initialization problem when bash started as
6518 l. Fixed printf builtin conversion error handling to be POSIX.2-conformant.
6520 m. autoconf-2.52 is now used to build configure; autoconf-2.50 or newer is
6521 required. Some of the bash-specific macros were removed, since they are
6524 n. Startup files and files read with source or `.' are no longer required to
6527 o. Fixed core dump in builtin printf when user-supplied precision or field
6530 p. Fixed builtin printf to treat a negative field width as a positive field
6531 width with left-justification.
6533 r. New unwind-protect implementation from Paul Eggert.
6535 s. Fixed an inadvertently-unclosed comment in the bash completion code that
6536 caused programmable completions to not add trailing slashes or spaces to
6539 t. Fixed the process substitution code to cope better when stdin is closed.
6541 v. Fixes, mostly from Paul Eggert, for a few possible buffer overflows in
6544 w. Fixes from Paul Eggert to avoid most of the type casts in the shell code,
6545 and use more appropriate types for a number of variables.
6547 x. Command substition no longer inherits the DEBUG trap.
6549 y. Some fixes to the process substition code on machines without /dev/fd so
6550 that named pipes are not removed inappropriately.
6552 z. The loadable `getconf' builtin is now much more complete, and will become
6553 part of the shell in the future.
6555 aa. The select command no longer terminates on a `return', so it can be used
6556 to return from an enclosing function (as ksh does it).
6558 bb. Fixed the extended pattern matching code to behave better when presented
6559 with incorrectly-formed patterns.
6561 cc. Some changes were made with the intent of making cross-compilation easier.
6563 dd. The network code (/dev/tcp and /dev/udp redirections) uses getaddrinfo(3)
6564 if it's available, which adds support for IPv6.
6566 ee. Subshells of login shells no longer source ~/.bash_logout when they exit.
6568 ff. Fixes so that subshells don't exit inappropriately if the -e option has
6571 gg. Restricted shells no longer allow functions to be exported.
6573 hh. Changes to the pattern matching code so extended pattern matching works
6574 on systems with deficient shared library implementations, like MacOS X.
6576 ii. Better error messages when a script with a leading `#!interp' fails
6577 to execute because of problems with `interp'.
6579 jj. Fixed `compgen' to handle the `-o default' option better.
6581 kk. Fixed the job control code to force an asynchronous process's standard
6582 input to /dev/null only if job control is not active.
6584 ll. Fixed a possible infinite recursion problem when `fc ""=abc' (a null
6585 pattern) is used to re-execute a previous command.
6587 mm. Fixed `declare [-a] var=value' to assign VALUE to element 0 if VAR is an
6588 array variable. Similarly for `declare [-a] var[N]=value'. This is like
6591 nn. Fixed a bug that caused `read -a aname' to work even if ANAME had been
6594 oo. Fixed a possible integer overflow problem when constructing names for
6597 2. New Features in Bash
6599 a. Added support for DESTDIR installation root prefix, so you can do a
6600 `make install DESTDIR=bash-root' and do easier binary packaging.
6602 b. Added support for builtin printf "'" flag character as per latest POSIX
6605 c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
6608 d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
6609 (bash doesn't use very much of what it returns).
6611 e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
6614 f. New read-only `shopt' option: login_shell. Set to non-zero value if the
6615 shell is a login shell.
6617 g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
6619 h. New `-A group/-g' option to complete and compgen; does group name
6622 i. New `-t' option to `hash' to list hash values for each filename argument.
6624 j. New [-+]O invocation option to set and unset `shopt' options at startup.
6626 k. configure's `--with-installed-readline' option now takes an optional
6627 `=PATH' suffix to set the root of the tree where readline is installed
6630 l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run
6631 whenever the shell would have exited if the -e option were enabled.
6632 It is not inherited by shell functions.
6634 m. `readonly', `export', and `declare' now print variables which have been
6635 given attributes but not set by assigning a value as just a command and
6636 a variable name (like `export foo') when listing, as the latest POSIX
6639 n. `bashbug' now requires that the subject be changed from the default.
6641 o. configure has a new `--enable-largefile' option, like other GNU utilities.
6643 p. `for' loops now allow empty word lists after `in', like the latest POSIX
6646 3. Changes to Readline
6648 a. More `const' and type casting fixes.
6650 b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
6653 c. The completion code no longer appends a `/' or ` ' to a match when
6654 completing a symbolic link that resolves to a directory name, unless
6655 the match does not add anything to the word being completed. This
6656 means that a tab will complete the word up to the full name, but not
6657 add anything, and a subsequent tab will add a slash.
6659 d. Fixed a trivial typo that made the vi-mode `dT' command not work.
6661 e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
6663 f. Fixed the tty code so that ^V works more than once.
6665 g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
6666 because the use of __P in typedefs conflicted g++ and glibc.
6668 4. New Features in Readline
6670 a. Added extern declaration for rl_get_termcap to readline.h, making it a
6671 public function (it was always there, just not in readline.h).
6673 b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
6674 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
6676 c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
6678 d. New bindable boolean readline variable: match-hidden-files. Controls
6679 completion of files beginning with a `.' (on Unix). Enabled by default.
6681 e. The history expansion code now allows any character to terminate a
6682 `:first-' modifier, like csh.
6684 f. The incremental search code remembers the last search string and uses
6685 it if ^R^R is typed without a search string.
6687 ------------------------------------------------------------------------------
6688 This document details the changes between this version, bash-2.05-release,
6689 and the previous version, bash-2.05-beta2.
6693 a. Make sure we note that the first line of a multi-line command was not
6694 saved in the history if the tests for HISTCONTROL succeed, but the
6695 HISTIGNORE check fails.
6697 b. Fixed a bug in the pattern matching code that caused `[' to be treated
6698 as a special character inside a `[...]' bracket expression.
6700 c. Fixed a bug in the pattern matching code that caused `]' to terminate
6701 a bracket expression even if it was the first character after the `['
6702 (or a leading `!' or `^').
6704 d. Made a small change to report a more user-friendly error message if
6705 execve(2) fails because of an error with the interpreter in a script
6706 with a leading `#! interpreter'.
6708 e. If the OS does not support an exec(2) magic number of `#!', make sure we
6709 have a non-null interpreter name before attempting to execute it.
6711 f. Fixed a bug that caused the shell process to end up in a different
6712 process group than the controlling terminal if a job-control shell was
6713 run with `exec' in the startup files.
6715 g. When started in POSIX mode, either by `bash --posix', `bash -o posix', or
6716 `sh', $SHELLOPTS includes `posix' and POSIXLY_CORRECT is set.
6718 h. Fixed a problem that caused the `\W' prompt string escape sequence to
6719 expand to nothing when $PWD was `//'.
6721 i. The `bashbug' shell script no longer uses $(...) command substitution.
6723 j. When `set' is invoked without options in POSIX mode, it no longer prints
6724 the names and definitions of shell functions.
6726 2. Changes to Readline
6728 a. rl_set_paren_blink_timeout() is now documented.
6730 b. Corrected history.3 man page: `$' is not in the default value of
6731 history_word_delimiters.
6733 c. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
6734 value, rl_read_key() now immediately returns '\n' (which is assumed to
6735 be bound to accept-line).
6737 3. New Features in Bash
6739 a. The `>&word' redirection now works in POSIX mode as it does by default,
6740 since POSIX.2 leaves it unspecified.
6742 ------------------------------------------------------------------------------
6743 This document details the changes between this version, bash-2.05-beta2,
6744 and the previous version, bash-2.05-beta1.
6748 a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported.
6750 b. Fixed startup so posixly_correct is retained across subshells begun to
6751 execute scripts without a leading `#!'.
6753 c. Fixed a bug that caused $(< file) to not work in a (...) subshell.
6755 d. Added config support for Linux running on the IBM S390.
6757 e. Fixed a bug that caused bash to get its input pointer out of sync when
6758 reading commands through a pipe and running a command with standard
6759 input redirected from a file.
6761 f. Made a change so that command completion now makes about half as many
6762 stat(2) calls when searching the $PATH.
6764 g. Fixed a bug that caused variable assignments preceding `return' to not
6765 be propagated to the shell environment in POSIX mode.
6767 h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed
6770 i. In POSIX mode, `break' and `continue' do not complain and return success
6771 if called when the shell is not executing a loop.
6773 j. Fixed `bash -o posix' to work the same as `bash --posix'.
6775 k. Fixed a bug where variable assignments preceding `eval' or `source/.'
6776 would not show up in the environment exported to subshells run by the
6779 l. In POSIX mode, shells started to execute command substitutions inherit
6780 the value of the `-e' option from their parent shell.
6782 m. In POSIX mode, aliases are expanded even in non-interactive shells.
6784 n. Changed some of the job control messages to display the text required by
6785 POSIX.2 when the shell is in POSIX mode.
6787 o. Fixed a bug in `test' that caused it to occasionally return incorrect
6788 results when non-numeric arguments were supplied to `-t'.
6790 2. Changes to Readline
6792 a. Some changes were made to avoid gcc warnings with -Wall.
6794 b. rl_get_keymap_by_name now finds keymaps case-insensitively, so
6795 `set keymap EMACS' works.
6797 c. The history file writing and truncation functions now return a useful
6800 d. Fixed a bug that could cause applications to dereference a NULL pointer
6801 if a NULL second argument was passed to history_expand().
6803 3. New Features in Bash
6805 a. doc/readline.3 has been moved to the readline distribution.
6807 4. New Features in Readline
6809 a. New function, rl_get_screen_size (int *rows, int *columns), returns
6810 readline's idea of the screen dimensions.
6812 b. The timeout in rl_gather_tyi (readline keyboard input polling function)
6813 is now settable via a function (rl_set_keyboard_input_timeout()).
6815 c. Renamed the max_input_history variable to history_max_entries; the old
6816 variable is maintained for backwards compatibility.
6818 d. The list of characters that separate words for the history tokenizer is
6819 now settable with a variable: history_word_delimiters. The default
6822 ------------------------------------------------------------------------------
6823 This document details the changes between this version, bash-2.05-beta1,
6824 and the previous version, bash-2.05-alpha1.
6828 a. Changes to allow shared library and object building on the GNU Hurd.
6830 b. Fixes to the way exported functions are placed into the environment and
6833 c. The globbing library once again respects locales when processing ranges
6834 in bracket expressions while doing pattern matching.
6836 d. System-specific configuration changes for: Tru 64, Interix
6838 e. Bashbug now uses /usr/bin/editor as one of the editing alternatives, and
6839 will use mktemp(1) or tempfile(1), if present, for temporary file creation.
6841 f. Bash no longer performs a binary file check on a script argument that's
6842 really a tty (like /dev/fd/0 or /dev/stdin).
6844 g. Fixed a bug in the execution of shell scripts that caused the effects of
6845 $BASH_ENV to be undone in some cases.
6847 h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly.
6849 i. Several changes to the job control code to avoid some signal state
6852 j. The Bash malloc no longer blocks signals as often, which should make it
6855 k. Fixed a parsing bug that did not allow backslash to escape a single quote
6856 inside a $'...' construct.
6858 l. Fixed a bug that caused things like ${var:=$'value'} to be parsed
6859 incorrectly. This showed up in newer versions of autoconf.
6861 m. Fixed a bug in the bash-specific readline initialization that caused
6862 key bindings to bash-specific function names appearing in .inputrc to
6865 n. Bash now sets the file descriptor it uses to save the file descriptor
6866 opened on a shell script to close on exec.
6868 o. Fixed a bug in the prompt string decoding that caused it to misbehave
6869 when presented an octal sequence of fewer than three characters.
6871 p. Fixed the `test' builtin to return an error if `[' is supplied a single
6872 argument that is not `]'.
6874 q. Fixed a bug that caused subshells started to run executable shell scripts
6875 without a leading `#!' to incorrectly inherit an argument list preceding
6876 a shell builtin (like such a script called from a script sourced with `.',
6877 where there were variable assignments preceding the `.' command)
6879 r. Fixed a bug that caused changes to variables supplied in an assignment
6880 statement preceding a shell builtin to not be honored (like a script
6883 s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values
6884 when the shell is started.
6886 t. Fixed a bug that caused SIGINT to kill shell scripts after the script
6889 u. The `fc' builtin now tries to create its temporary files in the directory
6892 v. Bash no longer calls any Readline functions or uses any Readline variables
6893 not declared in readline.h.
6895 w. Fixed a bug that caused some substitutions involving $@ to not be split
6896 correctly, especially expansions of the form ${paramterOPword}.
6898 x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it
6899 appears in the initial environment.
6901 y. Fixed a couple of problems with shell scripts without a leading `#!'
6902 being executed out of shell functions that could cause core dumps if
6903 such a script attempted to execute `return'.
6905 z. Fixed a problem with the `-nt' and `-ot' binary operators for the
6906 `test/[' builtin and the `[[' conditional command that caused wrong
6907 return values if one of the file arguments did not exist.
6909 aa. Fixed a bug that caused non-interactive shells which had previously
6910 executed `shopt -s expand_aliases' to fail to expand aliases in a
6911 command like `(command) &'.
6913 2. Changes to Readline
6915 a. Changes to make most (but not yet all -- there is still crlf()) of the
6916 exported readline functions declared in readline.h have an rl_ prefix.
6918 b. More `const' changes in function arguments, mostly for completion
6921 c. Fixed a bug in rl_forward that could cause the point to be set to before
6922 the beginning of the line in vi mode.
6924 d. Fixed a bug in the callback read-char interface to make it work when a
6925 readline function pushes some input onto the input stream with
6926 rl_execute_next (like the incremental search functions).
6928 e. Fixed a file descriptor leak in the history file manipulation code that
6929 was tripped when attempting to truncate a non-regular file (like
6932 f. Some existing variables are now documented and part of the public
6933 interface (declared in readline.h): rl_explict_arg, rl_numeric_arg,
6934 rl_editing_mode, rl_last_func.
6936 g. Renamed rltty_set_default_bindings to rl_tty_set_default_bindings and
6937 crlf to rl_crlf, so there are no public functions declared in readline.h
6938 without an `rl_' prefix. The old functions still exist for backwards
6941 3. New Features in Bash
6943 a. A new loadable builtin, realpath, which canonicalizes and expands symlinks
6944 in pathname arguments.
6946 b. When `set' is called without options, it prints function defintions in a
6947 way that allows them to be reused as input. This affects `declare' and
6948 `declare -p' as well.
6950 4. New Features in Readline
6952 a. New application-callable function rl_set_prompt(const char *prompt):
6953 expands its prompt string argument and sets rl_prompt to the result.
6955 b. New application-callable function rl_set_screen_size(int rows, int cols):
6956 public method for applications to set readline's idea of the screen
6959 c. The history example program (examples/histexamp.c) is now built as one
6962 ------------------------------------------------------------------------------
6963 This document details the changes between this version, bash-2.05-alpha1,
6964 and the previous version, bash-2.04-release.
6968 a. A fix was made to allow newlines in compond array assignments.
6970 b. configure now checks for real-time signals with unusable values.
6972 c. Interactive shells no longer exit if a substitution fails because of an
6973 unset variable within a sourced file.
6975 d. Fixed a problem with incorrect matching of extended glob patterns when
6976 doing pattern substitution.
6978 e. `{' is now quoted by the completion code when it appears in a filename.
6980 f. Fixed an error in pattern matching that caused the matcher to not
6981 correctly skip the rest of a bracket expression after a character
6984 g. Fixed a bug in the IFS word splitting code to make a non-whitespace IFS
6985 character preceded by IFS whitespace part of the current delimiter rather
6986 than generating a separate field.
6988 h. The {!prefix@} expansion now generates separate words, analogous to $@,
6991 i. Command substitution now ignores NUL bytes in the command output, and the
6992 parser ignores them on input.
6994 j. A fix was made to the job control code to prevent hanging processes when
6995 the shell thinks background processes are running but the kernel returns
6996 -1/ECHILD from waitpid().
6998 k. `pwd' now prints an error message if the write fails when displaying the
7001 l. When in POSIX mode, the shell prints trap dispostions without a leading
7002 `SIG' in the signal specification.
7004 m. Fixed a parser bug that caused the current command's line count to be
7005 messed up by a compound array assignment.
7007 n. Fixed a bug in the unwind-protect code that caused bad behavior on machines
7008 where ints and pointers are not the same size.
7010 o. System-specific configure changes for: MacOS X.
7012 p. Changes for Cygwin to translate \r\n and \r to \n and to set file
7013 descriptors used for reading input to text mode in various places.
7015 q. Fixed a bug that caused `!' to occasionally not be honored when in
7018 r. Bash no longer assumes that getcwd() will return any useful error message
7019 in the buffer passed as an argument if the call fails.
7021 s. The `source', `.', and `fc' builtins no longer check whether a file is
7022 binary before reading commands from it.
7024 t. Subshells no longer turn off job control when they exit, since that
7025 sometimes resulted in the terminal being reset to the wrong process
7028 u. The history code no longer tries to save the second and subsequent lines
7029 of a multi-line command if the first line was not saved.
7031 v. The history saving code now does a better job of saving blank lines in a
7034 w. Removed a `feature' that made `ulimit' silently translate `unlimited' to
7035 the current hard limit, which obscured some kernel error returns.
7037 x. Fixed the grammar so that `}' is recognized as a reserved word after
7038 another reserved word, rather than requiring a `;' or newline. This
7039 means that constructs like
7041 { { echo a b c ; } }
7045 y. Conditional commands ([[...]]) now perform tilde expansion on their
7048 z. Noted in the documentation that `set -a' will cause functions to be
7049 exported if they are defined after `set -a' is executed.
7051 aa. When an interactive login shell starts, if $PWD and $HOME refer to the
7052 same directory but are not the same string, $PWD is set to $HOME.
7054 bb. Fixed `printf' to handle invalid floating point numbers better.
7056 cc. Temporary files are now created with random filenames, to improve security.
7058 dd. The readline initialization code now binds the custom bash functions and
7059 key bindings after the readline defaults are set up.
7061 ee. Fixed the `source' builtin to no longer overwrite a shell function's
7062 argument list, even if the sourced file changes the positional parameters.
7064 ff. A bug fix was made in the expansion of `$*' in contexts where it should
7065 not be split, like assignment statements.
7067 gg. Fixed a bug in the parameter substring expansion to handle conditional
7068 arithmetic expressions ( exp ? val1 : val2 ) without cutting the expression
7069 off at the wrong `:'.
7071 hh. The `<>' redirection is no longer subject to the current setting of
7072 `noclobber', as POSIX.2 specifies.
7074 ii. Fixed a bug in the conditional command parsing code that caused expressions
7075 in parentheses to occasionally be parsed incorrectly.
7077 jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or
7078 {...} to follow the )) without an intervening list terminator.
7080 kk. `printf' now treats `\E' the same as `\e' when performing backslash escape
7081 expansion for the `%b' format specifier.
7083 ll. When in POSIX mode, the shell no longer searches the current directory for
7084 a file to be sourced with `.' or `source' if `.' is not in $PATH.
7086 mm. Interactive comments are no longer turned off when POSIX mode is disabled.
7088 nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's
7089 environment when it starts up.
7091 oo. Fixed a bug in the `command' builtin so the effect of a command like
7092 `command exec 4<file' is as if the `command' had been omitted.
7094 pp. ${foo[@]} and ${foo[*]} now work as in ksh93 if `foo' is not an array
7097 qq. ${#foo[X]}, where X is 0, @, or *, now work as in ksh93 if `foo' is not
7100 rr. The shell's idea of an absolute pathname now takes into account a
7101 possible drive specification on Cygwin and other Windows systems.
7103 ss. Fixed a bug which caused incorrect parsing of some multi-character
7104 constructs if they were split across input lines with backslash-newline
7107 tt. Fixed a bug that caused restricted shell mode to be set inappropriately
7108 when trying to execute a shell script without a leading `#!'.
7110 uu. Shell function definitions no longer require that the body be a group
7111 command ( {...} ), as POSIX.2 requires.
7113 vv. The `cd' and `pwd' builtins now process symlinks in pathnames internally
7114 and should require many fewer calls to getcwd().
7116 ww. Fixed a bug that caused a pipeline's process group to be set incorrectly
7117 if one of the pipeline elements contained a command substitution.
7119 xx. Fixed a bug that caused core dumps when expanding the value of HISTIGNORE.
7121 yy. The output of `set' is now quoted using $'...' so invisible characters are
7122 displayed as escape sequences.
7124 zz. Fixed the help text for `unset', since PATH and IFS may both be unset.
7126 aaa. The shell no longer puts directory names into the command hash table.
7128 bbb. Fixed a bug in `read' that caused it to occasionally free memory twice if
7129 it was interrupted after reading a large amount of data.
7131 ccc. Assignment statements that attempt to assign values to readonly variables
7132 now cause the command to return an error status.
7134 ddd. Fixed a bug that could cause incorrect output if a $(<file) construct was
7137 eee. GROUPS and FUNCNAME now return an error status when assignment is
7138 attempted, but may be unset (in which case they lose their special
7139 properties). In all respects except unsetting, they are readonly.
7141 fff. The string-to-integer conversion code now ignores trailing whitespace in
7142 the string, even if strtol(3) does not.
7144 ggg. The tcsh magic-space function now does a better job of inserting the
7145 space close to where the point was before the history expansion, rather
7146 than just appending it.
7148 hhh. Fixed a bug which caused a file sourced from an interactive shell to
7149 fill up the jobs table if it ran lots of jobs.
7151 iii. Fixed a bug in the parameter pattern substitution code to avoid infinite
7152 recursion on zero-length matches.
7154 2. Changes to Readline
7156 a. When setting the terminal attributes on systems using `struct termio',
7157 readline waits for output to drain before changing the attributes.
7159 b. A fix was made to the history word tokenization code to avoid attempts to
7160 dereference a null pointer.
7162 c. Readline now defaults rl_terminal_name to $TERM if the calling application
7163 has left it unset, and tries to initialize with the resultant value.
7165 d. Instead of calling (*rl_getc_function)() directly to get input in certain
7166 places, readline now calls rl_read_key() consistently.
7168 e. Fixed a bug in the completion code that allowed a backslash to quote a
7169 single quote inside a single-quoted string.
7171 f. rl_prompt is no longer assigned directly from the argument to readline(),
7172 but uses memory allocated by readline. This allows constant strings to
7173 be passed to readline without problems arising when the prompt processing
7174 code wants to modify the string.
7176 g. Fixed a bug that caused non-interactive history searches to return the
7177 wrong line when performing multiple searches backward for the same string.
7179 h. Many variables, function arguments, and function return values are now
7180 declared `const' where appropriate, to improve behavior when linking with
7183 i. The control character detection code now works better on systems where
7184 `char' is unsigned by default.
7186 j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
7188 k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been
7189 replaced with a set of specific prototyped typedefs, though they are
7190 still in the readline header files for backwards compatibility.
7192 m. Nearly all of the (undocumented) internal global variables in the library
7193 now have an _rl_ prefix -- there were a number that did not, like
7194 screenheight, screenwidth, alphabetic, etc.
7196 n. The ding() convenience function has been renamed to rl_ding(), though the
7197 old function is still defined for backwards compatibility.
7199 o. The completion convenience functions filename_completion_function,
7200 username_completion_function, and completion_matches now have an rl_
7201 prefix, though the old names are still defined for backwards compatibility.
7203 p. The functions shared by readline and bash (linkage is satisfied from bash
7204 when compiling with bash, and internally otherwise) now have an sh_ prefix.
7206 q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so
7207 that the `soname' contains only the major version number rather than the
7208 major and minor numbers.
7210 r. Fixed a redisplay bug that occurred when the prompt spanned more than one
7211 physical line and contained invisible characters.
7213 3. New Features in Bash
7215 a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
7216 per the new GNU coding standards.
7218 b. The /dev/tcp and /dev/udp redirections now accept service names as well as
7221 c. `complete' and `compgen' now take a `-o value' option, which controls some
7222 of the aspects of that compspec. Valid values are:
7224 default - perform bash default completion if programmable
7225 completion produces no matches
7226 dirnames - perform directory name completion if programmable
7227 completion produces no matches
7228 filenames - tell readline that the compspec produces filenames,
7229 so it can do things like append slashes to
7230 directory names and suppress trailing spaces
7232 4. New Features in Readline
7234 a. The blink timeout for paren matching is now settable by applications.
7236 b. _rl_executing_macro has been renamed to rl_executing_macro, which means
7237 it's now part of the public interface.
7239 c. Readline has a new variable, rl_readline_state, which is a bitmap that
7240 encapsulates the current state of the library; intended for use by
7241 callbacks and hook functions.
7243 ------------------------------------------------------------------------------
7244 This document details the changes between this version, bash-2.04-release,
7245 and the previous version, bash-2.04-beta5.
7249 a. Better compile-time and configure-time checks for the necessity of
7252 b. A bug was fixed in the expansion of "${@:-}" when there are positional
7255 c. A typo was fixed in the output of `complete'.
7257 d. The matches generated for a word by the `-W' argument to complete and
7258 compgen are now matched against the word being completed, and only
7259 matches are returned as the result.
7261 e. Some fixes were made for systems which do not restart read(2) when a
7262 signal caught by bash is received.
7264 f. A bug was fixed which caused the umask to be set to 0 when an invalid
7265 symbolic mode mask was parsed.
7267 g. Fixed a bug that could cause a core dump if a SIGCHLD was received while
7268 performing an assignment statement using command substitution.
7270 h. Changed the word splitting function for programmable completion so cases
7271 in which the cursor is between words are handled a bit better.
7273 2. Changes to Readline
7275 a. rl_funmap_names() is now documented.
7277 3. New Features in Bash
7279 a. The LC_NUMERIC variable is now treated specially, and used to set the
7280 LC_NUMERIC locale category for number formatting, e.g., when `printf'
7281 displays floating-point numbers.
7283 ------------------------------------------------------------------------------
7284 This document details the changes between this version, bash-2.04-beta5,
7285 and the previous version, bash-2.04-beta4.
7289 a. A couple of changes were made to the Makefiles for easier building on
7292 b. Fixed a bug where the current prompt would be set to $PS2 at startup.
7294 c. The shell script that tests an already-installed version was changed to
7295 remove the directory it created its test programs in at exit.
7297 d. Several changes were made to the code that tokenizes an input line for
7298 the programmable completion code. Shell metacharacters will now appear
7299 as individual words in the word list passed to the completion functions.
7300 Some of the example completion shell functions were changed to understand
7301 redirection operators.
7303 e. A bug was fixed that, under obscure circumstances, could confuse the
7304 parser when a shell function was run by the programmable completion code.
7306 f. A bug was fixed in the ulimit builtin for systems not using getrlimit().
7308 g. The execution code now propagates the correct exit status back to the rest
7309 of the code if the return value of a subshell command was being inverted.
7310 Some new test cases for inverting return values with the `!' reserved
7311 word have been added.
7313 h. Negative exponents in the arithmetic evaluation of v**e now return an
7316 i. A bug that caused bash to check the wrong process in a pipeline for
7317 abnormal termination (and consequently resetting the terminal attributes)
7320 j. Fixed a bug that caused $PS2 to be displayed after PROMPT_COMMAND was
7323 2. Changes to Readline
7325 1. Fixed a bug in a C preprocessor define that caused the keypad control
7326 functions to be compiled out for all platforms except DJGPP.
7328 ------------------------------------------------------------------------------
7329 This document details the changes between this version, bash-2.04-beta4,
7330 and the previous version, bash-2.04-beta3.
7334 a. A couple of changes were made to the redirection to attempt to avoid
7335 race conditions and malicious file replacement.
7337 2. A change was made to the string evaluation code (used for command
7338 substitution, `eval', and the `.' builtin) to fix an obscure core
7339 dump on alpha machines.
7341 3. A bug that caused $LINENO to be wrong when executing arithmetic for
7344 4. A couple of memory leaks in the programmable completion code were fixed.
7346 5. A bug that could cause a core dump by freeing memory twice during a call
7347 to `eval' if `set -u' had been enabled and an undefined variable was
7348 referenced was fixed.
7350 ------------------------------------------------------------------------------
7351 This document details the changes between this version, bash-2.04-beta3,
7352 and the previous version, bash-2.04-beta2.
7356 a. Bash should run the appropriate startup files when invoked by ssh2.
7358 b. Fixed a bug in the parsing of conditional commands that could cause a
7361 c. Fixed a bug in parsing job specifications that occasionally caused
7362 core dumps when an out-of-range job was referenced.
7364 d. Fixed the `type' and `command' builtins to do better reporting of
7365 commands that are not found in $PATH or the hash table.
7367 e. Fixed a POSIX.2 compliance problem in the command builtin -- commands
7368 are supposed to be reported as full pathnames.
7370 f. The `echo' builtin now returns failure if a write error occurs.
7372 g. Fixed a bug which caused the locale to not be reset correctly when
7375 h. Changed description of `getopts' in man page and reference manual to make
7376 it clear that option characters may be characters other than letters.
7378 i. If the shell exits while in a function, make sure that any trap on EXIT
7379 doesn't think the function is still executing.
7381 j. Bashbug now tries harder to find a usable editor if $EDITOR is not set,
7382 rather than simply defaulting to `emacs'.
7384 k. Changes to the scripts that guess and canonicalize the system type, from
7385 the latest `automake' distribution via Debian.
7387 l. When using named pipes for process substitution, make sure the file
7388 descriptors opened for reading are set to non-blocking mode.
7390 m. Fixed a bug that caused termination of pipelines that are killed by a
7391 signal to not be reported in some cases.
7393 n. When not in literal-history mode, shell comment lines are not added to
7396 o. When running in POSIX.2 mode, bash no longer performs word splitting on
7397 the expanded value of the word supplied as the filename argument to
7398 redirection operators.
7400 p. The prompt string decoding code now backslash-quotes only characters that
7401 are special within double quotes when expanding the \w and \W escape
7404 q. Fixed a bug in the prompt decoding code that could cause a non-interactive
7405 shell to seg fault if `\u' was used in PS4 and the shell was in xtrace
7408 r. Fixed a bug that caused function definitions to be printed with any
7409 redirections that should be attached to the entire function before the
7412 s. Changed the tilde expansion code for Cygwin systems to avoid creating
7413 pathnames beginning with `//' if $HOME == `/'.
7415 t. Fixed a couple of autoconf tests to avoid creating files with fixed names
7418 u. The `trap' and `kill' builtins now know the names of the POSIX.1b real-
7419 time signals on systems which support them.
7421 2. Changes to Readline
7423 a. Fixed a problem with the single-quote quoting function that could cause
7426 b. Fixed a bug that caused incorrect `stat characters' to be printed if
7427 the files being completed were in the root directory and visible-stats
7430 3. New Features in Bash
7432 a. There is a new `rbash.1' manual page, from the Debian release.
7434 b. The `--enable-usg-echo-default' option to `configure' has been renamed to
7435 `--enable-xpg-echo-default'. The old option is still there for backwards
7438 ------------------------------------------------------------------------------
7439 This document details the changes between this version, bash-2.04-beta2,
7440 and the previous version, bash-2.04-beta1.
7444 a. Fixed a bug that could cause pipes to be closed inappropriately in
7447 b. Fixed a bug that caused creation of the exported environment to clobber
7448 the current command string if there were any exported shell functions.
7450 c. Some changes were made to reduce bash's memory usage.
7452 d. Fixed a problem with programmable completion and filenames to be
7453 completed containing quote characters.
7455 e. Changed the code the removes named pipes created for the <(...) and >(...)
7456 expansions to defer removal until after any current shell function has
7459 f. Fixed a bug in `select' which caused it to not handle the `continue'
7462 g. Autoconf tests added for cygwin32 and mingw32.
7464 2. New Features in Bash
7466 a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc'
7467 (which is still there for backwards compatibility).
7469 ------------------------------------------------------------------------------
7470 This document details the changes between this version, bash-2.04-beta1,
7471 and the previous version, bash-2.04-alpha1.
7475 a. Fixed a bug in the programmable completion code that occurred when
7476 trying to complete command lines containing a `;' or `@'.
7478 b. The file descriptor from which the shell is reading a script is now
7479 moved to a file descriptor above the user-addressible range.
7481 c. Changes to `printf' so that it can handle integers beginning with 0
7482 or 0x as octal and hex, respectively.
7484 d. Fixes to the programmable completion code so it handles nonsense like
7485 `compgen -C xyz' gracefully.
7487 e. The shell no longer modifies the signal handler for SIGPROF, allowing
7488 profiling again on certain systems.
7490 f. The shell checks for a new window size, if the user has requested it,
7491 after a process exits due to a signal.
7493 g. Fixed a bug with variables with null values in a program's temporary
7494 environment and the bash getenv() replacement.
7496 h. `declare' and the other builtins that take variable assignments as
7497 arguments now honor `set -a' and mark modified variables for export.
7499 i. Some changes were made for --dump-po-strings mode when writing strings
7500 with embedded newlines.
7502 j. The code that caches export strings from the initial environment now
7503 duplicates the string rather than just pointing into the environment.
7505 k. The filename completion quoting code now uses single quotes by default
7506 if the filename being completed contains newlines, since \<newline>
7507 has a special meaning to the parser.
7509 l. Bash now uses typedefs bits32_t and u_bits32_t instead of int32_t and
7510 u_int32_t, respectively to avoid conflicts on certain Unix versions.
7512 m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x.
7514 n. Fixed a problem with hostname-to-ip-address translation in the
7515 /dev/(tcp|udp)/hostname/port redirection code.
7517 o. The texinfo manual has been reorganized slightly.
7519 p. Filename generation (globbing) range comparisons in bracket expressions
7520 no longer use strcoll(3) even if it is available, since it has unwanted
7521 effects in certain locales.
7523 q. Fixed a cosmetic problem in the source that caused the shell to not
7524 compile if DPAREN_ARITHMETIC was not defined but ARITH_FOR_COMMAND was.
7526 r. Fixed a bug in the here-document code tripped when the file descriptor
7527 opened to the file containing the text of the here document was the
7528 same as a redirector specified by the user.
7530 s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline'
7531 in `time ! pipeline'.
7533 t. Fixed a bug with the `wait' builtin which manifested itself when an
7534 interrupt was received while the shell was waiting for asynchronous
7535 processes in a shell script.
7537 u. Fixed the DEBUG trap code so that it has the correct value of $?.
7539 v. Fixed a bug in the parameter pattern substitution code that could cause
7540 the shell to attempt to free unallocated memory if the pattern started
7541 with `/' and an expansion error occurs.
7543 w. Fixed a bug in the positional parameter substring code that could
7544 cause the shell to loop freeing freed memory.
7546 x. Fixed a bug in the positional parameter pattern substitution code so
7547 that it correctly handles null replacement strings with a pattern
7548 string prefixed with `%' or `#'.
7550 y. The shell no longer attempts to import functions from the environment if
7553 z. Fixed a bug that caused `return' in a command substitution executed in
7554 a shell function to return from the function in a subshell and continue
7557 aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell
7560 bb. The wait* job control functions now behave better if called when there
7561 are no unwaited-for children.
7563 cc. Command substitution no longer unconditionally disables job control in
7564 the subshell started to run the command.
7566 dd. A bug was fixed that occasionally caused traps to mess up the parser
7569 ee. `bashbug' now honors user headers in the mail message it sends.
7571 ff. A bug was fixed that caused the `:p' history modifier to not print the
7572 history expansion if the `histverify' option was set.
7574 2. Changes to Readline
7576 a. Fixed a bug in the redisplay code for lines with more than 256 line
7579 b. A bug was fixed which caused invisible character markers to not be
7580 stripped from the prompt string if the terminal was in no-echo mode.
7582 c. Readline no longer tries to get the variables it needs for redisplay
7583 from the termcap entry if the calling application has specified its
7584 own redisplay function. Readline treats the terminal as `dumb' in
7587 d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
7588 sequences is redrawn correctly.
7590 3. New Features in Bash
7592 a. `bashbug' now accepts `--help' and `--version' options.
7594 b. There is a new `xpg_echo' option to `shopt' that controls the behavior
7595 of echo with respect to backslash-escaped characters at runtime.
7597 ------------------------------------------------------------------------------
7598 This document details the changes between this version, bash-2.04-alpha1,
7599 and the previous version, bash-2.04-devel.
7603 a. Fixed a bug that could cause core dumps when performing substring
7606 b. Shared object configuration changes for: Solaris, OSF/1
7608 c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities
7609 for pathname expansion now understands GLOBIGNORE.
7611 d. The code that implements `eval' was changed to save the value of the
7612 current prompt, so an eval in a shell function called by the programmable
7613 completion code will not change the prompt to $PS2.
7615 e. Restored the undocumented NON_INTERACTIVE_LOGIN_SHELLS #define to
7616 config-top.h. If this is defined, all login shells will read the
7617 startup files, not just interactive and non-interactive started with
7618 the `--login' option.
7620 f. Fixed a bug that caused the expansion code to occasionally dump core if
7621 IFS contained characters > 128.
7623 g. Fixed a problem with the grammar so that a newline is not required
7624 after the `))' in the new-style arithmetic for statement; a semicolon
7625 may be used as expected.
7627 h. Variable indirection may now reference the shell's special variables.
7629 i. The $'...' and $"..." constructs are now added to the history correctly
7630 if they contain newlines and command-oriented history is enabled.
7632 j. It is now an error to try to assign a value to a function-local copy
7633 of a readonly shell variable (declared with the `local' builtin).
7635 2. Changes to Readline
7637 a. The history file code now uses O_BINARY mode when reading and writing
7638 the history file on cygwin32.
7640 3. New Features in Bash
7642 a. A new programmable completion facility, with two new builtin commands:
7643 complete and compgen.
7645 b. configure has a new option, `--enable-progcomp', to compile in the
7646 programmable completion features (enabled by default).
7648 c. `shopt' has a new option, `progcomp', to enable and disable programmable
7649 completion at runtime.
7651 d. Unsetting HOSTFILE now clears the list of hostnames used for completion.
7653 4. New Features in Readline
7655 a. A new variable, rl_gnu_readline_p, always 1. The intent is that an
7656 application can verify whether or not it is linked with the `real'
7657 readline library or some substitute.
7659 ------------------------------------------------------------------------------
7660 This document details the changes between this version, bash-2.04-devel,
7661 and the previous version, bash-2.03-release.
7665 a. System-specific configuration and source changes for: Interix, Rhapsody
7667 b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if
7668 JOB_CONTROL was not defined.
7670 c. An obscure race condition in the trap code was fixed.
7672 d. The string resulting from $'...' is now requoted to avoid any further
7675 e. The $'...' quoting syntax now allows backslash to escape a single quote,
7676 for ksh-93 compatibility.
7678 f. The $"..." quoting syntax now escapes backslashes and double quotes in
7679 the translated string when displaying them with the --dump-po-strings
7682 g. `echo -e' no longer converts \' to '.
7684 h. Fixes were made to the extended globbing code to handle embedded (...)
7687 i. Some improvements were made to the code that unsets `nodelay' mode on
7688 the file descriptor from which bash is reading input.
7690 j. Some changes were made to the replacement termcap library for better
7691 operation on MS-DOS.
7693 k. Some changes were made to the tilde expansion code to handle backslash
7694 as a pathname separator on MS-DOS.
7696 l. The source has been reorganized a little bit -- there is now an `include'
7697 subdirectory, and lib/posixheaders has been removed.
7699 m. Improvements were made to the `read' builtin so that it makes many
7700 fewer read(2) system calls.
7702 n. The expansion of $- will include `c' and `s' when those options are
7703 supplied at shell invocation.
7705 o. Several improvments were made to the completion code: variable completion
7706 now works better when there are unterminated expansions, command
7707 completion understands quotes better, and completion now works in certain
7708 unclosed $(... constructs.
7710 p. The arithmetic expansion code was fixed to not need the value of a
7711 variable being assigned a value (fixes the "ss=09; let ss=10" bug).
7713 q. Some changes were made to make exported environment creation faster.
7715 r. The html documentation will be installed into $(htmldir) if that variable
7716 has a value when `make install' is run.
7718 s. Fixed a bug that would cause the bashrc file to be sourced inappropriately
7719 when bash is started by sshd.
7721 t. The SSH_CLIENT environment variable is no longer auto-exported.
7723 u. A bug that caused redirections with (...) subshells to be performed in
7724 the wrong order was fixed.
7726 v. A bug that occasionally caused inappropriate expansion of assignment
7727 statements in compound array assignments was fixed.
7729 w. The code that parses the words in a compound array assignment was
7730 simplified considerably and should work better now.
7732 x. Fixes to the non-job-control code in nojobs.c to make it POSIX.2-compliant
7733 when a user attempts to retrieve the status of a terminated background
7736 y. Fixes to the `printf' builtin so that it doesn't try to expand all
7737 backslash escape sequences in the format string before parsing it for
7738 % format specifiers.
7740 2. Changes to Readline
7742 a. The history library tries to truncate the history file only if it is a
7745 b. A bug that caused _rl_dispatch to address negative array indices on
7746 systems with signed chars was fixed.
7748 c. rl-yank-nth-arg now leaves the history position the same as when it was
7751 d. Changes to the completion code to handle MS-DOS drive-letter:pathname
7754 e. Completion is now case-insensitive by default on MS-DOS.
7756 f. Fixes to the history file manipulation code for MS-DOS.
7758 g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
7760 h. Some fixes were made to the redisplay code for better operation on MS-DOS.
7762 i. The quoted-insert code will now insert tty special chars like ^C.
7764 j. A bug was fixed that caused the display code to reference memory before
7765 the start of the prompt string.
7767 k. More support for __EMX__ (OS/2).
7769 l. A bug was fixed in readline's signal handling that could cause infinite
7770 recursion in signal handlers.
7772 m. A bug was fixed that caused the point to be less than zero when rl_forward
7773 was given a very large numeric argument.
7775 n. The vi-mode code now gets characters via the application-settable value
7776 of rl_getc_function rather than calling rl_getc directly.
7778 3. New Features in Bash
7780 a. The history builtin has a `-d offset' option to delete the history entry
7781 at position `offset'.
7783 b. The prompt expansion code has two new escape sequences: \j, the number of
7784 active jobs; and \l, the basename of the shell's tty device name.
7786 c. The `bind' builtin has a new `-x' option to bind key sequences to shell
7789 d. There is a new shell option, no_empty_command_completion, which, when
7790 enabled, disables command completion when TAB is typed on an empty line.
7792 e. The `help' builtin has a `-s' option to just print a builtin's usage
7795 f. There are several new arithmetic operators: id++, id-- (variable
7796 post-increment/decrement), ++id, --id (variabl pre-increment/decrement),
7797 expr1 , expr2 (comma operator).
7799 g. There is a new ksh-93 style arithmetic for command:
7800 for ((expr1 ; expr2; expr3 )); do list; done
7802 h. The `read' builtin has a number of new options:
7803 -t timeout only wait timeout seconds for input
7804 -n nchars only read nchars from input instead of a full line
7805 -d delim read until delim rather than newline
7806 -s don't echo input chars as they are read
7808 i. The redirection code now handles several filenames specially:
7809 /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
7810 not they are present in the file system.
7812 j. The redirection code now recognizes pathnames of the form
7813 /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
7814 of the appropriate type to the specified port on the specified host.
7816 k. The ksh-93 ${!prefix*} expansion, which expands to the names of all
7817 shell variables whose names start with prefix, has been implemented.
7819 l. There is a new dynamic variable, FUNCNAME, which expands to the name of
7820 a currently-executing function. Assignments to FUNCNAME have no effect.
7822 m. The GROUPS variable is no longer readonly; assignments to it are silently
7823 discarded. This means it can be unset.
7825 4. New Features in Readline
7827 a. Parentheses matching is now always compiled into readline, and enabled
7828 or disabled when the value of the `blink-matching-paren' variable is
7831 b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
7833 c. MS-DOS systems now use ~/_history as the default history file.
7835 d. history-search-{forward,backward} now leave the point at the end of the
7836 line when the string to search for is empty, like
7837 {reverse,forward}-search-history.
7839 e. history-search-{forward,backward} now leave the last history line found
7840 in the readline buffer if the second or subsequent search fails.
7842 f. New function for use by applications: rl_on_new_line_with_prompt, used
7843 when an application displays the prompt itself before calling readline().
7845 g. New variable for use by applications: rl_already_prompted. An application
7846 that displays the prompt itself before calling readline() must set this to
7849 ------------------------------------------------------------------------------
7850 This document details the changes between this version, bash-2.03-release,
7851 and the previous version, bash-2.03-beta2.
7855 a. A file descriptor leak in the `fc' builtin was fixed.
7857 b. A bug was fixed in the `read' builtin that caused occasional spurious
7858 failures when using `read -e'.
7860 c. The version code needed to use the value of the cpp variable
7861 CONF_MACHTYPE rather than MACHTYPE.
7863 d. A new test was added to exercise the command printing and copying code.
7865 e. A bug was fixed that caused `time' to be recognized as a reserved word
7866 if it was the first pattern in a `case' statement pattern list.
7868 ------------------------------------------------------------------------------
7869 This document details the changes between this version, bash-2.03-beta2,
7870 and the previous version, bash-2.03-beta1.
7874 a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2.
7876 b. config.{guess,sub} support added for the NEC SX4.
7878 c. Changed some of the cross-compiling sections of the configure macros in
7879 aclocal.m4 so that configure won't abort.
7881 d. Slight changes to how the HTML versions of the bash and readline manuals
7884 e. Fixed conditional command printing to avoid interpreting printf `%'-escapes
7887 f. Don't include the bash malloc on all variants of the alpha processor.
7889 g. Changes to configure to make --enable-profiling work on Solaris 2.x.
7891 h. Fixed a bug that manifested itself when shell functions were called
7892 between calls to `getopts'.
7894 i. Fixed pattern substitution so that a bare `#'as a pattern causes the
7895 replacement string to be prefixed to the search string, and a bare
7896 `%' causes the replacement string to be appended to the search string.
7898 j. Fixed a bug in the command execution code that caused child processes
7899 to occasionally have the wrong value for $!.
7901 2. Changes to Readline
7903 a. Added code to the history library to catch history substitutions using
7904 `&' without a previous history substitution or search having been
7907 3. New Features in Bash
7909 4. New Features in Readline
7911 a. New bindable variable: `isearch-terminators'.
7913 b. New bindable function: `forward-backward-delete-char' (unbound by default).
7915 ------------------------------------------------------------------------------
7916 This document details the changes between this version, bash-2.03-beta1,
7917 and the previous version, bash-2.03-alpha.
7921 a. A change was made to the help text for `{...}' to make it clear that a
7922 semicolon is required before the closing brace.
7924 b. A fix was made to the `test' builtin so that syntax errors cause test
7925 to return an exit status > 1.
7927 c. Globbing is no longer performed on assignment statements that appear as
7928 arguments to `assignment builtins' such as `export'.
7930 d. System-specific configuration changes were made for: Rhapsody,
7931 AIX 4.2/gcc, BSD/OS 4.0.
7933 e. New loadable builtins: ln, unlink.
7935 f. Some fixes were made to the globbing code to handle extended glob patterns
7936 which immediately follow a `*'.
7938 g. A fix was made to the command printing code to ensure that redirections
7939 following compound commands have a space separating them from the rest
7942 h. The pathname canonicalization code was changed to produce fewer leading
7943 `//' sequences, since those are interpreted as network file system
7944 pathnames on some systems.
7946 i. A fix was made so that loops containing `eval' commands in commands passed
7947 to `bash -c' would not exit prematurely.
7949 j. Some changes were made to the job reaping code when the shell is not
7950 interactive, so the shell will retain exit statuses longer for examination
7953 k. A fix was made so that `jobs | command' works again.
7955 l. The erroneous compound array assignment var=((...)) is now a syntax error.
7957 m. A change was made to the dynamic loading code in `enable' to support
7960 n. A fix was made to the globbing code so that extended globbing patterns
7961 will correctly match `.' in a bracket expression.
7963 2. Changes to Readline
7965 a. A fix was made to the completion code in which a typo caused the wrong
7966 value to be passed to the function that computed the longest common
7967 prefix of the list of matches.
7969 b. The completion code now checks the value of rl_filename_completion_desired,
7970 which is set by application-supplied completion functions to indicate
7971 that filename completion is being performed, to decide whether or not to
7972 call an application-supplied `ignore completions' function.
7974 3. New Features in Bash
7976 a. A change was made to the startup file code so that any shell begun with
7977 the `--login' option, even non-interactive shells, will source the login
7978 shell startup files.
7980 4. New Features in Readline
7982 a. A new variable, rl_erase_empty_line, which, if set by an application using
7983 readline, will cause readline to erase, prompt and all, lines on which the
7984 only thing typed was a newline.
7986 ------------------------------------------------------------------------------
7987 This document details the changes between this version, bash-2.03-alpha,
7988 and the previous version, bash-2.02.1-release.
7992 a. System-specific configuration changes were made for: Irix 6.x, Unixware 7.
7994 b. The texi2dvi and texi2html scripts were updated to the latest versions
7997 c. The configure tests that determine which native type is 32 bits were
7998 changed to not require a compiled program.
8000 d. Fixed a bug in shell_execve that could cause memory to be freed twice
8001 after a failed exec.
8003 e. The `printf' test uses `diff -a' if it's available to prevent confusion
8004 due to the non-ascii output.
8006 f. Shared object configuration is now performed by a shell script,
8007 support/shobj-conf, which generates values to be substituted into
8008 makefiles by configure.
8010 g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a
8013 h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar
8014 handling of RLIMIT_FILESIZE.
8016 i. Some new loadable builtins were added: id, printenv, sync, whoami, push,
8017 mkdir. `pushd', `popd', and `dirs' can now be built as regular or
8018 loadable builtins from the same source file.
8020 j. Changes were made to `printf' to handle NUL bytes in the expanded format
8023 k. The various `make clean' Makefile targets now descend into lib/sh.
8025 l. The `type' builtin was changed to use the internal `getopt' so that things
8026 like `type -ap' work as expected.
8028 m. There is a new configuration option, --with-installed-readline, to link
8029 bash with a locally-installed version of readline. Only readline version
8030 4.0 and later releases can support this. Shared and static libraries
8031 are supported. The installed include files are used.
8033 n. There is a new autoconf macro used to find which basic type is 64 bits.
8035 o. Dynamic linking and loadable builtins should now work on SCO 3.2v5*,
8036 AIX 4.2 with gcc, Unixware 7, and many other systems using gcc, where
8037 the `-shared' options works correctly.
8039 p. A bug was fixed in the bash filename completion code that caused memory to
8040 be freed twice if a directory name containing an unset variable was
8041 completed and the -u option was set.
8043 q. The prompt expansion code now quotes the `$' in the `\$' expansion so it
8044 is not processed by subsequent parameter expansion.
8046 r. Fixed a parsing bug that caused a single or double quote after a `$$' to
8047 trigger ANSI C expansion or locale translation.
8049 s. Fixed a bug in the globbing code that caused quoted filenames containing
8050 no globbing characters to sometimes be incorrectly expanded.
8052 t. Changes to the default prompt strings if prompt string decoding is not
8053 compiled into the shell.
8055 u. Added `do', `then', `else', `{', and `(' to the list of keywords that may
8056 precede the `time' reserved word.
8058 v. The shell may now be cross-built for BeOS as well as cygwin32.
8060 w. The conditional command execution code now treats `=' the same as `=='
8061 for deciding when to perform pattern matching.
8063 x. The `-e' option no longer causes the shell to exit if a command exits
8064 with a non-zero status while running the startup files.
8066 y. The `printf' builtin no longer dumps core if a modifier is supplied in
8067 the format string without a conversion character (e.g. `%h').
8069 z. Array assignments of the form a=(...) no longer show up in the history
8072 aa. The parser was fixed to obey the POSIX.2 rules for finding the closing
8073 `}' in a ${...} expression.
8075 bb. The history file is now opened with mode 0600 rather than 0666, so bash
8076 no longer relies on the user's umask being set appropriately.
8078 cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now
8079 relies on proper behavior from the C library.
8081 dd. Minor changes were made to allow quoted variable expansions using
8082 ${...} to be completed correctly if there is no closing `"'.
8084 ee. Changes were made to builtins/Makefile.in so that configuring the shell
8085 with `--enable-profiling' works right and builtins/mkbuiltins is
8088 2. Changes to Readline
8090 a. The version number is now 4.0.
8092 b. There is no longer any #ifdef SHELL code in the source files.
8094 c. Some changes were made to the key binding code to fix memory leaks and
8095 better support Win32 systems.
8097 d. Fixed a silly typo in the paren matching code -- it's microseconds, not
8100 e. The readline library should be compilable by C++ compilers.
8102 f. The readline.h public header file now includes function prototypes for
8103 all readline functions, and some changes were made to fix errors in the
8104 source files uncovered by the use of prototypes.
8106 g. The maximum numeric argument is now clamped at 1000000.
8108 h. Fixes to rl_yank_last_arg to make it behave better.
8110 i. Fixed a bug in the display code that caused core dumps if the prompt
8111 string length exceeded 1024 characters.
8113 j. The menu completion code was fixed to properly insert a single completion
8114 if there is only one match.
8116 k. A bug was fixed that caused the display code to improperly display tabs
8119 3. New Features in Bash
8121 a. New `shopt' option, `restricted_shell', indicating whether or not the
8122 shell was started in restricted mode, for use in startup files.
8124 b. Filename generation is now performed on the words between ( and ) in
8125 array assignments (which it probably should have done all along).
8127 c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
8129 d. ENV and BASH_ENV are read-only variables in a restricted shell.
8131 4. New Features in Readline
8133 a. Many changes to the signal handling:
8134 o Readline now catches SIGQUIT and cleans up the tty before returning;
8135 o A new variable, rl_catch_signals, is available to application writers
8136 to indicate to readline whether or not it should install its own
8137 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
8138 SIGTTIN, and SIGTTOU;
8139 o A new variable, rl_catch_sigwinch, is available to application
8140 writers to indicate to readline whether or not it should install its
8141 own signal handler for SIGWINCH, which will chain to the calling
8142 applications's SIGWINCH handler, if one is installed;
8143 o There is a new function, rl_free_line_state, for application signal
8144 handlers to call to free up the state associated with the current
8145 line after receiving a signal;
8146 o There is a new function, rl_cleanup_after_signal, to clean up the
8147 display and terminal state after receiving a signal;
8148 o There is a new function, rl_reset_after_signal, to reinitialize the
8149 terminal and display state after an application signal handler
8150 returns and readline continues
8152 b. There is a new function, rl_resize_terminal, to reset readline's idea of
8153 the screen size after a SIGWINCH.
8155 c. New public functions: rl_save_prompt and rl_restore_prompt. These were
8156 previously private functions with a `_' prefix.
8158 d. New function hook: rl_pre_input_hook, called just before readline starts
8159 reading input, after initialization.
8161 e. New function hook: rl_display_matches_hook, called when readline would
8162 display the list of completion matches. The new function
8163 rl_display_match_list is what readline uses internally, and is available
8164 for use by application functions called via this hook.
8166 f. New bindable function, delete-char-or-list, like tcsh.
8168 ------------------------------------------------------------------------------
8169 This document details the changes between this version, bash-2.02.1-release,
8170 and the previous version, bash-2.02-release.
8174 a. A bug that caused the bash readline support to not compile unless aliases
8175 and csh-style history were configured into the shell was fixed.
8177 b. Fixed a bug that could cause a core dump when here documents contained
8178 more than 1000 characters.
8180 c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same
8181 as the current directory when in POSIX mode.
8183 d. Fixed an alignment problem with the memory returned by the bash malloc,
8184 so returned memory is now 64-bit aligned.
8186 e. Fixed a bug that caused command substitutions executed within pipelines
8187 to put the terminal in the wrong process group.
8189 f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop,
8190 Unixware 2, and Unixware 7.
8192 g. Fixes to the pattern matching code to make it work correctly for eight-bit
8195 h. Fixed a problem that occasionally caused the shell to display the wrong
8196 value for the new working directory when changing to a directory found
8197 in $CDPATH when in physical mode.
8199 i. Fixed a bug that caused core dumps when using conditional commands in
8202 j. Fixed a bug that caused the printf builtin to loop forever if the format
8203 string did not consume any of the arguments.
8205 k. Fixed a bug in the parameter expansion code that caused "$@" to be
8206 incorrectly split if $IFS did not contain a space character.
8208 l. Fixed a bug that could cause a core dump when completing hostnames if
8209 the number of matching hostnames was an exact multiple of 16.
8211 m. Fixed a bug that caused the shell to fork too early when a command
8212 such as `%2 &' was given.
8214 2. Changes to Readline
8216 a. Fixed a problem with redisplay that showed up when the prompt string was
8217 longer than the screen width and the prompt contained invisible characters.
8219 ------------------------------------------------------------------------------
8220 This document details the changes between this version, bash-2.02-release,
8221 and the previous version, bash-2.02-beta2.
8225 a. A bug was fixed that caused the terminal process group to be set
8226 incorrectly when performing command substitution of builtins in a
8229 ------------------------------------------------------------------------------
8230 This document details the changes between this version, bash-2.02-beta2,
8231 and the previous version, bash-2.02-beta1.
8235 a. Attempting to `wait' for stopped jobs now generates a warning message.
8237 b. Pipelines which exit due to SIGPIPE in non-interactive shells are now
8238 not reported if the shell is compiled -DDONT_REPORT_SIGPIPE.
8240 c. Some changes were made to builtins/psize.sh and support/bashbug.sh to
8241 attempt to avoid some /tmp file races and surreptitious file
8244 d. Fixed a bug that caused the shell not to compile if configured with
8245 dparen arithmetic but without aliases.
8247 e. Fixed a bug that caused the input stream to be switched when assigning
8248 empty arrays with `bash -c'.
8250 f. A bug was fixed in the readline expansion glue code that caused bash to
8251 dump core when expanding lines with an unclosed single quote.
8253 g. A fix was made to the `cd' builtin so that using a non-empty directory
8254 from $CDPATH results in an absolute pathname of the new current working
8255 directory to be displayed after the current directory is changed.
8257 h. Fixed a bug in the variable assignment code that caused the shell to
8258 dump core when referencing an unset variable with `set -u' enabled in
8259 an assignment statement preceding a command.
8261 i. Fixed a bug in the exit trap code that caused reserved words to not be
8262 recognized under certain circumstances.
8264 j. Fixed a bug in the parameter pattern substitution code so that quote
8265 removal is performed.
8267 k. The shell should now configure correctly on Apple Rhapsody systems.
8269 l. The `kill' builtin now prints a usage message if it is not passed any
8272 ------------------------------------------------------------------------------
8273 This document details the changes between this version, bash-2.02-beta1,
8274 and the previous version, bash-2.02-alpha1.
8278 a. A few compilation bugs were fixed in the new extended globbing code.
8280 b. Executing arithmetic commands now sets the command name to `((' so
8281 error messages look right.
8283 c. Fixed some build problems with various configuration options.
8285 d. The `printf' builtin now aborts immediately if an illegal format
8286 character is encountered.
8288 e. The code that creates here-documents now behaves better if the file it's
8289 trying to create already exists for some reason.
8291 f. Fixed a problem with the extended globbing code that made patterns like
8292 `x+*' expand incorrectly.
8294 g. The prompt string expansion code no longer quotes tildes with backslashes.
8296 h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in
8297 the presence of lstat(2) failures.
8299 i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'.
8301 j. The mail checking code now ensures that it has a valid default mailpath.
8303 k. A bug was fixed that caused local variables to be unset inappropriately
8304 when sourcing a script from within another sourced script.
8306 l. A bug was fixed in the history saving code so that functions are saved
8307 in the history list correctly if `cmdhist' is enabled, but `lithist'
8310 m. A bug was fixed that caused printf overflows when displaying error
8313 n. It should be easier to build the loadble builtins in examples/loadables,
8314 though some manual editing of the generated Makefile is still required.
8316 o. The user's primary group is now always ${GROUPS[0]}.
8318 p. Some updates were made to support/config.guess from the GNU master copy.
8320 q. Some changes were made to the autoconf support for Solaris 2.6 large
8323 r. The `command' builtins now does the right thing when confstr(3) cannot
8324 find a value for _CS_PATH.
8326 s. Extended globbing expressions like `*.!(c)' are not history expanded if
8327 `extglob' is enabled.
8329 t. Using the `-P' option to `cd' will force the value that is assigned to
8330 PWD to not contain any symbolic links.
8332 2. Changes to Readline
8334 a. The code that prints completion listings now behaves better if one or
8335 more of the filenames contains non-printable characters.
8337 b. The time delay when showing matching parentheses is now 0.5 seconds.
8339 ------------------------------------------------------------------------------
8340 This document details the changes between this version, bash-2.02-alpha1,
8341 and the previous version, bash-2.01.1-release.
8345 a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x,
8346 Solaris 2.6, SINIX SVR4.
8348 b. Changes were made to the generated `info' files so that `install-info'
8351 c. PWD is now auto-exported.
8353 d. A fix was made to the pipeline code to make sure that the shell forks
8354 to execute simple commands consisting solely of assignment statements.
8356 e. Changes to the test suite for systems with 14-character filenames.
8358 f. The default sizes of some internal hash tables have been made smaller
8359 to reduce the shell's memory footprint.
8361 g. The `((...))' arithmetic command is now executed directly instead of
8362 being translated into `let "..."'.
8364 h. Fixes were made to the expansion code so that "$*", "$@", "${array[@]}",
8365 and "${array[@]}" expand correctly when IFS does not contain a space
8366 character, is unset, or is set to NULL.
8368 i. The indirect expansion code (${!var}) was changed so that the only
8369 valid values of `var' are variable names, positional parameters, `#',
8372 j. An arithmetic expression error in a $((...)) expansion now causes a
8373 non-interactive shell running in posix mode to exit.
8375 k. Compound array assignment now splits the words within the parentheses
8376 on shell metacharacters like the parser would before expansing them
8377 and performing the assignment. This is for compatibility with ksh-93.
8379 l. The internal shell backslash-quoting code (used in the output of `set'
8380 and completion) now quotes tildes if they appear at the start of the
8381 string or after a `=' or `:'.
8383 m. A couple of bugs with `shopt -o' were fixed.
8385 n. `bash +o' now displays the same output as `set +o' before starting an
8388 o. A bug that caused command substitution and the `eval' builtin to
8389 occasionally free memory twice when an error was encountered was fixed.
8391 p. The filename globbing code no longer requires read permission for a
8392 directory when the filename to be matched does not contain any globbing
8393 characters, as POSIX.2 specifies.
8395 q. A bug was fixed so that the job containing the last asynchronous
8396 process is not removed from the job table until a `wait' is executed
8397 for that process or another asynchronous process is started. This
8398 satisfies a POSIX.2 requirement.
8400 r. A `select' bug was fixed so that a non-numeric user response is treated
8401 the same as a numeric response that is out of range.
8403 s. The shell no longer parses the value of SHELLOPTS from the environment
8404 if it is restricted, running setuid, or running in `privileged mode'.
8406 t. Fixes were made to enable large file support on systems such as
8407 Solaris 2.6, where the size of a file may be larger than can be held
8410 u. The filename hashing code was fixed to not add `./' to the beginning of
8411 filenames which already begin with `./'.
8413 v. The configure script was changed so that the GNU termcap library is not
8414 compiled in if `prefer-curses' has been specified.
8416 w. HISTCONTROL and HISTIGNORE are no longer applied to the second and
8417 subsequent lines of a multi-line command.
8419 x. A fix was made to `disown' so that it does a better job of catching
8422 y. Non-interactive shells no longer report the status of processes terminated
8423 due to SIGINT, even if the standard output is a terminal.
8425 z. A bug that caused the output of `jobs' to have extra carriage returns
8428 aa. A bug that caused PIPESTATUS to not be set when builtins or shell
8429 functions were executed in the foreground was fixed.
8431 bb. Bash now attempts to detect when it is being run by sshd, and treats
8432 that case identically to being run by rshd.
8434 cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell
8435 options was changed was fixed.
8437 dd. The `kill' builtin now disallows empty or missing process id arguments
8438 instead of treating them as identical to `0', which means the current
8441 ee. `var=value declare -x var' now behaves identically to
8442 `var=value export var'. Similarly for `var=value declare -r var' and
8443 `var=value readonly var'.
8445 ff. A few memory leaks were fixed.
8447 gg. `alias' and `unalias' now print error messages when passed an argument
8448 that is not an alias for printing or deletion, even when the shell is
8449 not interactive, as POSIX.2 specifies.
8451 hh. `alias' and `alias -p' now return a status of 0 when no aliases are
8452 defined, as POSIX.2 specifes.
8454 ii. `cd -' now prints the pathname of the new working directory if the shell
8457 jj. A fix was made so that the code that binds $PWD now copes with getcwd()
8460 kk. `unset' now checks whether or not a function name it's trying to unset
8461 is a valid shell identifier only when the shell is running in posix mode.
8463 ll. A change was made to the code that generates filenames for here documents
8464 to make them less prone to name collisions.
8466 mm. The parser was changed so that `time' is recognized as a reserved word
8467 only at the beginning of a pipeline.
8469 nn. The pathname canonicalization code was changed so that `//' is converted
8470 into `/', but all other pathnames beginning with `//' are left alone, as
8473 oo. The `logout' builtin will no longer exit a non-interactive non-login
8476 2. Changes to Readline
8478 a. Fixed a problem in the readline test program rltest.c that caused a core
8481 b. The code that handles parser directives in inputrc files now displays
8482 more error messages.
8484 c. The history expansion code was fixed so that the appearance of the
8485 history comment character at the beginning of a word inhibits history
8486 expansion for that word and the rest of the input line.
8488 3. New Features in Bash
8490 a. A new version of malloc, based on the older GNU malloc, that has many
8491 changes, is more page-based, is more conservative with memory usage,
8492 and does not `orphan' large blocks when they are freed.
8494 b. A new version of gmalloc, based on the old GLIBC malloc, with many
8495 changes and range checking included by default.
8497 c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic
8498 Regular Expression matching, including character classes, collating
8499 symbols, equivalence classes, and support for case-insensitive pattern
8502 d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
8503 implemented, controlled by a new `shopt' option, `extglob'.
8505 e. There is a new ksh-like `[[' compound command, which implements
8506 extended `test' functionality.
8508 f. There is a new `printf' builtin, implemented according to the POSIX.2
8511 g. There is a new feature for command substitution: $(< filename) now expands
8512 to the contents of `filename', with any trailing newlines removed
8513 (equivalent to $(cat filename)).
8515 h. There are new tilde prefixes which expand to directories from the
8518 i. There is a new `**' arithmetic operator to do exponentiation.
8520 j. There are new configuration options to control how bash is linked:
8521 `--enable-profiling', to allow bash to be profiled with gprof, and
8522 `--enable-static-link', to allow bash to be linked statically.
8524 k. There is a new configuration option, `--enable-cond-command', which
8525 controls whether or not the `[[' command is included. It is on by
8528 l. There is a new configuration option, `--enable-extended-glob', which
8529 controls whether or not the ksh extended globbing feature is included.
8530 It is enabled by default.
8532 m. There is a new configuration #define in config.h.top that, when enabled,
8533 will cause all login shells to source /etc/profile and one of the user-
8534 specific login shell startup files, whether or not the shell is
8537 n. There is a new invocation option, `--dump-po-strings', to dump
8538 a shell script's translatable strings ($"...") in GNU `po' format.
8540 o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
8541 pattern matching when globbing filenames and using the `case' construct.
8543 p. There is a new `shopt' option, `huponexit', which, when enabled, causes
8544 the shell to send SIGHUP to all jobs when an interactive login shell
8547 q. `bind' has a new `-u' option, which takes a readline function name as an
8548 argument and unbinds all key sequences bound to that function in a
8551 r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
8552 and running jobs, respectively.
8554 s. The `shopt' `-p' option now causes output to be displayed in a reusable
8557 t. `test' has a new `-N' option, which returns true if the filename argument
8558 has been modified since it was last accessed.
8560 u. `umask' now has a `-p' option to print output in a reusable format.
8562 v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
8563 translation code. It expands to the character whose ascii code is NNN
8566 w. The prompt string expansion code has a new `\r' escape sequence.
8568 x. The shell may now be cross-compiled for the CYGWIN32 environment on
8571 4. New Features in Readline
8573 a. There is now an option for `iterative' yank-last-arg handline, so a user
8574 can keep entering `M-.', yanking the last argument of successive history
8577 b. New variable, `print-completions-horizontally', which causes completion
8578 matches to be displayed across the screen (like `ls -x') rather than up
8579 and down the screen (like `ls').
8581 c. New variable, `completion-ignore-case', which causes filename completion
8582 and matching to be performed case-insensitively.
8584 d. There is a new bindable command, `magic-space', which causes history
8585 expansion to be performed on the current readline buffer and a space to
8586 be inserted into the result.
8588 e. There is a new bindable command, `menu-complete', which enables tcsh-like
8589 menu completion (successive executions of menu-complete insert a single
8590 completion match, cycling through the list of possible completions).
8592 f. There is a new bindable command, `paste-from-clipboard', for use on Win32
8593 systems, to insert the text from the Win32 clipboard into the editing
8596 g. The key sequence translation code now understands printf-style backslash
8597 escape sequences, including \NNN octal escapes. These escape sequences
8598 may be used in key sequence definitions or macro values.
8600 h. An `$include' inputrc file parser directive has been added.
8602 ------------------------------------------------------------------------------
8603 This document details the changes between this version, bash-2.01.1-release,
8604 and the previous version, bash-2.01-release.
8608 a. The select command was fixed to check the validity of the user's
8609 input more strenuously.
8611 b. A bug was fixed that prevented `time' from timing commands correctly
8612 when supplied as an argument to `bash -c'.
8614 c. A fix was made to the mail checking code to keep from adding the same
8615 mail file to the list of files to check multiple times when parsing
8618 d. Fixed an off-by-one error in the tilde expansion library.
8620 e. When using the compound array assignment syntax, the old value of
8621 the array is cleared before assigning the new value.
8623 f. Fixed a bug that could cause a core dump when a trap handler was reset
8624 to the default in the trap command associated with that signal.
8626 g. Fixed a bug in the locale code that occurred when assigning a value
8629 h. A change was made to the parser so that words of the form xxx=(...)
8630 are not considered compound assignment statements unless there are
8631 characters before the `='.
8633 i. A fix was made to the command tracing code to correctly quote each
8636 j. Some changes were made to the bash-specific autoconf tests to make them
8639 k. Completion of words with globbing characters now correctly quotes the
8642 l. The directory /var/spool/mail is now preferred to /usr/spool/mail when
8643 configure is deciding on the default mail directory.
8645 m. The brace completion code was fixed to not quote the `{' and `}'.
8647 n. Some fixes were made to make $RANDOM more random in subshells.
8649 o. System-specific changes were made to configure for: SVR4.2
8651 p. Changes were made so that completion of words containing globbing chars
8652 substitutes the result only if a single filename was matched.
8654 q. The window size is now recomputed after a job is stopped with SIGTSTP if
8655 the user has set `checkwinsize' with `shopt'.
8657 r. When doing substring expansion, out-of-range substring specifiers now
8658 cause nothing to be substituted rather than an expansion error.
8660 s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' --
8661 only `EXIT' and `DEBUG' are accepted.
8663 t. The display of trapped signals now uses the signal number if signals
8664 for which bash does not know the name are trapped.
8666 u. A fix was made so that `bash -r' does not turn on restricted mode until
8667 after the startup files are executed.
8669 v. A bug was fixed that occasionally caused a core dump when a variable
8670 found in the temporary environment of export/declare/readonly had a
8673 w. A bug that occasionally caused unallocated memory to be passed to free()
8674 when doing arithmetic substitution was fixed.
8676 x. A bug that caused a buffer overrun when expanding a prompt string
8677 containing `\w' and ${#PWD} exceeded PATH_MAX was fixed.
8679 y. A problem with the completion code that occasionally caused it to
8680 refer to a character before the beginning of the readline line buffer
8683 z. A bug was fixed so that the `read' builtin restarts reads when
8684 interrupted by signals other than SIGINT.
8686 aa. Fixed a bug that caused a command to be freed twice when there was
8687 an evaluation error in the `eval' command.
8689 2. Changes to Readline
8691 a. Added a missing `extern' to a declaration in readline.h that kept
8692 readline from compiling cleanly on some systems.
8694 b. The history file is now opened with mode 0600 when it is written for
8697 c. Changes were made to the SIGWINCH handling code so that prompt redisplay
8700 d. ^G now interrupts incremental searches correctly.
8702 e. A bug that caused a core dump when the set of characters to be quoted
8703 when completing words was empty was fixed.
8705 ------------------------------------------------------------------------------
8706 This document details the changes between this version, bash-2.01-release,
8707 and the previous version, bash-2.01-beta2.
8711 a. The `distclean' target should remove the `printenv' executable if it
8714 b. The test suite was changed slightly to ensure that the error messages
8715 are printed in English.
8717 c. A bug that caused the shell to dump core when a filename containing a
8718 `/' was passed to `hash' was fixed.
8720 d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1
8723 e. A memory leak when completing commands was fixed.
8725 f. A memory leak that occurred when checking the hash table for commands
8726 with relative paths was fixed.
8728 ------------------------------------------------------------------------------
8729 This document details the changes between this version, bash-2.01-beta2,
8730 and the previous version, bash-2.01-beta1.
8734 a. The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if
8735 the current (soft) limit is less than or equal to the hard limit.
8737 b. Fixed a bug that caused the bash emulation of strcasecmp to produce
8740 c. A bug that caused memory to be freed twice when a trap handler resets
8741 the trap more than once was fixed.
8743 d. A bug that caused machines where sizeof (pointer) > sizeof (int) to
8744 fail (and possibly dump core) when trying to unwind-protect a null
8747 e. The startup files should not be run with job control enabled. This fix
8748 allows SIGINT to once again interrupt startup file execution.
8750 f. Bash should not change the SIGPROF handler if it is set to something
8753 g. The completion code that provides bash-specific completions for readline
8754 now quotes characters that the readline code would treat as word break
8755 characters if they appear in a file name.
8757 h. The completion code now correctly quotes filenames containing a `!',
8758 even if the user attempted to use double quotes when attempting
8761 i. A bug that caused the shell to dump core when `disown' was called without
8762 arguments and there was no current job was fixed.
8764 j. A construct like $((foo);bar) is now processed as a command substitution
8765 rather than as a bad arithmetic substitution.
8767 k. A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist'
8768 shell options when editing and re-executing a series of commands were
8771 l. A fix was made to the grammar -- the list of commands between `do' and
8772 `done' in the body of a `for' command should be treated the same as a
8775 2. Changes to Readline
8777 a. A couple of bugs that caused the history search functions to attempt to
8778 free a NULL pointer were fixed.
8780 b. If the C library provides setlocale(3), readline does not need to look
8781 at various environment variables to decide whether or not to go into
8782 eight-bit mode automatically -- just check whether the current locale
8783 is not `C' or `POSIX'.
8785 c. If the filename completion function finds that a directory was not closed
8786 by a previous (interrupted) completion, it closes the directory with
8789 3. New Features in Bash
8791 a. New bindable readline commands: history-and-alias-expand-line and
8792 alias-expand-line. The code was always in there, there was just no
8795 ------------------------------------------------------------------------------
8796 This document details the changes between this version, bash-2.01-beta1,
8797 and the previous version, bash-2.01-alpha1.
8801 a. Fixed a problem that could cause file descriptors used for process
8802 substitution to conflict with those used explicitly in redirections.
8804 b. Made it easier to regenerate configure if the user changes configure.in.
8806 c. ${GROUPS[0]} should always be the primary group, even on systems without
8809 d. Spelling correction is no longer enabled by default.
8811 e. Fixes to quoting problems in `bashbug'.
8813 f. OS-specific configuration changes were made for: Irix 6.
8815 g. OS-specific code changes were made for: QNX.
8817 h. A more meaningful message is now printed when the file in /tmp for a
8818 here document cannot be created.
8820 i. Many changes to the shell's variable initialization code to speed
8821 non-interactive startup.
8823 j. Changes to the non-job-control code so that it does not try to open
8826 k. The output of `set' and `export' is once again sorted, as POSIX wants.
8828 l. Fixed a problem caused by a recursive call reparsing the value of
8831 m. The tilde code no longer calls getenv() when it's compiled as part of
8832 the shell, which should eliminate problems on systems that cannot
8833 redefine getenv(), like the NeXT OS.
8835 n. Fixed a problem that caused `bash -o' or `bash +o' to not list all
8838 o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit
8839 only if the hard limit is greater than the current (soft) limit.
8841 p. Fixed a problem that arose when building bash in a different directory
8842 than the source and y.tab.[ch] were remade with something other than
8843 bison. This came up most often on NetBSD.
8845 q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated
8846 an unfinished command completion (`/), which generated errors.
8848 r. The bash special tilde expansions (~-, ~+) are now attempted before
8849 calling the standard tilde expansion code, which should eliminate the
8850 problems people have been seeing with this on Solaris 2.5.1.
8852 s. Added support for <stdarg.h> to places where it was missing.
8854 t. Changed the code that reads the output of a command substitution to not
8855 go through stdio. This reduces the memory requirements and is faster.
8857 u. A number of changes to speed up export environment creation were made.
8859 v. A number of memory leaks were fixed as the result of running the test
8860 scripts through Purify.
8862 w. Fixed a bug that caused subshells forked to interpret executable
8863 scripts without a leading `#!' to not reinitialize the values of
8866 2. Changes to Readline
8868 a. History library has less `#ifdef SHELL' code -- abstracted stuff out
8869 into application-specific function hooks.
8871 b. Readline no longer calls getenv() if it's compiled as part of the shell,
8872 which should eliminate problems on systems that cannot redefine getenv(),
8875 c. Fixed translation of ESC when `untranslating' macro values.
8877 d. The region kill operation now fixes the mark if it ends up beyond the
8878 boundaries of the line after the region is deleted.
8880 3. New Features in Bash
8882 a. New argument for `configure': `--with-curses'. This can be used to
8883 override the selection of the termcap library on systems where it is
8886 ------------------------------------------------------------------------------
8887 This document details the changes between this version, bash-2.01-alpha1,
8888 and the previous version, bash-2.0-release.
8892 a. System-specific configuration changes for: FreeBSD, SunOS4, Irix,
8893 MachTen, QNX 4.2, Harris Night Hawk, SunOS5.
8895 b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2,
8898 c. A bug that caused the exec builtin to fail because the full pathname of
8899 the command could not be found was fixed.
8901 d. The code that performs output redirections is now more resistant to
8902 race conditions and possible security exploits.
8904 e. A bug that caused the shell to dump core when performing pattern
8905 substitutions on variable values was fixed.
8907 f. More hosts are now recognized by the auto-configuration mechanism
8908 (OpenBSD, QNX, others).
8910 g. Assignments to read-only variables that attempt to convert them to
8911 arrays are now errors.
8913 h. A bug that caused shell scripts using array assignments in POSIX mode
8914 to exit after the assignment was performed was fixed.
8916 i. The substring expansion code is now more careful about running off the
8917 ends of the expanded variable value.
8919 j. A bug that caused completion to fail if a backquoted command substitution
8920 appeared anywhere on the line was fixed.
8922 k. The `source' builtin no longer turns off history if it has been enabled
8923 in a non-interactive shell.
8925 l. A bug that caused the shell to crash when `disown' was given a pid
8926 instead of a job number was fixed.
8928 m. The `cd' spelling correction code will not try to change to `.' if no
8929 directory entries match a single-character argument.
8931 n. A bad variable name supplied to `declare', `export', or `readonly' no
8932 longer causes a non-interactive shell in POSIX mode to exit.
8934 o. Some fixes were made to the test suite to handle peculiarities of
8935 various Unix versions.
8937 p. The bash completion code now quotes characters that readline would
8938 treat as word breaks for completion but are not shell metacharacters.
8940 q. Bad options supplied at invocation now cause a usage message to be
8943 r. Fixes were made to the code that handles DEBUG traps so that the trap
8944 string is not freed inappropriately.
8946 s. Some changes were made to the bash debugger in examples/bashdb -- it
8947 should be closer to working now.
8949 t. A problem that caused the default filename used for mail checking to be
8952 u. A fix was made to the `echo' builtin so that NUL characters printed with
8953 `echo -e' do not cause the output to be truncated.
8955 v. A fix was made to the job control code so that the shell behaves better
8956 when monitor mode is enabled in a non-interactive shell.
8958 w. Bash no longer catches all of the terminating signals in a non-
8959 interactive shell until a trap is set on EXIT, which should result in
8962 x. A fix was made to the command timing code so that `time' can be used in
8965 y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as
8966 a nested subshell rather than strictly as an (erroneous) arithmetic
8969 z. A fix was made to the globbing code so that it correctly matches quoted
8970 filenames beginning with a `.'.
8972 aa. A bug in `fc' that caused some multi-line commands to not be stored as
8973 one command in the history when they were re-executed after editing
8974 (with `fc -e') was fixed.
8976 bb. The `ulimit' builtin now attempts to catch some classes of integer
8979 cc. The command-oriented-history code no longer attempts to add `;'
8980 inappropriately when a newline appears while reading a $(...) command
8983 dd. A bug that caused the shell to dump core when `help --' was executed
8986 ee. A bug that caused the shell to crash when an unset variable appeared
8987 in the body of a here document after `set -u' had been executed was
8990 ff. Implicit input redirections from /dev/null for asynchronous commands
8991 are now handled better.
8993 gg. A bug that caused the shell to fail to compile when configured with
8994 `--disable-readline' was fixed.
8996 hh. The globbing code should now be interruptible.
8998 ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a
8999 stopped job and adjusts the data structures accordingly, as if `bg' had
9000 been executed instead.
9002 jj. A bug that caused the shell to crash when mixing calls to `getopts'
9003 and `shift' on the same set of positional parameters was fixed.
9005 kk. The command printing code now preserves the `-p' flag to `time'.
9007 ll. The command printing code now handles here documents better when there
9008 are other redirections associated with the command.
9010 mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_)
9011 is no longer placed into the environment of executed commands -- users
9012 of glibc had too many problems with it.
9014 nn. Reorganized the code that generates signames.h. The signal_names list
9015 is now more complete but may be slightly different (SIGABRT is favored
9016 over SIGIOT, for example). The preferred signal names are those
9017 listed in the POSIX.2 standard.
9019 oo. `bashbug' now uses a filename shorter than 14 characters for its
9020 temporary file, and asks for confirmation before sending the bug
9023 pp. A bug that caused TAB completion in vi editing mode to not be turned
9024 off when `set -o posix' was executed or back on when `set +o posix'
9025 was executed was fixed.
9027 qq. A bug in the brace expansion code that caused brace expansions appearing
9028 in new-style $(...) command substitutions to be inappropriately expanded
9031 rr. A bug in the readline hook shell-expand-line that could cause memory to
9032 be inappropriately freed was fixed.
9034 ss. A bug that caused some arithmetic expressions containing `&&' and `||'
9035 to be parsed with the wrong precedence has been fixed.
9037 tt. References to unbound variables after `set -u' has been executed now
9038 cause the shell to exit immediately, as they should.
9040 uu. A bug that caused the shell to exit inappropriately when `set -e' had
9041 been executed and a command's return status was being inverted with the
9042 `!' reserved word was fixed.
9044 vv. A bug that could occasionally cause the shell to crash with a
9045 divide-by-zero error when timing a command was fixed.
9047 ww. A bug that caused parameter pattern substitution to leave stray
9048 backslashes in the replacement string when the expression is in
9049 double quotes was fixed.
9051 xx. The `break' and `continue' builtins now break out of all loops when an
9052 invalid count argument is supplied.
9054 yy. Fixed a bug that caused PATH to be set to the empty string if
9055 `command -p' is executed with PATH unset.
9057 zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix,
9060 aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS
9061 if there were no shell options set.
9063 bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX
9064 mode, their output is as POSIX.2 specifies.
9066 ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually
9067 creates an array variable.
9069 ddd. Fixed a bug that prevented `time' from correctly timing background
9072 2. Changes to Readline
9074 a. A bug that caused an extra newline to be printed when the cursor was on
9075 an otherwise empty line was fixed.
9077 b. An instance of memory being used after it was freed was corrected.
9079 c. The redisplay code now works when the prompt is longer than the screen
9082 d. `dump-macros' is now a bindable name, as it should have been all along.
9084 e. Non-printable characters are now expanded when displaying macros and
9087 f. The `dump-variables' and `dump-macros' commands now output a leading
9088 newline if they're called as the result of a key sequence, rather
9089 than directly by an application.
9091 3. New Features in Bash
9093 a. There is a new builtin array variable: GROUPS, the set of groups to which
9094 the user belongs. This is used by the test suite.
9096 4. New Features in Readline
9098 a. If a key sequence bound to `universal-argument' is read while reading a
9099 numeric argument started with `universal-argument', it terminates the
9100 argument but is otherwise ignored. This provides a way to insert multiple
9101 instances of a digit string, and is how GNU emacs does it.
9103 ------------------------------------------------------------------------------
9104 This document details the changes between this version, bash-2.0-release,
9105 and the previous version, bash-2.0-beta3.
9109 a. Fix to the `getopts' builtin so that it does the right thing when a
9110 required option argument is not present.
9112 b. The completion code now updates the common prefix of matched names
9113 after FIGNORE processing is done, since any names that were removed
9114 may have changed the common prefix.
9116 c. Fixed a bug that made messages in MAILPATH entries not work correctly.
9118 d. Fixed a serious documentation error in the description of the new
9119 ${parameter:offset[:length]} expansion.
9121 e. Fixes to make parameter substring expansion ({$param:offset[:length]})
9122 work when within double quotes.
9124 f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional
9127 g. Corrected a misspelling of `unlimited' in the output of `ulimit'.
9129 h. Fixed a bug that caused executable scripts without a leading `#!' to
9130 occasionally pick up the wrong set of positional parameters.
9132 i. Linux systems now have a working `ulimit -v', using RLIMIT_AS.
9134 j. Updated config.guess so that many more machine types are recognized.
9136 k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]}
9139 l. If the shell is named `-su', and `-c command' is supplied, read and
9140 execute the login shell startup files even though the shell is not
9141 interactive. This is to support the `-' option to `su'.
9143 m. Fixed a bug that caused core dumps when the DEBUG trap was ignored
9144 with `trap "" DEBUG' and a shell function was subsequently executed.
9146 n. Fixed a bug that caused core dumps in the read builtin when IFS was
9147 set to the null string and the input had leading whitespace.
9149 2. Changes to Readline
9151 a. Fixed a bug that caused a numeric argument of 1024 to be ignored when
9154 b. Fixed the display code so that the numeric argument is displayed as it's
9157 c. Fixed the numeric argument reading code so that `M-- command' is
9158 equivalent to `M--1 command', as the prompt implies.
9160 3. New Features in Bash
9162 a. `ulimit' now sets both hard and soft limits and reports the soft limit
9163 by default (when neither -H nor -S is specified). This is compatible
9164 with versions of sh and ksh that implement `ulimit'.
9166 b. Integer constants have been extended to base 64.
9168 4. New Features in Readline
9170 a. The `home' and `end' keys are now bound to beginning-of-line and
9171 end-of-line, respectively, if the corresponding termcap capabilities
9174 ------------------------------------------------------------------------------
9175 This document details the changes between this version, bash-2.0-beta3,
9176 and the previous version, bash-2.0-beta2.
9180 a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX.
9182 b. When in POSIX mode, variable assignments preceding a special builtin
9183 persist in the shell environment after the builtin completes.
9185 c. Changed all calls to getwd() to getcwd(). Improved check for systems
9186 where the libc getcwd() calls popen(), since that breaks on some
9187 systems when job control is being used.
9189 d. Fixed a bug that caused seg faults when executing scripts with the
9190 execute bit set but without a leading `#!'.
9192 e. The environment passed to executed commands is never sorted.
9194 f. A bug was fixed in the code that expands ${name[@]} to the number of
9195 elements in an array variable.
9197 g. A bug was fixed in the array compound assignment code ( A=( ... ) ).
9199 h. Window size changes now correctly propagate down to readline if
9200 the shopt `checkwinsize' option is enabled.
9202 i. A fix was made in the code that expands to the length of a variable
9205 j. A fix was made to the command builtin so that it did not turn on the
9206 `no fork' flag inappropriately.
9208 k. A fix was made to make `set -n' work more reliably.
9210 l. A fix was made to the job control initialization code so that the
9211 terminal process group is set to the shell's process group if the
9212 shell changes its own process group.
9214 2. Changes to Readline
9216 a. System-specific changes for: SCO 3.2v[45].
9218 b. The behavior of the vi-mode `.' when redoing an `i' command was changed
9219 to insert the text previously inserted by the `i' command rather than
9220 simply entering insert mode.
9222 3. New features in Bash
9224 a. There is a new version of the autoload function package, in
9225 examples/functions/autoload.v2, that uses arrays and provides more
9228 b. Support for LC_COLLATE and locale-specific sorting of the results of
9229 pathname expansion if strcoll() is available.
9231 4. New Features in Readline
9233 a. Support for locale-specific sorting of completion possibilities if
9234 strcoll() is available.
9236 ------------------------------------------------------------------------------
9237 This document details the changes between this version, bash-2.0-beta2,
9238 and the previous version, bash-2.0-beta1.
9242 a. `pushd -' is once again equivalent to `pushd $OLDPWD'.
9244 b. OS-specific changes for: SCO 3.2v[45].
9246 c. A change was made to the fix for the recently-reported security hole
9247 when reading characters with octal value 255 to make it work better on
9248 systems with restartable system calls when not using readline.
9250 d. Some changes were made to the test suite so that it works if you
9251 configure bash with --enable-usg-echo-default.
9253 e. A fix was made to the parsing of conditional arithmetic expressions.
9255 f. Illegal arithmetic bases now cause an arithmetic evaluation error rather
9256 than being silently reset.
9258 g. Multiple arithmetic bases now cause an arithmetic evaluation error
9259 instead of being ignored.
9261 h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2.
9263 i. A bug that sometimes caused array indices to be evaluated twice (which
9264 would cause errors when they contained assignment statements) was fixed.
9266 j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning
9267 unsigned values and to simplify the code.
9269 k. A bug in the command-oriented-history code that caused it to sometimes
9270 put semicolons after right parens inappropriately was fixed.
9272 l. The values inserted into the prompt by the \w and \W escape sequences
9273 are now quoted to prevent further expansion.
9275 m. An interactive shell invoked as `sh' now reads and executes commands
9276 from the file named by $ENV when it starts up. If it's a login shell,
9277 it does this after reading /etc/profile and ~/.profile.
9279 n. The file named by $ENV is never read by non-interactive shells.
9281 2. Changes to Readline
9283 a. A few changes were made to hide some macros and functions that should not
9286 b. An off-by-one error that caused seg faults in the history expansion code
9289 3. New Features in Bash
9291 a. The ksh-style ((...)) arithmetic command was implemented. It is exactly
9292 identical to let "...". This is controlled by a new option to configure,
9293 `--enable-dparen-arithmetic', which is on by default.
9295 b. There is a new #define available in config.h.top: SYS_BASH_LOGOUT. If
9296 defined to a filename, bash reads and executes commands from that file
9297 when a login shell exits. It's commented out by default.
9299 c. `ulimit' has a `-l' option that reports the maximum amount of data that
9300 may be locked into memory on 4.4BSD-based systems.
9302 ------------------------------------------------------------------------------
9303 This document details the changes between this version, bash-2.0-beta1,
9304 and the previous version, bash-2.0-alpha4.
9308 a. A bug that sometimes caused traps to be ignored on signals the
9309 shell treats specially was fixed.
9311 b. The internationalization code was changed to track the values of
9312 LC_* variables and call setlocale() as appropriate. The TEXTDOMAIN
9313 and TEXTDOMAINDIR variables are also tracked; changes cause calls
9314 to textdomain() and bindtextdomain(), if available.
9316 c. A bug was fixed that sometimes caused double-quoted strings to be
9319 d. Changes were made so that the siglist code compiles correctly on
9322 e. Added `:' to the set of characters that cause word breaks for the
9323 completion code so that pathnames in assignments to $PATH can be
9326 f. The `select' command was fixed to print $PS3 to stderr.
9328 g. Fixed an error in the manual page section describing the effect that
9329 setting and unsetting GLOBIGNORE has on the setting of the `dotglob'
9332 h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC
9333 on systems without gettimeofday() and resources.
9335 i. The getopt static variables are now initialized each time a subshell
9336 is started, so subshells using `getopts' work right.
9338 j. A sign-extension bug that caused a possible security hole was fixed.
9340 k. The parser now reads characters between backquotes within a double-
9341 quoted string as a single word, so double quotes in the backquoted
9342 string don't terminate the enclosing double-quoted string.
9344 l. A bug that caused `^O' to work incorrectly when typed as the first
9345 thing to an interactive shell was fixed.
9347 m. A rarely-exercised off-by-one error in the code that quotes variable
9350 n. Some memory and file descriptor leaks encountered when running a
9351 shell script that is executable but does not have a leading `#!'
9354 2. Changes to Readline
9356 a. A bug that sometimes caused incorrect results when trying to read
9357 typeahead on systems without FIONREAD was fixed.
9359 3. New Features in Bash
9361 a. The command timing code now uses the value of the TIMEFORMAT variable
9362 to format and display timing statistics.
9364 b. The `time' reserved word now accepts a `-p' option to force the
9365 POSIX.2 output format.
9367 c. There are a couple of new and updated scripts to convert csh startup
9368 files to bash format.
9370 d. There is a new builtin array variable: BASH_VERSINFO. The various
9371 members hold the parts of the version information in BASH_VERSION,
9372 plus the value of MACHTYPE.
9374 4. New Features in Readline
9376 a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter
9379 ------------------------------------------------------------------------------
9380 This document details the changes between this version, bash-2.0-alpha4,
9381 and the previous version, bash-2.0-alpha3.
9385 a. There is better detection of rsh connections on Solaris 2.
9387 b. Assignments to read-only variables preceding a command name are now
9388 variable assignment errors. Variable assignment errors cause
9389 non-interactive shells running in posix mode to exit.
9391 c. The word tokenizer was rewritten to handle nested quotes and pairs
9392 ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...))
9393 correctly. Some of the parameter expansion code was updated as a
9396 d. A fix was made to `test' when given three arguments so that a binary
9397 operator is checked for first, before checking that the first argument
9400 e. 2''>/dev/null is no longer equivalent to 2>/dev/null.
9402 f. Parser error messages were regularized, and in most cases the name of
9403 the shell script being read by a non-interactive shell is not printed
9406 g. A fix was made to the completion code so that it no longer removes the
9407 text the user typed in some cases.
9409 h. The special glibc `getopt' environment variable is no longer put into
9410 the environment on machines with small values of ARG_MAX.
9412 i. The expansion of ${...} now follows the POSIX.2 rules for finding the
9415 j. The shell no longer displays spurious status messages for background
9416 jobs in shell scripts that complete successfully when the script is
9417 run from a terminal.
9419 k. `shopt -o' now correctly updates $SHELLOPTS.
9421 l. A bug that caused the $PATH searching code to return a non-executable
9422 file even when an executable file with the same name appeared later in
9425 m. The shell now does tilde expansions on unquoted `:~' in assignment
9426 statements when not in posix mode.
9428 n. Variable assignment errors when a command consists only of assignments
9429 now cause non-interactive shells to exit when in posix mode.
9431 o. If the variable in a `for' or `select' command is read-only, or not a
9432 legal shell identifier, a variable assignment error occurs.
9434 p. `test' now handles `-a' and `-o' as binary operators when three arguments
9435 are supplied, and correctly parses `( word )' as equivalent to `word'.
9437 q. `test' was fixed so that file names of the form /dev/fd/NN mean the same
9438 thing on all systems, even Linux.
9440 r. Fixed a bug in the globbing code that caused patterns with multiple
9441 consecutive `*'s to not be matched correctly.
9443 s. Fixed a bug that caused $PS2 to not be printed when an interactive shell
9444 not using readline is reading a here document.
9446 t. Fixed a bug that caused history expansion to be performed inappropriately
9447 when a single-quoted string spanned more than one line.
9449 u. `getopts' now checks that the variable name passed by the user as the
9450 second argument is a legal shell identifier and that the variable is
9453 v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it
9454 encounters an error.
9456 w. Fixed `set' to display variable values in a form that can be re-read.
9458 x. Fixed a bug in the code that keeps track of whether or not local variables
9459 have been declared at the current level of function nesting.
9461 y. Non-interactive shells in posix mode now exit if the name in a function
9462 declaration is not a legal identifier.
9464 z. The job control code now ignores stopped children when the shell is not
9467 aa. The `cd' builtin no longer attempts spelling correction on the directory
9468 name if the shell is not interactive, regardless of the setting of the
9471 bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2.
9473 cc. `time' now prints its output to stderr, as POSIX.2 specifies.
9475 2. Fixes to Readline
9477 a. After printing possible completions, all lines of a multi-line prompt
9480 b. Some changes were made to the terminal handling code in rltty.c to
9481 work around AIX 4.2 bugs.
9483 3. New Features in Bash
9485 a. There is a new loadable builtin: sprintf, with calling syntax
9486 sprintf var format [args]
9487 This provides an easy way to simulate ksh left- and right-justified
9490 b. The expansions of \h and \H in prompt strings were swapped. \h now
9491 expands to the hostname up to the first `.', as in bash-1.14.
9493 4. New Features in Readline
9495 a. The bash-1.14 behavior when ^M is typed while doing an incremental
9496 search was restored. ^J may now be used to terminate the search without
9499 b. There is a new bindable variable: disable-completion. This inhibits
9500 word completion and causes the completion character to be inserted as
9501 if it had been bound to self-insert.
9503 ------------------------------------------------------------------------------
9504 This document details the changes between this version, bash-2.0-alpha3,
9505 and the previous version, bash-2.0-alpha2.
9507 There is now a file `COMPAT' included in the distribution that lists the
9508 user-visible incompatibilities between 1.14 and 2.0.
9512 a. Some work was done so that word splitting of the rhs of assignment
9513 statements conforms more closely to historical practice.
9515 b. A couple of errant memory frees were fixed.
9517 c. A fix was made to the test builtin so it recognizes `<' and `>' as
9520 d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's
9521 allocated and freed. This is to catch callers that refer to freed
9522 memory or assume something about newly-allocated memory.
9524 e. Fixed a problem with conversion to 12-hour time in the prompt
9527 f. Fixed a problem with configure's argument parsing order. Now you can
9528 correctly turn on specific options after using --enable-minimal-config.
9530 g. The configure script now automatically disables the use of GNU malloc
9531 on systems where it's appropriate (better than having people read the
9532 NOTES file and do it manually).
9534 h. There are new prompt expansions (\v and \V) to insert version information
9535 into the prompt strings.
9537 i. The default prompt string now includes the version number.
9539 j. Most of the builtins that take no options were changed to use the
9540 internal getopt so they can produce proper error messages for -?
9541 and incorrect options.
9543 k. Some system-specific changes were made for SVR4.2 and Solaris 2.5.
9545 l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of
9548 m. A couple of problems caused by uninitialized variables were fixed.
9550 n. There are a number of new loadable builtin examples: logname, basename,
9551 dirname, tty, pathchk, tee, head, and rmdir. All of these conform to
9554 o. Bash now notices changes in TZ and calls tzset() if present, so
9555 changing TZ will alter the time printed by prompt expansions.
9557 p. The source was reorganized a bit so I don't have to wait so long for
9558 some files to compile, and to facilitate the creation of a `shell
9559 library' at some future point.
9561 q. Bash no longer turns off job control if called as `sh', since the
9562 POSIX.2 spec includes job control as a standard feature.
9564 r. `bash -o posix' now works as intended.
9566 s. Fixed a problem with the completion code: when completing a filename
9567 that contained globbing characters, if show-all-if-ambiguous was set,
9568 the completion code would remove the user's text.
9570 t. Fixed ulimit so that (hopefully) the full range of limits is available
9573 u. A new `shopt' option (`hostcomplete') enables and disables hostname
9576 v. The shell no longer attempts to save the history on an abort(),
9577 which is usually called by programming_error().
9579 w. The `-s' option to `fc' was changed to echo the command to be executed
9580 to stderr instead of stdout.
9582 x. If the editor invoked by `fc -e' exits with a non-zero status, no
9583 commands are executed.
9585 y. Fixed a bug that made the shopt `histverify' option work incorrectly.
9587 z. There is a new variable `MACHTYPE' whose value is the GNU-style
9588 `cpu-company-system' system description as set by configure. (The
9589 values of MACHTYPE and HOSTTYPE should really be swapped.)
9591 aa. The `ulimit' builtin now allows the maximum virtual memory size to be
9592 set via setrlimit(2) if RLIMIT_VMEM is defined.
9594 bb. `bash -nc 'command'' no longer runs `command'.
9596 2. Changes to Readline
9598 a. Fixed a typo in the code that checked for FIONREAD in input.c.
9600 b. Fixed a bug in the code that outputs keybindings, so things like C-\
9601 are quoted properly.
9603 c. Fixed a bug in the inputrc file parsing code to handle the problems
9604 caused by inputrc files created from the output of `bind -p' in
9605 previous versions of bash. The problem was due to the bug fixed
9608 d. Readline no longer turns off the terminal's meta key, and turns it on
9609 once the first time it's called.
9611 ------------------------------------------------------------------------------
9612 This file documents the changes between this version, bash-2.0-alpha2,
9613 and the previous version, bash-2.0-alpha.
9617 a. The shell no longer thinks directories are executable.
9619 b. `disown' has a new option, `h', which inhibits the resending of SIGHUP
9620 but does not remove the job from the jobs table.
9622 c. The varargs functions in error.c now use ANSI-C `stdarg' if available.
9624 d. The build process now treats the `build version' in .build as local to
9625 the build directory, so different versions built from the same source
9626 tree have different `build versions'.
9628 e. Some problems with the grammar have been fixed. (It used `list' in a few
9629 productions where `compound_list' was needed. A `list' must be terminated
9630 with a newline or semicolon; a `compound_list' need not be.)
9632 f. A fix was made to keep `wait' from hanging when waiting for all background
9635 g. `bash --help' now writes its output to stdout, like the GNU Coding Standards
9636 specify, and includes the machine type (the value of MACHTYPE).
9638 h. `bash --version' now prints more information and exits successfully, like
9639 the GNU Coding Standards specify.
9641 i. The output of `time' and `times' now prints fractional seconds with three
9642 places after the decimal point.
9644 j. A bug that caused process substitutions to screw up the pipeline printed
9645 by `jobs' was fixed.
9647 k. Fixes were made to the code that implements $'...' and $"..." so they
9650 l. The process substitution code now opens named pipes for reading with
9651 O_NONBLOCK to avoid hanging.
9653 m. Fixes were made to the trap code so the shell cleans up correctly if the
9654 trap command contains a `return' and we're executing a function or
9655 sourcing a script with `.'.
9657 n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the
9658 documentation (ps, dvi, etc.) on a `make install'.
9660 o. Fixed an auto-increment error that caused bash -c args to sometimes dump
9663 p. Fixed a bug that caused $HISTIGNORE to fail when the history line
9664 contained globbing characters.
9666 2. Changes to Readline
9668 a. There is a new string variable, rl_library_version, available for use by
9669 applications. The current value is "2.1".
9671 b. A bug encountered when expand-tilde was enabled and file completion was
9672 attempted on a word beginning with `~/' was fixed.
9674 c. A slight change was made to the incremental search termination behavior.
9675 ESC still terminates the search, but if input is pending or arrives
9676 within 0.1 seconds (on systems with select(2)), it is used as a prefix
9677 character. This is intented to allow users to terminate searches with
9678 the arrow keys and get the behavior they expect.