1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
o When using substring expansion on the positional parameters, a starting
index of 0 now causes $0 to be prefixed to the list.
o There is a new variable, $BASHPID, which always returns the process id of
the current shell.
o There is a new `autocd' option that, when enabled, causes bash to attempt
to `cd' to a directory name that is supplied as the first word of a
simple command.
o There is a new `checkjobs' option that causes the shell to check for and
report any running or stopped jobs at exit.
o The programmable completion code exports a new COMP_TYPE variable, set to
a character describing the type of completion being attempted.
o The programmable completion code exports a new COMP_KEY variable, set to
the character that caused the completion to be invoked (e.g., TAB).
o The programmable completion code now uses the same set of characters as
readline when breaking the command line into a list of words.
o The block multiplier for the ulimit -c and -f options is now 512 when in
Posix mode, as Posix specifies.
o Changed the behavior of the read builtin to save any partial input received
in the specified variable when the read builtin times out. This also
results in variables specified as arguments to read to be set to the empty
string when there is no input available. When the read builtin times out,
it returns an exit status greater than 128.
o The shell now has the notion of a `compatibility level', controlled by
new variables settable by `shopt'. Setting this variable currently
restores the bash-3.1 behavior when processing quoted strings on the rhs
of the `=~' operator to the `[[' command.
o The `ulimit' builtin now has new -b (socket buffer size) and -T (number
of threads) options.
o There is a new `compopt' builtin that allows completion functions to modify
completion options for existing completions or the completion currently
being executed.
o The `read' builtin has a new -i option which inserts text into the reply
buffer when using readline.
o A new `-E' option to the complete builtin allows control of the default
behavior for completion on an empty line.
o There is now limited support for completing command name words containing
globbing characters.
o The `help' builtin now has a new -d option, to display a short description,
and a -m option, to print help information in a man page-like format.
o There is a new `mapfile' builtin to populate an array with lines from a
given file.
o If a command is not found, the shell attempts to execute a shell function
named `command_not_found_handle', supplying the command words as the
function arguments.
o There is a new shell option: `globstar'. When enabled, the globbing code
treats `**' specially -- it matches all directories (and files within
them, when appropriate) recursively.
o There is a new shell option: `dirspell'. When enabled, the filename
completion code performs spelling correction on directory names during
completion.
o The `-t' option to the `read' builtin now supports fractional timeout
values.
o Brace expansion now allows zero-padding of expanded numeric values and
will add the proper number of zeroes to make sure all values contain the
same number of digits.
o 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.
o 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.
o There is a new >>& redirection operator, which appends the standard output
and standard error to the named file.
o The parser now understands `|&' as a synonym for `2>&1 |', which redirects
the standard error for a command through a pipe.
o 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.
o 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.
o 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 `...'.
o 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.
o The shell provides associative array variables, with the appropriate
support to create, delete, assign values to, and expand them.
o 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.
o 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.
o 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.
o CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
mode.
o 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.
o 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.
|