| 1 |
This is a terse description of the new features added to bash-5.1 since |
| 2 |
the release of bash-5.0. As always, the manual page (doc/bash.1) is |
| 3 |
the place to look for complete descriptions. |
| 4 |
|
| 5 |
1. New Features in Bash |
| 6 |
|
| 7 |
a. `bind -x' now supports different bindings for different editing modes and |
| 8 |
keymaps. |
| 9 |
|
| 10 |
b. Bash attempts to optimize the number of times it forks when executing |
| 11 |
commands in subshells and from `bash -c'. |
| 12 |
|
| 13 |
c. Here documents and here strings now use pipes for the expanded document if |
| 14 |
it's smaller than the pipe buffer size, reverting to temporary files if it's |
| 15 |
larger. |
| 16 |
|
| 17 |
d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut |
| 18 |
|
| 19 |
e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL |
| 20 |
and those that were SIG_IGN when the shell starts. |
| 21 |
|
| 22 |
f. The shell now expands the history number (e.g., in PS1) even if it is not |
| 23 |
currently saving commands to the history list. |
| 24 |
|
| 25 |
g. `read -e' may now be used with arbitrary file descriptors (`read -u N'). |
| 26 |
|
| 27 |
h. The `select' builtin now runs traps if its internal call to the read builtin |
| 28 |
is interrupted by a signal. |
| 29 |
|
| 30 |
i. SRANDOM: a new variable that expands to a 32-bit random number that is not |
| 31 |
produced by an LCRNG, and uses getrandom/getentropy, falling back to |
| 32 |
/dev/urandom or arc4random if available. There is a fallback generator if |
| 33 |
none of these are available. |
| 34 |
|
| 35 |
j. shell-transpose-words: a new bindable readline command that uses the same |
| 36 |
definition of word as shell-forward-word, etc. |
| 37 |
|
| 38 |
k. The shell now adds default bindings for shell-forward-word, |
| 39 |
shell-backward-word, shell-transpose-words, and shell-kill-word. |
| 40 |
|
| 41 |
l. Bash now allows ARGV0 appearing in the initial shell environment to set $0. |
| 42 |
|
| 43 |
m. If `unset' is executed without option arguments, bash tries to unset a shell |
| 44 |
function if a name argument cannot be a shell variable name because it's not |
| 45 |
an identifier. |
| 46 |
|
| 47 |
n. The `test -N' operator uses nanosecond timestamp granularity if it's |
| 48 |
available. |
| 49 |
|
| 50 |
o. Bash posix mode now treats assignment statements preceding shell function |
| 51 |
definitions the same as in its default mode, since POSIX has changed and |
| 52 |
no longer requires those assignments to persist after the function returns |
| 53 |
(POSIX interp 654). |
| 54 |
|
| 55 |
p. BASH_REMATCH is no longer readonly. |
| 56 |
|
| 57 |
q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n' |
| 58 |
or `wait' without arguments. |
| 59 |
|
| 60 |
r. Sorting the results of pathname expansion now uses byte-by-byte comparisons |
| 61 |
if two strings collate equally to impose a total order; the result of a |
| 62 |
POSIX interpretation. |
| 63 |
|
| 64 |
s. Bash now allows SIGINT trap handlers to execute recursively. |
| 65 |
|
| 66 |
t. Bash now saves and restores state around setting and unsetting posix mode, |
| 67 |
instead of having unsetting posix mode set a known state. |
| 68 |
|
| 69 |
u. Process substitution is now available in posix mode. |
| 70 |
|
| 71 |
v. READLINE_MARK: a new variable available while executing commands bound with |
| 72 |
`bind -x', contains the value of the mark. |
| 73 |
|
| 74 |
w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell |
| 75 |
startup. |
| 76 |
|
| 77 |
x. `test -v N' can now test whether or not positional parameter N is set. |
| 78 |
|
| 79 |
y. `local' now honors the `-p' option to display all local variables at the |
| 80 |
current context. |
| 81 |
|
| 82 |
z. The `@a' variable transformation now prints attributes for unset array |
| 83 |
variables. |
| 84 |
|
| 85 |
aa. The `@A' variable transformation now prints a declare command that sets a |
| 86 |
variable's attributes if the variable has attributes but is unset. |
| 87 |
|
| 88 |
bb. `declare' and `local' now have a -I option that inherits attributes and |
| 89 |
value from a variable with the same name at a previous scope. |
| 90 |
|
| 91 |
cc. When run from a -c command, `jobs' now reports the status of completed jobs. |
| 92 |
|
| 93 |
dd. New `U', `u', and `L' parameter transformations to convert to uppercase, |
| 94 |
convert first character to uppercase, and convert to lowercase, |
| 95 |
respectively. |
| 96 |
|
| 97 |
ee. PROMPT_COMMAND: can now be an array variable, each element of which can |
| 98 |
contain a command to be executed like a string PROMPT_COMMAND variable. |
| 99 |
|
| 100 |
ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource. |
| 101 |
|
| 102 |
gg. Associative arrays may be assigned using a list of key-value pairs within |
| 103 |
a compound assignment. Compound assignments where the words are not of |
| 104 |
the form [key]=value are assumed to be key-value assignments. A missing or |
| 105 |
empty key is an error; a missing value is treated as NULL. Assignments may |
| 106 |
not mix the two forms. |
| 107 |
|
| 108 |
hh. New `K' parameter transformation to display associative arrays as key- |
| 109 |
value pairs. |
| 110 |
|
| 111 |
ii. Writing history to syslog now handles messages longer than the syslog max |
| 112 |
length by writing multiple messages with a sequence number. |
| 113 |
|
| 114 |
jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since |
| 115 |
they are nominally integer variables. LINENO is not an integer variable. |
| 116 |
|
| 117 |
kk. Bash temporarily suppresses the verbose option when running the DEBUG trap |
| 118 |
while running a command from the `fc' builtin. |
| 119 |
|
| 120 |
ll. `wait -n' now accepts a list of job specifications as arguments and will |
| 121 |
wait for the first one in the list to change state. |
| 122 |
|
| 123 |
mm. The associative array implementation can now dynamically increase the |
| 124 |
size of the hash table based on insertion patterns. |
| 125 |
|
| 126 |
nn. HISTFILE is now readonly in a restricted shell. |
| 127 |
|
| 128 |
oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit |
| 129 |
systems. |
| 130 |
|
| 131 |
pp. If the hash builtin is listing hashed filenames portably, don't print |
| 132 |
anything if the table is empty. |
| 133 |
|
| 134 |
qq. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component. |
| 135 |
|
| 136 |
rr. Bash attempts to optimize away forks in the last command in a function body |
| 137 |
under appropriate circumstances. |
| 138 |
|
| 139 |
ss. The globbing code now uses fnmatch(3) to check collation elements (if |
| 140 |
available) even in cases without multibyte characters. |
| 141 |
|
| 142 |
tt. The `fg' and `bg' builtins now return an error in a command substitution |
| 143 |
when asked to restart a job inherited from the parent shell. |
| 144 |
|
| 145 |
uu. The shell now attempts to unlink all FIFOs on exit, whether a consuming |
| 146 |
process has finished with them or not. |
| 147 |
|
| 148 |
vv. There is a new contributed loadable builtin: asort. |
| 149 |
|
| 150 |
2. New Features in Readline |
| 151 |
|
| 152 |
a. If a second consecutive completion attempt produces matches where the first |
| 153 |
did not, treat it as a new completion attempt and insert a match as |
| 154 |
appropriate. |
| 155 |
|
| 156 |
b. Bracketed paste mode works in more places: incremental search strings, vi |
| 157 |
overstrike mode, character search, and reading numeric arguments. |
| 158 |
|
| 159 |
c. Readline automatically switches to horizontal scrolling if the terminal has |
| 160 |
only one line. |
| 161 |
|
| 162 |
d. Unbinding all key sequences bound to a particular readline function now |
| 163 |
descends into keymaps for multi-key sequences. |
| 164 |
|
| 165 |
e. rl-clear-display: new bindable command that clears the screen and, if |
| 166 |
possible, the scrollback buffer (bound to emacs mode M-C-l by default). |
| 167 |
|
| 168 |
f. New active mark and face feature: when enabled, it will highlight the text |
| 169 |
inserted by a bracketed paste (the `active region') and the text found by |
| 170 |
incremental and non-incremental history searches. This is tied to bracketed |
| 171 |
paste and can be disabled by turning off bracketed paste. |
| 172 |
|
| 173 |
g. Readline sets the mark in several additional commands. |
| 174 |
|
| 175 |
h. Bracketed paste mode is enabled by default. |
| 176 |
|
| 177 |
i. Readline tries to take advantage of the more regular structure of UTF-8 |
| 178 |
characters to identify the beginning and end of characters when moving |
| 179 |
through the line buffer. |
| 180 |
|
| 181 |
j. The bindable operate-and-get-next command (and its default bindings) are |
| 182 |
now part of readline instead of a bash-specific addition. |
| 183 |
|
| 184 |
k. The signal cleanup code now blocks SIGINT while processing after a SIGINT. |
| 185 |
|
| 186 |
------------------------------------------------------------------------------- |
| 187 |
This is a terse description of the new features added to bash-5.0 since |
| 188 |
the release of bash-4.4. As always, the manual page (doc/bash.1) is |
| 189 |
the place to look for complete descriptions. |
| 190 |
|
| 191 |
1. New Features in Bash |
| 192 |
|
| 193 |
a. The `wait' builtin can now wait for the last process substitution created. |
| 194 |
|
| 195 |
b. There is an EPOCHSECONDS variable, which expands to the time in seconds |
| 196 |
since the Unix epoch. |
| 197 |
|
| 198 |
c. There is an EPOCHREALTIME variable, which expands to the time in seconds |
| 199 |
since the Unix epoch with microsecond granularity. |
| 200 |
|
| 201 |
d. New loadable builtins: rm, stat, fdflags. |
| 202 |
|
| 203 |
e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment. |
| 204 |
|
| 205 |
f. When supplied a numeric argument, the shell-expand-line bindable readline |
| 206 |
command does not perform quote removal and suppresses command and process |
| 207 |
substitution. |
| 208 |
|
| 209 |
g. `history -d' understands negative arguments: negative arguments offset from |
| 210 |
the end of the history list. |
| 211 |
|
| 212 |
h. The `name' argument to the `coproc' reserved word now undergoes word |
| 213 |
expansion, so unique coprocs can be created in loops. |
| 214 |
|
| 215 |
i. A nameref name resolution loop in a function now resolves to a variable by |
| 216 |
that name in the global scope. |
| 217 |
|
| 218 |
j. The `wait' builtin now has a `-f' option, which signifies to wait until the |
| 219 |
specified job or process terminates, instead of waiting until it changes |
| 220 |
state. |
| 221 |
|
| 222 |
k. There is a define in config-top.h that allows the shell to use a static |
| 223 |
value for $PATH, overriding whatever is in the environment at startup, for |
| 224 |
use by the restricted shell. |
| 225 |
|
| 226 |
l. Process substitution does not inherit the `v' option, like command |
| 227 |
substitution. |
| 228 |
|
| 229 |
m. If a non-interactive shell with job control enabled detects that a foreground |
| 230 |
job died due to SIGINT, it acts as if it received the SIGINT. |
| 231 |
|
| 232 |
n. The SIGCHLD trap is run once for each exiting child process even if job |
| 233 |
control is not enabled when the shell is in Posix mode. |
| 234 |
|
| 235 |
o. A new shopt option: localvar_inherit; if set, a local variable inherits the |
| 236 |
value of a variable with the same name at the nearest preceding scope. |
| 237 |
|
| 238 |
p. `bind -r' now checks whether a key sequence is bound before binding it to |
| 239 |
NULL, to avoid creating keymaps for a multi-key sequence. |
| 240 |
|
| 241 |
q. A numeric argument to the line editing `operate-and-get-next' command |
| 242 |
specifies which history entry to use. |
| 243 |
|
| 244 |
r. The positional parameters are now assigned before running the shell startup |
| 245 |
files, so startup files can use $@. |
| 246 |
|
| 247 |
s. There is a compile-time option that forces the shell to disable the check |
| 248 |
for an inherited OLDPWD being a directory. |
| 249 |
|
| 250 |
t. The `history' builtin can now delete ranges of history entries using |
| 251 |
`-d start-end'. |
| 252 |
|
| 253 |
u. The `vi-edit-and-execute-command' bindable readline command now puts readline |
| 254 |
back in vi insertion mode after executing commands from the edited file. |
| 255 |
|
| 256 |
v. The command completion code now matches aliases and shell function names |
| 257 |
case-insensitively if the readline completion-ignore-case variable is set. |
| 258 |
|
| 259 |
w. There is a new `assoc_expand_once' shell option that attempts to expand |
| 260 |
associative array subscripts only once. |
| 261 |
|
| 262 |
x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended |
| 263 |
debugging mode is active. The old behavior of unconditionally setting them |
| 264 |
is available as part of the shell compatibility options. |
| 265 |
|
| 266 |
y. The `umask' builtin now allows modes and masks greater than octal 777. |
| 267 |
|
| 268 |
z. The `times' builtin now honors the current locale when printing a decimal |
| 269 |
point. |
| 270 |
|
| 271 |
aa. There is a new (disabled by default, undocumented) shell option to enable |
| 272 |
and disable sending history to syslog at runtime. |
| 273 |
|
| 274 |
bb. Bash no longer allows variable assignments preceding a special builtin that |
| 275 |
changes variable attributes to propagate back to the calling environment |
| 276 |
unless the compatibility level is 44 or lower. |
| 277 |
|
| 278 |
cc. You can set the default value for $HISTSIZE at build time in config-top.h. |
| 279 |
|
| 280 |
dd. The `complete' builtin now accepts a -I option that applies the completion |
| 281 |
to the initial word on the line. |
| 282 |
|
| 283 |
ee. The internal bash malloc now uses mmap (if available) to satisfy requests |
| 284 |
greater than 128K bytes, so free can use mfree to return the pages to the |
| 285 |
kernel. |
| 286 |
|
| 287 |
ff. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup |
| 288 |
unless it's in debugging mode, as the documentation has always said, but |
| 289 |
will dynamically create them if a script references them at the top level |
| 290 |
without having enabled debugging mode. |
| 291 |
|
| 292 |
gg. The localvar_inherit option will not attempt to inherit a value from a |
| 293 |
variable of an incompatible type (indexed vs. associative arrays, for |
| 294 |
example). |
| 295 |
|
| 296 |
hh. The `globasciiranges' option is now enabled by default; it can be set to |
| 297 |
off by default at configuration time. |
| 298 |
|
| 299 |
ii. Associative and indexed arrays now allow subscripts consisting solely of |
| 300 |
whitespace. |
| 301 |
|
| 302 |
jj. `checkwinsize' is now enabled by default. |
| 303 |
|
| 304 |
kk. The `localvar_unset' shopt option is now visible and documented. |
| 305 |
|
| 306 |
ll. The `progcomp_alias' shopt option is now visible and documented. |
| 307 |
|
| 308 |
mm. The signal name processing code now understands `SIGRTMIN+n' all the way |
| 309 |
up to SIGRTMAX. |
| 310 |
|
| 311 |
nn. There is a new `seq' loadable builtin. |
| 312 |
|
| 313 |
oo. Trap execution now honors the (internal) max invocations of `eval', since |
| 314 |
traps are supposed to be executed as if using `eval'. |
| 315 |
|
| 316 |
pp. The $_ variable doesn't change when the shell executes a command that forks. |
| 317 |
|
| 318 |
qq. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though |
| 319 |
conforming applications aren't supposed to use them. |
| 320 |
|
| 321 |
rr. POSIX mode now enables the `shift_verbose' option. |
| 322 |
|
| 323 |
2. New Features in Readline |
| 324 |
|
| 325 |
a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as |
| 326 |
Posix specifies (uses fnmatch(3) if available). |
| 327 |
|
| 328 |
b. There are new `next-screen-line' and `previous-screen-line' bindable |
| 329 |
commands, which move the cursor to the same column in the next, or previous, |
| 330 |
physical line, respectively. |
| 331 |
|
| 332 |
c. There are default key bindings for control-arrow-key key combinations. |
| 333 |
|
| 334 |
d. A negative argument (-N) to `quoted-insert' means to insert the next N |
| 335 |
characters using quoted-insert. |
| 336 |
|
| 337 |
e. New public function: rl_check_signals(), which allows applications to |
| 338 |
respond to signals that readline catches while waiting for input using |
| 339 |
a custom read function. |
| 340 |
|
| 341 |
f. There is new support for conditionally testing the readline version in an |
| 342 |
inputrc file, with a full set of arithmetic comparison operators available. |
| 343 |
|
| 344 |
g. There is a simple variable comparison facility available for use within an |
| 345 |
inputrc file. Allowable operators are equality and inequality; string |
| 346 |
variables may be compared to a value; boolean variables must be compared to |
| 347 |
either `on' or `off'; variable names are separated from the operator by |
| 348 |
whitespace. |
| 349 |
|
| 350 |
h. The history expansion library now understands command and process |
| 351 |
substitution and extended globbing and allows them to appear anywhere in a |
| 352 |
word. |
| 353 |
|
| 354 |
i. The history library has a new variable that allows applications to set the |
| 355 |
initial quoting state, so quoting state can be inherited from a previous |
| 356 |
line. |
| 357 |
|
| 358 |
j. Readline now allows application-defined keymap names; there is a new public |
| 359 |
function, rl_set_keymap_name(), to do that. |
| 360 |
|
| 361 |
k. The "Insert" keypad key, if available, now puts readline into overwrite |
| 362 |
mode. |
| 363 |
|
| 364 |
------------------------------------------------------------------------------- |
| 365 |
This is a terse description of the new features added to bash-4.4 since |
| 366 |
the release of bash-4.3. As always, the manual page (doc/bash.1) is |
| 367 |
the place to look for complete descriptions. |
| 368 |
|
| 369 |
1. New Features in Bash |
| 370 |
|
| 371 |
a. There is now a settable configuration #define that will cause the shell |
| 372 |
to exit if the shell is running setuid without the -p option and setuid |
| 373 |
to the real uid fails. |
| 374 |
|
| 375 |
b. Command and process substitutions now turn off the `-v' option when |
| 376 |
executing, as other shells seem to do. |
| 377 |
|
| 378 |
c. The default value for the `checkhash' shell option may now be set at |
| 379 |
compile time with a #define. |
| 380 |
|
| 381 |
d. The `mapfile' builtin now has a -d option to use an arbitrary character |
| 382 |
as the record delimiter, and a -t option to strip the delimiter as |
| 383 |
supplied with -d. |
| 384 |
|
| 385 |
e. The maximum number of nested recursive calls to `eval' is now settable in |
| 386 |
config-top.h; the default is no limit. |
| 387 |
|
| 388 |
f. The `-p' option to declare and similar builtins will display attributes for |
| 389 |
named variables even when those variables have not been assigned values |
| 390 |
(which are technically unset). |
| 391 |
|
| 392 |
g. The maximum number of nested recursive calls to `source' is now settable |
| 393 |
in config-top.h; the default is no limit. |
| 394 |
|
| 395 |
h. All builtin commands recognize the `--help' option and print a usage |
| 396 |
summary. |
| 397 |
|
| 398 |
i. Bash does not allow function names containing `/' and `=' to be exported. |
| 399 |
|
| 400 |
j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options. |
| 401 |
|
| 402 |
k. The shell now allows `time ; othercommand' to time null commands. |
| 403 |
|
| 404 |
l. There is a new `--enable-function-import' configuration option to allow |
| 405 |
importing shell functions from the environment; import is enabled by |
| 406 |
default. |
| 407 |
|
| 408 |
m. `printf -v var ""' will now set `var' to the empty string, as if `var=""' |
| 409 |
had been executed. |
| 410 |
|
| 411 |
n. GLOBIGNORE, the pattern substitution word expansion, and programmable |
| 412 |
completion match filtering now honor the value of the `nocasematch' option. |
| 413 |
|
| 414 |
o. There is a new ${parameter@spec} family of operators to transform the |
| 415 |
value of `parameter'. |
| 416 |
|
| 417 |
p. Bash no longer attempts to perform compound assignment if a variable on the |
| 418 |
rhs of an assignment statement argument to `declare' has the form of a |
| 419 |
compound assignment (e.g., w='(word)' ; declare foo=$w); compound |
| 420 |
assignments are accepted if the variable was already declared as an array, |
| 421 |
but with a warning. |
| 422 |
|
| 423 |
q. The declare builtin no longer displays array variables using the compound |
| 424 |
assignment syntax with quotes; that will generate warnings when re-used as |
| 425 |
input, and isn't necessary. |
| 426 |
|
| 427 |
r. Executing the rhs of && and || will no longer cause the shell to fork if |
| 428 |
it's not necessary. |
| 429 |
|
| 430 |
s. The `local' builtin takes a new argument: `-', which will cause it to save |
| 431 |
and the single-letter shell options and restore their previous values at |
| 432 |
function return. |
| 433 |
|
| 434 |
t. `complete' and `compgen' have a new `-o nosort' option, which forces |
| 435 |
readline to not sort the completion matches. |
| 436 |
|
| 437 |
u. Bash now allows waiting for the most recent process substitution, since it |
| 438 |
appears as $!. |
| 439 |
|
| 440 |
v. The `unset' builtin now unsets a scalar variable if it is subscripted with |
| 441 |
a `0', analogous to the ${var[0]} expansion. |
| 442 |
|
| 443 |
w. `set -i' is no longer valid, as in other shells. |
| 444 |
|
| 445 |
x. BASH_SUBSHELL is now updated for process substitution and group commands |
| 446 |
in pipelines, and is available with the same value when running any exit |
| 447 |
trap. |
| 448 |
|
| 449 |
y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or |
| 450 |
not bash is being run in a GNU Emacs shell window. |
| 451 |
|
| 452 |
z. Bash now treats SIGINT received when running a non-builtin command in a |
| 453 |
loop the way it has traditionally treated running a builtin command: |
| 454 |
running any trap handler and breaking out of the loop. |
| 455 |
|
| 456 |
aa. New variable: EXECIGNORE; a colon-separate list of patterns that will |
| 457 |
cause matching filenames to be ignored when searching for commands. |
| 458 |
|
| 459 |
bb. Aliases whose value ends in a shell metacharacter now expand in a way to |
| 460 |
allow them to be `pasted' to the next token, which can potentially change |
| 461 |
the meaning of a command (e.g., turning `&' into `&&'). |
| 462 |
|
| 463 |
cc. `make install' now installs the example loadable builtins and a set of |
| 464 |
bash headers to use when developing new loadable builtins. |
| 465 |
|
| 466 |
dd. `enable -f' now attempts to call functions named BUILTIN_builtin_load when |
| 467 |
loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows |
| 468 |
loadable builtins to run initialization and cleanup code. |
| 469 |
|
| 470 |
ee. There is a new BASH_LOADABLES_PATH variable containing a list of directories |
| 471 |
where the `enable -f' command looks for shared objects containing loadable |
| 472 |
builtins. |
| 473 |
|
| 474 |
ff. The `complete_fullquote' option to `shopt' changes filename completion to |
| 475 |
quote all shell metacharacters in filenames and directory names. |
| 476 |
|
| 477 |
gg. The `kill' builtin now has a `-L' option, equivalent to `-l', for |
| 478 |
compatibility with Linux standalone versions of kill. |
| 479 |
|
| 480 |
hh. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial |
| 481 |
environment. |
| 482 |
|
| 483 |
ii. inherit_errexit: a new `shopt' option that, when set, causes command |
| 484 |
substitutions to inherit the -e option. By default, those subshells disable |
| 485 |
-e. It's enabled as part of turning on posix mode. |
| 486 |
|
| 487 |
jj. New prompt string: PS0. Expanded and displayed by interactive shells after |
| 488 |
reading a complete command but before executing it. |
| 489 |
|
| 490 |
kk. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to |
| 491 |
SIG_DFL when the shell is started, so they are set to SIG_DFL in child |
| 492 |
processes. |
| 493 |
|
| 494 |
ll. Posix-mode shells now allow double quotes to quote the history expansion |
| 495 |
character. |
| 496 |
|
| 497 |
mm. OLDPWD can be inherited from the environment if it names a directory. |
| 498 |
|
| 499 |
nn. Shells running as root no longer inherit PS4 from the environment, closing |
| 500 |
a security hole involving PS4 expansion performing command substitution. |
| 501 |
|
| 502 |
oo. If executing an implicit `cd' when the `autocd' option is set, bash will |
| 503 |
now invoke a function named `cd' if one exists before executing the `cd' |
| 504 |
builtin. |
| 505 |
|
| 506 |
pp. Value conversions (arithmetic expansions, case modification, etc.) now |
| 507 |
happen when assigning elements of an array using compound assignment. |
| 508 |
|
| 509 |
qq. There is a new option settable in config-top.h that makes multiple |
| 510 |
directory arguments to `cd' a fatal error. |
| 511 |
|
| 512 |
rr. Bash now uses mktemp() when creating internal temporary files; it produces |
| 513 |
a warning at build time on many Linux systems. |
| 514 |
|
| 515 |
2. New Features in Readline |
| 516 |
|
| 517 |
a. The history truncation code now uses the same error recovery mechanism as |
| 518 |
the history writing code, and restores the old version of the history file |
| 519 |
on error. The error recovery mechanism handles symlinked history files. |
| 520 |
|
| 521 |
b. There is a new bindable variable, `enable-bracketed-paste', which enables |
| 522 |
support for a terminal's bracketed paste mode. |
| 523 |
|
| 524 |
c. The editing mode indicators can now be strings and are user-settable |
| 525 |
(new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' |
| 526 |
variables). Mode strings can contain invisible character sequences. |
| 527 |
Setting mode strings to null strings restores the defaults. |
| 528 |
|
| 529 |
d. Prompt expansion adds the mode string to the last line of a multi-line |
| 530 |
prompt (one with embedded newlines). |
| 531 |
|
| 532 |
e. There is a new bindable variable, `colored-completion-prefix', which, if |
| 533 |
set, causes the common prefix of a set of possible completions to be |
| 534 |
displayed in color. |
| 535 |
|
| 536 |
f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs- |
| 537 |
mode yank-pop. |
| 538 |
|
| 539 |
g. The redisplay code underwent several efficiency improvements for multibyte |
| 540 |
locales. |
| 541 |
|
| 542 |
h. The insert-char function attempts to batch-insert all pending typeahead |
| 543 |
that maps to self-insert, as long as it is coming from the terminal. |
| 544 |
|
| 545 |
i. rl_callback_sigcleanup: a new application function that can clean up and |
| 546 |
unset any state set by readline's callback mode. Intended to be used |
| 547 |
after a signal. |
| 548 |
|
| 549 |
j. If an incremental search string has its last character removed with DEL, the |
| 550 |
resulting empty search string no longer matches the previous line. |
| 551 |
|
| 552 |
k. If readline reads a history file that begins with `#' (or the value of |
| 553 |
the history comment character) and has enabled history timestamps, the |
| 554 |
history entries are assumed to be delimited by timestamps. This allows |
| 555 |
multi-line history entries. |
| 556 |
|
| 557 |
l. Readline now throws an error if it parses a key binding without a |
| 558 |
terminating `:' or whitespace. |
| 559 |
|
| 560 |
m. The default binding for ^W in vi mode now uses word boundaries specified |
| 561 |
by Posix (vi-unix-word-rubout is bindable command name). |
| 562 |
|
| 563 |
n. rl_clear_visible_line: new application-callable function; clears all |
| 564 |
screen lines occupied by the current visible readline line. |
| 565 |
|
| 566 |
o. rl_tty_set_echoing: application-callable function that controls whether |
| 567 |
or not readline thinks it is echoing terminal output. |
| 568 |
|
| 569 |
p. Handle >| and strings of digits preceding and following redirection |
| 570 |
specifications as single tokens when tokenizing the line for history |
| 571 |
expansion. |
| 572 |
|
| 573 |
q. Fixed a bug with displaying completions when the prefix display length |
| 574 |
is greater than the length of the completions to be displayed. |
| 575 |
|
| 576 |
r. The :p history modifier now applies to the entire line, so any expansion |
| 577 |
specifying :p causes the line to be printed instead of expanded. |
| 578 |
|
| 579 |
s. New application-callable function: rl_pending_signal(): returns the signal |
| 580 |
number of any signal readline has caught but not yet handled. |
| 581 |
|
| 582 |
t. New application-settable variable: rl_persistent_signal_handlers: if set |
| 583 |
to a non-zero value, readline will enable the readline-6.2 signal handler |
| 584 |
behavior in callback mode: handlers are installed when |
| 585 |
rl_callback_handler_install is called and removed removed when a complete |
| 586 |
line has been read. |
| 587 |
|
| 588 |
------------------------------------------------------------------------------- |
| 589 |
This is a terse description of the new features added to bash-4.3 since |
| 590 |
the release of bash-4.2. As always, the manual page (doc/bash.1) is |
| 591 |
the place to look for complete descriptions. |
| 592 |
|
| 593 |
1. New Features in Bash |
| 594 |
|
| 595 |
a. The `helptopic' completion action now maps to all the help topics, not just |
| 596 |
the shell builtins. |
| 597 |
|
| 598 |
b. The `help' builtin no longer does prefix substring matching first, so |
| 599 |
`help read' does not match `readonly', but will do it if exact string |
| 600 |
matching fails. |
| 601 |
|
| 602 |
c. The shell can be compiled to not display a message about processes that |
| 603 |
terminate due to SIGTERM. |
| 604 |
|
| 605 |
d. Non-interactive shells now react to the setting of checkwinsize and set |
| 606 |
LINES and COLUMNS after a foreground job exits. |
| 607 |
|
| 608 |
e. There is a new shell option, `globasciiranges', which, when set to on, |
| 609 |
forces globbing range comparisons to use character ordering as if they |
| 610 |
were run in the C locale. |
| 611 |
|
| 612 |
f. There is a new shell option, `direxpand', which makes filename completion |
| 613 |
expand variables in directory names in the way bash-4.1 did. |
| 614 |
|
| 615 |
g. In Posix mode, the `command' builtin does not change whether or not a |
| 616 |
builtin it shadows is treated as an assignment builtin. |
| 617 |
|
| 618 |
h. The `return' and `exit' builtins accept negative exit status arguments. |
| 619 |
|
| 620 |
i. The word completion code checks whether or not a filename containing a |
| 621 |
shell variable expands to a directory name and appends `/' to the word |
| 622 |
as appropriate. The same code expands shell variables in command names |
| 623 |
when performing command completion. |
| 624 |
|
| 625 |
j. In Posix mode, it is now an error to attempt to define a shell function |
| 626 |
with the same name as a Posix special builtin. |
| 627 |
|
| 628 |
k. When compiled for strict Posix conformance, history expansion is disabled |
| 629 |
by default. |
| 630 |
|
| 631 |
l. The history expansion character (!) does not cause history expansion when |
| 632 |
followed by the closing quote in a double-quoted string. |
| 633 |
|
| 634 |
m. `complete' and its siblings compgen/compopt now takes a new `-o noquote' |
| 635 |
option to inhibit quoting of the completions. |
| 636 |
|
| 637 |
n. Setting HISTSIZE to a value less than zero causes the history list to be |
| 638 |
unlimited (setting it 0 zero disables the history list). |
| 639 |
|
| 640 |
o. Setting HISTFILESIZE to a value less than zero causes the history file size |
| 641 |
to be unlimited (setting it to 0 causes the history file to be truncated |
| 642 |
to zero size). |
| 643 |
|
| 644 |
p. The `read' builtin now skips NUL bytes in the input. |
| 645 |
|
| 646 |
q. There is a new `bind -X' option to print all key sequences bound to Unix |
| 647 |
commands. |
| 648 |
|
| 649 |
r. When in Posix mode, `read' is interruptible by a trapped signal. After |
| 650 |
running the trap handler, read returns 128+signal and throws away any |
| 651 |
partially-read input. |
| 652 |
|
| 653 |
s. The command completion code skips whitespace and assignment statements |
| 654 |
before looking for the command name word to be completed. |
| 655 |
|
| 656 |
t. The build process has a new mechanism for constructing separate help files |
| 657 |
that better reflects the current set of compilation options. |
| 658 |
|
| 659 |
u. The -nt and -ot options to test now work with files with nanosecond |
| 660 |
timestamp resolution. |
| 661 |
|
| 662 |
v. The shell saves the command history in any shell for which history is |
| 663 |
enabled and HISTFILE is set, not just interactive shells. |
| 664 |
|
| 665 |
w. The shell has `nameref' variables and new -n(/+n) options to declare and |
| 666 |
unset to use them, and a `test -R' option to test for them. |
| 667 |
|
| 668 |
x. The shell now allows assigning, referencing, and unsetting elements of |
| 669 |
indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which |
| 670 |
count back from the last element of the array. |
| 671 |
|
| 672 |
y. The {x}<word redirection feature now allows words like {array[ind]} and |
| 673 |
can use variables with special meanings to the shell (e.g., BASH_XTRACEFD). |
| 674 |
|
| 675 |
z. There is a new CHILD_MAX special shell variable; its value controls the |
| 676 |
number of exited child statues the shell remembers. |
| 677 |
|
| 678 |
aa. There is a new configuration option (--enable-direxpand-default) that |
| 679 |
causes the `direxpand' shell option to be enabled by default. |
| 680 |
|
| 681 |
bb. Bash does not do anything special to ensure that the file descriptor |
| 682 |
assigned to X in {x}<foo remains open after the block containing it |
| 683 |
completes. |
| 684 |
|
| 685 |
cc. The `wait' builtin has a new `-n' option to wait for the next child to |
| 686 |
change status. |
| 687 |
|
| 688 |
dd. The `printf' %(...)T format specifier now uses the current time if no |
| 689 |
argument is supplied. |
| 690 |
|
| 691 |
ee. There is a new variable, BASH_COMPAT, that controls the current shell |
| 692 |
compatibility level. |
| 693 |
|
| 694 |
ff. The `popd' builtin now treats additional arguments as errors. |
| 695 |
|
| 696 |
gg. The brace expansion code now treats a failed sequence expansion as a |
| 697 |
simple string and will continue to expand brace terms in the remainder |
| 698 |
of the word. |
| 699 |
|
| 700 |
hh. Shells started to run process substitutions now run any trap set on EXIT. |
| 701 |
|
| 702 |
ii. The fc builtin now interprets -0 as the current command line. |
| 703 |
|
| 704 |
jj. Completing directory names containing shell variables now adds a trailing |
| 705 |
slash if the expanded result is a directory. |
| 706 |
|
| 707 |
kk. `cd' has a new `-@' option to browse a file's extended attributes on |
| 708 |
systems that support O_XATTR. |
| 709 |
|
| 710 |
ll. The test/[/[[ `-v variable' binary operator now understands array |
| 711 |
references. |
| 712 |
|
| 713 |
2. New Features in Readline |
| 714 |
|
| 715 |
a. Readline is now more responsive to SIGHUP and other fatal signals when |
| 716 |
reading input from the terminal or performing word completion but no |
| 717 |
longer attempts to run any not-allowable functions from a signal handler |
| 718 |
context. |
| 719 |
|
| 720 |
b. There are new bindable commands to search the history for the string of |
| 721 |
characters between the beginning of the line and the point |
| 722 |
(history-substring-search-forward, history-substring-search-backward) |
| 723 |
|
| 724 |
c. Readline allows quoted strings as the values of variables when setting |
| 725 |
them with `set'. As a side effect, trailing spaces and tabs are ignored |
| 726 |
when setting a string variable's value. |
| 727 |
|
| 728 |
d. The history library creates a backup of the history file when writing it |
| 729 |
and restores the backup on a write error. |
| 730 |
|
| 731 |
e. New application-settable variable: rl_filename_stat_hook: a function called |
| 732 |
with a filename before using it in a call to stat(2). Bash uses it to |
| 733 |
expand shell variables so things like $HOME/Downloads have a slash |
| 734 |
appended. |
| 735 |
|
| 736 |
f. New bindable function `print-last-kbd-macro', prints the most-recently- |
| 737 |
defined keyboard macro in a reusable format. |
| 738 |
|
| 739 |
g. New user-settable variable `colored-stats', enables use of colored text |
| 740 |
to denote file types when displaying possible completions (colored analog |
| 741 |
of visible-stats). |
| 742 |
|
| 743 |
h. New user-settable variable `keyseq-timout', acts as an inter-character |
| 744 |
timeout when reading input or incremental search strings. |
| 745 |
|
| 746 |
i. New application-callable function: rl_clear_history. Clears the history list |
| 747 |
and frees all readline-associated private data. |
| 748 |
|
| 749 |
j. New user-settable variable, show-mode-in-prompt, adds a characters to the |
| 750 |
beginning of the prompt indicating the current editing mode. |
| 751 |
|
| 752 |
k. New application-settable variable: rl_input_available_hook; function to be |
| 753 |
called when readline detects there is data available on its input file |
| 754 |
descriptor. |
| 755 |
|
| 756 |
l. Readline calls an application-set event hook (rl_event_hook) after it gets |
| 757 |
a signal while reading input (read returns -1/EINTR but readline does not |
| 758 |
handle the signal immediately) to allow the application to handle or |
| 759 |
otherwise note it. |
| 760 |
|
| 761 |
m. If the user-settable variable `history-size' is set to a value less than |
| 762 |
0, the history list size is unlimited. |
| 763 |
|
| 764 |
n. New application-settable variable: rl_signal_event_hook; function that is |
| 765 |
called when readline is reading terminal input and read(2) is interrupted |
| 766 |
by a signal. Currently not called for SIGHUP or SIGTERM. |
| 767 |
|
| 768 |
o. rl_change_environment: new application-settable variable that controls |
| 769 |
whether or not Readline modifies the environment (currently readline |
| 770 |
modifies only LINES and COLUMNS). |
| 771 |
|
| 772 |
------------------------------------------------------------------------------- |
| 773 |
This is a terse description of the new features added to bash-4.2 since |
| 774 |
the release of bash-4.1. As always, the manual page (doc/bash.1) is |
| 775 |
the place to look for complete descriptions. |
| 776 |
|
| 777 |
1. New Features in Bash |
| 778 |
|
| 779 |
a. `exec -a foo' now sets $0 to `foo' in an executable shell script without a |
| 780 |
leading #!. |
| 781 |
|
| 782 |
b. Subshells begun to execute command substitutions or run shell functions or |
| 783 |
builtins in subshells do not reset trap strings until a new trap is |
| 784 |
specified. This allows $(trap) to display the caller's traps and the |
| 785 |
trap strings to persist until a new trap is set. |
| 786 |
|
| 787 |
c. `trap -p' will now show signals ignored at shell startup, though their |
| 788 |
disposition still cannot be modified. |
| 789 |
|
| 790 |
d. $'...', echo, and printf understand \uXXXX and \UXXXXXXXX escape sequences. |
| 791 |
|
| 792 |
e. declare/typeset has a new `-g' option, which creates variables in the |
| 793 |
global scope even when run in a shell function. |
| 794 |
|
| 795 |
f. test/[/[[ have a new -v variable unary operator, which returns success if |
| 796 |
`variable' has been set. |
| 797 |
|
| 798 |
g. Posix parsing changes to allow `! time command' and multiple consecutive |
| 799 |
instances of `!' (which toggle) and `time' (which have no cumulative |
| 800 |
effect). |
| 801 |
|
| 802 |
h. Posix change to allow `time' as a command by itself to print the elapsed |
| 803 |
user, system, and real times for the shell and its children. |
| 804 |
|
| 805 |
j. $((...)) is always parsed as an arithmetic expansion first, instead of as |
| 806 |
a potential nested command substitution, as Posix requires. |
| 807 |
|
| 808 |
k. A new FUNCNEST variable to allow the user to control the maximum shell |
| 809 |
function nesting (recursive execution) level. |
| 810 |
|
| 811 |
l. The mapfile builtin now supplies a third argument to the callback command: |
| 812 |
the line about to be assigned to the supplied array index. |
| 813 |
|
| 814 |
m. The printf builtin has a new %(fmt)T specifier, which allows time values |
| 815 |
to use strftime-like formatting. |
| 816 |
|
| 817 |
n. There is a new `compat41' shell option. |
| 818 |
|
| 819 |
o. The cd builtin has a new Posix-mandated `-e' option. |
| 820 |
|
| 821 |
p. Negative subscripts to indexed arrays, previously errors, now are treated |
| 822 |
as offsets from the maximum assigned index + 1. |
| 823 |
|
| 824 |
q. Negative length specifications in the ${var:offset:length} expansion, |
| 825 |
previously errors, are now treated as offsets from the end of the variable. |
| 826 |
|
| 827 |
r. Parsing change to allow `time -p --'. |
| 828 |
|
| 829 |
s. Posix-mode parsing change to not recognize `time' as a keyword if the |
| 830 |
following token begins with a `-'. This means no more Posix-mode |
| 831 |
`time -p'. Posix interpretation 267. |
| 832 |
|
| 833 |
t. There is a new `lastpipe' shell option that runs the last command of a |
| 834 |
pipeline in the current shell context. The lastpipe option has no |
| 835 |
effect if job control is enabled. |
| 836 |
|
| 837 |
u. History expansion no longer expands the `$!' variable expansion. |
| 838 |
|
| 839 |
v. Posix mode shells no longer exit if a variable assignment error occurs |
| 840 |
with an assignment preceding a command that is not a special builtin. |
| 841 |
|
| 842 |
w. Non-interactive mode shells exit if -u is enabled and an attempt is made |
| 843 |
to use an unset variable with the % or # expansions, the `//', `^', or |
| 844 |
`,' expansions, or the parameter length expansion. |
| 845 |
|
| 846 |
x. Posix-mode shells use the argument passed to `.' as-is if a $PATH search |
| 847 |
fails, effectively searching the current directory. Posix-2008 change. |
| 848 |
|
| 849 |
2. New Features in Readline |
| 850 |
|
| 851 |
a. The history library does not try to write the history filename in the |
| 852 |
current directory if $HOME is unset. This closes a potential security |
| 853 |
problem if the application does not specify a history filename. |
| 854 |
|
| 855 |
b. New bindable variable `completion-display-width' to set the number of |
| 856 |
columns used when displaying completions. |
| 857 |
|
| 858 |
c. New bindable variable `completion-case-map' to cause case-insensitive |
| 859 |
completion to treat `-' and `_' as identical. |
| 860 |
|
| 861 |
d. There are new bindable vi-mode command names to avoid readline's case- |
| 862 |
insensitive matching not allowing them to be bound separately. |
| 863 |
|
| 864 |
e. New bindable variable `menu-complete-display-prefix' causes the menu |
| 865 |
completion code to display the common prefix of the possible completions |
| 866 |
before cycling through the list, instead of after. |
| 867 |
|
| 868 |
------------------------------------------------------------------------------- |
| 869 |
This is a terse description of the new features added to bash-4.1 since |
| 870 |
the release of bash-4.0. As always, the manual page (doc/bash.1) is |
| 871 |
the place to look for complete descriptions. |
| 872 |
|
| 873 |
1. New Features in Bash |
| 874 |
|
| 875 |
a. Here-documents within $(...) command substitutions may once more be |
| 876 |
delimited by the closing right paren, instead of requiring a newline. |
| 877 |
|
| 878 |
b. Bash's file status checks (executable, readable, etc.) now take file |
| 879 |
system ACLs into account on file systems that support them. |
| 880 |
|
| 881 |
c. Bash now passes environment variables with names that are not valid |
| 882 |
shell variable names through into the environment passed to child |
| 883 |
processes. |
| 884 |
|
| 885 |
d. The `execute-unix-command' readline function now attempts to clear and |
| 886 |
reuse the current line rather than move to a new one after the command |
| 887 |
executes. |
| 888 |
|
| 889 |
e. `printf -v' can now assign values to array indices. |
| 890 |
|
| 891 |
f. New `complete -E' and `compopt -E' options that work on the "empty" |
| 892 |
completion: completion attempted on an empty command line. |
| 893 |
|
| 894 |
g. New complete/compgen/compopt -D option to define a `default' completion: |
| 895 |
a completion to be invoked on command for which no completion has been |
| 896 |
defined. If this function returns 124, programmable completion is |
| 897 |
attempted again, allowing a user to dynamically build a set of completions |
| 898 |
as completion is attempted by having the default completion function |
| 899 |
install individual completion functions each time it is invoked. |
| 900 |
|
| 901 |
h. When displaying associative arrays, subscripts are now quoted. |
| 902 |
|
| 903 |
i. Changes to dabbrev-expand to make it more `emacs-like': no space appended |
| 904 |
after matches, completions are not sorted, and most recent history entries |
| 905 |
are presented first. |
| 906 |
|
| 907 |
j. The [[ and (( commands are now subject to the setting of `set -e' and the |
| 908 |
ERR trap. |
| 909 |
|
| 910 |
k. The source/. builtin now removes NUL bytes from the file before attempting |
| 911 |
to parse commands. |
| 912 |
|
| 913 |
l. There is a new configuration option (in config-top.h) that forces bash to |
| 914 |
forward all history entries to syslog. |
| 915 |
|
| 916 |
m. A new variable $BASHOPTS to export shell options settable using `shopt' to |
| 917 |
child processes. |
| 918 |
|
| 919 |
n. There is a new confgure option that forces the extglob option to be |
| 920 |
enabled by default. |
| 921 |
|
| 922 |
o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace |
| 923 |
output to that file descriptor. |
| 924 |
|
| 925 |
p. If the optional left-hand-side of a redirection is of the form {var}, the |
| 926 |
shell assigns the file descriptor used to $var or uses $var as the file |
| 927 |
descriptor to move or close, depending on the redirection operator. |
| 928 |
|
| 929 |
q. The < and > operators to the [[ conditional command now do string |
| 930 |
comparison according to the current locale if the compatibility level |
| 931 |
is greater than 40. |
| 932 |
|
| 933 |
r. Programmable completion now uses the completion for `b' instead of `a' |
| 934 |
when completion is attempted on a line like: a $(b c. |
| 935 |
|
| 936 |
s. Force extglob on temporarily when parsing the pattern argument to |
| 937 |
the == and != operators to the [[ command, for compatibility. |
| 938 |
|
| 939 |
t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is |
| 940 |
received and a trap on SIGCHLD is set to be Posix-mode only. |
| 941 |
|
| 942 |
u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS |
| 943 |
characters, ignoring delimiters like newline. |
| 944 |
|
| 945 |
v. The mapfile/readarray builtin no longer stores the commands it invokes via |
| 946 |
callbacks in the history list. |
| 947 |
|
| 948 |
w. There is a new `compat40' shopt option. |
| 949 |
|
| 950 |
2. New Features in Readline |
| 951 |
|
| 952 |
a. New bindable function: menu-complete-backward. |
| 953 |
|
| 954 |
b. In the vi insertion keymap, C-n is now bound to menu-complete by default, |
| 955 |
and C-p to menu-complete-backward. |
| 956 |
|
| 957 |
c. When in vi command mode, repeatedly hitting ESC now does nothing, even |
| 958 |
when ESC introduces a bound key sequence. This is closer to how |
| 959 |
historical vi behaves. |
| 960 |
|
| 961 |
d. New bindable function: skip-csi-sequence. Can be used as a default to |
| 962 |
consume key sequences generated by keys like Home and End without having |
| 963 |
to bind all keys. |
| 964 |
|
| 965 |
e. New application-settable function: rl_filename_rewrite_hook. Can be used |
| 966 |
to rewite or modify filenames read from the file system before they are |
| 967 |
compared to the word to be completed. |
| 968 |
|
| 969 |
f. New bindable variable: skip-completed-text, active when completing in the |
| 970 |
middle of a word. If enabled, it means that characters in the completion |
| 971 |
that match characters in the remainder of the word are "skipped" rather |
| 972 |
than inserted into the line. |
| 973 |
|
| 974 |
g. The pre-readline-6.0 version of menu completion is available as |
| 975 |
"old-menu-complete" for users who do not like the readline-6.0 version. |
| 976 |
|
| 977 |
h. New bindable variable: echo-control-characters. If enabled, and the |
| 978 |
tty ECHOCTL bit is set, controls the echoing of characters corresponding |
| 979 |
to keyboard-generated signals. |
| 980 |
|
| 981 |
i. New bindable variable: enable-meta-key. Controls whether or not readline |
| 982 |
sends the smm/rmm sequences if the terminal indicates it has a meta key |
| 983 |
that enables eight-bit characters. |
| 984 |
|
| 985 |
------------------------------------------------------------------------------- |
| 986 |
This is a terse description of the new features added to bash-4.0 since |
| 987 |
the release of bash-3.2. As always, the manual page (doc/bash.1) is |
| 988 |
the place to look for complete descriptions. |
| 989 |
|
| 990 |
1. New Features in Bash |
| 991 |
|
| 992 |
a. When using substring expansion on the positional parameters, a starting |
| 993 |
index of 0 now causes $0 to be prefixed to the list. |
| 994 |
|
| 995 |
b. The `help' builtin now prints its columns with entries sorted vertically |
| 996 |
rather than horizontally. |
| 997 |
|
| 998 |
c. There is a new variable, $BASHPID, which always returns the process id of |
| 999 |
the current shell. |
| 1000 |
|
| 1001 |
d. There is a new `autocd' option that, when enabled, causes bash to attempt |
| 1002 |
to `cd' to a directory name that is supplied as the first word of a |
| 1003 |
simple command. |
| 1004 |
|
| 1005 |
e. There is a new `checkjobs' option that causes the shell to check for and |
| 1006 |
report any running or stopped jobs at exit. |
| 1007 |
|
| 1008 |
f. The programmable completion code exports a new COMP_TYPE variable, set to |
| 1009 |
a character describing the type of completion being attempted. |
| 1010 |
|
| 1011 |
g. The programmable completion code exports a new COMP_KEY variable, set to |
| 1012 |
the character that caused the completion to be invoked (e.g., TAB). |
| 1013 |
|
| 1014 |
h. If creation of a child process fails due to insufficient resources, bash |
| 1015 |
will try again several times before reporting failure. |
| 1016 |
|
| 1017 |
i. The programmable completion code now uses the same set of characters as |
| 1018 |
readline when breaking the command line into a list of words. |
| 1019 |
|
| 1020 |
j. The block multiplier for the ulimit -c and -f options is now 512 when in |
| 1021 |
Posix mode, as Posix specifies. |
| 1022 |
|
| 1023 |
k. Changed the behavior of the read builtin to save any partial input received |
| 1024 |
in the specified variable when the read builtin times out. This also |
| 1025 |
results in variables specified as arguments to read to be set to the empty |
| 1026 |
string when there is no input available. When the read builtin times out, |
| 1027 |
it returns an exit status greater than 128. |
| 1028 |
|
| 1029 |
l. The shell now has the notion of a `compatibility level', controlled by |
| 1030 |
new variables settable by `shopt'. Setting this variable currently |
| 1031 |
restores the bash-3.1 behavior when processing quoted strings on the rhs |
| 1032 |
of the `=~' operator to the `[[' command. |
| 1033 |
|
| 1034 |
m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number |
| 1035 |
of threads) options. |
| 1036 |
|
| 1037 |
n. The -p option to `declare' now displays all variable values and attributes |
| 1038 |
(or function values and attributes if used with -f). |
| 1039 |
|
| 1040 |
o. There is a new `compopt' builtin that allows completion functions to modify |
| 1041 |
completion options for existing completions or the completion currently |
| 1042 |
being executed. |
| 1043 |
|
| 1044 |
p. The `read' builtin has a new -i option which inserts text into the reply |
| 1045 |
buffer when using readline. |
| 1046 |
|
| 1047 |
q. A new `-E' option to the complete builtin allows control of the default |
| 1048 |
behavior for completion on an empty line. |
| 1049 |
|
| 1050 |
r. There is now limited support for completing command name words containing |
| 1051 |
globbing characters. |
| 1052 |
|
| 1053 |
s. Changed format of internal help documentation for all builtins to roughly |
| 1054 |
follow man page format. |
| 1055 |
|
| 1056 |
t. The `help' builtin now has a new -d option, to display a short description, |
| 1057 |
and a -m option, to print help information in a man page-like format. |
| 1058 |
|
| 1059 |
u. There is a new `mapfile' builtin to populate an array with lines from a |
| 1060 |
given file. The name `readarray' is a synonym. |
| 1061 |
|
| 1062 |
v. If a command is not found, the shell attempts to execute a shell function |
| 1063 |
named `command_not_found_handle', supplying the command words as the |
| 1064 |
function arguments. |
| 1065 |
|
| 1066 |
w. There is a new shell option: `globstar'. When enabled, the globbing code |
| 1067 |
treats `**' specially -- it matches all directories (and files within |
| 1068 |
them, when appropriate) recursively. |
| 1069 |
|
| 1070 |
x. There is a new shell option: `dirspell'. When enabled, the filename |
| 1071 |
completion code performs spelling correction on directory names during |
| 1072 |
completion. |
| 1073 |
|
| 1074 |
y. The `-t' option to the `read' builtin now supports fractional timeout |
| 1075 |
values. |
| 1076 |
|
| 1077 |
z. Brace expansion now allows zero-padding of expanded numeric values and |
| 1078 |
will add the proper number of zeroes to make sure all values contain the |
| 1079 |
same number of digits. |
| 1080 |
|
| 1081 |
aa. There is a new bash-specific bindable readline function: `dabbrev-expand'. |
| 1082 |
It uses menu completion on a set of words taken from the history list. |
| 1083 |
|
| 1084 |
bb. The command assigned to a key sequence with `bind -x' now sets two new |
| 1085 |
variables in the environment of the executed command: READLINE_LINE_BUFFER |
| 1086 |
and READLINE_POINT. The command can change the current readline line |
| 1087 |
and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT, |
| 1088 |
respectively. |
| 1089 |
|
| 1090 |
cc. There is a new &>> redirection operator, which appends the standard output |
| 1091 |
and standard error to the named file. |
| 1092 |
|
| 1093 |
dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects |
| 1094 |
the standard error for a command through a pipe. |
| 1095 |
|
| 1096 |
ee. The new `;&' case statement action list terminator causes execution to |
| 1097 |
continue with the action associated with the next pattern in the |
| 1098 |
statement rather than terminating the command. |
| 1099 |
|
| 1100 |
ff. The new `;;&' case statement action list terminator causes the shell to |
| 1101 |
test the next set of patterns after completing execution of the current |
| 1102 |
action, rather than terminating the command. |
| 1103 |
|
| 1104 |
gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an |
| 1105 |
integer value greater than zero, prompt expansion of \w and \W will |
| 1106 |
retain only that number of trailing pathname components and replace |
| 1107 |
the intervening characters with `...'. |
| 1108 |
|
| 1109 |
hh. There are new case-modifying word expansions: uppercase (^[^]) and |
| 1110 |
lowercase (,[,]). They can work on either the first character or |
| 1111 |
array element, or globally. They accept an optional shell pattern |
| 1112 |
that determines which characters to modify. There is an optionally- |
| 1113 |
configured feature to include capitalization operators. |
| 1114 |
|
| 1115 |
ii. The shell provides associative array variables, with the appropriate |
| 1116 |
support to create, delete, assign values to, and expand them. |
| 1117 |
|
| 1118 |
jj. The `declare' builtin now has new -l (convert value to lowercase upon |
| 1119 |
assignment) and -u (convert value to uppercase upon assignment) options. |
| 1120 |
There is an optionally-configurable -c option to capitalize a value at |
| 1121 |
assignment. |
| 1122 |
|
| 1123 |
kk. There is a new `coproc' reserved word that specifies a coprocess: an |
| 1124 |
asynchronous command run with two pipes connected to the creating shell. |
| 1125 |
Coprocs can be named. The input and output file descriptors and the |
| 1126 |
PID of the coprocess are available to the calling shell in variables |
| 1127 |
with coproc-specific names. |
| 1128 |
|
| 1129 |
ll. A value of 0 for the -t option to `read' now returns success if there is |
| 1130 |
input available to be read from the specified file descriptor. |
| 1131 |
|
| 1132 |
mm. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged |
| 1133 |
mode. |
| 1134 |
|
| 1135 |
nn. New bindable readline functions shell-forward-word and shell-backward-word, |
| 1136 |
which move forward and backward words delimited by shell metacharacters |
| 1137 |
and honor shell quoting. |
| 1138 |
|
| 1139 |
oo. New bindable readline functions shell-backward-kill-word and shell-kill-word |
| 1140 |
which kill words backward and forward, but use the same word boundaries |
| 1141 |
as shell-forward-word and shell-backward-word. |
| 1142 |
|
| 1143 |
2. New Features in Readline |
| 1144 |
|
| 1145 |
a. A new variable, rl_sort_completion_matches; allows applications to inhibit |
| 1146 |
match list sorting (but beware: some things don't work right if |
| 1147 |
applications do this). |
| 1148 |
|
| 1149 |
b. A new variable, rl_completion_invoking_key; allows applications to discover |
| 1150 |
the key that invoked rl_complete or rl_menu_complete. |
| 1151 |
|
| 1152 |
c. The functions rl_block_sigint and rl_release_sigint are now public and |
| 1153 |
available to calling applications who want to protect critical sections |
| 1154 |
(like redisplay). |
| 1155 |
|
| 1156 |
d. The functions rl_save_state and rl_restore_state are now public and |
| 1157 |
available to calling applications; documented rest of readline's state |
| 1158 |
flag values. |
| 1159 |
|
| 1160 |
e. A new user-settable variable, `history-size', allows setting the maximum |
| 1161 |
number of entries in the history list. |
| 1162 |
|
| 1163 |
f. There is a new implementation of menu completion, with several improvements |
| 1164 |
over the old; the most notable improvement is a better `completions |
| 1165 |
browsing' mode. |
| 1166 |
|
| 1167 |
g. The menu completion code now uses the rl_menu_completion_entry_function |
| 1168 |
variable, allowing applications to provide their own menu completion |
| 1169 |
generators. |
| 1170 |
|
| 1171 |
h. There is support for replacing a prefix of a pathname with a `...' when |
| 1172 |
displaying possible completions. This is controllable by setting the |
| 1173 |
`completion-prefix-display-length' variable. Matches with a common prefix |
| 1174 |
longer than this value have the common prefix replaced with `...'. |
| 1175 |
|
| 1176 |
i. There is a new `revert-all-at-newline' variable. If enabled, readline will |
| 1177 |
undo all outstanding changes to all history lines when `accept-line' is |
| 1178 |
executed. |
| 1179 |
|
| 1180 |
j. If the kernel supports it, readline displays special characters |
| 1181 |
corresponding to a keyboard-generated signal when the signal is received. |
| 1182 |
|
| 1183 |
------------------------------------------------------------------------------- |
| 1184 |
This is a terse description of the new features added to bash-3.2 since |
| 1185 |
the release of bash-3.1. As always, the manual page (doc/bash.1) is |
| 1186 |
the place to look for complete descriptions. |
| 1187 |
|
| 1188 |
1. New Features in Bash |
| 1189 |
|
| 1190 |
a. Changed the parameter pattern replacement functions to not anchor the |
| 1191 |
pattern at the beginning of the string if doing global replacement - that |
| 1192 |
combination doesn't make any sense. |
| 1193 |
|
| 1194 |
b. When running in `word expansion only' mode (--wordexp option), inhibit |
| 1195 |
process substitution. |
| 1196 |
|
| 1197 |
c. Loadable builtins now work on MacOS X 10.[34]. |
| 1198 |
|
| 1199 |
d. Shells running in posix mode no longer set $HOME, as POSIX requires. |
| 1200 |
|
| 1201 |
e. The code that checks for binary files being executed as shell scripts now |
| 1202 |
checks only for NUL rather than any non-printing character. |
| 1203 |
|
| 1204 |
f. Quoting the string argument to the [[ command's =~ operator now forces |
| 1205 |
string matching, as with the other pattern-matching operators. |
| 1206 |
|
| 1207 |
2. New Features in Readline |
| 1208 |
|
| 1209 |
a. Calling applications can now set the keyboard timeout to 0, allowing |
| 1210 |
poll-like behavior. |
| 1211 |
|
| 1212 |
b. The value of SYS_INPUTRC (configurable at compilation time) is now used as |
| 1213 |
the default last-ditch startup file. |
| 1214 |
|
| 1215 |
c. The history file reading functions now allow windows-like \r\n line |
| 1216 |
terminators. |
| 1217 |
|
| 1218 |
------------------------------------------------------------------------------- |
| 1219 |
This is a terse description of the new features added to bash-3.1 since |
| 1220 |
the release of bash-3.0. As always, the manual page (doc/bash.1) is |
| 1221 |
the place to look for complete descriptions. |
| 1222 |
|
| 1223 |
1. New Features in Bash |
| 1224 |
|
| 1225 |
a. Bash now understands LC_TIME as a special variable so that time display |
| 1226 |
tracks the current locale. |
| 1227 |
|
| 1228 |
b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created |
| 1229 |
as `invisible' variables and may not be unset. |
| 1230 |
|
| 1231 |
c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't |
| 1232 |
try to interpret any options at all, as POSIX requires. |
| 1233 |
|
| 1234 |
d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify. |
| 1235 |
|
| 1236 |
e. Fixed vi-mode word completion and glob expansion to perform tilde |
| 1237 |
expansion. |
| 1238 |
|
| 1239 |
f. The `**' mathematic exponentiation operator is now right-associative. |
| 1240 |
|
| 1241 |
g. The `ulimit' builtin has new options: -i (max number of pending signals), |
| 1242 |
-q (max size of POSIX message queues), and -x (max number of file locks). |
| 1243 |
|
| 1244 |
h. A bare `%' once again expands to the current job when used as a job |
| 1245 |
specifier. |
| 1246 |
|
| 1247 |
i. The `+=' assignment operator (append to the value of a string or array) is |
| 1248 |
now supported for assignment statements and arguments to builtin commands |
| 1249 |
that accept assignment statements. |
| 1250 |
|
| 1251 |
j. BASH_COMMAND now preserves its value when a DEBUG trap is executed. |
| 1252 |
|
| 1253 |
k. The `gnu_errfmt' option is enabled automatically if the shell is running |
| 1254 |
in an emacs terminal window. |
| 1255 |
|
| 1256 |
l. New configuration option: --single-help-strings. Causes long help text |
| 1257 |
to be written as a single string; intended to ease translation. |
| 1258 |
|
| 1259 |
m. The COMP_WORDBREAKS variable now causes the list of word break characters |
| 1260 |
to be emptied when the variable is unset. |
| 1261 |
|
| 1262 |
n. An unquoted expansion of $* when $IFS is empty now causes the positional |
| 1263 |
parameters to be concatenated if the expansion doesn't undergo word |
| 1264 |
splitting. |
| 1265 |
|
| 1266 |
o. Bash now inherits $_ from the environment if it appears there at startup. |
| 1267 |
|
| 1268 |
p. New shell option: nocasematch. If non-zero, shell pattern matching ignores |
| 1269 |
case when used by `case' and `[[' commands. |
| 1270 |
|
| 1271 |
q. The `printf' builtin takes a new option: -v var. That causes the output |
| 1272 |
to be placed into var instead of on stdout. |
| 1273 |
|
| 1274 |
r. By default, the shell no longer reports processes dying from SIGPIPE. |
| 1275 |
|
| 1276 |
s. Bash now sets the extern variable `environ' to the export environment it |
| 1277 |
creates, so C library functions that call getenv() (and can't use the |
| 1278 |
shell-provided replacement) get current values of environment variables. |
| 1279 |
|
| 1280 |
t. A new configuration option, `--enable-strict-posix-default', which will |
| 1281 |
build bash to be POSIX conforming by default. |
| 1282 |
|
| 1283 |
u. If compiled for strict POSIX conformance, LINES and COLUMNS may now |
| 1284 |
override the true terminal size. |
| 1285 |
|
| 1286 |
2. New Features in Readline |
| 1287 |
|
| 1288 |
a. The key sequence sent by the keypad `delete' key is now automatically |
| 1289 |
bound to delete-char. |
| 1290 |
|
| 1291 |
b. A negative argument to menu-complete now cycles backward through the |
| 1292 |
completion list. |
| 1293 |
|
| 1294 |
c. A new bindable readline variable: bind-tty-special-chars. If non-zero, |
| 1295 |
readline will bind the terminal special characters to their readline |
| 1296 |
equivalents when it's called (on by default). |
| 1297 |
|
| 1298 |
d. New bindable command: vi-rubout. Saves deleted text for possible |
| 1299 |
reinsertion, as with any vi-mode `text modification' command; `X' is bound |
| 1300 |
to this in vi command mode. |
| 1301 |
|
| 1302 |
e. A new external application-controllable variable that allows the LINES |
| 1303 |
and COLUMNS environment variables to set the window size regardless of |
| 1304 |
what the kernel returns: rl_prefer_env_winsize |
| 1305 |
|
| 1306 |
------------------------------------------------------------------------------- |
| 1307 |
This is a terse description of the new features added to bash-3.0 since |
| 1308 |
the release of bash-2.05b. As always, the manual page (doc/bash.1) is |
| 1309 |
the place to look for complete descriptions. |
| 1310 |
|
| 1311 |
1. New Features in Bash |
| 1312 |
|
| 1313 |
a. ANSI string expansion now implements the \x{hexdigits} escape. |
| 1314 |
|
| 1315 |
b. There is a new loadable `strftime' builtin. |
| 1316 |
|
| 1317 |
c. New variable, COMP_WORDBREAKS, which controls the readline completer's |
| 1318 |
idea of word break characters. |
| 1319 |
|
| 1320 |
d. The `type' builtin no longer reports on aliases unless alias expansion |
| 1321 |
will actually be performed. |
| 1322 |
|
| 1323 |
e. HISTCONTROL is now a colon-separated list of values, which permits |
| 1324 |
more extensibility and backwards compatibility. |
| 1325 |
|
| 1326 |
f. HISTCONTROL may now include the `erasedups' option, which causes all lines |
| 1327 |
matching a line being added to be removed from the history list. |
| 1328 |
|
| 1329 |
g. `configure' has a new `--enable-multibyte' argument that permits multibyte |
| 1330 |
character support to be disabled even on systems that support it. |
| 1331 |
|
| 1332 |
h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV, |
| 1333 |
BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING, |
| 1334 |
BASH_COMMAND |
| 1335 |
|
| 1336 |
i. FUNCNAME has been changed to support the debugger: it's now an array |
| 1337 |
variable. |
| 1338 |
|
| 1339 |
j. for, case, select, arithmetic commands now keep line number information |
| 1340 |
for the debugger. |
| 1341 |
|
| 1342 |
k. There is a new `RETURN' trap executed when a function or sourced script |
| 1343 |
returns (not inherited child processes; inherited by command substitution |
| 1344 |
if function tracing is enabled and the debugger is active). |
| 1345 |
|
| 1346 |
l. New invocation option: --debugger. Enables debugging and turns on new |
| 1347 |
`extdebug' shell option. |
| 1348 |
|
| 1349 |
m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR |
| 1350 |
traps, respectively, to be inherited by shell functions. Equivalent to |
| 1351 |
`set -T' and `set -E' respectively. The `functrace' option also controls |
| 1352 |
whether or not the DEBUG trap is inherited by sourced scripts. |
| 1353 |
|
| 1354 |
n. The DEBUG trap is run before binding the variable and running the action |
| 1355 |
list in a `for' command, binding the selection variable and running the |
| 1356 |
query in a `select' command, and before attempting a match in a `case' |
| 1357 |
command. |
| 1358 |
|
| 1359 |
o. New `--enable-debugger' option to `configure' to compile in the debugger |
| 1360 |
support code. |
| 1361 |
|
| 1362 |
p. `declare -F' now prints out extra line number and source file information |
| 1363 |
if the `extdebug' option is set. |
| 1364 |
|
| 1365 |
q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes |
| 1366 |
the next command to be skipped, and a return value of 2 while in a |
| 1367 |
function or sourced script forces a `return'. |
| 1368 |
|
| 1369 |
r. New `caller' builtin to provide a call stack for the bash debugger. |
| 1370 |
|
| 1371 |
s. The DEBUG trap is run just before the first command in a function body is |
| 1372 |
executed, for the debugger. |
| 1373 |
|
| 1374 |
t. `for', `select', and `case' command heads are printed when `set -x' is |
| 1375 |
enabled. |
| 1376 |
|
| 1377 |
u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1, |
| 1378 |
x+2,...,y}. x and y can be integers or single characters; the sequence |
| 1379 |
may ascend or descend; the increment is always 1. |
| 1380 |
|
| 1381 |
v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices) |
| 1382 |
of array. |
| 1383 |
|
| 1384 |
w. New `force_fignore' shopt option; if enabled, suffixes specified by |
| 1385 |
FIGNORE cause words to be ignored when performing word completion even |
| 1386 |
if they're the only possibilities. |
| 1387 |
|
| 1388 |
x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu |
| 1389 |
style' (filename:lineno:message) format. |
| 1390 |
|
| 1391 |
y. New `-o bashdefault' option to complete and compgen; if set, causes the |
| 1392 |
whole set of bash completions to be performed if the compspec doesn't |
| 1393 |
result in a match. |
| 1394 |
|
| 1395 |
z. New `-o plusdirs' option to complete and compgen; if set, causes directory |
| 1396 |
name completion to be performed and the results added to the rest of the |
| 1397 |
possible completions. |
| 1398 |
|
| 1399 |
aa. `kill' is available as a builtin even when the shell is built without |
| 1400 |
job control. |
| 1401 |
|
| 1402 |
bb. New HISTTIMEFORMAT variable; value is a format string to pass to |
| 1403 |
strftime(3). If set and not null, the `history' builtin prints out |
| 1404 |
timestamp information according to the specified format when displaying |
| 1405 |
history entries. If set, bash tells the history library to write out |
| 1406 |
timestamp information when the history file is written. |
| 1407 |
|
| 1408 |
cc. The [[ ... ]] command has a new binary `=~' operator that performs |
| 1409 |
extended regular expression (egrep-like) matching. |
| 1410 |
|
| 1411 |
dd. `configure' has a new `--enable-cond-regexp' option (enabled by default) |
| 1412 |
to enable the =~ operator and regexp matching in [[ ... ]]. |
| 1413 |
|
| 1414 |
ee. Subexpressions matched by the =~ operator are placed in the new |
| 1415 |
BASH_REMATCH array variable. |
| 1416 |
|
| 1417 |
ff. New `failglob' option that causes an expansion error when pathname |
| 1418 |
expansion fails to produce a match. |
| 1419 |
|
| 1420 |
gg. New `set -o pipefail' option that causes a pipeline to return a failure |
| 1421 |
status if any of the processes in the pipeline fail, not just the last |
| 1422 |
one. |
| 1423 |
|
| 1424 |
hh. printf builtin understands two new escape sequences: \" and \?. |
| 1425 |
|
| 1426 |
ii. `echo -e' understands two new escape sequences: \" and \?. |
| 1427 |
|
| 1428 |
jj. The GNU `gettext' package and libintl have been integrated; the shell's |
| 1429 |
messages can be translated into different languages. |
| 1430 |
|
| 1431 |
kk. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'. |
| 1432 |
|
| 1433 |
ll. The error message printed when bash cannot open a shell script supplied |
| 1434 |
as argument 1 now includes the name of the shell, to better identify |
| 1435 |
the error as coming from bash. |
| 1436 |
|
| 1437 |
mm. The parameter pattern removal and substitution expansions are now much |
| 1438 |
faster and more efficient when using multibyte characters. |
| 1439 |
|
| 1440 |
nn. The `jobs', `kill', and `wait' builtins now accept job control notation |
| 1441 |
even if job control is not enabled. |
| 1442 |
|
| 1443 |
oo. The historical behavior of `trap' that allows a missing `action' argument |
| 1444 |
to cause each specified signal's handling to be reset to its default is |
| 1445 |
now only supported when `trap' is given a single non-option argument. |
| 1446 |
|
| 1447 |
2. New Features in Readline |
| 1448 |
|
| 1449 |
a. History expansion has a new `a' modifier equivalent to the `g' modifier |
| 1450 |
for compatibility with the BSD csh. |
| 1451 |
|
| 1452 |
b. History expansion has a new `G' modifier equivalent to the BSD csh `g' |
| 1453 |
modifier, which performs a substitution once per word. |
| 1454 |
|
| 1455 |
c. All non-incremental search operations may now undo the operation of |
| 1456 |
replacing the current line with the history line. |
| 1457 |
|
| 1458 |
d. The text inserted by an `a' command in vi mode can be reinserted with |
| 1459 |
`.'. |
| 1460 |
|
| 1461 |
e. New bindable variable, `show-all-if-unmodified'. If set, the readline |
| 1462 |
completer will list possible completions immediately if there is more |
| 1463 |
than one completion and partial completion cannot be performed. |
| 1464 |
|
| 1465 |
f. There is a new application-callable `free_history_entry()' function. |
| 1466 |
|
| 1467 |
g. History list entries now contain timestamp information; the history file |
| 1468 |
functions know how to read and write timestamp information associated |
| 1469 |
with each entry. |
| 1470 |
|
| 1471 |
h. Four new key binding functions have been added: |
| 1472 |
|
| 1473 |
rl_bind_key_if_unbound() |
| 1474 |
rl_bind_key_if_unbound_in_map() |
| 1475 |
rl_bind_keyseq_if_unbound() |
| 1476 |
rl_bind_keyseq_if_unbound_in_map() |
| 1477 |
|
| 1478 |
i. New application variable, rl_completion_quote_character, set to any |
| 1479 |
quote character readline finds before it calls the application completion |
| 1480 |
function. |
| 1481 |
|
| 1482 |
j. New application variable, rl_completion_suppress_quote, settable by an |
| 1483 |
application completion function. If set to non-zero, readline does not |
| 1484 |
attempt to append a closing quote to a completed word. |
| 1485 |
|
| 1486 |
k. New application variable, rl_completion_found_quote, set to a non-zero |
| 1487 |
value if readline determines that the word to be completed is quoted. |
| 1488 |
Set before readline calls any application completion function. |
| 1489 |
|
| 1490 |
l. New function hook, rl_completion_word_break_hook, called when readline |
| 1491 |
needs to break a line into words when completion is attempted. Allows |
| 1492 |
the word break characters to vary based on position in the line. |
| 1493 |
|
| 1494 |
m. New bindable command: unix-filename-rubout. Does the same thing as |
| 1495 |
unix-word-rubout, but adds `/' to the set of word delimiters. |
| 1496 |
|
| 1497 |
n. When listing completions, directories have a `/' appended if the |
| 1498 |
`mark-directories' option has been enabled. |
| 1499 |
|
| 1500 |
------------------------------------------------------------------------------- |
| 1501 |
This is a terse description of the new features added to bash-2.05b since |
| 1502 |
the release of bash-2.05a. As always, the manual page (doc/bash.1) is |
| 1503 |
the place to look for complete descriptions. |
| 1504 |
|
| 1505 |
1. New Features in Bash |
| 1506 |
|
| 1507 |
a. If set, TMOUT is the default timeout for the `read' builtin. |
| 1508 |
|
| 1509 |
b. `type' has two new options: `-f' suppresses shell function lookup, and |
| 1510 |
`-P' forces a $PATH search. |
| 1511 |
|
| 1512 |
c. New code to handle multibyte characters. |
| 1513 |
|
| 1514 |
d. `select' was changed to be more ksh-compatible, in that the menu is |
| 1515 |
reprinted each time through the loop only if REPLY is set to NULL. |
| 1516 |
The previous behavior is available as a compile-time option. |
| 1517 |
|
| 1518 |
e. `complete -d' and `complete -o dirnames' now force a slash to be |
| 1519 |
appended to names which are symlinks to directories. |
| 1520 |
|
| 1521 |
f. There is now a bindable edit-and-execute-command readline command, |
| 1522 |
like the vi-mode `v' command, bound to C-xC-e in emacs mode. |
| 1523 |
|
| 1524 |
g. Added support for ksh93-like [:word:] character class in pattern matching. |
| 1525 |
|
| 1526 |
h. The $'...' quoting construct now expands \cX to Control-X. |
| 1527 |
|
| 1528 |
i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts |
| 1529 |
the result into the expanded prompt. |
| 1530 |
|
| 1531 |
j. The shell now performs arithmetic in the largest integer size the |
| 1532 |
machine supports (intmax_t), instead of long. |
| 1533 |
|
| 1534 |
k. If a numeric argument is supplied to one of the bash globbing completion |
| 1535 |
functions, a `*' is appended to the word before expansion is attempted. |
| 1536 |
|
| 1537 |
l. The bash globbing completion functions now allow completions to be listed |
| 1538 |
with double tabs or if `show-all-if-ambiguous' is set. |
| 1539 |
|
| 1540 |
m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses |
| 1541 |
readline's appending a space to the completed word. |
| 1542 |
|
| 1543 |
n. New `here-string' redirection operator: <<< word. |
| 1544 |
|
| 1545 |
o. When displaying variables, function attributes and definitions are shown |
| 1546 |
separately, allowing them to be re-used as input (attempting to re-use |
| 1547 |
the old output would result in syntax errors). |
| 1548 |
|
| 1549 |
p. There is a new configuration option `--enable-mem-scramble', controls |
| 1550 |
bash malloc behavior of writing garbage characters into memory at |
| 1551 |
allocation and free time. |
| 1552 |
|
| 1553 |
q. The `complete' and `compgen' builtins now have a new `-s/-A service' |
| 1554 |
option to complete on names from /etc/services. |
| 1555 |
|
| 1556 |
r. `read' has a new `-u fd' option to read from a specified file descriptor. |
| 1557 |
|
| 1558 |
s. Fix the completion code so that expansion errors in a directory name |
| 1559 |
don't cause a longjmp back to the command loop. |
| 1560 |
|
| 1561 |
t. Fixed word completion inside command substitution to work a little more |
| 1562 |
intuitively. |
| 1563 |
|
| 1564 |
u. The `printf' %q format specifier now uses $'...' quoting to print the |
| 1565 |
argument if it contains non-printing characters. |
| 1566 |
|
| 1567 |
v. The `declare' and `typeset' builtins have a new `-t' option. When applied |
| 1568 |
to functions, it causes the DEBUG trap to be inherited by the named |
| 1569 |
function. Currently has no effect on variables. |
| 1570 |
|
| 1571 |
w. The DEBUG trap is now run *before* simple commands, ((...)) commands, |
| 1572 |
[[...]] conditional commands, and for ((...)) loops. |
| 1573 |
|
| 1574 |
x. The expansion of $LINENO inside a shell function is only relative to the |
| 1575 |
function start if the shell is interactive -- if the shell is running a |
| 1576 |
script, $LINENO expands to the line number in the script. This is as |
| 1577 |
POSIX-2001 requires. |
| 1578 |
|
| 1579 |
y. The bash debugger in examples/bashdb has been modified to work with the |
| 1580 |
new DEBUG trap semantics, the command set has been made more gdb-like, |
| 1581 |
and the changes to $LINENO make debugging functions work better. Code |
| 1582 |
from Gary Vaughan. |
| 1583 |
|
| 1584 |
z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup |
| 1585 |
and close). |
| 1586 |
|
| 1587 |
aa. There is a new `-l' invocation option, equivalent to `--login'. |
| 1588 |
|
| 1589 |
bb. The `hash' builtin has a new `-l' option to list contents in a reusable |
| 1590 |
format, and a `-d' option to remove a name from the hash table. |
| 1591 |
|
| 1592 |
cc. There is now support for placing the long help text into separate files |
| 1593 |
installed into ${datadir}/bash. Not enabled by default; can be turned |
| 1594 |
on with `--enable-separate-helpfiles' option to configure. |
| 1595 |
|
| 1596 |
dd. All builtins that take operands accept a `--' pseudo-option, except |
| 1597 |
`echo'. |
| 1598 |
|
| 1599 |
ee. The `echo' builtin now accepts \0xxx (zero to three octal digits following |
| 1600 |
the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/ |
| 1601 |
POSIX.1-2001 compliance. |
| 1602 |
|
| 1603 |
|
| 1604 |
2. New Features in Readline |
| 1605 |
|
| 1606 |
a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both |
| 1607 |
be bound to readline functions. Now the arrow keys may be used in vi |
| 1608 |
insert mode. |
| 1609 |
|
| 1610 |
b. When listing completions, and the number of lines displayed is more than |
| 1611 |
the screen length, readline uses an internal pager to display the results. |
| 1612 |
This is controlled by the `page-completions' variable (default on). |
| 1613 |
|
| 1614 |
c. New code to handle editing and displaying multibyte characters. |
| 1615 |
|
| 1616 |
d. The behavior introduced in bash-2.05a of deciding whether or not to |
| 1617 |
append a slash to a completed name that is a symlink to a directory has |
| 1618 |
been made optional, controlled by the `mark-symlinked-directories' |
| 1619 |
variable (default is the 2.05a behavior). |
| 1620 |
|
| 1621 |
e. The `insert-comment' command now acts as a toggle if given a numeric |
| 1622 |
argument: if the first characters on the line don't specify a |
| 1623 |
comment, insert one; if they do, delete the comment text |
| 1624 |
|
| 1625 |
f. New application-settable completion variable: |
| 1626 |
rl_completion_mark_symlink_dirs, allows an application's completion |
| 1627 |
function to temporarily override the user's preference for appending |
| 1628 |
slashes to names which are symlinks to directories. |
| 1629 |
|
| 1630 |
g. New function available to application completion functions: |
| 1631 |
rl_completion_mode, to tell how the completion function was invoked |
| 1632 |
and decide which argument to supply to rl_complete_internal (to list |
| 1633 |
completions, etc.). |
| 1634 |
|
| 1635 |
h. Readline now has an overwrite mode, toggled by the `overwrite-mode' |
| 1636 |
bindable command, which could be bound to `Insert'. |
| 1637 |
|
| 1638 |
i. New application-settable completion variable: |
| 1639 |
rl_completion_suppress_append, inhibits appending of |
| 1640 |
rl_completion_append_character to completed words. |
| 1641 |
|
| 1642 |
j. New key bindings when reading an incremental search string: ^W yanks |
| 1643 |
the currently-matched word out of the current line into the search |
| 1644 |
string; ^Y yanks the rest of the current line into the search string, |
| 1645 |
DEL or ^H deletes characters from the search string. |
| 1646 |
|
| 1647 |
------------------------------------------------------------------------------- |
| 1648 |
This is a terse description of the new features added to bash-2.05a since |
| 1649 |
the release of bash-2.05. As always, the manual page (doc/bash.1) is |
| 1650 |
the place to look for complete descriptions. |
| 1651 |
|
| 1652 |
1. New Features in Bash |
| 1653 |
|
| 1654 |
a. Added support for DESTDIR installation root prefix, so you can do a |
| 1655 |
`make install DESTDIR=bash-root' and do easier binary packaging. |
| 1656 |
|
| 1657 |
b. Added support for builtin printf "'" flag character as per latest POSIX |
| 1658 |
drafts. |
| 1659 |
|
| 1660 |
c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from |
| 1661 |
ISO C99). |
| 1662 |
|
| 1663 |
d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications |
| 1664 |
(bash doesn't use very much of what it returns). |
| 1665 |
|
| 1666 |
e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts, |
| 1667 |
but ignored. |
| 1668 |
|
| 1669 |
f. New read-only `shopt' option: login_shell. Set to non-zero value if the |
| 1670 |
shell is a login shell. |
| 1671 |
|
| 1672 |
g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format. |
| 1673 |
|
| 1674 |
h. New `-A group/-g' option to complete and compgen; does group name |
| 1675 |
completion. |
| 1676 |
|
| 1677 |
i. New `-t' option to `hash' to list hash values for each filename argument. |
| 1678 |
|
| 1679 |
j. New [-+]O invocation option to set and unset `shopt' options at startup. |
| 1680 |
|
| 1681 |
k. configure's `--with-installed-readline' option now takes an optional |
| 1682 |
`=PATH' suffix to set the root of the tree where readline is installed |
| 1683 |
to PATH. |
| 1684 |
|
| 1685 |
l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run |
| 1686 |
whenever the shell would have exited if the -e option were enabled. |
| 1687 |
It is not inherited by shell functions. |
| 1688 |
|
| 1689 |
m. `readonly', `export', and `declare' now print variables which have been |
| 1690 |
given attributes but not set by assigning a value as just a command and |
| 1691 |
a variable name (like `export foo') when listing, as the latest POSIX |
| 1692 |
drafts require. |
| 1693 |
|
| 1694 |
n. `bashbug' now requires that the subject be changed from the default. |
| 1695 |
|
| 1696 |
o. configure has a new `--enable-largefile' option, like other GNU utilities. |
| 1697 |
|
| 1698 |
p. `for' loops now allow empty word lists after `in', like the latest POSIX |
| 1699 |
drafts require. |
| 1700 |
|
| 1701 |
q. The builtin `ulimit' now takes two new non-numeric arguments: `hard', |
| 1702 |
meaning the current hard limit, and `soft', meaning the current soft |
| 1703 |
limit, in addition to `unlimited' |
| 1704 |
|
| 1705 |
r. `ulimit' now prints the option letter associated with a particular |
| 1706 |
resource when printing more than one limit. |
| 1707 |
|
| 1708 |
s. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is |
| 1709 |
one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively. |
| 1710 |
|
| 1711 |
t. The `printf' builtin now handles the %a and %A conversions if they're |
| 1712 |
implemented by printf(3). |
| 1713 |
|
| 1714 |
u. The `printf' builtin now handles the %F conversion (just about like %f). |
| 1715 |
|
| 1716 |
v. The `printf' builtin now handles the %n conversion like printf(3). The |
| 1717 |
corresponding argument is the name of a shell variable to which the |
| 1718 |
value is assigned. |
| 1719 |
|
| 1720 |
2. New Features in Readline |
| 1721 |
|
| 1722 |
a. Added extern declaration for rl_get_termcap to readline.h, making it a |
| 1723 |
public function (it was always there, just not in readline.h). |
| 1724 |
|
| 1725 |
b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402, |
| 1726 |
RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2. |
| 1727 |
|
| 1728 |
c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION. |
| 1729 |
|
| 1730 |
d. New bindable boolean readline variable: match-hidden-files. Controls |
| 1731 |
completion of files beginning with a `.' (on Unix). Enabled by default. |
| 1732 |
|
| 1733 |
e. The history expansion code now allows any character to terminate a |
| 1734 |
`:first-' modifier, like csh. |
| 1735 |
|
| 1736 |
f. New bindable variable `history-preserve-point'. If set, the history |
| 1737 |
code attempts to place the user at the same location on each history |
| 1738 |
line retrieved with previous-history or next-history. |
| 1739 |
|
| 1740 |
------------------------------------------------------------------------------- |
| 1741 |
This is a terse description of the new features added to bash-2.05 since |
| 1742 |
the release of bash-2.04. As always, the manual page (doc/bash.1) is |
| 1743 |
the place to look for complete descriptions. |
| 1744 |
|
| 1745 |
1. New Features in Bash |
| 1746 |
|
| 1747 |
a. Added a new `--init-file' invocation argument as a synonym for `--rcfile', |
| 1748 |
per the new GNU coding standards. |
| 1749 |
|
| 1750 |
b. The /dev/tcp and /dev/udp redirections now accept service names as well as |
| 1751 |
port numbers. |
| 1752 |
|
| 1753 |
c. `complete' and `compgen' now take a `-o value' option, which controls some |
| 1754 |
of the aspects of that compspec. Valid values are: |
| 1755 |
|
| 1756 |
default - perform bash default completion if programmable |
| 1757 |
completion produces no matches |
| 1758 |
dirnames - perform directory name completion if programmable |
| 1759 |
completion produces no matches |
| 1760 |
filenames - tell readline that the compspec produces filenames, |
| 1761 |
so it can do things like append slashes to |
| 1762 |
directory names and suppress trailing spaces |
| 1763 |
|
| 1764 |
d. A new loadable builtin, realpath, which canonicalizes and expands symlinks |
| 1765 |
in pathname arguments. |
| 1766 |
|
| 1767 |
e. When `set' is called without options, it prints function definitions in a |
| 1768 |
way that allows them to be reused as input. This affects `declare' and |
| 1769 |
`declare -p' as well. This only happens when the shell is not in POSIX |
| 1770 |
mode, since POSIX.2 forbids this behavior. |
| 1771 |
|
| 1772 |
f. Bash-2.05 once again honors the current locale setting when processing |
| 1773 |
ranges within pattern matching bracket expressions (e.g., [A-Z]). |
| 1774 |
|
| 1775 |
2. New Features in Readline |
| 1776 |
|
| 1777 |
a. The blink timeout for paren matching is now settable by applications, |
| 1778 |
via the rl_set_paren_blink_timeout() function. |
| 1779 |
|
| 1780 |
b. _rl_executing_macro has been renamed to rl_executing_macro, which means |
| 1781 |
it's now part of the public interface. |
| 1782 |
|
| 1783 |
c. Readline has a new variable, rl_readline_state, which is a bitmap that |
| 1784 |
encapsulates the current state of the library; intended for use by |
| 1785 |
callbacks and hook functions. |
| 1786 |
|
| 1787 |
d. New application-callable function rl_set_prompt(const char *prompt): |
| 1788 |
expands its prompt string argument and sets rl_prompt to the result. |
| 1789 |
|
| 1790 |
e. New application-callable function rl_set_screen_size(int rows, int cols): |
| 1791 |
public method for applications to set readline's idea of the screen |
| 1792 |
dimensions. |
| 1793 |
|
| 1794 |
f. New function, rl_get_screen_size (int *rows, int *columns), returns |
| 1795 |
readline's idea of the screen dimensions. |
| 1796 |
|
| 1797 |
g. The timeout in rl_gather_tyi (readline keyboard input polling function) |
| 1798 |
is now settable via a function (rl_set_keyboard_input_timeout()). |
| 1799 |
|
| 1800 |
h. Renamed the max_input_history variable to history_max_entries; the old |
| 1801 |
variable is maintained for backwards compatibility. |
| 1802 |
|
| 1803 |
i. The list of characters that separate words for the history tokenizer is |
| 1804 |
now settable with a variable: history_word_delimiters. The default |
| 1805 |
value is as before. |
| 1806 |
|
| 1807 |
------------------------------------------------------------------------------- |
| 1808 |
This is a terse description of the new features added to bash-2.04 since |
| 1809 |
the release of bash-2.03. As always, the manual page (doc/bash.1) is |
| 1810 |
the place to look for complete descriptions. |
| 1811 |
|
| 1812 |
1. New Features in Bash |
| 1813 |
|
| 1814 |
a. The history builtin has a `-d offset' option to delete the history entry |
| 1815 |
at position `offset'. |
| 1816 |
|
| 1817 |
b. The prompt expansion code has two new escape sequences: \j, the number of |
| 1818 |
active jobs; and \l, the basename of the shell's tty device name. |
| 1819 |
|
| 1820 |
c. The `bind' builtin has a new `-x' option to bind key sequences to shell |
| 1821 |
commands. |
| 1822 |
|
| 1823 |
d. There is a new shell option, no_empty_command_completion, which, when |
| 1824 |
enabled, disables command completion when TAB is typed on an empty line. |
| 1825 |
|
| 1826 |
e. The `help' builtin has a `-s' option to just print a builtin's usage |
| 1827 |
synopsis. |
| 1828 |
|
| 1829 |
f. There are several new arithmetic operators: id++, id-- (variable |
| 1830 |
post-increment/decrement), ++id, --id (variable pre-increment/decrement), |
| 1831 |
expr1 , expr2 (comma operator). |
| 1832 |
|
| 1833 |
g. There is a new ksh-93 style arithmetic for command: |
| 1834 |
for ((expr1 ; expr2; expr3 )); do list; done |
| 1835 |
|
| 1836 |
h. The `read' builtin has a number of new options: |
| 1837 |
-t timeout only wait timeout seconds for input |
| 1838 |
-n nchars only read nchars from input instead of a full line |
| 1839 |
-d delim read until delim rather than newline |
| 1840 |
-s don't echo input chars as they are read |
| 1841 |
|
| 1842 |
i. The redirection code now handles several filenames specially: |
| 1843 |
/dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or |
| 1844 |
not they are present in the file system. |
| 1845 |
|
| 1846 |
j. The redirection code now recognizes pathnames of the form |
| 1847 |
/dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket |
| 1848 |
of the appropriate type to the specified port on the specified host. |
| 1849 |
|
| 1850 |
k. The ksh-93 ${!prefix*} expansion, which expands to the names of all |
| 1851 |
shell variables with prefix PREFIX, has been implemented. |
| 1852 |
|
| 1853 |
l. There is a new dynamic variable, FUNCNAME, which expands to the name of |
| 1854 |
a currently-executing function. Assignments to FUNCNAME have no effect. |
| 1855 |
|
| 1856 |
m. The GROUPS variable is no longer readonly; assignments to it are silently |
| 1857 |
discarded. This means it can be unset. |
| 1858 |
|
| 1859 |
n. A new programmable completion facility, with two new builtin commands: |
| 1860 |
complete and compgen. |
| 1861 |
|
| 1862 |
o. configure has a new option, `--enable-progcomp', to compile in the |
| 1863 |
programmable completion features (enabled by default). |
| 1864 |
|
| 1865 |
p. `shopt' has a new option, `progcomp', to enable and disable programmable |
| 1866 |
completion at runtime. |
| 1867 |
|
| 1868 |
q. Unsetting HOSTFILE now clears the list of hostnames used for completion. |
| 1869 |
|
| 1870 |
r. configure has a new option, `--enable-bash-malloc', replacing the old |
| 1871 |
`--with-gnu-malloc' (which is still present for backwards compatibility). |
| 1872 |
|
| 1873 |
s. There is a new manual page describing rbash, the restricted shell. |
| 1874 |
|
| 1875 |
t. `bashbug' has new `--help' and `--version' options. |
| 1876 |
|
| 1877 |
u. `shopt' has a new `xpg_echo' option, which controls the behavior of |
| 1878 |
`echo' with respect to backslash-escaped characters at runtime. |
| 1879 |
|
| 1880 |
v. If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the |
| 1881 |
startup files, even if they are not interactive. |
| 1882 |
|
| 1883 |
w. The LC_NUMERIC variable is now treated specially, and used to set the |
| 1884 |
LC_NUMERIC locale category for number formatting, e.g., when `printf' |
| 1885 |
displays floating-point numbers. |
| 1886 |
|
| 1887 |
2. New features in Readline |
| 1888 |
|
| 1889 |
a. Parentheses matching is now always compiled into readline, and enabled |
| 1890 |
or disabled when the value of the `blink-matching-paren' variable is |
| 1891 |
changed. |
| 1892 |
|
| 1893 |
b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename. |
| 1894 |
|
| 1895 |
c. MS-DOS systems now use ~/_history as the default history file. |
| 1896 |
|
| 1897 |
d. history-search-{forward,backward} now leave the point at the end of the |
| 1898 |
line when the string to search for is empty, like |
| 1899 |
{reverse,forward}-search-history. |
| 1900 |
|
| 1901 |
e. history-search-{forward,backward} now leave the last history line found |
| 1902 |
in the readline buffer if the second or subsequent search fails. |
| 1903 |
|
| 1904 |
f. New function for use by applications: rl_on_new_line_with_prompt, used |
| 1905 |
when an application displays the prompt itself before calling readline(). |
| 1906 |
|
| 1907 |
g. New variable for use by applications: rl_already_prompted. An application |
| 1908 |
that displays the prompt itself before calling readline() must set this to |
| 1909 |
a non-zero value. |
| 1910 |
|
| 1911 |
h. A new variable, rl_gnu_readline_p, always 1. The intent is that an |
| 1912 |
application can verify whether or not it is linked with the `real' |
| 1913 |
readline library or some substitute. |
| 1914 |
|
| 1915 |
------------------------------------------------------------------------------- |
| 1916 |
This is a terse description of the new features added to bash-2.03 since |
| 1917 |
the release of bash-2.02. As always, the manual page (doc/bash.1) is |
| 1918 |
the place to look for complete descriptions. |
| 1919 |
|
| 1920 |
1. New Features in Bash |
| 1921 |
|
| 1922 |
a. New `shopt' option, `restricted_shell', indicating whether or not the |
| 1923 |
shell was started in restricted mode, for use in startup files. |
| 1924 |
|
| 1925 |
b. Filename generation is now performed on the words between ( and ) in |
| 1926 |
array assignments (which it probably should have done all along). |
| 1927 |
|
| 1928 |
c. OLDPWD is now auto-exported, as POSIX.2 seems to require. |
| 1929 |
|
| 1930 |
d. ENV and BASH_ENV are read-only variables in a restricted shell. |
| 1931 |
|
| 1932 |
e. A change was made to the startup file code so that any shell begun with |
| 1933 |
the `--login' option, even non-interactive shells, will source the login |
| 1934 |
shell startup files. |
| 1935 |
|
| 1936 |
2. New Features in Readline |
| 1937 |
|
| 1938 |
a. Many changes to the signal handling: |
| 1939 |
o Readline now catches SIGQUIT and cleans up the tty before returning; |
| 1940 |
o A new variable, rl_catch_signals, is available to application writers |
| 1941 |
to indicate to readline whether or not it should install its own |
| 1942 |
signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, |
| 1943 |
SIGTTIN, and SIGTTOU; |
| 1944 |
o A new variable, rl_catch_sigwinch, is available to application |
| 1945 |
writers to indicate to readline whether or not it should install its |
| 1946 |
own signal handler for SIGWINCH, which will chain to the calling |
| 1947 |
applications's SIGWINCH handler, if one is installed; |
| 1948 |
o There is a new function, rl_free_line_state, for application signal |
| 1949 |
handlers to call to free up the state associated with the current |
| 1950 |
line after receiving a signal; |
| 1951 |
o There is a new function, rl_cleanup_after_signal, to clean up the |
| 1952 |
display and terminal state after receiving a signal; |
| 1953 |
o There is a new function, rl_reset_after_signal, to reinitialize the |
| 1954 |
terminal and display state after an application signal handler |
| 1955 |
returns and readline continues |
| 1956 |
|
| 1957 |
b. There is a new function, rl_resize_terminal, to reset readline's idea of |
| 1958 |
the screen size after a SIGWINCH. |
| 1959 |
|
| 1960 |
c. New public functions: rl_save_prompt and rl_restore_prompt. These were |
| 1961 |
previously private functions with a `_' prefix. |
| 1962 |
|
| 1963 |
d. New function hook: rl_pre_input_hook, called just before readline starts |
| 1964 |
reading input, after initialization. |
| 1965 |
|
| 1966 |
e. New function hook: rl_display_matches_hook, called when readline would |
| 1967 |
display the list of completion matches. The new function |
| 1968 |
rl_display_match_list is what readline uses internally, and is available |
| 1969 |
for use by application functions called via this hook. |
| 1970 |
|
| 1971 |
f. New bindable function, delete-char-or-list, like tcsh. |
| 1972 |
|
| 1973 |
g. A new variable, rl_erase_empty_line, which, if set by an application using |
| 1974 |
readline, will cause readline to erase, prompt and all, lines on which the |
| 1975 |
only thing typed was a newline. |
| 1976 |
|
| 1977 |
h. New bindable variable: `isearch-terminators'. |
| 1978 |
|
| 1979 |
i. New bindable function: `forward-backward-delete-char' (unbound by default). |
| 1980 |
|
| 1981 |
------------------------------------------------------------------------------- |
| 1982 |
This is a terse description of the new features added to bash-2.02 since |
| 1983 |
the release of bash-2.01.1. As always, the manual page (doc/bash.1) is |
| 1984 |
the place to look for complete descriptions. |
| 1985 |
|
| 1986 |
1. New Features in Bash |
| 1987 |
|
| 1988 |
a. A new version of malloc, based on the older GNU malloc, that has many |
| 1989 |
changes, is more page-based, is more conservative with memory usage, |
| 1990 |
and does not `orphan' large blocks when they are freed. |
| 1991 |
|
| 1992 |
b. A new version of gmalloc, based on the old GLIBC malloc, with many |
| 1993 |
changes and range checking included by default. |
| 1994 |
|
| 1995 |
c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic |
| 1996 |
Regular Expression matching, including character classes, collating |
| 1997 |
symbols, equivalence classes, and support for case-insensitive pattern |
| 1998 |
matching. |
| 1999 |
|
| 2000 |
d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been |
| 2001 |
implemented, controlled by a new `shopt' option, `extglob'. |
| 2002 |
|
| 2003 |
e. There is a new ksh-like `[[' compound command, which implements |
| 2004 |
extended `test' functionality. |
| 2005 |
|
| 2006 |
f. There is a new `printf' builtin, implemented according to the POSIX.2 |
| 2007 |
specification. |
| 2008 |
|
| 2009 |
g. There is a new feature for command substitution: $(< filename) now expands |
| 2010 |
to the contents of `filename', with any trailing newlines removed |
| 2011 |
(equivalent to $(cat filename)). |
| 2012 |
|
| 2013 |
h. There are new tilde prefixes which expand to directories from the |
| 2014 |
directory stack. |
| 2015 |
|
| 2016 |
i. There is a new `**' arithmetic operator to do exponentiation. |
| 2017 |
|
| 2018 |
j. There are new configuration options to control how bash is linked: |
| 2019 |
`--enable-profiling', to allow bash to be profiled with gprof, and |
| 2020 |
`--enable-static-link', to allow bash to be linked statically. |
| 2021 |
|
| 2022 |
k. There is a new configuration option, `--enable-cond-command', which |
| 2023 |
controls whether or not the `[[' command is included. It is on by |
| 2024 |
default. |
| 2025 |
|
| 2026 |
l. There is a new configuration option, `--enable-extended-glob', which |
| 2027 |
controls whether or not the ksh extended globbing feature is included. |
| 2028 |
It is enabled by default. |
| 2029 |
|
| 2030 |
m. There is a new configuration #define in config.h.top that, when enabled, |
| 2031 |
will cause all login shells to source /etc/profile and one of the user- |
| 2032 |
specific login shell startup files, whether or not the shell is |
| 2033 |
interactive. |
| 2034 |
|
| 2035 |
n. There is a new invocation option, `--dump-po-strings', to dump |
| 2036 |
a shell script's translatable strings ($"...") in GNU `po' format. |
| 2037 |
|
| 2038 |
o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive |
| 2039 |
pattern matching when globbing filenames and using the `case' construct. |
| 2040 |
|
| 2041 |
p. There is a new `shopt' option, `huponexit', which, when enabled, causes |
| 2042 |
the shell to send SIGHUP to all jobs when an interactive login shell |
| 2043 |
exits. |
| 2044 |
|
| 2045 |
q. `bind' has a new `-u' option, which takes a readline function name as an |
| 2046 |
argument and unbinds all key sequences bound to that function in a |
| 2047 |
specified keymap. |
| 2048 |
|
| 2049 |
r. `disown' now has `-a' and `-r' options, to limit operation to all jobs |
| 2050 |
and running jobs, respectively. |
| 2051 |
|
| 2052 |
s. The `shopt' `-p' option now causes output to be displayed in a reusable |
| 2053 |
format. |
| 2054 |
|
| 2055 |
t. `test' has a new `-N' option, which returns true if the filename argument |
| 2056 |
has been modified since it was last accessed. |
| 2057 |
|
| 2058 |
u. `umask' now has a `-p' option to print output in a reusable format. |
| 2059 |
|
| 2060 |
v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...' |
| 2061 |
translation code. It expands to the character whose ascii code is NNN |
| 2062 |
in hexadecimal. |
| 2063 |
|
| 2064 |
w. The prompt string expansion code has a new `\r' escape sequence. |
| 2065 |
|
| 2066 |
x. The shell may now be cross-compiled for the CYGWIN32 environment on |
| 2067 |
a Unix machine. |
| 2068 |
|
| 2069 |
2. New Features in Readline |
| 2070 |
|
| 2071 |
a. There is now an option for `iterative' yank-last-arg handline, so a user |
| 2072 |
can keep entering `M-.', yanking the last argument of successive history |
| 2073 |
lines. |
| 2074 |
|
| 2075 |
b. New variable, `print-completions-horizontally', which causes completion |
| 2076 |
matches to be displayed across the screen (like `ls -x') rather than up |
| 2077 |
and down the screen (like `ls'). |
| 2078 |
|
| 2079 |
c. New variable, `completion-ignore-case', which causes filename completion |
| 2080 |
and matching to be performed case-insensitively. |
| 2081 |
|
| 2082 |
d. There is a new bindable command, `magic-space', which causes history |
| 2083 |
expansion to be performed on the current readline buffer and a space to |
| 2084 |
be inserted into the result. |
| 2085 |
|
| 2086 |
e. There is a new bindable command, `menu-complete', which enables tcsh-like |
| 2087 |
menu completion (successive executions of menu-complete insert a single |
| 2088 |
completion match, cycling through the list of possible completions). |
| 2089 |
|
| 2090 |
f. There is a new bindable command, `paste-from-clipboard', for use on Win32 |
| 2091 |
systems, to insert the text from the Win32 clipboard into the editing |
| 2092 |
buffer. |
| 2093 |
|
| 2094 |
g. The key sequence translation code now understands printf-style backslash |
| 2095 |
escape sequences, including \NNN octal escapes. These escape sequences |
| 2096 |
may be used in key sequence definitions or macro values. |
| 2097 |
|
| 2098 |
h. An `$include' inputrc file parser directive has been added. |
| 2099 |
|
| 2100 |
------------------------------------------------------------------------------- |
| 2101 |
This is a terse description of the new features added to bash-2.01 since |
| 2102 |
the release of bash-2.0. As always, the manual page (doc/bash.1) is the |
| 2103 |
place to look for complete descriptions. |
| 2104 |
|
| 2105 |
1. New Features in Bash |
| 2106 |
|
| 2107 |
a. There is a new builtin array variable: GROUPS, the set of groups to which |
| 2108 |
the user belongs. This is used by the test suite. |
| 2109 |
|
| 2110 |
2. New Features in Readline |
| 2111 |
|
| 2112 |
a. If a key sequence bound to `universal-argument' is read while reading a |
| 2113 |
numeric argument started with `universal-argument', it terminates the |
| 2114 |
argument but is otherwise ignored. This provides a way to insert multiple |
| 2115 |
instances of a digit string, and is how GNU emacs does it. |
| 2116 |
|
| 2117 |
------------------------------------------------------------------------------- |
| 2118 |
This is a terse description of the new features added to bash-2.0 since |
| 2119 |
the release of bash-1.14.7. As always, the manual page (doc/bash.1) is |
| 2120 |
the place to look for complete descriptions. |
| 2121 |
|
| 2122 |
1. New Features in Bash |
| 2123 |
|
| 2124 |
a. There is a new invocation option, -D, that dumps translatable strings |
| 2125 |
in a script. |
| 2126 |
|
| 2127 |
b. The `long' invocation options must now be prefixed with `--'. |
| 2128 |
|
| 2129 |
c. New long invocation options: --dump-strings, --help, --verbose |
| 2130 |
|
| 2131 |
d. The `nolineediting' invocation option was renamed to `noediting'. |
| 2132 |
|
| 2133 |
e. The `nobraceexpansion' and `quiet' long invocation options were removed. |
| 2134 |
|
| 2135 |
f. The `--help' and `--version' long options now work as the GNU coding |
| 2136 |
standards specify. |
| 2137 |
|
| 2138 |
g. If invoked as `sh', bash now enters posix mode after reading the |
| 2139 |
startup files, and reads and executes commands from the file named |
| 2140 |
by $ENV if interactive (as POSIX.2 specifies). A login shell invoked |
| 2141 |
as `sh' reads $ENV after /etc/profile and ~/.profile. |
| 2142 |
|
| 2143 |
h. There is a new reserved word, `time', for timing pipelines, builtin |
| 2144 |
commands, and shell functions. It uses the value of the TIMEFORMAT |
| 2145 |
variable as a format string describing how to print the timing |
| 2146 |
statistics. |
| 2147 |
|
| 2148 |
i. The $'...' quoting syntax expands ANSI-C escapes in ... and leaves the |
| 2149 |
result single-quoted. |
| 2150 |
|
| 2151 |
j. The $"..." quoting syntax performs locale-specific translation of ... |
| 2152 |
and leaves the result double-quoted. |
| 2153 |
|
| 2154 |
k. LINENO now works correctly in functions. |
| 2155 |
|
| 2156 |
l. New variables: DIRSTACK, PIPESTATUS, BASH_VERSINFO, HOSTNAME, SHELLOPTS, |
| 2157 |
MACHTYPE. The first three are array variables. |
| 2158 |
|
| 2159 |
m. The BASH_VERSION and BASH_VERSINFO variables now include the shell's |
| 2160 |
`release status' (alpha[N], beta[N], release). |
| 2161 |
|
| 2162 |
n. Some variables have been removed: MAIL_WARNING, notify, history_control, |
| 2163 |
command_oriented_history, glob_dot_filenames, allow_null_glob_expansion, |
| 2164 |
nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and |
| 2165 |
cdable_vars. Most of them are now implemented with the new `shopt' |
| 2166 |
builtin; others were already implemented by `set'. |
| 2167 |
|
| 2168 |
o. Bash now uses some new variables: LC_ALL, LC_MESSAGES, LC_CTYPE, |
| 2169 |
LC_COLLATE, LANG, GLOBIGNORE, HISTIGNORE. |
| 2170 |
|
| 2171 |
p. The shell now supports integer-indexed arrays of unlimited length, |
| 2172 |
with a new compound assignment syntax and changes to the appropriate |
| 2173 |
builtin commands (declare/typeset, read, readonly, etc.). The array |
| 2174 |
index may be an arithmetic expression. |
| 2175 |
|
| 2176 |
q. ${!var}: indirect variable expansion, equivalent to eval \${$var}. |
| 2177 |
|
| 2178 |
r. ${parameter:offset[:length]}: variable substring extraction. |
| 2179 |
|
| 2180 |
s. ${parameter/pattern[/[/]string]}: variable pattern substitution. |
| 2181 |
|
| 2182 |
t. The $[...] arithmetic expansion syntax is no longer supported, in |
| 2183 |
favor of $((...)). |
| 2184 |
|
| 2185 |
u. Aliases can now be expanded in shell scripts with a shell option |
| 2186 |
(shopt expand_aliases). |
| 2187 |
|
| 2188 |
v. History and history expansion can now be used in scripts with |
| 2189 |
set -o history and set -H. |
| 2190 |
|
| 2191 |
w. All builtins now return an exit status of 2 for incorrect usage. |
| 2192 |
|
| 2193 |
x. Interactive shells resend SIGHUP to all running or stopped children |
| 2194 |
if (and only if) they exit due to a SIGHUP. |
| 2195 |
|
| 2196 |
y. New prompting expansions: \a, \e, \H, \T, \@, \v, \V. |
| 2197 |
|
| 2198 |
z. Variable expansion in prompt strings is now controllable via a shell |
| 2199 |
option (shopt promptvars). |
| 2200 |
|
| 2201 |
aa. Bash now defaults to using command-oriented history. |
| 2202 |
|
| 2203 |
bb. The history file ($HISTFILE) is now truncated to $HISTFILESIZE after |
| 2204 |
being written. |
| 2205 |
|
| 2206 |
cc. The POSIX.2 conditional arithmetic evaluation syntax (expr ? expr : expr) |
| 2207 |
has been implemented. |
| 2208 |
|
| 2209 |
dd. Each builtin now accepts `--' to signify the end of the options, except |
| 2210 |
as documented (echo, etc.). |
| 2211 |
|
| 2212 |
ee. All builtins use -p to display values in a re-readable format where |
| 2213 |
appropriate, except as documented (echo, type, etc.). |
| 2214 |
|
| 2215 |
ff. The `alias' builtin has a new -p option. |
| 2216 |
|
| 2217 |
gg. Changes to the `bind' builtin: |
| 2218 |
o has new options: -psPSVr. |
| 2219 |
o the `-d' option was renamed to `-p' |
| 2220 |
o the `-v' option now dumps variables; the old `-v' is now `-P' |
| 2221 |
|
| 2222 |
hh. The `bye' synonym for `exit' was removed. |
| 2223 |
|
| 2224 |
ii. The -L and -P options to `cd' and `pwd' have been documented. |
| 2225 |
|
| 2226 |
jj. The `cd' builtin now does spelling correction on the directory name |
| 2227 |
by default. This is settable with a shell option (shopt cdspell). |
| 2228 |
|
| 2229 |
kk. The `declare' builtin has new options: -a, -F, -p. |
| 2230 |
|
| 2231 |
ll. The `dirs' builtin has new options: -c, -p, -v. |
| 2232 |
|
| 2233 |
mm. The new `disown' builtin removes jobs from the shell's jobs table |
| 2234 |
or inhibits the resending of SIGHUP when the shell receives a |
| 2235 |
SIGHUP. |
| 2236 |
|
| 2237 |
nn. The `echo' builtin has a new escape character: \e. |
| 2238 |
|
| 2239 |
oo. The `enable' builtin can now load new builtins dynamically from shared |
| 2240 |
objects on systems with the dlopen/dlsym interface. There are a number |
| 2241 |
of examples in the examples/loadables directory. There are also |
| 2242 |
new options: -d, -f, -s, -p. |
| 2243 |
|
| 2244 |
pp. The `-all' option to `enable' was removed in favor of `-a'. |
| 2245 |
|
| 2246 |
qq. The `exec' builtin has new options: -l, -c, -a. |
| 2247 |
|
| 2248 |
rr. The `hash' builtin has a new option: -p. |
| 2249 |
|
| 2250 |
ss. The `history' builtin has new options: -c, -p, -s. |
| 2251 |
|
| 2252 |
tt. The `jobs' builtin has new options: -r, -s. |
| 2253 |
|
| 2254 |
uu. The `kill' builtin has new options: -n signum, -l signame. |
| 2255 |
|
| 2256 |
vv. The `pushd' and `popd' builtins have a new option: -n. |
| 2257 |
|
| 2258 |
ww. The `read' builtin has new options: -p prompt, -e, -a. |
| 2259 |
|
| 2260 |
xx. The `readonly' builtin has a new -a option, and the -n option was removed. |
| 2261 |
|
| 2262 |
yy. Changes to the `set' builtin: |
| 2263 |
o new options: -B, -o keyword, -o onecmd, -o history |
| 2264 |
o options removed: -l, -d, -o nohash |
| 2265 |
o options changed: +o, -h, -o hashall |
| 2266 |
o now displays variables in a format that can be re-read as input |
| 2267 |
|
| 2268 |
zz. The new `shopt' builtin controls shell optional behavior previously |
| 2269 |
done by setting and unsetting certain shell variables. |
| 2270 |
|
| 2271 |
aaa. The `test' builtin has new operators: -o option, s1 == s2, s1 < s2, |
| 2272 |
and s1 > s2, where s1 and s2 are strings. |
| 2273 |
|
| 2274 |
bbb. There is a new trap, DEBUG, executed after every simple command. |
| 2275 |
|
| 2276 |
ccc. The `trap' builtin has a new -p option. |
| 2277 |
|
| 2278 |
ddd. The `ulimit' builtin has a new -l option on 4.4BSD-based systems. |
| 2279 |
|
| 2280 |
eee. The PS1, PS2, PATH, and IFS variables may now be unset. |
| 2281 |
|
| 2282 |
fff. The restricted shell mode has been expanded and is now documented. |
| 2283 |
|
| 2284 |
ggg. Security improvements: |
| 2285 |
o functions are not imported from the environment if running setuid |
| 2286 |
or with -p |
| 2287 |
o no startup files are sourced if running setuid or with -p |
| 2288 |
|
| 2289 |
hhh. The documentation has been overhauled: the texinfo manual was |
| 2290 |
expanded, and HTML versions of the man page and texinfo manual |
| 2291 |
are included. |
| 2292 |
|
| 2293 |
iii. Changes to Posix mode: |
| 2294 |
o Command lookup now finds special builtins before shell functions. |
| 2295 |
o Failure of a special builtin causes a non-interactive shell to |
| 2296 |
exit. Failures are defined in the POSIX.2 specification. |
| 2297 |
o If the `cd' builtin finds a directory to change to using $CDPATH, |
| 2298 |
the value assigned to PWD when `cd' completes does not contain |
| 2299 |
any symbolic links. |
| 2300 |
o A non-interactive shell exits if a variable assignment error |
| 2301 |
occurs when no command name follows the assignment statements. |
| 2302 |
o A non-interactive shell exits if the iteration variable in a |
| 2303 |
`for' statement or the selection variable in a `select' statement |
| 2304 |
is read-only or another variable assignment error occurs. |
| 2305 |
o The `<>' redirection operator now opens a file for both stdin and |
| 2306 |
stdout by default, not just when in posix mode. |
| 2307 |
o Assignment statements preceding special builtins now persist in |
| 2308 |
the shell's environment when the builtin completes. |
| 2309 |
|
| 2310 |
Posix mode is now completely POSIX.2-compliant (modulo bugs). When |
| 2311 |
invoked as sh, bash should be completely POSIX.2-compliant. |
| 2312 |
|
| 2313 |
jjj. The default value of PS1 is now "\s-\v\$ ". |
| 2314 |
|
| 2315 |
kkk. The ksh-like ((...)) arithmetic command syntax has been implemented. |
| 2316 |
This is exactly equivalent to `let "..."'. |
| 2317 |
|
| 2318 |
lll. Integer constants have been extended to base 64. |
| 2319 |
|
| 2320 |
mmm. The `ulimit' builtin now sets both hard and soft limits and reports the |
| 2321 |
soft limit by default. |
| 2322 |
|
| 2323 |
2. New Features in Readline |
| 2324 |
|
| 2325 |
a. New variables: enable-keypad, input-meta (new name for meta-flag), |
| 2326 |
mark-directories, visible-stats (now documented), disable-completion, |
| 2327 |
comment-begin. |
| 2328 |
|
| 2329 |
b. New bindable commands: kill-region, copy-region-as-kill, |
| 2330 |
copy-backward-word, copy-forward-word, set-mark, exchange-point-and-mark, |
| 2331 |
character-search, character-search-backward, insert-comment, |
| 2332 |
glob-expand-word, glob-list-expansions, dump-variables, dump-macros. |
| 2333 |
|
| 2334 |
c. New emacs keybindings: delete-horizontal-space (M-\), |
| 2335 |
insert-completions (M-*), possible-completions (M-=). |
| 2336 |
|
| 2337 |
d. The history-search-backward and history-search-forward commands were |
| 2338 |
modified to be the same as previous-line and next-line if point is at |
| 2339 |
the start of the line. |
| 2340 |
|
| 2341 |
e. More file types are available for the visible-stats mode. |
| 2342 |
|
| 2343 |
3. Changes of interest in the Bash implementation |
| 2344 |
|
| 2345 |
a. There is a new autoconf-based configuration mechanism. |
| 2346 |
|
| 2347 |
b. More things have been moved from Posix mode to standard shell behavior. |
| 2348 |
|
| 2349 |
c. The trace output (set -x) now inserts quotes where necessary so it can |
| 2350 |
be reused as input. |
| 2351 |
|
| 2352 |
d. There is a compile-time option for a system-wide interactive shell |
| 2353 |
startup file (disabled by default). |
| 2354 |
|
| 2355 |
e. The YACC grammar is smaller and tighter, and all 66 shift-reduce |
| 2356 |
conflicts are gone. Several parsing bugs have been fixed. |
| 2357 |
|
| 2358 |
f. Builtin option parsing has been regularized (using internal_getopt()), |
| 2359 |
with the exception of `echo', `type', and `set'. |
| 2360 |
|
| 2361 |
g. Builtins now return standard usage messages constructed from the |
| 2362 |
`short doc' used by the help builtin. |
| 2363 |
|
| 2364 |
h. Completion now quotes using backslashes by default, but honors |
| 2365 |
user-supplied quotes. |
| 2366 |
|
| 2367 |
i. The GNU libc malloc is available as a configure-time option. |
| 2368 |
|
| 2369 |
j. There are more internationalization features; bash uses gettext if |
| 2370 |
it is available. The $"..." translation syntax uses the current |
| 2371 |
locale and gettext. |
| 2372 |
|
| 2373 |
k. There is better reporting of job termination when the shell is not |
| 2374 |
interactive. |
| 2375 |
|
| 2376 |
l. The shell is somewhat more efficient: it uses a little less memory and |
| 2377 |
makes fewer system calls. |
| 2378 |
|
| 2379 |
4. Changes of interest in the Readline implementation |
| 2380 |
|
| 2381 |
a. There is now support for readline `callback' functions. |
| 2382 |
|
| 2383 |
b. There is now support for user-supplied input, redisplay, and terminal |
| 2384 |
preparation functions. |
| 2385 |
|
| 2386 |
c. Most of the shell-specific code in readline has been generalized or |
| 2387 |
removed. |
| 2388 |
|
| 2389 |
d. Most of the annoying redisplay bugs have been fixed, notably the problems |
| 2390 |
with incremental search and excessive redrawing when special characters |
| 2391 |
appear in the prompt string. |
| 2392 |
|
| 2393 |
e. There are new library functions and variables available to application |
| 2394 |
writers, most having to do with completion and quoting. |
| 2395 |
|
| 2396 |
f. The NEWLINE character (^J) is now treated as a search terminator by the |
| 2397 |
incremental search functions. |
| 2398 |
------------------------------------------------------------------------------- |
| 2399 |
|
| 2400 |
Copying and distribution of this file, with or without modification, |
| 2401 |
are permitted in any medium without royalty provided the copyright |
| 2402 |
notice and this notice are preserved. This file is offered as-is, |
| 2403 |
without any warranty. |