| 1 | This is a terse description of the new features added to bash-3.1 since
|
|---|
| 2 | the release of bash-3.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. Bash now understands LC_TIME as a special variable so that time display
|
|---|
| 8 | tracks the current locale.
|
|---|
| 9 |
|
|---|
| 10 | b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created
|
|---|
| 11 | as `invisible' variables and may not be unset.
|
|---|
| 12 |
|
|---|
| 13 | c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't
|
|---|
| 14 | try to interpret any options at all, as POSIX requires.
|
|---|
| 15 |
|
|---|
| 16 | d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.
|
|---|
| 17 |
|
|---|
| 18 | e. Fixed vi-mode word completion and glob expansion to perform tilde
|
|---|
| 19 | expansion.
|
|---|
| 20 |
|
|---|
| 21 | f. The `**' mathematic exponentiation operator is now right-associative.
|
|---|
| 22 |
|
|---|
| 23 | g. The `ulimit' builtin has new options: -i (max number of pending signals),
|
|---|
| 24 | -q (max size of POSIX message queues), and -x (max number of file locks).
|
|---|
| 25 |
|
|---|
| 26 | h. A bare `%' once again expands to the current job when used as a job
|
|---|
| 27 | specifier.
|
|---|
| 28 |
|
|---|
| 29 | i. The `+=' assignment operator (append to the value of a string or array) is
|
|---|
| 30 | now supported for assignment statements and arguments to builtin commands
|
|---|
| 31 | that accept assignment statements.
|
|---|
| 32 |
|
|---|
| 33 | j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.
|
|---|
| 34 |
|
|---|
| 35 | k. The `gnu_errfmt' option is enabled automatically if the shell is running
|
|---|
| 36 | in an emacs terminal window.
|
|---|
| 37 |
|
|---|
| 38 | l. New configuration option: --single-help-strings. Causes long help text
|
|---|
| 39 | to be written as a single string; intended to ease translation.
|
|---|
| 40 |
|
|---|
| 41 | m. The COMP_WORDBREAKS variable now causes the list of word break characters
|
|---|
| 42 | to be emptied when the variable is unset.
|
|---|
| 43 |
|
|---|
| 44 | n. An unquoted expansion of $* when $IFS is empty now causes the positional
|
|---|
| 45 | parameters to be concatenated if the expansion doesn't undergo word
|
|---|
| 46 | splitting.
|
|---|
| 47 |
|
|---|
| 48 | o. Bash now inherits $_ from the environment if it appears there at startup.
|
|---|
| 49 |
|
|---|
| 50 | p. New shell option: nocasematch. If non-zero, shell pattern matching ignores
|
|---|
| 51 | case when used by `case' and `[[' commands.
|
|---|
| 52 |
|
|---|
| 53 | q. The `printf' builtin takes a new option: -v var. That causes the output
|
|---|
| 54 | to be placed into var instead of on stdout.
|
|---|
| 55 |
|
|---|
| 56 | r. By default, the shell no longer reports processes dying from SIGPIPE.
|
|---|
| 57 |
|
|---|
| 58 | s. Bash now sets the extern variable `environ' to the export environment it
|
|---|
| 59 | creates, so C library functions that call getenv() (and can't use the
|
|---|
| 60 | shell-provided replacement) get current values of environment variables.
|
|---|
| 61 |
|
|---|
| 62 | t. A new configuration option, `--enable-strict-posix-default', which will
|
|---|
| 63 | build bash to be POSIX conforming by default.
|
|---|
| 64 |
|
|---|
| 65 | u. If compiled for strict POSIX conformance, LINES and COLUMNS may now
|
|---|
| 66 | override the true terminal size.
|
|---|
| 67 |
|
|---|
| 68 | 2. New Features in Readline
|
|---|
| 69 |
|
|---|
| 70 | a. The key sequence sent by the keypad `delete' key is now automatically
|
|---|
| 71 | bound to delete-char.
|
|---|
| 72 |
|
|---|
| 73 | b. A negative argument to menu-complete now cycles backward through the
|
|---|
| 74 | completion list.
|
|---|
| 75 |
|
|---|
| 76 | c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
|
|---|
| 77 | readline will bind the terminal special characters to their readline
|
|---|
| 78 | equivalents when it's called (on by default).
|
|---|
| 79 |
|
|---|
| 80 | d. New bindable command: vi-rubout. Saves deleted text for possible
|
|---|
| 81 | reinsertion, as with any vi-mode `text modification' command; `X' is bound
|
|---|
| 82 | to this in vi command mode.
|
|---|
| 83 |
|
|---|
| 84 | e. A new external application-controllable variable that allows the LINES
|
|---|
| 85 | and COLUMNS environment variables to set the window size regardless of
|
|---|
| 86 | what the kernel returns: rl_prefer_env_winsize
|
|---|
| 87 |
|
|---|
| 88 | -------------------------------------------------------------------------------
|
|---|
| 89 | This is a terse description of the new features added to bash-3.0 since
|
|---|
| 90 | the release of bash-2.05b. As always, the manual page (doc/bash.1) is
|
|---|
| 91 | the place to look for complete descriptions.
|
|---|
| 92 |
|
|---|
| 93 | 1. New Features in Bash
|
|---|
| 94 |
|
|---|
| 95 | a. ANSI string expansion now implements the \x{hexdigits} escape.
|
|---|
| 96 |
|
|---|
| 97 | b. There is a new loadable `strftime' builtin.
|
|---|
| 98 |
|
|---|
| 99 | c. New variable, COMP_WORDBREAKS, which controls the readline completer's
|
|---|
| 100 | idea of word break characters.
|
|---|
| 101 |
|
|---|
| 102 | d. The `type' builtin no longer reports on aliases unless alias expansion
|
|---|
| 103 | will actually be performed.
|
|---|
| 104 |
|
|---|
| 105 | e. HISTCONTROL is now a colon-separated list of values, which permits
|
|---|
| 106 | more extensibility and backwards compatibility.
|
|---|
| 107 |
|
|---|
| 108 | f. HISTCONTROL may now include the `erasedups' option, which causes all lines
|
|---|
| 109 | matching a line being added to be removed from the history list.
|
|---|
| 110 |
|
|---|
| 111 | g. `configure' has a new `--enable-multibyte' argument that permits multibyte
|
|---|
| 112 | character support to be disabled even on systems that support it.
|
|---|
| 113 |
|
|---|
| 114 | h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
|
|---|
| 115 | BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
|
|---|
| 116 | BASH_COMMAND
|
|---|
| 117 |
|
|---|
| 118 | i. FUNCNAME has been changed to support the debugger: it's now an array
|
|---|
| 119 | variable.
|
|---|
| 120 |
|
|---|
| 121 | j. for, case, select, arithmetic commands now keep line number information
|
|---|
| 122 | for the debugger.
|
|---|
| 123 |
|
|---|
| 124 | k. There is a new `RETURN' trap executed when a function or sourced script
|
|---|
| 125 | returns (not inherited child processes; inherited by command substitution
|
|---|
| 126 | if function tracing is enabled and the debugger is active).
|
|---|
| 127 |
|
|---|
| 128 | l. New invocation option: --debugger. Enables debugging and turns on new
|
|---|
| 129 | `extdebug' shell option.
|
|---|
| 130 |
|
|---|
| 131 | m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR
|
|---|
| 132 | traps, respectively, to be inherited by shell functions. Equivalent to
|
|---|
| 133 | `set -T' and `set -E' respectively. The `functrace' option also controls
|
|---|
| 134 | whether or not the DEBUG trap is inherited by sourced scripts.
|
|---|
| 135 |
|
|---|
| 136 | n. The DEBUG trap is run before binding the variable and running the action
|
|---|
| 137 | list in a `for' command, binding the selection variable and running the
|
|---|
| 138 | query in a `select' command, and before attempting a match in a `case'
|
|---|
| 139 | command.
|
|---|
| 140 |
|
|---|
| 141 | o. New `--enable-debugger' option to `configure' to compile in the debugger
|
|---|
| 142 | support code.
|
|---|
| 143 |
|
|---|
| 144 | p. `declare -F' now prints out extra line number and source file information
|
|---|
| 145 | if the `extdebug' option is set.
|
|---|
| 146 |
|
|---|
| 147 | q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes
|
|---|
| 148 | the next command to be skipped, and a return value of 2 while in a
|
|---|
| 149 | function or sourced script forces a `return'.
|
|---|
| 150 |
|
|---|
| 151 | r. New `caller' builtin to provide a call stack for the bash debugger.
|
|---|
| 152 |
|
|---|
| 153 | s. The DEBUG trap is run just before the first command in a function body is
|
|---|
| 154 | executed, for the debugger.
|
|---|
| 155 |
|
|---|
| 156 | t. `for', `select', and `case' command heads are printed when `set -x' is
|
|---|
| 157 | enabled.
|
|---|
| 158 |
|
|---|
| 159 | u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1,
|
|---|
| 160 | x+2,...,y}. x and y can be integers or single characters; the sequence
|
|---|
| 161 | may ascend or descend; the increment is always 1.
|
|---|
| 162 |
|
|---|
| 163 | v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
|
|---|
| 164 | of array.
|
|---|
| 165 |
|
|---|
| 166 | w. New `force_fignore' shopt option; if enabled, suffixes specified by
|
|---|
| 167 | FIGNORE cause words to be ignored when performing word completion even
|
|---|
| 168 | if they're the only possibilities.
|
|---|
| 169 |
|
|---|
| 170 | x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
|
|---|
| 171 | style' (filename:lineno:message) format.
|
|---|
| 172 |
|
|---|
| 173 | y. New `-o bashdefault' option to complete and compgen; if set, causes the
|
|---|
| 174 | whole set of bash completions to be performed if the compspec doesn't
|
|---|
| 175 | result in a match.
|
|---|
| 176 |
|
|---|
| 177 | z. New `-o plusdirs' option to complete and compgen; if set, causes directory
|
|---|
| 178 | name completion to be performed and the results added to the rest of the
|
|---|
| 179 | possible completions.
|
|---|
| 180 |
|
|---|
| 181 | aa. `kill' is available as a builtin even when the shell is built without
|
|---|
| 182 | job control.
|
|---|
| 183 |
|
|---|
| 184 | bb. New HISTTIMEFORMAT variable; value is a format string to pass to
|
|---|
| 185 | strftime(3). If set and not null, the `history' builtin prints out
|
|---|
| 186 | timestamp information according to the specified format when displaying
|
|---|
| 187 | history entries. If set, bash tells the history library to write out
|
|---|
| 188 | timestamp information when the history file is written.
|
|---|
| 189 |
|
|---|
| 190 | cc. The [[ ... ]] command has a new binary `=~' operator that performs
|
|---|
| 191 | extended regular expression (egrep-like) matching.
|
|---|
| 192 |
|
|---|
| 193 | dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
|
|---|
| 194 | to enable the =~ operator and regexp matching in [[ ... ]].
|
|---|
| 195 |
|
|---|
| 196 | ee. Subexpressions matched by the =~ operator are placed in the new
|
|---|
| 197 | BASH_REMATCH array variable.
|
|---|
| 198 |
|
|---|
| 199 | ff. New `failglob' option that causes an expansion error when pathname
|
|---|
| 200 | expansion fails to produce a match.
|
|---|
| 201 |
|
|---|
| 202 | gg. New `set -o pipefail' option that causes a pipeline to return a failure
|
|---|
| 203 | status if any of the processes in the pipeline fail, not just the last
|
|---|
| 204 | one.
|
|---|
| 205 |
|
|---|
| 206 | hh. printf builtin understands two new escape sequences: \" and \?.
|
|---|
| 207 |
|
|---|
| 208 | ii. `echo -e' understands two new escape sequences: \" and \?.
|
|---|
| 209 |
|
|---|
| 210 | jj. The GNU `gettext' package and libintl have been integrated; the shell's
|
|---|
| 211 | messages can be translated into different languages.
|
|---|
| 212 |
|
|---|
| 213 | kk. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.
|
|---|
| 214 |
|
|---|
| 215 | ll. The error message printed when bash cannot open a shell script supplied
|
|---|
| 216 | as argument 1 now includes the name of the shell, to better identify
|
|---|
| 217 | the error as coming from bash.
|
|---|
| 218 |
|
|---|
| 219 | mm. The parameter pattern removal and substitution expansions are now much
|
|---|
| 220 | faster and more efficient when using multibyte characters.
|
|---|
| 221 |
|
|---|
| 222 | nn. The `jobs', `kill', and `wait' builtins now accept job control notation
|
|---|
| 223 | even if job control is not enabled.
|
|---|
| 224 |
|
|---|
| 225 | oo. The historical behavior of `trap' that allows a missing `action' argument
|
|---|
| 226 | to cause each specified signal's handling to be reset to its default is
|
|---|
| 227 | now only supported when `trap' is given a single non-option argument.
|
|---|
| 228 |
|
|---|
| 229 | 2. New Features in Readline
|
|---|
| 230 |
|
|---|
| 231 | a. History expansion has a new `a' modifier equivalent to the `g' modifier
|
|---|
| 232 | for compatibility with the BSD csh.
|
|---|
| 233 |
|
|---|
| 234 | b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
|
|---|
| 235 | modifier, which performs a substitution once per word.
|
|---|
| 236 |
|
|---|
| 237 | c. All non-incremental search operations may now undo the operation of
|
|---|
| 238 | replacing the current line with the history line.
|
|---|
| 239 |
|
|---|
| 240 | d. The text inserted by an `a' command in vi mode can be reinserted with
|
|---|
| 241 | `.'.
|
|---|
| 242 |
|
|---|
| 243 | e. New bindable variable, `show-all-if-unmodified'. If set, the readline
|
|---|
| 244 | completer will list possible completions immediately if there is more
|
|---|
| 245 | than one completion and partial completion cannot be performed.
|
|---|
| 246 |
|
|---|
| 247 | f. There is a new application-callable `free_history_entry()' function.
|
|---|
| 248 |
|
|---|
| 249 | g. History list entries now contain timestamp information; the history file
|
|---|
| 250 | functions know how to read and write timestamp information associated
|
|---|
| 251 | with each entry.
|
|---|
| 252 |
|
|---|
| 253 | h. Four new key binding functions have been added:
|
|---|
| 254 |
|
|---|
| 255 | rl_bind_key_if_unbound()
|
|---|
| 256 | rl_bind_key_if_unbound_in_map()
|
|---|
| 257 | rl_bind_keyseq_if_unbound()
|
|---|
| 258 | rl_bind_keyseq_if_unbound_in_map()
|
|---|
| 259 |
|
|---|
| 260 | i. New application variable, rl_completion_quote_character, set to any
|
|---|
| 261 | quote character readline finds before it calls the application completion
|
|---|
| 262 | function.
|
|---|
| 263 |
|
|---|
| 264 | j. New application variable, rl_completion_suppress_quote, settable by an
|
|---|
| 265 | application completion function. If set to non-zero, readline does not
|
|---|
| 266 | attempt to append a closing quote to a completed word.
|
|---|
| 267 |
|
|---|
| 268 | k. New application variable, rl_completion_found_quote, set to a non-zero
|
|---|
| 269 | value if readline determines that the word to be completed is quoted.
|
|---|
| 270 | Set before readline calls any application completion function.
|
|---|
| 271 |
|
|---|
| 272 | l. New function hook, rl_completion_word_break_hook, called when readline
|
|---|
| 273 | needs to break a line into words when completion is attempted. Allows
|
|---|
| 274 | the word break characters to vary based on position in the line.
|
|---|
| 275 |
|
|---|
| 276 | m. New bindable command: unix-filename-rubout. Does the same thing as
|
|---|
| 277 | unix-word-rubout, but adds `/' to the set of word delimiters.
|
|---|
| 278 |
|
|---|
| 279 | n. When listing completions, directories have a `/' appended if the
|
|---|
| 280 | `mark-directories' option has been enabled.
|
|---|
| 281 |
|
|---|
| 282 | -------------------------------------------------------------------------------
|
|---|
| 283 | This is a terse description of the new features added to bash-2.05b since
|
|---|
| 284 | the release of bash-2.05a. As always, the manual page (doc/bash.1) is
|
|---|
| 285 | the place to look for complete descriptions.
|
|---|
| 286 |
|
|---|
| 287 | 1. New Features in Bash
|
|---|
| 288 |
|
|---|
| 289 | a. If set, TMOUT is the default timeout for the `read' builtin.
|
|---|
| 290 |
|
|---|
| 291 | b. `type' has two new options: `-f' suppresses shell function lookup, and
|
|---|
| 292 | `-P' forces a $PATH search.
|
|---|
| 293 |
|
|---|
| 294 | c. New code to handle multibyte characters.
|
|---|
| 295 |
|
|---|
| 296 | d. `select' was changed to be more ksh-compatible, in that the menu is
|
|---|
| 297 | reprinted each time through the loop only if REPLY is set to NULL.
|
|---|
| 298 | The previous behavior is available as a compile-time option.
|
|---|
| 299 |
|
|---|
| 300 | e. `complete -d' and `complete -o dirnames' now force a slash to be
|
|---|
| 301 | appended to names which are symlinks to directories.
|
|---|
| 302 |
|
|---|
| 303 | f. There is now a bindable edit-and-execute-command readline command,
|
|---|
| 304 | like the vi-mode `v' command, bound to C-xC-e in emacs mode.
|
|---|
| 305 |
|
|---|
| 306 | g. Added support for ksh93-like [:word:] character class in pattern matching.
|
|---|
| 307 |
|
|---|
| 308 | h. The $'...' quoting construct now expands \cX to Control-X.
|
|---|
| 309 |
|
|---|
| 310 | i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
|
|---|
| 311 | the result into the expanded prompt.
|
|---|
| 312 |
|
|---|
| 313 | j. The shell now performs arithmetic in the largest integer size the
|
|---|
| 314 | machine supports (intmax_t), instead of long.
|
|---|
| 315 |
|
|---|
| 316 | k. If a numeric argument is supplied to one of the bash globbing completion
|
|---|
| 317 | functions, a `*' is appended to the word before expansion is attempted.
|
|---|
| 318 |
|
|---|
| 319 | l. The bash globbing completion functions now allow completions to be listed
|
|---|
| 320 | with double tabs or if `show-all-if-ambiguous' is set.
|
|---|
| 321 |
|
|---|
| 322 | m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
|
|---|
| 323 | readline's appending a space to the completed word.
|
|---|
| 324 |
|
|---|
| 325 | n. New `here-string' redirection operator: <<< word.
|
|---|
| 326 |
|
|---|
| 327 | o. When displaying variables, function attributes and definitions are shown
|
|---|
| 328 | separately, allowing them to be re-used as input (attempting to re-use
|
|---|
| 329 | the old output would result in syntax errors).
|
|---|
| 330 |
|
|---|
| 331 | p. There is a new configuration option `--enable-mem-scramble', controls
|
|---|
| 332 | bash malloc behavior of writing garbage characters into memory at
|
|---|
| 333 | allocation and free time.
|
|---|
| 334 |
|
|---|
| 335 | q. The `complete' and `compgen' builtins now have a new `-s/-A service'
|
|---|
| 336 | option to complete on names from /etc/services.
|
|---|
| 337 |
|
|---|
| 338 | r. `read' has a new `-u fd' option to read from a specified file descriptor.
|
|---|
| 339 |
|
|---|
| 340 | s. Fix the completion code so that expansion errors in a directory name
|
|---|
| 341 | don't cause a longjmp back to the command loop.
|
|---|
| 342 |
|
|---|
| 343 | t. Fixed word completion inside command substitution to work a little more
|
|---|
| 344 | intuitively.
|
|---|
| 345 |
|
|---|
| 346 | u. The `printf' %q format specifier now uses $'...' quoting to print the
|
|---|
| 347 | argument if it contains non-printing characters.
|
|---|
| 348 |
|
|---|
| 349 | v. The `declare' and `typeset' builtins have a new `-t' option. When applied
|
|---|
| 350 | to functions, it causes the DEBUG trap to be inherited by the named
|
|---|
| 351 | function. Currently has no effect on variables.
|
|---|
| 352 |
|
|---|
| 353 | w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
|
|---|
| 354 | [[...]] conditional commands, and for ((...)) loops.
|
|---|
| 355 |
|
|---|
| 356 | x. The expansion of $LINENO inside a shell function is only relative to the
|
|---|
| 357 | function start if the shell is interactive -- if the shell is running a
|
|---|
| 358 | script, $LINENO expands to the line number in the script. This is as
|
|---|
| 359 | POSIX-2001 requires.
|
|---|
| 360 |
|
|---|
| 361 | y. The bash debugger in examples/bashdb has been modified to work with the
|
|---|
| 362 | new DEBUG trap semantics, the command set has been made more gdb-like,
|
|---|
| 363 | and the changes to $LINENO make debugging functions work better. Code
|
|---|
| 364 | from Gary Vaughan.
|
|---|
| 365 |
|
|---|
| 366 | z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
|
|---|
| 367 | and close).
|
|---|
| 368 |
|
|---|
| 369 | aa. There is a new `-l' invocation option, equivalent to `--login'.
|
|---|
| 370 |
|
|---|
| 371 | bb. The `hash' builtin has a new `-l' option to list contents in a reusable
|
|---|
| 372 | format, and a `-d' option to remove a name from the hash table.
|
|---|
| 373 |
|
|---|
| 374 | cc. There is now support for placing the long help text into separate files
|
|---|
| 375 | installed into ${datadir}/bash. Not enabled by default; can be turned
|
|---|
| 376 | on with `--enable-separate-helpfiles' option to configure.
|
|---|
| 377 |
|
|---|
| 378 | dd. All builtins that take operands accept a `--' pseudo-option, except
|
|---|
| 379 | `echo'.
|
|---|
| 380 |
|
|---|
| 381 | ee. The `echo' builtin now accepts \0xxx (zero to three octal digits following
|
|---|
| 382 | the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
|
|---|
| 383 | POSIX.1-2001 compliance.
|
|---|
| 384 |
|
|---|
| 385 |
|
|---|
| 386 | 2. New Features in Readline
|
|---|
| 387 |
|
|---|
| 388 | a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
|
|---|
| 389 | be bound to readline functions. Now the arrow keys may be used in vi
|
|---|
| 390 | insert mode.
|
|---|
| 391 |
|
|---|
| 392 | b. When listing completions, and the number of lines displayed is more than
|
|---|
| 393 | the screen length, readline uses an internal pager to display the results.
|
|---|
| 394 | This is controlled by the `page-completions' variable (default on).
|
|---|
| 395 |
|
|---|
| 396 | c. New code to handle editing and displaying multibyte characters.
|
|---|
| 397 |
|
|---|
| 398 | d. The behavior introduced in bash-2.05a of deciding whether or not to
|
|---|
| 399 | append a slash to a completed name that is a symlink to a directory has
|
|---|
| 400 | been made optional, controlled by the `mark-symlinked-directories'
|
|---|
| 401 | variable (default is the 2.05a behavior).
|
|---|
| 402 |
|
|---|
| 403 | e. The `insert-comment' command now acts as a toggle if given a numeric
|
|---|
| 404 | argument: if the first characters on the line don't specify a
|
|---|
| 405 | comment, insert one; if they do, delete the comment text
|
|---|
| 406 |
|
|---|
| 407 | f. New application-settable completion variable:
|
|---|
| 408 | rl_completion_mark_symlink_dirs, allows an application's completion
|
|---|
| 409 | function to temporarily override the user's preference for appending
|
|---|
| 410 | slashes to names which are symlinks to directories.
|
|---|
| 411 |
|
|---|
| 412 | g. New function available to application completion functions:
|
|---|
| 413 | rl_completion_mode, to tell how the completion function was invoked
|
|---|
| 414 | and decide which argument to supply to rl_complete_internal (to list
|
|---|
| 415 | completions, etc.).
|
|---|
| 416 |
|
|---|
| 417 | h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
|
|---|
| 418 | bindable command, which could be bound to `Insert'.
|
|---|
| 419 |
|
|---|
| 420 | i. New application-settable completion variable:
|
|---|
| 421 | rl_completion_suppress_append, inhibits appending of
|
|---|
| 422 | rl_completion_append_character to completed words.
|
|---|
| 423 |
|
|---|
| 424 | j. New key bindings when reading an incremental search string: ^W yanks
|
|---|
| 425 | the currently-matched word out of the current line into the search
|
|---|
| 426 | string; ^Y yanks the rest of the current line into the search string,
|
|---|
| 427 | DEL or ^H deletes characters from the search string.
|
|---|
| 428 |
|
|---|
| 429 | -------------------------------------------------------------------------------
|
|---|
| 430 | This is a terse description of the new features added to bash-2.05a since
|
|---|
| 431 | the release of bash-2.05. As always, the manual page (doc/bash.1) is
|
|---|
| 432 | the place to look for complete descriptions.
|
|---|
| 433 |
|
|---|
| 434 | 1. New Features in Bash
|
|---|
| 435 |
|
|---|
| 436 | a. Added support for DESTDIR installation root prefix, so you can do a
|
|---|
| 437 | `make install DESTDIR=bash-root' and do easier binary packaging.
|
|---|
| 438 |
|
|---|
| 439 | b. Added support for builtin printf "'" flag character as per latest POSIX
|
|---|
| 440 | drafts.
|
|---|
| 441 |
|
|---|
| 442 | c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
|
|---|
| 443 | ISO C99).
|
|---|
| 444 |
|
|---|
| 445 | d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
|
|---|
| 446 | (bash doesn't use very much of what it returns).
|
|---|
| 447 |
|
|---|
| 448 | e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
|
|---|
| 449 | but ignored.
|
|---|
| 450 |
|
|---|
| 451 | f. New read-only `shopt' option: login_shell. Set to non-zero value if the
|
|---|
| 452 | shell is a login shell.
|
|---|
| 453 |
|
|---|
| 454 | g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
|
|---|
| 455 |
|
|---|
| 456 | h. New `-A group/-g' option to complete and compgen; does group name
|
|---|
| 457 | completion.
|
|---|
| 458 |
|
|---|
| 459 | i. New `-t' option to `hash' to list hash values for each filename argument.
|
|---|
| 460 |
|
|---|
| 461 | j. New [-+]O invocation option to set and unset `shopt' options at startup.
|
|---|
| 462 |
|
|---|
| 463 | k. configure's `--with-installed-readline' option now takes an optional
|
|---|
| 464 | `=PATH' suffix to set the root of the tree where readline is installed
|
|---|
| 465 | to PATH.
|
|---|
| 466 |
|
|---|
| 467 | l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run
|
|---|
| 468 | whenever the shell would have exited if the -e option were enabled.
|
|---|
| 469 | It is not inherited by shell functions.
|
|---|
| 470 |
|
|---|
| 471 | m. `readonly', `export', and `declare' now print variables which have been
|
|---|
| 472 | given attributes but not set by assigning a value as just a command and
|
|---|
| 473 | a variable name (like `export foo') when listing, as the latest POSIX
|
|---|
| 474 | drafts require.
|
|---|
| 475 |
|
|---|
| 476 | n. `bashbug' now requires that the subject be changed from the default.
|
|---|
| 477 |
|
|---|
| 478 | o. configure has a new `--enable-largefile' option, like other GNU utilities.
|
|---|
| 479 |
|
|---|
| 480 | p. `for' loops now allow empty word lists after `in', like the latest POSIX
|
|---|
| 481 | drafts require.
|
|---|
| 482 |
|
|---|
| 483 | q. The builtin `ulimit' now takes two new non-numeric arguments: `hard',
|
|---|
| 484 | meaning the current hard limit, and `soft', meaning the current soft
|
|---|
| 485 | limit, in addition to `unlimited'
|
|---|
| 486 |
|
|---|
| 487 | r. `ulimit' now prints the option letter associated with a particular
|
|---|
| 488 | resource when printing more than one limit.
|
|---|
| 489 |
|
|---|
| 490 | s. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
|
|---|
| 491 | one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
|
|---|
| 492 |
|
|---|
| 493 | t. The `printf' builtin now handles the %a and %A conversions if they're
|
|---|
| 494 | implemented by printf(3).
|
|---|
| 495 |
|
|---|
| 496 | u. The `printf' builtin now handles the %F conversion (just about like %f).
|
|---|
| 497 |
|
|---|
| 498 | v. The `printf' builtin now handles the %n conversion like printf(3). The
|
|---|
| 499 | corresponding argument is the name of a shell variable to which the
|
|---|
| 500 | value is assigned.
|
|---|
| 501 |
|
|---|
| 502 | 2. New Features in Readline
|
|---|
| 503 |
|
|---|
| 504 | a. Added extern declaration for rl_get_termcap to readline.h, making it a
|
|---|
| 505 | public function (it was always there, just not in readline.h).
|
|---|
| 506 |
|
|---|
| 507 | b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
|
|---|
| 508 | RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
|
|---|
| 509 |
|
|---|
| 510 | c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
|
|---|
| 511 |
|
|---|
| 512 | d. New bindable boolean readline variable: match-hidden-files. Controls
|
|---|
| 513 | completion of files beginning with a `.' (on Unix). Enabled by default.
|
|---|
| 514 |
|
|---|
| 515 | e. The history expansion code now allows any character to terminate a
|
|---|
| 516 | `:first-' modifier, like csh.
|
|---|
| 517 |
|
|---|
| 518 | f. New bindable variable `history-preserve-point'. If set, the history
|
|---|
| 519 | code attempts to place the user at the same location on each history
|
|---|
| 520 | line retrived with previous-history or next-history.
|
|---|
| 521 |
|
|---|
| 522 | -------------------------------------------------------------------------------
|
|---|
| 523 | This is a terse description of the new features added to bash-2.05 since
|
|---|
| 524 | the release of bash-2.04. As always, the manual page (doc/bash.1) is
|
|---|
| 525 | the place to look for complete descriptions.
|
|---|
| 526 |
|
|---|
| 527 | 1. New Features in Bash
|
|---|
| 528 |
|
|---|
| 529 | a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
|
|---|
| 530 | per the new GNU coding standards.
|
|---|
| 531 |
|
|---|
| 532 | b. The /dev/tcp and /dev/udp redirections now accept service names as well as
|
|---|
| 533 | port numbers.
|
|---|
| 534 |
|
|---|
| 535 | c. `complete' and `compgen' now take a `-o value' option, which controls some
|
|---|
| 536 | of the aspects of that compspec. Valid values are:
|
|---|
| 537 |
|
|---|
| 538 | default - perform bash default completion if programmable
|
|---|
| 539 | completion produces no matches
|
|---|
| 540 | dirnames - perform directory name completion if programmable
|
|---|
| 541 | completion produces no matches
|
|---|
| 542 | filenames - tell readline that the compspec produces filenames,
|
|---|
| 543 | so it can do things like append slashes to
|
|---|
| 544 | directory names and suppress trailing spaces
|
|---|
| 545 |
|
|---|
| 546 | d. A new loadable builtin, realpath, which canonicalizes and expands symlinks
|
|---|
| 547 | in pathname arguments.
|
|---|
| 548 |
|
|---|
| 549 | e. When `set' is called without options, it prints function defintions in a
|
|---|
| 550 | way that allows them to be reused as input. This affects `declare' and
|
|---|
| 551 | `declare -p' as well. This only happens when the shell is not in POSIX
|
|---|
| 552 | mode, since POSIX.2 forbids this behavior.
|
|---|
| 553 |
|
|---|
| 554 | f. Bash-2.05 once again honors the current locale setting when processing
|
|---|
| 555 | ranges within pattern matching bracket expressions (e.g., [A-Z]).
|
|---|
| 556 |
|
|---|
| 557 | 2. New Features in Readline
|
|---|
| 558 |
|
|---|
| 559 | a. The blink timeout for paren matching is now settable by applications,
|
|---|
| 560 | via the rl_set_paren_blink_timeout() function.
|
|---|
| 561 |
|
|---|
| 562 | b. _rl_executing_macro has been renamed to rl_executing_macro, which means
|
|---|
| 563 | it's now part of the public interface.
|
|---|
| 564 |
|
|---|
| 565 | c. Readline has a new variable, rl_readline_state, which is a bitmap that
|
|---|
| 566 | encapsulates the current state of the library; intended for use by
|
|---|
| 567 | callbacks and hook functions.
|
|---|
| 568 |
|
|---|
| 569 | d. New application-callable function rl_set_prompt(const char *prompt):
|
|---|
| 570 | expands its prompt string argument and sets rl_prompt to the result.
|
|---|
| 571 |
|
|---|
| 572 | e. New application-callable function rl_set_screen_size(int rows, int cols):
|
|---|
| 573 | public method for applications to set readline's idea of the screen
|
|---|
| 574 | dimensions.
|
|---|
| 575 |
|
|---|
| 576 | f. New function, rl_get_screen_size (int *rows, int *columns), returns
|
|---|
| 577 | readline's idea of the screen dimensions.
|
|---|
| 578 |
|
|---|
| 579 | g. The timeout in rl_gather_tyi (readline keyboard input polling function)
|
|---|
| 580 | is now settable via a function (rl_set_keyboard_input_timeout()).
|
|---|
| 581 |
|
|---|
| 582 | h. Renamed the max_input_history variable to history_max_entries; the old
|
|---|
| 583 | variable is maintained for backwards compatibility.
|
|---|
| 584 |
|
|---|
| 585 | i. The list of characters that separate words for the history tokenizer is
|
|---|
| 586 | now settable with a variable: history_word_delimiters. The default
|
|---|
| 587 | value is as before.
|
|---|
| 588 |
|
|---|
| 589 | -------------------------------------------------------------------------------
|
|---|
| 590 | This is a terse description of the new features added to bash-2.04 since
|
|---|
| 591 | the release of bash-2.03. As always, the manual page (doc/bash.1) is
|
|---|
| 592 | the place to look for complete descriptions.
|
|---|
| 593 |
|
|---|
| 594 | 1. New Features in Bash
|
|---|
| 595 |
|
|---|
| 596 | a. The history builtin has a `-d offset' option to delete the history entry
|
|---|
| 597 | at position `offset'.
|
|---|
| 598 |
|
|---|
| 599 | b. The prompt expansion code has two new escape sequences: \j, the number of
|
|---|
| 600 | active jobs; and \l, the basename of the shell's tty device name.
|
|---|
| 601 |
|
|---|
| 602 | c. The `bind' builtin has a new `-x' option to bind key sequences to shell
|
|---|
| 603 | commands.
|
|---|
| 604 |
|
|---|
| 605 | d. There is a new shell option, no_empty_command_completion, which, when
|
|---|
| 606 | enabled, disables command completion when TAB is typed on an empty line.
|
|---|
| 607 |
|
|---|
| 608 | e. The `help' builtin has a `-s' option to just print a builtin's usage
|
|---|
| 609 | synopsis.
|
|---|
| 610 |
|
|---|
| 611 | f. There are several new arithmetic operators: id++, id-- (variable
|
|---|
| 612 | post-increment/decrement), ++id, --id (variable pre-increment/decrement),
|
|---|
| 613 | expr1 , expr2 (comma operator).
|
|---|
| 614 |
|
|---|
| 615 | g. There is a new ksh-93 style arithmetic for command:
|
|---|
| 616 | for ((expr1 ; expr2; expr3 )); do list; done
|
|---|
| 617 |
|
|---|
| 618 | h. The `read' builtin has a number of new options:
|
|---|
| 619 | -t timeout only wait timeout seconds for input
|
|---|
| 620 | -n nchars only read nchars from input instead of a full line
|
|---|
| 621 | -d delim read until delim rather than newline
|
|---|
| 622 | -s don't echo input chars as they are read
|
|---|
|
|---|