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