]>
Commit | Line | Data |
---|---|---|
5cc55f2f CR |
1 | This document details the changes between this version, bash-5.0-release, and |
2 | the previous version, bash-5.0-rc1. | |
3 | ||
4 | 1. Changes to Bash | |
5 | ||
6 | a. Tilde expansion isn't performed on indexed array subscripts, even for | |
7 | backwards compatibility. | |
8 | ||
9 | b. The shell doesn't exit in posix mode if the eval builtin gets a parse | |
10 | error when run by the command builtin. | |
11 | ||
12 | c. Fixed a bug that caused a shell comment in an alias to not find the end | |
13 | of the alias properly. | |
14 | ||
15 | d. Reverted a change from April, 2018 that caused strings containing | |
16 | backslashes to be flagged as glob patterns. | |
17 | ||
18 | 2. Changes to Readline | |
19 | ||
20 | 3. New Features in Bash | |
21 | ||
22 | 4. New Features in Readline | |
23 | ||
24 | ------------------------------------------------------------------------------ | |
68701259 CR |
25 | This document details the changes between this version, bash-5.0-rc1, and |
26 | the previous version, bash-5.0-beta2. | |
27 | ||
28 | 1. Changes to Bash | |
29 | ||
30 | a. Fix to initial word completion detection code. | |
31 | ||
32 | b. Fixed a bug that caused issues with assignment statements containing ^A in | |
33 | the value assigned when IFS contains ^A. | |
34 | ||
35 | c. Added a fallback to fnmatch() when strcoll can't correctly deal with | |
36 | bracket expression character equivalence classes. | |
37 | ||
38 | d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command | |
39 | when running a trap handler containing [[ or (( commands. | |
40 | ||
41 | e. Fixed a bug that caused nameref assignments in the temporary environment | |
42 | to potentially create variables with invalid names. | |
43 | ||
44 | f. Fixed a bug that caused `local -' to turn off alias expansion in scripts. | |
45 | ||
46 | g. Fixed a parser issue with a command string containing EOF after an invalid | |
47 | command as an argument to a special builtin not causing a posix-mode shell | |
48 | to exit. | |
49 | ||
50 | h. Made a slight change to the FNV-1 string hash algorithm used for associative | |
51 | arrays (corrected the initial seed). | |
52 | ||
53 | 2. Changes to Readline | |
54 | ||
55 | 3. New Features in Bash | |
56 | ||
57 | a. The `select' command now supports command forms without a word list | |
58 | following `in'. | |
59 | ||
60 | 4. New Features in Readline | |
61 | ||
62 | ------------------------------------------------------------------------------ | |
83ea087e CR |
63 | This document details the changes between this version, bash-5.0-beta2, and |
64 | the previous version, bash-5.0-beta. | |
65 | ||
66 | 1. Changes to Bash | |
67 | ||
68 | a. Fixed a bug that could cause a seg fault while parsing a subshell command | |
69 | inside a command substitution. | |
70 | ||
71 | b. Fixed several small memory leaks uncovered by coverity. | |
72 | ||
73 | c. Fixed a problem with command substitution inside an interactive shell that | |
74 | could cause the parent to receive a SIGHUP. | |
75 | ||
76 | d. Fixed a problem with using `*' and `@' as subscripts when assigning values | |
77 | to an associative array with assoc_expand_once enabled. | |
78 | ||
79 | e. Fixed a bug that could cause a huge memory allocation when completing a | |
80 | word beginning with an invalid tilde expansion. | |
81 | ||
82 | f. Cleaned up some incompatiblities with bash-4.4 when expanding indexed array | |
83 | subscripts used in arithmetic expansions when assoc_expand_once is enabled. | |
84 | ||
85 | g. The ${parameter@a} expansion will display attributes even if `parameter' is | |
86 | unset. | |
87 | ||
88 | h. Fixed a bug that caused the output of `set' to cut off some variables before | |
89 | printing the value. | |
90 | ||
91 | i. Treat a failure to assign a variable when using the ${x:=value} expansion | |
92 | as an expansion error, so non-interactive posix-mode shells exit | |
93 | ||
94 | j. Fixed a problem when expanding $* in a context where word splitting is not | |
95 | performed when IFS is NULL. | |
96 | ||
97 | k. Temp files used to store here documents are forced readable, no matter what | |
98 | the user's umask says. | |
99 | ||
100 | l. Fixed a problem where an interrupted brace expansion could cause the shell | |
101 | to attempt to free an invalid memory location. | |
102 | ||
103 | m. Make sure to check for any terminating signals after running a trap | |
104 | handler; don't wait until the next time we process traps. | |
105 | ||
106 | n. Fixed a bug that caused "return" to act like a special builtin with respect | |
107 | to variable assignments even when preceded by "command". | |
108 | ||
109 | o. POSIX-mode shells now return failure if the cd builtin fails due to the | |
110 | absolute directory name being longer than PATH_MAX, instead of trying | |
111 | again with a relative pathname. | |
112 | ||
113 | p. Fixed a problem with FUNCNAME occasionally being visible when not executing | |
114 | a shell function. | |
115 | ||
116 | q. Fixed a problem with the expansions performed on the WORD in the case | |
117 | command. | |
118 | ||
119 | r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during | |
120 | word splitting and the read builtin. | |
121 | ||
122 | s. Fixed a problem with expanding an array with subscript `*' when all the | |
123 | elements expand to the empty string, and making sure the expansion honors | |
124 | the `:' specifier. | |
125 | ||
126 | 2. Changes to Readline | |
127 | ||
128 | a. Fixed a bug with adding multibyte characters to an incremental search string. | |
129 | ||
130 | b. Fixed a bug with redoing text insertions in vi mode. | |
131 | ||
132 | c. Fixed a bug with pasting text into an incremental search string if bracketed | |
133 | paste mode is enabled. ESC cannot be one of the incremental search | |
134 | terminator characters for this to work. | |
135 | ||
136 | d. Fixed a bug with anchored search patterns when performing searches in vi | |
137 | mode. | |
138 | ||
139 | 3. New Features in Bash | |
140 | ||
141 | a. Associative and indexed arrays now allow subscripts consisting solely of | |
142 | whitespace. | |
143 | ||
144 | b. `checkwinsize' is now enabled by default. | |
145 | ||
146 | c. The `localvar_unset' shopt option is now visible and documented. | |
147 | ||
148 | d. The `progcomp_alias' shopt option is now visible and documented. | |
149 | ||
150 | e. The signal name processing code now understands `SIGRTMIN+n' all the way | |
151 | up to SIGRTMAX. | |
152 | ||
153 | f. There is a new `seq' loadable builtin. | |
154 | ||
155 | g. Trap execution now honors the (internal) max invocations of `eval', since | |
156 | traps are supposed to be executed as if using `eval'. | |
157 | ||
158 | h. The $_ variable doesn't change when the shell executes a command that forks. | |
159 | ||
160 | i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though | |
161 | conforming applications aren't supposed to use them. | |
162 | ||
163 | j. POSIX mode now enables the `shift_verbose' option. | |
164 | ||
165 | 4. New Features in Readline | |
166 | ||
167 | a. Readline now allows application-defined keymap names; there is a new public | |
168 | function, rl_set_keymap_name(), to do that. | |
169 | ||
170 | b. The "Insert" keypad key, if available, now puts readline into overwrite | |
171 | mode. | |
172 | ||
173 | ------------------------------------------------------------------------------ | |
b52e30b8 CR |
174 | This document details the changes between this version, bash-5.0-beta, and |
175 | the previous version, bash-5.0-alpha. | |
176 | ||
177 | 1. Changes to Bash | |
178 | ||
179 | a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this | |
180 | is where POSIX says the subshell is not "enclosed" by the loop. | |
181 | ||
182 | b. Added more UTF-8-specific versions of multibyte functions, and optimized | |
183 | existing functions if the current locale uses UTF-8 encoding. | |
184 | ||
185 | c. In POSIX mode, assignments preceding regular builtins should not persist | |
186 | when the builtin completes. | |
187 | ||
188 | d. Added additional checks to special array assignment (e.g., BASH_ALIASES) | |
189 | so it can't be used to bypass validity checks performed in other places. | |
190 | ||
191 | e. The `!!' history expansion now refers to the previous history entry as | |
192 | expected, even if used on the second or subsequent line of a multi-line | |
193 | history entry. | |
194 | ||
195 | f. Fixed a bug that could cause the shell to dereference a NULL pointer if | |
196 | the environment (`environ') is set to NULL. | |
197 | ||
198 | g. Bash uses slightly better integer overflow handling for brace sequence | |
199 | expansion on systems where ints are 32 bits and intmax_t is 64 bits. | |
200 | ||
201 | h. Fixed a bug setting attributes for a variable named as an argument to | |
202 | `declare' that also appears as a nameref in the temporary environment. | |
203 | ||
204 | i. Fixed several bugs that could cause assignments to namerefs to create | |
205 | variables with invalid names. | |
206 | ||
207 | j. Fixed a bug that could result in the SIGINT handler being set incorrectly | |
208 | in asynchronous subshells. | |
209 | ||
210 | k. Fixed a bug that could cause `bash -t' to not execute the specified command. | |
211 | ||
212 | l. Fixed several bugs that caused the shell to operate on the wrong variable | |
213 | when using namerefs with the same name as a global variable in shell | |
214 | functions. | |
215 | ||
216 | m. Internal changes to how the shell handles variables with invalid names in | |
217 | the initial environment and to prevent variables with invalid names from | |
218 | being added to the environment instead of passing them on to children. | |
219 | ||
220 | n. Changes to make sure that an expansion that results in a quoted null string | |
221 | is reflected in the expansion, even if the word expands to nothing. | |
222 | ||
223 | o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand | |
224 | the same way after the recent changes for POSIX interpretation 888. | |
225 | ||
226 | p. Saving and restoring the positional parameters at function entry and exit | |
227 | is considerably more efficient; noticeably so when there are large numbers | |
228 | of positional parameters. | |
229 | ||
230 | q. Fixed a bug that caused `lastpipe' and `pipefail' to return an incorrect | |
231 | status for the pipeline if there was more than one external command in a | |
232 | loop body appearing in the last pipeline element. | |
233 | ||
234 | r. Fixed a bug that caused value conversion errors with the printf builtin's | |
235 | %u and %f conversion specifications and invalid constants. | |
236 | ||
237 | 2. Changes to Readline | |
238 | ||
239 | a. Added more UTF-8-specific versions of multibyte functions, and optimized | |
240 | existing functions if the current locale uses UTF-8 encoding. | |
241 | ||
242 | b. Fixed a problem with bracketed-paste inserting more than one character and | |
243 | interacting with other readline functions. | |
244 | ||
245 | c. Fixed a bug that caused the history library to attempt to append a history | |
246 | line to a non-existent history entry. | |
247 | ||
248 | d. If using bracketed paste mode, output a newline after the \r that is the | |
249 | last character of the mode disable string to avoid overwriting output. | |
250 | ||
251 | e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better | |
252 | handle multibyte characters. | |
253 | ||
254 | f. Fixed a redisplay problem that caused an extra newline to be generated on | |
9282e182 | 255 | accept-line when the line length is exactly the screenwidth. |
b52e30b8 CR |
256 | |
257 | 3. New Features in Bash | |
258 | ||
259 | a. Bash no longer allows variable assignments preceding a special builtin that | |
260 | changes variable attributes to propagate back to the calling environment | |
261 | unless the compatibility level is 44 or lower. | |
262 | ||
263 | b. You can set the default value for $HISTSIZE at build time in config-top.h. | |
264 | ||
265 | c. The `complete' builtin now accepts a -I option that applies the completion | |
266 | to the initial word on the line. | |
267 | ||
268 | d. The internal bash malloc now uses mmap (if available) to satisfy requests | |
269 | greater than 128K bytes, so free can use mfree to return the pages to the | |
270 | kernel. | |
271 | ||
272 | e. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup | |
273 | unless it's in debugging mode, as the documentation has always said, but | |
274 | will dynamically create them if a script references them at the top level | |
275 | without having enabled debugging mode. | |
276 | ||
277 | f. The localvar_inherit option will not attempt to inherit a value from a | |
278 | variable of an incompatible type (indexed vs. associative arrays, for | |
279 | example). | |
280 | ||
281 | g. The `globasciiranges' option is now enabled by default; it can be set to | |
282 | off by default at configuration time. | |
283 | ||
284 | 4. New Features in Readline | |
285 | ||
286 | a. The history expansion library now understands command and process | |
287 | substitution and extended globbing and allows them to appear anywhere in a | |
288 | word. | |
289 | ||
290 | b. The history library has a new variable that allows applications to set the | |
291 | initial quoting state, so quoting state can be inherited from a previous | |
292 | line. | |
293 | ||
294 | ------------------------------------------------------------------------------ | |
5c5c7523 CR |
295 | This document details the changes between this version, bash-5.0-alpha, and |
296 | the previous version, bash-4.4-release. | |
297 | ||
298 | 1. Changes to Bash | |
299 | ||
300 | a. Fixed a bug that could cause traps in background jobs to give the terminal | |
301 | to the wrong process group. | |
302 | ||
303 | b. Fixed a bug that caused `kill -l 0' to print an out-of-range error. | |
304 | ||
305 | c. Fixed a problem that could result in here-documents being displayed in | |
306 | the wrong order. | |
307 | ||
308 | d. Fixed a number of out-of-bounds and free memory read errors found via | |
309 | fuzzing. | |
310 | ||
311 | e. Fixed a subshell inheritance problem that could cause a subshell to wait for | |
312 | the wrong process. | |
313 | ||
314 | f. Fixed a bug that caused SHLVL to be incremented one too many times when | |
315 | creating subshells. | |
316 | ||
317 | g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with | |
318 | job control enabled. | |
319 | ||
320 | h. Fixed a spurious warning about unterminated ${ or $( constructs during | |
321 | word completion. | |
322 | ||
323 | i. The shell no longer runs traps if a signal arrives while reading command | |
324 | substitution output. | |
325 | ||
326 | j. Fixed an arithmetic expansion error that could allow ++var++ as valid | |
327 | syntax. | |
328 | ||
329 | k. Fixed an error that allowed out-of-bounds references to the directory stack. | |
330 | ||
331 | l. The shell does a better job of saving multi-line history entries with | |
332 | embedded comments. | |
333 | ||
334 | m. Fixed a bug that could cause quoted bracket expressions in regular expression | |
335 | arguments to `[[' to not match correctly. | |
336 | ||
337 | n. Fixed a bug that could cause an IFS character in a word to result in an | |
338 | extra '\001' character in the expansion. | |
339 | ||
340 | o. A trailing backslash in a glob pattern can match a trailing backslash in the | |
341 | string. | |
342 | ||
343 | p. Fixed a memory leak in the process creation code path when job control is | |
344 | enabled. | |
345 | ||
346 | q. Fixed a bug that caused `printf' to output broken surrogate pairs for | |
347 | Japanese locales. | |
348 | ||
349 | r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to | |
350 | kill an interactive shell. | |
351 | ||
352 | s. Fixed a bug that could cause the `read' builtin to not fully read a | |
353 | multibyte character. | |
354 | ||
355 | t. Fixed a bug that could cause identifiers to be evaluated in conditional | |
356 | arithmetic expressions even when evaluation is suppressed. | |
357 | ||
358 | u. Fixed a bug that could result in command substitution, when executed in a | |
359 | context where word splitting is not performed, to leave a stray '\001' | |
360 | character in the string. | |
361 | ||
362 | v. Fixed a bug that could cause history expansion to be disabled in a non- | |
363 | interactive shell even if `-o histexpand' is supplied at startup. | |
364 | ||
365 | w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters. | |
366 | ||
367 | x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions. | |
368 | ||
369 | y. If indirect expansion attempts to indirectly reference through an unset | |
370 | variable, report an error. | |
371 | ||
372 | z. Added a guard to prevent the shell from looping while receiving an endless | |
373 | stream of SIGTTIN at shell startup. | |
374 | ||
375 | aa. Fixed a bug with parsing here documents inside a command substitution when | |
376 | looking for the closing delimiter. | |
377 | ||
378 | bb. Fixed a bug that caused printf to not quote all <blank> characters in the | |
379 | current locale when using the `%q' format specifier. | |
380 | ||
381 | cc. Fixed a bug with bash's internal buffered I/O system that caused the input | |
382 | pointer to not be reset when read(2) returned an EOF. | |
383 | ||
384 | dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will | |
385 | not interrupt open/read/write system calls. | |
386 | ||
387 | ee. The ERR trap now reports line numbers more reliably. | |
388 | ||
389 | ff. The shell no longer tries to manipulate the terminal process group if a | |
390 | command or process substitution is killed by SIGTERM when job control is | |
391 | enabled. | |
392 | ||
393 | gg. Fixed a bug that caused extglob patterns to match filenames beginning with | |
394 | a period. | |
395 | ||
396 | hh. File descriptors open for writing to here documents are no longer available | |
397 | to subshells. | |
398 | ||
399 | ii. Make sure word completion doesn't perform command or process substitution. | |
400 | ||
401 | jj. Fixed a bug with parsing $$'...' inside a command substitution. | |
402 | ||
403 | kk. Fixed a bug that caused bash to remove backslash-newline pairs from the | |
404 | body of a here-document with a quoted delimiter inside a command | |
405 | substitution. | |
406 | ||
407 | ll. Fixed a bug that could cause the shell to hang when adding a pid to the | |
408 | table of background process exit statuses. | |
409 | ||
410 | mm. Fixed a bug that could cause 0x01 characters to be doubled in the output | |
411 | of process substitution. | |
412 | ||
413 | nn. Restricted shells now clear the hash table before making the PATH variable | |
414 | read-only. | |
415 | ||
416 | oo. There are a number of changes to the expansion of $* and $@ in contexts | |
417 | where word splitting does not occur (quoted and unquoted), with IFS set | |
418 | to NULL or a non-standard value, mostly to deal with the consequences of | |
419 | the behavior defined in Posix interpretation 888. | |
420 | ||
421 | pp. There are a number of changes to nameref variable handling to avoid | |
422 | creating variables with invalid names. | |
423 | ||
424 | qq. A non-interactive posix mode shell no longer exits when an assignment | |
425 | statement fails if the assignment is utimately being performed by the | |
426 | `command' builtin. | |
427 | ||
428 | rr. When using character class names for globbing, don't allow case | |
429 | insensitivity, even if nocaseglob is enabled. | |
430 | ||
431 | ss. Fixed a bug that allowed some redirections to stay in place if a later | |
432 | redirection failed. | |
433 | ||
434 | tt. Fixed a bug in how command and process substitutions are recognized within | |
435 | other parameter expansions. | |
436 | ||
437 | uu. Fixed a bug that caused bash to loop under certain circumstances when | |
438 | performing arithmetic expansion on a variable whose value is an invalid | |
439 | expression. | |
440 | ||
441 | vv. Fixed a bug that could cause bash to expand aliases inappropriately while | |
442 | parsing compound commands like `case'. | |
443 | ||
444 | ww. Fixed a bug that could cause `read -N' to fail to read complete multibyte | |
445 | characters, even when the sequences are incomplete or invalid, with or | |
446 | without readline. | |
447 | ||
448 | xx. Fixed a bug that could cause `case' to fail to match patterns containing | |
449 | 0x01 characters. | |
450 | ||
451 | yy. Fixed a bug that caused exported functions to contain stray 0x01 characters. | |
452 | ||
453 | zz. Fixed some inconsistencies with how the history number is handled in the | |
454 | various prompt strings. | |
455 | ||
456 | aaa. Fixed a bug that could cause a core dump if READLINE_LINE was unset | |
457 | inside a shell function bound to a key sequence with `bind -x'. | |
458 | ||
459 | bbb. Fixed a bug that could cause bash to not read a token terminator correctly | |
460 | if a command substitution was used inside an arithmetic `for' command. | |
461 | ||
462 | ccc. Fixed problems that could occur with a fatal arithmetic expansion error | |
463 | in a context (like prompt expansion) where you can't jump back to the | |
464 | top level. | |
465 | ||
466 | ddd. Expression errors in arithmetic `for' commands are treated more like | |
467 | shell syntax errors. | |
468 | ||
469 | eee. Fixed a parser synchronization error resulting from a syntax error | |
470 | followed immediately by an EOF. | |
471 | ||
472 | fff. When executing a shell function, the first line in the function ($LINENO) | |
473 | is line 1 instead of line 0, as Posix requires. | |
474 | ||
475 | ggg. In Posix mode, bash will canonicalize the value of PWD it inherits from | |
476 | the environment and use that to set its idea of the current directory. | |
477 | ||
478 | hhh. If LINENO is exported, bash needs to regenerate its value each time it | |
479 | constructs the environment. | |
480 | ||
481 | iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'. | |
482 | ||
483 | jjj. Make sure the `coproc' command returns an appropriate status if the NAME | |
484 | argument is invalid. | |
485 | ||
486 | kkk. Fixed a problem with arithmetic expressions containing array references | |
487 | that contain arithmetic expressions with syntax errors. | |
488 | ||
489 | lll. The `select' command and help builtin will use $COLUMNS before the window | |
490 | size returned from the kernel as the terminal width. | |
491 | ||
492 | mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to | |
493 | detect file descriptor errors. | |
494 | ||
495 | nnn. The `read' builtin now does a better job of acting on signals that don't | |
496 | interrupt read(2). | |
497 | ||
498 | ooo. Fixed some cases where `printf -v' did not return failure status on a | |
499 | variable assignment error. | |
500 | ||
501 | ppp. Fixed temporary environment propagation back to the current environment | |
502 | so that it doesn't happen for special builtins run by the `command' | |
503 | builtin. | |
504 | ||
505 | qqq. Fixed a bug when searching for the end of a here-document delimiter in a | |
506 | command substitution. | |
507 | ||
508 | rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail. | |
509 | ||
510 | sss. Fixed a bug that could cause reserved words to not be recognized in a | |
511 | for statement without the `in' inside a command substitution. | |
512 | ||
513 | ttt. Fixed a bug that could cause a double-free in a timed command with an | |
514 | expansion error. | |
515 | ||
516 | uuu. Fixed a bug that could cause a core dump if a script switches from a UTF-8 | |
517 | locale to a different locale after displaying a lone surrogate character. | |
518 | ||
519 | vvv. Fixed cases where bash prematurely removed FIFOs attached to process | |
520 | substitutions. | |
521 | ||
522 | www. Fixed a problem with calculating the size of the table that stores exit | |
523 | statuses from background processes when the child process resource limit | |
524 | is very large. | |
525 | ||
526 | xxx. Fixed a memory leak with functions using `return' when using FIFOs for | |
527 | standard input. | |
528 | ||
529 | yyy. `wait' without arguments attempts to wait for all active process | |
530 | substitution processes. | |
531 | ||
532 | zzz. Fixed a bug where an indirect parameter was subjected to word splitting | |
533 | when trying to find the indirected variable name. | |
534 | ||
535 | aaaa. Fixed a bug that could allow restricted shell users to add commands to | |
536 | the hash table. | |
537 | ||
538 | bbbb. When using the `!(patlist)' extended globbing operator, a filename | |
539 | beginning with a `.' that doesn't match any of the patterns is not | |
540 | returned as a match if leading dots must be matched explicitly. | |
541 | ||
542 | cccc. Fixed a bug that could cause line number and source file information for | |
543 | a function definition to be incorrect if there are multiple definitions. | |
544 | ||
545 | dddd. Fixed a bug that could cause builtins like `readonly' to behave | |
546 | differently when applied to arrays and scalar variables within functions. | |
547 | ||
548 | eeee. Fixed a bug that could cause alias expansion to add an extra space to | |
549 | a quoted string that begins outside the alias expansion. | |
550 | ||
551 | ffff. Fixed a bug that could result in unwanted alias expansion after timing | |
552 | the null command. | |
553 | ||
554 | gggg. Fixed a bug that could cause a core dump if a timestamp in a history | |
555 | file overflowed a time_t. | |
556 | ||
557 | hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since | |
558 | the kernel calls make those file descriptors read-write. | |
559 | ||
560 | iiii. Fixed a problem with splitting double-quoted words for programmable | |
561 | completion when the double quote immediately follows another word | |
562 | delimiter. | |
563 | ||
564 | jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share | |
565 | the same input buffer. | |
566 | ||
567 | kkkk. The error message resulting from ${x:?} and ${x?} now differs depending | |
568 | on whether the variable is null or unset. | |
569 | ||
570 | llll. In Posix mode, the shell exits if a variable assignment fails and precedes | |
571 | an empty simple command (after expansion). | |
572 | ||
573 | mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to | |
574 | drop characters. | |
575 | ||
576 | nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal | |
577 | due to Linux pid namespace peculiarities. | |
578 | ||
579 | oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for | |
580 | `bind -x' commands. | |
581 | ||
582 | pppp. Fixed a bug that could cause SIGINT recursion when running an external | |
583 | command in a trap the shell takes after a command exits due to SIGINT. | |
584 | ||
585 | qqqq. Make sure the shell turns off job control before running the command- | |
586 | not-found handle, so the command doesn't try to manipulate process | |
587 | groups. | |
588 | ||
589 | rrrr. Fixed a problem with timing process substitutions that caused the shell | |
590 | to print timing information for the calling command. | |
591 | ||
592 | ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark | |
593 | the delimiter as quoted (inhibiting expansion of the here-document | |
594 | contents). | |
595 | ||
596 | tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and | |
597 | conditional command pattern matches. | |
598 | ||
599 | uuuu. Fixed a bug that could cause the pattern matching engine to not recognize | |
600 | locale-specific character classes. | |
601 | ||
602 | vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently. | |
603 | ||
604 | wwww. The `globstar' code now skips over symbolic links to directories, | |
605 | preventing them from being scanned twice. | |
606 | ||
607 | xxxx. When running `bind -x' commands, bash now sets READLINE_POINT based on | |
608 | the number of characters in the readline line buffer, not the number of | |
609 | bytes. | |
610 | ||
611 | yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN | |
612 | trap when using `eval return'. | |
613 | ||
614 | zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document. | |
615 | ||
616 | aaaaa. The process substitution code now closes and unlinks FIFOs when the | |
617 | process on the other side exits, in order to prevent SIGPIPE or | |
618 | waiting until a FIFO opened for read has a writer. | |
619 | ||
620 | bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in | |
621 | an {id}>foo construct. | |
622 | ||
623 | ccccc. After a Posix discussion, the pattern matching engine just skips over | |
624 | invalid character classes in bracket expressions, instead of matching | |
625 | them like individual characters in the expression. | |
626 | ||
627 | ddddd. Fixed a posix-mode problem with variable scoping when creating variables | |
628 | from assignment statements preceding special builtins. | |
629 | ||
630 | eeeee. Fixed a bug that could cause patterns containing backslashes to not be | |
631 | run through the pattern matching engine. | |
632 | ||
633 | fffff. Fixed a bug that could cause redirections to compound commands to not | |
634 | be `undone' if the file descriptor in the redirection was closed when | |
635 | the redirection was initially processed. | |
636 | ||
637 | ggggg. Fixed a bug that could cause buffer corruption when using `bind -x' in | |
638 | a command execute as a result of a key binding installed by `bind -x'. | |
639 | ||
640 | 2. Changes to Readline | |
641 | ||
642 | a. Added a guard to prevent nested macros from causing an infinite expansion | |
643 | loop. | |
644 | ||
645 | b. Instead of allocating enough history list entries to hold the maximum list | |
646 | size, cap the number allocated initially. | |
647 | ||
648 | c. Added a strategy to avoid allocating huge amounts of memory if a block of | |
649 | history entries without timestamps occurs after a block with timestamps. | |
650 | ||
651 | d. Added support for keyboard timeouts when an ESC character is the last | |
652 | character in a macro. | |
653 | ||
654 | e. There are several performance improvements when in a UTF-8 locale. | |
655 | ||
656 | f. Readline does a better job of preserving the original set of blocked | |
657 | signals when using pselect() to wait for input. | |
658 | ||
659 | g. Fixed a bug that caused multibyte characters in macros to be mishandled. | |
660 | ||
661 | h. Fixed several bugs in the code that calculates line breaks when expanding | |
662 | prompts that span several lines, contain multibyte characters, and contain | |
663 | invisible character seqeuences. | |
664 | ||
665 | i. Fixed several bugs in cursor positioning when displaying lines with prompts | |
666 | containing invisible characters and multibyte characters. | |
667 | ||
668 | j. When performing case-insensitive completion, Readline no longer sorts the | |
669 | list of matches unless directed to do so. | |
670 | ||
671 | k. Fixed a problem with key sequences ending with a backslash. | |
672 | ||
673 | l. Fixed out-of-bounds and free memory read errors found via fuzzing. | |
674 | ||
675 | m. Fixed several cases where the mark was set to an invalid value. | |
676 | ||
677 | n. Fixed a problem with the case-changing operators in the case where the | |
678 | lower and upper case versions of a character do not have the same number | |
679 | of bytes. | |
680 | ||
681 | o. Handle incremental and non-incremental search character reads returning EOF. | |
682 | ||
683 | p. Handle the case where a failing readline command at the end of a multi-key | |
684 | sequence could be misinterpreted. | |
685 | ||
686 | q. The history library now prints a meaningful error message if the history | |
687 | file isn't a regular file. | |
688 | ||
689 | r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace | |
690 | a multibyte character. | |
691 | ||
692 | s. The key binding code now attempts to remove a keymap if a key unbinding | |
693 | leaves it empty. | |
694 | ||
695 | t. Fixed a line-wrapping issue that caused problems for some terminal | |
696 | emulators. | |
697 | ||
698 | u. If there is a key bound to the tty's VDISCARD special character, readline | |
699 | disables VDISCARD while it is active. | |
700 | ||
701 | v. Fixed a problem with exiting bracketed paste mode on terminals that assume | |
702 | the bracketed paste mode character sequence contains visible characters. | |
703 | ||
704 | w. Fixed a bug that could cause a key binding command to refer to an | |
705 | uninitialized variable. | |
706 | ||
707 | 3. New Features in Bash | |
708 | ||
709 | a. The `wait' builtin can now wait for the last process substitution created. | |
710 | ||
711 | b. There is an EPOCHSECONDS variable, which expands to the time in seconds | |
712 | since the Unix epoch. | |
713 | ||
714 | c. There is an EPOCHREALTIME variable, which expands to the time in seconds | |
715 | since the Unix epoch with microsecond granularity. | |
716 | ||
717 | d. New loadable builtins: rm, stat, fdflags. | |
718 | ||
719 | e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment. | |
720 | ||
721 | f. When supplied a numeric argument, the shell-expand-line bindable readline | |
722 | command does not perform quote removal and suppresses command and process | |
723 | substitution. | |
724 | ||
725 | g. `history -d' understands negative arguments: negative arguments offset from | |
726 | the end of the history list. | |
727 | ||
728 | h. The `name' argument to the `coproc' reserved word now undergoes word | |
729 | expansion, so unique coprocs can be created in loops. | |
730 | ||
731 | i. A nameref name resolution loop in a function now resolves to a variable by | |
732 | that name in the global scope. | |
733 | ||
734 | j. The `wait' builtin now has a `-f' option, which signfies to wait until the | |
735 | specified job or process terminates, instead of waiting until it changes | |
736 | state. | |
737 | ||
738 | k. There is a define in config-top.h that allows the shell to use a static | |
739 | value for $PATH, overriding whatever is in the environment at startup, for | |
740 | use by the restricted shell. | |
741 | ||
742 | l. Process substitution does not inherit the `v' option, like command | |
743 | substitution. | |
744 | ||
745 | m. If a non-interactive shell with job control enabled detects that a foreground | |
746 | job died due to SIGINT, it acts as if it received the SIGINT. | |
747 | ||
748 | n. The SIGCHLD trap is run once for each exiting child process even if job | |
749 | control is not enabled when the shell is in Posix mode. | |
750 | ||
751 | o. A new shopt option: localvar_inherit; if set, a local variable inherits the | |
752 | value of a variable with the same name at the nearest preceding scope. | |
753 | ||
754 | p. `bind -r' now checks whether a key sequence is bound before binding it to | |
755 | NULL, to avoid creating keymaps for a multi-key sequence. | |
756 | ||
757 | q. A numeric argument to the line editing `operate-and-get-next' command | |
758 | specifies which history entry to use. | |
759 | ||
760 | r. The positional parameters are now assigned before running the shell startup | |
761 | files, so startup files can use $@. | |
762 | ||
763 | s. There is a compile-time option that forces the shell to disable the check | |
764 | for an inherited OLDPWD being a directory. | |
765 | ||
766 | t. The `history' builtin can now delete ranges of history entries using | |
767 | `-d start-end'. | |
768 | ||
769 | u. The `vi-edit-and-execute-command' bindable readline command now puts readline | |
770 | back in vi insertion mode after executing commands from the edited file. | |
771 | ||
772 | v. The command completion code now matches aliases and shell function names | |
773 | case-insensitively if the readline completion-ignore-case variable is set. | |
774 | ||
775 | w. There is a new `assoc_expand_once' shell option that attempts to expand | |
776 | associative array subscripts only once. | |
777 | ||
778 | x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended | |
779 | debugging mode is active. The old behavior of unconditionally setting them | |
780 | is available as part of the shell compatibility options. | |
781 | ||
782 | y. The `umask' builtin now allows modes and masks greater than octal 777. | |
783 | ||
784 | z. The `times' builtin now honors the current locale when printing a decimal | |
785 | point. | |
786 | ||
787 | aa. There is a new (disabled by default, undocumented) shell option to enable | |
788 | and disable sending history to syslog at runtime. | |
789 | ||
790 | 4. New Features in Readline | |
791 | ||
792 | a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as | |
793 | Posix specifies (uses fnmatch(3) if available). | |
794 | ||
795 | b. There are new `next-screen-line' and `previous-screen-line' bindable | |
796 | commands, which move the cursor to the same column in the next, or previous, | |
797 | physical line, respectively. | |
798 | ||
799 | c. There are default key bindings for control-arrow-key key combinations. | |
800 | ||
801 | d. A negative argument (-N) to `quoted-insert' means to insert the next N | |
802 | characters using quoted-insert. | |
803 | ||
804 | e. New public function: rl_check_signals(), which allows applications to | |
805 | respond to signals that readline catches while waiting for input using | |
806 | a custom read function. | |
807 | ||
808 | f. There is new support for conditionally testing the readline version in an | |
809 | inputrc file, with a full set of arithmetic comparison operators available. | |
810 | ||
811 | g. There is a simple variable comparison facility available for use within an | |
812 | inputrc file. Allowable operators are equality and inequality; string | |
813 | variables may be compared to a value; boolean variables must be compared to | |
814 | either `on' or `off'; variable names are separated from the operator by | |
815 | whitespace. |