📄 news
字号:
aa. There is a new bash-specific bindable readline function: `dabbrev-expand'. It uses menu completion on a set of words taken from the history list.bb. The command assigned to a key sequence with `bind -x' now sets two new variables in the environment of the executed command: READLINE_LINE_BUFFER and READLINE_POINT. The command can change the current readline line and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT, respectively.cc. There is a new &>> redirection operator, which appends the standard output and standard error to the named file.dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects the standard error for a command through a pipe.ee. The new `;&' case statement action list terminator causes execution to continue with the action associated with the next pattern in the statement rather than terminating the command.ff. The new `;;&' case statement action list terminator causes the shell to test the next set of patterns after completing execution of the current action, rather than terminating the command.gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an integer value greater than zero, prompt expansion of \w and \W will retain only that number of trailing pathname components and replace the intervening characters with `...'.hh. There are new case-modifying word expansions: uppercase (^[^]) and lowercase (,[,]). They can work on either the first character or array element, or globally. They accept an optional shell pattern that determines which characters to modify. There is an optionally- configured feature to include capitalization operators.ii. The shell provides associative array variables, with the appropriate support to create, delete, assign values to, and expand them.jj. The `declare' builtin now has new -l (convert value to lowercase upon assignment) and -u (convert value to uppercase upon assignment) options. There is an optionally-configurable -c option to capitalize a value at assignment.kk. There is a new `coproc' reserved word that specifies a coprocess: an asynchronous command run with two pipes connected to the creating shell. Coprocs can be named. The input and output file descriptors and the PID of the coprocess are available to the calling shell in variables with coproc-specific names.ll. A value of 0 for the -t option to `read' now returns success if there is input available to be read from the specified file descriptor.mm. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged mode.nn. New bindable readline functions shell-forward-word and shell-backward-word, which move forward and backward words delimited by shell metacharacters and honor shell quoting.oo. New bindable readline functions shell-backward-kill-word and shell-kill-word which kill words backward and forward, but use the same word boundaries as shell-forward-word and shell-backward-word.2. New Features in Readlinea. A new variable, rl_sort_completion_matches; allows applications to inhibit match list sorting (but beware: some things don't work right if applications do this).b. A new variable, rl_completion_invoking_key; allows applications to discover the key that invoked rl_complete or rl_menu_complete.c. The functions rl_block_sigint and rl_release_sigint are now public and available to calling applications who want to protect critical sections (like redisplay).d. The functions rl_save_state and rl_restore_state are now public and available to calling applications; documented rest of readline's state flag values.e. A new user-settable variable, `history-size', allows setting the maximum number of entries in the history list.f. There is a new implementation of menu completion, with several improvements over the old; the most notable improvement is a better `completions browsing' mode.g. The menu completion code now uses the rl_menu_completion_entry_function variable, allowing applications to provide their own menu completion generators.h. There is support for replacing a prefix of a pathname with a `...' when displaying possible completions. This is controllable by setting the `completion-prefix-display-length' variable. Matches with a common prefix longer than this value have the common prefix replaced with `...'.i. There is a new `revert-all-at-newline' variable. If enabled, readline will undo all outstanding changes to all history lines when `accept-line' is executed.j. If the kernel supports it, readline displays special characters corresponding to a keyboard-generated signal when the signal is received.-------------------------------------------------------------------------------This is a terse description of the new features added to bash-3.2 sincethe release of bash-3.1. As always, the manual page (doc/bash.1) isthe place to look for complete descriptions.1. New Features in Basha. Changed the parameter pattern replacement functions to not anchor the pattern at the beginning of the string if doing global replacement - that combination doesn't make any sense.b. When running in `word expansion only' mode (--wordexp option), inhibit process substitution.c. Loadable builtins now work on MacOS X 10.[34].d. Shells running in posix mode no longer set $HOME, as POSIX requires.e. The code that checks for binary files being executed as shell scripts now checks only for NUL rather than any non-printing character.f. Quoting the string argument to the [[ command's =~ operator now forces string matching, as with the other pattern-matching operators.2. New Features in Readlinea. Calling applications can now set the keyboard timeout to 0, allowing poll-like behavior.b. The value of SYS_INPUTRC (configurable at compilation time) is now used as the default last-ditch startup file.c. The history file reading functions now allow windows-like \r\n line terminators.-------------------------------------------------------------------------------This is a terse description of the new features added to bash-3.1 sincethe release of bash-3.0. As always, the manual page (doc/bash.1) isthe place to look for complete descriptions.1. New Features in Basha. Bash now understands LC_TIME as a special variable so that time display tracks the current locale.b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created as `invisible' variables and may not be unset.c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't try to interpret any options at all, as POSIX requires.d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.e. Fixed vi-mode word completion and glob expansion to perform tilde expansion.f. The `**' mathematic exponentiation operator is now right-associative.g. The `ulimit' builtin has new options: -i (max number of pending signals), -q (max size of POSIX message queues), and -x (max number of file locks).h. A bare `%' once again expands to the current job when used as a job specifier.i. The `+=' assignment operator (append to the value of a string or array) is now supported for assignment statements and arguments to builtin commands that accept assignment statements.j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.k. The `gnu_errfmt' option is enabled automatically if the shell is running in an emacs terminal window.l. New configuration option: --single-help-strings. Causes long help text to be written as a single string; intended to ease translation.m. The COMP_WORDBREAKS variable now causes the list of word break characters to be emptied when the variable is unset.n. An unquoted expansion of $* when $IFS is empty now causes the positional parameters to be concatenated if the expansion doesn't undergo word splitting.o. Bash now inherits $_ from the environment if it appears there at startup.p. New shell option: nocasematch. If non-zero, shell pattern matching ignores case when used by `case' and `[[' commands.q. The `printf' builtin takes a new option: -v var. That causes the output to be placed into var instead of on stdout.r. By default, the shell no longer reports processes dying from SIGPIPE.s. Bash now sets the extern variable `environ' to the export environment it creates, so C library functions that call getenv() (and can't use the shell-provided replacement) get current values of environment variables.t. A new configuration option, `--enable-strict-posix-default', which will build bash to be POSIX conforming by default.u. If compiled for strict POSIX conformance, LINES and COLUMNS may now override the true terminal size.2. New Features in Readlinea. The key sequence sent by the keypad `delete' key is now automatically bound to delete-char.b. A negative argument to menu-complete now cycles backward through the completion list.c. A new bindable readline variable: bind-tty-special-chars. If non-zero, readline will bind the terminal special characters to their readline equivalents when it's called (on by default).d. New bindable command: vi-rubout. Saves deleted text for possible reinsertion, as with any vi-mode `text modification' command; `X' is bound to this in vi command mode.e. A new external application-controllable variable that allows the LINES and COLUMNS environment variables to set the window size regardless of what the kernel returns: rl_prefer_env_winsize-------------------------------------------------------------------------------This is a terse description of the new features added to bash-3.0 sincethe release of bash-2.05b. As always, the manual page (doc/bash.1) isthe place to look for complete descriptions.1. New Features in Basha. ANSI string expansion now implements the \x{hexdigits} escape.b. There is a new loadable `strftime' builtin.c. New variable, COMP_WORDBREAKS, which controls the readline completer's idea of word break characters.d. The `type' builtin no longer reports on aliases unless alias expansion will actually be performed. e. HISTCONTROL is now a colon-separated list of values, which permits more extensibility and backwards compatibility.f. HISTCONTROL may now include the `erasedups' option, which causes all lines matching a line being added to be removed from the history list.g. `configure' has a new `--enable-multibyte' argument that permits multibyte character support to be disabled even on systems that support it.h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV, BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING, BASH_COMMANDi. FUNCNAME has been changed to support the debugger: it's now an array variable.j. for, case, select, arithmetic commands now keep line number information for the debugger.k. There is a new `RETURN' trap executed when a function or sourced script returns (not inherited child processes; inherited by command substitution if function tracing is enabled and the debugger is active).l. New invocation option: --debugger. Enables debugging and turns on new `extdebug' shell option.m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR traps, respectively, to be inherited by shell functions. Equivalent to `set -T' and `set -E' respectively. The `functrace' option also controls whether or not the DEBUG trap is inherited by sourced scripts.n. The DEBUG trap is run before binding the variable and running the action list in a `for' command, binding the selection variable and running the query in a `select' command, and before attempting a match in a `case' command.o. New `--enable-debugger' option to `configure' to compile in the debugger support code.p. `declare -F' now prints out extra line number and source file information if the `extdebug' option is set.q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes the next command to be skipped, and a return value of 2 while in a function or sourced script forces a `return'.r. New `caller' builtin to provide a call stack for the bash debugger.s. The DEBUG trap is run just before the first command in a function body is executed, for the debugger.t. `for', `select', and `case' command heads are printed when `set -x' is enabled.u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1, x+2,...,y}. x and y can be integers or single characters; the sequence may ascend or descend; the increment is always 1.v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices) of array.w. New `force_fignore' shopt option; if enabled, suffixes specified by FIGNORE cause words to be ignored when performing word completion even if they're the only possibilities.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -