Imported from ../bash-2.01.tar.gz.
[platform/upstream/bash.git] / CHANGES
1 This document details the changes between this version, bash-2.01-release,
2 and the previous version, bash-2.01-beta2.
3
4 1.  Changes to Bash
5
6 a.  The `distclean' target should remove the `printenv' executable if it
7     has been created.
8
9 b.  The test suite was changed slightly to ensure that the error messages
10     are printed in English.
11
12 c.  A bug that caused the shell to dump core when a filename containing a
13     `/' was passed to `hash' was fixed.
14
15 d.  Pathname canonicalization now leaves a leading `//' intact, as POSIX.1
16     requires.
17
18 e.  A memory leak when completing commands was fixed.
19
20 f.  A memory leak that occurred when checking the hash table for commands
21     with relative paths was fixed.
22
23 ------------------------------------------------------------------------------
24 This document details the changes between this version, bash-2.01-beta2,
25 and the previous version, bash-2.01-beta1.
26
27 1.  Changes to Bash
28
29 a.  The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if
30     the current (soft) limit is less than or equal to the hard limit.
31
32 b.  Fixed a bug that caused the bash emulation of strcasecmp to produce
33     incorrect results.
34
35 c.  A bug that caused memory to be freed twice when a trap handler resets
36     the trap more than once was fixed.
37
38 d.  A bug that caused machines where sizeof (pointer) > sizeof (int) to
39     fail (and possibly dump core) when trying to unwind-protect a null
40     pointer was fixed.
41
42 e.  The startup files should not be run with job control enabled.  This fix
43     allows SIGINT to once again interrupt startup file execution.
44
45 f.  Bash should not change the SIGPROF handler if it is set to something
46     other than SIG_DFL.
47
48 g.  The completion code that provides bash-specific completions for readline
49     now quotes characters that the readline code would treat as word break
50     characters if they appear in a file name.
51
52 h.  The completion code now correctly quotes filenames containing a `!',
53     even if the user attempted to use double quotes when attempting
54     completion.
55
56 i.  A bug that caused the shell to dump core when `disown' was called without
57     arguments and there was no current job was fixed.
58
59 j.  A construct like $((foo);bar) is now processed as a command substitution
60     rather than as a bad arithmetic substitution.
61
62 k.  A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist'
63     shell options when editing and re-executing a series of commands were
64     fixed.
65
66 l.  A fix was made to the grammar -- the list of commands between `do' and
67     `done' in the body of a `for' command should be treated the same as a
68     while loop.
69
70 2.  Changes to Readline
71
72 a.  A couple of bugs that caused the history search functions to attempt to
73     free a NULL pointer were fixed.
74
75 b.  If the C library provides setlocale(3), readline does not need to look
76     at various environment variables to decide whether or not to go into
77     eight-bit mode automatically -- just check whether the current locale
78     is not `C' or `POSIX'.
79
80 c.  If the filename completion function finds that a directory was not closed
81     by a previous (interrupted) completion, it closes the directory with
82     closedir().
83
84 3.  New Features in Bash
85
86 a.  New bindable readline commands:  history-and-alias-expand-line and
87     alias-expand-line.  The code was always in there, there was just no
88     way to execute it.
89
90 ------------------------------------------------------------------------------
91 This document details the changes between this version, bash-2.01-beta1,
92 and the previous version, bash-2.01-alpha1.
93
94 1.  Changes to Bash
95
96 a.  Fixed a problem that could cause file descriptors used for process
97     substitution to conflict with those used explicitly in redirections.
98
99 b.  Made it easier to regenerate configure if the user changes configure.in.
100
101 c.  ${GROUPS[0]} should always be the primary group, even on systems without
102     multiple groups.
103
104 d.  Spelling correction is no longer enabled by default.
105
106 e.  Fixes to quoting problems in `bashbug'.
107
108 f.  OS-specific configuration changes were made for: Irix 6.
109
110 g.  OS-specific code changes were made for: QNX.
111
112 h.  A more meaningful message is now printed when the file in /tmp for a
113     here document cannot be created.
114
115 i.  Many changes to the shell's variable initialization code to speed
116     non-interactive startup.
117
118 j.  Changes to the non-job-control code so that it does not try to open
119     /dev/tty.
120
121 k.  The output of `set' and `export' is once again sorted, as POSIX wants.
122
123 l.  Fixed a problem caused by a recursive call reparsing the value of
124     $SHELLOPTS.
125
126 m.  The tilde code no longer calls getenv() when it's compiled as part of
127     the shell, which should eliminate problems on systems that cannot
128     redefine getenv(), like the NeXT OS.
129
130 n.  Fixed a problem that caused `bash -o' or `bash +o' to not list all
131     the shell options.
132
133 o.  Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit
134     only if the hard limit is greater than the current (soft) limit.
135
136 p.  Fixed a problem that arose when building bash in a different directory
137     than the source and y.tab.[ch] were remade with something other than
138     bison.  This came up most often on NetBSD.
139
140 q.  Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated
141     an unfinished command completion (`/), which generated errors.
142
143 r.  The bash special tilde expansions (~-, ~+) are now attempted before
144     calling the standard tilde expansion code, which should eliminate the
145     problems people have been seeing with this on Solaris 2.5.1.
146
147 s.  Added support for <stdarg.h> to places where it was missing.
148
149 t.  Changed the code that reads the output of a command substitution to not
150     go through stdio.  This reduces the memory requirements and is faster.
151
152 u.  A number of changes to speed up export environment creation were made.
153
154 v.  A number of memory leaks were fixed as the result of running the test
155     scripts through Purify.
156
157 w.  Fixed a bug that caused subshells forked to interpret executable
158     scripts without a leading `#!' to not reinitialize the values of
159     the shell options.
160
161 2.  Changes to Readline
162
163 a.  History library has less `#ifdef SHELL' code -- abstracted stuff out
164     into application-specific function hooks.
165
166 b.  Readline no longer calls getenv() if it's compiled as part of the shell,
167     which should eliminate problems on systems that cannot redefine getenv(),
168     like the NeXT OS.
169
170 c.  Fixed translation of ESC when `untranslating' macro values.
171
172 d.  The region kill operation now fixes the mark if it ends up beyond the
173     boundaries of the line after the region is deleted.
174
175 3.  New Features in Bash
176
177 a.  New argument for `configure':  `--with-curses'.  This can be used to
178     override the selection of the termcap library on systems where it is
179     deficient.
180
181 ------------------------------------------------------------------------------
182 This document details the changes between this version, bash-2.01-alpha1,
183 and the previous version, bash-2.0-release.
184
185 1.  Changes to Bash
186
187 a.  System-specific configuration changes for: FreeBSD, SunOS4, Irix,
188     MachTen, QNX 4.2, Harris Night Hawk, SunOS5.
189
190 b.  System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2,
191     HP-UX, AIX 4.2.
192
193 c.  A bug that caused the exec builtin to fail because the full pathname of
194     the command could not be found was fixed.
195
196 d.  The code that performs output redirections is now more resistant to
197     race conditions and possible security exploits.
198
199 e.  A bug that caused the shell to dump core when performing pattern
200     substitutions on variable values was fixed.
201
202 f.  More hosts are now recognized by the auto-configuration mechanism
203     (OpenBSD, QNX, others).
204
205 g.  Assignments to read-only variables that attempt to convert them to
206     arrays are now errors.
207
208 h.  A bug that caused shell scripts using array assignments in POSIX mode
209     to exit after the assignment was performed was fixed.
210
211 i.  The substring expansion code is now more careful about running off the
212     ends of the expanded variable value.
213
214 j.  A bug that caused completion to fail if a backquoted command substitution
215     appeared anywhere on the line was fixed.
216
217 k.  The `source' builtin no longer turns off history if it has been enabled
218     in a non-interactive shell.
219
220 l.  A bug that caused the shell to crash when `disown' was given a pid
221     instead of a job number was fixed.
222
223 m.  The `cd' spelling correction code will not try to change to `.' if no
224     directory entries match a single-character argument.
225
226 n.  A bad variable name supplied to `declare', `export', or `readonly' no
227     longer causes a non-interactive shell in POSIX mode to exit.
228
229 o.  Some fixes were made to the test suite to handle peculiarities of
230     various Unix versions.
231
232 p.  The bash completion code now quotes characters that readline would
233     treat as word breaks for completion but are not shell metacharacters.
234
235 q.  Bad options supplied at invocation now cause a usage message to be
236     displayed.
237
238 r.  Fixes were made to the code that handles DEBUG traps so that the trap
239     string is not freed inappropriately.
240
241 s.  Some changes were made to the bash debugger in examples/bashdb -- it
242     should be closer to working now.
243
244 t.  A problem that caused the default filename used for mail checking to be
245     wrong was fixed.
246
247 u.  A fix was made to the `echo' builtin so that NUL characters printed with
248     `echo -e' do not cause the output to be truncated.
249
250 v.  A fix was made to the job control code so that the shell behaves better
251     when monitor mode is enabled in a non-interactive shell.
252
253 w.  Bash no longer catches all of the terminating signals in a non-
254     interactive shell until a trap is set on EXIT, which should result in
255     quicker startup.
256
257 x.  A fix was made to the command timing code so that `time' can be used in
258     a loop.
259
260 y.  A fix was made to the parser so that `((cmd); cmd2)' is now parsed as
261     a nested subshell rather than strictly as an (errnoeous) arithmetic
262     command.
263
264 z.  A fix was made to the globbing code so that it correctly matches quoted
265     filenames beginning with a `.'.
266
267 aa. A bug in `fc' that caused some multi-line commands to not be stored as
268     one command in the history when they were re-executed after editing
269     (with `fc -e') was fixed.
270
271 bb. The `ulimit' builtin now attempts to catch some classes of integer
272     overflows.
273
274 cc. The command-oriented-history code no longer attempts to add `;'
275     inappropriately when a newline appears while reading a $(...) command
276     substitution.
277
278 dd. A bug that caused the shell to dump core when `help --' was executed
279     was fixed.
280
281 ee. A bug that caused the shell to crash when an unset variable appeared
282     in the body of a here document after `set -u' had been executed was
283     fixed.
284
285 ff. Implicit input redirections from /dev/null for asynchronous commands
286     are now handled better.
287
288 gg. A bug that caused the shell to fail to compile when configured with
289     `--disable-readline' was fixed.
290
291 hh. The globbing code should now be interruptible.
292
293 ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a
294     stopped job and adjusts the data structures accordingly, as if `bg' had
295     been executed instead.
296
297 jj. A bug that caused the shell to crash when mixing calls to `getopts'
298     and `shift' on the same set of positional parameters was fixed.
299
300 kk. The command printing code now preserves the `-p' flag to `time'.
301
302 ll. The command printing code now handles here documents better when there
303     are other redirections associated with the command.
304
305 mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_)
306     is no longer placed into the environment of executed commands -- users
307     of glibc had too many problems with it.
308
309 nn. Reorganized the code that generates signames.h.  The signal_names list
310     is now more complete but may be slightly different (SIGABRT is favored
311     over SIGIOT, for example).  The preferred signal names are those
312     listed in the POSIX.2 standard.
313
314 oo. `bashbug' now uses a filename shorter than 14 characters for its
315     temporary file, and asks for confirmation before sending the bug
316     report.
317
318 pp. A bug that caused TAB completion in vi editing mode to not be turned
319     off when `set -o posix' was executed or back on when `set +o posix'
320     was executed was fixed.
321
322 qq. A bug in the brace expansion code that caused brace expansions appearing
323     in new-style $(...) command substitutions to be inappropriately expanded
324     was fixed.
325
326 rr. A bug in the readline hook shell-expand-line that could cause memory to
327     be inappropriately freed was fixed.
328
329 ss. A bug that caused some arithmetic expressions containing `&&' and `||'
330     to be parsed with the wrong precedence has been fixed.
331
332 tt. References to unbound variables after `set -u' has been executed now
333     cause the shell to exit immediately, as they should.
334
335 uu. A bug that caused the shell to exit inappropriately when `set -e' had
336     been executed and a command's return status was being inverted with the
337     `!' reserved word was fixed.
338
339 vv. A bug that could occasionally cause the shell to crash with a
340     divide-by-zero error when timing a command was fixed.
341
342 ww. A bug that caused parameter pattern substitution to leave stray
343     backslashes in the replacement string when the expression is in
344     double quotes was fixed.
345
346 xx. The `break' and `continue' builtins now break out of all loops when an
347     invalid count argument is supplied.
348
349 yy. Fixed a bug that caused PATH to be set to the empty string if
350     `command -p' is executed with PATH unset.
351
352 zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix,
353     as POSIX specifies.
354
355 aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS
356      if there were no shell options set.
357
358 bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX
359      mode, their output is as POSIX.2 specifies.
360
361 ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually
362      creates an array variable.
363
364 ddd. Fixed a bug that prevented `time' from correctly timing background
365      pipelines.
366
367 2.  Changes to Readline
368
369 a.  A bug that caused an extra newline to be printed when the cursor was on
370     an otherwise empty line was fixed.
371
372 b.  An instance of memory being used after it was freed was corrected.
373
374 c.  The redisplay code now works when the prompt is longer than the screen
375     width.
376
377 d.  `dump-macros' is now a bindable name, as it should have been all along.
378
379 e.  Non-printable characters are now expanded when displaying macros and
380     their values.
381
382 f.  The `dump-variables' and `dump-macros' commands now output a leading
383     newline if they're called as the result of a key sequence, rather
384     than directly by an application.
385
386 3.  New Features in Bash
387
388 a.  There is a new builtin array variable: GROUPS, the set of groups to which
389     the user belongs.  This is used by the test suite.
390
391 4.  New Features in Readline
392
393 a.  If a key sequence bound to `universal-argument' is read while reading a
394     numeric argument started with `universal-argument', it terminates the
395     argument but is otherwise ignored.  This provides a way to insert multiple
396     instances of a digit string, and is how GNU emacs does it.
397
398 ------------------------------------------------------------------------------
399 This document details the changes between this version, bash-2.0-release,
400 and the previous version, bash-2.0-beta3.
401
402 1.  Changes to Bash
403
404 a.  Fix to the `getopts' builtin so that it does the right thing when a
405     required option argument is not present.
406
407 b.  The completion code now updates the common prefix of matched names
408     after FIGNORE processing is done, since any names that were removed
409     may have changed the common prefix.
410
411 c.  Fixed a bug that made messages in MAILPATH entries not work correctly.
412
413 d.  Fixed a serious documentation error in the description of the new
414     ${parameter:offset[:length]} expansion.
415
416 e.  Fixes to make parameter substring expansion ({$param:offset[:length]})
417     work when within double quotes.
418
419 f.  Fixes to make ^A (CTLESC) survive an unquoted expansion of positional
420     parameters.
421
422 g.  Corrected a misspelling of `unlimited' in the output of `ulimit'.
423
424 h.  Fixed a bug that caused executable scripts without a leading `#!' to
425     occasionally pick up the wrong set of positional parameters.
426
427 i.  Linux systems now have a working `ulimit -v', using RLIMIT_AS.
428
429 j.  Updated config.guess so that many more machine types are recognized.
430
431 k.  Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]}
432     expansion.
433
434 l.  If the shell is named `-su', and `-c command' is supplied, read and
435     execute the login shell startup files even though the shell is not
436     interactive.  This is to support the `-' option to `su'.
437
438 m.  Fixed a bug that caused core dumps when the DEBUG trap was ignored
439     with `trap "" DEBUG' and a shell function was subsequently executed.
440
441 n.  Fixed a bug that caused core dumps in the read builtin when IFS was
442     set to the null string and the input had leading whitespace.
443
444 2.  Changes to Readline
445
446 a.  Fixed a bug that caused a numeric argument of 1024 to be ignored when
447     inserting text.
448
449 b.  Fixed the display code so that the numeric argument is displayed as it's
450     being entered.
451
452 c.  Fixed the numeric argument reading code so that `M-- command' is
453     equivalent to `M--1 command', as the prompt implies.
454
455 3.  New Features in Bash
456
457 a.  `ulimit' now sets both hard and soft limits and reports the soft limit
458     by default (when neither -H nor -S is specified).  This is compatible
459     with versions of sh and ksh that implement `ulimit'.
460
461 b.  Integer constants have been extended to base 64.
462
463 4.  New Features in Readline
464
465 a.  The `home' and `end' keys are now bound to beginning-of-line and
466     end-of-line, respectively, if the corresponding termcap capabilities
467     are present.
468
469 ------------------------------------------------------------------------------
470 This document details the changes between this version, bash-2.0-beta3,
471 and the previous version, bash-2.0-beta2.
472
473 1.  Changes to Bash
474
475 a.  System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX.
476
477 b.  When in POSIX mode, variable assignments preceding a special builtin
478     persist in the shell environment after the builtin completes.
479
480 c.  Changed all calls to getwd() to getcwd().  Improved check for systems
481     where the libc getcwd() calls popen(), since that breaks on some
482     systems when job control is being used.
483
484 d.  Fixed a bug that caused seg faults when executing scripts with the
485     execute bit set but without a leading `#!'.
486
487 e.  The environment passed to executed commands is never sorted.
488
489 f.  A bug was fixed in the code that expands ${name[@]} to the number of
490     elements in an array variable.
491
492 g.  A bug was fixed in the array compound assignment code ( A=( ... ) ).
493
494 h.  Window size changes now correctly propagate down to readline if
495     the shopt `checkwinsize' option is enabled.
496
497 i.  A fix was made in the code that expands to the length of a variable
498     value (${#var}).
499
500 j.  A fix was made to the command builtin so that it did not turn on the
501     `no fork' flag inappropriately.
502
503 k.  A fix was made to make `set -n' work more reliably.
504
505 l.  A fix was made to the job control initialization code so that the
506     terminal process group is set to the shell's process group if the
507     shell changes its own process group.
508
509 2.  Changes to Readline
510
511 a.  System-specific changes for: SCO 3.2v[45].
512
513 b.  The behavior of the vi-mode `.' when redoing an `i' command was changed
514     to insert the text previously inserted by the `i' command rather than
515     simply entering insert mode.
516
517 3.  New features in Bash
518
519 a.  There is a new version of the autoload function package, in
520     examples/functions/autoload.v2, that uses arrays and provides more
521     functionality.
522
523 b.  Support for LC_COLLATE and locale-specific sorting of the results of
524     pathname expansion if strcoll() is available.
525
526 4.  New Features in Readline
527
528 a.  Support for locale-specific sorting of completion possibilities if
529     strcoll() is available.
530
531 ------------------------------------------------------------------------------
532 This document details the changes between this version, bash-2.0-beta2,
533 and the previous version, bash-2.0-beta1.
534
535 1.  Changes to Bash
536
537 a.  `pushd -' is once again equivalent to `pushd $OLDPWD'.
538
539 b.  OS-specific changes for: SCO 3.2v[45].
540
541 c.  A change was made to the fix for the recently-reported security hole
542     when reading characters with octal value 255 to make it work better on
543     systems with restartable system calls when not using readline.
544
545 d.  Some changes were made to the test suite so that it works if you
546     configure bash with --enable-usg-echo-default.
547
548 e.  A fix was made to the parsing of conditional arithmetic expressions.
549
550 f.  Illegal arithmetic bases now cause an arithmetic evaluation error rather
551     than being silently reset.
552
553 g.  Multiple arithmetic bases now cause an arithmetic evaluation error
554     instead of being ignored.
555
556 h.  A fix was made to the evaluation of ${param?word} to conform to POSIX.2.
557
558 i.  A bug that sometimes caused array indices to be evaluated twice (which
559     would cause errors when they contained assignment statements) was fixed.
560
561 j.  `ulimit' was rewritten to avoid problems with getrlimit(2) returning
562     unsigned values and to simplify the code.
563
564 k.  A bug in the command-oriented-history code that caused it to sometimes
565     put semicolons after right parens inappropriately was fixed.
566
567 l.  The values inserted into the prompt by the \w and \W escape sequences
568     are now quoted to prevent further expansion.
569
570 m.  An interactive shell invoked as `sh' now reads and executes commands
571     from the file named by $ENV when it starts up.  If it's a login shell,
572     it does this after reading /etc/profile and ~/.profile.
573
574 n.  The file named by $ENV is never read by non-interactive shells.
575
576 2.  Changes to Readline
577
578 a.  A few changes were made to hide some macros and functions that should not
579     be public.
580
581 b.  An off-by-one error that caused seg faults in the history expansion code
582     was fixed.
583
584 3.  New Features in Bash
585
586 a.  The ksh-style ((...)) arithmetic command was implemented.  It is exactly
587     identical to let "...".  This is controlled by a new option to configure,
588     `--enable-dparen-arithmetic', which is on by default.
589
590 b.  There is a new #define available in config.h.top: SYS_BASH_LOGOUT.  If
591     defined to a filename, bash reads and executes commands from that file
592     when a login shell exits.  It's commented out by default.
593
594 c.  `ulimit' has a `-l' option that reports the maximum amount of data that
595     may be locked into memory on 4.4BSD-based systems.
596
597 ------------------------------------------------------------------------------
598 This document details the changes between this version, bash-2.0-beta1,
599 and the previous version, bash-2.0-alpha4.
600
601 1.  Changes to Bash
602
603 a.  A bug that sometimes caused traps to be ignored on signals the
604     shell treats specially was fixed.
605
606 b.  The internationalization code was changed to track the values of
607     LC_* variables and call setlocale() as appropriate.  The TEXTDOMAIN
608     and TEXTDOMAINDIR variables are also tracked; changes cause calls
609     to textdomain() and bindtextdomain(), if available.
610
611 c.  A bug was fixed that sometimes caused double-quoted strings to be
612     parsed incorrectly.
613
614 d.  Changes were made so that the siglist code compiles correctly on
615     Solaris 2.5.
616
617 e.  Added `:' to the set of characters that cause word breaks for the
618     completion code so that pathnames in assignments to $PATH can be
619     completed.
620
621 f.  The `select' command was fixed to print $PS3 to stderr.
622
623 g.  Fixed an error in the manual page section describing the effect that
624     setting and unsetting GLOBIGNORE has on the setting of the `dotglob'
625     option.
626
627 h.  The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC
628     on systems without gettimeofday() and resources.
629
630 i.  The getopt static variables are now initialized each time a subshell
631     is started, so subshells using `getopts' work right.
632
633 j.  A sign-extension bug that caused a possible security hole was fixed.
634
635 k.  The parser now reads characters between backquotes within a double-
636     quoted string as a single word, so double quotes in the backquoted
637     string don't terminate the enclosing double-quoted string.
638
639 l.  A bug that caused `^O' to work incorrectly when typed as the first
640     thing to an interactive shell was fixed.
641
642 m.  A rarely-exercised off-by-one error in the code that quotes variable
643     values was fixed.
644
645 n.  Some memory and file descriptor leaks encountered when running a
646     shell script that is executable but does not have a leading `#!'
647     were plugged.
648
649 2.  Changes to Readline
650
651 a.  A bug that sometimes caused incorrect results when trying to read
652     typeahead on systems without FIONREAD was fixed.
653
654 3.  New Features in Bash
655
656 a.  The command timing code now uses the value of the TIMEFORMAT variable
657     to format and display timing statistics.
658
659 b.  The `time' reserved word now accepts a `-p' option to force the
660     POSIX.2 output format.
661
662 c.  There are a couple of new and updated scripts to convert csh startup
663     files to bash format.
664
665 d.  There is a new builtin array variable: BASH_VERSINFO.  The various
666     members hold the parts of the version information in BASH_VERSION,
667     plus the value of MACHTYPE.
668
669 4.  New Features in Readline
670
671 a.  Setting LANG to `en_US.ISO8859-1' now causes readline to enter
672     eight-bit mode.
673
674 ------------------------------------------------------------------------------
675 This document details the changes between this version, bash-2.0-alpha4,
676 and the previous version, bash-2.0-alpha3.
677
678 1.  Changes to Bash
679
680 a.  There is better detection of rsh connections on Solaris 2.
681
682 b.  Assignments to read-only variables preceding a command name are now
683     variable assignment errors.  Variable assignment errors cause
684     non-interactive shells running in posix mode to exit.
685
686 c.  The word tokenizer was rewritten to handle nested quotes and pairs
687     ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...))
688     correctly.  Some of the parameter expansion code was updated as a
689     consequence.
690
691 d.  A fix was made to `test' when given three arguments so that a binary
692     operator is checked for first, before checking that the first argument
693     is `!'.
694
695 e.  2''>/dev/null is no longer equivalent to 2>/dev/null.
696
697 f.  Parser error messages were regularized, and in most cases the name of
698     the shell script being read by a non-interactive shell is not printed
699     twice.
700
701 g.  A fix was made to the completion code so that it no longer removes the
702     text the user typed in some cases.
703
704 h.  The special glibc `getopt' environment variable is no longer put into
705     the environment on machines with small values of ARG_MAX.
706
707 i.  The expansion of ${...} now follows the POSIX.2 rules for finding the
708     closing `}'.
709
710 j.  The shell no longer displays spurious status messages for background
711     jobs in shell scripts that complete successfully when the script is
712     run from a terminal.
713
714 k.  `shopt -o' now correctly updates $SHELLOPTS.
715
716 l.  A bug that caused the $PATH searching code to return a non-executable
717     file even when an executable file with the same name appeared later in
718     $PATH was fixed.
719
720 m.  The shell now does tilde expansions on unquoted `:~' in assignment
721     statements when not in posix mode.
722
723 n.  Variable assignment errors when a command consists only of assignments
724     now cause non-interactive shells to exit when in posix mode.
725
726 o.  If the variable in a `for' or `select' command is read-only, or not a
727     legal shell identifier, a variable assignment error occurs.
728
729 p.  `test' now handles `-a' and `-o' as binary operators when three arguments
730     are supplied, and correctly parses `( word )' as equivalent to `word'.
731
732 q.  `test' was fixed so that file names of the form /dev/fd/NN mean the same
733     thing on all systems, even Linux.
734
735 r.  Fixed a bug in the globbing code that caused patterns with multiple
736     consecutive `*'s to not be matched correctly.
737
738 s.  Fixed a bug that caused $PS2 to not be printed when an interactive shell
739     not using readline is reading a here document.
740
741 t.  Fixed a bug that caused history expansion to be performed inappropriately
742     when a single-quoted string spanned more than one line.
743
744 u.  `getopts' now checks that the variable name passed by the user as the
745     second argument is a legal shell identifier and that the variable is
746     not read-only.
747
748 v.  Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it
749     encounters an error.
750
751 w.  Fixed `set' to display variable values in a form that can be re-read.
752
753 x.  Fixed a bug in the code that keeps track of whether or not local variables
754     have been declared at the current level of function nesting.
755
756 y.  Non-interactive shells in posix mode now exit if the name in a function
757     declaration is not a legal identifier.
758
759 z.  The job control code now ignores stopped children when the shell is not
760     interactive.
761
762 aa. The `cd' builtin no longer attempts spelling correction on the directory
763     name if the shell is not interactive, regardless of the setting of the
764     `cdspell' option.
765
766 bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2.
767
768 cc. `time' now prints its output to stderr, as POSIX.2 specifies.
769
770 2.  Fixes to Readline
771
772 a.  After printing possible completions, all lines of a multi-line prompt
773     are redisplayed.
774
775 b.  Some changes were made to the terminal handling code in rltty.c to
776     work around AIX 4.2 bugs.
777
778 3.  New Features in Bash
779
780 a.  There is a new loadable builtin: sprintf, with calling syntax
781                 sprintf var format [args]
782     This provides an easy way to simulate ksh left- and right-justified
783     variable values.
784
785 b.  The expansions of \h and \H in prompt strings were swapped.  \h now
786     expands to the hostname up to the first `.', as in bash-1.14.
787
788 4.  New Features in Readline
789
790 a.  The bash-1.14 behavior when ^M is typed while doing an incremental
791     search was restored.  ^J may now be used to terminate the search without
792     accepting the line.
793
794 b.  There is a new bindable variable: disable-completion.  This inhibits
795     word completion and causes the completion character to be inserted as
796     if it had been bound to self-insert.
797
798 ------------------------------------------------------------------------------
799 This document details the changes between this version, bash-2.0-alpha3,
800 and the previous version, bash-2.0-alpha2.
801
802 There is now a file `COMPAT' included in the distribution that lists the
803 user-visible incompatibilities between 1.14 and 2.0.
804
805 1. Changes to Bash
806
807 a. Some work was done so that word splitting of the rhs of assignment
808    statements conforms more closely to historical practice.
809
810 b. A couple of errant memory frees were fixed.
811
812 c. A fix was made to the test builtin so it recognizes `<' and `>' as
813    binary operators.
814
815 d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's
816    allocated and freed.  This is to catch callers that refer to freed
817    memory or assume something about newly-allocated memory.
818
819 e. Fixed a problem with conversion to 12-hour time in the prompt
820    expansion code.
821
822 f. Fixed a problem with configure's argument parsing order.  Now you can
823    correctly turn on specific options after using --enable-minimal-config.
824
825 g. The configure script now automatically disables the use of GNU malloc
826    on systems where it's appropriate (better than having people read the
827    NOTES file and do it manually).
828
829 h. There are new prompt expansions (\v and \V) to insert version information
830    into the prompt strings.
831
832 i. The default prompt string now includes the version number.
833
834 j. Most of the builtins that take no options were changed to use the
835    internal getopt so they can produce proper error messages for -?
836    and incorrect options.
837
838 k. Some system-specific changes were made for SVR4.2 and Solaris 2.5.
839
840 l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of
841    MAXNAMLEN.
842
843 m. A couple of problems caused by uninitialized variables were fixed.
844
845 n. There are a number of new loadable builtin examples: logname, basename,
846    dirname, tty, pathchk, tee, head, and rmdir.  All of these conform to
847    POSIX.2.
848
849 o. Bash now notices changes in TZ and calls tzset() if present, so
850    changing TZ will alter the time printed by prompt expansions.
851
852 p. The source was reorganized a bit so I don't have to wait so long for
853    some files to compile, and to facilitate the creation of a `shell
854    library' at some future point.
855
856 q. Bash no longer turns off job control if called as `sh', since the
857    POSIX.2 spec includes job control as a standard feature.
858
859 r. `bash -o posix' now works as intended.
860
861 s. Fixed a problem with the completion code: when completing a filename
862    that contained globbing characters, if show-all-if-ambiguous was set,
863    the completion code would remove the user's text.
864
865 t. Fixed ulimit so that (hopefully) the full range of limits is available
866    on HPUX systems.
867
868 u. A new `shopt' option (`hostcomplete') enables and disables hostname
869    completion.
870
871 v. The shell no longer attempts to save the history on an abort(),
872    which is usually called by programming_error().
873
874 w. The `-s' option to `fc' was changed to echo the command to be executed
875    to stderr instead of stdout.
876
877 x. If the editor invoked by `fc -e' exits with a non-zero status, no
878    commands are executed.
879
880 y. Fixed a bug that made the shopt `histverify' option work incorrectly.
881
882 z. There is a new variable `MACHTYPE' whose value is the GNU-style
883    `cpu-company-system' system description as set by configure.  (The
884    values of MACHTYPE and HOSTTYPE should really be swapped.)
885
886 aa. The `ulimit' builtin now allows the maximum virtual memory size to be
887     set via setrlimit(2) if RLIMIT_VMEM is defined.
888
889 bb. `bash -nc 'command'' no longer runs `command'.
890
891 2. Changes to Readline
892
893 a. Fixed a typo in the code that checked for FIONREAD in input.c.
894
895 b. Fixed a bug in the code that outputs keybindings, so things like C-\
896    are quoted properly.
897
898 c. Fixed a bug in the inputrc file parsing code to handle the problems
899    caused by inputrc files created from the output of `bind -p' in
900    previous versions of bash.  The problem was due to the bug fixed
901    in item b above.
902
903 d. Readline no longer turns off the terminal's meta key, and turns it on
904    once the first time it's called.
905
906 ------------------------------------------------------------------------------
907 This file documents the changes between this version, bash-2.0-alpha2,
908 and the previous version, bash-2.0-alpha.
909
910 1. Changes to Bash
911
912 a. The shell no longer thinks directories are executable.
913
914 b. `disown' has a new option, `h', which inhibits the resending of SIGHUP
915    but does not remove the job from the jobs table.
916
917 c. The varargs functions in error.c now use ANSI-C `stdarg' if available.
918
919 d. The build process now treats the `build version' in .build as local to
920    the build directory, so different versions built from the same source
921    tree have different `build versions'.
922
923 e. Some problems with the grammar have been fixed. (It used `list' in a few
924    productions where `compound_list' was needed.  A `list' must be terminated
925    with a newline or semicolon; a `compound_list' need not be.)
926
927 f. A fix was made to keep `wait' from hanging when waiting for all background
928    jobs.
929
930 g. `bash --help' now writes its output to stdout, like the GNU Coding Standards
931    specify, and includes the machine type (the value of MACHTYPE).
932
933 h. `bash --version' now prints more information and exits successfully, like
934    the GNU Coding Standards specify.
935
936 i. The output of `time' and `times' now prints fractional seconds with three
937    places after the decimal point.
938
939 j. A bug that caused process substitutions to screw up the pipeline printed
940    by `jobs' was fixed.
941
942 k. Fixes were made to the code that implements $'...' and $"..." so they
943    work as documented.
944
945 l. The process substitution code now opens named pipes for reading with
946    O_NONBLOCK to avoid hanging.
947
948 m. Fixes were made to the trap code so the shell cleans up correctly if the
949    trap command contains a `return' and we're executing a function or
950    sourcing a script with `.'.
951
952 n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the
953    documentation (ps, dvi, etc.) on a `make install'.
954
955 o. Fixed an auto-increment error that caused bash -c args to sometimes dump
956    core.
957
958 p. Fixed a bug that caused $HISTIGNORE to fail when the history line
959    contained globbing characters.
960
961 2. Changes to Readline
962
963 a. There is a new string variable, rl_library_version, available for use by
964    applications.  The current value is "2.1".
965
966 b. A bug encountered when expand-tilde was enabled and file completion was
967    attempted on a word beginning with `~/' was fixed.
968
969 c. A slight change was made to the incremental search termination behavior.
970    ESC still terminates the search, but if input is pending or arrives
971    within 0.1 seconds (on systems with select(2)), it is used as a prefix
972    character.  This is intented to allow users to terminate searches with
973    the arrow keys and get the behavior they expect.