]> git.ipfire.org Git - thirdparty/bash.git/blame - CHANGES-4.2
commit bash-20110211 snapshot
[thirdparty/bash.git] / CHANGES-4.2
CommitLineData
e192f341
CR
1This document details the changes between this version, bash-4.2-release,
2and the previous version, bash-4.2-rc2.
3
41. Changes to Bash
5
6a. Fixed a bug that caused some variables to be clobbered by a longjmp,
7 resulting in stack corruption.
8
9------------------------------------------------------------------------------
deeba0d2
CR
10This document details the changes between this version, bash-4.2-rc2,
11and the previous version, bash-4.2-rc1.
12
131. Changes to Bash
14
15a. Changes to bash_directory_completion_hook so that it's assigned to the
16 readline rl_directory_rewrite_hook variable, which modifies the directory
17 name passed to opendir without modifying the directory name the user
18 typed.
19
f894a2d3 20b. Fixed bug in select builtin that caused it to not terminate correctly if
deeba0d2
CR
21 the read timed out due to $TMOUT.
22
f894a2d3
CR
23c. Fixed a problem that resulted in non-repeatable sequences of random
24 numbers when RANDOM=0.
25
deeba0d2 26------------------------------------------------------------------------------
54a1fa7c
CR
27This document details the changes between this version, bash-4.2-rc1,
28and the previous version, bash-4.2-beta.
29
301. Changes to Bash
31
32a. Fixed a bug that caused some redirection errors to leak file descriptors.
33
34b. Fixed a bug that caused unary `+' and `-' arithmetic operators to have a
35 higher precedence than unary `!' and `~'.
36
37c. Fixed a bug that caused simple commands in a pipeline to affect the exit
38 status ($?) seen by subsequent pipeline commands.
39
9fc76425
CR
40d. A number of cygwin-specific changes to avoid the use of text-mode files
41 and file access, and to make sure that \r is handled correctly.
42
43e. Fixed a bug that caused the read builtin to not return failure if an
44 attempt is made to assign to a readonly variable.
45
46f. Fixed a bug that caused some builtin usage messages to not be translated.
47
48g. Fixed a bug that caused the getopts builtin to not return failure if an
49 attempt is made to assign to a readonly variable. Now it returns 2.
50
51h. Fixed the cd and pwd builtins to return failure if PWD is readonly and
52 cannot be assigned to.
53
54i. Added code to check the return value of access(2) on Solaris systems,
55 since it returns success for executable tests (e.g., `test -x') when
56 run by root, even if the file permissions don't allow execution.
57
54a1fa7c
CR
582. Changes to Readline
59
9fc76425
CR
60a. Fixed a bug that caused directory names in words to be completed to not
61 be dequoted correctly.
62
54a1fa7c
CR
633. New Features in Bash
64
654. New Features in Readline
66
67------------------------------------------------------------------------------
510e20a2
CR
68This document details the changes between this version, bash-4.2-beta,
69and the previous version, bash-4.2-alpha.
70
711. Changes to Bash
72
73a. Fixed a bug that caused the \W prompt string escape to not add a closing
74 NULL.
75
76b. Fixed a bug that caused partially-quoted words that were not subject to
77 word splitting to retained quoted NULLs.
78
79c. Added considerable efficiency speedups when pattern matching in multibyte
80 locales by skipping multibyte character functions where possible.
81
82d. Added considerable speedups to variable expansion when in multibyte locales.
83
84e. Fixed a bug that caused the expansion of $* when there are no positional
85 parameters to cause the shell to dump core when used in a pattern
86 matching context.
87
88f. Fixed a bug that caused variable expansions preceding regular builtins to
89 not change the shell environment during their execution.
90
912. Changes to Readline
92
93a. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave
94 as if it were a negative argument.
95
96------------------------------------------------------------------------------
18d2df91
CR
97This document details the changes between this version, bash-4.2-alpha,
98and the previous version, bash-4.1-release.
99
1001. Changes to Bash
101
102a. Fixed a bug in the parser when processing alias expansions containing
103 quoted newlines.
104
105b. Fixed a memory leak in associative array expansion.
106
107c. Fixed a bug that caused quoted here-strings to be requoted when printed.
108
109d. Fixed a bug in arithmetic expansion that caused the index in an array
110 expansion to be evaluated twice under certain circumstances.
111
112e. Fixed several bugs with the expansion and display of variables that have
113 been given attributes but not values and are technically unset.
114
115f. Fixed a bug that caused core dumps when using filename completion that
116 expands to a filename containing a globbing character.
117
118g. Fixed a bug that caused assignment statements preceding a special builtin
119 when running in Posix mode to not persist after the builtin completed
120 when the special builtin was executed in a shell function without any
121 local variables.
122
123h. Fixed a bug that caused a command to remain in the hash table even after
124 `hash command' did not find anything if there was already an existing
125 hashed pathname.
126
127i. Fixed several bugs caused by executing unsafe functions from a signal
128 handler in the cases where a signal handler is executed immediately
129 rather than setting a flag for later execution.
130
131j. Fixed a bug that caused some internal flag variables to be set
132 incorrectly if `read -t' timed out.
133
134k. Fixed a Posix compatibility issue by making sure that a backslash escaping
135 a `}' within a double-quoted ${...} parameter expansion is removed as part
136 of the parameter expansion.
137
138l. Fixed a bug that caused execution of a trap to overwrite PIPESTATUS.
139
140m. Fixed a bug that caused here documents to not be displayed correctly
141 when attached to commands inside compound commands.
142
143n. Fixed a bug that caused the printf builtin to use the wrong precision
144 when using the `*' modifier.
145
146o. Fixed a bug that caused an arriving SIGCHLD to interrupt output functions
147 like those invoked by echo or printf.
148
149p. Changed to use a more robust mechanism than eaccess(2) when test is
150 checking filenames for execution permission.
151
152q. Fixed a bug that caused spurious semicolons to be added into the command
153 history in certain cases.
154
155r. Fixed a bug that caused the shell to free non-allocated memory when
156 unsetting element 0 of an associative array after it was assigned
157 implicitly.
158
159s. Fixed a bug that could cause the shell to dump core if using the `v'
160 vi editing command on a multi-line command.
161
162t. Fixed a bug that left FIFOs opened by process substitutions open long
163 enough to potentially cause file descriptor exhaustion when running a
164 shell function or shell builtin.
165
166u. Fixed a bug that caused the history expansion functions to not recognize
167 process substitution or extended glob patterns as single words.
168
169v. Fixed a bug that caused restricted shells to set a restricted command's
170 exit status incorrectly.
171
172w. Fixed a bug that caused bash to ignore the wrong set of filenames when
173 completing a command using the `complete-filename' readline command.
174
175x. Fixed a bug that caused a -PID argument following a -s sig or -n sig to
176 not be interpreted as a signal specification.
177
178y. Changed posix-mode behavior of a parse error in a `.' script or `eval'
179 command to exit the shell under Posix-specified conditions. Previous
180 versions printed a warning.
181
182z. Fixed a bug in \W prompt expansion that resulted in incorrect expansion
183 in the event of overlapping strings.
184
185aa. Fixed a bug that caused the := parameter expansion operator to return the
186 wrong value as the result of the expansion.
187
188bb. When in Posix mode, a single quote is not treated specially in a
189 double-quoted ${...} expansion, unless the expansion operator is
190 # or % or the non-Posix `//', `^', and `,'. In particular, it does
191 not define a new quoting context. This is from Posix interpretation 221.
192
193cc. Fixed a bug that inadvertently allowed program names containing slashes
194 to be entered into the command hash table.
195
196dd. Fixed a bug that caused the select builtin to incorrectly compute the
197 display width of the arguments in the presence of multibyte characters.
198
199ee. Fixed a bug that caused bash to not change the xtrace file descriptor if
200 BASH_XTRACEFD was found in the shell environment at startup.
201
202ff. Fixed a memory leak in the pattern removal parameter expansion.
203
204gg. Fixed a bug that caused SIGINT to fail to interrupt a nested loop if the
205 loop was in a pipeline.
206
207hh. Fixed a problem in $(...) parsing that caused the parser to add an extra
208 space to a here-document delimiter if the first word contained a `/'.
209
210ii. Fixed a bug that caused functions defined with the `function' reserved
211 word to require braces around the function body.
212
213jj. Fixed a bug that caused bash to dump core when a variable expansion being
214 used as an array subscript failed.
215
216kk. Fixed a bug that caused bash to dump core if the case-modification
217 expansions were used on a variable with a null value.
218
219ll. Fixed a bug that caused partially-quoted strings to be split incorrectly
220 if a variable with a null value was expanded within double quotes.
221
222mm. The pattern substitution word expansion has been sped up dramatically
223 when running in a locale with multibyte characters.
224
225nn. Fixed a bug that caused history -a to not write the correct lines to
226 the history file if all the new lines in the history list were added
227 since the last time the history file was read or written.
228
229oo. Fixed a bug that caused completion of a word with an unclosed `` command
230 substitution to set the prompt incorrectly.
231
232pp. Fixed a bug that caused extended globbing patterns in $HISTIGNORE or
233 $GLOBIGNORE to be incorrectly scanned.
234
235qq. Fixed a bug caused by closing file descriptors 3-20 on shell startup. The
236 shell now sets them to close-on-exec.
237
238rr. Fixed a bug that caused the exit status of `exec file' to be set incorrectly
239 if `file' was a directory.
240
241ss. Fixed a bug in the `.' builtin to make a non-interactive posix-mode shell
242 exit if the file argument to `.' is not found. Prefixing exec with
243 `command' makes the shell not exit. Posix requires this behavior.
244
245tt. Fixed a bug that caused `sh -c 'command exec; exit 1' to hang.
246
247uu. Fixed a bug in $(...) command substitution parsing that caused the shell
248 to treat backslash-newline incorrectly when parsing a comment.
249
250vv. Fixed bug that caused brace expansion sequence generation to misbehave
251 when supplied integers greater than 2**31 - 1.
252
253ww. Fixed a bug that caused failure to save file descriptors for redirections
254 to corrupt shell file descriptors.
255
256xx. Fixed a bug that caused bash-forward-shellword to not correctly handle
257 quoted strings.
258
2592. Changes to Readline
260
261a. Fixed a bug that caused the unconverted filename to be added to the list of
262 completions when the application specified filename conversion functions.
263
264b. Fixed a bug that caused the wrong filename to be passed to opendir when the
265 application has specified a filename dequoting function.
266
267c. Fixed a bug when repeating a character search in vi mode in the case where
268 there was no search to repeat.
269
270d. When show-all-if-ambiguous is set, the completion routines no longer insert
271 a common match prefix that is shorter than the text being completed.
272
273e. The full set of vi editing commands may now be used in callback mode.
274
275f. Fixed a bug that caused readline to not update its idea of the terminal
276 dimensions while running in `no-echo' mode.
277
278h. Fixed a bug that caused readline to dump core if an application called
279 rl_prep_terminal without setting rl_instream.
280
281i. Fixed a bug that caused meta-prefixed characters bound to incremental
282 search forward or backward to not be recognized if they were typed
283 subsequently.
284
285j. The incremental search code treats key sequences that map to the same
286 functions as (default) ^G, ^W, and ^Y as equivalent to those characters.
287
288k. Fixed a bug in menu-complete that caused it to misbehave with large
289 negative argument.
290
291l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked
292 at the end of the line.
293
2943. New Features in Bash
295
296a. `exec -a foo' now sets $0 to `foo' in an executable shell script without a
297 leading #!.
298
299b. Subshells begun to execute command substitutions or run shell functions or
300 builtins in subshells do not reset trap strings until a new trap is
301 specified. This allows $(trap) to display the caller's traps and the
302 trap strings to persist until a new trap is set.
303
304c. `trap -p' will now show signals ignored at shell startup, though their
305 disposition still cannot be modified.
306
307d. $'...', echo, and printf understand \uXXXX and \UXXXXXXXX escape sequences.
308
309e. declare/typeset has a new `-g' option, which creates variables in the
310 global scope even when run in a shell function.
311
312f. test/[/[[ have a new -v variable unary operator, which returns success if
313 `variable' has been set.
314
315g. Posix parsing changes to allow `! time command' and multiple consecutive
316 instances of `!' (which toggle) and `time' (which have no cumulative
317 effect).
318
319h. Posix change to allow `time' as a command by itself to print the elapsed
320 user, system, and real times for the shell and its children.
321
322j. $((...)) is always parsed as an arithmetic expansion first, instead of as
323 a potential nested command substitution, as Posix requires.
324
325k. A new FUNCNEST variable to allow the user to control the maximum shell
326 function nesting (recursive execution) level.
327
328l. The mapfile builtin now supplies a third argument to the callback command:
329 the line about to be assigned to the supplied array index.
330
331m. The printf builtin has a new %(fmt)T specifier, which allows time values
332 to use strftime-like formatting.
333
334n. There is a new `compat41' shell option.
335
336o. The cd builtin has a new Posix-mandated `-e' option.
337
338p. Negative subscripts to indexed arrays, previously errors, now are treated
339 as offsets from the maximum assigned index + 1.
340
341q. Negative length specifications in the ${var:offset:length} expansion,
342 previously errors, are now treated as offsets from the end of the variable.
343
344r. Parsing change to allow `time -p --'.
345
346s. Posix-mode parsing change to not recognize `time' as a keyword if the
347 following token begins with a `-'. This means no more Posix-mode
348 `time -p'. Posix interpretation 267.
349
350t. There is a new `lastpipe' shell option that runs the last command of a
351 pipeline in the current shell context. The lastpipe option has no
352 effect if job control is enabled.
353
354u. History expansion no longer expands the `$!' variable expansion.
355
356v. Posix mode shells no longer exit if a variable assignment error occurs
357 with an assignment preceding a command that is not a special builtin.
358
adc6cff5 359w. Non-interactive mode shells exit if -u is enabled and an attempt is made
18d2df91
CR
360 to use an unset variable with the % or # expansions, the `//', `^', or
361 `,' expansions, or the parameter length expansion.
362
363x. Posix-mode shells use the argument passed to `.' as-is if a $PATH search
364 fails, effectively searching the current directory. Posix-2008 change.
365
3664. New Features in Readline
367
368a. The history library does not try to write the history filename in the
369 current directory if $HOME is unset. This closes a potential security
370 problem if the application does not specify a history filename.
371
372b. New bindable variable `completion-display-width' to set the number of
373 columns used when displaying completions.
374
375c. New bindable variable `completion-case-map' to cause case-insensitive
376 completion to treat `-' and `_' as identical.
377
378d. There are new bindable vi-mode command names to avoid readline's case-
379 insensitive matching not allowing them to be bound separately.
380
381e. New bindable variable `menu-complete-display-prefix' causes the menu
382 completion code to display the common prefix of the possible completions
383 before cycling through the list, instead of after.