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