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