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