mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-29 16:39:53 +02:00
commit bash-20160708 snapshot
This commit is contained in:
@@ -1,3 +1,129 @@
|
||||
This document details the changes between this version, bash-4.4-beta2, and
|
||||
the previous version, bash-4.4-rc1.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Fixed a memory leak when processing ${!var[@]}.
|
||||
|
||||
b. Fixed a bug that caused subshells to free trap strings associated with
|
||||
inherited signals.
|
||||
|
||||
c. Inheriting BASHOPTS from the environment now works to force actions
|
||||
associated with enabling an option, instead of just marking the option
|
||||
as enabled.
|
||||
|
||||
d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
|
||||
restricted mode.
|
||||
|
||||
e. Fixed a bug caused by an accidental omission of part of the original patch
|
||||
for EXECIGNORE.
|
||||
|
||||
e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
|
||||
|
||||
f. Fixed a bug that caused parsing errors in command substitutions with
|
||||
consecutive case statements separated by newlines.
|
||||
|
||||
g. Updated logic used to decide whether bash is running inside an emacs
|
||||
terminal emulator to work with future emacs versions.
|
||||
|
||||
h. Fixed two extended pattern matching bugs caused by premature short-
|
||||
circuiting.
|
||||
|
||||
i. Fixed a memory leak in the code that removes duplicate history entries.
|
||||
|
||||
j. There are a number of bug fixes to coproc, mapfile, declare, unset,
|
||||
and assignment statements that prevent nameref variables from creating
|
||||
and unsetting variables with invalid names.
|
||||
|
||||
k. Fixed a bug that caused variables to be inadvertently marked as both an
|
||||
associative and an indexed array.
|
||||
|
||||
l. Fixed a bug that caused `bash -c' to not run a trap specified in the
|
||||
command string.
|
||||
|
||||
j. There are a number of bug fixes to coproc, mapfile, declare, and assignment
|
||||
statements that prevent nameref variables from overwriting or modifying
|
||||
attributes of readonly variables.
|
||||
|
||||
k. Fixed a bug that caused command substitution to attempt to set the
|
||||
terminal's process group incorrectly.
|
||||
|
||||
l. Fixed a bug that could cause prompt string expansion to display error
|
||||
messages when the `nounset' shell option is set.
|
||||
|
||||
m. Fixed a bug that caused "$@" to not expand to an empty string under the
|
||||
circumstances when Posix says it should ("${@-${@-$@}}").
|
||||
|
||||
n. Fixed several bugs caused by referencing nameref variables whose values
|
||||
are names of unset variables (or names that are valid for referencing
|
||||
but not assignment), including creating variables in the temporary
|
||||
environment.
|
||||
|
||||
o. Function tracing and error tracing are disabled if --debugger is supplied
|
||||
at startup but the shell can't find the debugger start file.
|
||||
|
||||
p. Fixed a bug when IFS is used as the control variable in a for statement.
|
||||
|
||||
q. Fixed a bug with SIGINT received by a command substitution in an interactive
|
||||
shell.
|
||||
|
||||
r. The checks for nameref variable self-references are more thorough.
|
||||
|
||||
s. Fixed several bugs with multi-line aliases.
|
||||
|
||||
t. Fixed `test' to handle the four-argument case where $1 == '(' and
|
||||
$4 == ')'.
|
||||
|
||||
u. Fixed a bug in the expansion of $* in the cases where word splitting is
|
||||
not performed.
|
||||
|
||||
v. Fixed a bug in execution of case statements where IFS includes the
|
||||
pattern matching characters.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
a. When refreshing the line as the result of a key sequence, Readline attempts
|
||||
to redraw only the last line of a multiline prompt.
|
||||
|
||||
b. Fixed an issue that caused completion of git commands to display
|
||||
incorrectly when using colored-completion-prefix.
|
||||
|
||||
c. Fixed several redisplay bugs having to do with multibyte characters and
|
||||
invisible characters in prompt strings.
|
||||
|
||||
3. New Features in Bash
|
||||
|
||||
a. Value conversions (arithmetic expansions, case modification, etc.) now
|
||||
happen when assigning elements of an array using compound assignment.
|
||||
|
||||
b. There is a new option settable in config-top.h that makes multiple
|
||||
directory arguments to `cd' a fatal error.
|
||||
|
||||
c. Bash now uses mktemp() when creating internal temporary files; it produces
|
||||
a warning at build time on many Linux systems.
|
||||
|
||||
4. New Features in Readline
|
||||
|
||||
a. The default binding for ^W in vi mode now uses word boundaries specified
|
||||
by Posix (vi-unix-word-rubout is bindable command name).
|
||||
|
||||
b. rl_clear_visible_line: new application-callable function; clears all
|
||||
screen lines occupied by the current visible readline line.
|
||||
|
||||
c. rl_tty_set_echoing: application-callable function that controls whether
|
||||
or not readline thinks it is echoing terminal output.
|
||||
|
||||
d. Handle >| and strings of digits preceding and following redirection
|
||||
specifications as single tokens when tokenizing the line for history
|
||||
expansion.
|
||||
|
||||
e. Fixed a bug with displaying completions when the prefix display length
|
||||
is greater than the length of the completions to be displayed.
|
||||
|
||||
f. The :p history modifier now applies to the entire line, so any expansion
|
||||
specifying :p causes the line to be printed instead of expanded.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
This document details the changes between this version, bash-4.4-rc1, and
|
||||
the previous version, bash-4.4-beta.
|
||||
|
||||
|
||||
+15
-3
@@ -11163,9 +11163,10 @@ builtins/declare.def
|
||||
|
||||
subst.c
|
||||
- make_internal_declare: handle += append op
|
||||
- shell_expand_word_list: when transforming assignment statement arguments
|
||||
to `declare', make sure to handle += append op to avoid passing invalid
|
||||
identifiers to declare. Report by Grisha Levit <grishalevit@gmail.com>
|
||||
- shell_expand_word_list: when transforming assignment statement
|
||||
arguments to `declare', make sure to handle += append op to avoid
|
||||
passing invalid identifiers to declare. Report by Grisha Levit
|
||||
<grishalevit@gmail.com>
|
||||
|
||||
6/1
|
||||
---
|
||||
@@ -11330,3 +11331,14 @@ subst.c
|
||||
subst.[ch],arrayfunc.c
|
||||
- string_list_dollar_at: now takes a new third argument, currently
|
||||
reserved for future use; changed callers and declaration
|
||||
|
||||
7/7
|
||||
---
|
||||
[bash-4.4-beta2 frozen]
|
||||
|
||||
7/9
|
||||
---
|
||||
bashline.c
|
||||
- check_redir: make sure that index is > 0 before checking previous
|
||||
char; fixes out of bounds read reported by Hanno Böck
|
||||
<hanno@hboeck.de>
|
||||
|
||||
@@ -120,22 +120,33 @@ ii. inherit_errexit: a new `shopt' option that, when set, causes command
|
||||
substitutions to inherit the -e option. By default, those subshells disable
|
||||
-e. It's enabled as part of turning on posix mode.
|
||||
|
||||
jj. New prompt string: PS0. Expanded and displayed by interactive shells after
|
||||
jj. New prompt string: PS0. Expanded and displayed by interactive shells after
|
||||
reading a complete command but before executing it.
|
||||
|
||||
kk. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to SIG_DFL
|
||||
when the shell is started, so they are set to SIG_DFL in child processes.
|
||||
kk. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to
|
||||
SIG_DFL when the shell is started, so they are set to SIG_DFL in child
|
||||
processes.
|
||||
|
||||
ll. Posix-mode shells now allow double quotes to quote the history expansion
|
||||
character.
|
||||
|
||||
mm. OLDPWD can be inherited from the environment if it names a directory.
|
||||
|
||||
nn. Shells running as root no longer inherit PS4 from the environment, closing a
|
||||
security hole involving PS4 expansion performing command substitution.
|
||||
nn. Shells running as root no longer inherit PS4 from the environment, closing
|
||||
a security hole involving PS4 expansion performing command substitution.
|
||||
|
||||
oo. If executing an implicit `cd' when the `autocd' option is set, bash will now
|
||||
invoke a function named `cd' if one exists before executing the `cd' builtin.
|
||||
oo. If executing an implicit `cd' when the `autocd' option is set, bash will
|
||||
now invoke a function named `cd' if one exists before executing the `cd'
|
||||
builtin.
|
||||
|
||||
pp. Value conversions (arithmetic expansions, case modification, etc.) now
|
||||
happen when assigning elements of an array using compound assignment.
|
||||
|
||||
qq. There is a new option settable in config-top.h that makes multiple
|
||||
directory arguments to `cd' a fatal error.
|
||||
|
||||
rr. Bash now uses mktemp() when creating internal temporary files; it produces
|
||||
a warning at build time on many Linux systems.
|
||||
|
||||
2. New Features in Readline
|
||||
|
||||
@@ -182,6 +193,25 @@ k. If readline reads a history file that begins with `#' (or the value of
|
||||
l. Readline now throws an error if it parses a key binding without a terminating
|
||||
`:' or whitespace.
|
||||
|
||||
m. The default binding for ^W in vi mode now uses word boundaries specified
|
||||
by Posix (vi-unix-word-rubout is bindable command name).
|
||||
|
||||
n. rl_clear_visible_line: new application-callable function; clears all
|
||||
screen lines occupied by the current visible readline line.
|
||||
|
||||
o. rl_tty_set_echoing: application-callable function that controls whether
|
||||
or not readline thinks it is echoing terminal output.
|
||||
|
||||
p. Handle >| and strings of digits preceding and following redirection
|
||||
specifications as single tokens when tokenizing the line for history
|
||||
expansion.
|
||||
|
||||
q. Fixed a bug with displaying completions when the prefix display length
|
||||
is greater than the length of the completions to be displayed.
|
||||
|
||||
r. The :p history modifier now applies to the entire line, so any expansion
|
||||
specifying :p causes the line to be printed instead of expanded.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
This is a terse description of the new features added to bash-4.3 since
|
||||
the release of bash-4.2. As always, the manual page (doc/bash.1) is
|
||||
|
||||
+1
-1
@@ -1279,7 +1279,7 @@ check_redir (ti)
|
||||
/* Handle the two character tokens `>&', `<&', and `>|'.
|
||||
We are not in a command position after one of these. */
|
||||
this_char = rl_line_buffer[ti];
|
||||
prev_char = rl_line_buffer[ti - 1];
|
||||
prev_char = (ti > 0) ? rl_line_buffer[ti - 1] : 0;
|
||||
|
||||
if ((this_char == '&' && (prev_char == '<' || prev_char == '>')) ||
|
||||
(this_char == '|' && prev_char == '>'))
|
||||
|
||||
+212
-166
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+217
-169
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+217
-169
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+1545
-931
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+213
-163
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+213
-163
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,6 @@
|
||||
LANG=C
|
||||
LC_ALL=C
|
||||
|
||||
: ${TMPDIR:=/tmp}
|
||||
GTDIR=$TMPDIR/extglob4-$$
|
||||
|
||||
|
||||
@@ -235,7 +235,6 @@ declare -a foo=([0]="7")
|
||||
./nameref12.sub: line 26: declare: `42': not a valid identifier
|
||||
./nameref12.sub: line 27: declare: x: not found
|
||||
declare -nr RO="foo"
|
||||
0 0
|
||||
/
|
||||
./nameref12.sub: line 45: declare: `7*6': not a valid identifier
|
||||
./nameref12.sub: line 45: declare: foo: not found
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ f() { declare -n r; }; r=/ f ; unset r
|
||||
f() { echo $r; }; declare -n r; r=/ f ; unset -n r
|
||||
declare -n r; : ${r:=/} ; unset -n r
|
||||
declare -n r; exec {r}>/dev/null ; unset -n r
|
||||
declare -n r; coproc r { :; }; echo $r ; unset r
|
||||
declare -n r; coproc r { :; }; echo $r ; unset r ; wait
|
||||
declare -r RO=x; r=$RO; declare -n r; x=y; declare -n RO; RO=z; declare -p RO; echo "$RO"
|
||||
s=/; declare -n r=s; declare -n s; echo $r ; unset -n r ; unset -n s
|
||||
declare -n r=s; declare -n s; s=/ ; unset -n r; unset -n s
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ unset -n r; unset r
|
||||
f() { echo $r; }
|
||||
|
||||
declare -n r
|
||||
r=/ /usr/bin/sum < /dev/null
|
||||
r=/ ${THIS_SH} < /dev/null
|
||||
r=/ f
|
||||
|
||||
unset -f f
|
||||
|
||||
Reference in New Issue
Block a user