]>
Commit | Line | Data |
---|---|---|
f73dda09 JA |
1 | This document details the changes between this version, bash-2.05a-release, |
2 | and the previous version, bash-2.05a-rc1. | |
3 | ||
4 | 1. Changes to Bash | |
5 | ||
6 | a. Fixed the `printf' builtin so that the variable name supplied as an | |
7 | argument to a %n conversion must be a valid shell identifier. | |
8 | ||
9 | b. Improved the random number generator slightly. | |
10 | ||
11 | c. Changes to configuration to not put -I/usr/include into $CFLAGS, since | |
12 | it messes up some includes. | |
13 | ||
14 | d. Corrected description of POSIXLY_CORRECT in man page and info manual. | |
15 | ||
16 | e. Fixed a couple of cases of incorrect function prototypes that sneaked | |
17 | through and caused compilation problems. | |
18 | ||
19 | f. A few changes to avoid potential core dumps in the programmable completion | |
20 | code. | |
21 | ||
22 | g. Fixed a configure problem that could cause a non-existent file to show | |
23 | up in LIBOBJS. | |
24 | ||
25 | h. Fixed a configure problem that could cause siglist.o to not be built when | |
26 | required. | |
27 | ||
28 | i. Changes to the strtoimax and strtoumax replacement functions to work | |
29 | around buggy compilers. | |
30 | ||
31 | j. Fixed a problem with the snprintf replacement function that could | |
32 | potentially cause a core dump. | |
33 | ||
34 | 2. Changes to Readline | |
35 | ||
36 | a. Fixed a locale-specific problem in the vi-mode `goto mark' command. | |
37 | ||
38 | b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause | |
39 | include file problems. | |
40 | ||
41 | ------------------------------------------------------------------------------ | |
42 | This document details the changes between this version, bash-2.05a-rc1, | |
43 | and the previous version, bash-2.05a-beta1. | |
44 | ||
45 | 1. Changes to Bash | |
46 | ||
47 | a. Fixed the snprintf replacement to correctly implement the `alternate form' | |
48 | of the %g and %G conversions. | |
49 | ||
50 | b. Fixed snprintf to correctly handle the optional precision with the %g and | |
51 | %G conversions. | |
52 | ||
53 | c. Fixed the arithmetic evaluation code to correct the values of `@' and `_' | |
54 | when translating base-64 constants (they were backwards). | |
55 | ||
56 | d. New library functions for formatting long and long long ints. | |
57 | ||
58 | e. Fixed a few places where negative array subscripts could have occurred, | |
59 | mostly as the result of systems using signed characters. | |
60 | ||
61 | f. Fixed a few places that assumed a pid_t was no wider than an int. | |
62 | ||
63 | g. Fixed the `maildir' mail checking code to work on systems where a | |
64 | `struct stat' doesn't include an `st_blocks' member. | |
65 | ||
66 | h. Fixed snprintf to make `unsigned long long' conversion formats (%llu) | |
67 | work better. | |
68 | ||
69 | i. Fixed snprintf to not print a sign when asked to do an unsigned conversion. | |
70 | ||
71 | j. Made configure changes to avoid compiling empty source files in lib/sh. | |
72 | ||
73 | k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax, | |
74 | strtoumax. | |
75 | ||
76 | l. The `printf' builtin now handles the `ll' and `j' length modifiers | |
77 | directly, since they can affect the type and width of the argument | |
78 | passed to printf(3). | |
79 | ||
80 | m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to | |
81 | have more sytematic naming, with accompanying changes to configure.in. | |
82 | ||
83 | n. Fixed snprintf to handle long doubles and the %a/%A conversions by | |
84 | falling back to sprintf, as long as sprintf supports them. | |
85 | ||
86 | o. Fixed return value from vsnprintf/snprintf to be the number of characters | |
87 | that would have been printed, even if that number exceeds the buffer | |
88 | size passed as an argument. | |
89 | ||
90 | p. Bash no longer attempts to define its own versions of some ctype macros | |
91 | if they are implemented as functions in libc but not as macros in | |
92 | <ctype.h>. | |
93 | ||
94 | q. Changed the variable printing code (used by `set', `export', etc.) to | |
95 | not use the $'...' syntax when in posix mode, since that caused | |
96 | interoperability problems with other shells (most notably with autoconf). | |
97 | When not in posix mode, it uses $'...' if the string to be printed | |
98 | contains non-printing characters and regular single quotes otherwise. | |
99 | ||
100 | r. snprintf now recognizes the %F conversion. | |
101 | ||
102 | s. Fixed a bug that could cause the wrong status to be returned by a shell | |
103 | function when the shell is compiled without job control and a null | |
104 | command containing a command substutition was executed in the function. | |
105 | ||
106 | t. When in posix mode, the default value for MAILCHECK is 600. | |
107 | ||
108 | u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables | |
109 | if they're not in the initial environment. | |
110 | ||
111 | v. If SECONDS appears in the initial environment with a valid integer value, | |
112 | bash uses that as the starting value, as if an assignment had been | |
113 | performed. | |
114 | ||
115 | w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it | |
116 | gives them default values if they don't appear in the initial environment. | |
117 | ||
118 | x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE, | |
119 | even if it assigns them default values. | |
120 | ||
121 | y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT | |
122 | if they appear in the initial environment. | |
123 | ||
124 | z. Bash no longer attempts to discover if it's being run by sshd in order to | |
125 | run the startup files. If the SSH_SOURCE_BASHRC is uncommented in | |
126 | config-top.h it will attempt to do so as previously, but that's commented | |
127 | out in the distributed version. | |
128 | ||
129 | aa. Fixed a typo in the code that tests for LC_NUMERIC. | |
130 | ||
131 | bb. The POSIXLY_CORRECT shell variable and its effects are now documented. | |
132 | ||
133 | cc. Some changes to several of the support shell scripts included in the | |
134 | definitions to try to avoid race conditions and attacks. | |
135 | ||
136 | dd. Several changes to avoid warnings from `gcc -Wall'. | |
137 | ||
138 | ee. Fixed a problem with the `unset' builtin that could cause incorrect | |
139 | results if asked to unset a variable and an array subscript in the | |
140 | same command. | |
141 | ||
142 | ff. A few changes to the shell's temporary file creation code to avoid | |
143 | potential file descriptor leaks and to prefer the system's idea of | |
144 | the temporary directory to use. | |
145 | ||
146 | gg. Fixes to build with the C alloca in lib/malloc/alloca.c if the system | |
147 | requires it but the shell has been configured --without-bash-malloc. | |
148 | ||
149 | hh. Updated the documentation to note that only interactive shells resend | |
150 | SIGHUP to all jobs before exiting. | |
151 | ||
152 | ii. Fixes to only pass unquoted tilde words to tilde_expand, rather than | |
153 | rely on tilde_expand or getpwnam(3) to handle the quotes (MacOS 10.x | |
154 | will remove backslashes in any login name passed to getpwnam(3)). | |
155 | ||
156 | jj. Small change from Paul Eggert to make LINENO right in commands run with | |
157 | `bash -c'. | |
158 | ||
159 | 2. New Features in Bash | |
160 | ||
161 | a. The `printf' builtin now handles the %a and %A conversions if they're | |
162 | implemented by printf(3). | |
163 | ||
164 | b. The `printf' builtin now handles the %F conversion (just about like %f). | |
165 | ||
166 | c. The `printf' builtin now handles the %n conversion like printf(3). The | |
167 | corresponding argument is the name of a shell variable to which the | |
168 | value is assigned. | |
169 | ||
170 | 3. Changes to Readline | |
171 | ||
172 | a. Fixed a few places where negative array subscripts could have occurred. | |
173 | ||
174 | b. Fixed the vi-mode code to use a better method to determine the bounds of | |
175 | the array used to hold the marks. | |
176 | ||
177 | c. Fixed the defines in chardefs.h to work better when chars are signed. | |
178 | ||
179 | d. Fixed configure.in to use the new names for bash autoconf macros. | |
180 | ||
181 | e. Readline no longer attempts to define its own versions of some ctype | |
182 | macros if they are implemented as functions in libc but not as macros in | |
183 | <ctype.h>. | |
184 | ||
185 | f. Fixed a problem where rl_backward could possibly set point to before | |
186 | the beginning of the line. | |
187 | ||
188 | ------------------------------------------------------------------------------ | |
189 | This document details the changes between this version, bash-2.05a-beta1, | |
190 | and the previous version, bash-2.05a-alpha1. | |
191 | ||
192 | 1. Changes to Bash | |
193 | ||
194 | a. Fixed a bug in the evalution of arithmetic `for' statements when the | |
195 | expanded expression is NULL. | |
196 | ||
197 | b. Fixed an unassigned variable problem in the redirection printing code. | |
198 | ||
199 | c. Added more prototypes to extern function declarations in the header | |
200 | files and to static function declarations in C source files. | |
201 | ||
202 | d. Make sure called functions have a prototype in scope, to get the arguments | |
203 | and return values right instead of casting. Removed extern function | |
204 | declarations from C source files that were already included in header | |
205 | files. | |
206 | ||
207 | e. Changed some function arguments to use function typedefs in general.h so | |
208 | the prototypes can be checked. The only use of Function and VFunction | |
209 | now is for unwind-protects. | |
210 | ||
211 | f. More const changes to function arguments and appropriate variables. | |
212 | ||
213 | g. Changed the mail checking support to handle `maildir'-style mail | |
214 | directories. | |
215 | ||
216 | h. Augmented the bash malloc to pass in the file and line number information | |
217 | for each malloc, realloc, and free. This should result in better error | |
218 | messages. | |
219 | ||
220 | i. The `old' gnu malloc is no longer a configuration option. | |
221 | ||
222 | j. Augmented the bash malloc with optional tracing and registering allocated | |
223 | and freed memory. | |
224 | ||
225 | k. Prompt string decoding now saves and restores the value of $? when it | |
226 | expands the prompt string, so command substitutions don't change $?. | |
227 | ||
228 | i. Array indices are now `long', since shell arithmetic is performed as long, | |
229 | and the internal arrayind_t type is used consistently. | |
230 | ||
231 | j. Some more `unsigned char *' fixes from Paul Eggert. | |
232 | ||
233 | k. Fixed a bad call to builtin_error that could cause core dumps when making | |
234 | local variables. | |
235 | ||
236 | l. `return' may no longer be used to terminate a `select' command, for | |
237 | compatibility with ksh. | |
238 | ||
239 | m. Changed code that reads octal numbers to do a better job of detecting | |
240 | overflows. | |
241 | ||
242 | n. The time formatting code no longer uses absolute indices into a buffer, | |
243 | because the buffer size changes depending on the size of a `time_t'. | |
244 | ||
245 | o. `umask' now prints four digits when printing in octal mode, for | |
246 | compatibility with other shells. | |
247 | ||
248 | p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L' | |
249 | formats and long doubles better, and internal functions have been | |
250 | simpified where appropriate. | |
251 | ||
252 | q. Some `time_t' fixes for machines were a time_t is bigger than a long. | |
253 | ||
254 | r. Replaced some bash-specific autoconf macros with standard equivalents. | |
255 | ||
256 | s. Improvmed the code that constructs temporary filenames to make the | |
257 | generated names a bit more random. | |
258 | ||
259 | t. Added code that checks for ascii before calling any of the is* ctype | |
260 | functions. | |
261 | ||
262 | u. Changed some places where a `char' was used as an array subscript to use | |
263 | `unsigned char', since a `char' can be negative if it's signed by default. | |
264 | ||
265 | v. Lots of changes to the `ulimit' builtin from Paul Eggert to add support | |
266 | for the new POSIX-200x RLIM_SAVED_CUR and RLIM_SAVED_MAX values and | |
267 | simplify the code. | |
268 | ||
269 | w. `ulimit' now prints the description of a resource in any error message | |
270 | relating to fetching or setting that resource's limits. | |
271 | ||
272 | x. The `snprintf' replacement now computes maximum values at compile | |
273 | time rather than using huge constants for things like long long. | |
274 | ||
275 | y. Interactive shells now ignore `set -n'. | |
276 | ||
277 | z. Changed the malloc bookkeeping information so that it's now 8 bytes | |
278 | instead of 12 on most 32-bit machines (saving 4 bytes per allocation), | |
279 | restoring 8-byte alignment. | |
280 | ||
281 | aa. The malloc error reporting code now attempts to print the file and line | |
282 | number of the call that caused the error. | |
283 | ||
284 | bb. Changed the redirection error reporting code to catch EBADF errors and | |
285 | report the file descriptor number rather than the file being redirected | |
286 | to or from (e.g., things like `exec 4242<x' where 4242 is an out-of-range | |
287 | file descriptor). | |
288 | ||
289 | cc. `printf', `echo -e', and the $'...' code now process only two hex digits | |
290 | after a `\x' escape sequence for compatibility with other shells, and | |
291 | the documentation was changed to note that the octal and hex escape | |
292 | sequences result in an eight-bit value rather than strict ASCII. | |
293 | ||
294 | 2. Changes to Readline | |
295 | ||
296 | a. The completion code now attempts to do a better job of preserving the | |
297 | case of the word the user typed if ignoring case in completions. | |
298 | ||
299 | b. Readline defaults to not echoing the input and lets the terminal | |
300 | initialization code enable echoing if there is a controlling terminal. | |
301 | ||
302 | c. The key binding code now processes only two hex digits after a `\x' | |
303 | escape sequence, and the documentation was changed to note that the | |
304 | octal and hex escape sequences result in an eight-bit value rather | |
305 | than strict ASCII. | |
306 | ||
307 | 3. New Features in Bash | |
308 | ||
309 | a. The builtin `ulimit' now takes two new non-numeric arguments: `hard', | |
310 | meaning the current hard limit, and `soft', meaning the current soft | |
311 | limit, in addition to `unlimited' | |
312 | ||
313 | b. `ulimit' now prints the option letter associated with a particular | |
314 | resource when printing more than one limit. | |
315 | ||
316 | c. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is | |
317 | one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively. | |
318 | ||
319 | 4. New Features in Readline | |
320 | ||
321 | a. New bindable variable `history-preserve-point'. If set, the history | |
322 | code attempts to place the user at the same location on each history | |
323 | line retrived with previous-history or next-history. | |
324 | ||
325 | ------------------------------------------------------------------------------ | |
326 | This document details the changes between this version, bash-2.05a-alpha1, | |
327 | and the previous version, bash-2.05-release. | |
328 | ||
329 | 1. Changes to Bash | |
330 | ||
331 | a. Better checks in the redirection code for write errors. | |
332 | ||
333 | b. bashbug now uses $TMPDIR, defaulting to /tmp, and uses mktemp(1) more | |
334 | portably. | |
335 | ||
336 | c. System-specific configuration changes for: Interix, OpenBSD, FreeBSD, | |
337 | MacOS X. | |
338 | ||
339 | d. Some more `const' cleanups through the code. | |
340 | ||
341 | e. Fixed a typo in the /dev/fd redirection code, better checks for valid | |
342 | numeric fds in /dev/fd. | |
343 | ||
344 | f. Fixed many parts of the shell to handle integer overflow more gracefully | |
345 | and to do more stringent checks for valid numbers. | |
346 | ||
347 | g. Fixed mksignames to include config.h. | |
348 | ||
349 | h. Fixed an uninitialized variable problem that could cause the shell to core | |
350 | dump when replacing characters in a string. | |
351 | ||
352 | i. New mechanism for updating the patch level when official patches are | |
353 | released (patchlevel.h). | |
354 | ||
355 | j. configure.in changed to no longer require external files _distribution and | |
356 | _patchlevel. | |
357 | ||
358 | k. Fixed non-interactive shell initialization problem when bash started as | |
359 | `bash -i filename'. | |
360 | ||
361 | l. Fixed printf builtin conversion error handling to be POSIX.2-conformant. | |
362 | ||
363 | m. autoconf-2.52 is now used to build configure; autoconf-2.50 or newer is | |
364 | required. Some of the bash-specific macros were removed, since they are | |
365 | now standard. | |
366 | ||
367 | n. Startup files and files read with source or `.' are no longer required to | |
368 | be regular files. | |
369 | ||
370 | o. Fixed core dump in builtin printf when user-supplied precision or field | |
371 | width is 0. | |
372 | ||
373 | p. Fixed builtin printf to treat a negative field width as a positive field | |
374 | width with left-justification. | |
375 | ||
376 | r. New unwind-protect implementation from Paul Eggert. | |
377 | ||
378 | s. Fixed an inadvertently-unclosed comment in the bash completion code that | |
379 | caused programmable completions to not add trailing slashes or spaces to | |
380 | completions. | |
381 | ||
382 | t. Fixed the process substitution code to cope better when stdin is closed. | |
383 | ||
384 | v. Fixes, mostly from Paul Eggert, for a few possible buffer overflows in | |
385 | the shell. | |
386 | ||
387 | w. Fixes from Paul Eggert to avoid most of the type casts in the shell code, | |
388 | and use more appropriate types for a number of variables. | |
389 | ||
390 | x. Command substition no longer inherits the DEBUG trap. | |
391 | ||
392 | y. Some fixes to the process substition code on machines without /dev/fd so | |
393 | that named pipes are not removed inappropriately. | |
394 | ||
395 | z. The loadable `getconf' builtin is now much more complete, and will become | |
396 | part of the shell in the future. | |
397 | ||
398 | aa. The select command no longer terminates on a `return', so it can be used | |
399 | to return from an enclosing function (as ksh does it). | |
400 | ||
401 | bb. Fixed the extended pattern matching code to behave better when presented | |
402 | with incorrectly-formed patterns. | |
403 | ||
404 | cc. Some changes were made with the intent of making cross-compilation easier. | |
405 | ||
406 | dd. The network code (/dev/tcp and /dev/udp redirections) uses getaddrinfo(3) | |
407 | if it's available, which adds support for IPv6. | |
408 | ||
409 | ee. Subshells of login shells no longer source ~/.bash_logout when they exit. | |
410 | ||
411 | ff. Fixes so that subshells don't exit inappropriately if the -e option has | |
412 | been set. | |
413 | ||
414 | gg. Restricted shells no longer allow functions to be exported. | |
415 | ||
416 | hh. Changes to the pattern matching code so extended pattern matching works | |
417 | on systems with deficient shared library implementations, like MacOS X. | |
418 | ||
419 | ii. Better error messages when a script with a leading `#!interp' fails | |
420 | to execute because of problems with `interp'. | |
421 | ||
422 | jj. Fixed `compgen' to handle the `-o default' option better. | |
423 | ||
424 | kk. Fixed the job control code to force an asynchronous process's standard | |
425 | input to /dev/null only if job control is not active. | |
426 | ||
427 | ll. Fixed a possible infinite recursion problem when `fc ""=abc' (a null | |
428 | pattern) is used to re-execute a previous command. | |
429 | ||
430 | mm. Fixed `declare [-a] var=value' to assign VALUE to element 0 if VAR is an | |
431 | array variable. Similarly for `declare [-a] var[N]=value'. This is like | |
432 | ksh93. | |
433 | ||
434 | nn. Fixed a bug that caused `read -a aname' to work even if ANAME had been | |
435 | declared readonly. | |
436 | ||
437 | oo. Fixed a possible integer overflow problem when constructing names for | |
438 | temporary files. | |
439 | ||
440 | 2. New Features in Bash | |
441 | ||
442 | a. Added support for DESTDIR installation root prefix, so you can do a | |
443 | `make install DESTDIR=bash-root' and do easier binary packaging. | |
444 | ||
445 | b. Added support for builtin printf "'" flag character as per latest POSIX | |
446 | drafts. | |
447 | ||
448 | c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from | |
449 | ISO C99). | |
450 | ||
451 | d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications | |
452 | (bash doesn't use very much of what it returns). | |
453 | ||
454 | e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts, | |
455 | but ignored. | |
456 | ||
457 | f. New read-only `shopt' option: login_shell. Set to non-zero value if the | |
458 | shell is a login shell. | |
459 | ||
460 | g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format. | |
461 | ||
462 | h. New `-A group/-g' option to complete and compgen; does group name | |
463 | completion. | |
464 | ||
465 | i. New `-t' option to `hash' to list hash values for each filename argument. | |
466 | ||
467 | j. New [-+]O invocation option to set and unset `shopt' options at startup. | |
468 | ||
469 | k. configure's `--with-installed-readline' option now takes an optional | |
470 | `=PATH' suffix to set the root of the tree where readline is installed | |
471 | to PATH. | |
472 | ||
473 | l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run | |
474 | whenever the shell would have exited if the -e option were enabled. | |
475 | It is not inherited by shell functions. | |
476 | ||
477 | m. `readonly', `export', and `declare' now print variables which have been | |
478 | given attributes but not set by assigning a value as just a command and | |
479 | a variable name (like `export foo') when listing, as the latest POSIX | |
480 | drafts require. | |
481 | ||
482 | n. `bashbug' now requires that the subject be changed from the default. | |
483 | ||
484 | o. configure has a new `--enable-largefile' option, like other GNU utilities. | |
485 | ||
486 | p. `for' loops now allow empty word lists after `in', like the latest POSIX | |
487 | drafts require. | |
488 | ||
489 | 3. Changes to Readline | |
490 | ||
491 | a. More `const' and type casting fixes. | |
492 | ||
493 | b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer | |
494 | overflow problems. | |
495 | ||
496 | c. The completion code no longer appends a `/' or ` ' to a match when | |
497 | completing a symbolic link that resolves to a directory name, unless | |
498 | the match does not add anything to the word being completed. This | |
499 | means that a tab will complete the word up to the full name, but not | |
500 | add anything, and a subsequent tab will add a slash. | |
501 | ||
502 | d. Fixed a trivial typo that made the vi-mode `dT' command not work. | |
503 | ||
504 | e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert. | |
505 | ||
506 | f. Fixed the tty code so that ^V works more than once. | |
507 | ||
508 | g. Changed the use of __P((...)) for function prototypes to PARAMS((...)) | |
509 | because the use of __P in typedefs conflicted g++ and glibc. | |
510 | ||
511 | 4. New Features in Readline | |
512 | ||
513 | a. Added extern declaration for rl_get_termcap to readline.h, making it a | |
514 | public function (it was always there, just not in readline.h). | |
515 | ||
516 | b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402, | |
517 | RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2. | |
518 | ||
519 | c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION. | |
520 | ||
521 | d. New bindable boolean readline variable: match-hidden-files. Controls | |
522 | completion of files beginning with a `.' (on Unix). Enabled by default. | |
523 | ||
524 | e. The history expansion code now allows any character to terminate a | |
525 | `:first-' modifier, like csh. | |
526 | ||
527 | f. The incremental search code remembers the last search string and uses | |
528 | it if ^R^R is typed without a search string. | |
529 | ||
530 | ------------------------------------------------------------------------------ | |
28ef6c31 JA |
531 | This document details the changes between this version, bash-2.05-release, |
532 | and the previous version, bash-2.05-beta2. | |
533 | ||
534 | 1. Changes to Bash | |
535 | ||
536 | a. Make sure we note that the first line of a multi-line command was not | |
537 | saved in the history if the tests for HISTCONTROL succeed, but the | |
538 | HISTIGNORE check fails. | |
539 | ||
540 | b. Fixed a bug in the pattern matching code that caused `[' to be treated | |
541 | as a special character inside a `[...]' bracket expression. | |
542 | ||
543 | c. Fixed a bug in the pattern matching code that caused `]' to terminate | |
544 | a bracket expression even if it was the first character after the `[' | |
545 | (or a leading `!' or `^'). | |
546 | ||
547 | d. Made a small change to report a more user-friendly error message if | |
548 | execve(2) fails because of an error with the interpreter in a script | |
549 | with a leading `#! interpreter'. | |
550 | ||
551 | e. If the OS does not support an exec(2) magic number of `#!', make sure we | |
552 | have a non-null interpreter name before attempting to execute it. | |
553 | ||
554 | f. Fixed a bug that caused the shell process to end up in a different | |
555 | process group than the controlling terminal if a job-control shell was | |
556 | run with `exec' in the startup files. | |
557 | ||
558 | g. When started in POSIX mode, either by `bash --posix', `bash -o posix', or | |
559 | `sh', $SHELLOPTS includes `posix' and POSIXLY_CORRECT is set. | |
560 | ||
561 | h. Fixed a problem that caused the `\W' prompt string escape sequence to | |
562 | expand to nothing when $PWD was `//'. | |
563 | ||
564 | i. The `bashbug' shell script no longer uses $(...) command substitution. | |
565 | ||
566 | j. When `set' is invoked without options in POSIX mode, it no longer prints | |
567 | the names and definitions of shell functions. | |
568 | ||
569 | 2. Changes to Readline | |
570 | ||
571 | a. rl_set_paren_blink_timeout() is now documented. | |
572 | ||
573 | b. Corrected history.3 man page: `$' is not in the default value of | |
574 | history_word_delimiters. | |
575 | ||
576 | c. If a hook function assigned to rl_event_hook sets rl_done to a non-zero | |
577 | value, rl_read_key() now immediately returns '\n' (which is assumed to | |
578 | be bound to accept-line). | |
579 | ||
580 | 3. New Features in Bash | |
581 | ||
582 | a. The `>&word' redirection now works in POSIX mode as it does by default, | |
583 | since POSIX.2 leaves it unspecified. | |
584 | ||
585 | ------------------------------------------------------------------------------ | |
586 | This document details the changes between this version, bash-2.05-beta2, | |
587 | and the previous version, bash-2.05-beta1. | |
588 | ||
589 | 1. Changes to Bash | |
590 | ||
591 | a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported. | |
592 | ||
593 | b. Fixed startup so posixly_correct is retained across subshells begun to | |
594 | execute scripts without a leading `#!'. | |
595 | ||
596 | c. Fixed a bug that caused $(< file) to not work in a (...) subshell. | |
597 | ||
598 | d. Added config support for Linux running on the IBM S390. | |
599 | ||
600 | e. Fixed a bug that caused bash to get its input pointer out of sync when | |
601 | reading commands through a pipe and running a command with standard | |
602 | input redirected from a file. | |
603 | ||
604 | f. Made a change so that command completion now makes about half as many | |
605 | stat(2) calls when searching the $PATH. | |
606 | ||
607 | g. Fixed a bug that caused variable assignments preceding `return' to not | |
608 | be propagated to the shell environment in POSIX mode. | |
609 | ||
610 | h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed | |
611 | on `word'. | |
612 | ||
613 | i. In POSIX mode, `break' and `continue' do not complain and return success | |
614 | if called when the shell is not executing a loop. | |
615 | ||
616 | j. Fixed `bash -o posix' to work the same as `bash --posix'. | |
617 | ||
618 | k. Fixed a bug where variable assignments preceding `eval' or `source/.' | |
619 | would not show up in the environment exported to subshells run by the | |
620 | commands. | |
621 | ||
622 | l. In POSIX mode, shells started to execute command substitutions inherit | |
623 | the value of the `-e' option from their parent shell. | |
624 | ||
625 | m. In POSIX mode, aliases are expanded even in non-interactive shells. | |
626 | ||
627 | n. Changed some of the job control messages to display the text required by | |
628 | POSIX.2 when the shell is in POSIX mode. | |
629 | ||
630 | o. Fixed a bug in `test' that caused it to occasionally return incorrect | |
631 | results when non-numeric arguments were supplied to `-t'. | |
632 | ||
633 | 2. Changes to Readline | |
634 | ||
635 | a. Some changes were made to avoid gcc warnings with -Wall. | |
636 | ||
637 | b. rl_get_keymap_by_name now finds keymaps case-insensitively, so | |
638 | `set keymap EMACS' works. | |
639 | ||
640 | c. The history file writing and truncation functions now return a useful | |
641 | status on error. | |
642 | ||
643 | d. Fixed a bug that could cause applications to dereference a NULL pointer | |
644 | if a NULL second argument was passed to history_expand(). | |
645 | ||
646 | 3. New Features in Bash | |
647 | ||
648 | a. doc/readline.3 has been moved to the readline distribution. | |
649 | ||
650 | 4. New Features in Readline | |
651 | ||
652 | a. New function, rl_get_screen_size (int *rows, int *columns), returns | |
653 | readline's idea of the screen dimensions. | |
654 | ||
655 | b. The timeout in rl_gather_tyi (readline keyboard input polling function) | |
656 | is now settable via a function (rl_set_keyboard_input_timeout()). | |
657 | ||
658 | c. Renamed the max_input_history variable to history_max_entries; the old | |
659 | variable is maintained for backwards compatibility. | |
660 | ||
661 | d. The list of characters that separate words for the history tokenizer is | |
662 | now settable with a variable: history_word_delimiters. The default | |
663 | value is as before. | |
664 | ||
665 | ------------------------------------------------------------------------------ | |
666 | This document details the changes between this version, bash-2.05-beta1, | |
667 | and the previous version, bash-2.05-alpha1. | |
668 | ||
669 | 1. Changes to Bash | |
670 | ||
671 | a. Changes to allow shared library and object building on the GNU Hurd. | |
672 | ||
673 | b. Fixes to the way exported functions are placed into the environment and | |
674 | cached. | |
675 | ||
676 | c. The globbing library once again respects locales when processing ranges | |
677 | in bracket expressions while doing pattern matching. | |
678 | ||
679 | d. System-specific configuration changes for: Tru 64, Interix | |
680 | ||
681 | e. Bashbug now uses /usr/bin/editor as one of the editing alternatives, and | |
682 | will use mktemp(1) or tempfile(1), if present, for temporary file creation. | |
683 | ||
684 | f. Bash no longer performs a binary file check on a script argument that's | |
685 | really a tty (like /dev/fd/0 or /dev/stdin). | |
686 | ||
687 | g. Fixed a bug in the execution of shell scripts that caused the effects of | |
688 | $BASH_ENV to be undone in some cases. | |
689 | ||
690 | h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly. | |
691 | ||
692 | i. Several changes to the job control code to avoid some signal state | |
693 | manipulation. | |
694 | ||
695 | j. The Bash malloc no longer blocks signals as often, which should make it | |
696 | faster. | |
697 | ||
698 | k. Fixed a parsing bug that did not allow backslash to escape a single quote | |
699 | inside a $'...' construct. | |
700 | ||
701 | l. Fixed a bug that caused things like ${var:=$'value'} to be parsed | |
702 | incorrectly. This showed up in newer versions of autoconf. | |
703 | ||
704 | m. Fixed a bug in the bash-specific readline initialization that caused | |
705 | key bindings to bash-specific function names appearing in .inputrc to | |
706 | not be honored. | |
707 | ||
708 | n. Bash now sets the file descriptor it uses to save the file descriptor | |
709 | opened on a shell script to close on exec. | |
710 | ||
711 | o. Fixed a bug in the prompt string decoding that caused it to misbehave | |
712 | when presented an octal sequence of fewer than three characters. | |
713 | ||
714 | p. Fixed the `test' builtin to return an error if `[' is supplied a single | |
715 | argument that is not `]'. | |
716 | ||
717 | q. Fixed a bug that caused subshells started to run executable shell scripts | |
718 | without a leading `#!' to incorrectly inherit an argument list preceding | |
719 | a shell builtin (like such a script called from a script sourced with `.', | |
720 | where there were variable assignments preceding the `.' command) | |
721 | ||
722 | r. Fixed a bug that caused changes to variables supplied in an assignment | |
723 | statement preceding a shell builtin to not be honored (like a script | |
724 | run with `.'). | |
725 | ||
726 | s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values | |
727 | when the shell is started. | |
728 | ||
729 | t. Fixed a bug that caused SIGINT to kill shell scripts after the script | |
730 | called `wait'. | |
731 | ||
732 | u. The `fc' builtin now tries to create its temporary files in the directory | |
733 | named by $TMPDIR. | |
734 | ||
735 | v. Bash no longer calls any Readline functions or uses any Readline variables | |
736 | not declared in readline.h. | |
737 | ||
738 | w. Fixed a bug that caused some substitutions involving $@ to not be split | |
739 | correctly, especially expansions of the form ${paramterOPword}. | |
740 | ||
741 | x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it | |
742 | appears in the initial environment. | |
743 | ||
744 | y. Fixed a couple of problems with shell scripts without a leading `#!' | |
745 | being executed out of shell functions that could cause core dumps if | |
746 | such a script attempted to execute `return'. | |
747 | ||
748 | z. Fixed a problem with the `-nt' and `-ot' binary operators for the | |
749 | `test/[' builtin and the `[[' conditional command that caused wrong | |
750 | return values if one of the file arguments did not exist. | |
751 | ||
752 | aa. Fixed a bug that caused non-interactive shells which had previously | |
753 | executed `shopt -s expand_aliases' to fail to expand aliases in a | |
754 | command like `(command) &'. | |
755 | ||
756 | 2. Changes to Readline | |
757 | ||
758 | a. Changes to make most (but not yet all -- there is still crlf()) of the | |
759 | exported readline functions declared in readline.h have an rl_ prefix. | |
760 | ||
761 | b. More `const' changes in function arguments, mostly for completion | |
762 | functions. | |
763 | ||
764 | c. Fixed a bug in rl_forward that could cause the point to be set to before | |
765 | the beginning of the line in vi mode. | |
766 | ||
767 | d. Fixed a bug in the callback read-char interface to make it work when a | |
768 | readline function pushes some input onto the input stream with | |
769 | rl_execute_next (like the incremental search functions). | |
770 | ||
771 | e. Fixed a file descriptor leak in the history file manipulation code that | |
772 | was tripped when attempting to truncate a non-regular file (like | |
773 | /dev/null). | |
774 | ||
775 | f. Some existing variables are now documented and part of the public | |
776 | interface (declared in readline.h): rl_explict_arg, rl_numeric_arg, | |
777 | rl_editing_mode, rl_last_func. | |
778 | ||
779 | g. Renamed rltty_set_default_bindings to rl_tty_set_default_bindings and | |
780 | crlf to rl_crlf, so there are no public functions declared in readline.h | |
781 | without an `rl_' prefix. The old functions still exist for backwards | |
782 | compatibility. | |
783 | ||
784 | 3. New Features in Bash | |
785 | ||
786 | a. A new loadable builtin, realpath, which canonicalizes and expands symlinks | |
787 | in pathname arguments. | |
788 | ||
789 | b. When `set' is called without options, it prints function defintions in a | |
790 | way that allows them to be reused as input. This affects `declare' and | |
791 | `declare -p' as well. | |
792 | ||
793 | 4. New Features in Readline | |
794 | ||
795 | a. New application-callable function rl_set_prompt(const char *prompt): | |
796 | expands its prompt string argument and sets rl_prompt to the result. | |
797 | ||
798 | b. New application-callable function rl_set_screen_size(int rows, int cols): | |
799 | public method for applications to set readline's idea of the screen | |
800 | dimensions. | |
801 | ||
802 | c. The history example program (examples/histexamp.c) is now built as one | |
803 | of the examples. | |
804 | ||
805 | ------------------------------------------------------------------------------ | |
806 | This document details the changes between this version, bash-2.05-alpha1, | |
807 | and the previous version, bash-2.04-release. | |
808 | ||
809 | 1. Changes to Bash | |
810 | ||
811 | a. A fix was made to allow newlines in compond array assignments. | |
812 | ||
813 | b. configure now checks for real-time signals with unusable values. | |
814 | ||
815 | c. Interactive shells no longer exit if a substitution fails because of an | |
816 | unset variable within a sourced file. | |
817 | ||
818 | d. Fixed a problem with incorrect matching of extended glob patterns when | |
819 | doing pattern substitution. | |
820 | ||
821 | e. `{' is now quoted by the completion code when it appears in a filename. | |
822 | ||
823 | f. Fixed an error in pattern matching that caused the matcher to not | |
824 | correctly skip the rest of a bracket expression after a character | |
825 | matched. | |
826 | ||
827 | g. Fixed a bug in the IFS word splitting code to make a non-whitespace IFS | |
828 | character preceded by IFS whitespace part of the current delimiter rather | |
829 | than generating a separate field. | |
830 | ||
831 | h. The {!prefix@} expansion now generates separate words, analogous to $@, | |
832 | when double-quoted. | |
833 | ||
834 | i. Command substitution now ignores NUL bytes in the command output, and the | |
835 | parser ignores them on input. | |
836 | ||
837 | j. A fix was made to the job control code to prevent hanging processes when | |
838 | the shell thinks background processes are running but the kernel returns | |
839 | -1/ECHILD from waitpid(). | |
840 | ||
841 | k. `pwd' now prints an error message if the write fails when displaying the | |
842 | current directory. | |
843 | ||
844 | l. When in POSIX mode, the shell prints trap dispostions without a leading | |
845 | `SIG' in the signal specification. | |
846 | ||
847 | m. Fixed a parser bug that caused the current command's line count to be | |
848 | messed up by a compound array assignment. | |
849 | ||
850 | n. Fixed a bug in the unwind-protect code that caused bad behavior on machines | |
851 | where ints and pointers are not the same size. | |
852 | ||
853 | o. System-specific configure changes for: MacOS X. | |
854 | ||
855 | p. Changes for Cygwin to translate \r\n and \r to \n and to set file | |
856 | descriptors used for reading input to text mode in various places. | |
857 | ||
858 | q. Fixed a bug that caused `!' to occasionally not be honored when in | |
859 | a (...) subshell. | |
860 | ||
861 | r. Bash no longer assumes that getcwd() will return any useful error message | |
862 | in the buffer passed as an argument if the call fails. | |
863 | ||
864 | s. The `source', `.', and `fc' builtins no longer check whether a file is | |
865 | binary before reading commands from it. | |
866 | ||
867 | t. Subshells no longer turn off job control when they exit, since that | |
868 | sometimes resulted in the terminal being reset to the wrong process | |
869 | group. | |
870 | ||
871 | u. The history code no longer tries to save the second and subsequent lines | |
872 | of a multi-line command if the first line was not saved. | |
873 | ||
874 | v. The history saving code now does a better job of saving blank lines in a | |
875 | multi-line command. | |
876 | ||
877 | w. Removed a `feature' that made `ulimit' silently translate `unlimited' to | |
878 | the current hard limit, which obscured some kernel error returns. | |
879 | ||
880 | x. Fixed the grammar so that `}' is recognized as a reserved word after | |
881 | another reserved word, rather than requiring a `;' or newline. This | |
882 | means that constructs like | |
883 | ||
884 | { { echo a b c ; } } | |
885 | ||
886 | work as expected. | |
887 | ||
888 | y. Conditional commands ([[...]]) now perform tilde expansion on their | |
889 | arguments. | |
890 | ||
891 | z. Noted in the documentation that `set -a' will cause functions to be | |
892 | exported if they are defined after `set -a' is executed. | |
893 | ||
894 | aa. When an interactive login shell starts, if $PWD and $HOME refer to the | |
895 | same directory but are not the same string, $PWD is set to $HOME. | |
896 | ||
897 | bb. Fixed `printf' to handle invalid floating point numbers better. | |
898 | ||
899 | cc. Temporary files are now created with random filenames, to improve security. | |
900 | ||
901 | dd. The readline initialization code now binds the custom bash functions and | |
902 | key bindings after the readline defaults are set up. | |
903 | ||
904 | ee. Fixed the `source' builtin to no longer overwrite a shell function's | |
905 | argument list, even if the sourced file changes the positional parameters. | |
906 | ||
907 | ff. A bug fix was made in the expansion of `$*' in contexts where it should | |
908 | not be split, like assignment statements. | |
909 | ||
910 | gg. Fixed a bug in the parameter substring expansion to handle conditional | |
911 | arithmetic expressions ( exp ? val1 : val2 ) without cutting the expression | |
912 | off at the wrong `:'. | |
913 | ||
914 | hh. The `<>' redirection is no longer subject to the current setting of | |
915 | `noclobber', as POSIX.2 specifies. | |
916 | ||
917 | ii. Fixed a bug in the conditional command parsing code that caused expressions | |
918 | in parentheses to occasionally be parsed incorrectly. | |
919 | ||
920 | jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or | |
921 | {...} to follow the )) without an intervening list terminator. | |
922 | ||
923 | kk. `printf' now treats `\E' the same as `\e' when performing backslash escape | |
924 | expansion for the `%b' format specifier. | |
925 | ||
926 | ll. When in POSIX mode, the shell no longer searches the current directory for | |
927 | a file to be sourced with `.' or `source' if `.' is not in $PATH. | |
928 | ||
929 | mm. Interactive comments are no longer turned off when POSIX mode is disabled. | |
930 | ||
931 | nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's | |
932 | environment when it starts up. | |
933 | ||
934 | oo. Fixed a bug in the `command' builtin so the effect of a command like | |
935 | `command exec 4<file' is as if the `command' had been omitted. | |
936 | ||
937 | pp. ${foo[@]} and ${foo[*]} now work as in ksh93 if `foo' is not an array | |
938 | variable. | |
939 | ||
940 | qq. ${#foo[X]}, where X is 0, @, or *, now work as in ksh93 if `foo' is not | |
941 | an array variable. | |
942 | ||
943 | rr. The shell's idea of an absolute pathname now takes into account a | |
944 | possible drive specification on Cygwin and other Windows systems. | |
945 | ||
946 | ss. Fixed a bug which caused incorrect parsing of some multi-character | |
947 | constructs if they were split across input lines with backslash-newline | |
948 | line continuation. | |
949 | ||
950 | tt. Fixed a bug that caused restricted shell mode to be set inappropriately | |
951 | when trying to execute a shell script without a leading `#!'. | |
952 | ||
953 | uu. Shell function definitions no longer require that the body be a group | |
954 | command ( {...} ), as POSIX.2 requires. | |
955 | ||
956 | vv. The `cd' and `pwd' builtins now process symlinks in pathnames internally | |
957 | and should require many fewer calls to getcwd(). | |
958 | ||
959 | ww. Fixed a bug that caused a pipeline's process group to be set incorrectly | |
960 | if one of the pipeline elements contained a command substitution. | |
961 | ||
962 | xx. Fixed a bug that caused core dumps when expanding the value of HISTIGNORE. | |
963 | ||
964 | yy. The output of `set' is now quoted using $'...' so invisible characters are | |
965 | displayed as escape sequences. | |
966 | ||
967 | zz. Fixed the help text for `unset', since PATH and IFS may both be unset. | |
968 | ||
969 | aaa. The shell no longer puts directory names into the command hash table. | |
970 | ||
971 | bbb. Fixed a bug in `read' that caused it to occasionally free memory twice if | |
972 | it was interrupted after reading a large amount of data. | |
973 | ||
974 | ccc. Assignment statements that attempt to assign values to readonly variables | |
975 | now cause the command to return an error status. | |
976 | ||
977 | ddd. Fixed a bug that could cause incorrect output if a $(<file) construct was | |
978 | interrupted. | |
979 | ||
980 | eee. GROUPS and FUNCNAME now return an error status when assignment is | |
981 | attempted, but may be unset (in which case they lose their special | |
982 | properties). In all respects except unsetting, they are readonly. | |
983 | ||
984 | fff. The string-to-integer conversion code now ignores trailing whitespace in | |
985 | the string, even if strtol(3) does not. | |
986 | ||
987 | ggg. The tcsh magic-space function now does a better job of inserting the | |
988 | space close to where the point was before the history expansion, rather | |
989 | than just appending it. | |
990 | ||
991 | hhh. Fixed a bug which caused a file sourced from an interactive shell to | |
992 | fill up the jobs table if it ran lots of jobs. | |
993 | ||
994 | iii. Fixed a bug in the parameter pattern substitution code to avoid infinite | |
995 | recursion on zero-length matches. | |
996 | ||
997 | 2. Changes to Readline | |
998 | ||
999 | a. When setting the terminal attributes on systems using `struct termio', | |
1000 | readline waits for output to drain before changing the attributes. | |
1001 | ||
1002 | b. A fix was made to the history word tokenization code to avoid attempts to | |
1003 | dereference a null pointer. | |
1004 | ||
1005 | c. Readline now defaults rl_terminal_name to $TERM if the calling application | |
1006 | has left it unset, and tries to initialize with the resultant value. | |
1007 | ||
1008 | d. Instead of calling (*rl_getc_function)() directly to get input in certain | |
1009 | places, readline now calls rl_read_key() consistently. | |
1010 | ||
1011 | e. Fixed a bug in the completion code that allowed a backslash to quote a | |
1012 | single quote inside a single-quoted string. | |
1013 | ||
1014 | f. rl_prompt is no longer assigned directly from the argument to readline(), | |
1015 | but uses memory allocated by readline. This allows constant strings to | |
1016 | be passed to readline without problems arising when the prompt processing | |
1017 | code wants to modify the string. | |
1018 | ||
1019 | g. Fixed a bug that caused non-interactive history searches to return the | |
1020 | wrong line when performing multiple searches backward for the same string. | |
1021 | ||
1022 | h. Many variables, function arguments, and function return values are now | |
1023 | declared `const' where appropriate, to improve behavior when linking with | |
1024 | C++ code. | |
1025 | ||
1026 | i. The control character detection code now works better on systems where | |
1027 | `char' is unsigned by default. | |
1028 | ||
1029 | j. The vi-mode numeric argument is now capped at 999999, just like emacs mode. | |
1030 | ||
1031 | k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been | |
1032 | replaced with a set of specific prototyped typedefs, though they are | |
1033 | still in the readline header files for backwards compatibility. | |
1034 | ||
1035 | m. Nearly all of the (undocumented) internal global variables in the library | |
1036 | now have an _rl_ prefix -- there were a number that did not, like | |
1037 | screenheight, screenwidth, alphabetic, etc. | |
1038 | ||
1039 | n. The ding() convenience function has been renamed to rl_ding(), though the | |
1040 | old function is still defined for backwards compatibility. | |
1041 | ||
1042 | o. The completion convenience functions filename_completion_function, | |
1043 | username_completion_function, and completion_matches now have an rl_ | |
1044 | prefix, though the old names are still defined for backwards compatibility. | |
1045 | ||
1046 | p. The functions shared by readline and bash (linkage is satisfied from bash | |
1047 | when compiling with bash, and internally otherwise) now have an sh_ prefix. | |
1048 | ||
1049 | q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so | |
1050 | that the `soname' contains only the major version number rather than the | |
1051 | major and minor numbers. | |
1052 | ||
1053 | r. Fixed a redisplay bug that occurred when the prompt spanned more than one | |
1054 | physical line and contained invisible characters. | |
1055 | ||
1056 | 3. New Features in Bash | |
1057 | ||
1058 | a. Added a new `--init-file' invocation argument as a synonym for `--rcfile', | |
1059 | per the new GNU coding standards. | |
1060 | ||
1061 | b. The /dev/tcp and /dev/udp redirections now accept service names as well as | |
1062 | port numbers. | |
1063 | ||
1064 | c. `complete' and `compgen' now take a `-o value' option, which controls some | |
1065 | of the aspects of that compspec. Valid values are: | |
1066 | ||
1067 | default - perform bash default completion if programmable | |
1068 | completion produces no matches | |
1069 | dirnames - perform directory name completion if programmable | |
1070 | completion produces no matches | |
1071 | filenames - tell readline that the compspec produces filenames, | |
1072 | so it can do things like append slashes to | |
1073 | directory names and suppress trailing spaces | |
1074 | ||
1075 | 4. New Features in Readline | |
1076 | ||
1077 | a. The blink timeout for paren matching is now settable by applications. | |
1078 | ||
1079 | b. _rl_executing_macro has been renamed to rl_executing_macro, which means | |
1080 | it's now part of the public interface. | |
1081 | ||
1082 | c. Readline has a new variable, rl_readline_state, which is a bitmap that | |
1083 | encapsulates the current state of the library; intended for use by | |
1084 | callbacks and hook functions. | |
1085 | ||
1086 | ------------------------------------------------------------------------------ | |
bb70624e JA |
1087 | This document details the changes between this version, bash-2.04-release, |
1088 | and the previous version, bash-2.04-beta5. | |
1089 | ||
1090 | 1. Changes to Bash | |
1091 | ||
1092 | a. Better compile-time and configure-time checks for the necessity of | |
1093 | inet_aton(). | |
1094 | ||
1095 | b. A bug was fixed in the expansion of "${@:-}" when there are positional | |
1096 | parameters. | |
1097 | ||
1098 | c. A typo was fixed in the output of `complete'. | |
1099 | ||
1100 | d. The matches generated for a word by the `-W' argument to complete and | |
1101 | compgen are now matched against the word being completed, and only | |
1102 | matches are returned as the result. | |
1103 | ||
1104 | e. Some fixes were made for systems which do not restart read(2) when a | |
1105 | signal caught by bash is received. | |
1106 | ||
1107 | f. A bug was fixed which caused the umask to be set to 0 when an invalid | |
1108 | symbolic mode mask was parsed. | |
1109 | ||
1110 | g. Fixed a bug that could cause a core dump if a SIGCHLD was received while | |
1111 | performing an assignment statement using command substitution. | |
1112 | ||
1113 | h. Changed the word splitting function for programmable completion so cases | |
1114 | in which the cursor is between words are handled a bit better. | |
1115 | ||
1116 | 2. Changes to Readline | |
1117 | ||
1118 | a. rl_funmap_names() is now documented. | |
1119 | ||
1120 | 3. New Features in Bash | |
1121 | ||
1122 | a. The LC_NUMERIC variable is now treated specially, and used to set the | |
1123 | LC_NUMERIC locale category for number formatting, e.g., when `printf' | |
1124 | displays floating-point numbers. | |
1125 | ||
1126 | ------------------------------------------------------------------------------ | |
1127 | This document details the changes between this version, bash-2.04-beta5, | |
1128 | and the previous version, bash-2.04-beta4. | |
1129 | ||
1130 | 1. Changes to Bash | |
1131 | ||
1132 | a. A couple of changes were made to the Makefiles for easier building on | |
1133 | non-Unix systems. | |
1134 | ||
1135 | b. Fixed a bug where the current prompt would be set to $PS2 at startup. | |
1136 | ||
1137 | c. The shell script that tests an already-installed version was changed to | |
1138 | remove the directory it created its test programs in at exit. | |
1139 | ||
1140 | d. Several changes were made to the code that tokenizes an input line for | |
1141 | the programmable completion code. Shell metacharacters will now appear | |
1142 | as individual words in the word list passed to the completion functions. | |
1143 | Some of the example completion shell functions were changed to understand | |
1144 | redirection operators. | |
1145 | ||
1146 | e. A bug was fixed that, under obscure circumstances, could confuse the | |
1147 | parser when a shell function was run by the programmable completion code. | |
1148 | ||
1149 | f. A bug was fixed in the ulimit builtin for systems not using getrlimit(). | |
1150 | ||
1151 | g. The execution code now propagates the correct exit status back to the rest | |
1152 | of the code if the return value of a subshell command was being inverted. | |
1153 | Some new test cases for inverting return values with the `!' reserved | |
1154 | word have been added. | |
1155 | ||
1156 | h. Negative exponents in the arithmetic evaluation of v**e now return an | |
1157 | evaluation error. | |
1158 | ||
1159 | i. A bug that caused bash to check the wrong process in a pipeline for | |
1160 | abnormal termination (and consequently resetting the terminal attributes) | |
1161 | was fixed. | |
1162 | ||
1163 | j. Fixed a bug that caused $PS2 to be displayed after PROMPT_COMMAND was | |
1164 | executed. | |
1165 | ||
1166 | 2. Changes to Readline | |
1167 | ||
1168 | 1. Fixed a bug in a C preprocessor define that caused the keypad control | |
1169 | functions to be compiled out for all platforms except DJGPP. | |
1170 | ||
1171 | ------------------------------------------------------------------------------ | |
1172 | This document details the changes between this version, bash-2.04-beta4, | |
1173 | and the previous version, bash-2.04-beta3. | |
1174 | ||
1175 | 1. Changes to Bash | |
1176 | ||
1177 | a. A couple of changes were made to the redirection to attempt to avoid | |
1178 | race conditions and malicious file replacement. | |
1179 | ||
1180 | 2. A change was made to the string evaluation code (used for command | |
1181 | substitution, `eval', and the `.' builtin) to fix an obscure core | |
1182 | dump on alpha machines. | |
1183 | ||
1184 | 3. A bug that caused $LINENO to be wrong when executing arithmetic for | |
1185 | commands was fixed. | |
1186 | ||
1187 | 4. A couple of memory leaks in the programmable completion code were fixed. | |
1188 | ||
1189 | 5. A bug that could cause a core dump by freeing memory twice during a call | |
1190 | to `eval' if `set -u' had been enabled and an undefined variable was | |
1191 | referenced was fixed. | |
1192 | ||
1193 | ------------------------------------------------------------------------------ | |
1194 | This document details the changes between this version, bash-2.04-beta3, | |
1195 | and the previous version, bash-2.04-beta2. | |
1196 | ||
1197 | 1. Changes to Bash | |
1198 | ||
1199 | a. Bash should run the appropriate startup files when invoked by ssh2. | |
1200 | ||
1201 | b. Fixed a bug in the parsing of conditional commands that could cause a | |
1202 | core dump. | |
1203 | ||
1204 | c. Fixed a bug in parsing job specifications that occasionally caused | |
1205 | core dumps when an out-of-range job was referenced. | |
1206 | ||
1207 | d. Fixed the `type' and `command' builtins to do better reporting of | |
1208 | commands that are not found in $PATH or the hash table. | |
1209 | ||
1210 | e. Fixed a POSIX.2 compliance problem in the command builtin -- commands | |
1211 | are supposed to be reported as full pathnames. | |
1212 | ||
1213 | f. The `echo' builtin now returns failure if a write error occurs. | |
1214 | ||
1215 | g. Fixed a bug which caused the locale to not be reset correctly when | |
1216 | LC_ALL was unset. | |
1217 | ||
1218 | h. Changed description of `getopts' in man page and reference manual to make | |
1219 | it clear that option characters may be characters other than letters. | |
1220 | ||
1221 | i. If the shell exits while in a function, make sure that any trap on EXIT | |
1222 | doesn't think the function is still executing. | |
1223 | ||
1224 | j. Bashbug now tries harder to find a usable editor if $EDITOR is not set, | |
1225 | rather than simply defaulting to `emacs'. | |
1226 | ||
1227 | k. Changes to the scripts that guess and canonicalize the system type, from | |
1228 | the latest `automake' distribution via Debian. | |
1229 | ||
1230 | l. When using named pipes for process substitution, make sure the file | |
1231 | descriptors opened for reading are set to non-blocking mode. | |
1232 | ||
1233 | m. Fixed a bug that caused termination of pipelines that are killed by a | |
1234 | signal to not be reported in some cases. | |
1235 | ||
1236 | n. When not in literal-history mode, shell comment lines are not added to | |
1237 | the history list. | |
1238 | ||
1239 | o. When running in POSIX.2 mode, bash no longer performs word splitting on | |
1240 | the expanded value of the word supplied as the filename argument to | |
1241 | redirection operators. | |
1242 | ||
1243 | p. The prompt string decoding code now backslash-quotes only characters that | |
1244 | are special within double quotes when expanding the \w and \W escape | |
1245 | sequences. | |
1246 | ||
1247 | q. Fixed a bug in the prompt decoding code that could cause a non-interactive | |
1248 | shell to seg fault if `\u' was used in PS4 and the shell was in xtrace | |
1249 | mode. | |
1250 | ||
1251 | r. Fixed a bug that caused function definitions to be printed with any | |
1252 | redirections that should be attached to the entire function before the | |
1253 | closing brace. | |
1254 | ||
1255 | s. Changed the tilde expansion code for Cygwin systems to avoid creating | |
1256 | pathnames beginning with `//' if $HOME == `/'. | |
1257 | ||
1258 | t. Fixed a couple of autoconf tests to avoid creating files with fixed names | |
1259 | in /tmp. | |
1260 | ||
1261 | u. The `trap' and `kill' builtins now know the names of the POSIX.1b real- | |
1262 | time signals on systems which support them. | |
1263 | ||
1264 | 2. Changes to Readline | |
1265 | ||
1266 | a. Fixed a problem with the single-quote quoting function that could cause | |
1267 | buffer overflows. | |
1268 | ||
1269 | b. Fixed a bug that caused incorrect `stat characters' to be printed if | |
1270 | the files being completed were in the root directory and visible-stats | |
1271 | was enabled. | |
1272 | ||
1273 | 3. New Features in Bash | |
1274 | ||
1275 | a. There is a new `rbash.1' manual page, from the Debian release. | |
1276 | ||
1277 | b. The `--enable-usg-echo-default' option to `configure' has been renamed to | |
1278 | `--enable-xpg-echo-default'. The old option is still there for backwards | |
1279 | compatibility. | |
1280 | ||
1281 | ------------------------------------------------------------------------------ | |
1282 | This document details the changes between this version, bash-2.04-beta2, | |
1283 | and the previous version, bash-2.04-beta1. | |
1284 | ||
1285 | 1. Changes to Bash | |
1286 | ||
1287 | a. Fixed a bug that could cause pipes to be closed inappropriately in | |
1288 | some obscure cases. | |
1289 | ||
1290 | b. Fixed a bug that caused creation of the exported environment to clobber | |
1291 | the current command string if there were any exported shell functions. | |
1292 | ||
1293 | c. Some changes were made to reduce bash's memory usage. | |
1294 | ||
1295 | d. Fixed a problem with programmable completion and filenames to be | |
1296 | completed containing quote characters. | |
1297 | ||
1298 | e. Changed the code the removes named pipes created for the <(...) and >(...) | |
1299 | expansions to defer removal until after any current shell function has | |
1300 | finished executing. | |
1301 | ||
1302 | f. Fixed a bug in `select' which caused it to not handle the `continue' | |
1303 | builtin correctly. | |
1304 | ||
1305 | g. Autoconf tests added for cygwin32 and mingw32. | |
1306 | ||
1307 | 2. New Features in Bash | |
1308 | ||
1309 | a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc' | |
1310 | (which is still there for backwards compatibility). | |
1311 | ||
1312 | ------------------------------------------------------------------------------ | |
1313 | This document details the changes between this version, bash-2.04-beta1, | |
1314 | and the previous version, bash-2.04-alpha1. | |
1315 | ||
1316 | 1. Changes to Bash | |
1317 | ||
1318 | a. Fixed a bug in the programmable completion code that occurred when | |
1319 | trying to complete command lines containing a `;' or `@'. | |
1320 | ||
1321 | b. The file descriptor from which the shell is reading a script is now | |
1322 | moved to a file descriptor above the user-addressible range. | |
1323 | ||
1324 | c. Changes to `printf' so that it can handle integers beginning with 0 | |
1325 | or 0x as octal and hex, respectively. | |
1326 | ||
1327 | d. Fixes to the programmable completion code so it handles nonsense like | |
1328 | `compgen -C xyz' gracefully. | |
1329 | ||
1330 | e. The shell no longer modifies the signal handler for SIGPROF, allowing | |
1331 | profiling again on certain systems. | |
1332 | ||
1333 | f. The shell checks for a new window size, if the user has requested it, | |
1334 | after a process exits due to a signal. | |
1335 | ||
1336 | g. Fixed a bug with variables with null values in a program's temporary | |
1337 | environment and the bash getenv() replacement. | |
1338 | ||
1339 | h. `declare' and the other builtins that take variable assignments as | |
1340 | arguments now honor `set -a' and mark modified variables for export. | |
1341 | ||
1342 | i. Some changes were made for --dump-po-strings mode when writing strings | |
1343 | with embedded newlines. | |
1344 | ||
1345 | j. The code that caches export strings from the initial environment now | |
1346 | duplicates the string rather than just pointing into the environment. | |
1347 | ||
1348 | k. The filename completion quoting code now uses single quotes by default | |
1349 | if the filename being completed contains newlines, since \<newline> | |
1350 | has a special meaning to the parser. | |
1351 | ||
1352 | l. Bash now uses typedefs bits32_t and u_bits32_t instead of int32_t and | |
1353 | u_int32_t, respectively to avoid conflicts on certain Unix versions. | |
1354 | ||
1355 | m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x. | |
1356 | ||
1357 | n. Fixed a problem with hostname-to-ip-address translation in the | |
1358 | /dev/(tcp|udp)/hostname/port redirection code. | |
1359 | ||
1360 | o. The texinfo manual has been reorganized slightly. | |
1361 | ||
1362 | p. Filename generation (globbing) range comparisons in bracket expressions | |
1363 | no longer use strcoll(3) even if it is available, since it has unwanted | |
1364 | effects in certain locales. | |
1365 | ||
1366 | q. Fixed a cosmetic problem in the source that caused the shell to not | |
1367 | compile if DPAREN_ARITHMETIC was not defined but ARITH_FOR_COMMAND was. | |
1368 | ||
1369 | r. Fixed a bug in the here-document code tripped when the file descriptor | |
1370 | opened to the file containing the text of the here document was the | |
1371 | same as a redirector specified by the user. | |
1372 | ||
1373 | s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline' | |
1374 | in `time ! pipeline'. | |
1375 | ||
1376 | t. Fixed a bug with the `wait' builtin which manifested itself when an | |
1377 | interrupt was received while the shell was waiting for asynchronous | |
1378 | processes in a shell script. | |
1379 | ||
1380 | u. Fixed the DEBUG trap code so that it has the correct value of $?. | |
1381 | ||
1382 | v. Fixed a bug in the parameter pattern substitution code that could cause | |
1383 | the shell to attempt to free unallocated memory if the pattern started | |
1384 | with `/' and an expansion error occurs. | |
1385 | ||
1386 | w. Fixed a bug in the positional parameter substring code that could | |
1387 | cause the shell to loop freeing freed memory. | |
1388 | ||
1389 | x. Fixed a bug in the positional parameter pattern substitution code so | |
1390 | that it correctly handles null replacement strings with a pattern | |
1391 | string prefixed with `%' or `#'. | |
1392 | ||
1393 | y. The shell no longer attempts to import functions from the environment if | |
1394 | started with `-n'. | |
1395 | ||
1396 | z. Fixed a bug that caused `return' in a command substitution executed in | |
1397 | a shell function to return from the function in a subshell and continue | |
1398 | execution. | |
1399 | ||
1400 | aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell | |
1401 | is restricted. | |
1402 | ||
1403 | bb. The wait* job control functions now behave better if called when there | |
1404 | are no unwaited-for children. | |
1405 | ||
1406 | cc. Command substitution no longer unconditionally disables job control in | |
1407 | the subshell started to run the command. | |
1408 | ||
1409 | dd. A bug was fixed that occasionally caused traps to mess up the parser | |
1410 | state. | |
1411 | ||
1412 | ee. `bashbug' now honors user headers in the mail message it sends. | |
1413 | ||
1414 | ff. A bug was fixed that caused the `:p' history modifier to not print the | |
1415 | history expansion if the `histverify' option was set. | |
1416 | ||
1417 | 2. Changes to Readline | |
1418 | ||
1419 | a. Fixed a bug in the redisplay code for lines with more than 256 line | |
1420 | breaks. | |
1421 | ||
1422 | b. A bug was fixed which caused invisible character markers to not be | |
1423 | stripped from the prompt string if the terminal was in no-echo mode. | |
1424 | ||
1425 | c. Readline no longer tries to get the variables it needs for redisplay | |
1426 | from the termcap entry if the calling application has specified its | |
1427 | own redisplay function. Readline treats the terminal as `dumb' in | |
1428 | this case. | |
1429 | ||
1430 | d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape | |
1431 | sequences is redrawn correctly. | |
1432 | ||
1433 | 3. New Features in Bash | |
1434 | ||
1435 | a. `bashbug' now accepts `--help' and `--version' options. | |
1436 | ||
1437 | b. There is a new `xpg_echo' option to `shopt' that controls the behavior | |
1438 | of echo with respect to backslash-escaped characters at runtime. | |
1439 | ||
1440 | ------------------------------------------------------------------------------ | |
1441 | This document details the changes between this version, bash-2.04-alpha1, | |
1442 | and the previous version, bash-2.04-devel. | |
1443 | ||
1444 | 1. Changes to Bash | |
1445 | ||
1446 | a. Fixed a bug that could cause core dumps when performing substring | |
1447 | expansion. | |
1448 | ||
1449 | b. Shared object configuration changes for: Solaris, OSF/1 | |
1450 | ||
1451 | c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities | |
1452 | for pathname expansion now understands GLOBIGNORE. | |
1453 | ||
1454 | d. The code that implements `eval' was changed to save the value of the | |
1455 | current prompt, so an eval in a shell function called by the programmable | |
1456 | completion code will not change the prompt to $PS2. | |
1457 | ||
1458 | e. Restored the undocumented NON_INTERACTIVE_LOGIN_SHELLS #define to | |
1459 | config-top.h. If this is defined, all login shells will read the | |
1460 | startup files, not just interactive and non-interactive started with | |
1461 | the `--login' option. | |
1462 | ||
1463 | f. Fixed a bug that caused the expansion code to occasionally dump core if | |
1464 | IFS contained characters > 128. | |
1465 | ||
1466 | g. Fixed a problem with the grammar so that a newline is not required | |
1467 | after the `))' in the new-style arithmetic for statement; a semicolon | |
1468 | may be used as expected. | |
1469 | ||
1470 | h. Variable indirection may now reference the shell's special variables. | |
1471 | ||
1472 | i. The $'...' and $"..." constructs are now added to the history correctly | |
1473 | if they contain newlines and command-oriented history is enabled. | |
1474 | ||
1475 | j. It is now an error to try to assign a value to a function-local copy | |
1476 | of a readonly shell variable (declared with the `local' builtin). | |
1477 | ||
1478 | 2. Changes to Readline | |
1479 | ||
1480 | a. The history file code now uses O_BINARY mode when reading and writing | |
1481 | the history file on cygwin32. | |
1482 | ||
1483 | 3. New Features in Bash | |
1484 | ||
1485 | a. A new programmable completion facility, with two new builtin commands: | |
1486 | complete and compgen. | |
1487 | ||
1488 | b. configure has a new option, `--enable-progcomp', to compile in the | |
1489 | programmable completion features (enabled by default). | |
1490 | ||
1491 | c. `shopt' has a new option, `progcomp', to enable and disable programmable | |
1492 | completion at runtime. | |
1493 | ||
1494 | d. Unsetting HOSTFILE now clears the list of hostnames used for completion. | |
1495 | ||
1496 | 4. New Features in Readline | |
1497 | ||
1498 | a. A new variable, rl_gnu_readline_p, always 1. The intent is that an | |
1499 | application can verify whether or not it is linked with the `real' | |
1500 | readline library or some substitute. | |
1501 | ||
1502 | ------------------------------------------------------------------------------ | |
1503 | This document details the changes between this version, bash-2.04-devel, | |
1504 | and the previous version, bash-2.03-release. | |
1505 | ||
1506 | 1. Changes to Bash | |
1507 | ||
1508 | a. System-specific configuration and source changes for: Interix, Rhapsody | |
1509 | ||
1510 | b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if | |
1511 | JOB_CONTROL was not defined. | |
1512 | ||
1513 | c. An obscure race condition in the trap code was fixed. | |
1514 | ||
1515 | d. The string resulting from $'...' is now requoted to avoid any further | |
1516 | expansion. | |
1517 | ||
1518 | e. The $'...' quoting syntax now allows backslash to escape a single quote, | |
1519 | for ksh-93 compatibility. | |
1520 | ||
1521 | f. The $"..." quoting syntax now escapes backslashes and double quotes in | |
1522 | the translated string when displaying them with the --dump-po-strings | |
1523 | option. | |
1524 | ||
1525 | g. `echo -e' no longer converts \' to '. | |
1526 | ||
1527 | h. Fixes were made to the extended globbing code to handle embedded (...) | |
1528 | patterns better. | |
1529 | ||
1530 | i. Some improvements were made to the code that unsets `nodelay' mode on | |
1531 | the file descriptor from which bash is reading input. | |
1532 | ||
1533 | j. Some changes were made to the replacement termcap library for better | |
1534 | operation on MS-DOS. | |
1535 | ||
1536 | k. Some changes were made to the tilde expansion code to handle backslash | |
1537 | as a pathname separator on MS-DOS. | |
1538 | ||
1539 | l. The source has been reorganized a little bit -- there is now an `include' | |
1540 | subdirectory, and lib/posixheaders has been removed. | |
1541 | ||
1542 | m. Improvements were made to the `read' builtin so that it makes many | |
1543 | fewer read(2) system calls. | |
1544 | ||
1545 | n. The expansion of $- will include `c' and `s' when those options are | |
1546 | supplied at shell invocation. | |
1547 | ||
1548 | o. Several improvments were made to the completion code: variable completion | |
1549 | now works better when there are unterminated expansions, command | |
1550 | completion understands quotes better, and completion now works in certain | |
1551 | unclosed $(... constructs. | |
1552 | ||
1553 | p. The arithmetic expansion code was fixed to not need the value of a | |
1554 | variable being assigned a value (fixes the "ss=09; let ss=10" bug). | |
1555 | ||
1556 | q. Some changes were made to make exported environment creation faster. | |
1557 | ||
1558 | r. The html documentation will be installed into $(htmldir) if that variable | |
1559 | has a value when `make install' is run. | |
1560 | ||
1561 | s. Fixed a bug that would cause the bashrc file to be sourced inappropriately | |
1562 | when bash is started by sshd. | |
1563 | ||
1564 | t. The SSH_CLIENT environment variable is no longer auto-exported. | |
1565 | ||
1566 | u. A bug that caused redirections with (...) subshells to be performed in | |
1567 | the wrong order was fixed. | |
1568 | ||
28ef6c31 | 1569 | v. A bug that occasionally caused inappropriate expansion of assignment |
bb70624e JA |
1570 | statements in compound array assignments was fixed. |
1571 | ||
1572 | w. The code that parses the words in a compound array assignment was | |
1573 | simplified considerably and should work better now. | |
1574 | ||
1575 | x. Fixes to the non-job-control code in nojobs.c to make it POSIX.2-compliant | |
1576 | when a user attempts to retrieve the status of a terminated background | |
1577 | process. | |
1578 | ||
1579 | y. Fixes to the `printf' builtin so that it doesn't try to expand all | |
1580 | backslash escape sequences in the format string before parsing it for | |
1581 | % format specifiers. | |
1582 | ||
1583 | 2. Changes to Readline | |
1584 | ||
1585 | a. The history library tries to truncate the history file only if it is a | |
1586 | regular file. | |
1587 | ||
1588 | b. A bug that caused _rl_dispatch to address negative array indices on | |
1589 | systems with signed chars was fixed. | |
1590 | ||
1591 | c. rl-yank-nth-arg now leaves the history position the same as when it was | |
1592 | called. | |
1593 | ||
1594 | d. Changes to the completion code to handle MS-DOS drive-letter:pathname | |
1595 | filenames. | |
1596 | ||
1597 | e. Completion is now case-insensitive by default on MS-DOS. | |
1598 | ||
1599 | f. Fixes to the history file manipulation code for MS-DOS. | |
1600 | ||
1601 | g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS. | |
1602 | ||
1603 | h. Some fixes were made to the redisplay code for better operation on MS-DOS. | |
1604 | ||
1605 | i. The quoted-insert code will now insert tty special chars like ^C. | |
1606 | ||
1607 | j. A bug was fixed that caused the display code to reference memory before | |
1608 | the start of the prompt string. | |
1609 | ||
1610 | k. More support for __EMX__ (OS/2). | |
1611 | ||
1612 | l. A bug was fixed in readline's signal handling that could cause infinite | |
1613 | recursion in signal handlers. | |
1614 | ||
1615 | m. A bug was fixed that caused the point to be less than zero when rl_forward | |
1616 | was given a very large numeric argument. | |
1617 | ||
1618 | n. The vi-mode code now gets characters via the application-settable value | |
1619 | of rl_getc_function rather than calling rl_getc directly. | |
1620 | ||
1621 | 3. New Features in Bash | |
1622 | ||
1623 | a. The history builtin has a `-d offset' option to delete the history entry | |
1624 | at position `offset'. | |
1625 | ||
1626 | b. The prompt expansion code has two new escape sequences: \j, the number of | |
1627 | active jobs; and \l, the basename of the shell's tty device name. | |
1628 | ||
1629 | c. The `bind' builtin has a new `-x' option to bind key sequences to shell | |
1630 | commands. | |
1631 | ||
1632 | d. There is a new shell option, no_empty_command_completion, which, when | |
1633 | enabled, disables command completion when TAB is typed on an empty line. | |
1634 | ||
1635 | e. The `help' builtin has a `-s' option to just print a builtin's usage | |
1636 | synopsys. | |
1637 | ||
1638 | f. There are several new arithmetic operators: id++, id-- (variable | |
1639 | post-increment/decrement), ++id, --id (variabl pre-increment/decrement), | |
1640 | expr1 , expr2 (comma operator). | |
1641 | ||
1642 | g. There is a new ksh-93 style arithmetic for command: | |
1643 | for ((expr1 ; expr2; expr3 )); do list; done | |
1644 | ||
1645 | h. The `read' builtin has a number of new options: | |
1646 | -t timeout only wait timeout seconds for input | |
1647 | -n nchars only read nchars from input instead of a full line | |
1648 | -d delim read until delim rather than newline | |
1649 | -s don't echo input chars as they are read | |
1650 | ||
1651 | i. The redirection code now handles several filenames specially: | |
1652 | /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or | |
1653 | not they are present in the file system. | |
1654 | ||
1655 | j. The redirection code now recognizes pathnames of the form | |
1656 | /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket | |
1657 | of the appropriate type to the specified port on the specified host. | |
1658 | ||
1659 | k. The ksh-93 ${!prefix*} expansion, which expands to the names of all | |
1660 | shell variables whose names start with prefix, has been implemented. | |
1661 | ||
1662 | l. There is a new dynamic variable, FUNCNAME, which expands to the name of | |
1663 | a currently-executing function. Assignments to FUNCNAME have no effect. | |
1664 | ||
1665 | m. The GROUPS variable is no longer readonly; assignments to it are silently | |
1666 | discarded. This means it can be unset. | |
1667 | ||
1668 | 4. New Features in Readline | |
1669 | ||
1670 | a. Parentheses matching is now always compiled into readline, and enabled | |
1671 | or disabled when the value of the `blink-matching-paren' variable is | |
1672 | changed. | |
1673 | ||
1674 | b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename. | |
1675 | ||
1676 | c. MS-DOS systems now use ~/_history as the default history file. | |
1677 | ||
1678 | d. history-search-{forward,backward} now leave the point at the end of the | |
1679 | line when the string to search for is empty, like | |
1680 | {reverse,forward}-search-history. | |
1681 | ||
1682 | e. history-search-{forward,backward} now leave the last history line found | |
1683 | in the readline buffer if the second or subsequent search fails. | |
1684 | ||
1685 | f. New function for use by applications: rl_on_new_line_with_prompt, used | |
1686 | when an application displays the prompt itself before calling readline(). | |
1687 | ||
1688 | g. New variable for use by applications: rl_already_prompted. An application | |
1689 | that displays the prompt itself before calling readline() must set this to | |
1690 | a non-zero value. | |
1691 | ||
1692 | ------------------------------------------------------------------------------ | |
b72432fd JA |
1693 | This document details the changes between this version, bash-2.03-release, |
1694 | and the previous version, bash-2.03-beta2. | |
1695 | ||
1696 | 1. Changes to Bash | |
1697 | ||
1698 | a. A file descriptor leak in the `fc' builtin was fixed. | |
1699 | ||
1700 | b. A bug was fixed in the `read' builtin that caused occasional spurious | |
1701 | failures when using `read -e'. | |
1702 | ||
1703 | c. The version code needed to use the value of the cpp variable | |
1704 | CONF_MACHTYPE rather than MACHTYPE. | |
1705 | ||
1706 | d. A new test was added to exercise the command printing and copying code. | |
1707 | ||
1708 | e. A bug was fixed that caused `time' to be recognized as a reserved word | |
1709 | if it was the first pattern in a `case' statement pattern list. | |
1710 | ||
1711 | ------------------------------------------------------------------------------ | |
1712 | This document details the changes between this version, bash-2.03-beta2, | |
1713 | and the previous version, bash-2.03-beta1. | |
1714 | ||
1715 | 1. Changes to Bash | |
1716 | ||
1717 | a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2. | |
1718 | ||
1719 | b. config.{guess,sub} support added for the NEC SX4. | |
1720 | ||
1721 | c. Changed some of the cross-compiling sections of the configure macros in | |
1722 | aclocal.m4 so that configure won't abort. | |
1723 | ||
1724 | d. Slight changes to how the HTML versions of the bash and readline manuals | |
1725 | are generated. | |
1726 | ||
1727 | e. Fixed conditional command printing to avoid interpreting printf `%'-escapes | |
1728 | in arguments to [[. | |
1729 | ||
1730 | f. Don't include the bash malloc on all variants of the alpha processor. | |
1731 | ||
1732 | g. Changes to configure to make --enable-profiling work on Solaris 2.x. | |
1733 | ||
1734 | h. Fixed a bug that manifested itself when shell functions were called | |
1735 | between calls to `getopts'. | |
1736 | ||
1737 | i. Fixed pattern substitution so that a bare `#'as a pattern causes the | |
1738 | replacement string to be prefixed to the search string, and a bare | |
1739 | `%' causes the replacement string to be appended to the search string. | |
1740 | ||
1741 | j. Fixed a bug in the command execution code that caused child processes | |
1742 | to occasionally have the wrong value for $!. | |
1743 | ||
1744 | 2. Changes to Readline | |
1745 | ||
1746 | a. Added code to the history library to catch history substitutions using | |
1747 | `&' without a previous history substitution or search having been | |
1748 | performed. | |
1749 | ||
1750 | 3. New Features in Bash | |
1751 | ||
1752 | 4. New Features in Readline | |
1753 | ||
1754 | a. New bindable variable: `isearch-terminators'. | |
1755 | ||
1756 | b. New bindable function: `forward-backward-delete-char' (unbound by default). | |
1757 | ||
1758 | ------------------------------------------------------------------------------ | |
1759 | This document details the changes between this version, bash-2.03-beta1, | |
1760 | and the previous version, bash-2.03-alpha. | |
1761 | ||
1762 | 1. Changes to Bash | |
1763 | ||
1764 | a. A change was made to the help text for `{...}' to make it clear that a | |
1765 | semicolon is required before the closing brace. | |
1766 | ||
1767 | b. A fix was made to the `test' builtin so that syntax errors cause test | |
1768 | to return an exit status > 1. | |
1769 | ||
1770 | c. Globbing is no longer performed on assignment statements that appear as | |
1771 | arguments to `assignment builtins' such as `export'. | |
1772 | ||
1773 | d. System-specific configuration changes were made for: Rhapsody, | |
1774 | AIX 4.2/gcc, BSD/OS 4.0. | |
1775 | ||
1776 | e. New loadable builtins: ln, unlink. | |
1777 | ||
1778 | f. Some fixes were made to the globbing code to handle extended glob patterns | |
1779 | which immediately follow a `*'. | |
1780 | ||
1781 | g. A fix was made to the command printing code to ensure that redirections | |
1782 | following compound commands have a space separating them from the rest | |
1783 | of the command. | |
1784 | ||
1785 | h. The pathname canonicalization code was changed to produce fewer leading | |
1786 | `//' sequences, since those are interpreted as network file system | |
1787 | pathnames on some systems. | |
1788 | ||
1789 | i. A fix was made so that loops containing `eval' commands in commands passed | |
1790 | to `bash -c' would not exit prematurely. | |
1791 | ||
1792 | j. Some changes were made to the job reaping code when the shell is not | |
1793 | interactive, so the shell will retain exit statuses longer for examination | |
1794 | by `wait'. | |
1795 | ||
1796 | k. A fix was made so that `jobs | command' works again. | |
1797 | ||
1798 | l. The erroneous compound array assignment var=((...)) is now a syntax error. | |
1799 | ||
1800 | m. A change was made to the dynamic loading code in `enable' to support | |
1801 | Tenon's MachTen. | |
1802 | ||
1803 | n. A fix was made to the globbing code so that extended globbing patterns | |
1804 | will correctly match `.' in a bracket expression. | |
1805 | ||
1806 | 2. Changes to Readline | |
1807 | ||
1808 | a. A fix was made to the completion code in which a typo caused the wrong | |
1809 | value to be passed to the function that computed the longest common | |
1810 | prefix of the list of matches. | |
1811 | ||
1812 | b. The completion code now checks the value of rl_filename_completion_desired, | |
1813 | which is set by application-supplied completion functions to indicate | |
1814 | that filename completion is being performed, to decide whether or not to | |
1815 | call an application-supplied `ignore completions' function. | |
1816 | ||
1817 | 3. New Features in Bash | |
1818 | ||
1819 | a. A change was made to the startup file code so that any shell begun with | |
1820 | the `--login' option, even non-interactive shells, will source the login | |
1821 | shell startup files. | |
1822 | ||
1823 | 4. New Features in Readline | |
1824 | ||
1825 | a. A new variable, rl_erase_empty_line, which, if set by an application using | |
1826 | readline, will cause readline to erase, prompt and all, lines on which the | |
1827 | only thing typed was a newline. | |
1828 | ||
1829 | ------------------------------------------------------------------------------ | |
1830 | This document details the changes between this version, bash-2.03-alpha, | |
1831 | and the previous version, bash-2.02.1-release. | |
1832 | ||
1833 | 1. Changes to Bash | |
1834 | ||
1835 | a. System-specific configuration changes were made for: Irix 6.x, Unixware 7. | |
1836 | ||
1837 | b. The texi2dvi and texi2html scripts were updated to the latest versions | |
1838 | from the net. | |
1839 | ||
1840 | c. The configure tests that determine which native type is 32 bits were | |
1841 | changed to not require a compiled program. | |
1842 | ||
1843 | d. Fixed a bug in shell_execve that could cause memory to be freed twice | |
1844 | after a failed exec. | |
1845 | ||
1846 | e. The `printf' test uses `diff -a' if it's available to prevent confusion | |
1847 | due to the non-ascii output. | |
1848 | ||
1849 | f. Shared object configuration is now performed by a shell script, | |
1850 | support/shobj-conf, which generates values to be substituted into | |
1851 | makefiles by configure. | |
1852 | ||
1853 | g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a | |
1854 | return value. | |
1855 | ||
1856 | h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar | |
1857 | handling of RLIMIT_FILESIZE. | |
1858 | ||
1859 | i. Some new loadable builtins were added: id, printenv, sync, whoami, push, | |
1860 | mkdir. `pushd', `popd', and `dirs' can now be built as regular or | |
1861 | loadable builtins from the same source file. | |
1862 | ||
1863 | j. Changes were made to `printf' to handle NUL bytes in the expanded format | |
1864 | string. | |
1865 | ||
1866 | k. The various `make clean' Makefile targets now descend into lib/sh. | |
1867 | ||
1868 | l. The `type' builtin was changed to use the internal `getopt' so that things | |
1869 | like `type -ap' work as expected. | |
1870 | ||
1871 | m. There is a new configuration option, --with-installed-readline, to link | |
1872 | bash with a locally-installed version of readline. Only readline version | |
1873 | 4.0 and later releases can support this. Shared and static libraries | |
1874 | are supported. The installed include files are used. | |
1875 | ||
1876 | n. There is a new autoconf macro used to find which basic type is 64 bits. | |
1877 | ||
1878 | o. Dynamic linking and loadable builtins should now work on SCO 3.2v5*, | |
1879 | AIX 4.2 with gcc, Unixware 7, and many other systems using gcc, where | |
1880 | the `-shared' options works correctly. | |
1881 | ||
1882 | p. A bug was fixed in the bash filename completion code that caused memory to | |
1883 | be freed twice if a directory name containing an unset variable was | |
1884 | completed and the -u option was set. | |
1885 | ||
1886 | q. The prompt expansion code now quotes the `$' in the `\$' expansion so it | |
1887 | is not processed by subsequent parameter expansion. | |
1888 | ||
1889 | r. Fixed a parsing bug that caused a single or double quote after a `$$' to | |
1890 | trigger ANSI C expansion or locale translation. | |
1891 | ||
1892 | s. Fixed a bug in the globbing code that caused quoted filenames containing | |
1893 | no globbing characters to sometimes be incorrectly expanded. | |
1894 | ||
1895 | t. Changes to the default prompt strings if prompt string decoding is not | |
1896 | compiled into the shell. | |
1897 | ||
1898 | u. Added `do', `then', `else', `{', and `(' to the list of keywords that may | |
1899 | precede the `time' reserved word. | |
1900 | ||
1901 | v. The shell may now be cross-built for BeOS as well as cygwin32. | |
1902 | ||
1903 | w. The conditional command execution code now treats `=' the same as `==' | |
1904 | for deciding when to perform pattern matching. | |
1905 | ||
1906 | x. The `-e' option no longer causes the shell to exit if a command exits | |
1907 | with a non-zero status while running the startup files. | |
1908 | ||
1909 | y. The `printf' builtin no longer dumps core if a modifier is supplied in | |
1910 | the format string without a conversion character (e.g. `%h'). | |
1911 | ||
1912 | z. Array assignments of the form a=(...) no longer show up in the history | |
1913 | list. | |
1914 | ||
1915 | aa. The parser was fixed to obey the POSIX.2 rules for finding the closing | |
1916 | `}' in a ${...} expression. | |
1917 | ||
1918 | bb. The history file is now opened with mode 0600 rather than 0666, so bash | |
1919 | no longer relies on the user's umask being set appropriately. | |
1920 | ||
1921 | cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now | |
1922 | relies on proper behavior from the C library. | |
1923 | ||
1924 | dd. Minor changes were made to allow quoted variable expansions using | |
1925 | ${...} to be completed correctly if there is no closing `"'. | |
1926 | ||
1927 | ee. Changes were made to builtins/Makefile.in so that configuring the shell | |
1928 | with `--enable-profiling' works right and builtins/mkbuiltins is | |
1929 | generated. | |
1930 | ||
1931 | 2. Changes to Readline | |
1932 | ||
1933 | a. The version number is now 4.0. | |
1934 | ||
1935 | b. There is no longer any #ifdef SHELL code in the source files. | |
1936 | ||
1937 | c. Some changes were made to the key binding code to fix memory leaks and | |
1938 | better support Win32 systems. | |
1939 | ||
1940 | d. Fixed a silly typo in the paren matching code -- it's microseconds, not | |
1941 | milliseconds. | |
1942 | ||
1943 | e. The readline library should be compilable by C++ compilers. | |
1944 | ||
1945 | f. The readline.h public header file now includes function prototypes for | |
1946 | all readline functions, and some changes were made to fix errors in the | |
1947 | source files uncovered by the use of prototypes. | |
1948 | ||
1949 | g. The maximum numeric argument is now clamped at 1000000. | |
1950 | ||
1951 | h. Fixes to rl_yank_last_arg to make it behave better. | |
1952 | ||
1953 | i. Fixed a bug in the display code that caused core dumps if the prompt | |
1954 | string length exceeded 1024 characters. | |
1955 | ||
1956 | j. The menu completion code was fixed to properly insert a single completion | |
1957 | if there is only one match. | |
1958 | ||
1959 | k. A bug was fixed that caused the display code to improperly display tabs | |
1960 | after newlines. | |
1961 | ||
1962 | 3. New Features in Bash | |
1963 | ||
1964 | a. New `shopt' option, `restricted_shell', indicating whether or not the | |
1965 | shell was started in restricted mode, for use in startup files. | |
1966 | ||
1967 | b. Filename generation is now performed on the words between ( and ) in | |
1968 | array assignments (which it probably should have done all along). | |
1969 | ||
1970 | c. OLDPWD is now auto-exported, as POSIX.2 seems to require. | |
1971 | ||
1972 | d. ENV and BASH_ENV are read-only variables in a restricted shell. | |
1973 | ||
1974 | 4. New Features in Readline | |
1975 | ||
1976 | a. Many changes to the signal handling: | |
1977 | o Readline now catches SIGQUIT and cleans up the tty before returning; | |
1978 | o A new variable, rl_catch_signals, is available to application writers | |
1979 | to indicate to readline whether or not it should install its own | |
1980 | signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, | |
1981 | SIGTTIN, and SIGTTOU; | |
1982 | o A new variable, rl_catch_sigwinch, is available to application | |
1983 | writers to indicate to readline whether or not it should install its | |
1984 | own signal handler for SIGWINCH, which will chain to the calling | |
1985 | applications's SIGWINCH handler, if one is installed; | |
1986 | o There is a new function, rl_free_line_state, for application signal | |
1987 | handlers to call to free up the state associated with the current | |
1988 | line after receiving a signal; | |
1989 | o There is a new function, rl_cleanup_after_signal, to clean up the | |
1990 | display and terminal state after receiving a signal; | |
1991 | o There is a new function, rl_reset_after_signal, to reinitialize the | |
1992 | terminal and display state after an application signal handler | |
1993 | returns and readline continues | |
1994 | ||
1995 | b. There is a new function, rl_resize_terminal, to reset readline's idea of | |
1996 | the screen size after a SIGWINCH. | |
1997 | ||
1998 | c. New public functions: rl_save_prompt and rl_restore_prompt. These were | |
1999 | previously private functions with a `_' prefix. | |
2000 | ||
2001 | d. New function hook: rl_pre_input_hook, called just before readline starts | |
2002 | reading input, after initialization. | |
2003 | ||
2004 | e. New function hook: rl_display_matches_hook, called when readline would | |
2005 | display the list of completion matches. The new function | |
2006 | rl_display_match_list is what readline uses internally, and is available | |
2007 | for use by application functions called via this hook. | |
2008 | ||
2009 | f. New bindable function, delete-char-or-list, like tcsh. | |
2010 | ||
2011 | ------------------------------------------------------------------------------ | |
bc4cd23c JA |
2012 | This document details the changes between this version, bash-2.02.1-release, |
2013 | and the previous version, bash-2.02-release. | |
2014 | ||
2015 | 1. Changes to Bash | |
2016 | ||
2017 | a. A bug that caused the bash readline support to not compile unless aliases | |
2018 | and csh-style history were configured into the shell was fixed. | |
2019 | ||
2020 | b. Fixed a bug that could cause a core dump when here documents contained | |
2021 | more than 1000 characters. | |
2022 | ||
2023 | c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same | |
2024 | as the current directory when in POSIX mode. | |
2025 | ||
2026 | d. Fixed an alignment problem with the memory returned by the bash malloc, | |
2027 | so returned memory is now 64-bit aligned. | |
2028 | ||
2029 | e. Fixed a bug that caused command substitutions executed within pipelines | |
2030 | to put the terminal in the wrong process group. | |
2031 | ||
2032 | f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop, | |
2033 | Unixware 2, and Unixware 7. | |
2034 | ||
2035 | g. Fixes to the pattern matching code to make it work correctly for eight-bit | |
2036 | characters. | |
2037 | ||
2038 | h. Fixed a problem that occasionally caused the shell to display the wrong | |
2039 | value for the new working directory when changing to a directory found | |
2040 | in $CDPATH when in physical mode. | |
2041 | ||
2042 | i. Fixed a bug that caused core dumps when using conditional commands in | |
2043 | shell functions. | |
2044 | ||
2045 | j. Fixed a bug that caused the printf builtin to loop forever if the format | |
2046 | string did not consume any of the arguments. | |
2047 | ||
2048 | k. Fixed a bug in the parameter expansion code that caused "$@" to be | |
2049 | incorrectly split if $IFS did not contain a space character. | |
2050 | ||
2051 | l. Fixed a bug that could cause a core dump when completing hostnames if | |
2052 | the number of matching hostnames was an exact multiple of 16. | |
2053 | ||
2054 | m. Fixed a bug that caused the shell to fork too early when a command | |
2055 | such as `%2 &' was given. | |
2056 | ||
2057 | 2. Changes to Readline | |
2058 | ||
2059 | a. Fixed a problem with redisplay that showed up when the prompt string was | |
2060 | longer than the screen width and the prompt contained invisible characters. | |
2061 | ||
2062 | ------------------------------------------------------------------------------ | |
2063 | This document details the changes between this version, bash-2.02-release, | |
2064 | and the previous version, bash-2.02-beta2. | |
cce855bc JA |
2065 | |
2066 | 1. Changes to Bash | |
2067 | ||
2068 | a. A bug was fixed that caused the terminal process group to be set | |
2069 | incorrectly when performing command substitution of builtins in a | |
2070 | pipeline. | |
2071 | ||
2072 | ------------------------------------------------------------------------------ | |
2073 | This document details the changes between this version, bash-2.02-beta2, | |
2074 | and the previous version, bash-2.02-beta1. | |
2075 | ||
2076 | 1. Changes to Bash | |
2077 | ||
2078 | a. Attempting to `wait' for stopped jobs now generates a warning message. | |
2079 | ||
2080 | b. Pipelines which exit due to SIGPIPE in non-interactive shells are now | |
2081 | not reported if the shell is compiled -DDONT_REPORT_SIGPIPE. | |
2082 | ||
2083 | c. Some changes were made to builtins/psize.sh and support/bashbug.sh to | |
2084 | attempt to avoid some /tmp file races and surreptitious file | |
2085 | substitutions. | |
2086 | ||
2087 | d. Fixed a bug that caused the shell not to compile if configured with | |
2088 | dparen arithmetic but without aliases. | |
2089 | ||
2090 | e. Fixed a bug that caused the input stream to be switched when assigning | |
2091 | empty arrays with `bash -c'. | |
2092 | ||
2093 | f. A bug was fixed in the readline expansion glue code that caused bash to | |
2094 | dump core when expanding lines with an unclosed single quote. | |
2095 | ||
2096 | g. A fix was made to the `cd' builtin so that using a non-empty directory | |
2097 | from $CDPATH results in an absolute pathname of the new current working | |
2098 | directory to be displayed after the current directory is changed. | |
2099 | ||
2100 | h. Fixed a bug in the variable assignment code that caused the shell to | |
2101 | dump core when referencing an unset variable with `set -u' enabled in | |
2102 | an assignment statement preceding a command. | |
2103 | ||
2104 | i. Fixed a bug in the exit trap code that caused reserved words to not be | |
2105 | recognized under certain circumstances. | |
2106 | ||
2107 | j. Fixed a bug in the parameter pattern substitution code so that quote | |
2108 | removal is performed. | |
2109 | ||
2110 | k. The shell should now configure correctly on Apple Rhapsody systems. | |
2111 | ||
2112 | l. The `kill' builtin now prints a usage message if it is not passed any | |
2113 | arguments. | |
2114 | ||
2115 | ------------------------------------------------------------------------------ | |
2116 | This document details the changes between this version, bash-2.02-beta1, | |
2117 | and the previous version, bash-2.02-alpha1. | |
2118 | ||
2119 | 1. Changes to Bash | |
2120 | ||
2121 | a. A few compilation bugs were fixed in the new extended globbing code. | |
2122 | ||
2123 | b. Executing arithmetic commands now sets the command name to `((' so | |
2124 | error messages look right. | |
2125 | ||
2126 | c. Fixed some build problems with various configuration options. | |
2127 | ||
2128 | d. The `printf' builtin now aborts immediately if an illegal format | |
2129 | character is encountered. | |
2130 | ||
2131 | e. The code that creates here-documents now behaves better if the file it's | |
2132 | trying to create already exists for some reason. | |
2133 | ||
2134 | f. Fixed a problem with the extended globbing code that made patterns like | |
2135 | `x+*' expand incorrectly. | |
2136 | ||
2137 | g. The prompt string expansion code no longer quotes tildes with backslashes. | |
2138 | ||
2139 | h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in | |
2140 | the presence of lstat(2) failures. | |
2141 | ||
2142 | i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'. | |
2143 | ||
2144 | j. The mail checking code now ensures that it has a valid default mailpath. | |
2145 | ||
2146 | k. A bug was fixed that caused local variables to be unset inappropriately | |
2147 | when sourcing a script from within another sourced script. | |
2148 | ||
2149 | l. A bug was fixed in the history saving code so that functions are saved | |
2150 | in the history list correctly if `cmdhist' is enabled, but `lithist' | |
2151 | is not. | |
2152 | ||
2153 | m. A bug was fixed that caused printf overflows when displaying error | |
2154 | messages. | |
2155 | ||
2156 | n. It should be easier to build the loadble builtins in examples/loadables, | |
2157 | though some manual editing of the generated Makefile is still required. | |
2158 | ||
2159 | o. The user's primary group is now always ${GROUPS[0]}. | |
2160 | ||
2161 | p. Some updates were made to support/config.guess from the GNU master copy. | |
2162 | ||
2163 | q. Some changes were made to the autoconf support for Solaris 2.6 large | |
2164 | files. | |
2165 | ||
2166 | r. The `command' builtins now does the right thing when confstr(3) cannot | |
2167 | find a value for _CS_PATH. | |
2168 | ||
2169 | s. Extended globbing expressions like `*.!(c)' are not history expanded if | |
2170 | `extglob' is enabled. | |
2171 | ||
2172 | t. Using the `-P' option to `cd' will force the value that is assigned to | |
2173 | PWD to not contain any symbolic links. | |
2174 | ||
2175 | 2. Changes to Readline | |
2176 | ||
2177 | a. The code that prints completion listings now behaves better if one or | |
2178 | more of the filenames contains non-printable characters. | |
2179 | ||
2180 | b. The time delay when showing matching parentheses is now 0.5 seconds. | |
2181 | ||
2182 | ------------------------------------------------------------------------------ | |
2183 | This document details the changes between this version, bash-2.02-alpha1, | |
2184 | and the previous version, bash-2.01.1-release. | |
2185 | ||
2186 | 1. Changes to Bash | |
2187 | ||
2188 | a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x, | |
2189 | Solaris 2.6, SINIX SVR4. | |
2190 | ||
2191 | b. Changes were made to the generated `info' files so that `install-info' | |
2192 | works correctly. | |
2193 | ||
2194 | c. PWD is now auto-exported. | |
2195 | ||
2196 | d. A fix was made to the pipeline code to make sure that the shell forks | |
2197 | to execute simple commands consisting solely of assignment statements. | |
2198 | ||
2199 | e. Changes to the test suite for systems with 14-character filenames. | |
2200 | ||
2201 | f. The default sizes of some internal hash tables have been made smaller | |
2202 | to reduce the shell's memory footprint. | |
2203 | ||
2204 | g. The `((...))' arithmetic command is now executed directly instead of | |
2205 | being translated into `let "..."'. | |
2206 | ||
2207 | h. Fixes were made to the expansion code so that "$*", "$@", "${array[@]}", | |
2208 | and "${array[@]}" expand correctly when IFS does not contain a space | |
2209 | character, is unset, or is set to NULL. | |
2210 | ||
2211 | i. The indirect expansion code (${!var}) was changed so that the only | |
2212 | valid values of `var' are variable names, positional parameters, `#', | |
2213 | `@', and `*'. | |
2214 | ||
2215 | j. An arithmetic expression error in a $((...)) expansion now causes a | |
2216 | non-interactive shell running in posix mode to exit. | |
2217 | ||
2218 | k. Compound array assignment now splits the words within the parentheses | |
2219 | on shell metacharacters like the parser would before expansing them | |
2220 | and performing the assignment. This is for compatibility with ksh-93. | |
2221 | ||
2222 | l. The internal shell backslash-quoting code (used in the output of `set' | |
2223 | and completion) now quotes tildes if they appear at the start of the | |
2224 | string or after a `=' or `:'. | |
2225 | ||
2226 | m. A couple of bugs with `shopt -o' were fixed. | |
2227 | ||
2228 | n. `bash +o' now displays the same output as `set +o' before starting an | |
2229 | interactive shell. | |
2230 | ||
2231 | o. A bug that caused command substitution and the `eval' builtin to | |
2232 | occasionally free memory twice when an error was encountered was fixed. | |
2233 | ||
2234 | p. The filename globbing code no longer requires read permission for a | |
2235 | directory when the filename to be matched does not contain any globbing | |
2236 | characters, as POSIX.2 specifies. | |
2237 | ||
2238 | q. A bug was fixed so that the job containing the last asynchronous | |
2239 | process is not removed from the job table until a `wait' is executed | |
2240 | for that process or another asynchronous process is started. This | |
2241 | satisfies a POSIX.2 requirement. | |
2242 | ||
2243 | r. A `select' bug was fixed so that a non-numeric user response is treated | |
2244 | the same as a numeric response that is out of range. | |
2245 | ||
2246 | s. The shell no longer parses the value of SHELLOPTS from the environment | |
2247 | if it is restricted, running setuid, or running in `privileged mode'. | |
2248 | ||
2249 | t. Fixes were made to enable large file support on systems such as | |
2250 | Solaris 2.6, where the size of a file may be larger than can be held | |
2251 | in an `int'. | |
2252 | ||
2253 | u. The filename hashing code was fixed to not add `./' to the beginning of | |
2254 | filenames which already begin with `./'. | |
2255 | ||
2256 | v. The configure script was changed so that the GNU termcap library is not | |
2257 | compiled in if `prefer-curses' has been specified. | |
2258 | ||
2259 | w. HISTCONTROL and HISTIGNORE are no longer applied to the second and | |
2260 | subsequent lines of a multi-line command. | |
2261 | ||
2262 | x. A fix was made to `disown' so that it does a better job of catching | |
2263 | out-of-range jobs. | |
2264 | ||
2265 | y. Non-interactive shells no longer report the status of processes terminated | |
2266 | due to SIGINT, even if the standard output is a terminal. | |
2267 | ||
2268 | z. A bug that caused the output of `jobs' to have extra carriage returns | |
2269 | was fixed. | |
2270 | ||
2271 | aa. A bug that caused PIPESTATUS to not be set when builtins or shell | |
2272 | functions were executed in the foreground was fixed. | |
2273 | ||
2274 | bb. Bash now attempts to detect when it is being run by sshd, and treats | |
2275 | that case identically to being run by rshd. | |
2276 | ||
2277 | cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell | |
2278 | options was changed was fixed. | |
2279 | ||
2280 | dd. The `kill' builtin now disallows empty or missing process id arguments | |
2281 | instead of treating them as identical to `0', which means the current | |
2282 | process. | |
2283 | ||
2284 | ee. `var=value declare -x var' now behaves identically to | |
2285 | `var=value export var'. Similarly for `var=value declare -r var' and | |
2286 | `var=value readonly var'. | |
2287 | ||
2288 | ff. A few memory leaks were fixed. | |
2289 | ||
2290 | gg. `alias' and `unalias' now print error messages when passed an argument | |
2291 | that is not an alias for printing or deletion, even when the shell is | |
2292 | not interactive, as POSIX.2 specifies. | |
2293 | ||
2294 | hh. `alias' and `alias -p' now return a status of 0 when no aliases are | |
2295 | defined, as POSIX.2 specifes. | |
2296 | ||
2297 | ii. `cd -' now prints the pathname of the new working directory if the shell | |
2298 | is interactive. | |
2299 | ||
2300 | jj. A fix was made so that the code that binds $PWD now copes with getcwd() | |
2301 | returning NULL. | |
2302 | ||
2303 | kk. `unset' now checks whether or not a function name it's trying to unset | |
2304 | is a valid shell identifier only when the shell is running in posix mode. | |
2305 | ||
2306 | ll. A change was made to the code that generates filenames for here documents | |
2307 | to make them less prone to name collisions. | |
2308 | ||
2309 | mm. The parser was changed so that `time' is recognized as a reserved word | |
2310 | only at the beginning of a pipeline. | |
2311 | ||
2312 | nn. The pathname canonicalization code was changed so that `//' is converted | |
2313 | into `/', but all other pathnames beginning with `//' are left alone, as | |
2314 | POSIX.2 specifies. | |
2315 | ||
2316 | oo. The `logout' builtin will no longer exit a non-interactive non-login | |
2317 | shell. | |
2318 | ||
2319 | 2. Changes to Readline | |
2320 | ||
2321 | a. Fixed a problem in the readline test program rltest.c that caused a core | |
2322 | dump. | |
2323 | ||
2324 | b. The code that handles parser directives in inputrc files now displays | |
2325 | more error messages. | |
2326 | ||
2327 | c. The history expansion code was fixed so that the appearance of the | |
2328 | history comment character at the beginning of a word inhibits history | |
2329 | expansion for that word and the rest of the input line. | |
2330 | ||
2331 | 3. New Features in Bash | |
2332 | ||
2333 | a. A new version of malloc, based on the older GNU malloc, that has many | |
2334 | changes, is more page-based, is more conservative with memory usage, | |
2335 | and does not `orphan' large blocks when they are freed. | |
2336 | ||
2337 | b. A new version of gmalloc, based on the old GLIBC malloc, with many | |
2338 | changes and range checking included by default. | |
2339 | ||
2340 | c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic | |
2341 | Regular Expression matching, including character classes, collating | |
2342 | symbols, equivalence classes, and support for case-insensitive pattern | |
2343 | matching. | |
2344 | ||
2345 | d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been | |
2346 | implemented, controlled by a new `shopt' option, `extglob'. | |
2347 | ||
2348 | e. There is a new ksh-like `[[' compound command, which implements | |
2349 | extended `test' functionality. | |
2350 | ||
2351 | f. There is a new `printf' builtin, implemented according to the POSIX.2 | |
2352 | specification. | |
2353 | ||
2354 | g. There is a new feature for command substitution: $(< filename) now expands | |
2355 | to the contents of `filename', with any trailing newlines removed | |
2356 | (equivalent to $(cat filename)). | |
2357 | ||
2358 | h. There are new tilde prefixes which expand to directories from the | |
2359 | directory stack. | |
2360 | ||
2361 | i. There is a new `**' arithmetic operator to do exponentiation. | |
2362 | ||
2363 | j. There are new configuration options to control how bash is linked: | |
2364 | `--enable-profiling', to allow bash to be profiled with gprof, and | |
2365 | `--enable-static-link', to allow bash to be linked statically. | |
2366 | ||
2367 | k. There is a new configuration option, `--enable-cond-command', which | |
2368 | controls whether or not the `[[' command is included. It is on by | |
2369 | default. | |
2370 | ||
2371 | l. There is a new configuration option, `--enable-extended-glob', which | |
2372 | controls whether or not the ksh extended globbing feature is included. | |
2373 | It is enabled by default. | |
2374 | ||
2375 | m. There is a new configuration #define in config.h.top that, when enabled, | |
2376 | will cause all login shells to source /etc/profile and one of the user- | |
2377 | specific login shell startup files, whether or not the shell is | |
2378 | interactive. | |
2379 | ||
2380 | n. There is a new invocation option, `--dump-po-strings', to dump | |
2381 | a shell script's translatable strings ($"...") in GNU `po' format. | |
2382 | ||
2383 | o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive | |
2384 | pattern matching when globbing filenames and using the `case' construct. | |
2385 | ||
2386 | p. There is a new `shopt' option, `huponexit', which, when enabled, causes | |
2387 | the shell to send SIGHUP to all jobs when an interactive login shell | |
2388 | exits. | |
2389 | ||
2390 | q. `bind' has a new `-u' option, which takes a readline function name as an | |
2391 | argument and unbinds all key sequences bound to that function in a | |
2392 | specified keymap. | |
2393 | ||
2394 | r. `disown' now has `-a' and `-r' options, to limit operation to all jobs | |
2395 | and running jobs, respectively. | |
2396 | ||
2397 | s. The `shopt' `-p' option now causes output to be displayed in a reusable | |
2398 | format. | |
2399 | ||
2400 | t. `test' has a new `-N' option, which returns true if the filename argument | |
2401 | has been modified since it was last accessed. | |
2402 | ||
2403 | u. `umask' now has a `-p' option to print output in a reusable format. | |
2404 | ||
2405 | v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...' | |
2406 | translation code. It expands to the character whose ascii code is NNN | |
2407 | in hexadecimal. | |
2408 | ||
2409 | w. The prompt string expansion code has a new `\r' escape sequence. | |
2410 | ||
2411 | x. The shell may now be cross-compiled for the CYGWIN32 environment on | |
2412 | a Unix machine. | |
2413 | ||
2414 | 4. New Features in Readline | |
2415 | ||
2416 | a. There is now an option for `iterative' yank-last-arg handline, so a user | |
2417 | can keep entering `M-.', yanking the last argument of successive history | |
2418 | lines. | |
2419 | ||
2420 | b. New variable, `print-completions-horizontally', which causes completion | |
2421 | matches to be displayed across the screen (like `ls -x') rather than up | |
2422 | and down the screen (like `ls'). | |
2423 | ||
2424 | c. New variable, `completion-ignore-case', which causes filename completion | |
2425 | and matching to be performed case-insensitively. | |
2426 | ||
2427 | d. There is a new bindable command, `magic-space', which causes history | |
2428 | expansion to be performed on the current readline buffer and a space to | |
2429 | be inserted into the result. | |
2430 | ||
2431 | e. There is a new bindable command, `menu-complete', which enables tcsh-like | |
2432 | menu completion (successive executions of menu-complete insert a single | |
2433 | completion match, cycling through the list of possible completions). | |
2434 | ||
2435 | f. There is a new bindable command, `paste-from-clipboard', for use on Win32 | |
2436 | systems, to insert the text from the Win32 clipboard into the editing | |
2437 | buffer. | |
2438 | ||
2439 | g. The key sequence translation code now understands printf-style backslash | |
2440 | escape sequences, including \NNN octal escapes. These escape sequences | |
2441 | may be used in key sequence definitions or macro values. | |
2442 | ||
2443 | h. An `$include' inputrc file parser directive has been added. | |
2444 | ||
2445 | ------------------------------------------------------------------------------ | |
e8ce775d JA |
2446 | This document details the changes between this version, bash-2.01.1-release, |
2447 | and the previous version, bash-2.01-release. | |
2448 | ||
2449 | 1. Changes to Bash | |
2450 | ||
2451 | a. The select command was fixed to check the validity of the user's | |
2452 | input more strenuously. | |
2453 | ||
2454 | b. A bug was fixed that prevented `time' from timing commands correctly | |
2455 | when supplied as an argument to `bash -c'. | |
2456 | ||
2457 | c. A fix was made to the mail checking code to keep from adding the same | |
2458 | mail file to the list of files to check multiple times when parsing | |
2459 | $MAILPATH. | |
2460 | ||
2461 | d. Fixed an off-by-one error in the tilde expansion library. | |
2462 | ||
2463 | e. When using the compound array assignment syntax, the old value of | |
2464 | the array is cleared before assigning the new value. | |
2465 | ||
2466 | f. Fixed a bug that could cause a core dump when a trap handler was reset | |
2467 | to the default in the trap command associated with that signal. | |
2468 | ||
2469 | g. Fixed a bug in the locale code that occurred when assigning a value | |
2470 | to LC_ALL. | |
2471 | ||
2472 | h. A change was made to the parser so that words of the form xxx=(...) | |
2473 | are not considered compound assignment statements unless there are | |
2474 | characters before the `='. | |
2475 | ||
2476 | i. A fix was made to the command tracing code to correctly quote each | |
2477 | word of output. | |
2478 | ||
2479 | j. Some changes were made to the bash-specific autoconf tests to make them | |
2480 | more portable. | |
2481 | ||
2482 | k. Completion of words with globbing characters now correctly quotes the | |
2483 | result. | |
2484 | ||
2485 | l. The directory /var/spool/mail is now preferred to /usr/spool/mail when | |
2486 | configure is deciding on the default mail directory. | |
2487 | ||
2488 | m. The brace completion code was fixed to not quote the `{' and `}'. | |
2489 | ||
2490 | n. Some fixes were made to make $RANDOM more random in subshells. | |
2491 | ||
2492 | o. System-specific changes were made to configure for: SVR4.2 | |
2493 | ||
2494 | p. Changes were made so that completion of words containing globbing chars | |
2495 | substitutes the result only if a single filename was matched. | |
2496 | ||
2497 | q. The window size is now recomputed after a job is stopped with SIGTSTP if | |
2498 | the user has set `checkwinsize' with `shopt'. | |
2499 | ||
2500 | r. When doing substring expansion, out-of-range substring specifiers now | |
2501 | cause nothing to be substituted rather than an expansion error. | |
2502 | ||
2503 | s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' -- | |
2504 | only `EXIT' and `DEBUG' are accepted. | |
2505 | ||
2506 | t. The display of trapped signals now uses the signal number if signals | |
2507 | for which bash does not know the name are trapped. | |
2508 | ||
2509 | u. A fix was made so that `bash -r' does not turn on restricted mode until | |
2510 | after the startup files are executed. | |
2511 | ||
2512 | v. A bug was fixed that occasionally caused a core dump when a variable | |
2513 | found in the temporary environment of export/declare/readonly had a | |
2514 | null value. | |
2515 | ||
2516 | w. A bug that occasionally caused unallocated memory to be passed to free() | |
2517 | when doing arithmetic substitution was fixed. | |
2518 | ||
2519 | x. A bug that caused a buffer overrun when expanding a prompt string | |
2520 | containing `\w' and ${#PWD} exceeded PATH_MAX was fixed. | |
2521 | ||
2522 | y. A problem with the completion code that occasionally caused it to | |
2523 | refer to a character before the beginning of the readline line buffer | |
2524 | was fixed. | |
2525 | ||
2526 | z. A bug was fixed so that the `read' builtin restarts reads when | |
2527 | interrupted by signals other than SIGINT. | |
2528 | ||
2529 | aa. Fixed a bug that caused a command to be freed twice when there was | |
2530 | an evaluation error in the `eval' command. | |
2531 | ||
2532 | 2. Changes to Readline | |
2533 | ||
2534 | a. Added a missing `extern' to a declaration in readline.h that kept | |
2535 | readline from compiling cleanly on some systems. | |
2536 | ||
2537 | b. The history file is now opened with mode 0600 when it is written for | |
2538 | better security. | |
2539 | ||
2540 | c. Changes were made to the SIGWINCH handling code so that prompt redisplay | |
2541 | is done better. | |
2542 | ||
2543 | d. ^G now interrupts incremental searches correctly. | |
2544 | ||
2545 | e. A bug that caused a core dump when the set of characters to be quoted | |
2546 | when completing words was empty was fixed. | |
2547 | ||
2548 | ------------------------------------------------------------------------------ | |
d166f048 JA |
2549 | This document details the changes between this version, bash-2.01-release, |
2550 | and the previous version, bash-2.01-beta2. | |
2551 | ||
2552 | 1. Changes to Bash | |
2553 | ||
2554 | a. The `distclean' target should remove the `printenv' executable if it | |
2555 | has been created. | |
2556 | ||
2557 | b. The test suite was changed slightly to ensure that the error messages | |
2558 | are printed in English. | |
2559 | ||
2560 | c. A bug that caused the shell to dump core when a filename containing a | |
2561 | `/' was passed to `hash' was fixed. | |
2562 | ||
2563 | d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1 | |
2564 | requires. | |
2565 | ||
2566 | e. A memory leak when completing commands was fixed. | |
2567 | ||
2568 | f. A memory leak that occurred when checking the hash table for commands | |
2569 | with relative paths was fixed. | |
2570 | ||
2571 | ------------------------------------------------------------------------------ | |
2572 | This document details the changes between this version, bash-2.01-beta2, | |
2573 | and the previous version, bash-2.01-beta1. | |
2574 | ||
2575 | 1. Changes to Bash | |
2576 | ||
2577 | a. The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if | |
2578 | the current (soft) limit is less than or equal to the hard limit. | |
2579 | ||
2580 | b. Fixed a bug that caused the bash emulation of strcasecmp to produce | |
2581 | incorrect results. | |
2582 | ||
2583 | c. A bug that caused memory to be freed twice when a trap handler resets | |
2584 | the trap more than once was fixed. | |
2585 | ||
2586 | d. A bug that caused machines where sizeof (pointer) > sizeof (int) to | |
2587 | fail (and possibly dump core) when trying to unwind-protect a null | |
2588 | pointer was fixed. | |
2589 | ||
2590 | e. The startup files should not be run with job control enabled. This fix | |
2591 | allows SIGINT to once again interrupt startup file execution. | |
2592 | ||
2593 | f. Bash should not change the SIGPROF handler if it is set to something | |
2594 | other than SIG_DFL. | |
2595 | ||
2596 | g. The completion code that provides bash-specific completions for readline | |
2597 | now quotes characters that the readline code would treat as word break | |
2598 | characters if they appear in a file name. | |
2599 | ||
2600 | h. The completion code now correctly quotes filenames containing a `!', | |
2601 | even if the user attempted to use double quotes when attempting | |
2602 | completion. | |
2603 | ||
2604 | i. A bug that caused the shell to dump core when `disown' was called without | |
2605 | arguments and there was no current job was fixed. | |
2606 | ||
2607 | j. A construct like $((foo);bar) is now processed as a command substitution | |
2608 | rather than as a bad arithmetic substitution. | |
2609 | ||
2610 | k. A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist' | |
2611 | shell options when editing and re-executing a series of commands were | |
2612 | fixed. | |
2613 | ||
2614 | l. A fix was made to the grammar -- the list of commands between `do' and | |
2615 | `done' in the body of a `for' command should be treated the same as a | |
2616 | while loop. | |
2617 | ||
2618 | 2. Changes to Readline | |
2619 | ||
2620 | a. A couple of bugs that caused the history search functions to attempt to | |
2621 | free a NULL pointer were fixed. | |
2622 | ||
2623 | b. If the C library provides setlocale(3), readline does not need to look | |
2624 | at various environment variables to decide whether or not to go into | |
2625 | eight-bit mode automatically -- just check whether the current locale | |
2626 | is not `C' or `POSIX'. | |
2627 | ||
2628 | c. If the filename completion function finds that a directory was not closed | |
2629 | by a previous (interrupted) completion, it closes the directory with | |
2630 | closedir(). | |
2631 | ||
2632 | 3. New Features in Bash | |
2633 | ||
2634 | a. New bindable readline commands: history-and-alias-expand-line and | |
2635 | alias-expand-line. The code was always in there, there was just no | |
2636 | way to execute it. | |
2637 | ||
2638 | ------------------------------------------------------------------------------ | |
2639 | This document details the changes between this version, bash-2.01-beta1, | |
2640 | and the previous version, bash-2.01-alpha1. | |
2641 | ||
2642 | 1. Changes to Bash | |
2643 | ||
2644 | a. Fixed a problem that could cause file descriptors used for process | |
2645 | substitution to conflict with those used explicitly in redirections. | |
2646 | ||
2647 | b. Made it easier to regenerate configure if the user changes configure.in. | |
2648 | ||
2649 | c. ${GROUPS[0]} should always be the primary group, even on systems without | |
2650 | multiple groups. | |
2651 | ||
2652 | d. Spelling correction is no longer enabled by default. | |
2653 | ||
2654 | e. Fixes to quoting problems in `bashbug'. | |
2655 | ||
2656 | f. OS-specific configuration changes were made for: Irix 6. | |
2657 | ||
2658 | g. OS-specific code changes were made for: QNX. | |
2659 | ||
2660 | h. A more meaningful message is now printed when the file in /tmp for a | |
2661 | here document cannot be created. | |
2662 | ||
2663 | i. Many changes to the shell's variable initialization code to speed | |
2664 | non-interactive startup. | |
2665 | ||
2666 | j. Changes to the non-job-control code so that it does not try to open | |
2667 | /dev/tty. | |
2668 | ||
2669 | k. The output of `set' and `export' is once again sorted, as POSIX wants. | |
2670 | ||
2671 | l. Fixed a problem caused by a recursive call reparsing the value of | |
2672 | $SHELLOPTS. | |
2673 | ||
2674 | m. The tilde code no longer calls getenv() when it's compiled as part of | |
2675 | the shell, which should eliminate problems on systems that cannot | |
2676 | redefine getenv(), like the NeXT OS. | |
2677 | ||
2678 | n. Fixed a problem that caused `bash -o' or `bash +o' to not list all | |
2679 | the shell options. | |
2680 | ||
2681 | o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit | |
2682 | only if the hard limit is greater than the current (soft) limit. | |
2683 | ||
2684 | p. Fixed a problem that arose when building bash in a different directory | |
2685 | than the source and y.tab.[ch] were remade with something other than | |
2686 | bison. This came up most often on NetBSD. | |
2687 | ||
2688 | q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated | |
2689 | an unfinished command completion (`/), which generated errors. | |
2690 | ||
2691 | r. The bash special tilde expansions (~-, ~+) are now attempted before | |
2692 | calling the standard tilde expansion code, which should eliminate the | |
2693 | problems people have been seeing with this on Solaris 2.5.1. | |
2694 | ||
2695 | s. Added support for <stdarg.h> to places where it was missing. | |
2696 | ||
2697 | t. Changed the code that reads the output of a command substitution to not | |
2698 | go through stdio. This reduces the memory requirements and is faster. | |
2699 | ||
2700 | u. A number of changes to speed up export environment creation were made. | |
2701 | ||
2702 | v. A number of memory leaks were fixed as the result of running the test | |
2703 | scripts through Purify. | |
2704 | ||
2705 | w. Fixed a bug that caused subshells forked to interpret executable | |
2706 | scripts without a leading `#!' to not reinitialize the values of | |
2707 | the shell options. | |
2708 | ||
2709 | 2. Changes to Readline | |
2710 | ||
2711 | a. History library has less `#ifdef SHELL' code -- abstracted stuff out | |
2712 | into application-specific function hooks. | |
2713 | ||
2714 | b. Readline no longer calls getenv() if it's compiled as part of the shell, | |
2715 | which should eliminate problems on systems that cannot redefine getenv(), | |
2716 | like the NeXT OS. | |
2717 | ||
2718 | c. Fixed translation of ESC when `untranslating' macro values. | |
2719 | ||
2720 | d. The region kill operation now fixes the mark if it ends up beyond the | |
2721 | boundaries of the line after the region is deleted. | |
2722 | ||
2723 | 3. New Features in Bash | |
2724 | ||
2725 | a. New argument for `configure': `--with-curses'. This can be used to | |
2726 | override the selection of the termcap library on systems where it is | |
2727 | deficient. | |
2728 | ||
2729 | ------------------------------------------------------------------------------ | |
2730 | This document details the changes between this version, bash-2.01-alpha1, | |
2731 | and the previous version, bash-2.0-release. | |
2732 | ||
2733 | 1. Changes to Bash | |
2734 | ||
2735 | a. System-specific configuration changes for: FreeBSD, SunOS4, Irix, | |
2736 | MachTen, QNX 4.2, Harris Night Hawk, SunOS5. | |
2737 | ||
2738 | b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2, | |
2739 | HP-UX, AIX 4.2. | |
2740 | ||
2741 | c. A bug that caused the exec builtin to fail because the full pathname of | |
2742 | the command could not be found was fixed. | |
2743 | ||
2744 | d. The code that performs output redirections is now more resistant to | |
2745 | race conditions and possible security exploits. | |
2746 | ||
2747 | e. A bug that caused the shell to dump core when performing pattern | |
2748 | substitutions on variable values was fixed. | |
2749 | ||
2750 | f. More hosts are now recognized by the auto-configuration mechanism | |
2751 | (OpenBSD, QNX, others). | |
2752 | ||
2753 | g. Assignments to read-only variables that attempt to convert them to | |
2754 | arrays are now errors. | |
2755 | ||
2756 | h. A bug that caused shell scripts using array assignments in POSIX mode | |
2757 | to exit after the assignment was performed was fixed. | |
2758 | ||
2759 | i. The substring expansion code is now more careful about running off the | |
2760 | ends of the expanded variable value. | |
2761 | ||
2762 | j. A bug that caused completion to fail if a backquoted command substitution | |
2763 | appeared anywhere on the line was fixed. | |
2764 | ||
2765 | k. The `source' builtin no longer turns off history if it has been enabled | |
2766 | in a non-interactive shell. | |
2767 | ||
2768 | l. A bug that caused the shell to crash when `disown' was given a pid | |
2769 | instead of a job number was fixed. | |
2770 | ||
2771 | m. The `cd' spelling correction code will not try to change to `.' if no | |
2772 | directory entries match a single-character argument. | |
2773 | ||
2774 | n. A bad variable name supplied to `declare', `export', or `readonly' no | |
2775 | longer causes a non-interactive shell in POSIX mode to exit. | |
2776 | ||
2777 | o. Some fixes were made to the test suite to handle peculiarities of | |
2778 | various Unix versions. | |
2779 | ||
2780 | p. The bash completion code now quotes characters that readline would | |
2781 | treat as word breaks for completion but are not shell metacharacters. | |
2782 | ||
2783 | q. Bad options supplied at invocation now cause a usage message to be | |
2784 | displayed. | |
2785 | ||
2786 | r. Fixes were made to the code that handles DEBUG traps so that the trap | |
2787 | string is not freed inappropriately. | |
2788 | ||
2789 | s. Some changes were made to the bash debugger in examples/bashdb -- it | |
2790 | should be closer to working now. | |
2791 | ||
2792 | t. A problem that caused the default filename used for mail checking to be | |
2793 | wrong was fixed. | |
2794 | ||
2795 | u. A fix was made to the `echo' builtin so that NUL characters printed with | |
2796 | `echo -e' do not cause the output to be truncated. | |
2797 | ||
2798 | v. A fix was made to the job control code so that the shell behaves better | |
2799 | when monitor mode is enabled in a non-interactive shell. | |
2800 | ||
2801 | w. Bash no longer catches all of the terminating signals in a non- | |
2802 | interactive shell until a trap is set on EXIT, which should result in | |
2803 | quicker startup. | |
2804 | ||
2805 | x. A fix was made to the command timing code so that `time' can be used in | |
2806 | a loop. | |
2807 | ||
2808 | y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as | |
b72432fd | 2809 | a nested subshell rather than strictly as an (erroneous) arithmetic |
d166f048 JA |
2810 | command. |
2811 | ||
2812 | z. A fix was made to the globbing code so that it correctly matches quoted | |
2813 | filenames beginning with a `.'. | |
2814 | ||
2815 | aa. A bug in `fc' that caused some multi-line commands to not be stored as | |
2816 | one command in the history when they were re-executed after editing | |
2817 | (with `fc -e') was fixed. | |
2818 | ||
2819 | bb. The `ulimit' builtin now attempts to catch some classes of integer | |
2820 | overflows. | |
2821 | ||
2822 | cc. The command-oriented-history code no longer attempts to add `;' | |
2823 | inappropriately when a newline appears while reading a $(...) command | |
2824 | substitution. | |
2825 | ||
2826 | dd. A bug that caused the shell to dump core when `help --' was executed | |
2827 | was fixed. | |
2828 | ||
2829 | ee. A bug that caused the shell to crash when an unset variable appeared | |
2830 | in the body of a here document after `set -u' had been executed was | |
2831 | fixed. | |
2832 | ||
2833 | ff. Implicit input redirections from /dev/null for asynchronous commands | |
2834 | are now handled better. | |
2835 | ||
2836 | gg. A bug that caused the shell to fail to compile when configured with | |
2837 | `--disable-readline' was fixed. | |
2838 | ||
2839 | hh. The globbing code should now be interruptible. | |
2840 | ||
2841 | ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a | |
2842 | stopped job and adjusts the data structures accordingly, as if `bg' had | |
2843 | been executed instead. | |
2844 | ||
2845 | jj. A bug that caused the shell to crash when mixing calls to `getopts' | |
2846 | and `shift' on the same set of positional parameters was fixed. | |
2847 | ||
2848 | kk. The command printing code now preserves the `-p' flag to `time'. | |
2849 | ||
2850 | ll. The command printing code now handles here documents better when there | |
2851 | are other redirections associated with the command. | |
2852 | ||
2853 | mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_) | |
2854 | is no longer placed into the environment of executed commands -- users | |
2855 | of glibc had too many problems with it. | |
2856 | ||
2857 | nn. Reorganized the code that generates signames.h. The signal_names list | |
2858 | is now more complete but may be slightly different (SIGABRT is favored | |
2859 | over SIGIOT, for example). The preferred signal names are those | |
2860 | listed in the POSIX.2 standard. | |
2861 | ||
2862 | oo. `bashbug' now uses a filename shorter than 14 characters for its | |
2863 | temporary file, and asks for confirmation before sending the bug | |
2864 | report. | |
2865 | ||
2866 | pp. A bug that caused TAB completion in vi editing mode to not be turned | |
2867 | off when `set -o posix' was executed or back on when `set +o posix' | |
2868 | was executed was fixed. | |
2869 | ||
2870 | qq. A bug in the brace expansion code that caused brace expansions appearing | |
2871 | in new-style $(...) command substitutions to be inappropriately expanded | |
2872 | was fixed. | |
2873 | ||
2874 | rr. A bug in the readline hook shell-expand-line that could cause memory to | |
2875 | be inappropriately freed was fixed. | |
2876 | ||
2877 | ss. A bug that caused some arithmetic expressions containing `&&' and `||' | |
2878 | to be parsed with the wrong precedence has been fixed. | |
2879 | ||
2880 | tt. References to unbound variables after `set -u' has been executed now | |
2881 | cause the shell to exit immediately, as they should. | |
2882 | ||
2883 | uu. A bug that caused the shell to exit inappropriately when `set -e' had | |
2884 | been executed and a command's return status was being inverted with the | |
2885 | `!' reserved word was fixed. | |
2886 | ||
2887 | vv. A bug that could occasionally cause the shell to crash with a | |
2888 | divide-by-zero error when timing a command was fixed. | |
2889 | ||
2890 | ww. A bug that caused parameter pattern substitution to leave stray | |
2891 | backslashes in the replacement string when the expression is in | |
2892 | double quotes was fixed. | |
2893 | ||
2894 | xx. The `break' and `continue' builtins now break out of all loops when an | |
2895 | invalid count argument is supplied. | |
2896 | ||
2897 | yy. Fixed a bug that caused PATH to be set to the empty string if | |
2898 | `command -p' is executed with PATH unset. | |
2899 | ||
2900 | zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix, | |
2901 | as POSIX specifies. | |
2902 | ||
2903 | aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS | |
2904 | if there were no shell options set. | |
2905 | ||
2906 | bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX | |
2907 | mode, their output is as POSIX.2 specifies. | |
2908 | ||
2909 | ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually | |
2910 | creates an array variable. | |
2911 | ||
2912 | ddd. Fixed a bug that prevented `time' from correctly timing background | |
2913 | pipelines. | |
2914 | ||
2915 | 2. Changes to Readline | |
2916 | ||
2917 | a. A bug that caused an extra newline to be printed when the cursor was on | |
2918 | an otherwise empty line was fixed. | |
2919 | ||
2920 | b. An instance of memory being used after it was freed was corrected. | |
2921 | ||
2922 | c. The redisplay code now works when the prompt is longer than the screen | |
2923 | width. | |
2924 | ||
2925 | d. `dump-macros' is now a bindable name, as it should have been all along. | |
2926 | ||
2927 | e. Non-printable characters are now expanded when displaying macros and | |
2928 | their values. | |
2929 | ||
2930 | f. The `dump-variables' and `dump-macros' commands now output a leading | |
2931 | newline if they're called as the result of a key sequence, rather | |
2932 | than directly by an application. | |
2933 | ||
2934 | 3. New Features in Bash | |
2935 | ||
2936 | a. There is a new builtin array variable: GROUPS, the set of groups to which | |
2937 | the user belongs. This is used by the test suite. | |
2938 | ||
2939 | 4. New Features in Readline | |
2940 | ||
2941 | a. If a key sequence bound to `universal-argument' is read while reading a | |
2942 | numeric argument started with `universal-argument', it terminates the | |
2943 | argument but is otherwise ignored. This provides a way to insert multiple | |
2944 | instances of a digit string, and is how GNU emacs does it. | |
2945 | ||
2946 | ------------------------------------------------------------------------------ | |
ccc6cda3 JA |
2947 | This document details the changes between this version, bash-2.0-release, |
2948 | and the previous version, bash-2.0-beta3. | |
2949 | ||
2950 | 1. Changes to Bash | |
2951 | ||
2952 | a. Fix to the `getopts' builtin so that it does the right thing when a | |
2953 | required option argument is not present. | |
2954 | ||
2955 | b. The completion code now updates the common prefix of matched names | |
2956 | after FIGNORE processing is done, since any names that were removed | |
2957 | may have changed the common prefix. | |
2958 | ||
2959 | c. Fixed a bug that made messages in MAILPATH entries not work correctly. | |
2960 | ||
2961 | d. Fixed a serious documentation error in the description of the new | |
2962 | ${parameter:offset[:length]} expansion. | |
2963 | ||
2964 | e. Fixes to make parameter substring expansion ({$param:offset[:length]}) | |
2965 | work when within double quotes. | |
2966 | ||
2967 | f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional | |
2968 | parameters. | |
2969 | ||
2970 | g. Corrected a misspelling of `unlimited' in the output of `ulimit'. | |
2971 | ||
2972 | h. Fixed a bug that caused executable scripts without a leading `#!' to | |
2973 | occasionally pick up the wrong set of positional parameters. | |
2974 | ||
2975 | i. Linux systems now have a working `ulimit -v', using RLIMIT_AS. | |
2976 | ||
2977 | j. Updated config.guess so that many more machine types are recognized. | |
2978 | ||
2979 | k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]} | |
2980 | expansion. | |
2981 | ||
2982 | l. If the shell is named `-su', and `-c command' is supplied, read and | |
2983 | execute the login shell startup files even though the shell is not | |
2984 | interactive. This is to support the `-' option to `su'. | |
2985 | ||
2986 | m. Fixed a bug that caused core dumps when the DEBUG trap was ignored | |
2987 | with `trap "" DEBUG' and a shell function was subsequently executed. | |
2988 | ||
2989 | n. Fixed a bug that caused core dumps in the read builtin when IFS was | |
2990 | set to the null string and the input had leading whitespace. | |
2991 | ||
2992 | 2. Changes to Readline | |
2993 | ||
2994 | a. Fixed a bug that caused a numeric argument of 1024 to be ignored when | |
2995 | inserting text. | |
2996 | ||
2997 | b. Fixed the display code so that the numeric argument is displayed as it's | |
2998 | being entered. | |
2999 | ||
3000 | c. Fixed the numeric argument reading code so that `M-- command' is | |
3001 | equivalent to `M--1 command', as the prompt implies. | |
3002 | ||
3003 | 3. New Features in Bash | |
3004 | ||
3005 | a. `ulimit' now sets both hard and soft limits and reports the soft limit | |
3006 | by default (when neither -H nor -S is specified). This is compatible | |
3007 | with versions of sh and ksh that implement `ulimit'. | |
3008 | ||
3009 | b. Integer constants have been extended to base 64. | |
3010 | ||
3011 | 4. New Features in Readline | |
3012 | ||
3013 | a. The `home' and `end' keys are now bound to beginning-of-line and | |
3014 | end-of-line, respectively, if the corresponding termcap capabilities | |
3015 | are present. | |
3016 | ||
3017 | ------------------------------------------------------------------------------ | |
3018 | This document details the changes between this version, bash-2.0-beta3, | |
3019 | and the previous version, bash-2.0-beta2. | |
3020 | ||
3021 | 1. Changes to Bash | |
3022 | ||
3023 | a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX. | |
3024 | ||
3025 | b. When in POSIX mode, variable assignments preceding a special builtin | |
3026 | persist in the shell environment after the builtin completes. | |
3027 | ||
3028 | c. Changed all calls to getwd() to getcwd(). Improved check for systems | |
3029 | where the libc getcwd() calls popen(), since that breaks on some | |
3030 | systems when job control is being used. | |
3031 | ||
3032 | d. Fixed a bug that caused seg faults when executing scripts with the | |
3033 | execute bit set but without a leading `#!'. | |
3034 | ||
3035 | e. The environment passed to executed commands is never sorted. | |
3036 | ||
3037 | f. A bug was fixed in the code that expands ${name[@]} to the number of | |
3038 | elements in an array variable. | |
3039 | ||
3040 | g. A bug was fixed in the array compound assignment code ( A=( ... ) ). | |
3041 | ||
3042 | h. Window size changes now correctly propagate down to readline if | |
3043 | the shopt `checkwinsize' option is enabled. | |
3044 | ||
3045 | i. A fix was made in the code that expands to the length of a variable | |
3046 | value (${#var}). | |
3047 | ||
3048 | j. A fix was made to the command builtin so that it did not turn on the | |
3049 | `no fork' flag inappropriately. | |
3050 | ||
3051 | k. A fix was made to make `set -n' work more reliably. | |
3052 | ||
3053 | l. A fix was made to the job control initialization code so that the | |
3054 | terminal process group is set to the shell's process group if the | |
3055 | shell changes its own process group. | |
3056 | ||
3057 | 2. Changes to Readline | |
3058 | ||
3059 | a. System-specific changes for: SCO 3.2v[45]. | |
3060 | ||
3061 | b. The behavior of the vi-mode `.' when redoing an `i' command was changed | |
3062 | to insert the text previously inserted by the `i' command rather than | |
3063 | simply entering insert mode. | |
3064 | ||
3065 | 3. New features in Bash | |
3066 | ||
3067 | a. There is a new version of the autoload function package, in | |
3068 | examples/functions/autoload.v2, that uses arrays and provides more | |
3069 | functionality. | |
3070 | ||
3071 | b. Support for LC_COLLATE and locale-specific sorting of the results of | |
3072 | pathname expansion if strcoll() is available. | |
3073 | ||
3074 | 4. New Features in Readline | |
3075 | ||
3076 | a. Support for locale-specific sorting of completion possibilities if | |
3077 | strcoll() is available. | |
3078 | ||
3079 | ------------------------------------------------------------------------------ | |
3080 | This document details the changes between this version, bash-2.0-beta2, | |
3081 | and the previous version, bash-2.0-beta1. | |
3082 | ||
3083 | 1. Changes to Bash | |
3084 | ||
3085 | a. `pushd -' is once again equivalent to `pushd $OLDPWD'. | |
3086 | ||
3087 | b. OS-specific changes for: SCO 3.2v[45]. | |
3088 | ||
3089 | c. A change was made to the fix for the recently-reported security hole | |
3090 | when reading characters with octal value 255 to make it work better on | |
3091 | systems with restartable system calls when not using readline. | |
3092 | ||
3093 | d. Some changes were made to the test suite so that it works if you | |
3094 | configure bash with --enable-usg-echo-default. | |
3095 | ||
3096 | e. A fix was made to the parsing of conditional arithmetic expressions. | |
3097 | ||
3098 | f. Illegal arithmetic bases now cause an arithmetic evaluation error rather | |
3099 | than being silently reset. | |
3100 | ||
3101 | g. Multiple arithmetic bases now cause an arithmetic evaluation error | |
3102 | instead of being ignored. | |
3103 | ||
3104 | h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2. | |
3105 | ||
3106 | i. A bug that sometimes caused array indices to be evaluated twice (which | |
3107 | would cause errors when they contained assignment statements) was fixed. | |
3108 | ||
3109 | j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning | |
3110 | unsigned values and to simplify the code. | |
3111 | ||
3112 | k. A bug in the command-oriented-history code that caused it to sometimes | |
3113 | put semicolons after right parens inappropriately was fixed. | |
3114 | ||
3115 | l. The values inserted into the prompt by the \w and \W escape sequences | |
3116 | are now quoted to prevent further expansion. | |
3117 | ||
3118 | m. An interactive shell invoked as `sh' now reads and executes commands | |
3119 | from the file named by $ENV when it starts up. If it's a login shell, | |
3120 | it does this after reading /etc/profile and ~/.profile. | |
3121 | ||
3122 | n. The file named by $ENV is never read by non-interactive shells. | |
3123 | ||
3124 | 2. Changes to Readline | |
3125 | ||
3126 | a. A few changes were made to hide some macros and functions that should not | |
3127 | be public. | |
3128 | ||
3129 | b. An off-by-one error that caused seg faults in the history expansion code | |
3130 | was fixed. | |
3131 | ||
3132 | 3. New Features in Bash | |
3133 | ||
3134 | a. The ksh-style ((...)) arithmetic command was implemented. It is exactly | |
3135 | identical to let "...". This is controlled by a new option to configure, | |
3136 | `--enable-dparen-arithmetic', which is on by default. | |
3137 | ||
3138 | b. There is a new #define available in config.h.top: SYS_BASH_LOGOUT. If | |
3139 | defined to a filename, bash reads and executes commands from that file | |
3140 | when a login shell exits. It's commented out by default. | |
3141 | ||
3142 | c. `ulimit' has a `-l' option that reports the maximum amount of data that | |
3143 | may be locked into memory on 4.4BSD-based systems. | |
3144 | ||
3145 | ------------------------------------------------------------------------------ | |
3146 | This document details the changes between this version, bash-2.0-beta1, | |
3147 | and the previous version, bash-2.0-alpha4. | |
3148 | ||
3149 | 1. Changes to Bash | |
3150 | ||
3151 | a. A bug that sometimes caused traps to be ignored on signals the | |
3152 | shell treats specially was fixed. | |
3153 | ||
3154 | b. The internationalization code was changed to track the values of | |
3155 | LC_* variables and call setlocale() as appropriate. The TEXTDOMAIN | |
3156 | and TEXTDOMAINDIR variables are also tracked; changes cause calls | |
3157 | to textdomain() and bindtextdomain(), if available. | |
3158 | ||
3159 | c. A bug was fixed that sometimes caused double-quoted strings to be | |
3160 | parsed incorrectly. | |
3161 | ||
3162 | d. Changes were made so that the siglist code compiles correctly on | |
3163 | Solaris 2.5. | |
3164 | ||
3165 | e. Added `:' to the set of characters that cause word breaks for the | |
3166 | completion code so that pathnames in assignments to $PATH can be | |
3167 | completed. | |
3168 | ||
3169 | f. The `select' command was fixed to print $PS3 to stderr. | |
3170 | ||
3171 | g. Fixed an error in the manual page section describing the effect that | |
3172 | setting and unsetting GLOBIGNORE has on the setting of the `dotglob' | |
3173 | option. | |
3174 | ||
3175 | h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC | |
3176 | on systems without gettimeofday() and resources. | |
3177 | ||
3178 | i. The getopt static variables are now initialized each time a subshell | |
3179 | is started, so subshells using `getopts' work right. | |
3180 | ||
3181 | j. A sign-extension bug that caused a possible security hole was fixed. | |
3182 | ||
3183 | k. The parser now reads characters between backquotes within a double- | |
3184 | quoted string as a single word, so double quotes in the backquoted | |
3185 | string don't terminate the enclosing double-quoted string. | |
3186 | ||
3187 | l. A bug that caused `^O' to work incorrectly when typed as the first | |
3188 | thing to an interactive shell was fixed. | |
3189 | ||
3190 | m. A rarely-exercised off-by-one error in the code that quotes variable | |
3191 | values was fixed. | |
3192 | ||
3193 | n. Some memory and file descriptor leaks encountered when running a | |
3194 | shell script that is executable but does not have a leading `#!' | |
3195 | were plugged. | |
3196 | ||
3197 | 2. Changes to Readline | |
3198 | ||
3199 | a. A bug that sometimes caused incorrect results when trying to read | |
3200 | typeahead on systems without FIONREAD was fixed. | |
3201 | ||
3202 | 3. New Features in Bash | |
3203 | ||
3204 | a. The command timing code now uses the value of the TIMEFORMAT variable | |
3205 | to format and display timing statistics. | |
3206 | ||
3207 | b. The `time' reserved word now accepts a `-p' option to force the | |
3208 | POSIX.2 output format. | |
3209 | ||
3210 | c. There are a couple of new and updated scripts to convert csh startup | |
3211 | files to bash format. | |
3212 | ||
3213 | d. There is a new builtin array variable: BASH_VERSINFO. The various | |
3214 | members hold the parts of the version information in BASH_VERSION, | |
3215 | plus the value of MACHTYPE. | |
3216 | ||
3217 | 4. New Features in Readline | |
3218 | ||
3219 | a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter | |
3220 | eight-bit mode. | |
3221 | ||
3222 | ------------------------------------------------------------------------------ | |
3223 | This document details the changes between this version, bash-2.0-alpha4, | |
3224 | and the previous version, bash-2.0-alpha3. | |
3225 | ||
3226 | 1. Changes to Bash | |
3227 | ||
3228 | a. There is better detection of rsh connections on Solaris 2. | |
3229 | ||
3230 | b. Assignments to read-only variables preceding a command name are now | |
3231 | variable assignment errors. Variable assignment errors cause | |
3232 | non-interactive shells running in posix mode to exit. | |
3233 | ||
3234 | c. The word tokenizer was rewritten to handle nested quotes and pairs | |
3235 | ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...)) | |
3236 | correctly. Some of the parameter expansion code was updated as a | |
3237 | consequence. | |
3238 | ||
3239 | d. A fix was made to `test' when given three arguments so that a binary | |
3240 | operator is checked for first, before checking that the first argument | |
3241 | is `!'. | |
3242 | ||
3243 | e. 2''>/dev/null is no longer equivalent to 2>/dev/null. | |
3244 | ||
3245 | f. Parser error messages were regularized, and in most cases the name of | |
3246 | the shell script being read by a non-interactive shell is not printed | |
3247 | twice. | |
3248 | ||
3249 | g. A fix was made to the completion code so that it no longer removes the | |
3250 | text the user typed in some cases. | |
3251 | ||
3252 | h. The special glibc `getopt' environment variable is no longer put into | |
3253 | the environment on machines with small values of ARG_MAX. | |
3254 | ||
3255 | i. The expansion of ${...} now follows the POSIX.2 rules for finding the | |
3256 | closing `}'. | |
3257 | ||
3258 | j. The shell no longer displays spurious status messages for background | |
3259 | jobs in shell scripts that complete successfully when the script is | |
3260 | run from a terminal. | |
3261 | ||
3262 | k. `shopt -o' now correctly updates $SHELLOPTS. | |
3263 | ||
3264 | l. A bug that caused the $PATH searching code to return a non-executable | |
3265 | file even when an executable file with the same name appeared later in | |
3266 | $PATH was fixed. | |
3267 | ||
3268 | m. The shell now does tilde expansions on unquoted `:~' in assignment | |
3269 | statements when not in posix mode. | |
3270 | ||
3271 | n. Variable assignment errors when a command consists only of assignments | |
3272 | now cause non-interactive shells to exit when in posix mode. | |
3273 | ||
3274 | o. If the variable in a `for' or `select' command is read-only, or not a | |
3275 | legal shell identifier, a variable assignment error occurs. | |
3276 | ||
3277 | p. `test' now handles `-a' and `-o' as binary operators when three arguments | |
3278 | are supplied, and correctly parses `( word )' as equivalent to `word'. | |
3279 | ||
3280 | q. `test' was fixed so that file names of the form /dev/fd/NN mean the same | |
3281 | thing on all systems, even Linux. | |
3282 | ||
3283 | r. Fixed a bug in the globbing code that caused patterns with multiple | |
3284 | consecutive `*'s to not be matched correctly. | |
3285 | ||
3286 | s. Fixed a bug that caused $PS2 to not be printed when an interactive shell | |
3287 | not using readline is reading a here document. | |
3288 | ||
3289 | t. Fixed a bug that caused history expansion to be performed inappropriately | |
3290 | when a single-quoted string spanned more than one line. | |
3291 | ||
3292 | u. `getopts' now checks that the variable name passed by the user as the | |
3293 | second argument is a legal shell identifier and that the variable is | |
3294 | not read-only. | |
3295 | ||
3296 | v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it | |
3297 | encounters an error. | |
3298 | ||
3299 | w. Fixed `set' to display variable values in a form that can be re-read. | |
3300 | ||
3301 | x. Fixed a bug in the code that keeps track of whether or not local variables | |
3302 | have been declared at the current level of function nesting. | |
3303 | ||
3304 | y. Non-interactive shells in posix mode now exit if the name in a function | |
3305 | declaration is not a legal identifier. | |
3306 | ||
3307 | z. The job control code now ignores stopped children when the shell is not | |
3308 | interactive. | |
3309 | ||
3310 | aa. The `cd' builtin no longer attempts spelling correction on the directory | |
3311 | name if the shell is not interactive, regardless of the setting of the | |
3312 | `cdspell' option. | |
3313 | ||
3314 | bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2. | |
3315 | ||
3316 | cc. `time' now prints its output to stderr, as POSIX.2 specifies. | |
3317 | ||
3318 | 2. Fixes to Readline | |
3319 | ||
3320 | a. After printing possible completions, all lines of a multi-line prompt | |
3321 | are redisplayed. | |
3322 | ||
3323 | b. Some changes were made to the terminal handling code in rltty.c to | |
3324 | work around AIX 4.2 bugs. | |
3325 | ||
3326 | 3. New Features in Bash | |
3327 | ||
3328 | a. There is a new loadable builtin: sprintf, with calling syntax | |
3329 | sprintf var format [args] | |
3330 | This provides an easy way to simulate ksh left- and right-justified | |
3331 | variable values. | |
3332 | ||
3333 | b. The expansions of \h and \H in prompt strings were swapped. \h now | |
3334 | expands to the hostname up to the first `.', as in bash-1.14. | |
3335 | ||
3336 | 4. New Features in Readline | |
3337 | ||
3338 | a. The bash-1.14 behavior when ^M is typed while doing an incremental | |
3339 | search was restored. ^J may now be used to terminate the search without | |
3340 | accepting the line. | |
3341 | ||
3342 | b. There is a new bindable variable: disable-completion. This inhibits | |
3343 | word completion and causes the completion character to be inserted as | |
3344 | if it had been bound to self-insert. | |
3345 | ||
3346 | ------------------------------------------------------------------------------ | |
3347 | This document details the changes between this version, bash-2.0-alpha3, | |
3348 | and the previous version, bash-2.0-alpha2. | |
3349 | ||
3350 | There is now a file `COMPAT' included in the distribution that lists the | |
3351 | user-visible incompatibilities between 1.14 and 2.0. | |
3352 | ||
3353 | 1. Changes to Bash | |
3354 | ||
3355 | a. Some work was done so that word splitting of the rhs of assignment | |
3356 | statements conforms more closely to historical practice. | |
3357 | ||
3358 | b. A couple of errant memory frees were fixed. | |
3359 | ||
3360 | c. A fix was made to the test builtin so it recognizes `<' and `>' as | |
3361 | binary operators. | |
3362 | ||
3363 | d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's | |
3364 | allocated and freed. This is to catch callers that refer to freed | |
3365 | memory or assume something about newly-allocated memory. | |
3366 | ||
3367 | e. Fixed a problem with conversion to 12-hour time in the prompt | |
3368 | expansion code. | |
3369 | ||
3370 | f. Fixed a problem with configure's argument parsing order. Now you can | |
3371 | correctly turn on specific options after using --enable-minimal-config. | |
3372 | ||
3373 | g. The configure script now automatically disables the use of GNU malloc | |
3374 | on systems where it's appropriate (better than having people read the | |
3375 | NOTES file and do it manually). | |
3376 | ||
3377 | h. There are new prompt expansions (\v and \V) to insert version information | |
3378 | into the prompt strings. | |
3379 | ||
3380 | i. The default prompt string now includes the version number. | |
3381 | ||
3382 | j. Most of the builtins that take no options were changed to use the | |
3383 | internal getopt so they can produce proper error messages for -? | |
3384 | and incorrect options. | |
3385 | ||
3386 | k. Some system-specific changes were made for SVR4.2 and Solaris 2.5. | |
3387 | ||
3388 | l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of | |
3389 | MAXNAMLEN. | |
3390 | ||
3391 | m. A couple of problems caused by uninitialized variables were fixed. | |
3392 | ||
3393 | n. There are a number of new loadable builtin examples: logname, basename, | |
3394 | dirname, tty, pathchk, tee, head, and rmdir. All of these conform to | |
3395 | POSIX.2. | |
3396 | ||
3397 | o. Bash now notices changes in TZ and calls tzset() if present, so | |
3398 | changing TZ will alter the time printed by prompt expansions. | |
3399 | ||
3400 | p. The source was reorganized a bit so I don't have to wait so long for | |
3401 | some files to compile, and to facilitate the creation of a `shell | |
3402 | library' at some future point. | |
3403 | ||
3404 | q. Bash no longer turns off job control if called as `sh', since the | |
3405 | POSIX.2 spec includes job control as a standard feature. | |
3406 | ||
3407 | r. `bash -o posix' now works as intended. | |
3408 | ||
3409 | s. Fixed a problem with the completion code: when completing a filename | |
3410 | that contained globbing characters, if show-all-if-ambiguous was set, | |
3411 | the completion code would remove the user's text. | |
3412 | ||
3413 | t. Fixed ulimit so that (hopefully) the full range of limits is available | |
3414 | on HPUX systems. | |
3415 | ||
3416 | u. A new `shopt' option (`hostcomplete') enables and disables hostname | |
3417 | completion. | |
3418 | ||
3419 | v. The shell no longer attempts to save the history on an abort(), | |
3420 | which is usually called by programming_error(). | |
3421 | ||
3422 | w. The `-s' option to `fc' was changed to echo the command to be executed | |
3423 | to stderr instead of stdout. | |
3424 | ||
3425 | x. If the editor invoked by `fc -e' exits with a non-zero status, no | |
3426 | commands are executed. | |
3427 | ||
3428 | y. Fixed a bug that made the shopt `histverify' option work incorrectly. | |
3429 | ||
3430 | z. There is a new variable `MACHTYPE' whose value is the GNU-style | |
3431 | `cpu-company-system' system description as set by configure. (The | |
3432 | values of MACHTYPE and HOSTTYPE should really be swapped.) | |
3433 | ||
3434 | aa. The `ulimit' builtin now allows the maximum virtual memory size to be | |
3435 | set via setrlimit(2) if RLIMIT_VMEM is defined. | |
3436 | ||
3437 | bb. `bash -nc 'command'' no longer runs `command'. | |
3438 | ||
3439 | 2. Changes to Readline | |
3440 | ||
3441 | a. Fixed a typo in the code that checked for FIONREAD in input.c. | |
3442 | ||
3443 | b. Fixed a bug in the code that outputs keybindings, so things like C-\ | |
3444 | are quoted properly. | |
3445 | ||
3446 | c. Fixed a bug in the inputrc file parsing code to handle the problems | |
3447 | caused by inputrc files created from the output of `bind -p' in | |
3448 | previous versions of bash. The problem was due to the bug fixed | |
3449 | in item b above. | |
3450 | ||
3451 | d. Readline no longer turns off the terminal's meta key, and turns it on | |
3452 | once the first time it's called. | |
3453 | ||
3454 | ------------------------------------------------------------------------------ | |
3455 | This file documents the changes between this version, bash-2.0-alpha2, | |
3456 | and the previous version, bash-2.0-alpha. | |
3457 | ||
3458 | 1. Changes to Bash | |
3459 | ||
3460 | a. The shell no longer thinks directories are executable. | |
3461 | ||
3462 | b. `disown' has a new option, `h', which inhibits the resending of SIGHUP | |
3463 | but does not remove the job from the jobs table. | |
3464 | ||
3465 | c. The varargs functions in error.c now use ANSI-C `stdarg' if available. | |
3466 | ||
3467 | d. The build process now treats the `build version' in .build as local to | |
3468 | the build directory, so different versions built from the same source | |
3469 | tree have different `build versions'. | |
3470 | ||
3471 | e. Some problems with the grammar have been fixed. (It used `list' in a few | |
3472 | productions where `compound_list' was needed. A `list' must be terminated | |
3473 | with a newline or semicolon; a `compound_list' need not be.) | |
3474 | ||
3475 | f. A fix was made to keep `wait' from hanging when waiting for all background | |
3476 | jobs. | |
3477 | ||
3478 | g. `bash --help' now writes its output to stdout, like the GNU Coding Standards | |
3479 | specify, and includes the machine type (the value of MACHTYPE). | |
3480 | ||
3481 | h. `bash --version' now prints more information and exits successfully, like | |
3482 | the GNU Coding Standards specify. | |
3483 | ||
3484 | i. The output of `time' and `times' now prints fractional seconds with three | |
3485 | places after the decimal point. | |
3486 | ||
3487 | j. A bug that caused process substitutions to screw up the pipeline printed | |
3488 | by `jobs' was fixed. | |
3489 | ||
3490 | k. Fixes were made to the code that implements $'...' and $"..." so they | |
3491 | work as documented. | |
3492 | ||
3493 | l. The process substitution code now opens named pipes for reading with | |
3494 | O_NONBLOCK to avoid hanging. | |
3495 | ||
3496 | m. Fixes were made to the trap code so the shell cleans up correctly if the | |
3497 | trap command contains a `return' and we're executing a function or | |
3498 | sourcing a script with `.'. | |
3499 | ||
3500 | n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the | |
3501 | documentation (ps, dvi, etc.) on a `make install'. | |
3502 | ||
3503 | o. Fixed an auto-increment error that caused bash -c args to sometimes dump | |
3504 | core. | |
3505 | ||
3506 | p. Fixed a bug that caused $HISTIGNORE to fail when the history line | |
3507 | contained globbing characters. | |
3508 | ||
3509 | 2. Changes to Readline | |
3510 | ||
3511 | a. There is a new string variable, rl_library_version, available for use by | |
3512 | applications. The current value is "2.1". | |
3513 | ||
3514 | b. A bug encountered when expand-tilde was enabled and file completion was | |
3515 | attempted on a word beginning with `~/' was fixed. | |
3516 | ||
3517 | c. A slight change was made to the incremental search termination behavior. | |
3518 | ESC still terminates the search, but if input is pending or arrives | |
3519 | within 0.1 seconds (on systems with select(2)), it is used as a prefix | |
3520 | character. This is intented to allow users to terminate searches with | |
3521 | the arrow keys and get the behavior they expect. |