📄 news
字号:
x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu style' (filename:lineno:message) format.y. New `-o bashdefault' option to complete and compgen; if set, causes the whole set of bash completions to be performed if the compspec doesn't result in a match.z. New `-o plusdirs' option to complete and compgen; if set, causes directory name completion to be performed and the results added to the rest of the possible completions.aa. `kill' is available as a builtin even when the shell is built without job control.bb. New HISTTIMEFORMAT variable; value is a format string to pass to strftime(3). If set and not null, the `history' builtin prints out timestamp information according to the specified format when displaying history entries. If set, bash tells the history library to write out timestamp information when the history file is written.cc. The [[ ... ]] command has a new binary `=~' operator that performs extended regular expression (egrep-like) matching.dd. `configure' has a new `--enable-cond-regexp' option (enabled by default) to enable the =~ operator and regexp matching in [[ ... ]].ee. Subexpressions matched by the =~ operator are placed in the new BASH_REMATCH array variable.ff. New `failglob' option that causes an expansion error when pathname expansion fails to produce a match.gg. New `set -o pipefail' option that causes a pipeline to return a failure status if any of the processes in the pipeline fail, not just the last one.hh. printf builtin understands two new escape sequences: \" and \?.ii. `echo -e' understands two new escape sequences: \" and \?.jj. The GNU `gettext' package and libintl have been integrated; the shell's messages can be translated into different languages.kk. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.ll. The error message printed when bash cannot open a shell script supplied as argument 1 now includes the name of the shell, to better identify the error as coming from bash.mm. The parameter pattern removal and substitution expansions are now much faster and more efficient when using multibyte characters.nn. The `jobs', `kill', and `wait' builtins now accept job control notation even if job control is not enabled.oo. The historical behavior of `trap' that allows a missing `action' argument to cause each specified signal's handling to be reset to its default is now only supported when `trap' is given a single non-option argument.2. New Features in Readlinea. History expansion has a new `a' modifier equivalent to the `g' modifier for compatibility with the BSD csh.b. History expansion has a new `G' modifier equivalent to the BSD csh `g' modifier, which performs a substitution once per word.c. All non-incremental search operations may now undo the operation of replacing the current line with the history line.d. The text inserted by an `a' command in vi mode can be reinserted with `.'.e. New bindable variable, `show-all-if-unmodified'. If set, the readline completer will list possible completions immediately if there is more than one completion and partial completion cannot be performed.f. There is a new application-callable `free_history_entry()' function.g. History list entries now contain timestamp information; the history file functions know how to read and write timestamp information associated with each entry.h. Four new key binding functions have been added: rl_bind_key_if_unbound() rl_bind_key_if_unbound_in_map() rl_bind_keyseq_if_unbound() rl_bind_keyseq_if_unbound_in_map()i. New application variable, rl_completion_quote_character, set to any quote character readline finds before it calls the application completion function.j. New application variable, rl_completion_suppress_quote, settable by an application completion function. If set to non-zero, readline does not attempt to append a closing quote to a completed word.k. New application variable, rl_completion_found_quote, set to a non-zero value if readline determines that the word to be completed is quoted. Set before readline calls any application completion function.l. New function hook, rl_completion_word_break_hook, called when readline needs to break a line into words when completion is attempted. Allows the word break characters to vary based on position in the line.m. New bindable command: unix-filename-rubout. Does the same thing as unix-word-rubout, but adds `/' to the set of word delimiters.n. When listing completions, directories have a `/' appended if the `mark-directories' option has been enabled.-------------------------------------------------------------------------------This is a terse description of the new features added to bash-2.05b sincethe release of bash-2.05a. As always, the manual page (doc/bash.1) isthe place to look for complete descriptions.1. New Features in Basha. If set, TMOUT is the default timeout for the `read' builtin.b. `type' has two new options: `-f' suppresses shell function lookup, and `-P' forces a $PATH search.c. New code to handle multibyte characters.d. `select' was changed to be more ksh-compatible, in that the menu is reprinted each time through the loop only if REPLY is set to NULL. The previous behavior is available as a compile-time option.e. `complete -d' and `complete -o dirnames' now force a slash to be appended to names which are symlinks to directories.f. There is now a bindable edit-and-execute-command readline command, like the vi-mode `v' command, bound to C-xC-e in emacs mode.g. Added support for ksh93-like [:word:] character class in pattern matching.h. The $'...' quoting construct now expands \cX to Control-X.i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts the result into the expanded prompt.j. The shell now performs arithmetic in the largest integer size the machine supports (intmax_t), instead of long.k. If a numeric argument is supplied to one of the bash globbing completion functions, a `*' is appended to the word before expansion is attempted.l. The bash globbing completion functions now allow completions to be listed with double tabs or if `show-all-if-ambiguous' is set.m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses readline's appending a space to the completed word.n. New `here-string' redirection operator: <<< word.o. When displaying variables, function attributes and definitions are shown separately, allowing them to be re-used as input (attempting to re-use the old output would result in syntax errors).p. There is a new configuration option `--enable-mem-scramble', controls bash malloc behavior of writing garbage characters into memory at allocation and free time.q. The `complete' and `compgen' builtins now have a new `-s/-A service' option to complete on names from /etc/services.r. `read' has a new `-u fd' option to read from a specified file descriptor.s. Fix the completion code so that expansion errors in a directory name don't cause a longjmp back to the command loop.t. Fixed word completion inside command substitution to work a little more intuitively.u. The `printf' %q format specifier now uses $'...' quoting to print the argument if it contains non-printing characters.v. The `declare' and `typeset' builtins have a new `-t' option. When applied to functions, it causes the DEBUG trap to be inherited by the named function. Currently has no effect on variables.w. The DEBUG trap is now run *before* simple commands, ((...)) commands, [[...]] conditional commands, and for ((...)) loops.x. The expansion of $LINENO inside a shell function is only relative to the function start if the shell is interactive -- if the shell is running a script, $LINENO expands to the line number in the script. This is as POSIX-2001 requires.y. The bash debugger in examples/bashdb has been modified to work with the new DEBUG trap semantics, the command set has been made more gdb-like, and the changes to $LINENO make debugging functions work better. Code from Gary Vaughan.z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup and close).aa. There is a new `-l' invocation option, equivalent to `--login'.bb. The `hash' builtin has a new `-l' option to list contents in a reusable format, and a `-d' option to remove a name from the hash table.cc. There is now support for placing the long help text into separate files installed into ${datadir}/bash. Not enabled by default; can be turned on with `--enable-separate-helpfiles' option to configure. dd. All builtins that take operands accept a `--' pseudo-option, except `echo'.ee. The `echo' builtin now accepts \0xxx (zero to three octal digits following the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/ POSIX.1-2001 compliance.2. New Features in Readlinea. Support for key `subsequences': allows, e.g., ESC and ESC-a to both be bound to readline functions. Now the arrow keys may be used in vi insert mode.b. When listing completions, and the number of lines displayed is more than the screen length, readline uses an internal pager to display the results. This is controlled by the `page-completions' variable (default on).c. New code to handle editing and displaying multibyte characters.d. The behavior introduced in bash-2.05a of deciding whether or not to append a slash to a completed name that is a symlink to a directory has been made optional, controlled by the `mark-symlinked-directories' variable (default is the 2.05a behavior).e. The `insert-comment' command now acts as a toggle if given a numeric argument: if the first characters on the line don't specify a comment, insert one; if they do, delete the comment textf. New application-settable completion variable: rl_completion_mark_symlink_dirs, allows an application's completion function to temporarily override the user's preference for appending slashes to names which are symlinks to directories.g. New function available to application completion functions: rl_completion_mode, to tell how the completion function was invoked and decide which argument to supply to rl_complete_internal (to list completions, etc.).h. Readline now has an overwrite mode, toggled by the `overwrite-mode' bindable command, which could be bound to `Insert'.i. New application-settable completion variable: rl_completion_suppress_append, inhibits appending of rl_completion_append_character to completed words.j. New key bindings when reading an incremental search string: ^W yanks the currently-matched word out of the current line into the search string; ^Y yanks the rest of the current line into the search string, DEL or ^H deletes characters from the search string.-------------------------------------------------------------------------------This is a terse description of the new features added to bash-2.05a sincethe release of bash-2.05. As always, the manual page (doc/bash.1) isthe place to look for complete descriptions.1. New Features in Basha. Added support for DESTDIR installation root prefix, so you can do a `make install DESTDIR=bash-root' and do easier binary packaging.b. Added support for builtin printf "'" flag character as per latest POSIX drafts.c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from ISO C99).d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications (bash doesn't use very much of what it returns).e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts, but ignored.f. New read-only `shopt' option: login_shell. Set to non-zero value if the shell is a login shell.g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.h. New `-A group/-g' option to complete and compgen; does group name completion.i. New `-t' option to `hash' to list hash values for each filename argument.j. New [-+]O invocation option to set and unset `shopt' options at startup.k. configure's `--with-installed-readline' option now takes an optional `=PATH' suffix to set the root of the tree where readline is installed to PATH.l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run whenever the shell would have exited if the -e option were enabled. It is not inherited by shell functions.m. `readonly', `export', and `declare' now print variables which have been given attributes but not set by assigning a value as just a command and a variable name (like `export foo') when listing, as the latest POSIX drafts require.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -