Skip to content

Commit 495aee4

Browse files
author
Chet Ramey
committedNov 23, 2011
Bash-4.2 distribution sources and documentation
1 parent 30d188c commit 495aee4

File tree

341 files changed

+92139
-20014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+92139
-20014
lines changed
 

‎CHANGES

+385
Large diffs are not rendered by default.

‎COMPAT

+36-12
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ version and versions 2.0 and above.
295295

296296
37. Bash-4.0 now allows SIGCHLD to interrupt the wait builtin, as Posix
297297
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.
299300

300301
38. Since bash-4.0 now follows Posix rules for finding the closing delimiter
301302
of a $() command substitution, it will not behave as previous versions
@@ -330,35 +331,58 @@ version and versions 2.0 and above.
330331

331332
44. Bash-4.1 uses the current locale when comparing strings using the < and
332333
> 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+
334350

335351
Shell Compatibility Level
336352
=========================
337353

338354
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).
345361

346362
compat31 set
347363
- 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
349365
- quoting the rhs of the regexp matching operator (=~) has no
350366
special effect
351367

352368
compat32 set
353369
- 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
355371

356372
compat40 set
357373
- 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
359375
- 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)
361378

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
362386
-------------------------------------------------------------------------------
363387

364388
Copying and distribution of this file, with or without modification,

0 commit comments

Comments
 (0)
Please sign in to comment.