1 This document details the changes between this version, bash-3.0-alpha,
2 and the previous version, bash-2.05b-release.
6 a. Fixes to build correctly when arrays are not compiled into the shell.
8 b. Fixed command substitution to run any exit trap defined in the command
9 substitution before returning; the exit trap is not inherited from the
12 c. Fixes to process group synchronization code so that every child process
13 attempts to set the terminal's process group; fixes some synchronization
14 problems on Linux kernels that schedule the child to always run before
17 d. Fixed processing of octal and hex constants in printf builtin for POSIX.2
20 e. Fixed a couple of core dumps in the pattern removal code.
22 f. Fixes to the array subrange extraction code to deal better with sparse
25 g. Parser errors and other errors that result in the shell exiting now cause
26 the exit trap to be run.
28 h. Change the command substitution completion functions to not append any
29 closing quote, because it would be inserted a closing "`" or ")".
31 i. Fix history initialization so assignments to $histchars made in startup
34 j. If an exit trap does not contain a call to `exit', the shell now uses
35 the exit status of the last command executed before the trap as the exit
38 k. The parser now prompts with $PS2 if it reads a newline while parsing a
39 compound array assignment statement.
41 l. When performing a compound array assignment, the parser doesn't treat
42 words of the form [index]=value as assignments if they're the result of
45 m. Fixed a bug that caused `return' executed in a trap command to make the
46 shell think it was still running the trap.
48 n. Fixed the value of errno set by the pathname canonicalization functions.
50 o. Changed the grammar so that `time' alone on a line times a null command
51 rather than being a syntax error.
53 p. The pattern substitution coded no longer performs quote removal on the
54 pattern before trying to match it, as the pattern removal functions do.
56 q. Fixed a bug that could cause core dumps when checking whether a quoted
57 command name was being completed.
59 r. Fixes to the pattern removal and pattern replacement expansions to deal
60 with multibyte characters better.
62 s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly
63 multibyte) characters instead of raw bytes.
65 2. Changes to Readline
67 a. Change to history expansion functions to treat `^' as equivalent to word
68 one, as the documention states.
70 b. Some changes to the display code to improve display and redisplay of
73 c. Changes to speed up the multibyte character redisplay code.
75 d. Fixed a bug in the vi-mode `E' command that caused it to skip over the
76 last character of a word if invoked while point was on the word's
77 next-to-last character.
79 e. Fixed a bug that could cause incorrect filename quoting when
80 case-insensitive completion was enabled and the word being completed
81 contained backslashes quoting word break characters.
83 f. Fixed a bug in redisplay triggered when the prompt string contains
86 g. Fixed some display (and other) bugs encountered in multibyte locales
87 when a non-ascii character was the last character on a line.
89 h. Fixed some display bugs caused by multibyte characters in prompt strings.
91 3. New Features in Bash
93 a. printf builtin understands two new escape sequences: \" and \?.
95 b. `echo -e' understands two new escape sequences: \" and \?.
97 c. The GNU `gettext' package and libintl have been integrated; the shell's
98 messages can be translated into different languages.
100 4. New Features in Readline
102 a. New application variable, rl_completion_quote_character, set to any
103 quote character readline finds before it calls the application completion
106 b. New application variable, rl_completion_suppress_quote, settable by an
107 application completion function. If set to non-zero, readline does not
108 attempt to append a closing quote to a completed word.
110 c. New application variable, rl_completion_found_quote, set to a non-zero
111 value if readline determines that the word to be completed is quoted.
112 Set before readline calls any application completion function.
114 ------------------------------------------------------------------------------
115 This document details the changes between this version, bash-3.0-alpha,
116 and the previous version, bash-2.05b-release.
120 a. Fixes so that the shell will compile without some of the default options
123 b. Fixed an error message that did not pass enough arguments to printf.
125 c. Fixed a bug that caused input redirection to a builtin inside a script
126 being read from standard input to result in the rest of the already-
127 read and buffered script to be discarded.
129 d. Fixed a bug that caused subshell initialization to close the file
130 descriptor from which the shell was reading a script under certain
133 e. Fixed a bug that caused the shell to not advance a string pointer over
134 a null wide character when doing string operations.
136 f. Fixed the internal logout code so that shells that time out waiting for
137 input (using $TMOUT) run ~/.bash_logout.
139 g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD.
141 h. The parser no longer adds implicit double quotes to ((...)) arithmetic
144 i. The ((...)) arithmetic command evaluation code was fixed to not dump core
145 when the expanded string is null.
147 j. The ((...)) arithmetic command evaluation code was fixed to not perform
148 variable assignments while expanding the expression.
150 k. Fixed a bug that caused word splitting to be performed incorrectly when
151 IFS is set, but null.
153 l. Fixed a bug in brace expansion that caused a quoted `$' preceding an
154 open brace to inhibit brace expansion.
156 m. Fixed a bug that caused a leading `-' in the shell's name to cause it to
157 not be recognized as a restricted shell.
159 n. Fixed a bug in the arithmetic evaluation code that could cause longjmps
160 to an invalid location and result in a core dump.
162 o. Fixed a bug in the calculation of how many history lines are new in a
163 single shell session when reading new history lines from a file with
166 p. Fixed a bug in pathname canonicalization that caused the shell to dump
167 core when presented with a pathname longer than PATH_MAX.
169 q. Fixed the parser so that it doesn't try to compare a char variable to
170 EOF, which fails when chars are unsigned.
172 r. Fixed a bug in the simple command execution code that caused occasional
175 s. The shell does a better job of saving any partial parsing state during
176 operations which cause a command to be executed while a line is being
179 t. The completion code now splits words more like the expansion code when
180 $IFS is used to split.
182 u. The locale code does a better job of recomputing the various locale
183 variable values when LC_ALL is unset.
185 v. The programmable completion code does a better job of dequoting expanded
186 word lists before comparing them against the word to be matched.
188 w. The shell no longer seg faults if the expanded value of $PS4 is null
189 and `set -x' is enabled.
191 x. Fixed a bug that caused core dumps when a here string expanded to NULL.
193 y. The mail checking code now makes sure the mailbox is bigger before
194 reporting the existence of new mail.
196 z. The parser does not try to expand $'...' and $"..." when the appear
197 within double quotes unless the `extquote' option has been enabled with
198 `shopt'. For backwards compatibility, it is enabled by default.
200 aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use
201 $@ instead of "$@" for the implicit list of arguments.
203 bb. Fixed a bug that caused a subshell of a restricted shell (e.g., one
204 spawned to execute a pipeline) to not exit immediately if attempting
205 to use a command containing a slash.
207 cc. Fixed a problem with empty replacements for a pattern that doesn't match
208 when performing ${param/word/} expansion.
210 dd. Word expansions performed while expanding redirections no longer search
211 a command's temporary environment to expand variable values.
213 ee. Improvements to the alias expansion code when expanding subsequent words
214 because an aliase's value ends with a space.
216 ff. `cd -' now prints the current working directory after a successful chdir
217 even when the shell is not interactive, as the standard requires.
219 gg. The shell does a better job of ensuring a child process dies of SIGINT
220 before resending SIGINT to itself.
222 hh. The arithmetic expansion variable assignment code now does the right
223 thing when assigning to `special' variables like OPTIND.
225 ii. When history expansion verification is enabled, the bash readline helper
226 functions that do history expansion on the current line don't print
229 jj. Fixed bugs with multiple consecutive alias expansion when one of the
230 expansions ends with a space.
232 kk. Fixed a problem in the programmable completion code that could cause core
233 dumps when trying to initialize a set of possible completions from a
236 ll. The \[ and \] escape characters are now ignored when decoding the prompt
237 string if the shell is started with editing disabled.
239 mm. Fixed a bug that could leave extra characters in a string when doing
240 quoted null character removal.
242 nn. Command substitution and other subshell operations no longer reset the
243 line number (aids the bash debugger).
245 oo. Better line number management when executing simple commands, conditional
246 commands, for commands, and select commands.
248 pp. The globbing code now uses malloc, with its better failure properties,
249 rather than alloca().
251 qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the
252 appropriate array element instead of a variable named `a[2]'.
254 rr. Fixed a bug in the handling of a `?(...)' pattern immediately following
255 a `*' when extglob is enabled.
257 ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is
258 invoked in a function to misbehave.
260 tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped
261 by the internal shell string quoting functions.
263 uu. Fixed a bug that caused quoted null characters in an expanded word list
264 to be inappropriately assigned to an array variable when using `read -a'.
266 vv. Fixed a bug that caused redirections accompanying a null command to persist
267 in the current shell.
269 ww. Fixed a bug that caused the prompt to be printed when the shell was
270 expanding a multiline alias.
272 xx. Fixed a bug that resulted in core dumps when the completion for a command
273 changed the compspec.
275 yy. Fixed a bug that caused evaluation of programmable completions to print
276 notifications of completed jobs.
278 zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb'
279 (which is what emacs shell windows do).
281 aaa. In posix mode, `kill -l' causes signal names to be displayed without
284 bbb. Clear error flag on standard output so it doesn't persist across multiple
287 ccc. In posix mode, `alias' displays alias values without the leading `alias',
288 so the output cannot be used as subsequent input.
290 ddd. In posix mode, the `trap' builtin doesn't check whether or not its
291 first argument is a signal specification and revert the signal handling
292 to its original disposition if it is.
294 eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the
295 pattern substitution and removal expansions.
297 fff. Fixed several problems with the handling of ${array[@]}, ${array[*]},
298 $@, and $* by the indirect variable expansion code.
300 ggg. Fixed a bug that did not allow `time' to be aliased.
302 hhh. Improved the mail checking code so it won't check (and possibly cause an
303 NFS file system mount) until MAILPATH or MAIL is given a value -- there
304 is no default if DEFAULT_MAIL_DIRECTORY is not defined at compile time.
305 (It is computed by configure, but can be #undef'd in config-bot.h.)
307 iii. If the `chkwinsize' option is enabled, the shell checks for window size
308 changes if a child process exits due to a signal.
310 jjj. Removed the attempts to avoid adding a slash at the end of a completed
311 executable name if there was a directory with the same name in the
314 kkk. Fixed PATH lookup code so it treats the permission bits separately for
315 owner, group, and other, rather than checking them all.
317 lll. Fixed the locale code to reset the parser's idea of the character class
318 <blank>, which controls how it splits tokens, when the locale changes.
320 mmm. The shell now binds its special readline functions and key bindings only
321 if the user's inputrc file has not already bound them.
323 nnn. The shell now reports on processes that dump core due to signals when
324 invoked as `-c command'.
326 2. Changes to Readline
328 a. Fixes to avoid core dumps because of null pointer references in the
329 multibyte character code.
331 b. Fix to avoid infinite recursion caused by certain key combinations.
333 c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
335 d. Readline no longer tries to read ahead more than one line of input, even
336 when more is available.
338 e. Fixed the code that adjusts the point to not mishandle null wide
341 f. Fixed a bug in the history expansion `g' modifier that caused it to skip
344 g. Fixed a bug that caused the prompt to overwrite previous output when the
345 output doesn't contain a newline and the locale supports multibyte
346 characters. This same change fixes the problem of readline redisplay
347 slowing down dramatically as the line gets longer in multibyte locales.
349 h. History traversal with arrow keys in vi insertion mode causes the cursor
350 to be placed at the end of the new line, like in emacs mode.
352 i. The locale initialization code does a better job of using the right
353 precedence and defaulting when checking the appropriate environment
356 j. Fixed the history word tokenizer to handle <( and >( better when used as
359 k. The overwrite mode code received several bug fixes to improve undo.
361 l. Many speedups to the multibyte character redisplay code.
363 m. The callback character reading interface should not hang waiting to read
366 n. Fixed a bug with redoing vi-mode `s' command.
368 o. The code that initializes the terminal tracks changes made to the terminal
369 special characters with stty(1) (or equivalent), so that these changes
370 are reflected in the readline bindings. New application-callable function
371 to make it work: rl_tty_unset_default_bindings().
373 p. Fixed a bug that could cause garbage to be inserted in the buffer when
374 changing character case in vi mode when using a multibyte locale.
376 q. Fixed a bug in the redisplay code that caused problems on systems
377 supporting multibyte characters when moving between history lines when the
378 new line has more glyphs but fewer bytes.
380 r. Undo and redo now work better after exiting vi insertion mode.
382 s. Make sure system calls are restarted after a SIGWINCH is received using
385 t. Improvements to the code that displays possible completions when using
386 multibyte characters.
388 u. Fixed a problem when parsing nested if statements in inputrc files.
390 v. The completer now takes multibyte characters into account when looking for
391 quoted substrings on which to perform completion.
393 w. The history search functions now perform better bounds checking on the
396 3. New Features in Bash
398 a. ANSI string expansion now implements the \x{hexdigits} escape.
400 b. There is a new loadable `strftime' builtin.
402 c. New variable, COMP_WORDBREAKS, which controls the readline completer's
403 idea of word break characters.
405 d. The `type' builtin no longer reports on aliases unless alias expansion
406 will actually be performed.
408 e. HISTCONTROL is now a colon-separated list of values, which permits
409 more extensibility and backwards compatibility.
411 f. HISTCONTROL may now include the `erasedups' option, which causes all lines
412 matching a line being added to be removed from the history list.
414 g. `configure' has a new `--enable-multibyte' argument that permits multibyte
415 character support to be disabled even on systems that support it.
417 h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
418 BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
421 i. FUNCNAME has been changed to support the debugger: it's now an array
424 j. for, case, select, arithmetic commands now keep line number information
427 k. There is a new `RETURN' trap executed when a function or sourced script
428 returns (not inherited child processes; inherited by command substitution
429 if function tracing is enabled and the debugger is active).
431 l. New invocation option: --debugger. Enables debugging and turns on new
432 `extdebug' shell option.
434 m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR
435 traps, respectively, to be inherited by shell functions. Equivalent to
436 `set -T' and `set -E' respectively. The `functrace' option also controls
437 whether or not the DEBUG trap is inherited by sourced scripts.
439 n. The DEBUG trap is run before binding the variable and running the action
440 list in a `for' command, binding the selection variable and running the
441 query in a `select' command, and before attempting a match in a `case'
444 o. New `--enable-debugger' option to `configure' to compile in the debugger
447 p. `declare -F' now prints out extra line number and source file information
448 if the `extdebug' option is set.
450 q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes
451 the next command to be skipped, and a return value of 2 while in a
452 function or sourced script forces a `return'.
454 r. New `caller' builtin to provide a call stack for the bash debugger.
456 s. The DEBUG trap is run just before the first command in a function body is
457 executed, for the debugger.
459 t. `for', `select', and `case' command heads are printed when `set -x' is
462 u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1,
463 x+2,...,y}. x and y can be integers or single characters; the sequence
464 may ascend or descend; the increment is always 1.
466 v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
469 w. New `force_fignore' shopt option; if enabled, suffixes specified by
470 FIGNORE cause words to be ignored when performing word completion even
471 if they're the only possibilities.
473 x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
474 style' (filename:lineno:message) format.
476 y. New `-o bashdefault' option to complete and compgen; if set, causes the
477 whole set of bash completions to be performed if the compspec doesn't
480 z. New `-o plusdirs' option to complete and compgen; if set, causes directory
481 name completion to be performed and the results added to the rest of the
482 possible completions.
484 aa. `kill' is available as a builtin even when the shell is built without
487 bb. New HISTTIMEFORMAT variable; value is a format string to pass to
488 strftime(3). If set and not null, the `history' builtin prints out
489 timestamp information according to the specified format when displaying
490 history entries. If set, bash tells the history library to write out
491 timestamp information when the history file is written.
493 cc. The [[ ... ]] command has a new binary `=~' operator that performs
494 extended regular expression (egrep-like) matching.
496 dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
497 to enable the =~ operator and regexp matching in [[ ... ]].
499 ee. Subexpressions matched by the =~ operator are placed in the new
500 BASH_REMATCH array variable.
502 ff. New `failglob' option that causes an expansion error when pathname
503 expansion fails to produce a match.
505 gg. New `set -o pipefail' option that causes a pipeline to return a failure
506 status if any of the processes in the pipeline fail, not just the last
509 4. New Features in Readline
511 a. History expansion has a new `a' modifier equivalent to the `g' modifier
512 for compatibility with the BSD csh.
514 b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
515 modifier, which performs a substitution once per word.
517 c. All non-incremental search operations may now undo the operation of
518 replacing the current line with the history line.
520 d. The text inserted by an `a' command in vi mode can be reinserted with
523 e. New bindable variable, `show-all-if-unmodified'. If set, the readline
524 completer will list possible completions immediately if there is more
525 than one completion and partial completion cannot be performed.
527 f. There is a new application-callable `free_history_entry()' function.
529 g. History list entries now contain timestamp information; the history file
530 functions know how to read and write timestamp information associated
533 h. Four new key binding functions have been added:
535 rl_bind_key_if_unbound()
536 rl_bind_key_if_unbound_in_map()
537 rl_bind_keyseq_if_unbound()
538 rl_bind_keyseq_if_unbound_in_map()
540 ------------------------------------------------------------------------------
541 This document details the changes between this version, bash-2.05b-release,
542 and the previous version, bash-2.05b-beta2.
546 a. Fixed an off-by-one error in the function that translates job
549 b. Note that we're running under Emacs and disable line editing if
552 ------------------------------------------------------------------------------
553 This document details the changes between this version, bash-2.05b-beta2,
554 and the previous version, bash-2.05b-beta1.
558 a. Fixed the /= and %= arithmetic operators to catch division by zero.
560 b. Added putenv, setenv, unsetenv to getenv replacement for completeness.
562 c. Fixed a bug that could cause the -O expand_aliases invocation option
565 d. Fixed a problem with process substitution that resulted in incorrect
566 behavior when the number of process substitutions in an individual
567 command approached 64.
569 2. Changes to Readline
571 a. Fixed a problem with backward-char-search when on a system with support
572 for multibyte characters when running in a locale without any multibyte
575 ------------------------------------------------------------------------------
576 This document details the changes between this version, bash-2.05b-beta1,
577 and the previous version, bash-2.05b-alpha1.
581 a. Fixed a problem when parsing a POSIX.2 character class name while
582 evaluating a bracket expression containing multibyte characters.
584 b. Changed the help text for `bind' to make it clear that any command
585 that may be placed in ~/.inputrc is a valid argument to `bind'.
587 c. Added `help' builtin entries for `((', `[[', and arithmetic for.
589 d. malloc updated again:
590 o slightly better overflow and underflow detection by putting the
591 chunk size at the beginning and end of the chunk and making
592 sure they match in free/realloc
593 o partial page allocated to make things page-aligned no longer
595 o block coalescing now enabled by default
596 o splitting and coalescing enabled for 32-byte chunks, the most
597 common size requested
598 o fixed a problem that resulted in spurious underflow messages and
600 o bin sizes are precomputed and stored in an array rather than
601 being computed at run time
602 o malloc will return memory blocks back to the system if the block
603 being freed is at the top of the heap and of sufficient size to
605 o malloc/free/realloc now inline memset instead of calling the
606 libc function; uses Duff's device for good performance
608 e. Check for getservent(); make the service name completion code dependent
611 f. Changed the readline callback that executes a command bound to a key
612 sequence to not save the executed command on the history list and to
613 save and restore the parsing state.
615 g. Changes to lib/sh/snprintf.c: fixed some bugs in the `g' and `G'
616 floating point format display; implemented the "'" flag character
617 that turns on thousands' grouping; fixed behavior on systems where
618 MB_CUR_MAX does not evaluate to a constant.
620 h. The `unset' builtin no longer returns a failure status when asked to
621 unset a previously-unset variable or function.
623 i. Changes to the build system to make it easier to cross-compile bash
624 for different systems.
626 j. Added `,' to the characters that are backslash-escaped during filename
627 completion, to avoid problems with complete-into-braces and RCS filenames
630 k. Some changes to the multibyte character support code to avoid many calls
633 l. Bash now correctly honors setting LANG to some value when LC_ALL does not
634 already have a value.
636 m. Fixed a bug that could cause SIGSEGV when processing nested traps with
639 n. The `source/.' builtin now restores the positional parameters when it
640 returns unless they were changed using the `set' builtin during the file's
643 o. Fixed a bug that caused a syntax error when a command was terminated by
646 2. New Features in Bash
648 a. There is now support for placing the long help text into separate files
649 installed into ${datadir}/bash. Not enabled by default; can be turned
650 on with `--enable-separate-helpfiles' option to configure.
652 b. All builtins that take operands accept a `--' pseudo-option, except
655 c. The `echo' builtin now accepts \0xxx (zero to three octal digits following
656 the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
657 POSIX.1-2001 compliance.
659 3. Changes to Readline
661 a. Fixed a small problem in _rl_insert_char with multibyte characters.
663 b. Fixes from IBM for line wrapping problems when using multibyte characters.
665 c. Fixed a problem which caused the display to be messed up when the last
666 line of a multi-line prompt (possibly containing invisible characters)
667 was longer than the screen width.
669 d. Fixed a problem with the vi-mode `r' command that ocurred on systems with
670 support for multibyte characters when running in a locale without any
671 multibyte characters.
673 ------------------------------------------------------------------------------
674 This document details the changes between this version, bash-2.05b-alpha1,
675 and the previous version, bash-2.05a-release.
679 a. Some changes to work around inlining differences between compilers.
681 b. Added more prototypes for internal shell typedefs, to catch argument
682 passing errors when using pointers to functions.
684 c. The `cd' builtin now fails in posix mode when a valid directory cannot be
685 constructed from a relative pathname argument and the $PWD using pathname
686 canonicalization, and the -P option has not been supplied. Previously,
687 the shell would attempt to use what the user typed, leading to weird
688 values for $PWD and discrepancies between the value of $PWD and the
689 actual working directory.
691 d. The `cd' builtin now resets $PWD when canonicalization fails but a chdir
692 to the pathname passed as an argument succeeds (when not in posix mode).
694 e. The `fc' builtin has been fixed, as POSIX requires, to use the closest
695 history position in range when given an out-of-range argument.
697 f. The history file loading code was changed to allow lines to be saved in
698 the history list from the shell startup files.
700 g. `history -s args' now works better in compound commands.
702 h. The tilde expansion code was fixed to better recognize when it's being
703 invoked in an assignment context, which enables expansion after `='
706 i. Fixed the command name completion code so a slash is no longer appended
707 to a single match if there happens to be a directory with that name in
710 j. Fixed compound array assignment to no longer perform alias expansion, to
711 allow reserved words as array members, and to not produce extra output
712 when the `-v' option had been enabled.
714 k. Fixed the programmable completion code to better handle newlines in lists
715 of possible completions (e.g., `complete -W').
717 l. Removed the reserved words from the `bash-builtins' manual page.
719 m. Parser error reporting now attempts to do a better job of identifying the
720 token in error rather than doing straight textual analysis.
722 n. Fixes for Inf/NaN, locales, wide/multibyte characters and zero-length
723 arguments in the library snprintf(3) replacement.
725 o. `read -e' no longer does command name completion on the first word on
728 p. `select' now returns failure if the read of the user's selection fails.
730 q. Fixed a bug that could cause a core dump when setting $PIPESTATUS.
732 r. Fixes to not allocate so many job slots when the shell is running a loop
733 with job control enabled in a subshell of an interactive shell.
735 s. Fixed a bug in the trap code that caused traps to be inherited by
736 command substitutions in some cases.
738 t. Fixed a bug that could cause alias expansion to inappropriately expand
739 the word following the alias.
741 u. Fixed a bug in the `kill' builtin that mishandled negative pid arguments.
743 v. The parser is less lenient when parsing assignment statements where the
744 characters before the `=' don't comprise a valid identifier.
746 w. The arithmetic expression evaluation code now honors the setting of the
747 `-u' option when expanding variable names.
749 x. Fixed the arithmetic evaluation code to allow array subscripts to be
750 assigned (`let b[7]=42') and auto-incremented and auto-decremented
753 y. Reimplemented the existing prompt string date and time expansions using
754 strftime(3), which changed the output of \@ in some locales.
756 z. Fixed a bug that could cause a core dump when a special shell variable
757 (like RANDOM) was converted to an array with a variable assignment.
759 aa. Fixed a bug that would reset the handler for a signal the user had
760 trapped to a function that would exit the shell when setting the exit
761 trap in a non-interactive shell.
763 bb. Changed the execve(2) wrapper code to check whether or not a failing
764 command is a directory before looking at whether a `#!' interpreter
765 failed for some reason.
767 cc. Fixed a bug in the command printing code so it no longer inserts a `;'
768 after a newline, which produces a syntax error when reused as input.
770 dd. The code that expands $PS4 no longer inherits the `-x' flag.
772 ee. The bash-specific completion functions may now take advantage of the
773 double-TAB and M-? features of the standard readline completion
776 ff. The mail checking code no longer prints a message if the checked file's
777 size has not increased, even if the access time is less than the modification time.
779 gg. Rewrote the variable symbol table code: there is now a stack of
780 contexts, each possibly including a separate symbol table; there can
781 be more than one temporary environment supplied to nested invocations
782 of `./source'; the temporary environments no longer require so much
783 special-case code; shell functions now handle the temporary environment
784 and local variables more consistently; function scope exit is faster now
785 that the entire symbol table does not have to be traversed to dispose of
786 local variables; it is now easier to push vars from the temporary
787 environment to the shell's variable table in posix mode; some duplicated
788 code has been removed.
790 hh. Regularized the error message printing code; builtin_error is now called
791 more consistently, and common error message strings are handled by small
792 functions. This should make eventual message translation easier.
794 ii. Error messages now include the line number in a script when the shell
797 jj. Array subscript expansion now takes place even when the array variable is
798 unset, so side effects will take place.
800 kk. Fixed a bug in the SICGHLD child-reaping code so that it won't find
801 jobs already marked as terminated if the OS reuses pids quickly enough.
803 ll. Fixed a bug that could cause a signal to not interrupt the `wait'
804 builtin while it was waiting for a background process to terminate.
806 mm. A couple of changes to make it easier for multiple shells to share history
807 files using `history -n', `history -r', and `history -w'.
809 nn. The `getopts' builtin always increments OPTIND to point to the next
810 option to be handled when an option is returned, whether it's valid
811 or not, as POSIX 1003.x-2001 requires.
813 oo. Changed some parts of the expansion code to avoid allocating and
814 immediately freeing memory without using the results for anything.
816 pp. The shell now keeps track of $IFS internally, updating its internal map
817 each time the variable is assigned a new value (or at local scope exit).
818 This saves thousands of hash lookups for IFS, which, while individually
821 qq. Rewrote the hash table code: searching and insertion are much faster now,
822 and it uses a better string hashing function; augmented the function
823 interface to simplify other parts of the code and remove duplicated code
825 rr. The shell now uses a simple, generic `object cache' for allocating and
826 caching words and word lists, which were the major users of
829 ss. Fixed the assignment statement parsing code to allow whitespace and
830 newlines in subscripts when performing array element assignment.
832 tt. The shell now issues many fewer calls to sigprocmask and other signal
833 masking system calls.
835 uu. Fixed the `test' and conditional command file comparison operators to
836 work right when one file has a non-positive timestamp and the other
839 vv. Fixed some cases where the special characters '\001' and '\177' in the
840 values of variables or positional parameters caused incorrect expansion
843 2. Changes to Readline
845 a. Fixed output of comment-begin character when listing variable values.
847 b. Added some default key bindings for common escape sequences produced by
850 c. Fixed the mark handling code to be more emacs-compatible.
852 d. A bug was fixed in the code that prints possible completions to keep it
853 from printing empty strings in certain circumstances.
855 e. Change the key sequence printing code to print ESC as M\- if ESC is a
856 meta-prefix character -- it's easier for users to understand than \e.
858 f. Fixed unstifle_history() to return values that match the documentation.
860 g. Fixed the event loop (rl_event_hook) to handle the case where the input
861 file descriptor is invalidated.
863 h. Fixed the prompt display code to work better when the application has a
864 custom redisplay function.
866 i. Changes to make reading and writing the history file a little faster, and
867 to cope with huge history files without calling abort(3) from xmalloc.
869 j. The vi-mode `S' and `s' commands are now undone correctly.
871 3. New Features in Bash
873 a. If set, TMOUT is the default timeout for the `read' builtin.
875 b. `type' has two new options: `-f' suppresses shell function lookup, and
876 `-P' forces a $PATH search.
878 c. New code to handle multibyte characters.
880 d. `select' was changed to be more ksh-compatible, in that the menu is
881 reprinted each time through the loop only if REPLY is set to NULL.
882 The previous behavior is available as a compile-time option.
884 e. `complete -d' and `complete -o dirnames' now force a slash to be
885 appended to names which are symlinks to directories.
887 f. There is now a bindable edit-and-execute-command readline command,
888 like the vi-mode `v' command, bound to C-xC-e in emacs mode.
890 g. Added support for ksh93-like [:word:] character class in pattern matching.
892 h. The $'...' quoting construct now expands \cX to Control-X.
894 i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
895 the result into the expanded prompt.
897 j. The shell now performs arithmetic in the largest integer size the
898 machine supports (intmax_t), instead of long.
900 k. If a numeric argument is supplied to one of the bash globbing completion
901 functions, a `*' is appended to the word before expansion is attempted.
903 l. The bash globbing completion functions now allow completions to be listed
904 with double tabs or if `show-all-if-ambiguous' is set.
906 m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
907 readline's appending a space to the completed word.
909 n. New `here-string' redirection operator: <<< word.
911 o. When displaying variables, function attributes and definitions are shown
912 separately, allowing them to be re-used as input (attempting to re-use
913 the old output would result in syntax errors).
915 p. There is a new configuration option `--enable-mem-scramble', controls
916 bash malloc behavior of writing garbage characters into memory at
917 allocation and free time.
919 q. The `complete' and `compgen' builtins now have a new `-s/-A service'
920 option to complete on names from /etc/services.
922 r. `read' has a new `-u fd' option to read from a specified file descriptor.
924 s. Fix the completion code so that expansion errors in a directory name
925 don't cause a longjmp back to the command loop.
927 t. Fixed word completion inside command substitution to work a little more
930 u. The `printf' %q format specifier now uses $'...' quoting to print the
931 argument if it contains non-printing characters.
933 v. The `declare' and `typeset' builtins have a new `-t' option. When applied
934 to functions, it causes the DEBUG trap to be inherited by the named
935 function. Currently has no effect on variables.
937 w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
938 [[...]] conditional commands, and for ((...)) loops.
940 x. The expansion of $LINENO inside a shell function is only relative to the
941 function start if the shell is interactive -- if the shell is running a
942 script, $LINENO expands to the line number in the script. This is as
945 y. The bash debugger in examples/bashdb has been modified to work with the
946 new DEBUG trap semantics, the command set has been made more gdb-like,
947 and the changes to $LINENO make debugging functions work better. Code
950 z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
953 aa. There is a new `-l' invocation option, equivalent to `--login'.
955 bb. The `hash' builtin has a new `-l' option to list contents in a reusable
956 format, and a `-d' option to remove a name from the hash table.
958 4. New Features in Readline
960 a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
961 be bound to readline functions. Now the arrow keys may be used in vi
964 b. When listing completions, and the number of lines displayed is more than
965 the screen length, readline uses an internal pager to display the results.
966 This is controlled by the `page-completions' variable (default on).
968 c. New code to handle editing and displaying multibyte characters.
970 d. The behavior introduced in bash-2.05a of deciding whether or not to
971 append a slash to a completed name that is a symlink to a directory has
972 been made optional, controlled by the `mark-symlinked-directories'
973 variable (default is the 2.05a behavior).
975 e. The `insert-comment' command now acts as a toggle if given a numeric
976 argument: if the first characters on the line don't specify a
977 comment, insert one; if they do, delete the comment text
979 f. New application-settable completion variable:
980 rl_completion_mark_symlink_dirs, allows an application's completion
981 function to temporarily override the user's preference for appending
982 slashes to names which are symlinks to directories.
984 g. New function available to application completion functions:
985 rl_completion_mode, to tell how the completion function was invoked
986 and decide which argument to supply to rl_complete_internal (to list
989 h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
990 bindable command, which could be bound to `Insert'.
992 i. New application-settable completion variable:
993 rl_completion_suppress_append, inhibits appending of
994 rl_completion_append_character to completed words.
996 j. New key bindings when reading an incremental search string: ^W yanks
997 the currently-matched word out of the current line into the search
998 string; ^Y yanks the rest of the current line into the search string,
999 DEL or ^H deletes characters from the search string.
1001 ------------------------------------------------------------------------------
1002 This document details the changes between this version, bash-2.05a-release,
1003 and the previous version, bash-2.05a-rc1.
1007 a. Fixed the `printf' builtin so that the variable name supplied as an
1008 argument to a %n conversion must be a valid shell identifier.
1010 b. Improved the random number generator slightly.
1012 c. Changes to configuration to not put -I/usr/include into $CFLAGS, since
1013 it messes up some includes.
1015 d. Corrected description of POSIXLY_CORRECT in man page and info manual.
1017 e. Fixed a couple of cases of incorrect function prototypes that sneaked
1018 through and caused compilation problems.
1020 f. A few changes to avoid potential core dumps in the programmable completion
1023 g. Fixed a configure problem that could cause a non-existent file to show
1026 h. Fixed a configure problem that could cause siglist.o to not be built when
1029 i. Changes to the strtoimax and strtoumax replacement functions to work
1030 around buggy compilers.
1032 j. Fixed a problem with the snprintf replacement function that could
1033 potentially cause a core dump.
1035 2. Changes to Readline
1037 a. Fixed a locale-specific problem in the vi-mode `goto mark' command.
1039 b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
1040 include file problems.
1042 ------------------------------------------------------------------------------
1043 This document details the changes between this version, bash-2.05a-rc1,
1044 and the previous version, bash-2.05a-beta1.
1048 a. Fixed the snprintf replacement to correctly implement the `alternate form'
1049 of the %g and %G conversions.
1051 b. Fixed snprintf to correctly handle the optional precision with the %g and
1054 c. Fixed the arithmetic evaluation code to correct the values of `@' and `_'
1055 when translating base-64 constants (they were backwards).
1057 d. New library functions for formatting long and long long ints.
1059 e. Fixed a few places where negative array subscripts could have occurred,
1060 mostly as the result of systems using signed characters.
1062 f. Fixed a few places that assumed a pid_t was no wider than an int.
1064 g. Fixed the `maildir' mail checking code to work on systems where a
1065 `struct stat' doesn't include an `st_blocks' member.
1067 h. Fixed snprintf to make `unsigned long long' conversion formats (%llu)
1070 i. Fixed snprintf to not print a sign when asked to do an unsigned conversion.
1072 j. Made configure changes to avoid compiling empty source files in lib/sh.
1074 k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax,
1077 l. The `printf' builtin now handles the `ll' and `j' length modifiers
1078 directly, since they can affect the type and width of the argument
1079 passed to printf(3).
1081 m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to
1082 have more sytematic naming, with accompanying changes to configure.in.
1084 n. Fixed snprintf to handle long doubles and the %a/%A conversions by
1085 falling back to sprintf, as long as sprintf supports them.
1087 o. Fixed return value from vsnprintf/snprintf to be the number of characters
1088 that would have been printed, even if that number exceeds the buffer
1089 size passed as an argument.
1091 p. Bash no longer attempts to define its own versions of some ctype macros
1092 if they are implemented as functions in libc but not as macros in
1095 q. Changed the variable printing code (used by `set', `export', etc.) to
1096 not use the $'...' syntax when in posix mode, since that caused
1097 interoperability problems with other shells (most notably with autoconf).
1098 When not in posix mode, it uses $'...' if the string to be printed
1099 contains non-printing characters and regular single quotes otherwise.
1101 r. snprintf now recognizes the %F conversion.
1103 s. Fixed a bug that could cause the wrong status to be returned by a shell
1104 function when the shell is compiled without job control and a null
1105 command containing a command substutition was executed in the function.
1107 t. When in posix mode, the default value for MAILCHECK is 600.
1109 u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables
1110 if they're not in the initial environment.
1112 v. If SECONDS appears in the initial environment with a valid integer value,
1113 bash uses that as the starting value, as if an assignment had been
1116 w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it
1117 gives them default values if they don't appear in the initial environment.
1119 x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE,
1120 even if it assigns them default values.
1122 y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT
1123 if they appear in the initial environment.
1125 z. Bash no longer attempts to discover if it's being run by sshd in order to
1126 run the startup files. If the SSH_SOURCE_BASHRC is uncommented in
1127 config-top.h it will attempt to do so as previously, but that's commented
1128 out in the distributed version.
1130 aa. Fixed a typo in the code that tests for LC_NUMERIC.
1132 bb. The POSIXLY_CORRECT shell variable and its effects are now documented.
1134 cc. Some changes to several of the support shell scripts included in the
1135 definitions to try to avoid race conditions and attacks.
1137 dd. Several changes to avoid warnings from `gcc -Wall'.
1139 ee. Fixed a problem with the `unset' builtin that could cause incorrect
1140 results if asked to unset a variable and an array subscript in the
1143 ff. A few changes to the shell's temporary file creation code to avoid
1144 potential file descriptor leaks and to prefer the system's idea of
1145 the temporary directory to use.
1147 gg. Fixes to build with the C alloca in lib/malloc/alloca.c if the system
1148 requires it but the shell has been configured --without-bash-malloc.
1150 hh. Updated the documentation to note that only interactive shells resend
1151 SIGHUP to all jobs before exiting.
1153 ii. Fixes to only pass unquoted tilde words to tilde_expand, rather than
1154 rely on tilde_expand or getpwnam(3) to handle the quotes (MacOS 10.x
1155 will remove backslashes in any login name passed to getpwnam(3)).
1157 jj. Small change from Paul Eggert to make LINENO right in commands run with
1160 2. New Features in Bash
1162 a. The `printf' builtin now handles the %a and %A conversions if they're
1163 implemented by printf(3).
1165 b. The `printf' builtin now handles the %F conversion (just about like %f).
1167 c. The `printf' builtin now handles the %n conversion like printf(3). The
1168 corresponding argument is the name of a shell variable to which the
1171 3. Changes to Readline
1173 a. Fixed a few places where negative array subscripts could have occurred.
1175 b. Fixed the vi-mode code to use a better method to determine the bounds of
1176 the array used to hold the marks.
1178 c. Fixed the defines in chardefs.h to work better when chars are signed.
1180 d. Fixed configure.in to use the new names for bash autoconf macros.
1182 e. Readline no longer attempts to define its own versions of some ctype
1183 macros if they are implemented as functions in libc but not as macros in
1186 f. Fixed a problem where rl_backward could possibly set point to before
1187 the beginning of the line.
1189 ------------------------------------------------------------------------------
1190 This document details the changes between this version, bash-2.05a-beta1,
1191 and the previous version, bash-2.05a-alpha1.
1195 a. Fixed a bug in the evalution of arithmetic `for' statements when the
1196 expanded expression is NULL.
1198 b. Fixed an unassigned variable problem in the redirection printing code.
1200 c. Added more prototypes to extern function declarations in the header
1201 files and to static function declarations in C source files.
1203 d. Make sure called functions have a prototype in scope, to get the arguments
1204 and return values right instead of casting. Removed extern function
1205 declarations from C source files that were already included in header
1208 e. Changed some function arguments to use function typedefs in general.h so
1209 the prototypes can be checked. The only use of Function and VFunction
1210 now is for unwind-protects.
1212 f. More const changes to function arguments and appropriate variables.
1214 g. Changed the mail checking support to handle `maildir'-style mail
1217 h. Augmented the bash malloc to pass in the file and line number information
1218 for each malloc, realloc, and free. This should result in better error
1221 i. The `old' gnu malloc is no longer a configuration option.
1223 j. Augmented the bash malloc with optional tracing and registering allocated
1226 k. Prompt string decoding now saves and restores the value of $? when it
1227 expands the prompt string, so command substitutions don't change $?.
1229 i. Array indices are now `long', since shell arithmetic is performed as long,
1230 and the internal arrayind_t type is used consistently.
1232 j. Some more `unsigned char *' fixes from Paul Eggert.
1234 k. Fixed a bad call to builtin_error that could cause core dumps when making
1237 l. `return' may no longer be used to terminate a `select' command, for
1238 compatibility with ksh.
1240 m. Changed code that reads octal numbers to do a better job of detecting
1243 n. The time formatting code no longer uses absolute indices into a buffer,
1244 because the buffer size changes depending on the size of a `time_t'.
1246 o. `umask' now prints four digits when printing in octal mode, for
1247 compatibility with other shells.
1249 p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L'
1250 formats and long doubles better, and internal functions have been
1251 simpified where appropriate.
1253 q. Some `time_t' fixes for machines were a time_t is bigger than a long.
1255 r. Replaced some bash-specific autoconf macros with standard equivalents.
1257 s. Improvmed the code that constructs temporary filenames to make the
1258 generated names a bit more random.
1260 t. Added code that checks for ascii before calling any of the is* ctype
1263 u. Changed some places where a `char' was used as an array subscript to use
1264 `unsigned char', since a `char' can be negative if it's signed by default.
1266 v. Lots of changes to the `ulimit' builtin from Paul Eggert to add support
1267 for the new POSIX-200x RLIM_SAVED_CUR and RLIM_SAVED_MAX values and
1270 w. `ulimit' now prints the description of a resource in any error message
1271 relating to fetching or setting that resource's limits.
1273 x. The `snprintf' replacement now computes maximum values at compile
1274 time rather than using huge constants for things like long long.
1276 y. Interactive shells now ignore `set -n'.
1278 z. Changed the malloc bookkeeping information so that it's now 8 bytes
1279 instead of 12 on most 32-bit machines (saving 4 bytes per allocation),
1280 restoring 8-byte alignment.
1282 aa. The malloc error reporting code now attempts to print the file and line
1283 number of the call that caused the error.
1285 bb. Changed the redirection error reporting code to catch EBADF errors and
1286 report the file descriptor number rather than the file being redirected
1287 to or from (e.g., things like `exec 4242<x' where 4242 is an out-of-range
1290 cc. `printf', `echo -e', and the $'...' code now process only two hex digits
1291 after a `\x' escape sequence for compatibility with other shells, and
1292 the documentation was changed to note that the octal and hex escape
1293 sequences result in an eight-bit value rather than strict ASCII.
1295 2. Changes to Readline
1297 a. The completion code now attempts to do a better job of preserving the
1298 case of the word the user typed if ignoring case in completions.
1300 b. Readline defaults to not echoing the input and lets the terminal
1301 initialization code enable echoing if there is a controlling terminal.
1303 c. The key binding code now processes only two hex digits after a `\x'
1304 escape sequence, and the documentation was changed to note that the
1305 octal and hex escape sequences result in an eight-bit value rather
1308 3. New Features in Bash
1310 a. The builtin `ulimit' now takes two new non-numeric arguments: `hard',
1311 meaning the current hard limit, and `soft', meaning the current soft
1312 limit, in addition to `unlimited'
1314 b. `ulimit' now prints the option letter associated with a particular
1315 resource when printing more than one limit.
1317 c. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
1318 one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
1320 4. New Features in Readline
1322 a. New bindable variable `history-preserve-point'. If set, the history
1323 code attempts to place the user at the same location on each history
1324 line retrived with previous-history or next-history.
1326 ------------------------------------------------------------------------------
1327 This document details the changes between this version, bash-2.05a-alpha1,
1328 and the previous version, bash-2.05-release.
1332 a. Better checks in the redirection code for write errors.
1334 b. bashbug now uses $TMPDIR, defaulting to /tmp, and uses mktemp(1) more
1337 c. System-specific configuration changes for: Interix, OpenBSD, FreeBSD,
1340 d. Some more `const' cleanups through the code.
1342 e. Fixed a typo in the /dev/fd redirection code, better checks for valid
1343 numeric fds in /dev/fd.
1345 f. Fixed many parts of the shell to handle integer overflow more gracefully
1346 and to do more stringent checks for valid numbers.
1348 g. Fixed mksignames to include config.h.
1350 h. Fixed an uninitialized variable problem that could cause the shell to core
1351 dump when replacing characters in a string.
1353 i. New mechanism for updating the patch level when official patches are
1354 released (patchlevel.h).
1356 j. configure.in changed to no longer require external files _distribution and
1359 k. Fixed non-interactive shell initialization problem when bash started as
1362 l. Fixed printf builtin conversion error handling to be POSIX.2-conformant.
1364 m. autoconf-2.52 is now used to build configure; autoconf-2.50 or newer is
1365 required. Some of the bash-specific macros were removed, since they are
1368 n. Startup files and files read with source or `.' are no longer required to
1371 o. Fixed core dump in builtin printf when user-supplied precision or field
1374 p. Fixed builtin printf to treat a negative field width as a positive field
1375 width with left-justification.
1377 r. New unwind-protect implementation from Paul Eggert.
1379 s. Fixed an inadvertently-unclosed comment in the bash completion code that
1380 caused programmable completions to not add trailing slashes or spaces to
1383 t. Fixed the process substitution code to cope better when stdin is closed.
1385 v. Fixes, mostly from Paul Eggert, for a few possible buffer overflows in
1388 w. Fixes from Paul Eggert to avoid most of the type casts in the shell code,
1389 and use more appropriate types for a number of variables.
1391 x. Command substition no longer inherits the DEBUG trap.
1393 y. Some fixes to the process substition code on machines without /dev/fd so
1394 that named pipes are not removed inappropriately.
1396 z. The loadable `getconf' builtin is now much more complete, and will become
1397 part of the shell in the future.
1399 aa. The select command no longer terminates on a `return', so it can be used
1400 to return from an enclosing function (as ksh does it).
1402 bb. Fixed the extended pattern matching code to behave better when presented
1403 with incorrectly-formed patterns.
1405 cc. Some changes were made with the intent of making cross-compilation easier.
1407 dd. The network code (/dev/tcp and /dev/udp redirections) uses getaddrinfo(3)
1408 if it's available, which adds support for IPv6.
1410 ee. Subshells of login shells no longer source ~/.bash_logout when they exit.
1412 ff. Fixes so that subshells don't exit inappropriately if the -e option has
1415 gg. Restricted shells no longer allow functions to be exported.
1417 hh. Changes to the pattern matching code so extended pattern matching works
1418 on systems with deficient shared library implementations, like MacOS X.
1420 ii. Better error messages when a script with a leading `#!interp' fails
1421 to execute because of problems with `interp'.
1423 jj. Fixed `compgen' to handle the `-o default' option better.
1425 kk. Fixed the job control code to force an asynchronous process's standard
1426 input to /dev/null only if job control is not active.
1428 ll. Fixed a possible infinite recursion problem when `fc ""=abc' (a null
1429 pattern) is used to re-execute a previous command.
1431 mm. Fixed `declare [-a] var=value' to assign VALUE to element 0 if VAR is an
1432 array variable. Similarly for `declare [-a] var[N]=value'. This is like
1435 nn. Fixed a bug that caused `read -a aname' to work even if ANAME had been
1438 oo. Fixed a possible integer overflow problem when constructing names for
1441 2. New Features in Bash
1443 a. Added support for DESTDIR installation root prefix, so you can do a
1444 `make install DESTDIR=bash-root' and do easier binary packaging.
1446 b. Added support for builtin printf "'" flag character as per latest POSIX
1449 c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
1452 d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
1453 (bash doesn't use very much of what it returns).
1455 e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
1458 f. New read-only `shopt' option: login_shell. Set to non-zero value if the
1459 shell is a login shell.
1461 g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
1463 h. New `-A group/-g' option to complete and compgen; does group name
1466 i. New `-t' option to `hash' to list hash values for each filename argument.
1468 j. New [-+]O invocation option to set and unset `shopt' options at startup.
1470 k. configure's `--with-installed-readline' option now takes an optional
1471 `=PATH' suffix to set the root of the tree where readline is installed
1474 l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run
1475 whenever the shell would have exited if the -e option were enabled.
1476 It is not inherited by shell functions.
1478 m. `readonly', `export', and `declare' now print variables which have been
1479 given attributes but not set by assigning a value as just a command and
1480 a variable name (like `export foo') when listing, as the latest POSIX
1483 n. `bashbug' now requires that the subject be changed from the default.
1485 o. configure has a new `--enable-largefile' option, like other GNU utilities.
1487 p. `for' loops now allow empty word lists after `in', like the latest POSIX
1490 3. Changes to Readline
1492 a. More `const' and type casting fixes.
1494 b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
1497 c. The completion code no longer appends a `/' or ` ' to a match when
1498 completing a symbolic link that resolves to a directory name, unless
1499 the match does not add anything to the word being completed. This
1500 means that a tab will complete the word up to the full name, but not
1501 add anything, and a subsequent tab will add a slash.
1503 d. Fixed a trivial typo that made the vi-mode `dT' command not work.
1505 e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
1507 f. Fixed the tty code so that ^V works more than once.
1509 g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
1510 because the use of __P in typedefs conflicted g++ and glibc.
1512 4. New Features in Readline
1514 a. Added extern declaration for rl_get_termcap to readline.h, making it a
1515 public function (it was always there, just not in readline.h).
1517 b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
1518 RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
1520 c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
1522 d. New bindable boolean readline variable: match-hidden-files. Controls
1523 completion of files beginning with a `.' (on Unix). Enabled by default.
1525 e. The history expansion code now allows any character to terminate a
1526 `:first-' modifier, like csh.
1528 f. The incremental search code remembers the last search string and uses
1529 it if ^R^R is typed without a search string.
1531 ------------------------------------------------------------------------------
1532 This document details the changes between this version, bash-2.05-release,
1533 and the previous version, bash-2.05-beta2.
1537 a. Make sure we note that the first line of a multi-line command was not
1538 saved in the history if the tests for HISTCONTROL succeed, but the
1539 HISTIGNORE check fails.
1541 b. Fixed a bug in the pattern matching code that caused `[' to be treated
1542 as a special character inside a `[...]' bracket expression.
1544 c. Fixed a bug in the pattern matching code that caused `]' to terminate
1545 a bracket expression even if it was the first character after the `['
1546 (or a leading `!' or `^').
1548 d. Made a small change to report a more user-friendly error message if
1549 execve(2) fails because of an error with the interpreter in a script
1550 with a leading `#! interpreter'.
1552 e. If the OS does not support an exec(2) magic number of `#!', make sure we
1553 have a non-null interpreter name before attempting to execute it.
1555 f. Fixed a bug that caused the shell process to end up in a different
1556 process group than the controlling terminal if a job-control shell was
1557 run with `exec' in the startup files.
1559 g. When started in POSIX mode, either by `bash --posix', `bash -o posix', or
1560 `sh', $SHELLOPTS includes `posix' and POSIXLY_CORRECT is set.
1562 h. Fixed a problem that caused the `\W' prompt string escape sequence to
1563 expand to nothing when $PWD was `//'.
1565 i. The `bashbug' shell script no longer uses $(...) command substitution.
1567 j. When `set' is invoked without options in POSIX mode, it no longer prints
1568 the names and definitions of shell functions.
1570 2. Changes to Readline
1572 a. rl_set_paren_blink_timeout() is now documented.
1574 b. Corrected history.3 man page: `$' is not in the default value of
1575 history_word_delimiters.
1577 c. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
1578 value, rl_read_key() now immediately returns '\n' (which is assumed to
1579 be bound to accept-line).
1581 3. New Features in Bash
1583 a. The `>&word' redirection now works in POSIX mode as it does by default,
1584 since POSIX.2 leaves it unspecified.
1586 ------------------------------------------------------------------------------
1587 This document details the changes between this version, bash-2.05-beta2,
1588 and the previous version, bash-2.05-beta1.
1592 a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported.
1594 b. Fixed startup so posixly_correct is retained across subshells begun to
1595 execute scripts without a leading `#!'.
1597 c. Fixed a bug that caused $(< file) to not work in a (...) subshell.
1599 d. Added config support for Linux running on the IBM S390.
1601 e. Fixed a bug that caused bash to get its input pointer out of sync when
1602 reading commands through a pipe and running a command with standard
1603 input redirected from a file.
1605 f. Made a change so that command completion now makes about half as many
1606 stat(2) calls when searching the $PATH.
1608 g. Fixed a bug that caused variable assignments preceding `return' to not
1609 be propagated to the shell environment in POSIX mode.
1611 h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed
1614 i. In POSIX mode, `break' and `continue' do not complain and return success
1615 if called when the shell is not executing a loop.
1617 j. Fixed `bash -o posix' to work the same as `bash --posix'.
1619 k. Fixed a bug where variable assignments preceding `eval' or `source/.'
1620 would not show up in the environment exported to subshells run by the
1623 l. In POSIX mode, shells started to execute command substitutions inherit
1624 the value of the `-e' option from their parent shell.
1626 m. In POSIX mode, aliases are expanded even in non-interactive shells.
1628 n. Changed some of the job control messages to display the text required by
1629 POSIX.2 when the shell is in POSIX mode.
1631 o. Fixed a bug in `test' that caused it to occasionally return incorrect
1632 results when non-numeric arguments were supplied to `-t'.
1634 2. Changes to Readline
1636 a. Some changes were made to avoid gcc warnings with -Wall.
1638 b. rl_get_keymap_by_name now finds keymaps case-insensitively, so
1639 `set keymap EMACS' works.
1641 c. The history file writing and truncation functions now return a useful
1644 d. Fixed a bug that could cause applications to dereference a NULL pointer
1645 if a NULL second argument was passed to history_expand().
1647 3. New Features in Bash
1649 a. doc/readline.3 has been moved to the readline distribution.
1651 4. New Features in Readline
1653 a. New function, rl_get_screen_size (int *rows, int *columns), returns
1654 readline's idea of the screen dimensions.
1656 b. The timeout in rl_gather_tyi (readline keyboard input polling function)
1657 is now settable via a function (rl_set_keyboard_input_timeout()).
1659 c. Renamed the max_input_history variable to history_max_entries; the old
1660 variable is maintained for backwards compatibility.
1662 d. The list of characters that separate words for the history tokenizer is
1663 now settable with a variable: history_word_delimiters. The default
1666 ------------------------------------------------------------------------------
1667 This document details the changes between this version, bash-2.05-beta1,
1668 and the previous version, bash-2.05-alpha1.
1672 a. Changes to allow shared library and object building on the GNU Hurd.
1674 b. Fixes to the way exported functions are placed into the environment and
1677 c. The globbing library once again respects locales when processing ranges
1678 in bracket expressions while doing pattern matching.
1680 d. System-specific configuration changes for: Tru 64, Interix
1682 e. Bashbug now uses /usr/bin/editor as one of the editing alternatives, and
1683 will use mktemp(1) or tempfile(1), if present, for temporary file creation.
1685 f. Bash no longer performs a binary file check on a script argument that's
1686 really a tty (like /dev/fd/0 or /dev/stdin).
1688 g. Fixed a bug in the execution of shell scripts that caused the effects of
1689 $BASH_ENV to be undone in some cases.
1691 h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly.
1693 i. Several changes to the job control code to avoid some signal state
1696 j. The Bash malloc no longer blocks signals as often, which should make it
1699 k. Fixed a parsing bug that did not allow backslash to escape a single quote
1700 inside a $'...' construct.
1702 l. Fixed a bug that caused things like ${var:=$'value'} to be parsed
1703 incorrectly. This showed up in newer versions of autoconf.
1705 m. Fixed a bug in the bash-specific readline initialization that caused
1706 key bindings to bash-specific function names appearing in .inputrc to
1709 n. Bash now sets the file descriptor it uses to save the file descriptor
1710 opened on a shell script to close on exec.
1712 o. Fixed a bug in the prompt string decoding that caused it to misbehave
1713 when presented an octal sequence of fewer than three characters.
1715 p. Fixed the `test' builtin to return an error if `[' is supplied a single
1716 argument that is not `]'.
1718 q. Fixed a bug that caused subshells started to run executable shell scripts
1719 without a leading `#!' to incorrectly inherit an argument list preceding
1720 a shell builtin (like such a script called from a script sourced with `.',
1721 where there were variable assignments preceding the `.' command)
1723 r. Fixed a bug that caused changes to variables supplied in an assignment
1724 statement preceding a shell builtin to not be honored (like a script
1727 s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values
1728 when the shell is started.
1730 t. Fixed a bug that caused SIGINT to kill shell scripts after the script
1733 u. The `fc' builtin now tries to create its temporary files in the directory
1736 v. Bash no longer calls any Readline functions or uses any Readline variables
1737 not declared in readline.h.
1739 w. Fixed a bug that caused some substitutions involving $@ to not be split
1740 correctly, especially expansions of the form ${paramterOPword}.
1742 x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it
1743 appears in the initial environment.
1745 y. Fixed a couple of problems with shell scripts without a leading `#!'
1746 being executed out of shell functions that could cause core dumps if
1747 such a script attempted to execute `return'.
1749 z. Fixed a problem with the `-nt' and `-ot' binary operators for the
1750 `test/[' builtin and the `[[' conditional command that caused wrong
1751 return values if one of the file arguments did not exist.
1753 aa. Fixed a bug that caused non-interactive shells which had previously
1754 executed `shopt -s expand_aliases' to fail to expand aliases in a
1755 command like `(command) &'.
1757 2. Changes to Readline
1759 a. Changes to make most (but not yet all -- there is still crlf()) of the
1760 exported readline functions declared in readline.h have an rl_ prefix.
1762 b. More `const' changes in function arguments, mostly for completion
1765 c. Fixed a bug in rl_forward that could cause the point to be set to before
1766 the beginning of the line in vi mode.
1768 d. Fixed a bug in the callback read-char interface to make it work when a
1769 readline function pushes some input onto the input stream with
1770 rl_execute_next (like the incremental search functions).
1772 e. Fixed a file descriptor leak in the history file manipulation code that
1773 was tripped when attempting to truncate a non-regular file (like
1776 f. Some existing variables are now documented and part of the public
1777 interface (declared in readline.h): rl_explict_arg, rl_numeric_arg,
1778 rl_editing_mode, rl_last_func.
1780 g. Renamed rltty_set_default_bindings to rl_tty_set_default_bindings and
1781 crlf to rl_crlf, so there are no public functions declared in readline.h
1782 without an `rl_' prefix. The old functions still exist for backwards
1785 3. New Features in Bash
1787 a. A new loadable builtin, realpath, which canonicalizes and expands symlinks
1788 in pathname arguments.
1790 b. When `set' is called without options, it prints function defintions in a
1791 way that allows them to be reused as input. This affects `declare' and
1792 `declare -p' as well.
1794 4. New Features in Readline
1796 a. New application-callable function rl_set_prompt(const char *prompt):
1797 expands its prompt string argument and sets rl_prompt to the result.
1799 b. New application-callable function rl_set_screen_size(int rows, int cols):
1800 public method for applications to set readline's idea of the screen
1803 c. The history example program (examples/histexamp.c) is now built as one
1806 ------------------------------------------------------------------------------
1807 This document details the changes between this version, bash-2.05-alpha1,
1808 and the previous version, bash-2.04-release.
1812 a. A fix was made to allow newlines in compond array assignments.
1814 b. configure now checks for real-time signals with unusable values.
1816 c. Interactive shells no longer exit if a substitution fails because of an
1817 unset variable within a sourced file.
1819 d. Fixed a problem with incorrect matching of extended glob patterns when
1820 doing pattern substitution.
1822 e. `{' is now quoted by the completion code when it appears in a filename.
1824 f. Fixed an error in pattern matching that caused the matcher to not
1825 correctly skip the rest of a bracket expression after a character
1828 g. Fixed a bug in the IFS word splitting code to make a non-whitespace IFS
1829 character preceded by IFS whitespace part of the current delimiter rather
1830 than generating a separate field.
1832 h. The {!prefix@} expansion now generates separate words, analogous to $@,
1835 i. Command substitution now ignores NUL bytes in the command output, and the
1836 parser ignores them on input.
1838 j. A fix was made to the job control code to prevent hanging processes when
1839 the shell thinks background processes are running but the kernel returns
1840 -1/ECHILD from waitpid().
1842 k. `pwd' now prints an error message if the write fails when displaying the
1845 l. When in POSIX mode, the shell prints trap dispostions without a leading
1846 `SIG' in the signal specification.
1848 m. Fixed a parser bug that caused the current command's line count to be
1849 messed up by a compound array assignment.
1851 n. Fixed a bug in the unwind-protect code that caused bad behavior on machines
1852 where ints and pointers are not the same size.
1854 o. System-specific configure changes for: MacOS X.
1856 p. Changes for Cygwin to translate \r\n and \r to \n and to set file
1857 descriptors used for reading input to text mode in various places.
1859 q. Fixed a bug that caused `!' to occasionally not be honored when in
1862 r. Bash no longer assumes that getcwd() will return any useful error message
1863 in the buffer passed as an argument if the call fails.
1865 s. The `source', `.', and `fc' builtins no longer check whether a file is
1866 binary before reading commands from it.
1868 t. Subshells no longer turn off job control when they exit, since that
1869 sometimes resulted in the terminal being reset to the wrong process
1872 u. The history code no longer tries to save the second and subsequent lines
1873 of a multi-line command if the first line was not saved.
1875 v. The history saving code now does a better job of saving blank lines in a
1878 w. Removed a `feature' that made `ulimit' silently translate `unlimited' to
1879 the current hard limit, which obscured some kernel error returns.
1881 x. Fixed the grammar so that `}' is recognized as a reserved word after
1882 another reserved word, rather than requiring a `;' or newline. This
1883 means that constructs like
1885 { { echo a b c ; } }
1889 y. Conditional commands ([[...]]) now perform tilde expansion on their
1892 z. Noted in the documentation that `set -a' will cause functions to be
1893 exported if they are defined after `set -a' is executed.
1895 aa. When an interactive login shell starts, if $PWD and $HOME refer to the
1896 same directory but are not the same string, $PWD is set to $HOME.
1898 bb. Fixed `printf' to handle invalid floating point numbers better.
1900 cc. Temporary files are now created with random filenames, to improve security.
1902 dd. The readline initialization code now binds the custom bash functions and
1903 key bindings after the readline defaults are set up.
1905 ee. Fixed the `source' builtin to no longer overwrite a shell function's
1906 argument list, even if the sourced file changes the positional parameters.
1908 ff. A bug fix was made in the expansion of `$*' in contexts where it should
1909 not be split, like assignment statements.
1911 gg. Fixed a bug in the parameter substring expansion to handle conditional
1912 arithmetic expressions ( exp ? val1 : val2 ) without cutting the expression
1913 off at the wrong `:'.
1915 hh. The `<>' redirection is no longer subject to the current setting of
1916 `noclobber', as POSIX.2 specifies.
1918 ii. Fixed a bug in the conditional command parsing code that caused expressions
1919 in parentheses to occasionally be parsed incorrectly.
1921 jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or
1922 {...} to follow the )) without an intervening list terminator.
1924 kk. `printf' now treats `\E' the same as `\e' when performing backslash escape
1925 expansion for the `%b' format specifier.
1927 ll. When in POSIX mode, the shell no longer searches the current directory for
1928 a file to be sourced with `.' or `source' if `.' is not in $PATH.
1930 mm. Interactive comments are no longer turned off when POSIX mode is disabled.
1932 nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's
1933 environment when it starts up.
1935 oo. Fixed a bug in the `command' builtin so the effect of a command like
1936 `command exec 4<file' is as if the `command' had been omitted.
1938 pp. ${foo[@]} and ${foo[*]} now work as in ksh93 if `foo' is not an array
1941 qq. ${#foo[X]}, where X is 0, @, or *, now work as in ksh93 if `foo' is not
1944 rr. The shell's idea of an absolute pathname now takes into account a
1945 possible drive specification on Cygwin and other Windows systems.
1947 ss. Fixed a bug which caused incorrect parsing of some multi-character
1948 constructs if they were split across input lines with backslash-newline
1951 tt. Fixed a bug that caused restricted shell mode to be set inappropriately
1952 when trying to execute a shell script without a leading `#!'.
1954 uu. Shell function definitions no longer require that the body be a group
1955 command ( {...} ), as POSIX.2 requires.
1957 vv. The `cd' and `pwd' builtins now process symlinks in pathnames internally
1958 and should require many fewer calls to getcwd().
1960 ww. Fixed a bug that caused a pipeline's process group to be set incorrectly
1961 if one of the pipeline elements contained a command substitution.
1963 xx. Fixed a bug that caused core dumps when expanding the value of HISTIGNORE.
1965 yy. The output of `set' is now quoted using $'...' so invisible characters are
1966 displayed as escape sequences.
1968 zz. Fixed the help text for `unset', since PATH and IFS may both be unset.
1970 aaa. The shell no longer puts directory names into the command hash table.
1972 bbb. Fixed a bug in `read' that caused it to occasionally free memory twice if
1973 it was interrupted after reading a large amount of data.
1975 ccc. Assignment statements that attempt to assign values to readonly variables
1976 now cause the command to return an error status.
1978 ddd. Fixed a bug that could cause incorrect output if a $(<file) construct was
1981 eee. GROUPS and FUNCNAME now return an error status when assignment is
1982 attempted, but may be unset (in which case they lose their special
1983 properties). In all respects except unsetting, they are readonly.
1985 fff. The string-to-integer conversion code now ignores trailing whitespace in
1986 the string, even if strtol(3) does not.
1988 ggg. The tcsh magic-space function now does a better job of inserting the
1989 space close to where the point was before the history expansion, rather
1990 than just appending it.
1992 hhh. Fixed a bug which caused a file sourced from an interactive shell to
1993 fill up the jobs table if it ran lots of jobs.
1995 iii. Fixed a bug in the parameter pattern substitution code to avoid infinite
1996 recursion on zero-length matches.
1998 2. Changes to Readline
2000 a. When setting the terminal attributes on systems using `struct termio',
2001 readline waits for output to drain before changing the attributes.
2003 b. A fix was made to the history word tokenization code to avoid attempts to
2004 dereference a null pointer.
2006 c. Readline now defaults rl_terminal_name to $TERM if the calling application
2007 has left it unset, and tries to initialize with the resultant value.
2009 d. Instead of calling (*rl_getc_function)() directly to get input in certain
2010 places, readline now calls rl_read_key() consistently.
2012 e. Fixed a bug in the completion code that allowed a backslash to quote a
2013 single quote inside a single-quoted string.
2015 f. rl_prompt is no longer assigned directly from the argument to readline(),
2016 but uses memory allocated by readline. This allows constant strings to
2017 be passed to readline without problems arising when the prompt processing
2018 code wants to modify the string.
2020 g. Fixed a bug that caused non-interactive history searches to return the
2021 wrong line when performing multiple searches backward for the same string.
2023 h. Many variables, function arguments, and function return values are now
2024 declared `const' where appropriate, to improve behavior when linking with
2027 i. The control character detection code now works better on systems where
2028 `char' is unsigned by default.
2030 j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
2032 k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been
2033 replaced with a set of specific prototyped typedefs, though they are
2034 still in the readline header files for backwards compatibility.
2036 m. Nearly all of the (undocumented) internal global variables in the library
2037 now have an _rl_ prefix -- there were a number that did not, like
2038 screenheight, screenwidth, alphabetic, etc.
2040 n. The ding() convenience function has been renamed to rl_ding(), though the
2041 old function is still defined for backwards compatibility.
2043 o. The completion convenience functions filename_completion_function,
2044 username_completion_function, and completion_matches now have an rl_
2045 prefix, though the old names are still defined for backwards compatibility.
2047 p. The functions shared by readline and bash (linkage is satisfied from bash
2048 when compiling with bash, and internally otherwise) now have an sh_ prefix.
2050 q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so
2051 that the `soname' contains only the major version number rather than the
2052 major and minor numbers.
2054 r. Fixed a redisplay bug that occurred when the prompt spanned more than one
2055 physical line and contained invisible characters.
2057 3. New Features in Bash
2059 a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
2060 per the new GNU coding standards.
2062 b. The /dev/tcp and /dev/udp redirections now accept service names as well as
2065 c. `complete' and `compgen' now take a `-o value' option, which controls some
2066 of the aspects of that compspec. Valid values are:
2068 default - perform bash default completion if programmable
2069 completion produces no matches
2070 dirnames - perform directory name completion if programmable
2071 completion produces no matches
2072 filenames - tell readline that the compspec produces filenames,
2073 so it can do things like append slashes to
2074 directory names and suppress trailing spaces
2076 4. New Features in Readline
2078 a. The blink timeout for paren matching is now settable by applications.
2080 b. _rl_executing_macro has been renamed to rl_executing_macro, which means
2081 it's now part of the public interface.
2083 c. Readline has a new variable, rl_readline_state, which is a bitmap that
2084 encapsulates the current state of the library; intended for use by
2085 callbacks and hook functions.
2087 ------------------------------------------------------------------------------
2088 This document details the changes between this version, bash-2.04-release,
2089 and the previous version, bash-2.04-beta5.
2093 a. Better compile-time and configure-time checks for the necessity of
2096 b. A bug was fixed in the expansion of "${@:-}" when there are positional
2099 c. A typo was fixed in the output of `complete'.
2101 d. The matches generated for a word by the `-W' argument to complete and
2102 compgen are now matched against the word being completed, and only
2103 matches are returned as the result.
2105 e. Some fixes were made for systems which do not restart read(2) when a
2106 signal caught by bash is received.
2108 f. A bug was fixed which caused the umask to be set to 0 when an invalid
2109 symbolic mode mask was parsed.
2111 g. Fixed a bug that could cause a core dump if a SIGCHLD was received while
2112 performing an assignment statement using command substitution.
2114 h. Changed the word splitting function for programmable completion so cases
2115 in which the cursor is between words are handled a bit better.
2117 2. Changes to Readline
2119 a. rl_funmap_names() is now documented.
2121 3. New Features in Bash
2123 a. The LC_NUMERIC variable is now treated specially, and used to set the
2124 LC_NUMERIC locale category for number formatting, e.g., when `printf'
2125 displays floating-point numbers.
2127 ------------------------------------------------------------------------------
2128 This document details the changes between this version, bash-2.04-beta5,
2129 and the previous version, bash-2.04-beta4.
2133 a. A couple of changes were made to the Makefiles for easier building on
2136 b. Fixed a bug where the current prompt would be set to $PS2 at startup.
2138 c. The shell script that tests an already-installed version was changed to
2139 remove the directory it created its test programs in at exit.
2141 d. Several changes were made to the code that tokenizes an input line for
2142 the programmable completion code. Shell metacharacters will now appear
2143 as individual words in the word list passed to the completion functions.
2144 Some of the example completion shell functions were changed to understand
2145 redirection operators.
2147 e. A bug was fixed that, under obscure circumstances, could confuse the
2148 parser when a shell function was run by the programmable completion code.
2150 f. A bug was fixed in the ulimit builtin for systems not using getrlimit().
2152 g. The execution code now propagates the correct exit status back to the rest
2153 of the code if the return value of a subshell command was being inverted.
2154 Some new test cases for inverting return values with the `!' reserved
2155 word have been added.
2157 h. Negative exponents in the arithmetic evaluation of v**e now return an
2160 i. A bug that caused bash to check the wrong process in a pipeline for
2161 abnormal termination (and consequently resetting the terminal attributes)
2164 j. Fixed a bug that caused $PS2 to be displayed after PROMPT_COMMAND was
2167 2. Changes to Readline
2169 1. Fixed a bug in a C preprocessor define that caused the keypad control
2170 functions to be compiled out for all platforms except DJGPP.
2172 ------------------------------------------------------------------------------
2173 This document details the changes between this version, bash-2.04-beta4,
2174 and the previous version, bash-2.04-beta3.
2178 a. A couple of changes were made to the redirection to attempt to avoid
2179 race conditions and malicious file replacement.
2181 2. A change was made to the string evaluation code (used for command
2182 substitution, `eval', and the `.' builtin) to fix an obscure core
2183 dump on alpha machines.
2185 3. A bug that caused $LINENO to be wrong when executing arithmetic for
2188 4. A couple of memory leaks in the programmable completion code were fixed.
2190 5. A bug that could cause a core dump by freeing memory twice during a call
2191 to `eval' if `set -u' had been enabled and an undefined variable was
2192 referenced was fixed.
2194 ------------------------------------------------------------------------------
2195 This document details the changes between this version, bash-2.04-beta3,
2196 and the previous version, bash-2.04-beta2.
2200 a. Bash should run the appropriate startup files when invoked by ssh2.
2202 b. Fixed a bug in the parsing of conditional commands that could cause a
2205 c. Fixed a bug in parsing job specifications that occasionally caused
2206 core dumps when an out-of-range job was referenced.
2208 d. Fixed the `type' and `command' builtins to do better reporting of
2209 commands that are not found in $PATH or the hash table.
2211 e. Fixed a POSIX.2 compliance problem in the command builtin -- commands
2212 are supposed to be reported as full pathnames.
2214 f. The `echo' builtin now returns failure if a write error occurs.
2216 g. Fixed a bug which caused the locale to not be reset correctly when
2219 h. Changed description of `getopts' in man page and reference manual to make
2220 it clear that option characters may be characters other than letters.
2222 i. If the shell exits while in a function, make sure that any trap on EXIT
2223 doesn't think the function is still executing.
2225 j. Bashbug now tries harder to find a usable editor if $EDITOR is not set,
2226 rather than simply defaulting to `emacs'.
2228 k. Changes to the scripts that guess and canonicalize the system type, from
2229 the latest `automake' distribution via Debian.
2231 l. When using named pipes for process substitution, make sure the file
2232 descriptors opened for reading are set to non-blocking mode.
2234 m. Fixed a bug that caused termination of pipelines that are killed by a
2235 signal to not be reported in some cases.
2237 n. When not in literal-history mode, shell comment lines are not added to
2240 o. When running in POSIX.2 mode, bash no longer performs word splitting on
2241 the expanded value of the word supplied as the filename argument to
2242 redirection operators.
2244 p. The prompt string decoding code now backslash-quotes only characters that
2245 are special within double quotes when expanding the \w and \W escape
2248 q. Fixed a bug in the prompt decoding code that could cause a non-interactive
2249 shell to seg fault if `\u' was used in PS4 and the shell was in xtrace
2252 r. Fixed a bug that caused function definitions to be printed with any
2253 redirections that should be attached to the entire function before the
2256 s. Changed the tilde expansion code for Cygwin systems to avoid creating
2257 pathnames beginning with `//' if $HOME == `/'.
2259 t. Fixed a couple of autoconf tests to avoid creating files with fixed names
2262 u. The `trap' and `kill' builtins now know the names of the POSIX.1b real-
2263 time signals on systems which support them.
2265 2. Changes to Readline
2267 a. Fixed a problem with the single-quote quoting function that could cause
2270 b. Fixed a bug that caused incorrect `stat characters' to be printed if
2271 the files being completed were in the root directory and visible-stats
2274 3. New Features in Bash
2276 a. There is a new `rbash.1' manual page, from the Debian release.
2278 b. The `--enable-usg-echo-default' option to `configure' has been renamed to
2279 `--enable-xpg-echo-default'. The old option is still there for backwards
2282 ------------------------------------------------------------------------------
2283 This document details the changes between this version, bash-2.04-beta2,
2284 and the previous version, bash-2.04-beta1.
2288 a. Fixed a bug that could cause pipes to be closed inappropriately in
2291 b. Fixed a bug that caused creation of the exported environment to clobber
2292 the current command string if there were any exported shell functions.
2294 c. Some changes were made to reduce bash's memory usage.
2296 d. Fixed a problem with programmable completion and filenames to be
2297 completed containing quote characters.
2299 e. Changed the code the removes named pipes created for the <(...) and >(...)
2300 expansions to defer removal until after any current shell function has
2303 f. Fixed a bug in `select' which caused it to not handle the `continue'
2306 g. Autoconf tests added for cygwin32 and mingw32.
2308 2. New Features in Bash
2310 a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc'
2311 (which is still there for backwards compatibility).
2313 ------------------------------------------------------------------------------
2314 This document details the changes between this version, bash-2.04-beta1,
2315 and the previous version, bash-2.04-alpha1.
2319 a. Fixed a bug in the programmable completion code that occurred when
2320 trying to complete command lines containing a `;' or `@'.
2322 b. The file descriptor from which the shell is reading a script is now
2323 moved to a file descriptor above the user-addressible range.
2325 c. Changes to `printf' so that it can handle integers beginning with 0
2326 or 0x as octal and hex, respectively.
2328 d. Fixes to the programmable completion code so it handles nonsense like
2329 `compgen -C xyz' gracefully.
2331 e. The shell no longer modifies the signal handler for SIGPROF, allowing
2332 profiling again on certain systems.
2334 f. The shell checks for a new window size, if the user has requested it,
2335 after a process exits due to a signal.
2337 g. Fixed a bug with variables with null values in a program's temporary
2338 environment and the bash getenv() replacement.
2340 h. `declare' and the other builtins that take variable assignments as
2341 arguments now honor `set -a' and mark modified variables for export.
2343 i. Some changes were made for --dump-po-strings mode when writing strings
2344 with embedded newlines.
2346 j. The code that caches export strings from the initial environment now
2347 duplicates the string rather than just pointing into the environment.
2349 k. The filename completion quoting code now uses single quotes by default
2350 if the filename being completed contains newlines, since \<newline>
2351 has a special meaning to the parser.
2353 l. Bash now uses typedefs bits32_t and u_bits32_t instead of int32_t and
2354 u_int32_t, respectively to avoid conflicts on certain Unix versions.
2356 m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x.
2358 n. Fixed a problem with hostname-to-ip-address translation in the
2359 /dev/(tcp|udp)/hostname/port redirection code.
2361 o. The texinfo manual has been reorganized slightly.
2363 p. Filename generation (globbing) range comparisons in bracket expressions
2364 no longer use strcoll(3) even if it is available, since it has unwanted
2365 effects in certain locales.
2367 q. Fixed a cosmetic problem in the source that caused the shell to not
2368 compile if DPAREN_ARITHMETIC was not defined but ARITH_FOR_COMMAND was.
2370 r. Fixed a bug in the here-document code tripped when the file descriptor
2371 opened to the file containing the text of the here document was the
2372 same as a redirector specified by the user.
2374 s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline'
2375 in `time ! pipeline'.
2377 t. Fixed a bug with the `wait' builtin which manifested itself when an
2378 interrupt was received while the shell was waiting for asynchronous
2379 processes in a shell script.
2381 u. Fixed the DEBUG trap code so that it has the correct value of $?.
2383 v. Fixed a bug in the parameter pattern substitution code that could cause
2384 the shell to attempt to free unallocated memory if the pattern started
2385 with `/' and an expansion error occurs.
2387 w. Fixed a bug in the positional parameter substring code that could
2388 cause the shell to loop freeing freed memory.
2390 x. Fixed a bug in the positional parameter pattern substitution code so
2391 that it correctly handles null replacement strings with a pattern
2392 string prefixed with `%' or `#'.
2394 y. The shell no longer attempts to import functions from the environment if
2397 z. Fixed a bug that caused `return' in a command substitution executed in
2398 a shell function to return from the function in a subshell and continue
2401 aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell
2404 bb. The wait* job control functions now behave better if called when there
2405 are no unwaited-for children.
2407 cc. Command substitution no longer unconditionally disables job control in
2408 the subshell started to run the command.
2410 dd. A bug was fixed that occasionally caused traps to mess up the parser
2413 ee. `bashbug' now honors user headers in the mail message it sends.
2415 ff. A bug was fixed that caused the `:p' history modifier to not print the
2416 history expansion if the `histverify' option was set.
2418 2. Changes to Readline
2420 a. Fixed a bug in the redisplay code for lines with more than 256 line
2423 b. A bug was fixed which caused invisible character markers to not be
2424 stripped from the prompt string if the terminal was in no-echo mode.
2426 c. Readline no longer tries to get the variables it needs for redisplay
2427 from the termcap entry if the calling application has specified its
2428 own redisplay function. Readline treats the terminal as `dumb' in
2431 d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
2432 sequences is redrawn correctly.
2434 3. New Features in Bash
2436 a. `bashbug' now accepts `--help' and `--version' options.
2438 b. There is a new `xpg_echo' option to `shopt' that controls the behavior
2439 of echo with respect to backslash-escaped characters at runtime.
2441 ------------------------------------------------------------------------------
2442 This document details the changes between this version, bash-2.04-alpha1,
2443 and the previous version, bash-2.04-devel.
2447 a. Fixed a bug that could cause core dumps when performing substring
2450 b. Shared object configuration changes for: Solaris, OSF/1
2452 c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities
2453 for pathname expansion now understands GLOBIGNORE.
2455 d. The code that implements `eval' was changed to save the value of the
2456 current prompt, so an eval in a shell function called by the programmable
2457 completion code will not change the prompt to $PS2.
2459 e. Restored the undocumented NON_INTERACTIVE_LOGIN_SHELLS #define to
2460 config-top.h. If this is defined, all login shells will read the
2461 startup files, not just interactive and non-interactive started with
2462 the `--login' option.
2464 f. Fixed a bug that caused the expansion code to occasionally dump core if
2465 IFS contained characters > 128.
2467 g. Fixed a problem with the grammar so that a newline is not required
2468 after the `))' in the new-style arithmetic for statement; a semicolon
2469 may be used as expected.
2471 h. Variable indirection may now reference the shell's special variables.
2473 i. The $'...' and $"..." constructs are now added to the history correctly
2474 if they contain newlines and command-oriented history is enabled.
2476 j. It is now an error to try to assign a value to a function-local copy
2477 of a readonly shell variable (declared with the `local' builtin).
2479 2. Changes to Readline
2481 a. The history file code now uses O_BINARY mode when reading and writing
2482 the history file on cygwin32.
2484 3. New Features in Bash
2486 a. A new programmable completion facility, with two new builtin commands:
2487 complete and compgen.
2489 b. configure has a new option, `--enable-progcomp', to compile in the
2490 programmable completion features (enabled by default).
2492 c. `shopt' has a new option, `progcomp', to enable and disable programmable
2493 completion at runtime.
2495 d. Unsetting HOSTFILE now clears the list of hostnames used for completion.
2497 4. New Features in Readline
2499 a. A new variable, rl_gnu_readline_p, always 1. The intent is that an
2500 application can verify whether or not it is linked with the `real'
2501 readline library or some substitute.
2503 ------------------------------------------------------------------------------
2504 This document details the changes between this version, bash-2.04-devel,
2505 and the previous version, bash-2.03-release.
2509 a. System-specific configuration and source changes for: Interix, Rhapsody
2511 b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if
2512 JOB_CONTROL was not defined.
2514 c. An obscure race condition in the trap code was fixed.
2516 d. The string resulting from $'...' is now requoted to avoid any further
2519 e. The $'...' quoting syntax now allows backslash to escape a single quote,
2520 for ksh-93 compatibility.
2522 f. The $"..." quoting syntax now escapes backslashes and double quotes in
2523 the translated string when displaying them with the --dump-po-strings
2526 g. `echo -e' no longer converts \' to '.
2528 h. Fixes were made to the extended globbing code to handle embedded (...)
2531 i. Some improvements were made to the code that unsets `nodelay' mode on
2532 the file descriptor from which bash is reading input.
2534 j. Some changes were made to the replacement termcap library for better
2535 operation on MS-DOS.
2537 k. Some changes were made to the tilde expansion code to handle backslash
2538 as a pathname separator on MS-DOS.
2540 l. The source has been reorganized a little bit -- there is now an `include'
2541 subdirectory, and lib/posixheaders has been removed.
2543 m. Improvements were made to the `read' builtin so that it makes many
2544 fewer read(2) system calls.
2546 n. The expansion of $- will include `c' and `s' when those options are
2547 supplied at shell invocation.
2549 o. Several improvments were made to the completion code: variable completion
2550 now works better when there are unterminated expansions, command
2551 completion understands quotes better, and completion now works in certain
2552 unclosed $(... constructs.
2554 p. The arithmetic expansion code was fixed to not need the value of a
2555 variable being assigned a value (fixes the "ss=09; let ss=10" bug).
2557 q. Some changes were made to make exported environment creation faster.
2559 r. The html documentation will be installed into $(htmldir) if that variable
2560 has a value when `make install' is run.
2562 s. Fixed a bug that would cause the bashrc file to be sourced inappropriately
2563 when bash is started by sshd.
2565 t. The SSH_CLIENT environment variable is no longer auto-exported.
2567 u. A bug that caused redirections with (...) subshells to be performed in
2568 the wrong order was fixed.
2570 v. A bug that occasionally caused inappropriate expansion of assignment
2571 statements in compound array assignments was fixed.
2573 w. The code that parses the words in a compound array assignment was
2574 simplified considerably and should work better now.
2576 x. Fixes to the non-job-control code in nojobs.c to make it POSIX.2-compliant
2577 when a user attempts to retrieve the status of a terminated background
2580 y. Fixes to the `printf' builtin so that it doesn't try to expand all
2581 backslash escape sequences in the format string before parsing it for
2582 % format specifiers.
2584 2. Changes to Readline
2586 a. The history library tries to truncate the history file only if it is a
2589 b. A bug that caused _rl_dispatch to address negative array indices on
2590 systems with signed chars was fixed.
2592 c. rl-yank-nth-arg now leaves the history position the same as when it was
2595 d. Changes to the completion code to handle MS-DOS drive-letter:pathname
2598 e. Completion is now case-insensitive by default on MS-DOS.
2600 f. Fixes to the history file manipulation code for MS-DOS.
2602 g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
2604 h. Some fixes were made to the redisplay code for better operation on MS-DOS.
2606 i. The quoted-insert code will now insert tty special chars like ^C.
2608 j. A bug was fixed that caused the display code to reference memory before
2609 the start of the prompt string.
2611 k. More support for __EMX__ (OS/2).
2613 l. A bug was fixed in readline's signal handling that could cause infinite
2614 recursion in signal handlers.
2616 m. A bug was fixed that caused the point to be less than zero when rl_forward
2617 was given a very large numeric argument.
2619 n. The vi-mode code now gets characters via the application-settable value
2620 of rl_getc_function rather than calling rl_getc directly.
2622 3. New Features in Bash
2624 a. The history builtin has a `-d offset' option to delete the history entry
2625 at position `offset'.
2627 b. The prompt expansion code has two new escape sequences: \j, the number of
2628 active jobs; and \l, the basename of the shell's tty device name.
2630 c. The `bind' builtin has a new `-x' option to bind key sequences to shell
2633 d. There is a new shell option, no_empty_command_completion, which, when
2634 enabled, disables command completion when TAB is typed on an empty line.
2636 e. The `help' builtin has a `-s' option to just print a builtin's usage
2639 f. There are several new arithmetic operators: id++, id-- (variable
2640 post-increment/decrement), ++id, --id (variabl pre-increment/decrement),
2641 expr1 , expr2 (comma operator).
2643 g. There is a new ksh-93 style arithmetic for command:
2644 for ((expr1 ; expr2; expr3 )); do list; done
2646 h. The `read' builtin has a number of new options:
2647 -t timeout only wait timeout seconds for input
2648 -n nchars only read nchars from input instead of a full line
2649 -d delim read until delim rather than newline
2650 -s don't echo input chars as they are read
2652 i. The redirection code now handles several filenames specially:
2653 /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
2654 not they are present in the file system.
2656 j. The redirection code now recognizes pathnames of the form
2657 /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
2658 of the appropriate type to the specified port on the specified host.
2660 k. The ksh-93 ${!prefix*} expansion, which expands to the names of all
2661 shell variables whose names start with prefix, has been implemented.
2663 l. There is a new dynamic variable, FUNCNAME, which expands to the name of
2664 a currently-executing function. Assignments to FUNCNAME have no effect.
2666 m. The GROUPS variable is no longer readonly; assignments to it are silently
2667 discarded. This means it can be unset.
2669 4. New Features in Readline
2671 a. Parentheses matching is now always compiled into readline, and enabled
2672 or disabled when the value of the `blink-matching-paren' variable is
2675 b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
2677 c. MS-DOS systems now use ~/_history as the default history file.
2679 d. history-search-{forward,backward} now leave the point at the end of the
2680 line when the string to search for is empty, like
2681 {reverse,forward}-search-history.
2683 e. history-search-{forward,backward} now leave the last history line found
2684 in the readline buffer if the second or subsequent search fails.
2686 f. New function for use by applications: rl_on_new_line_with_prompt, used
2687 when an application displays the prompt itself before calling readline().
2689 g. New variable for use by applications: rl_already_prompted. An application
2690 that displays the prompt itself before calling readline() must set this to
2693 ------------------------------------------------------------------------------
2694 This document details the changes between this version, bash-2.03-release,
2695 and the previous version, bash-2.03-beta2.
2699 a. A file descriptor leak in the `fc' builtin was fixed.
2701 b. A bug was fixed in the `read' builtin that caused occasional spurious
2702 failures when using `read -e'.
2704 c. The version code needed to use the value of the cpp variable
2705 CONF_MACHTYPE rather than MACHTYPE.
2707 d. A new test was added to exercise the command printing and copying code.
2709 e. A bug was fixed that caused `time' to be recognized as a reserved word
2710 if it was the first pattern in a `case' statement pattern list.
2712 ------------------------------------------------------------------------------
2713 This document details the changes between this version, bash-2.03-beta2,
2714 and the previous version, bash-2.03-beta1.
2718 a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2.
2720 b. config.{guess,sub} support added for the NEC SX4.
2722 c. Changed some of the cross-compiling sections of the configure macros in
2723 aclocal.m4 so that configure won't abort.
2725 d. Slight changes to how the HTML versions of the bash and readline manuals
2728 e. Fixed conditional command printing to avoid interpreting printf `%'-escapes
2731 f. Don't include the bash malloc on all variants of the alpha processor.
2733 g. Changes to configure to make --enable-profiling work on Solaris 2.x.
2735 h. Fixed a bug that manifested itself when shell functions were called
2736 between calls to `getopts'.
2738 i. Fixed pattern substitution so that a bare `#'as a pattern causes the
2739 replacement string to be prefixed to the search string, and a bare
2740 `%' causes the replacement string to be appended to the search string.
2742 j. Fixed a bug in the command execution code that caused child processes
2743 to occasionally have the wrong value for $!.
2745 2. Changes to Readline
2747 a. Added code to the history library to catch history substitutions using
2748 `&' without a previous history substitution or search having been
2751 3. New Features in Bash
2753 4. New Features in Readline
2755 a. New bindable variable: `isearch-terminators'.
2757 b. New bindable function: `forward-backward-delete-char' (unbound by default).
2759 ------------------------------------------------------------------------------
2760 This document details the changes between this version, bash-2.03-beta1,
2761 and the previous version, bash-2.03-alpha.
2765 a. A change was made to the help text for `{...}' to make it clear that a
2766 semicolon is required before the closing brace.
2768 b. A fix was made to the `test' builtin so that syntax errors cause test
2769 to return an exit status > 1.
2771 c. Globbing is no longer performed on assignment statements that appear as
2772 arguments to `assignment builtins' such as `export'.
2774 d. System-specific configuration changes were made for: Rhapsody,
2775 AIX 4.2/gcc, BSD/OS 4.0.
2777 e. New loadable builtins: ln, unlink.
2779 f. Some fixes were made to the globbing code to handle extended glob patterns
2780 which immediately follow a `*'.
2782 g. A fix was made to the command printing code to ensure that redirections
2783 following compound commands have a space separating them from the rest
2786 h. The pathname canonicalization code was changed to produce fewer leading
2787 `//' sequences, since those are interpreted as network file system
2788 pathnames on some systems.
2790 i. A fix was made so that loops containing `eval' commands in commands passed
2791 to `bash -c' would not exit prematurely.
2793 j. Some changes were made to the job reaping code when the shell is not
2794 interactive, so the shell will retain exit statuses longer for examination
2797 k. A fix was made so that `jobs | command' works again.
2799 l. The erroneous compound array assignment var=((...)) is now a syntax error.
2801 m. A change was made to the dynamic loading code in `enable' to support
2804 n. A fix was made to the globbing code so that extended globbing patterns
2805 will correctly match `.' in a bracket expression.
2807 2. Changes to Readline
2809 a. A fix was made to the completion code in which a typo caused the wrong
2810 value to be passed to the function that computed the longest common
2811 prefix of the list of matches.
2813 b. The completion code now checks the value of rl_filename_completion_desired,
2814 which is set by application-supplied completion functions to indicate
2815 that filename completion is being performed, to decide whether or not to
2816 call an application-supplied `ignore completions' function.
2818 3. New Features in Bash
2820 a. A change was made to the startup file code so that any shell begun with
2821 the `--login' option, even non-interactive shells, will source the login
2822 shell startup files.
2824 4. New Features in Readline
2826 a. A new variable, rl_erase_empty_line, which, if set by an application using
2827 readline, will cause readline to erase, prompt and all, lines on which the
2828 only thing typed was a newline.
2830 ------------------------------------------------------------------------------
2831 This document details the changes between this version, bash-2.03-alpha,
2832 and the previous version, bash-2.02.1-release.
2836 a. System-specific configuration changes were made for: Irix 6.x, Unixware 7.
2838 b. The texi2dvi and texi2html scripts were updated to the latest versions
2841 c. The configure tests that determine which native type is 32 bits were
2842 changed to not require a compiled program.
2844 d. Fixed a bug in shell_execve that could cause memory to be freed twice
2845 after a failed exec.
2847 e. The `printf' test uses `diff -a' if it's available to prevent confusion
2848 due to the non-ascii output.
2850 f. Shared object configuration is now performed by a shell script,
2851 support/shobj-conf, which generates values to be substituted into
2852 makefiles by configure.
2854 g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a
2857 h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar
2858 handling of RLIMIT_FILESIZE.
2860 i. Some new loadable builtins were added: id, printenv, sync, whoami, push,
2861 mkdir. `pushd', `popd', and `dirs' can now be built as regular or
2862 loadable builtins from the same source file.
2864 j. Changes were made to `printf' to handle NUL bytes in the expanded format
2867 k. The various `make clean' Makefile targets now descend into lib/sh.
2869 l. The `type' builtin was changed to use the internal `getopt' so that things
2870 like `type -ap' work as expected.
2872 m. There is a new configuration option, --with-installed-readline, to link
2873 bash with a locally-installed version of readline. Only readline version
2874 4.0 and later releases can support this. Shared and static libraries
2875 are supported. The installed include files are used.
2877 n. There is a new autoconf macro used to find which basic type is 64 bits.
2879 o. Dynamic linking and loadable builtins should now work on SCO 3.2v5*,
2880 AIX 4.2 with gcc, Unixware 7, and many other systems using gcc, where
2881 the `-shared' options works correctly.
2883 p. A bug was fixed in the bash filename completion code that caused memory to
2884 be freed twice if a directory name containing an unset variable was
2885 completed and the -u option was set.
2887 q. The prompt expansion code now quotes the `$' in the `\$' expansion so it
2888 is not processed by subsequent parameter expansion.
2890 r. Fixed a parsing bug that caused a single or double quote after a `$$' to
2891 trigger ANSI C expansion or locale translation.
2893 s. Fixed a bug in the globbing code that caused quoted filenames containing
2894 no globbing characters to sometimes be incorrectly expanded.
2896 t. Changes to the default prompt strings if prompt string decoding is not
2897 compiled into the shell.
2899 u. Added `do', `then', `else', `{', and `(' to the list of keywords that may
2900 precede the `time' reserved word.
2902 v. The shell may now be cross-built for BeOS as well as cygwin32.
2904 w. The conditional command execution code now treats `=' the same as `=='
2905 for deciding when to perform pattern matching.
2907 x. The `-e' option no longer causes the shell to exit if a command exits
2908 with a non-zero status while running the startup files.
2910 y. The `printf' builtin no longer dumps core if a modifier is supplied in
2911 the format string without a conversion character (e.g. `%h').
2913 z. Array assignments of the form a=(...) no longer show up in the history
2916 aa. The parser was fixed to obey the POSIX.2 rules for finding the closing
2917 `}' in a ${...} expression.
2919 bb. The history file is now opened with mode 0600 rather than 0666, so bash
2920 no longer relies on the user's umask being set appropriately.
2922 cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now
2923 relies on proper behavior from the C library.
2925 dd. Minor changes were made to allow quoted variable expansions using
2926 ${...} to be completed correctly if there is no closing `"'.
2928 ee. Changes were made to builtins/Makefile.in so that configuring the shell
2929 with `--enable-profiling' works right and builtins/mkbuiltins is
2932 2. Changes to Readline
2934 a. The version number is now 4.0.
2936 b. There is no longer any #ifdef SHELL code in the source files.
2938 c. Some changes were made to the key binding code to fix memory leaks and
2939 better support Win32 systems.
2941 d. Fixed a silly typo in the paren matching code -- it's microseconds, not
2944 e. The readline library should be compilable by C++ compilers.
2946 f. The readline.h public header file now includes function prototypes for
2947 all readline functions, and some changes were made to fix errors in the
2948 source files uncovered by the use of prototypes.
2950 g. The maximum numeric argument is now clamped at 1000000.
2952 h. Fixes to rl_yank_last_arg to make it behave better.
2954 i. Fixed a bug in the display code that caused core dumps if the prompt
2955 string length exceeded 1024 characters.
2957 j. The menu completion code was fixed to properly insert a single completion
2958 if there is only one match.
2960 k. A bug was fixed that caused the display code to improperly display tabs
2963 3. New Features in Bash
2965 a. New `shopt' option, `restricted_shell', indicating whether or not the
2966 shell was started in restricted mode, for use in startup files.
2968 b. Filename generation is now performed on the words between ( and ) in
2969 array assignments (which it probably should have done all along).
2971 c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
2973 d. ENV and BASH_ENV are read-only variables in a restricted shell.
2975 4. New Features in Readline
2977 a. Many changes to the signal handling:
2978 o Readline now catches SIGQUIT and cleans up the tty before returning;
2979 o A new variable, rl_catch_signals, is available to application writers
2980 to indicate to readline whether or not it should install its own
2981 signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
2982 SIGTTIN, and SIGTTOU;
2983 o A new variable, rl_catch_sigwinch, is available to application
2984 writers to indicate to readline whether or not it should install its
2985 own signal handler for SIGWINCH, which will chain to the calling
2986 applications's SIGWINCH handler, if one is installed;
2987 o There is a new function, rl_free_line_state, for application signal
2988 handlers to call to free up the state associated with the current
2989 line after receiving a signal;
2990 o There is a new function, rl_cleanup_after_signal, to clean up the
2991 display and terminal state after receiving a signal;
2992 o There is a new function, rl_reset_after_signal, to reinitialize the
2993 terminal and display state after an application signal handler
2994 returns and readline continues
2996 b. There is a new function, rl_resize_terminal, to reset readline's idea of
2997 the screen size after a SIGWINCH.
2999 c. New public functions: rl_save_prompt and rl_restore_prompt. These were
3000 previously private functions with a `_' prefix.
3002 d. New function hook: rl_pre_input_hook, called just before readline starts
3003 reading input, after initialization.
3005 e. New function hook: rl_display_matches_hook, called when readline would
3006 display the list of completion matches. The new function
3007 rl_display_match_list is what readline uses internally, and is available
3008 for use by application functions called via this hook.
3010 f. New bindable function, delete-char-or-list, like tcsh.
3012 ------------------------------------------------------------------------------
3013 This document details the changes between this version, bash-2.02.1-release,
3014 and the previous version, bash-2.02-release.
3018 a. A bug that caused the bash readline support to not compile unless aliases
3019 and csh-style history were configured into the shell was fixed.
3021 b. Fixed a bug that could cause a core dump when here documents contained
3022 more than 1000 characters.
3024 c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same
3025 as the current directory when in POSIX mode.
3027 d. Fixed an alignment problem with the memory returned by the bash malloc,
3028 so returned memory is now 64-bit aligned.
3030 e. Fixed a bug that caused command substitutions executed within pipelines
3031 to put the terminal in the wrong process group.
3033 f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop,
3034 Unixware 2, and Unixware 7.
3036 g. Fixes to the pattern matching code to make it work correctly for eight-bit
3039 h. Fixed a problem that occasionally caused the shell to display the wrong
3040 value for the new working directory when changing to a directory found
3041 in $CDPATH when in physical mode.
3043 i. Fixed a bug that caused core dumps when using conditional commands in
3046 j. Fixed a bug that caused the printf builtin to loop forever if the format
3047 string did not consume any of the arguments.
3049 k. Fixed a bug in the parameter expansion code that caused "$@" to be
3050 incorrectly split if $IFS did not contain a space character.
3052 l. Fixed a bug that could cause a core dump when completing hostnames if
3053 the number of matching hostnames was an exact multiple of 16.
3055 m. Fixed a bug that caused the shell to fork too early when a command
3056 such as `%2 &' was given.
3058 2. Changes to Readline
3060 a. Fixed a problem with redisplay that showed up when the prompt string was
3061 longer than the screen width and the prompt contained invisible characters.
3063 ------------------------------------------------------------------------------
3064 This document details the changes between this version, bash-2.02-release,
3065 and the previous version, bash-2.02-beta2.
3069 a. A bug was fixed that caused the terminal process group to be set
3070 incorrectly when performing command substitution of builtins in a
3073 ------------------------------------------------------------------------------
3074 This document details the changes between this version, bash-2.02-beta2,
3075 and the previous version, bash-2.02-beta1.
3079 a. Attempting to `wait' for stopped jobs now generates a warning message.
3081 b. Pipelines which exit due to SIGPIPE in non-interactive shells are now
3082 not reported if the shell is compiled -DDONT_REPORT_SIGPIPE.
3084 c. Some changes were made to builtins/psize.sh and support/bashbug.sh to
3085 attempt to avoid some /tmp file races and surreptitious file
3088 d. Fixed a bug that caused the shell not to compile if configured with
3089 dparen arithmetic but without aliases.
3091 e. Fixed a bug that caused the input stream to be switched when assigning
3092 empty arrays with `bash -c'.
3094 f. A bug was fixed in the readline expansion glue code that caused bash to
3095 dump core when expanding lines with an unclosed single quote.
3097 g. A fix was made to the `cd' builtin so that using a non-empty directory
3098 from $CDPATH results in an absolute pathname of the new current working
3099 directory to be displayed after the current directory is changed.
3101 h. Fixed a bug in the variable assignment code that caused the shell to
3102 dump core when referencing an unset variable with `set -u' enabled in
3103 an assignment statement preceding a command.
3105 i. Fixed a bug in the exit trap code that caused reserved words to not be
3106 recognized under certain circumstances.
3108 j. Fixed a bug in the parameter pattern substitution code so that quote
3109 removal is performed.
3111 k. The shell should now configure correctly on Apple Rhapsody systems.
3113 l. The `kill' builtin now prints a usage message if it is not passed any
3116 ------------------------------------------------------------------------------
3117 This document details the changes between this version, bash-2.02-beta1,
3118 and the previous version, bash-2.02-alpha1.
3122 a. A few compilation bugs were fixed in the new extended globbing code.
3124 b. Executing arithmetic commands now sets the command name to `((' so
3125 error messages look right.
3127 c. Fixed some build problems with various configuration options.
3129 d. The `printf' builtin now aborts immediately if an illegal format
3130 character is encountered.
3132 e. The code that creates here-documents now behaves better if the file it's
3133 trying to create already exists for some reason.
3135 f. Fixed a problem with the extended globbing code that made patterns like
3136 `x+*' expand incorrectly.
3138 g. The prompt string expansion code no longer quotes tildes with backslashes.
3140 h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in
3141 the presence of lstat(2) failures.
3143 i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'.
3145 j. The mail checking code now ensures that it has a valid default mailpath.
3147 k. A bug was fixed that caused local variables to be unset inappropriately
3148 when sourcing a script from within another sourced script.
3150 l. A bug was fixed in the history saving code so that functions are saved
3151 in the history list correctly if `cmdhist' is enabled, but `lithist'
3154 m. A bug was fixed that caused printf overflows when displaying error
3157 n. It should be easier to build the loadble builtins in examples/loadables,
3158 though some manual editing of the generated Makefile is still required.
3160 o. The user's primary group is now always ${GROUPS[0]}.
3162 p. Some updates were made to support/config.guess from the GNU master copy.
3164 q. Some changes were made to the autoconf support for Solaris 2.6 large
3167 r. The `command' builtins now does the right thing when confstr(3) cannot
3168 find a value for _CS_PATH.
3170 s. Extended globbing expressions like `*.!(c)' are not history expanded if
3171 `extglob' is enabled.
3173 t. Using the `-P' option to `cd' will force the value that is assigned to
3174 PWD to not contain any symbolic links.
3176 2. Changes to Readline
3178 a. The code that prints completion listings now behaves better if one or
3179 more of the filenames contains non-printable characters.
3181 b. The time delay when showing matching parentheses is now 0.5 seconds.
3183 ------------------------------------------------------------------------------
3184 This document details the changes between this version, bash-2.02-alpha1,
3185 and the previous version, bash-2.01.1-release.
3189 a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x,
3190 Solaris 2.6, SINIX SVR4.
3192 b. Changes were made to the generated `info' files so that `install-info'
3195 c. PWD is now auto-exported.
3197 d. A fix was made to the pipeline code to make sure that the shell forks
3198 to execute simple commands consisting solely of assignment statements.
3200 e. Changes to the test suite for systems with 14-character filenames.
3202 f. The default sizes of some internal hash tables have been made smaller
3203 to reduce the shell's memory footprint.
3205 g. The `((...))' arithmetic command is now executed directly instead of
3206 being translated into `let "..."'.
3208 h. Fixes were made to the expansion code so that "$*", "$@", "${array[@]}",
3209 and "${array[@]}" expand correctly when IFS does not contain a space
3210 character, is unset, or is set to NULL.
3212 i. The indirect expansion code (${!var}) was changed so that the only
3213 valid values of `var' are variable names, positional parameters, `#',
3216 j. An arithmetic expression error in a $((...)) expansion now causes a
3217 non-interactive shell running in posix mode to exit.
3219 k. Compound array assignment now splits the words within the parentheses
3220 on shell metacharacters like the parser would before expansing them
3221 and performing the assignment. This is for compatibility with ksh-93.
3223 l. The internal shell backslash-quoting code (used in the output of `set'
3224 and completion) now quotes tildes if they appear at the start of the
3225 string or after a `=' or `:'.
3227 m. A couple of bugs with `shopt -o' were fixed.
3229 n. `bash +o' now displays the same output as `set +o' before starting an
3232 o. A bug that caused command substitution and the `eval' builtin to
3233 occasionally free memory twice when an error was encountered was fixed.
3235 p. The filename globbing code no longer requires read permission for a
3236 directory when the filename to be matched does not contain any globbing
3237 characters, as POSIX.2 specifies.
3239 q. A bug was fixed so that the job containing the last asynchronous
3240 process is not removed from the job table until a `wait' is executed
3241 for that process or another asynchronous process is started. This
3242 satisfies a POSIX.2 requirement.
3244 r. A `select' bug was fixed so that a non-numeric user response is treated
3245 the same as a numeric response that is out of range.
3247 s. The shell no longer parses the value of SHELLOPTS from the environment
3248 if it is restricted, running setuid, or running in `privileged mode'.
3250 t. Fixes were made to enable large file support on systems such as
3251 Solaris 2.6, where the size of a file may be larger than can be held
3254 u. The filename hashing code was fixed to not add `./' to the beginning of
3255 filenames which already begin with `./'.
3257 v. The configure script was changed so that the GNU termcap library is not
3258 compiled in if `prefer-curses' has been specified.
3260 w. HISTCONTROL and HISTIGNORE are no longer applied to the second and
3261 subsequent lines of a multi-line command.
3263 x. A fix was made to `disown' so that it does a better job of catching
3266 y. Non-interactive shells no longer report the status of processes terminated
3267 due to SIGINT, even if the standard output is a terminal.
3269 z. A bug that caused the output of `jobs' to have extra carriage returns
3272 aa. A bug that caused PIPESTATUS to not be set when builtins or shell
3273 functions were executed in the foreground was fixed.
3275 bb. Bash now attempts to detect when it is being run by sshd, and treats
3276 that case identically to being run by rshd.
3278 cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell
3279 options was changed was fixed.
3281 dd. The `kill' builtin now disallows empty or missing process id arguments
3282 instead of treating them as identical to `0', which means the current
3285 ee. `var=value declare -x var' now behaves identically to
3286 `var=value export var'. Similarly for `var=value declare -r var' and
3287 `var=value readonly var'.
3289 ff. A few memory leaks were fixed.
3291 gg. `alias' and `unalias' now print error messages when passed an argument
3292 that is not an alias for printing or deletion, even when the shell is
3293 not interactive, as POSIX.2 specifies.
3295 hh. `alias' and `alias -p' now return a status of 0 when no aliases are
3296 defined, as POSIX.2 specifes.
3298 ii. `cd -' now prints the pathname of the new working directory if the shell
3301 jj. A fix was made so that the code that binds $PWD now copes with getcwd()
3304 kk. `unset' now checks whether or not a function name it's trying to unset
3305 is a valid shell identifier only when the shell is running in posix mode.
3307 ll. A change was made to the code that generates filenames for here documents
3308 to make them less prone to name collisions.
3310 mm. The parser was changed so that `time' is recognized as a reserved word
3311 only at the beginning of a pipeline.
3313 nn. The pathname canonicalization code was changed so that `//' is converted
3314 into `/', but all other pathnames beginning with `//' are left alone, as
3317 oo. The `logout' builtin will no longer exit a non-interactive non-login
3320 2. Changes to Readline
3322 a. Fixed a problem in the readline test program rltest.c that caused a core
3325 b. The code that handles parser directives in inputrc files now displays
3326 more error messages.
3328 c. The history expansion code was fixed so that the appearance of the
3329 history comment character at the beginning of a word inhibits history
3330 expansion for that word and the rest of the input line.
3332 3. New Features in Bash
3334 a. A new version of malloc, based on the older GNU malloc, that has many
3335 changes, is more page-based, is more conservative with memory usage,
3336 and does not `orphan' large blocks when they are freed.
3338 b. A new version of gmalloc, based on the old GLIBC malloc, with many
3339 changes and range checking included by default.
3341 c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic
3342 Regular Expression matching, including character classes, collating
3343 symbols, equivalence classes, and support for case-insensitive pattern
3346 d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
3347 implemented, controlled by a new `shopt' option, `extglob'.
3349 e. There is a new ksh-like `[[' compound command, which implements
3350 extended `test' functionality.
3352 f. There is a new `printf' builtin, implemented according to the POSIX.2
3355 g. There is a new feature for command substitution: $(< filename) now expands
3356 to the contents of `filename', with any trailing newlines removed
3357 (equivalent to $(cat filename)).
3359 h. There are new tilde prefixes which expand to directories from the
3362 i. There is a new `**' arithmetic operator to do exponentiation.
3364 j. There are new configuration options to control how bash is linked:
3365 `--enable-profiling', to allow bash to be profiled with gprof, and
3366 `--enable-static-link', to allow bash to be linked statically.
3368 k. There is a new configuration option, `--enable-cond-command', which
3369 controls whether or not the `[[' command is included. It is on by
3372 l. There is a new configuration option, `--enable-extended-glob', which
3373 controls whether or not the ksh extended globbing feature is included.
3374 It is enabled by default.
3376 m. There is a new configuration #define in config.h.top that, when enabled,
3377 will cause all login shells to source /etc/profile and one of the user-
3378 specific login shell startup files, whether or not the shell is
3381 n. There is a new invocation option, `--dump-po-strings', to dump
3382 a shell script's translatable strings ($"...") in GNU `po' format.
3384 o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
3385 pattern matching when globbing filenames and using the `case' construct.
3387 p. There is a new `shopt' option, `huponexit', which, when enabled, causes
3388 the shell to send SIGHUP to all jobs when an interactive login shell
3391 q. `bind' has a new `-u' option, which takes a readline function name as an
3392 argument and unbinds all key sequences bound to that function in a
3395 r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
3396 and running jobs, respectively.
3398 s. The `shopt' `-p' option now causes output to be displayed in a reusable
3401 t. `test' has a new `-N' option, which returns true if the filename argument
3402 has been modified since it was last accessed.
3404 u. `umask' now has a `-p' option to print output in a reusable format.
3406 v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
3407 translation code. It expands to the character whose ascii code is NNN
3410 w. The prompt string expansion code has a new `\r' escape sequence.
3412 x. The shell may now be cross-compiled for the CYGWIN32 environment on
3415 4. New Features in Readline
3417 a. There is now an option for `iterative' yank-last-arg handline, so a user
3418 can keep entering `M-.', yanking the last argument of successive history
3421 b. New variable, `print-completions-horizontally', which causes completion
3422 matches to be displayed across the screen (like `ls -x') rather than up
3423 and down the screen (like `ls').
3425 c. New variable, `completion-ignore-case', which causes filename completion
3426 and matching to be performed case-insensitively.
3428 d. There is a new bindable command, `magic-space', which causes history
3429 expansion to be performed on the current readline buffer and a space to
3430 be inserted into the result.
3432 e. There is a new bindable command, `menu-complete', which enables tcsh-like
3433 menu completion (successive executions of menu-complete insert a single
3434 completion match, cycling through the list of possible completions).
3436 f. There is a new bindable command, `paste-from-clipboard', for use on Win32
3437 systems, to insert the text from the Win32 clipboard into the editing
3440 g. The key sequence translation code now understands printf-style backslash
3441 escape sequences, including \NNN octal escapes. These escape sequences
3442 may be used in key sequence definitions or macro values.
3444 h. An `$include' inputrc file parser directive has been added.
3446 ------------------------------------------------------------------------------
3447 This document details the changes between this version, bash-2.01.1-release,
3448 and the previous version, bash-2.01-release.
3452 a. The select command was fixed to check the validity of the user's
3453 input more strenuously.
3455 b. A bug was fixed that prevented `time' from timing commands correctly
3456 when supplied as an argument to `bash -c'.
3458 c. A fix was made to the mail checking code to keep from adding the same
3459 mail file to the list of files to check multiple times when parsing
3462 d. Fixed an off-by-one error in the tilde expansion library.
3464 e. When using the compound array assignment syntax, the old value of
3465 the array is cleared before assigning the new value.
3467 f. Fixed a bug that could cause a core dump when a trap handler was reset
3468 to the default in the trap command associated with that signal.
3470 g. Fixed a bug in the locale code that occurred when assigning a value
3473 h. A change was made to the parser so that words of the form xxx=(...)
3474 are not considered compound assignment statements unless there are
3475 characters before the `='.
3477 i. A fix was made to the command tracing code to correctly quote each
3480 j. Some changes were made to the bash-specific autoconf tests to make them
3483 k. Completion of words with globbing characters now correctly quotes the
3486 l. The directory /var/spool/mail is now preferred to /usr/spool/mail when
3487 configure is deciding on the default mail directory.
3489 m. The brace completion code was fixed to not quote the `{' and `}'.
3491 n. Some fixes were made to make $RANDOM more random in subshells.
3493 o. System-specific changes were made to configure for: SVR4.2
3495 p. Changes were made so that completion of words containing globbing chars
3496 substitutes the result only if a single filename was matched.
3498 q. The window size is now recomputed after a job is stopped with SIGTSTP if
3499 the user has set `checkwinsize' with `shopt'.
3501 r. When doing substring expansion, out-of-range substring specifiers now
3502 cause nothing to be substituted rather than an expansion error.
3504 s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' --
3505 only `EXIT' and `DEBUG' are accepted.
3507 t. The display of trapped signals now uses the signal number if signals
3508 for which bash does not know the name are trapped.
3510 u. A fix was made so that `bash -r' does not turn on restricted mode until
3511 after the startup files are executed.
3513 v. A bug was fixed that occasionally caused a core dump when a variable
3514 found in the temporary environment of export/declare/readonly had a
3517 w. A bug that occasionally caused unallocated memory to be passed to free()
3518 when doing arithmetic substitution was fixed.
3520 x. A bug that caused a buffer overrun when expanding a prompt string
3521 containing `\w' and ${#PWD} exceeded PATH_MAX was fixed.
3523 y. A problem with the completion code that occasionally caused it to
3524 refer to a character before the beginning of the readline line buffer
3527 z. A bug was fixed so that the `read' builtin restarts reads when
3528 interrupted by signals other than SIGINT.
3530 aa. Fixed a bug that caused a command to be freed twice when there was
3531 an evaluation error in the `eval' command.
3533 2. Changes to Readline
3535 a. Added a missing `extern' to a declaration in readline.h that kept
3536 readline from compiling cleanly on some systems.
3538 b. The history file is now opened with mode 0600 when it is written for
3541 c. Changes were made to the SIGWINCH handling code so that prompt redisplay
3544 d. ^G now interrupts incremental searches correctly.
3546 e. A bug that caused a core dump when the set of characters to be quoted
3547 when completing words was empty was fixed.
3549 ------------------------------------------------------------------------------
3550 This document details the changes between this version, bash-2.01-release,
3551 and the previous version, bash-2.01-beta2.
3555 a. The `distclean' target should remove the `printenv' executable if it
3558 b. The test suite was changed slightly to ensure that the error messages
3559 are printed in English.
3561 c. A bug that caused the shell to dump core when a filename containing a
3562 `/' was passed to `hash' was fixed.
3564 d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1
3567 e. A memory leak when completing commands was fixed.
3569 f. A memory leak that occurred when checking the hash table for commands
3570 with relative paths was fixed.
3572 ------------------------------------------------------------------------------
3573 This document details the changes between this version, bash-2.01-beta2,
3574 and the previous version, bash-2.01-beta1.
3578 a. The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if
3579 the current (soft) limit is less than or equal to the hard limit.
3581 b. Fixed a bug that caused the bash emulation of strcasecmp to produce
3584 c. A bug that caused memory to be freed twice when a trap handler resets
3585 the trap more than once was fixed.
3587 d. A bug that caused machines where sizeof (pointer) > sizeof (int) to
3588 fail (and possibly dump core) when trying to unwind-protect a null
3591 e. The startup files should not be run with job control enabled. This fix
3592 allows SIGINT to once again interrupt startup file execution.
3594 f. Bash should not change the SIGPROF handler if it is set to something
3597 g. The completion code that provides bash-specific completions for readline
3598 now quotes characters that the readline code would treat as word break
3599 characters if they appear in a file name.
3601 h. The completion code now correctly quotes filenames containing a `!',
3602 even if the user attempted to use double quotes when attempting
3605 i. A bug that caused the shell to dump core when `disown' was called without
3606 arguments and there was no current job was fixed.
3608 j. A construct like $((foo);bar) is now processed as a command substitution
3609 rather than as a bad arithmetic substitution.
3611 k. A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist'
3612 shell options when editing and re-executing a series of commands were
3615 l. A fix was made to the grammar -- the list of commands between `do' and
3616 `done' in the body of a `for' command should be treated the same as a
3619 2. Changes to Readline
3621 a. A couple of bugs that caused the history search functions to attempt to
3622 free a NULL pointer were fixed.
3624 b. If the C library provides setlocale(3), readline does not need to look
3625 at various environment variables to decide whether or not to go into
3626 eight-bit mode automatically -- just check whether the current locale
3627 is not `C' or `POSIX'.
3629 c. If the filename completion function finds that a directory was not closed
3630 by a previous (interrupted) completion, it closes the directory with
3633 3. New Features in Bash
3635 a. New bindable readline commands: history-and-alias-expand-line and
3636 alias-expand-line. The code was always in there, there was just no
3639 ------------------------------------------------------------------------------
3640 This document details the changes between this version, bash-2.01-beta1,
3641 and the previous version, bash-2.01-alpha1.
3645 a. Fixed a problem that could cause file descriptors used for process
3646 substitution to conflict with those used explicitly in redirections.
3648 b. Made it easier to regenerate configure if the user changes configure.in.
3650 c. ${GROUPS[0]} should always be the primary group, even on systems without
3653 d. Spelling correction is no longer enabled by default.
3655 e. Fixes to quoting problems in `bashbug'.
3657 f. OS-specific configuration changes were made for: Irix 6.
3659 g. OS-specific code changes were made for: QNX.
3661 h. A more meaningful message is now printed when the file in /tmp for a
3662 here document cannot be created.
3664 i. Many changes to the shell's variable initialization code to speed
3665 non-interactive startup.
3667 j. Changes to the non-job-control code so that it does not try to open
3670 k. The output of `set' and `export' is once again sorted, as POSIX wants.
3672 l. Fixed a problem caused by a recursive call reparsing the value of
3675 m. The tilde code no longer calls getenv() when it's compiled as part of
3676 the shell, which should eliminate problems on systems that cannot
3677 redefine getenv(), like the NeXT OS.
3679 n. Fixed a problem that caused `bash -o' or `bash +o' to not list all
3682 o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit
3683 only if the hard limit is greater than the current (soft) limit.
3685 p. Fixed a problem that arose when building bash in a different directory
3686 than the source and y.tab.[ch] were remade with something other than
3687 bison. This came up most often on NetBSD.
3689 q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated
3690 an unfinished command completion (`/), which generated errors.
3692 r. The bash special tilde expansions (~-, ~+) are now attempted before
3693 calling the standard tilde expansion code, which should eliminate the
3694 problems people have been seeing with this on Solaris 2.5.1.
3696 s. Added support for <stdarg.h> to places where it was missing.
3698 t. Changed the code that reads the output of a command substitution to not
3699 go through stdio. This reduces the memory requirements and is faster.
3701 u. A number of changes to speed up export environment creation were made.
3703 v. A number of memory leaks were fixed as the result of running the test
3704 scripts through Purify.
3706 w. Fixed a bug that caused subshells forked to interpret executable
3707 scripts without a leading `#!' to not reinitialize the values of
3710 2. Changes to Readline
3712 a. History library has less `#ifdef SHELL' code -- abstracted stuff out
3713 into application-specific function hooks.
3715 b. Readline no longer calls getenv() if it's compiled as part of the shell,
3716 which should eliminate problems on systems that cannot redefine getenv(),
3719 c. Fixed translation of ESC when `untranslating' macro values.
3721 d. The region kill operation now fixes the mark if it ends up beyond the
3722 boundaries of the line after the region is deleted.
3724 3. New Features in Bash
3726 a. New argument for `configure': `--with-curses'. This can be used to
3727 override the selection of the termcap library on systems where it is
3730 ------------------------------------------------------------------------------
3731 This document details the changes between this version, bash-2.01-alpha1,
3732 and the previous version, bash-2.0-release.
3736 a. System-specific configuration changes for: FreeBSD, SunOS4, Irix,
3737 MachTen, QNX 4.2, Harris Night Hawk, SunOS5.
3739 b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2,
3742 c. A bug that caused the exec builtin to fail because the full pathname of
3743 the command could not be found was fixed.
3745 d. The code that performs output redirections is now more resistant to
3746 race conditions and possible security exploits.
3748 e. A bug that caused the shell to dump core when performing pattern
3749 substitutions on variable values was fixed.
3751 f. More hosts are now recognized by the auto-configuration mechanism
3752 (OpenBSD, QNX, others).
3754 g. Assignments to read-only variables that attempt to convert them to
3755 arrays are now errors.
3757 h. A bug that caused shell scripts using array assignments in POSIX mode
3758 to exit after the assignment was performed was fixed.
3760 i. The substring expansion code is now more careful about running off the
3761 ends of the expanded variable value.
3763 j. A bug that caused completion to fail if a backquoted command substitution
3764 appeared anywhere on the line was fixed.
3766 k. The `source' builtin no longer turns off history if it has been enabled
3767 in a non-interactive shell.
3769 l. A bug that caused the shell to crash when `disown' was given a pid
3770 instead of a job number was fixed.
3772 m. The `cd' spelling correction code will not try to change to `.' if no
3773 directory entries match a single-character argument.
3775 n. A bad variable name supplied to `declare', `export', or `readonly' no
3776 longer causes a non-interactive shell in POSIX mode to exit.
3778 o. Some fixes were made to the test suite to handle peculiarities of
3779 various Unix versions.
3781 p. The bash completion code now quotes characters that readline would
3782 treat as word breaks for completion but are not shell metacharacters.
3784 q. Bad options supplied at invocation now cause a usage message to be
3787 r. Fixes were made to the code that handles DEBUG traps so that the trap
3788 string is not freed inappropriately.
3790 s. Some changes were made to the bash debugger in examples/bashdb -- it
3791 should be closer to working now.
3793 t. A problem that caused the default filename used for mail checking to be
3796 u. A fix was made to the `echo' builtin so that NUL characters printed with
3797 `echo -e' do not cause the output to be truncated.
3799 v. A fix was made to the job control code so that the shell behaves better
3800 when monitor mode is enabled in a non-interactive shell.
3802 w. Bash no longer catches all of the terminating signals in a non-
3803 interactive shell until a trap is set on EXIT, which should result in
3806 x. A fix was made to the command timing code so that `time' can be used in
3809 y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as
3810 a nested subshell rather than strictly as an (erroneous) arithmetic
3813 z. A fix was made to the globbing code so that it correctly matches quoted
3814 filenames beginning with a `.'.
3816 aa. A bug in `fc' that caused some multi-line commands to not be stored as
3817 one command in the history when they were re-executed after editing
3818 (with `fc -e') was fixed.
3820 bb. The `ulimit' builtin now attempts to catch some classes of integer
3823 cc. The command-oriented-history code no longer attempts to add `;'
3824 inappropriately when a newline appears while reading a $(...) command
3827 dd. A bug that caused the shell to dump core when `help --' was executed
3830 ee. A bug that caused the shell to crash when an unset variable appeared
3831 in the body of a here document after `set -u' had been executed was
3834 ff. Implicit input redirections from /dev/null for asynchronous commands
3835 are now handled better.
3837 gg. A bug that caused the shell to fail to compile when configured with
3838 `--disable-readline' was fixed.
3840 hh. The globbing code should now be interruptible.
3842 ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a
3843 stopped job and adjusts the data structures accordingly, as if `bg' had
3844 been executed instead.
3846 jj. A bug that caused the shell to crash when mixing calls to `getopts'
3847 and `shift' on the same set of positional parameters was fixed.
3849 kk. The command printing code now preserves the `-p' flag to `time'.
3851 ll. The command printing code now handles here documents better when there
3852 are other redirections associated with the command.
3854 mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_)
3855 is no longer placed into the environment of executed commands -- users
3856 of glibc had too many problems with it.
3858 nn. Reorganized the code that generates signames.h. The signal_names list
3859 is now more complete but may be slightly different (SIGABRT is favored
3860 over SIGIOT, for example). The preferred signal names are those
3861 listed in the POSIX.2 standard.
3863 oo. `bashbug' now uses a filename shorter than 14 characters for its
3864 temporary file, and asks for confirmation before sending the bug
3867 pp. A bug that caused TAB completion in vi editing mode to not be turned
3868 off when `set -o posix' was executed or back on when `set +o posix'
3869 was executed was fixed.
3871 qq. A bug in the brace expansion code that caused brace expansions appearing
3872 in new-style $(...) command substitutions to be inappropriately expanded
3875 rr. A bug in the readline hook shell-expand-line that could cause memory to
3876 be inappropriately freed was fixed.
3878 ss. A bug that caused some arithmetic expressions containing `&&' and `||'
3879 to be parsed with the wrong precedence has been fixed.
3881 tt. References to unbound variables after `set -u' has been executed now
3882 cause the shell to exit immediately, as they should.
3884 uu. A bug that caused the shell to exit inappropriately when `set -e' had
3885 been executed and a command's return status was being inverted with the
3886 `!' reserved word was fixed.
3888 vv. A bug that could occasionally cause the shell to crash with a
3889 divide-by-zero error when timing a command was fixed.
3891 ww. A bug that caused parameter pattern substitution to leave stray
3892 backslashes in the replacement string when the expression is in
3893 double quotes was fixed.
3895 xx. The `break' and `continue' builtins now break out of all loops when an
3896 invalid count argument is supplied.
3898 yy. Fixed a bug that caused PATH to be set to the empty string if
3899 `command -p' is executed with PATH unset.
3901 zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix,
3904 aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS
3905 if there were no shell options set.
3907 bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX
3908 mode, their output is as POSIX.2 specifies.
3910 ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually
3911 creates an array variable.
3913 ddd. Fixed a bug that prevented `time' from correctly timing background
3916 2. Changes to Readline
3918 a. A bug that caused an extra newline to be printed when the cursor was on
3919 an otherwise empty line was fixed.
3921 b. An instance of memory being used after it was freed was corrected.
3923 c. The redisplay code now works when the prompt is longer than the screen
3926 d. `dump-macros' is now a bindable name, as it should have been all along.
3928 e. Non-printable characters are now expanded when displaying macros and
3931 f. The `dump-variables' and `dump-macros' commands now output a leading
3932 newline if they're called as the result of a key sequence, rather
3933 than directly by an application.
3935 3. New Features in Bash
3937 a. There is a new builtin array variable: GROUPS, the set of groups to which
3938 the user belongs. This is used by the test suite.
3940 4. New Features in Readline
3942 a. If a key sequence bound to `universal-argument' is read while reading a
3943 numeric argument started with `universal-argument', it terminates the
3944 argument but is otherwise ignored. This provides a way to insert multiple
3945 instances of a digit string, and is how GNU emacs does it.
3947 ------------------------------------------------------------------------------
3948 This document details the changes between this version, bash-2.0-release,
3949 and the previous version, bash-2.0-beta3.
3953 a. Fix to the `getopts' builtin so that it does the right thing when a
3954 required option argument is not present.
3956 b. The completion code now updates the common prefix of matched names
3957 after FIGNORE processing is done, since any names that were removed
3958 may have changed the common prefix.
3960 c. Fixed a bug that made messages in MAILPATH entries not work correctly.
3962 d. Fixed a serious documentation error in the description of the new
3963 ${parameter:offset[:length]} expansion.
3965 e. Fixes to make parameter substring expansion ({$param:offset[:length]})
3966 work when within double quotes.
3968 f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional
3971 g. Corrected a misspelling of `unlimited' in the output of `ulimit'.
3973 h. Fixed a bug that caused executable scripts without a leading `#!' to
3974 occasionally pick up the wrong set of positional parameters.
3976 i. Linux systems now have a working `ulimit -v', using RLIMIT_AS.
3978 j. Updated config.guess so that many more machine types are recognized.
3980 k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]}
3983 l. If the shell is named `-su', and `-c command' is supplied, read and
3984 execute the login shell startup files even though the shell is not
3985 interactive. This is to support the `-' option to `su'.
3987 m. Fixed a bug that caused core dumps when the DEBUG trap was ignored
3988 with `trap "" DEBUG' and a shell function was subsequently executed.
3990 n. Fixed a bug that caused core dumps in the read builtin when IFS was
3991 set to the null string and the input had leading whitespace.
3993 2. Changes to Readline
3995 a. Fixed a bug that caused a numeric argument of 1024 to be ignored when
3998 b. Fixed the display code so that the numeric argument is displayed as it's
4001 c. Fixed the numeric argument reading code so that `M-- command' is
4002 equivalent to `M--1 command', as the prompt implies.
4004 3. New Features in Bash
4006 a. `ulimit' now sets both hard and soft limits and reports the soft limit
4007 by default (when neither -H nor -S is specified). This is compatible
4008 with versions of sh and ksh that implement `ulimit'.
4010 b. Integer constants have been extended to base 64.
4012 4. New Features in Readline
4014 a. The `home' and `end' keys are now bound to beginning-of-line and
4015 end-of-line, respectively, if the corresponding termcap capabilities
4018 ------------------------------------------------------------------------------
4019 This document details the changes between this version, bash-2.0-beta3,
4020 and the previous version, bash-2.0-beta2.
4024 a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX.
4026 b. When in POSIX mode, variable assignments preceding a special builtin
4027 persist in the shell environment after the builtin completes.
4029 c. Changed all calls to getwd() to getcwd(). Improved check for systems
4030 where the libc getcwd() calls popen(), since that breaks on some
4031 systems when job control is being used.
4033 d. Fixed a bug that caused seg faults when executing scripts with the
4034 execute bit set but without a leading `#!'.
4036 e. The environment passed to executed commands is never sorted.
4038 f. A bug was fixed in the code that expands ${name[@]} to the number of
4039 elements in an array variable.
4041 g. A bug was fixed in the array compound assignment code ( A=( ... ) ).
4043 h. Window size changes now correctly propagate down to readline if
4044 the shopt `checkwinsize' option is enabled.
4046 i. A fix was made in the code that expands to the length of a variable
4049 j. A fix was made to the command builtin so that it did not turn on the
4050 `no fork' flag inappropriately.
4052 k. A fix was made to make `set -n' work more reliably.
4054 l. A fix was made to the job control initialization code so that the
4055 terminal process group is set to the shell's process group if the
4056 shell changes its own process group.
4058 2. Changes to Readline
4060 a. System-specific changes for: SCO 3.2v[45].
4062 b. The behavior of the vi-mode `.' when redoing an `i' command was changed
4063 to insert the text previously inserted by the `i' command rather than
4064 simply entering insert mode.
4066 3. New features in Bash
4068 a. There is a new version of the autoload function package, in
4069 examples/functions/autoload.v2, that uses arrays and provides more
4072 b. Support for LC_COLLATE and locale-specific sorting of the results of
4073 pathname expansion if strcoll() is available.
4075 4. New Features in Readline
4077 a. Support for locale-specific sorting of completion possibilities if
4078 strcoll() is available.
4080 ------------------------------------------------------------------------------
4081 This document details the changes between this version, bash-2.0-beta2,
4082 and the previous version, bash-2.0-beta1.
4086 a. `pushd -' is once again equivalent to `pushd $OLDPWD'.
4088 b. OS-specific changes for: SCO 3.2v[45].
4090 c. A change was made to the fix for the recently-reported security hole
4091 when reading characters with octal value 255 to make it work better on
4092 systems with restartable system calls when not using readline.
4094 d. Some changes were made to the test suite so that it works if you
4095 configure bash with --enable-usg-echo-default.
4097 e. A fix was made to the parsing of conditional arithmetic expressions.
4099 f. Illegal arithmetic bases now cause an arithmetic evaluation error rather
4100 than being silently reset.
4102 g. Multiple arithmetic bases now cause an arithmetic evaluation error
4103 instead of being ignored.
4105 h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2.
4107 i. A bug that sometimes caused array indices to be evaluated twice (which
4108 would cause errors when they contained assignment statements) was fixed.
4110 j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning
4111 unsigned values and to simplify the code.
4113 k. A bug in the command-oriented-history code that caused it to sometimes
4114 put semicolons after right parens inappropriately was fixed.
4116 l. The values inserted into the prompt by the \w and \W escape sequences
4117 are now quoted to prevent further expansion.
4119 m. An interactive shell invoked as `sh' now reads and executes commands
4120 from the file named by $ENV when it starts up. If it's a login shell,
4121 it does this after reading /etc/profile and ~/.profile.
4123 n. The file named by $ENV is never read by non-interactive shells.
4125 2. Changes to Readline
4127 a. A few changes were made to hide some macros and functions that should not
4130 b. An off-by-one error that caused seg faults in the history expansion code
4133 3. New Features in Bash
4135 a. The ksh-style ((...)) arithmetic command was implemented. It is exactly
4136 identical to let "...". This is controlled by a new option to configure,
4137 `--enable-dparen-arithmetic', which is on by default.
4139 b. There is a new #define available in config.h.top: SYS_BASH_LOGOUT. If
4140 defined to a filename, bash reads and executes commands from that file
4141 when a login shell exits. It's commented out by default.
4143 c. `ulimit' has a `-l' option that reports the maximum amount of data that
4144 may be locked into memory on 4.4BSD-based systems.
4146 ------------------------------------------------------------------------------
4147 This document details the changes between this version, bash-2.0-beta1,
4148 and the previous version, bash-2.0-alpha4.
4152 a. A bug that sometimes caused traps to be ignored on signals the
4153 shell treats specially was fixed.
4155 b. The internationalization code was changed to track the values of
4156 LC_* variables and call setlocale() as appropriate. The TEXTDOMAIN
4157 and TEXTDOMAINDIR variables are also tracked; changes cause calls
4158 to textdomain() and bindtextdomain(), if available.
4160 c. A bug was fixed that sometimes caused double-quoted strings to be
4163 d. Changes were made so that the siglist code compiles correctly on
4166 e. Added `:' to the set of characters that cause word breaks for the
4167 completion code so that pathnames in assignments to $PATH can be
4170 f. The `select' command was fixed to print $PS3 to stderr.
4172 g. Fixed an error in the manual page section describing the effect that
4173 setting and unsetting GLOBIGNORE has on the setting of the `dotglob'
4176 h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC
4177 on systems without gettimeofday() and resources.
4179 i. The getopt static variables are now initialized each time a subshell
4180 is started, so subshells using `getopts' work right.
4182 j. A sign-extension bug that caused a possible security hole was fixed.
4184 k. The parser now reads characters between backquotes within a double-
4185 quoted string as a single word, so double quotes in the backquoted
4186 string don't terminate the enclosing double-quoted string.
4188 l. A bug that caused `^O' to work incorrectly when typed as the first
4189 thing to an interactive shell was fixed.
4191 m. A rarely-exercised off-by-one error in the code that quotes variable
4194 n. Some memory and file descriptor leaks encountered when running a
4195 shell script that is executable but does not have a leading `#!'
4198 2. Changes to Readline
4200 a. A bug that sometimes caused incorrect results when trying to read
4201 typeahead on systems without FIONREAD was fixed.
4203 3. New Features in Bash
4205 a. The command timing code now uses the value of the TIMEFORMAT variable
4206 to format and display timing statistics.
4208 b. The `time' reserved word now accepts a `-p' option to force the
4209 POSIX.2 output format.
4211 c. There are a couple of new and updated scripts to convert csh startup
4212 files to bash format.
4214 d. There is a new builtin array variable: BASH_VERSINFO. The various
4215 members hold the parts of the version information in BASH_VERSION,
4216 plus the value of MACHTYPE.
4218 4. New Features in Readline
4220 a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter
4223 ------------------------------------------------------------------------------
4224 This document details the changes between this version, bash-2.0-alpha4,
4225 and the previous version, bash-2.0-alpha3.
4229 a. There is better detection of rsh connections on Solaris 2.
4231 b. Assignments to read-only variables preceding a command name are now
4232 variable assignment errors. Variable assignment errors cause
4233 non-interactive shells running in posix mode to exit.
4235 c. The word tokenizer was rewritten to handle nested quotes and pairs
4236 ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...))
4237 correctly. Some of the parameter expansion code was updated as a
4240 d. A fix was made to `test' when given three arguments so that a binary
4241 operator is checked for first, before checking that the first argument
4244 e. 2''>/dev/null is no longer equivalent to 2>/dev/null.
4246 f. Parser error messages were regularized, and in most cases the name of
4247 the shell script being read by a non-interactive shell is not printed
4250 g. A fix was made to the completion code so that it no longer removes the
4251 text the user typed in some cases.
4253 h. The special glibc `getopt' environment variable is no longer put into
4254 the environment on machines with small values of ARG_MAX.
4256 i. The expansion of ${...} now follows the POSIX.2 rules for finding the
4259 j. The shell no longer displays spurious status messages for background
4260 jobs in shell scripts that complete successfully when the script is
4261 run from a terminal.
4263 k. `shopt -o' now correctly updates $SHELLOPTS.
4265 l. A bug that caused the $PATH searching code to return a non-executable
4266 file even when an executable file with the same name appeared later in
4269 m. The shell now does tilde expansions on unquoted `:~' in assignment
4270 statements when not in posix mode.
4272 n. Variable assignment errors when a command consists only of assignments
4273 now cause non-interactive shells to exit when in posix mode.
4275 o. If the variable in a `for' or `select' command is read-only, or not a
4276 legal shell identifier, a variable assignment error occurs.
4278 p. `test' now handles `-a' and `-o' as binary operators when three arguments
4279 are supplied, and correctly parses `( word )' as equivalent to `word'.
4281 q. `test' was fixed so that file names of the form /dev/fd/NN mean the same
4282 thing on all systems, even Linux.
4284 r. Fixed a bug in the globbing code that caused patterns with multiple
4285 consecutive `*'s to not be matched correctly.
4287 s. Fixed a bug that caused $PS2 to not be printed when an interactive shell
4288 not using readline is reading a here document.
4290 t. Fixed a bug that caused history expansion to be performed inappropriately
4291 when a single-quoted string spanned more than one line.
4293 u. `getopts' now checks that the variable name passed by the user as the
4294 second argument is a legal shell identifier and that the variable is
4297 v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it
4298 encounters an error.
4300 w. Fixed `set' to display variable values in a form that can be re-read.
4302 x. Fixed a bug in the code that keeps track of whether or not local variables
4303 have been declared at the current level of function nesting.
4305 y. Non-interactive shells in posix mode now exit if the name in a function
4306 declaration is not a legal identifier.
4308 z. The job control code now ignores stopped children when the shell is not
4311 aa. The `cd' builtin no longer attempts spelling correction on the directory
4312 name if the shell is not interactive, regardless of the setting of the
4315 bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2.
4317 cc. `time' now prints its output to stderr, as POSIX.2 specifies.
4319 2. Fixes to Readline
4321 a. After printing possible completions, all lines of a multi-line prompt
4324 b. Some changes were made to the terminal handling code in rltty.c to
4325 work around AIX 4.2 bugs.
4327 3. New Features in Bash
4329 a. There is a new loadable builtin: sprintf, with calling syntax
4330 sprintf var format [args]
4331 This provides an easy way to simulate ksh left- and right-justified
4334 b. The expansions of \h and \H in prompt strings were swapped. \h now
4335 expands to the hostname up to the first `.', as in bash-1.14.
4337 4. New Features in Readline
4339 a. The bash-1.14 behavior when ^M is typed while doing an incremental
4340 search was restored. ^J may now be used to terminate the search without
4343 b. There is a new bindable variable: disable-completion. This inhibits
4344 word completion and causes the completion character to be inserted as
4345 if it had been bound to self-insert.
4347 ------------------------------------------------------------------------------
4348 This document details the changes between this version, bash-2.0-alpha3,
4349 and the previous version, bash-2.0-alpha2.
4351 There is now a file `COMPAT' included in the distribution that lists the
4352 user-visible incompatibilities between 1.14 and 2.0.
4356 a. Some work was done so that word splitting of the rhs of assignment
4357 statements conforms more closely to historical practice.
4359 b. A couple of errant memory frees were fixed.
4361 c. A fix was made to the test builtin so it recognizes `<' and `>' as
4364 d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's
4365 allocated and freed. This is to catch callers that refer to freed
4366 memory or assume something about newly-allocated memory.
4368 e. Fixed a problem with conversion to 12-hour time in the prompt
4371 f. Fixed a problem with configure's argument parsing order. Now you can
4372 correctly turn on specific options after using --enable-minimal-config.
4374 g. The configure script now automatically disables the use of GNU malloc
4375 on systems where it's appropriate (better than having people read the
4376 NOTES file and do it manually).
4378 h. There are new prompt expansions (\v and \V) to insert version information
4379 into the prompt strings.
4381 i. The default prompt string now includes the version number.
4383 j. Most of the builtins that take no options were changed to use the
4384 internal getopt so they can produce proper error messages for -?
4385 and incorrect options.
4387 k. Some system-specific changes were made for SVR4.2 and Solaris 2.5.
4389 l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of
4392 m. A couple of problems caused by uninitialized variables were fixed.
4394 n. There are a number of new loadable builtin examples: logname, basename,
4395 dirname, tty, pathchk, tee, head, and rmdir. All of these conform to
4398 o. Bash now notices changes in TZ and calls tzset() if present, so
4399 changing TZ will alter the time printed by prompt expansions.
4401 p. The source was reorganized a bit so I don't have to wait so long for
4402 some files to compile, and to facilitate the creation of a `shell
4403 library' at some future point.
4405 q. Bash no longer turns off job control if called as `sh', since the
4406 POSIX.2 spec includes job control as a standard feature.
4408 r. `bash -o posix' now works as intended.
4410 s. Fixed a problem with the completion code: when completing a filename
4411 that contained globbing characters, if show-all-if-ambiguous was set,
4412 the completion code would remove the user's text.
4414 t. Fixed ulimit so that (hopefully) the full range of limits is available
4417 u. A new `shopt' option (`hostcomplete') enables and disables hostname
4420 v. The shell no longer attempts to save the history on an abort(),
4421 which is usually called by programming_error().
4423 w. The `-s' option to `fc' was changed to echo the command to be executed
4424 to stderr instead of stdout.
4426 x. If the editor invoked by `fc -e' exits with a non-zero status, no
4427 commands are executed.
4429 y. Fixed a bug that made the shopt `histverify' option work incorrectly.
4431 z. There is a new variable `MACHTYPE' whose value is the GNU-style
4432 `cpu-company-system' system description as set by configure. (The
4433 values of MACHTYPE and HOSTTYPE should really be swapped.)
4435 aa. The `ulimit' builtin now allows the maximum virtual memory size to be
4436 set via setrlimit(2) if RLIMIT_VMEM is defined.
4438 bb. `bash -nc 'command'' no longer runs `command'.
4440 2. Changes to Readline
4442 a. Fixed a typo in the code that checked for FIONREAD in input.c.
4444 b. Fixed a bug in the code that outputs keybindings, so things like C-\
4445 are quoted properly.
4447 c. Fixed a bug in the inputrc file parsing code to handle the problems
4448 caused by inputrc files created from the output of `bind -p' in
4449 previous versions of bash. The problem was due to the bug fixed
4452 d. Readline no longer turns off the terminal's meta key, and turns it on
4453 once the first time it's called.
4455 ------------------------------------------------------------------------------
4456 This file documents the changes between this version, bash-2.0-alpha2,
4457 and the previous version, bash-2.0-alpha.
4461 a. The shell no longer thinks directories are executable.
4463 b. `disown' has a new option, `h', which inhibits the resending of SIGHUP
4464 but does not remove the job from the jobs table.
4466 c. The varargs functions in error.c now use ANSI-C `stdarg' if available.
4468 d. The build process now treats the `build version' in .build as local to
4469 the build directory, so different versions built from the same source
4470 tree have different `build versions'.
4472 e. Some problems with the grammar have been fixed. (It used `list' in a few
4473 productions where `compound_list' was needed. A `list' must be terminated
4474 with a newline or semicolon; a `compound_list' need not be.)
4476 f. A fix was made to keep `wait' from hanging when waiting for all background
4479 g. `bash --help' now writes its output to stdout, like the GNU Coding Standards
4480 specify, and includes the machine type (the value of MACHTYPE).
4482 h. `bash --version' now prints more information and exits successfully, like
4483 the GNU Coding Standards specify.
4485 i. The output of `time' and `times' now prints fractional seconds with three
4486 places after the decimal point.
4488 j. A bug that caused process substitutions to screw up the pipeline printed
4489 by `jobs' was fixed.
4491 k. Fixes were made to the code that implements $'...' and $"..." so they
4494 l. The process substitution code now opens named pipes for reading with
4495 O_NONBLOCK to avoid hanging.
4497 m. Fixes were made to the trap code so the shell cleans up correctly if the
4498 trap command contains a `return' and we're executing a function or
4499 sourcing a script with `.'.
4501 n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the
4502 documentation (ps, dvi, etc.) on a `make install'.
4504 o. Fixed an auto-increment error that caused bash -c args to sometimes dump
4507 p. Fixed a bug that caused $HISTIGNORE to fail when the history line
4508 contained globbing characters.
4510 2. Changes to Readline
4512 a. There is a new string variable, rl_library_version, available for use by
4513 applications. The current value is "2.1".
4515 b. A bug encountered when expand-tilde was enabled and file completion was
4516 attempted on a word beginning with `~/' was fixed.
4518 c. A slight change was made to the incremental search termination behavior.
4519 ESC still terminates the search, but if input is pending or arrives
4520 within 0.1 seconds (on systems with select(2)), it is used as a prefix
4521 character. This is intented to allow users to terminate searches with
4522 the arrow keys and get the behavior they expect.