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