Opened 2 years ago

Closed 2 years ago

#5122 closed enhancement (fixed)

bash-5.2

Reported by: Bruce Dubbs Owned by: lfs-book
Priority: normal Milestone: 11.3
Component: Book Version: git
Severity: normal Keywords:
Cc:

Description

New minor version.

Changes between bash-5.2-release, and bash-5.2-rc4.

  1. Changes to Readline
  1. When replacing a history entry, make sure the existing entry has a non-NULL timestamp before copying it; it may have been added by the application, not the history library.

Changes between bash-5.2-rc4, and bash-5.2-rc3.

  1. Changes to Bash
  1. Changed how the compatibility mode enabling of extglob works in conjunction with parsing conditional commands.
  1. Fixed a problem with aliases containing command substitutions.

Changes between bash-5.2-rc3 and bash-5.2-rc2.

  1. Changes to Bash
  1. Added a compatibility mode feature that causes the parser to parse command substitutions as if extglob were enabled. If it is enabled before execution, parse at execution will succeed. If not, the subsequent execution parse will fail.
  1. Fixed an issue with handling a `return' executed in a trap a
  1. New Features in Readline
  1. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG) each time it is called, and modifies the appropriate locale-specific display and key binding variables when the locale changes.

Changes between bash-5.2-rc2 and bash-5.2-rc1.

  1. Changes to Bash
  1. Fixed a bug that could disable history saving after a compound array assignment in an interactive shell.
  1. Fixed a bug that could cause incorrect error messages when running a DEBUG trap during a conditional or arithmetic command.
  1. Fixed a bug that caused test to print an error message when given ! ! arg as arguments.
  1. Fixed a bug that resulted in incorrect error messages when completing a backquoted command substitution.
  1. Changed command substitution parsing to reproduce the original text more closely when reconsituting the command string from the parsed command.
  1. Fixed a bug that could cause an EXIT trap to use the wrong variable context when the errexit option is set.
  1. Fixed a bug that could cause the parser to incorrectly delimit a token when an alias expansion ended with a multibyte character.
  1. New Features in Bash
  1. Since there is no declare -' equivalent of local -', make sure to use local -' in the output of local -p'.
  1. Null anchored matches in pattern substitution now process `&' in the replacement string, like sed.

Changes between bash-5.2-rc1 and bash-5.2-beta.

  1. Changes to Bash
  1. Changes to `wait -p' and how it sets the variable name in the presence of valid and invalid PID arguments.
  1. Fixed a bug that caused compgen to dump core if the completion engine was not initialized.
  1. Fixed a memory leak in the variable name programmable completion code.
  1. Here-documents and here-strings use tempfiles if the shell compatibility level is 50 or lower.
  1. Non-interactive shells exit on a syntax error encountered while parsing a command substitution.
  1. Fixed a bug with inherited parser state while parsing a command substitution.
  1. Fixed a bug that caused the shell not to check for terminating signals after executing the command_string supplied with `-c' and before executing the exit trap.
  1. Changes to avoid a make race condition while generating builtins.c.
  1. Make it explicit that BASH_REMATCH is always a global variable, and that local copies are (currently) ignored.
  1. Fixed a bug that caused an ambiguous redirection (>&word) to be printed incorrectly (>&word) if no file descriptor was supplied.
  1. Changes to Readline
  1. Fixed a bug that caused rl_eof_found to be set prematurely while reading a multi-character key sequence in callback mode.
  1. New Features in Bash
  1. In posix mode, the printf' builtin checks for the L' length modifier and uses long double for floating point conversion specifiers if it's present, double otherwise.
  1. The globbing' completion code now takes the globstar' option into account.
  1. `suspend -f' now forces the shell to suspend even if job control is not currently enabled.

Changes between bash-5.2-beta and bash-5.2-alpha.

  1. Changes to Bash
  1. Fixed a problem with command-oriented history and multi-line commands that caused embedded blank lines to be run together.
  1. Changed the way `&' is quoted when performing pattern substitution and `patsub_replacement' is enabled.
  1. Fixed some integer overflows when expanding strings or reading the output of command substitution larger than 2GB.
  1. wait -p' without the -n' option now does something useful if there are no jobs.
  1. Fixed an issue with read timeouts in posix mode.
  1. Changed here-document processing to process $'...' and $"..." only when they appear in the WORD portion of ${PARAM OP WORD} in the here-document body and the body is being expanded.
  1. Changed alias expansion in command substitution to be posix-conformant (performed while initially parsing the command substitution) when in posix mode.
  1. Bash optimizes away more forks in subshells.
  1. Here-document construction now performs quote removal on the here-document delimiter only if it's marked as quoted, which prevents quote characters in command substitutions from being removed.
  1. Prompt string expansion now gives invisible characters in the expansion of the \w, \W, and \s escape sequences a visible representation to avoid problems with redisplay.
  1. Fixed a problem with SIGINT during the execution of a command bound with `bind -x' affecting the saved terminal settings.
  1. Fixed an inconsistency with how $@ expands in a construct like ${@:+set} or ${array[@]:+set} in the presence of null positional parameters or array elements.
  1. Changes to Readline
  1. Prevent some display problems when running a command as the result of a trap or one bound using `bind -x' and the command generates output.
  1. Fixed an issue with multi-line prompt strings that have one or more invisible characters at the end of a physical line.
  1. Fixed an issue that caused a history line's undo list to be cleared when it should not have been.
  1. New Features in Bash
  1. There is a new bindable readline command name: `vi-edit-and-execute-command'.
  1. New Features in Readline
  1. Two new bindable string variables: active-region-start-color and active-region-end-color. The first sets the color used to display the active region; the second turns it off. If set, these are used in place of terminal standout mode.
  1. New readline state (RL_STATE_EOF) and application-visible variable (rl_eof_found) to allow applications to detect when readline reads EOF before calling the deprep-terminal hook.
  1. There is a new configuration option: --with-shared-termcap-library, which forces linking the shared readline library with the shared termcap (or curses/ncurses/termlib) library so applications don't have to do it.

Changes between bash-5.2-alpha and bash-5.1-release.

  1. Changes to Bash
  1. Fixed a bug that assigned a value to the variable name supplied as an argument to `wait -p' when there were no jobs.
  1. Fixed a bug that resulted in performing incorrect word expansion on the key/value pairs in a compound array assignment.
  1. Fixed a bug that could put the child forked to run a command substitution into the wrong process group.
  1. Fixed a problem that could cause the lastpipe option to work incorrectly if file descriptor 0 was closed.
  1. Bash tries to suppress traps if a forked child receives a trapped signal before it has a chance to reset its signal handlers.
  1. Fixed several memory leaks in compound array assignments.
  1. Fixed a problem with performing an assignment with `+=' to an array element that was the value of a nameref.
  1. Fixed a bug that could cause a nameref containing an array reference using @' or *' not to expand to multiple words.
  1. Fixed a bug where extended glob functions could match .' or ..' when it wasn't explicitly specified, even if dotglob was set.
  1. Fixed a bug that caused non-interactive posix-mode shells not to exit on a variable assignment error while assigning into the temporary environment.
  1. Fixed a bug that caused parsing errors if an alias contained a compound array assignment.
  1. Fixed a couple of instances where bash checked syntax too aggressively when trying to determine how to add a partial command to command-oriented history.
  1. Fixed a parser problem that caused it not to allow reserved words to follow the ((' and [[' commands.
  1. Fixed a bad offset calculation when using negative offsets to `history -d'.
  1. Fixed an off-by-one error that caused a read past the end of a buffer when reading a multibyte character from the output of a command substitution.
  1. Fixed a problem with a failed `exec' command not setting $? to the right value for an exit trap.
  1. Fixed a problem that caused bash not to unlink FIFOs created as part of expanding redirections for an external command.
  1. Fixed a bug that could cause aliases not to be expanded in case statements.
  1. Fixed a bug that could cause word completion to attempt programmable completion for the target of a redirection, instead of filename completion.
  1. Fixed a bug that could result in errors after rebinding a key sequence with `bind -x' multiple times.
  1. Fixed a problem that could result in not quoting the result when performing command name completion with a glob pattern in the command name.
  1. `mapfile' now uses fully-buffered reads in more cases, which should improve bulk read performance.
  1. Fixed a bug that caused `wait -n' to not reset its internal state when interrupted by a signal, resulting in subsequent calls failing.
  1. Fixed a bug with parsing numeric arguments to readline key sequences installed with `bind -x'.
  1. Bash suppresses forking in several additional cases, including most uses of $(<file).
  1. If there are multiple `!' tokens in a [[ command, toggle the invert state instead of setting it unconditionally.

aa. Fixed a bug where running `fc' on an empty history list would cause the

shell to crash.

bb. Word completion now checks whether or not a quote character closes a

quoted string begun on a previous line, so readline doesn't interpret the quote as starting a new quoted string.

cc. Fixed a typo that translated \UNNNNNNNN characters that were not valid in

the current locale encoding as \uNNNNNNNN.

dd. Fixed an issue that could cause bash to print timing statistics for the

wrong command when `set -e' causes a command to fail.

ee. Bash now runs the exit trap in function context if a failed command in

the function causes the shell to exit.

ff. Some fixes to how subshells modify $SHLVL.

gg. Fixed a bug that caused `mapfile -t' not to remove the delimiter when the

delimiter is > 128 in the current encoding.

hh. Fixed a problem that could cause the shell to attempt to free unallocated

memory if an expansion error occurred.

  1. Fixed a bug in the bash malloc implementation of malloc_usable_size. Bash

did not use it, but it could cause problems with library functions that did.

jj. If the `exec' builtin fails, and the shell does not exit, it restores

trapped signals to their trapped state.

kk. Fixed a bug that could cause variable assignment arguments to `declare' to

expand variables using attributes that the call to declare was turning off.

ll. Fixed a bug with LINENO and arithmetic for commands.

mm. Fixed a posix-mode bug that caused tildes not to be expanded after an

unquoted colon on the right side of an assignment statement.

nn. Fixed a problem with `caller' and line numbers when executing an ERR trap.

oo. Fixed a problem that could make the value returned by ${a:=b} not be the

final value assigned to a (e.g., if `a' has an attribute that modifies the value on assignment).

pp. Fixed a problem with saving multi-line here-documents to the history list

where the here-document delimiter does not appear on the first line.

qq. Fixed a bug with using += to assign to dynamic variables like RANDOM.

rr. Fixed a bug that caused `set -n' to modify $? if set after execution had

started.

ss. Builtins like printf/read/wait now behave more consistently when assigning

arbitrary keys to associative arrays (like `]'. when appropriately quoted).

tt. Fixed a problem with here-document collection printing the wrong prompt

when parsing a compound list in an interactive shell.

uu. Fixed a problem with quoting shell expansion characters (like `$') when

they appear in a tab-completed word along with characters that do need quoting (e.g.. $HOME/VirtualBox VMs).

  1. Changes to Readline
  1. Fixed a problem with cleaning up active marks when using callback mode.
  1. Fixed a problem with arithmetic comparison operators checking the version.
  1. Fixed a problem that could cause readline not to build on systems without POSIX signal functions.
  1. Fixed a bug that could cause readline to crash if the application removed the callback line handler before readline read all typeahead.
  1. Added additional checks for read errors in the middle of readline commands.
  1. Fixed a redisplay problem that occurred when switching from the digit- argument prompt `(arg: N)' back to the regular prompt and the regular prompt contained invisible characters.
  1. Fixed a problem with restoring the prompt when aborting an incremental search.
  1. Fix a problem with characters > 128 not being displayed correctly in certain single-byte encodings.
  1. Fixed a problem with unix-filename-rubout that caused it to delete too much when applied to a pathname consisting only of one or more slashes.
  1. Fixed a display problem that caused the prompt to be wrapped incorrectly if the screen changed dimensions during a call to readline() and the prompt became longer than the screen width.
  1. Fixed a problem that caused the \r output by turning off bracketed paste to overwrite the line if terminal echo was disabled.
  1. Fixed a bug that could cause colored-completion-prefix to not display if completion-prefix-display-length was set.
  1. Fixed a problem with line wrapping prompts when a group of invisible characters runs to the right edge of the screen and the prompt extends longer then the screen width.
  1. Fixed a couple problems that could cause rl_end to be set incorrectly by transpose-words.
  1. New Features in Bash
  1. The bash malloc returns memory that is aligned on 16-byte boundaries.
  1. There is a new internal timer framework used for read builtin timeouts.
  1. Rewrote the command substitution parsing code to call the parser recursively and rebuild the command string from the parsed command. This allows better syntax checking and catches errors much earlier. Along with this, if command substitution parsing completes with here-documents remaining to be read, the shell prints a warning message and reads the here-document bodies from the current input stream.
  1. The `ulimit' builtin now treats an operand remaining after all of the options and arguments are parsed as an argument to the last command specified by an option. This is for POSIX compatibility.
  1. Here-document parsing now handles $'...' and $"..." quoting when reading the here-document body.
  1. The shell-expand-line' and history-and-alias-expand-line' bindable readline commands now understand $'...' and $"..." quoting.
  1. There is a new `spell-correct-word' bindable readline command to perform spelling correction on the current word.
  1. The `unset' builtin now attempts to treat arguments as array subscripts without parsing or expanding the subscript, even when `assoc_expand_once' is not set.
  1. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
  1. Associative array assignment and certain instances of referencing (e.g., test -v') now allow @' and `*' to be used as keys.
  1. Bash attempts to expand indexed and associative array subscripts only once when executing shell constructs and word expansions.
  1. The unset' builtin allows a subscript of @' or `*' to unset a key with that value for associative arrays instead of unsetting the entire array (which you can still do with `unset arrayname'). For indexed arrays, it removes all elements of the array without unsetting it (like `A=()').
  1. Additional builtins (printf/test/read/wait) do a better job of not parsing array subscripts if array_expand_once is set.
  1. New READLINE_ARGUMENT variable set to numeric argument for readline commands defined using `bind -x'.
  1. The new `varredir_close' shell option causes bash to automatically close file descriptors opened with {var}<fn and other styles of varassign redirection unless they're arguments to the `exec' builtin.
  1. The `$0' special parameter is now set to the name of the script when running any (non-interactive) startup files such as $BASH_ENV.
  1. The `enable' builtin tries to load a loadable builtin using the default search path if `enable name' (without any options) attempts to enable a non-existent builtin.
  1. The `printf' builtin has a new format specifier: %Q. This acts like %q but applies any specified precision to the original unquoted argument, then quotes and outputs the result.
  1. The new `noexpand_translations' option controls whether or not the translated output of $"..." is single-quoted.
  1. There is a new parameter transformation operator: @k. This is like @K, but expands the result to separate words after word splitting.
  1. There is an alternate array implementation, selectable at `configure' time, that optimizes access speed over memory use (use the new configure

--enable-alt-array-implementation option).

  1. If an [N]<&WORD- or [N]>&WORD- redirection has WORD expand to the empty string, treat the redirection as [N]<&- or [N]>&- and close file descriptor N (default 0).
  1. Invalid parameter transformation operators are now invalid word expansions, and so cause fatal errors in non-interactive shells.
  1. New shell option: patsub_replacement. When enabled, a `&' in the replacement string of the pattern substitution expansion is replaced by the portion of the string that matched the pattern. Backslash will escape the `&' and insert a literal `&'.
  1. `command -p' no longer looks in the hash table for the specified command.
  1. The new --enable-translatable-strings' option to configure' allows $"..." support to be compiled in or out.

aa. The new `globskipdots' shell option forces pathname expansion never to

return .' or ..' unless explicitly matched. It is enabled by default.

bb. Array references using @' and *' that are the value of nameref variables

(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if set -u is enabled and the array (v) is unset.

  1. New Features in Readline
  1. There is now an HS_HISTORY_VERSION containing the version number of the history library for applications to use.
  1. History expansion better understands multiple history expansions that may contain strings that would ordinarily inhibit history expansion (e.g., `abc!$!$').
  1. There is a new framework for readline timeouts, including new public functions to set timeouts and query how much time is remaining before a timeout hits, and a hook function that can trigger when readline times out. There is a new state value to indicate a timeout.
  1. Automatically bind termcap key sequences for page-up and page-down to history-search-backward and history-search-forward, respectively.
  1. There is a new `fetch-history' bindable command that retrieves the history entry corresponding to its numeric argument. Negative arguments count back from the end of the history.
  1. `vi-undo' is now a bindable command.
  1. There is a new option: `enable-active-region'. This separates control of the active region and bracketed-paste. It has the same default value as bracketed-paste, and enabling bracketed paste enables the active region. Users can now turn off the active region while leaving bracketed paste enabled.
  1. rl_completer_word_break_characters is now `const char *' like rl_basic_word_break_characters.
  1. Readline looks in $LS_COLORS for a custom filename extension (*.readline-colored-completion-prefix) and uses that as the default color for the common prefix displayed when `colored-completion-prefix' is set.

Change History (1)

comment:1 by Bruce Dubbs, 2 years ago

Resolution: fixed
Status: newclosed

Fixed at commit 79789000a80b5d149e46c2cc8de726aa9f3d4cc9

Update to iana-etc-20220922.
Update to tzdata-2022d.
Update to readline-8.2.
Update to linux-5.19.11.
Update to libffi-3.4.3.
Update to libcap-2.66.
Update to dbus-1.14.2.
Update to bc-6.0.3.
Update to bash-5.2.
Note: See TracTickets for help on using tickets.