@@ -295,7 +295,8 @@ version and versions 2.0 and above.
295
295
296
296
37. Bash-4.0 now allows SIGCHLD to interrupt the wait builtin, as Posix
297
297
specifies, so the SIGCHLD trap is no longer always invoked once per
298
- exiting child if you are using `wait' to wait for all children.
298
+ exiting child if you are using `wait' to wait for all children. As
299
+ of bash-4.2, this is the status quo only when in posix mode.
299
300
300
301
38. Since bash-4.0 now follows Posix rules for finding the closing delimiter
301
302
of a $() command substitution, it will not behave as previous versions
@@ -330,35 +331,58 @@ version and versions 2.0 and above.
330
331
331
332
44. Bash-4.1 uses the current locale when comparing strings using the < and
332
333
> operators to the `[[' command. This can be reverted to the previous
333
- behavior by setting one of the `compatNN' shopt options.
334
+ behavior (ASCII collating and strcmp(3)) by setting one of the
335
+ `compatNN' shopt options, where NN is less than 41.
336
+
337
+ 45. Command substitutions now remove the caller's trap strings when trap is
338
+ run to set a new trap in the subshell. Previous to bash-4.2, the old
339
+ trap strings persisted even though the actual signal handlers were reset.
340
+
341
+ 46. When in Posix mode, a single quote is not treated specially in a
342
+ double-quoted ${...} expansion, unless the expansion operator is
343
+ # or % or the new `//', `^', or `,' expansions. In particular, it
344
+ does not define a new quoting context. This is from Posix interpretation
345
+ 221.
346
+
347
+ 47. Posix mode shells no longer exit if a variable assignment error occurs
348
+ with an assignment preceding a command that is not a special builtin.
349
+
334
350
335
351
Shell Compatibility Level
336
352
=========================
337
353
338
354
Bash-4.0 introduced the concept of a `shell compatibility level', specified
339
- as a set of options to the shopt builtin (compat31, compat32, compat40 at
340
- this writing). There is only one current compatibility level -- each
341
- option is mutually exclusive. This list does not mention behavior that is
342
- standard for a particular version (e.g., setting compat32 means that quoting
343
- the rhs of the regexp matching operator quotes special regexp characters in
344
- the word, which is default behavior in bash-3.2 and above).
355
+ as a set of options to the shopt builtin (compat31, compat32, compat40, and
356
+ compat41 at this writing). There is only one current compatibility level --
357
+ each option is mutually exclusive. This list does not mention behavior
358
+ that is standard for a particular version (e.g., setting compat32 means that
359
+ quoting the rhs of the regexp matching operator quotes special regexp
360
+ characters in the word, which is default behavior in bash-3.2 and above).
345
361
346
362
compat31 set
347
363
- the < and > operators to the [[ command do not consider the current
348
- locale when comparing strings
364
+ locale when comparing strings; they use ASCII ordering
349
365
- quoting the rhs of the regexp matching operator (=~) has no
350
366
special effect
351
367
352
368
compat32 set
353
369
- the < and > operators to the [[ command do not consider the current
354
- locale when comparing strings
370
+ locale when comparing strings; they use ASCII ordering
355
371
356
372
compat40 set
357
373
- the < and > operators to the [[ command do not consider the current
358
- locale when comparing strings
374
+ locale when comparing strings; they use ASCII ordering
359
375
- interrupting a command list such as "a ; b ; c" causes the execution
360
- of the entire list to be aborted
376
+ of the entire list to be aborted (in versions before bash-4.0,
377
+ interrupting one command in a list caused the next to be executed)
361
378
379
+ compat41 set
380
+ - interrupting a command list such as "a ; b ; c" causes the execution
381
+ of the entire list to be aborted (in versions before bash-4.0,
382
+ interrupting one command in a list caused the next to be executed)
383
+ - when in posix mode, single quotes in the `word' portion of a
384
+ double-quoted parameter expansion define a new quoting context and
385
+ are treated specially
362
386
-------------------------------------------------------------------------------
363
387
364
388
Copying and distribution of this file, with or without modification,
0 commit comments