forked from bminor/bash
-
Notifications
You must be signed in to change notification settings - Fork 5
/
CHANGES
9678 lines (6508 loc) · 381 KB
/
CHANGES
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This document details the changes between this version, bash-5.0-release, and
the previous version, bash-5.0-rc1.
1. Changes to Bash
a. Tilde expansion isn't performed on indexed array subscripts, even for
backwards compatibility.
b. The shell doesn't exit in posix mode if the eval builtin gets a parse
error when run by the command builtin.
c. Fixed a bug that caused a shell comment in an alias to not find the end
of the alias properly.
d. Reverted a change from April, 2018 that caused strings containing
backslashes to be flagged as glob patterns.
2. Changes to Readline
3. New Features in Bash
4. New Features in Readline
------------------------------------------------------------------------------
This document details the changes between this version, bash-5.0-rc1, and
the previous version, bash-5.0-beta2.
1. Changes to Bash
a. Fix to initial word completion detection code.
b. Fixed a bug that caused issues with assignment statements containing ^A in
the value assigned when IFS contains ^A.
c. Added a fallback to fnmatch() when strcoll can't correctly deal with
bracket expression character equivalence classes.
d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command
when running a trap handler containing [[ or (( commands.
e. Fixed a bug that caused nameref assignments in the temporary environment
to potentially create variables with invalid names.
f. Fixed a bug that caused `local -' to turn off alias expansion in scripts.
g. Fixed a parser issue with a command string containing EOF after an invalid
command as an argument to a special builtin not causing a posix-mode shell
to exit.
h. Made a slight change to the FNV-1 string hash algorithm used for associative
arrays (corrected the initial seed).
2. Changes to Readline
3. New Features in Bash
a. The `select' command now supports command forms without a word list
following `in'.
4. New Features in Readline
------------------------------------------------------------------------------
This document details the changes between this version, bash-5.0-beta2, and
the previous version, bash-5.0-beta.
1. Changes to Bash
a. Fixed a bug that could cause a seg fault while parsing a subshell command
inside a command substitution.
b. Fixed several small memory leaks uncovered by coverity.
c. Fixed a problem with command substitution inside an interactive shell that
could cause the parent to receive a SIGHUP.
d. Fixed a problem with using `*' and `@' as subscripts when assigning values
to an associative array with assoc_expand_once enabled.
e. Fixed a bug that could cause a huge memory allocation when completing a
word beginning with an invalid tilde expansion.
f. Cleaned up some incompatiblities with bash-4.4 when expanding indexed array
subscripts used in arithmetic expansions when assoc_expand_once is enabled.
g. The ${parameter@a} expansion will display attributes even if `parameter' is
unset.
h. Fixed a bug that caused the output of `set' to cut off some variables before
printing the value.
i. Treat a failure to assign a variable when using the ${x:=value} expansion
as an expansion error, so non-interactive posix-mode shells exit
j. Fixed a problem when expanding $* in a context where word splitting is not
performed when IFS is NULL.
k. Temp files used to store here documents are forced readable, no matter what
the user's umask says.
l. Fixed a problem where an interrupted brace expansion could cause the shell
to attempt to free an invalid memory location.
m. Make sure to check for any terminating signals after running a trap
handler; don't wait until the next time we process traps.
n. Fixed a bug that caused "return" to act like a special builtin with respect
to variable assignments even when preceded by "command".
o. POSIX-mode shells now return failure if the cd builtin fails due to the
absolute directory name being longer than PATH_MAX, instead of trying
again with a relative pathname.
p. Fixed a problem with FUNCNAME occasionally being visible when not executing
a shell function.
q. Fixed a problem with the expansions performed on the WORD in the case
command.
r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during
word splitting and the read builtin.
s. Fixed a problem with expanding an array with subscript `*' when all the
elements expand to the empty string, and making sure the expansion honors
the `:' specifier.
2. Changes to Readline
a. Fixed a bug with adding multibyte characters to an incremental search string.
b. Fixed a bug with redoing text insertions in vi mode.
c. Fixed a bug with pasting text into an incremental search string if bracketed
paste mode is enabled. ESC cannot be one of the incremental search
terminator characters for this to work.
d. Fixed a bug with anchored search patterns when performing searches in vi
mode.
3. New Features in Bash
a. Associative and indexed arrays now allow subscripts consisting solely of
whitespace.
b. `checkwinsize' is now enabled by default.
c. The `localvar_unset' shopt option is now visible and documented.
d. The `progcomp_alias' shopt option is now visible and documented.
e. The signal name processing code now understands `SIGRTMIN+n' all the way
up to SIGRTMAX.
f. There is a new `seq' loadable builtin.
g. Trap execution now honors the (internal) max invocations of `eval', since
traps are supposed to be executed as if using `eval'.
h. The $_ variable doesn't change when the shell executes a command that forks.
i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though
conforming applications aren't supposed to use them.
j. POSIX mode now enables the `shift_verbose' option.
4. New Features in Readline
a. Readline now allows application-defined keymap names; there is a new public
function, rl_set_keymap_name(), to do that.
b. The "Insert" keypad key, if available, now puts readline into overwrite
mode.
------------------------------------------------------------------------------
This document details the changes between this version, bash-5.0-beta, and
the previous version, bash-5.0-alpha.
1. Changes to Bash
a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this
is where POSIX says the subshell is not "enclosed" by the loop.
b. Added more UTF-8-specific versions of multibyte functions, and optimized
existing functions if the current locale uses UTF-8 encoding.
c. In POSIX mode, assignments preceding regular builtins should not persist
when the builtin completes.
d. Added additional checks to special array assignment (e.g., BASH_ALIASES)
so it can't be used to bypass validity checks performed in other places.
e. The `!!' history expansion now refers to the previous history entry as
expected, even if used on the second or subsequent line of a multi-line
history entry.
f. Fixed a bug that could cause the shell to dereference a NULL pointer if
the environment (`environ') is set to NULL.
g. Bash uses slightly better integer overflow handling for brace sequence
expansion on systems where ints are 32 bits and intmax_t is 64 bits.
h. Fixed a bug setting attributes for a variable named as an argument to
`declare' that also appears as a nameref in the temporary environment.
i. Fixed several bugs that could cause assignments to namerefs to create
variables with invalid names.
j. Fixed a bug that could result in the SIGINT handler being set incorrectly
in asynchronous subshells.
k. Fixed a bug that could cause `bash -t' to not execute the specified command.
l. Fixed several bugs that caused the shell to operate on the wrong variable
when using namerefs with the same name as a global variable in shell
functions.
m. Internal changes to how the shell handles variables with invalid names in
the initial environment and to prevent variables with invalid names from
being added to the environment instead of passing them on to children.
n. Changes to make sure that an expansion that results in a quoted null string
is reflected in the expansion, even if the word expands to nothing.
o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand
the same way after the recent changes for POSIX interpretation 888.
p. Saving and restoring the positional parameters at function entry and exit
is considerably more efficient; noticeably so when there are large numbers
of positional parameters.
q. Fixed a bug that caused `lastpipe' and `pipefail' to return an incorrect
status for the pipeline if there was more than one external command in a
loop body appearing in the last pipeline element.
r. Fixed a bug that caused value conversion errors with the printf builtin's
%u and %f conversion specifications and invalid constants.
2. Changes to Readline
a. Added more UTF-8-specific versions of multibyte functions, and optimized
existing functions if the current locale uses UTF-8 encoding.
b. Fixed a problem with bracketed-paste inserting more than one character and
interacting with other readline functions.
c. Fixed a bug that caused the history library to attempt to append a history
line to a non-existent history entry.
d. If using bracketed paste mode, output a newline after the \r that is the
last character of the mode disable string to avoid overwriting output.
e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better
handle multibyte characters.
f. Fixed a redisplay problem that caused an extra newline to be generated on
accept-line when the line length is exactly the screenwidth.
3. New Features in Bash
a. Bash no longer allows variable assignments preceding a special builtin that
changes variable attributes to propagate back to the calling environment
unless the compatibility level is 44 or lower.
b. You can set the default value for $HISTSIZE at build time in config-top.h.
c. The `complete' builtin now accepts a -I option that applies the completion
to the initial word on the line.
d. The internal bash malloc now uses mmap (if available) to satisfy requests
greater than 128K bytes, so free can use mfree to return the pages to the
kernel.
e. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup
unless it's in debugging mode, as the documentation has always said, but
will dynamically create them if a script references them at the top level
without having enabled debugging mode.
f. The localvar_inherit option will not attempt to inherit a value from a
variable of an incompatible type (indexed vs. associative arrays, for
example).
g. The `globasciiranges' option is now enabled by default; it can be set to
off by default at configuration time.
4. New Features in Readline
a. The history expansion library now understands command and process
substitution and extended globbing and allows them to appear anywhere in a
word.
b. The history library has a new variable that allows applications to set the
initial quoting state, so quoting state can be inherited from a previous
line.
------------------------------------------------------------------------------
This document details the changes between this version, bash-5.0-alpha, and
the previous version, bash-4.4-release.
1. Changes to Bash
a. Fixed a bug that could cause traps in background jobs to give the terminal
to the wrong process group.
b. Fixed a bug that caused `kill -l 0' to print an out-of-range error.
c. Fixed a problem that could result in here-documents being displayed in
the wrong order.
d. Fixed a number of out-of-bounds and free memory read errors found via
fuzzing.
e. Fixed a subshell inheritance problem that could cause a subshell to wait for
the wrong process.
f. Fixed a bug that caused SHLVL to be incremented one too many times when
creating subshells.
g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with
job control enabled.
h. Fixed a spurious warning about unterminated ${ or $( constructs during
word completion.
i. The shell no longer runs traps if a signal arrives while reading command
substitution output.
j. Fixed an arithmetic expansion error that could allow ++var++ as valid
syntax.
k. Fixed an error that allowed out-of-bounds references to the directory stack.
l. The shell does a better job of saving multi-line history entries with
embedded comments.
m. Fixed a bug that could cause quoted bracket expressions in regular expression
arguments to `[[' to not match correctly.
n. Fixed a bug that could cause an IFS character in a word to result in an
extra '\001' character in the expansion.
o. A trailing backslash in a glob pattern can match a trailing backslash in the
string.
p. Fixed a memory leak in the process creation code path when job control is
enabled.
q. Fixed a bug that caused `printf' to output broken surrogate pairs for
Japanese locales.
r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to
kill an interactive shell.
s. Fixed a bug that could cause the `read' builtin to not fully read a
multibyte character.
t. Fixed a bug that could cause identifiers to be evaluated in conditional
arithmetic expressions even when evaluation is suppressed.
u. Fixed a bug that could result in command substitution, when executed in a
context where word splitting is not performed, to leave a stray '\001'
character in the string.
v. Fixed a bug that could cause history expansion to be disabled in a non-
interactive shell even if `-o histexpand' is supplied at startup.
w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters.
x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions.
y. If indirect expansion attempts to indirectly reference through an unset
variable, report an error.
z. Added a guard to prevent the shell from looping while receiving an endless
stream of SIGTTIN at shell startup.
aa. Fixed a bug with parsing here documents inside a command substitution when
looking for the closing delimiter.
bb. Fixed a bug that caused printf to not quote all <blank> characters in the
current locale when using the `%q' format specifier.
cc. Fixed a bug with bash's internal buffered I/O system that caused the input
pointer to not be reset when read(2) returned an EOF.
dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will
not interrupt open/read/write system calls.
ee. The ERR trap now reports line numbers more reliably.
ff. The shell no longer tries to manipulate the terminal process group if a
command or process substitution is killed by SIGTERM when job control is
enabled.
gg. Fixed a bug that caused extglob patterns to match filenames beginning with
a period.
hh. File descriptors open for writing to here documents are no longer available
to subshells.
ii. Make sure word completion doesn't perform command or process substitution.
jj. Fixed a bug with parsing $$'...' inside a command substitution.
kk. Fixed a bug that caused bash to remove backslash-newline pairs from the
body of a here-document with a quoted delimiter inside a command
substitution.
ll. Fixed a bug that could cause the shell to hang when adding a pid to the
table of background process exit statuses.
mm. Fixed a bug that could cause 0x01 characters to be doubled in the output
of process substitution.
nn. Restricted shells now clear the hash table before making the PATH variable
read-only.
oo. There are a number of changes to the expansion of $* and $@ in contexts
where word splitting does not occur (quoted and unquoted), with IFS set
to NULL or a non-standard value, mostly to deal with the consequences of
the behavior defined in Posix interpretation 888.
pp. There are a number of changes to nameref variable handling to avoid
creating variables with invalid names.
qq. A non-interactive posix mode shell no longer exits when an assignment
statement fails if the assignment is utimately being performed by the
`command' builtin.
rr. When using character class names for globbing, don't allow case
insensitivity, even if nocaseglob is enabled.
ss. Fixed a bug that allowed some redirections to stay in place if a later
redirection failed.
tt. Fixed a bug in how command and process substitutions are recognized within
other parameter expansions.
uu. Fixed a bug that caused bash to loop under certain circumstances when
performing arithmetic expansion on a variable whose value is an invalid
expression.
vv. Fixed a bug that could cause bash to expand aliases inappropriately while
parsing compound commands like `case'.
ww. Fixed a bug that could cause `read -N' to fail to read complete multibyte
characters, even when the sequences are incomplete or invalid, with or
without readline.
xx. Fixed a bug that could cause `case' to fail to match patterns containing
0x01 characters.
yy. Fixed a bug that caused exported functions to contain stray 0x01 characters.
zz. Fixed some inconsistencies with how the history number is handled in the
various prompt strings.
aaa. Fixed a bug that could cause a core dump if READLINE_LINE was unset
inside a shell function bound to a key sequence with `bind -x'.
bbb. Fixed a bug that could cause bash to not read a token terminator correctly
if a command substitution was used inside an arithmetic `for' command.
ccc. Fixed problems that could occur with a fatal arithmetic expansion error
in a context (like prompt expansion) where you can't jump back to the
top level.
ddd. Expression errors in arithmetic `for' commands are treated more like
shell syntax errors.
eee. Fixed a parser synchronization error resulting from a syntax error
followed immediately by an EOF.
fff. When executing a shell function, the first line in the function ($LINENO)
is line 1 instead of line 0, as Posix requires.
ggg. In Posix mode, bash will canonicalize the value of PWD it inherits from
the environment and use that to set its idea of the current directory.
hhh. If LINENO is exported, bash needs to regenerate its value each time it
constructs the environment.
iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'.
jjj. Make sure the `coproc' command returns an appropriate status if the NAME
argument is invalid.
kkk. Fixed a problem with arithmetic expressions containing array references
that contain arithmetic expressions with syntax errors.
lll. The `select' command and help builtin will use $COLUMNS before the window
size returned from the kernel as the terminal width.
mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to
detect file descriptor errors.
nnn. The `read' builtin now does a better job of acting on signals that don't
interrupt read(2).
ooo. Fixed some cases where `printf -v' did not return failure status on a
variable assignment error.
ppp. Fixed temporary environment propagation back to the current environment
so that it doesn't happen for special builtins run by the `command'
builtin.
qqq. Fixed a bug when searching for the end of a here-document delimiter in a
command substitution.
rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail.
sss. Fixed a bug that could cause reserved words to not be recognized in a
for statement without the `in' inside a command substitution.
ttt. Fixed a bug that could cause a double-free in a timed command with an
expansion error.
uuu. Fixed a bug that could cause a core dump if a script switches from a UTF-8
locale to a different locale after displaying a lone surrogate character.
vvv. Fixed cases where bash prematurely removed FIFOs attached to process
substitutions.
www. Fixed a problem with calculating the size of the table that stores exit
statuses from background processes when the child process resource limit
is very large.
xxx. Fixed a memory leak with functions using `return' when using FIFOs for
standard input.
yyy. `wait' without arguments attempts to wait for all active process
substitution processes.
zzz. Fixed a bug where an indirect parameter was subjected to word splitting
when trying to find the indirected variable name.
aaaa. Fixed a bug that could allow restricted shell users to add commands to
the hash table.
bbbb. When using the `!(patlist)' extended globbing operator, a filename
beginning with a `.' that doesn't match any of the patterns is not
returned as a match if leading dots must be matched explicitly.
cccc. Fixed a bug that could cause line number and source file information for
a function definition to be incorrect if there are multiple definitions.
dddd. Fixed a bug that could cause builtins like `readonly' to behave
differently when applied to arrays and scalar variables within functions.
eeee. Fixed a bug that could cause alias expansion to add an extra space to
a quoted string that begins outside the alias expansion.
ffff. Fixed a bug that could result in unwanted alias expansion after timing
the null command.
gggg. Fixed a bug that could cause a core dump if a timestamp in a history
file overflowed a time_t.
hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since
the kernel calls make those file descriptors read-write.
iiii. Fixed a problem with splitting double-quoted words for programmable
completion when the double quote immediately follows another word
delimiter.
jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share
the same input buffer.
kkkk. The error message resulting from ${x:?} and ${x?} now differs depending
on whether the variable is null or unset.
llll. In Posix mode, the shell exits if a variable assignment fails and precedes
an empty simple command (after expansion).
mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to
drop characters.
nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal
due to Linux pid namespace peculiarities.
oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for
`bind -x' commands.
pppp. Fixed a bug that could cause SIGINT recursion when running an external
command in a trap the shell takes after a command exits due to SIGINT.
qqqq. Make sure the shell turns off job control before running the command-
not-found handle, so the command doesn't try to manipulate process
groups.
rrrr. Fixed a problem with timing process substitutions that caused the shell
to print timing information for the calling command.
ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark
the delimiter as quoted (inhibiting expansion of the here-document
contents).
tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and
conditional command pattern matches.
uuuu. Fixed a bug that could cause the pattern matching engine to not recognize
locale-specific character classes.
vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently.
wwww. The `globstar' code now skips over symbolic links to directories,
preventing them from being scanned twice.
xxxx. When running `bind -x' commands, bash now sets READLINE_POINT based on
the number of characters in the readline line buffer, not the number of
bytes.
yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN
trap when using `eval return'.
zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document.
aaaaa. The process substitution code now closes and unlinks FIFOs when the
process on the other side exits, in order to prevent SIGPIPE or
waiting until a FIFO opened for read has a writer.
bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in
an {id}>foo construct.
ccccc. After a Posix discussion, the pattern matching engine just skips over
invalid character classes in bracket expressions, instead of matching
them like individual characters in the expression.
ddddd. Fixed a posix-mode problem with variable scoping when creating variables
from assignment statements preceding special builtins.
eeeee. Fixed a bug that could cause patterns containing backslashes to not be
run through the pattern matching engine.
fffff. Fixed a bug that could cause redirections to compound commands to not
be `undone' if the file descriptor in the redirection was closed when
the redirection was initially processed.
ggggg. Fixed a bug that could cause buffer corruption when using `bind -x' in
a command execute as a result of a key binding installed by `bind -x'.
2. Changes to Readline
a. Added a guard to prevent nested macros from causing an infinite expansion
loop.
b. Instead of allocating enough history list entries to hold the maximum list
size, cap the number allocated initially.
c. Added a strategy to avoid allocating huge amounts of memory if a block of
history entries without timestamps occurs after a block with timestamps.
d. Added support for keyboard timeouts when an ESC character is the last
character in a macro.
e. There are several performance improvements when in a UTF-8 locale.
f. Readline does a better job of preserving the original set of blocked
signals when using pselect() to wait for input.
g. Fixed a bug that caused multibyte characters in macros to be mishandled.
h. Fixed several bugs in the code that calculates line breaks when expanding
prompts that span several lines, contain multibyte characters, and contain
invisible character seqeuences.
i. Fixed several bugs in cursor positioning when displaying lines with prompts
containing invisible characters and multibyte characters.
j. When performing case-insensitive completion, Readline no longer sorts the
list of matches unless directed to do so.
k. Fixed a problem with key sequences ending with a backslash.
l. Fixed out-of-bounds and free memory read errors found via fuzzing.
m. Fixed several cases where the mark was set to an invalid value.
n. Fixed a problem with the case-changing operators in the case where the
lower and upper case versions of a character do not have the same number
of bytes.
o. Handle incremental and non-incremental search character reads returning EOF.
p. Handle the case where a failing readline command at the end of a multi-key
sequence could be misinterpreted.
q. The history library now prints a meaningful error message if the history
file isn't a regular file.
r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace
a multibyte character.
s. The key binding code now attempts to remove a keymap if a key unbinding
leaves it empty.
t. Fixed a line-wrapping issue that caused problems for some terminal
emulators.
u. If there is a key bound to the tty's VDISCARD special character, readline
disables VDISCARD while it is active.
v. Fixed a problem with exiting bracketed paste mode on terminals that assume
the bracketed paste mode character sequence contains visible characters.
w. Fixed a bug that could cause a key binding command to refer to an
uninitialized variable.
3. New Features in Bash
a. The `wait' builtin can now wait for the last process substitution created.
b. There is an EPOCHSECONDS variable, which expands to the time in seconds
since the Unix epoch.
c. There is an EPOCHREALTIME variable, which expands to the time in seconds
since the Unix epoch with microsecond granularity.
d. New loadable builtins: rm, stat, fdflags.
e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment.
f. When supplied a numeric argument, the shell-expand-line bindable readline
command does not perform quote removal and suppresses command and process
substitution.
g. `history -d' understands negative arguments: negative arguments offset from
the end of the history list.
h. The `name' argument to the `coproc' reserved word now undergoes word
expansion, so unique coprocs can be created in loops.
i. A nameref name resolution loop in a function now resolves to a variable by
that name in the global scope.
j. The `wait' builtin now has a `-f' option, which signfies to wait until the
specified job or process terminates, instead of waiting until it changes
state.
k. There is a define in config-top.h that allows the shell to use a static
value for $PATH, overriding whatever is in the environment at startup, for
use by the restricted shell.
l. Process substitution does not inherit the `v' option, like command
substitution.
m. If a non-interactive shell with job control enabled detects that a foreground
job died due to SIGINT, it acts as if it received the SIGINT.
n. The SIGCHLD trap is run once for each exiting child process even if job
control is not enabled when the shell is in Posix mode.
o. A new shopt option: localvar_inherit; if set, a local variable inherits the
value of a variable with the same name at the nearest preceding scope.
p. `bind -r' now checks whether a key sequence is bound before binding it to
NULL, to avoid creating keymaps for a multi-key sequence.
q. A numeric argument to the line editing `operate-and-get-next' command
specifies which history entry to use.
r. The positional parameters are now assigned before running the shell startup
files, so startup files can use $@.
s. There is a compile-time option that forces the shell to disable the check
for an inherited OLDPWD being a directory.
t. The `history' builtin can now delete ranges of history entries using
`-d start-end'.
u. The `vi-edit-and-execute-command' bindable readline command now puts readline
back in vi insertion mode after executing commands from the edited file.
v. The command completion code now matches aliases and shell function names
case-insensitively if the readline completion-ignore-case variable is set.
w. There is a new `assoc_expand_once' shell option that attempts to expand
associative array subscripts only once.
x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended
debugging mode is active. The old behavior of unconditionally setting them
is available as part of the shell compatibility options.
y. The `umask' builtin now allows modes and masks greater than octal 777.
z. The `times' builtin now honors the current locale when printing a decimal
point.
aa. There is a new (disabled by default, undocumented) shell option to enable
and disable sending history to syslog at runtime.
4. New Features in Readline
a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
Posix specifies (uses fnmatch(3) if available).
b. There are new `next-screen-line' and `previous-screen-line' bindable
commands, which move the cursor to the same column in the next, or previous,
physical line, respectively.
c. There are default key bindings for control-arrow-key key combinations.
d. A negative argument (-N) to `quoted-insert' means to insert the next N
characters using quoted-insert.
e. New public function: rl_check_signals(), which allows applications to
respond to signals that readline catches while waiting for input using
a custom read function.
f. There is new support for conditionally testing the readline version in an
inputrc file, with a full set of arithmetic comparison operators available.
g. There is a simple variable comparison facility available for use within an
inputrc file. Allowable operators are equality and inequality; string
variables may be compared to a value; boolean variables must be compared to
either `on' or `off'; variable names are separated from the operator by
whitespace.
------------------------------------------------------------------------------
This document details the changes between this version, bash-4.4-release, and
the previous version, bash-4.4-rc2.
1. Changes to Bash
a. Fixed a bug that could potentially result in a crash due to an integer
overflow.
b. Fixed a bug in where commands printed due to `set -x' could be incorrectly
quoted if being printed in contexts where they haven't yet been expanded.
c. Fixed several memory leaks.
d. Fixed a bug that could potentially cause the terminal attributes to be
set incorrectly by a command run from a programmable completion.
e. Fixed several potential buffer overflow issues in the word expansion code.
2. Changes to Readline
3. New Features in Bash
4. New Features in Readline
------------------------------------------------------------------------------
This document details the changes between this version, bash-4.4-rc2, and
the previous version, bash-4.4-beta2.
1. Changes to Bash
a. Fixed an out-of-bounds read in the redirection operator completion code.
b. Fixed execution context so `until continue' doesn't disable execution for
subsequent commands.
c. Fixed trap handling code so traps don't inherit a command's temporary
environment.
d. Fixed a bug that resulted in incorrect line numbers when a function is
defined as part of another function's execution.
e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting
is not performed and $IFS is not the default.
f. Fixed a bug that caused ''"$@" to not expand to an empty argument when
there are no positional parameters.
g. Fixed a bug that caused a shell compiled without job control to use the
incorrect exit status for builtin commands preceded by a command executed
from the file system that causes the shell to call waitpid().
h. Improved word completion for quoted strings containing unterminated command
substitutions with embedded double quotes.
2. Changes to Readline
a. Fixed a bug that caused mode strings to be displayed incorrectly if the
prompt was shorter than the mode string.
3. New Features in Bash
a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
the nounset option is enabled no longer throws an unbound variable error.
4. New Features in Readline
a. New application-callable function: rl_pending_signal(): returns the signal
number of any signal readline has caught but not yet handled.
b. New application-settable variable: rl_persistent_signal_handlers: if set
to a non-zero value, readline will enable the readline-6.2 signal handler
behavior in callback mode: handlers are installed when
rl_callback_handler_install is called and removed removed when a complete
line has been read.
------------------------------------------------------------------------------
This document details the changes between this version, bash-4.4-beta2, and
the previous version, bash-4.4-rc1.
1. Changes to Bash
a. Fixed a memory leak when processing ${!var[@]}.
b. Fixed a bug that caused subshells to free trap strings associated with
inherited signals.
c. Inheriting BASHOPTS from the environment now works to force actions
associated with enabling an option, instead of just marking the option
as enabled.
d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in
restricted mode.
e. Fixed a bug caused by an accidental omission of part of the original patch
for EXECIGNORE.
e. Prompt expansion now quotes the results of the \s, \h, and \H expansions.
f. Fixed a bug that caused parsing errors in command substitutions with
consecutive case statements separated by newlines.
g. Updated logic used to decide whether bash is running inside an emacs
terminal emulator to work with future emacs versions.
h. Fixed two extended pattern matching bugs caused by premature short-
circuiting.
i. Fixed a memory leak in the code that removes duplicate history entries.
j. There are a number of bug fixes to coproc, mapfile, declare, unset,
and assignment statements that prevent nameref variables from creating
and unsetting variables with invalid names.
k. Fixed a bug that caused variables to be inadvertently marked as both an
associative and an indexed array.
l. Fixed a bug that caused `bash -c' to not run a trap specified in the
command string.
j. There are a number of bug fixes to coproc, mapfile, declare, and assignment
statements that prevent nameref variables from overwriting or modifying
attributes of readonly variables.
k. Fixed a bug that caused command substitution to attempt to set the
terminal's process group incorrectly.
l. Fixed a bug that could cause prompt string expansion to display error
messages when the `nounset' shell option is set.
m. Fixed a bug that caused "$@" to not expand to an empty string under the
circumstances when Posix says it should ("${@-${@-$@}}").
n. Fixed several bugs caused by referencing nameref variables whose values
are names of unset variables (or names that are valid for referencing
but not assignment), including creating variables in the temporary
environment.
o. Function tracing and error tracing are disabled if --debugger is supplied
at startup but the shell can't find the debugger start file.
p. Fixed a bug when IFS is used as the control variable in a for statement.
q. Fixed a bug with SIGINT received by a command substitution in an interactive
shell.
r. The checks for nameref variable self-references are more thorough.
s. Fixed several bugs with multi-line aliases.
t. Fixed `test' to handle the four-argument case where $1 == '(' and
$4 == ')'.
u. Fixed a bug in the expansion of $* in the cases where word splitting is
not performed.
v. Fixed a bug in execution of case statements where IFS includes the
pattern matching characters.
2. Changes to Readline
a. When refreshing the line as the result of a key sequence, Readline attempts
to redraw only the last line of a multiline prompt.
b. Fixed an issue that caused completion of git commands to display
incorrectly when using colored-completion-prefix.
c. Fixed several redisplay bugs having to do with multibyte characters and
invisible characters in prompt strings.
3. New Features in Bash
a. Value conversions (arithmetic expansions, case modification, etc.) now
happen when assigning elements of an array using compound assignment.
b. There is a new option settable in config-top.h that makes multiple
directory arguments to `cd' a fatal error.
c. Bash now uses mktemp() when creating internal temporary files; it produces
a warning at build time on many Linux systems.
4. New Features in Readline
a. The default binding for ^W in vi mode now uses word boundaries specified
by Posix (vi-unix-word-rubout is bindable command name).