]> git.ipfire.org Git - thirdparty/bash.git/blame - NEWS-4.4
fixes for HAVE_SELECT/HAVE_PSELECT; change some warning messages for nameref loops...
[thirdparty/bash.git] / NEWS-4.4
CommitLineData
05d9462c
CR
1This is a terse description of the new features added to bash-4.4 since
2the release of bash-4.3. As always, the manual page (doc/bash.1) is
3the place to look for complete descriptions.
4
51. New Features in Bash
6
7a. There is now a settable configuration #define that will cause the shell
8 to exit if the shell is running setuid without the -p option and setuid
9 to the real uid fails.
10
11b. Command and process substitutions now turn off the `-v' option when
12 executing, as other shells seem to do.
13
14c. The default value for the `checkhash' shell option may now be set at
15 compile time with a #define.
16
17d. The `mapfile' builtin now has a -d option to use an arbitrary character
18 as the record delimiter, and a -t option to strip the delimiter as
19 supplied with -d.
20
21e. The maximum number of nested recursive calls to `eval' is now settable in
22 config-top.h; the default is no limit.
23
24f. The `-p' option to declare and similar builtins will display attributes for
25 named variables even when those variables have not been assigned values
26 (which are technically unset).
27
28g. The maximum number of nested recursive calls to `source' is now settable
29 in config-top.h; the default is no limit.
30
31h. All builtin commands recognize the `--help' option and print a usage
32 summary.
33
34i. Bash does not allow function names containing `/' and `=' to be exported.
35
36j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
37
38k. The shell now allows `time ; othercommand' to time null commands.
39
40l. There is a new `--enable-function-import' configuration option to allow
41 importing shell functions from the environment; import is enabled by
42 default.
43
44m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
45 had been executed.
46
47n. GLOBIGNORE, the pattern substitution word expansion, and programmable
48 completion match filtering now honor the value of the `nocasematch' option.
49
50o. There is a new ${parameter@spec} family of operators to transform the
51 value of `parameter'.
52
53p. Bash no longer attempts to perform compound assignment if a variable on the
54 rhs of an assignment statement argument to `declare' has the form of a
55 compound assignment (e.g., w='(word)' ; declare foo=$w); compound
56 assignments are accepted if the variable was already declared as an array,
57 but with a warning.
58
59q. The declare builtin no longer displays array variables using the compound
60 assignment syntax with quotes; that will generate warnings when re-used as
61 input, and isn't necessary.
62
63r. Executing the rhs of && and || will no longer cause the shell to fork if
64 it's not necessary.
65
66s. The `local' builtin takes a new argument: `-', which will cause it to save
67 and the single-letter shell options and restore their previous values at
68 function return.
69
70t. `complete' and `compgen' have a new `-o nosort' option, which forces
71 readline to not sort the completion matches.
72
73u. Bash now allows waiting for the most recent process substitution, since it
74 appears as $!.
75
76v. The `unset' builtin now unsets a scalar variable if it is subscripted with
77 a `0', analogous to the ${var[0]} expansion.
78
79w. `set -i' is no longer valid, as in other shells.
80
81x. BASH_SUBSHELL is now updated for process substitution and group commands
82 in pipelines, and is available with the same value when running any exit
83 trap.
84
85y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
86 not bash is being run in a GNU Emacs shell window.
87
88z. Bash now treats SIGINT received when running a non-builtin command in a
89 loop the way it has traditionally treated running a builtin command:
90 running any trap handler and breaking out of the loop.
91
92aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
93 cause matching filenames to be ignored when searching for commands.
94
95bb. Aliases whose value ends in a shell metacharacter now expand in a way to
96 allow them to be `pasted' to the next token, which can potentially change
97 the meaning of a command (e.g., turning `&' into `&&').
98
2b7361d5
CR
99cc. `make install' now installs the example loadable builtins and a set of
100 bash headers to use when developing new loadable builtins.
101
102dd. `enable -f' now attempts to call functions named BUILTIN_builtin_load when
103 loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows
104 loadable builtins to run initialization and cleanup code.
105
106ee. There is a new BASH_LOADABLES_PATH variable containing a list of directories
107 where the `enable -f' command looks for shared objects containing loadable
108 builtins.
109
900a813b
CR
110ff. The `complete_fullquote' option to `shopt' changes filename completion to
111 quote all shell metacharacters in filenames and directory names.
112
113gg. The `kill' builtin now has a `-L' option, equivalent to `-l', for
114 compatibility with Linux standalone versions of kill.
115
71574d7e
CR
116hh. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
117 environment.
037a8b7f
CR
118
119ii. inherit_errexit: a new `shopt' option that, when set, causes command
120 substitutions to inherit the -e option. By default, those subshells disable
121 -e. It's enabled as part of turning on posix mode.
122
123jj. New prompt string: PS0. Expanded and displayed by interactive shells after
124 reading a complete command but before executing it.
125
126kk. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to SIG_DFL
127 when the shell is started, so they are set to SIG_DFL in child processes.
128
129ll. Posix-mode shells now allow double quotes to quote the history expansion
130 character.
131
132mm. OLDPWD can be inherited from the environment if it names a directory.
133
134nn. Shells running as root no longer inherit PS4 from the environment, closing a
135 security hole involving PS4 expansion performing command substitution.
136
137oo. If executing an implicit `cd' when the `autocd' option is set, bash will now
138 invoke a function named `cd' if one exists before executing the `cd' builtin.
139
ec691667
CR
140pp. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
141 the nounset option is enabled no longer throws an unbound variable error.
142
05d9462c
CR
1432. New Features in Readline
144
145a. The history truncation code now uses the same error recovery mechansim as
146 the history writing code, and restores the old version of the history file
147 on error. The error recovery mechanism handles symlinked history files.
148
149b. There is a new bindable variable, `enable-bracketed-paste', which enables
150 support for a terminal's bracketed paste mode.
151
152c. The editing mode indicators can now be strings and are user-settable
153 (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
154 variables). Mode strings can contain invisible character sequences.
155 Setting mode strings to null strings restores the defaults.
156
157d. Prompt expansion adds the mode string to the last line of a multi-line
158 prompt (one with embedded newlines).
159
160e. There is a new bindable variable, `colored-completion-prefix', which, if
161 set, causes the common prefix of a set of possible completions to be
162 displayed in color.
163
164f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
165 mode yank-pop.
166
167g. The redisplay code underwent several efficiency improvements for multibyte
168 locales.
169
170h. The insert-char function attempts to batch-insert all pending typeahead
171 that maps to self-insert, as long as it is coming from the terminal.
172
173i. rl_callback_sigcleanup: a new application function that can clean up and
174 unset any state set by readline's callback mode. Intended to be used
175 after a signal.
037a8b7f
CR
176
177j. If an incremental search string has its last character removed with DEL, the
178 resulting empty search string no longer matches the previous line.
179
180k. If readline reads a history file that begins with `#' (or the value of
79eedac4
CR
181 the history comment character) and has enabled history timestamps, the
182 history entries are assumed to be delimited by timestamps. This allows
183 multi-line history entries.
037a8b7f 184
79eedac4
CR
185l. Readline now throws an error if it parses a key binding without a
186 terminating `:' or whitespace.
ec691667 187
79eedac4
CR
188m. The default binding for ^W in vi mode now uses word boundaries specified
189 by Posix (vi-unix-word-rubout is bindable command name).
190
191n. rl_clear_visible_line: new application-callable function; clears all
192 screen lines occupied by the current visible readline line.
193
194o. rl_tty_set_echoing: application-callable function that controls whether
195 or not readline thinks it is echoing terminal output.
196
197p. Handle >| and strings of digits preceding and following redirection
198 specifications as single tokens when tokenizing the line for history
199 expansion.
200
201q. Fixed a bug with displaying completions when the prefix display length
202 is greater than the length of the completions to be displayed.
203
204r. The :p history modifier now applies to the entire line, so any expansion
205 specifying :p causes the line to be printed instead of expanded.
206
207s. New application-callable function: rl_pending_signal(): returns the signal
ec691667 208 number of any signal readline has caught but not yet handled.
79eedac4
CR
209
210t. New application-settable variable: rl_persistent_signal_handlers: if set
211 to a non-zero value, readline will enable the readline-6.2 signal handler
212 behavior in callback mode: handlers are installed when
213 rl_callback_handler_install is called and removed removed when a complete
214 line has been read.