-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog
3952 lines (3313 loc) · 144 KB
/
ChangeLog
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
12/6/2020
---------
[bash-5.1 released]
12/7
----
Makefile.in
- bashline.o: add dependency on ${DEFDIR}/builtext.h. Report from
Fazal Majid <[email protected]>
12/11
-----
builtins/wait.def
- wait_builtin: don't assign the variable given with -p if there are no
jobs to wait for. Report and fix from OÄuz <[email protected]>
arrayfunc.c
- kvpair_assignment_p: return non-zero if argument L appears to be a
key-value pair associative array compound assignment
- expand_and_quote_kvpair_word: run a single word in a key-value pair
associative array compound assignment through the appropriate
expansions and single-quote the result
arrayfunc.h
- kvpair_assignment_p, expand_and_quote_kvpair_word: extern declarations
subst.c
- expand_oneword: detect whether VALUE appears to be a key-value
pair compound assignment and call the appropriate function to expand
each word in the resulting list. Fixes inconsistency reported by
12/12
-----
subst.c
- command_substitute: don't reset pipeline_pgrp to shell_pgrp if we
are already forked to run a command (SUBSHELL_FORK). Fixes SIGINT
in command substitution in here-document in forked child issue
reported by [email protected]
12/18
-----
execute_cmd.c
- execute_pipeline: execute the lastpipe code even if prev == 0. It
can only be 0 here if stdin was closed when this function was
executed
- execute_pipeline: if prev == 0, set lstdin to a sentinel (-1) that
means to close fd 0 after executing the command, and call close(prev)
before restoring stdin. restore_stdin now understands -1, and closes
fd 0. Fixes issue reported by Tomas Janousek <[email protected]>
12/21
-----
doc/bashref.texi
- PROMPT_COMMANDS: clean up a couple of remaining instances of this
name. Report from Eli Schwartz <[email protected]>
12/26
-----
subst.c
- command_substitute: make sure that the child process always has
pipeline_pgrp == shell_pgrp: if pipeline_pgrp is non-zero when we
get to the child, meaning that we're part of an already-forked
child that is, for instance, running redirections, we need to reset
shell_pgrp to it to preserve the invariant. Fixes bug with terminal
being set to the incorrect pgrp reported by [email protected]
12/29
-----
configure.ac,builtins/shobj-conf,m4/threadlib.m4
- midnightbsd: update auto-configuration to treat MidnightBSD like
FreeBSD. From https://savannah.gnu.org/patch/?10006
12/30
-----
examples/loadables/stat.c
- stattime: use strftime with a default format or the format supplied
with the -F option to format the file time information
- stat_builtin: now takes a -F fmt option for a strftime format string;
change to function calling sequences to pass the format down to
stattime
examples/loadables/Makefile.in
- stat: now built and installed by default
12/31
-----
command.h
- SUBSHELL_IGNTRAP: new flag value
jobs.c
- make_child: set SUBSHELL_IGNTRAP in subshell_environment in the
child process, meaning that we should not execute trap handlers for
trapped signals
execute_cmd.c
- execute_in_subshell, execute_simple_command, execute_disk_command:
make sure to unset SUBSHELL_IGNTRAP after a child process restores
the original signal dispositions
- execute_simple_command: make sure to set SUBSHELL_IGNTRAP after
make_child returns and we're setting subshell_environment directly
subst.c
- command_substitute,process_substitute: unset SUBSHELL_IGNTRAP after
the child process has reset the trapped signal dispositions
trap.c
- trap_handler: if we get a signal for which we have set a trap, but
SUBSHELL_IGNTRAP is set in subshell_environmnent, make sure we
restore the original signal disposition and resend the signal to
ourselves. Fixes issue reported by Nikolay Borisov <[email protected]>
(or at least makes the race window much smaller)
sig.c
- initialize_terminating_signal: set the original signal handler from
the return value from sigaction; a minor optimization that saves a
system call or two
1/5/2021
--------
builtins/declare.def
- declare_internal: make some option combinations that don't make
sense errors (e.g., -f and -a/-A/-i/-n)
- declare_internal: if we build a new variable name by expanding the
value of a nameref variable, make sure to chop the `+' in a `+='
off before going on
1/7
---
doc/{bash.1,bashref.texi}
- bind: add an example to the synopsis making it clear that you can
use any readline command line as a non-option argument, as it says
in the text. From a report from Dan Jacobson <[email protected]>
1/12
----
locale.c
- local_shiftstates -> locale_shiftsates in the non-multibyte code
branch. Reported by Henry Bent <[email protected]>
subst.c
- expand_compound_assignment_word: make sure to call dispose_words on
the WORD_LIST * returned from expand_oneword after turning it back
into a string. Fixes memory leak reported by Alexander Mescheryakov
1/13
----
variables.c
- bind_variable_internal: when performing an assignment to a subscripted
array variable that was the value of a nameref (used in the original
assignment), don't call make_variable_value on the value, since that
messes up +=. Just call assign_array_element and let that take care
of calling make_variable_value appropriately. Fixes bug reported by
Oguz <[email protected]>
1/14
----
findcmd.c
- search_for_command: if `checkhash' is set, don't add non-executable
files to the command hash table, since we will just remove them
later
lib/sh/winsize.c
- get_new_window_size: set *rp and *cp even if READLINE is not defined
1/15
----
lib/sh/winsize.c
- get_new_window_size: call rl_set_window_size only if we can determine
we're using readline: an interactive shell without no-line-editing,
or if we've already initialized readline, presumably in a non-
interactive shell
support/Makefile.in
- man2html: add LDFLAGS_FOR_BUILD to the recipe. Report from
Jeffrey Walton <[email protected]>
1/17
----
lib/readline/misc.c
- rl_operate_and_get_next: fix old K&R function declaration. Report
from Tom Tromey <[email protected]>
lib/readline/readline.c
- _rl_internal_char_cleanup: move code that cleans up the active region
and deactivates the mark inside this function so callback mode
applications get the intended functionality. Report and fix from
lib/readline/bind.c
- rl_parse_and_bind: when using the arithmetic comparison operators on
the version, make sure to invert the tests so that we stop parsing
if the test fails. Report and fix from Tom Tromey <[email protected]>
1/19
----
Makefile.in
- pipesize.h: add dependency on ${BUILTINS_LIBRARY} to avoid parallel
makes trying to create it twice. Report and fix from
Richard Purdie <[email protected]>
1/21
----
subst.c
- param_expand: if a nameref expands to array[@] or array[*], make sure
to call chk_atstar so the right variables are set to split the
result. Report from Oguz <[email protected]>
1/22
----
builtins/declare.def
- Rewrote to reduce complexity. Still needs some work.
lib/readline/*.h, lib/tilde/tilde.h
- PARAMS: remove, rely on compilers understanding function prototypes
lib/readline/{undo.c,histlib.h}
- _hs_replace_history_data: move extern declaration to histlib.h
lib/readline/readline.c
- _rl_parse_colors: instead of an extern declaration for this, include
"parse-colors.h" for it
lib/readline/{histfile.c,histlib.h}
- _hs_append_history_line: move extern declaration to histlib.h
lib/readline/history.h
- HS_HISTORY_VERSION: define to 0x0801 (current library version) if
it's not already defined. We conditionally define it in case an
application has (unwisely) chosen to use it, since the history
library doesn't do anything with it yet
lib/readine/{rlprivate.h,{search,misc,readline}.c}
- _rl_free_history_entry: add extern declaration to rlprivate.h, remove
extern declaration from c source files. Use HS_HISTORY_VERSION as a
sentinel that it's ok to use HIST_ENTRY in rlprivate.h
lib/readline/{rlprivate.h,{isearch,search,undo}.c}
- _rl_saved_line_for_history: add extern declaration to rlprivate.h,
remove extern declaration from c source files, using HS_HISTORY_VERSION
in the same way
1/24
----
lib/readline/signals.c
- _rl_handle_signal: make sure that all sigprocmask calls are protected
by HAVE_POSIX_SIGNALS. Report and fix from Tom Tromey <[email protected]>
1/26
----
lib/readline/callback.c
- rl_callback_read_char: make sure rl_linefunc is non-NULL before
calling through the pointer. The line function could have been
removed by the application before readline processes any typeahead
input. Bug reported by Matthias Klose <[email protected]>, pointer
to root cause from Koichi Murase <[email protected]>
lib/glob/glob.c
- skipname,wskipname: put in some additional checks for `.' to ensure
that we don't get false positives (or incomplete tests) that can
affect the results of extglob patterns. Reported by
gregrwm <[email protected]>
1/27
----
lib/glob/glob.c
- extglob_skipname,wextglob_skipname: fixed an off-by-one error (SE
was being set to one character before the end of the pattern string,
not the null character at the end of the pattern string like other
callers of glob_patscan) that caused the last character of the last
subpattern to be cut off when calling skipname
- extglob_skipname,wextglob_skipname: some cleanups so the code is
closer to identical for the single-byte and wide character versions
2/1
---
execute_cmd.c
- execute_simple_command: in posix mode, if we have a variable
assignment error while assigning into the temporary environment (e.g.,
assigning to a readonly variable), a non-interactive shell running a
special builtin exits; a non-interactive shell running anything else
jumps back to the top level. A shell compiled with -DSTRICT_POSIX
exits unconditionally.
- execute_simple_command: make sure posix mode sets $? to non-zero
if a variable assignment error occurs preceding a non-special builtin
subst.c
- do_assignment_statements: take the code from expand_word_list_internal
that performs assignment statements, either standalone or preceding
simple command names, and factor it out into this function
- expand_word_list_internal: call do_assignment_statements where
appropriate
2/2
---
lib/glob/glob.c
- dequote_pathname: fix function definition for non-multibyte systems.
Report and fix from Marc Aurèle La France <[email protected]>
Makefile.in,doc/Makefile.in
- for certain targets, remove files before creating them to deal with
symlinked build trees.
Report and fix from Marc Aurèle La France <[email protected]>
examples/loadables/accept.c
- include limits.h before typemax.h
Report and fix from Marc Aurèle La France <[email protected]>
builtins/gen-helpfiles.c
- if USING_BASH_MALLOC is defined, make sure to undefine malloc as well
as free. Fixes bug reported by George R Goffe <[email protected]>
builtins/Makefile.in
- install-help: now depends on $(HELPFILES_TARGET) so we make sure the
separate helpfiles are created before we try to install them if we
don't go through the `all' makefile target
configure.ac
- HELPDIR: now ${datadir}/bash/helpfiles
2/3
---
parse.y
- parse_string_to_word_list: before expanding a compound assignment
statement body, make sure to save any alias that's currently being
expanded. Restore the alias after the compound assignment is parsed.
Reported back in 11/2020 by Alex fxmbsw7 Ratchev <[email protected]>
2/4
---
lib/readline/histexpand.c
- history_expand_internal: when calling the history_inhibit_expansion
function, make sure to call it using the string as we've expanded it
to that point (RESULT), adding the expansion and next characters
temporarily, since we make expansion decisions based on what we've
accumulated, not what we started with. This makes things like
echo abc!$!$ work, where before the second `!' inhibited expansion
because bash_history_inhibit_expansion mistakenly took it as the
second character in a `$!' word expansion. Fixes bug reported back
in 10/2020 by Paul Fox <[email protected]>
array.h
- array_pop: instead of calling array_dispose_element from this macro,
just call array_shift with the AS_DISPOSE flag
2/5
---
bashhist.c
- shell_comment: move condition to return 0 if the delimiter stack is
not empty or the shell is parsing a here document into the function
itself, don't have the callers check so the check is in one place.
Fixes bug reported by Oguz <[email protected]>
array.h,variables.c
- ARRAY_ELEMENT_REPLACE: convenience define for modifying an array
element's value
variables.c
- pop_args: a couple of code simplifications
2/7
---
lib/malloc/malloc.c
- pagesz: at least MALLOC_PAGESIZE_MIN (4096) bytes
- union mhead: now 16-byte aligned on all systems, 32-bit and 64-bit
pointers
- binsizes: since the smallest allocation overhead is now 16 bytes,
redo the buckets so binsizes[0] == 32; adjust the thresholds for
split/coalesce/prepopulate/mmap (NBUCKETS = 28; STARTBUCK = 0).
Sizes stay pretty much the same; indices change
- consistently use MALLOC_SIZE_T instead of long/unsigned int/int
- use MAGIC8_NUMBYTES as the length of the mh_magic8 buffer, in case
it changes later for alignment
- internal_remap: new function, calls mremap to reallocate a chunk of
memory allocated using mmap(); called from internal_realloc if the
old size and new size are both bigger than the mmap threshold
- internal_realloc: call internal_remap if the old size and new size
are both above the threshold where we use mmap for allocation
2/10
----
include/timer.h
- new file, declaration for a timer struct to be used by a set of
functions to implement timers using SIGALRM or select/pselect
lib/sh/timers.c
- new file, set of functions to manipulate timer objects and timeouts
using SIGALRM or select/pselect. Inspired by a patch from
Koichi Murase <[email protected]>. Not used yet
2/11
----
builtins/read.def
- read_builtin: if there is a timeout set, block SIGCHLD around calls
to zread and its siblings, or calls to readline for `read -e', so
SIGCHLD (and the consequent waitpid) doesn't interrupt the read.
Fixes bug reported by Koichi Murase <[email protected]>, but
there may be a different fix coming
Makefile.in,builtins/Makefile.in
- fix up dependencies, especially on builtins.h and builtext.h
2/12
----
lib/readline/input.c
- rl_read_key: if we set rl_done == 1, set RL_STATE_DONE as well
Reported by Koichi Murase <[email protected]>
lib/readline/isearch.c
- _rl_search_getchar: only call _rl_read_mbstring if rl_read_key returns
>= 0, avoid some work
lib/readline/vi_mode.c
- _rl_vi_callback_change_char,_rl_vi_change_char: don't overwrite the
last replacement string if _rl_vi_callback_getchar returns -1.
It will likely make no difference, since the next read will return
an error or EOF, but being careful
- rl_vi_overstrike: if _rl_overwrite_char doesn't return 0, break out
of the loop
lib/readline/text.c
- _rl_overwrite_char: return 1 if _rl_read_mbstring returns < 0 so
we don't try to insert garbage
bashline.c
- posix_edit_macros: handle rl_read_key() returning <= 0
2/15
----
parse.y
- read_comsub: make sure to turn on the LEX_RESWDOK flag if we are in
a case statement and read a `)', since we can get a valid `esac'.
Fixes bug reported by Oguz <[email protected]>
- read_comsub: if we're in a case statement, recognize `}' as a
reserved word and set the LEX_RESWDOK flag for the next word, since
we can get an esac (or another reserved word) after it
2/16
----
parse.y
- reserved_word_acceptable: add ARITH_CMD and COND_END to the list of
tokens that can precede a reserved word, so you can use reserved
words after ((...)) and [[...]].
Reported by Koichi Murase <[email protected]>
2/17
----
parse.y
- parse_comsub: use new LEX_CASEWD flag to track when we are reading
the WORD in `case WORD in' and turn on the LEX_RESWDOK flag when
that word ends. This allows $(case x in esac), which no one uses.
- parse_comsub: use LEX_PATLIST flag to track when we are reading a
case pattern list so `|' doesn't turn on the LES_RESWDOK flag
- parse_comsub: case_level: simple counter to count the number of esacs
we need to see before we're no longer in a case statement; analog of
esacs_needed_count from the lexer
2/19
----
parse.y
- CHECK_FOR_RESERVED_WORD: don't return ESAC if we read `esac' after a
left paren in a case pattern list. From an austingroup-bugs discussion
about https://www.austingroupbugs.net/view.php?id=1454
- parse_comsub: if we read a `(' while looking for a case pattern list
and LEX_CKESAC is set, we have a leading left paren in the pattern
list and should turn off LEX_CKESAC so (esac) doesn't prematurely
terminate the case command. From an austingroup-bugs discussion
about https://www.austingroupbugs.net/view.php?id=1454
2/26
----
builtins/history.def
- history_builtin: when checking negative offsets to -d, which are
supposed to count back from the end of the history list, check the
range against 0 instead of history_base, because the calculation is
done against history_length, which is independent of history_base.
Report and fix from Christopher Gurnee <[email protected]>
2/28
----
doc/bashref.texi
- replaced a number of uses of @var with a mixture of @env and @dfn
to better match up with the texinfo standards
doc/{bash.1,bashref.texi}
- clarify some aspects of the coproc description, especially the
use of NAME and when it's optional
3/1
---
subst.c
- read_comsub: fix off-by-one error in mbrtowc that causes a read one
character past the end of buf. Report and fix from
Platon Pronko <[email protected]> in
https://savannah.gnu.org/patch/?10035
3/3
---
builtins/ulimit.def
- ulimit_builtin: Posix compatibility: if the last command specified
by an option does not have an option argument, but there is an
operand remaining after all the options are parsed, treat the
operand as an argument to that last command. From an austin-group
discussion and a Geoff Clare suggestion back in November, 2020.
Austin Group interpretation 1418
examples/shellmath
- a package of shell functions to perform floating-point math entirely
in bash. Contributed by Michael Wood <[email protected]>. Available
at https://github.com/clarity20/shellmath
3/4
---
support/shobj-conf
- darwin: take out the -arch-only option in SHOBJ_XLDFLAGS and
SHOBJ_ARCHFLAGS; no longer needed
doc/{bash.1,bashref.texi}
- coprocesses: suggested changes from [email protected]; recommend the
`coproc NAME { commands; }' form as the simplest and most flexible
3/5
---
builtins/exec.def
- exec_builtin: set last_command_exit_value before calling exit_shell
so any exit trap gets the right value for $?. From Matthew Bauer
<[email protected]> via https://savannah.gnu.org/patch/?10039
3/8
---
include/timer.h
- SHTIMER_ALRMSET: new flag, indicates that there is an active alarm
associated with this timer (falarm() was called)
lib/sh/timers.c
- shtimer_set: set the SHTIMER_ALRMSET flag after calling falarm
- shtimer_unset: don't call falarm(0,0) unless the SHTIMER_ALRMSET flag
is set
3/9
---
include/posixtime.h
- added some BSD convenience defines if they are not present
parse.y,shell.h
- {save,restore}_parser_state: save and restore shell_eof_token and
pushed_string_list; change callers (e.g., xparse_dolparen) so they
don't have to manage them
3/10
----
builtins/common.h
- extern declarations for moving to timers (sh_timer) for read builtin
timeouts
quit.h
- CHECK_ALRM: remove, no longer used
trap.c
- check_signals: call check_read_timeout instead of CHECK_ALRM
bashline.c
- bash_event_hook: use read_timeout instead of checking `sigalrm_seen';
that no longer exists
- bash_event_hook: accommodate readline timing out (not used yet)
lib/sh/zread.c
- zread: call read_builtin_timeout() to check for a timeout before
calling a blocking read()
builtins/read.def
- sigalrm,reset_timeout,check_read_timeout,read_builtin_timeout: new
and modified functions to use sh_timers for timeouts instead of
SIGALRM. Based on work contributed by Koichi Murase
- read_builtin: use sh_timers for read timeouts (-t N) instead of
using SIGALRM
- edit_line: simulate receiving SIGALRM if readline times out (not
used yet)
3/11
----
lib/readline/readline.c
- rl_initialize: call _rl_timeout_init to set things up for any timeout
that was set with rl_set_timeout
- readline_internal_charloop: if we longjmped because of a timeout,
make sure to set rl_done/RL_STATE_DONE and return; we are
abandoning this call to readline(). The readline timeout changes
were based on work contributed by Koichi Murase
lib/readline/readline.h
- extern declarations for new timeout functions and hook
- rl_clear_timeout: new define
lib/readline/callback.c
- rl_callback_read_char: if we longjmped because of a timeout,
make sure to set rl_done/RL_STATE_DONE and return; we are
abandoning this call to readline()
lib/readline/util.c
- _rl_abort_internal: if we time out, don't ring the bell; let the
caller handle it
lib/readline/input.c
- extern declarations for public and readline-library-private functions
and hooks to implement timeouts
- rl_set_timeout,rl_timeout_remaining: new public functions
- _rl_timeout_select: new function, uses select/pselect to implement
read timeouts that take timeouts set with rl_set_timeout into account;
calling hook function if a timeout occurs
- rl_gather_tyi, _rl_input_available: use _rl_timeout_select, taking
any existing timeout into consideration if it expires before the
timeout passed as an argument
- rl_getc: use _rl_timeout_select and handle any timeouts by calling
_rl_timehout_handle
- set_alarm,reset_alarm: new functions to implement timeouts using
SIGALRM for systems that lack a working select/pselect
- _rl_timeout_init: new function, sets things up for reading input
with a specified timeout
- _rl_timeout_handle: a timeout handler; calls any event hook and
sets up to abort the current readline() call
- _rl_timeout_handle_sigalrm: a timeout handler for systems using
SIGALRM to implement timeouts
lib/readline/parens.c
- rl_insert_close: use _rl_timeout_select to take timeouts into account
lib/readline/rlprivate.h
- extern declarations for readline-library-private timeout functions
lib/readline/rltty.c
- rl_deprep_terminal: don't print a newline after the bracketed paste
disable sequence if we timed out
lib/readline/signals.c
- _rl_handle_signal: if sig is SIGALRM, call _rl_timeout_handle_sigalrm()
lib/readline/doc/rltech.texi
- rl_set_timeout,rl_timeout_remaining: document new public functions
- RL_STATE_TIMEOUT: document new possible state value for rl_readline_state
- rl_timeout_event_hook: document new hook function, called when
readline times out
builtins/read.def
- read_builtin: changes to use the readline timeout functions to
implement timeouts with `read -e'; these use rl_set_timeout and
sh_timer structs together
3/12
----
subst.c
- expand_string_dollar_quote: new function, expands $'...' and $"..."
in a string for those code paths that don't expand it themselves
subst.h
- expand_string_dollar_quote: extern declaration
parse.y
- read_secondary_line: if $'...' or $"..." appears in the line, call
expand_string_dollar_quote to expand them. This now returns new
memory, need to change callers
make_cmd.c
- make_here_document: account for read_secondary_line returning newly
allocated memory, free `full_line' appropriately
bashline.c
- shell_expand_line,history_and_alias_expand_line: expand $'...' and
$"..." in the line by calling expand_string_dollar_quote, since
that happens after history expansion and before alias expansion in
normal processing
3/15
----
subst.c
- expand_string_dollar_quote: fix out-of-order initialization
Makefile.in
- {TAGS,tags}: add ETAGS/ETAGSFLAGS/CTAGS/CTAGS flags; make sure to
cd to the source directory before running them to get source files
that don't have absolute paths. Fix from Mike Jonkmans
parse.y
- xparse_dolparen: don't longjmp if FLAGS includes SX_NOLONGJMP. From
a report by Xu Lu <[email protected]>
3/16
----
subst.c
- process_substitute: set startup_state and parse_and_execute_level
to see if we can avoid a fork()
bashline.c
- bash_spell_correct_word: bindable command (spell-correct-word) to
perform spelling correction on the current `shellword', using the
same code as the `cdspell' option and directory spelling correction
during completion. Feature suggested by in 10/2020 by
Karl Kleinpaste <[email protected]>
- bash_spell_correct_word: bound to "C-x s" by default in emacs mode
lib/readline/display.c
- rl_redisplay: fix redisplay problem that occurs when switching from
the rl-digit-argument prompt "(arg: N)" back to the regular prompt,
and the regular prompt contains invisible characters
doc/bash.1,lib/readline/doc/rluser.texi
- spell-correct-word: document new function and its default binding
3/17
----
doc/{bash.1,bashref.texi}
- cd: slight changes to specify that it sets PWD and OLDPWD
- {pushd,popd}: make it clear that these builtins use cd to change
the current working directory; change wording to simplify the
description and clarify the exit status
3/18
----
execute_cmd.c
- execute_disk_command: after performing redirections, call
unlink_all_fifos() to remove the FIFOs created as part of
expanding redirections. They should have been opened by then, and
we're going to call shell_execve right away anyway, so we won't be
around to remove the FIFOs. From a report from
Michael Felt <[email protected]>
3/22
----
parse.y
- alias_expand_token: slight tweak to check for alias expansion: perform
expansion unconditionally if PST_ALEXPNEXT is set, and disable it
in case statement pattern lists if the previous token indicates a
command name is acceptable.
From a report by Oguz <[email protected]>
config-bot.h
- HAVE_MKDTEMP: fix typo
3/25
----
lib/readline/terminal.c
- look in terminfo for key sequences for page up (kP) and page down
(kN) and bind them to history-search-{backward,forward},
respectively. From a patch from Xose Vazquez Perez
3/30
----
doc/bashref.texi
- expand the node describing $"..." string translation with additional
details and examples
3/31
----
misc.c
- rl_fetch_history: moved here from vi_mode.c
- rl_fetch_history: negative arguments count back from the end of
the history, instead of taking you to the beginning of the history
list
- rl_fetch_history: in vi mode, an out-of-range argument rings the
bell and doesn't change the line
vi_mode.c
- rl_vi_fetch_history: call rl_fetch_history
readline.h
- rl_fetch_history: new extern declaration
doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
- rl_fetch_history: add description
builtins/setattr.def
- show_var_attributes: if a variable's value indicates that it should
be ANSI-C quoted, use ansic_quote instead of sh_double_quote to
format the value string. From proposal by Greg Wooledge
4/5
---
arrayfunc.c
- unbind_array_element: if FLAGS includes VA_ONEWORD, don't use
skipsubscript to parse the subscript, just assume the entire SUB is
the subcript and that it contains the closing `]', so we just want
everything in SUB except the last character.
parse.y:
- select_command: use compound_list instead of list, like for_command.
Report by Greywolf <[email protected]>
- list: move this into compound_list (replacing the instance of `list'
in the compound_list production), remove from the grammar
4/6
---
arrayfunc.c
- unbind_array_element: use VA_NOEXPAND instead of literal 1
4/7
---
lib/readline/funmap.c
- default_funmap: add missing `vi-undo' to the list of vi-mode bindable
functions. Reported by Xirui Zhao <[email protected]>
4/8
---
config-top.h
- DEFAULT_LOADABLE_BUILTINS_PATH: default value for BASH_LOADABLES_PATH
doc/{bash.1,bashref.texi}
- enable: note that it uses $BASH_LOADABLES_PATH, and that the default
is system-dependent
variables.c
- initialize_shell_variables: initialize BASH_LOADABLES_PATH to the
default given in DEFAULT_LOADABLE_BUILTINS_PATH
4/12
----
doc/{bash.1,bashref.texi}
- add link to git master tar file as a place to get the current version
4/14
----
bashline.c
- attempt_shell_completion: use -1 as a sentinel value for
in_command_position indicating that we cannot be in a command position
(e.g., because we're the target of a redirection) and should not
check for a programmable command completion or tell the programmable
completion code to use command completion. Report and fix from
Marc Aurèle La France <[email protected]>
4/16
----
builtins/bind.def
- bind_builtin: reverse sense of strvec_search return value when
deciding whether or not to remove a unix-command binding from the
cmd keymap. Bug report by Dale Sedivec <[email protected]>
lib/readline/doc/rltech.texi
- RL_PROMPT_{START,END}_IGNORE: document current values of \001 and
\002. Report from Mingye Wang <[email protected]>
4/19
----
arrayfunc.c
- assign_assoc_from_kvlist: fix memory leak reported by konsolebox
4/20
----
command.h,subst.c
- W_ITILDE: remove, replace with a variable since it's only used inside
a single call to expand_word_internal
4/21
----
{subst.c,make_cmd.c,parse.y}
- W_DQUOTE: no longer used, use W_NOPROCSUB and W_NOTILDE directly
(for arithmetic commands and words in arithmetic for commands)
4/24
----
bashline.c
- executable_completion: since this function gets an unquoted filename
from rl_filename_completion_function, we need to quote special
characters before passing it to bash_directory_completion_hook.
Report from Alex fxmbsw7 Ratchev <[email protected]>
4/26
----
lib/readline/search.c
- _rl_nsearch_abort: move function calls around so _rl_restore_prompt
happens before rl_clear_message, like when aborting an incremental
search. Suggested by [email protected]
subst.h
- ASS_ALLOWALLSUB: new assignment flag value, means to allow @ and * as
valid array subscripts when assigning to existing associative arrays
arrayfunc.c
- assign_array_element: allow assignment of key `@' to an existing
associative array if the caller passes ASS_ALLOWALLSUB
- assign_compound_array_list: allow ( [@]=value ) to an existing
associative array
builtins/declare.def
- declare_internal: allow assignment of key `@' to an existing
associative array by passing ASS_ALLOWALLSUB to assign_array_element
as part of local_aflags. This affects declare, local, and typeset
subst.c
- do_assignment_internal: allow a[@]=value to an existing associative
array by passing ASS_ALLOWALLSUB to assign_array_element
4/27
----
builtins/common.[ch]
- builtin_bind_var_to_int: wrapper for bind_var_to_int to be used by
builtin commands; placeholder for future work
builtins/wait.def
- builtin_bind_var_to_int: use instead of bind_var_to_int
builtins/common.c
- builtin_bind_variable: allow assignment of key `@' to an existing
associative array by passing ASS_ALLOWALLSUB to assign_array_element.
This affects printf and read
builtins/variables.[ch]
- bind_var_to_int: add third `flags' argument to pass to bind_variable
instead of always passing 0
redir.c,builtins/common.c,builtins/printf.def
- bind_var_to_int: change callers, add third flags argument
builtins/common.c
- builtin_bind_var_to_int: pass ASS_ALLOWALLSUB to bind_var_to_int so
builtins like wait can assign to assoc[@] and assoc[*]
4/28
----
bashline.c
- command_word_completion_function: make sure to initialize
old_glob_ignore_case before trying to restore from it
- command_word_completion_function: if we are completing a glob
pattern, make sure to set rl_filename_completion_desired, so we get
quoting and appending -- we are completing a filename, after all.
From a report from Manuel Boni <[email protected]>
lib/readline/bind.c
- enable-active-region: separate control of the active region and
bracketed paste. Still set to the same default value as bracketed
paste, and enabling bracketed paste enables the active region.
Now you can enable bracketed paste and then turn off the active
region.
doc/bash.1,lib/readline/doc/{readline.3,rltech.texi}
- enable-active-region: document new bindable readline variable and
its effects
4/30
----
command.h
- W_ARRAYREF: new flag, meaning the word is a valid array reference
with subscript, replaces W_DOLLARSTAR, which was unused
subst.c
- expand_subscript_string,expand_array_subscript: new functions to
parse and expand-and-quote array subscripts. For future use
5/3
---
builtins/mapfile.def
- mapfile: if the delimiter is a newline, set unbuffered_read = 1
for any file descriptor that isn't seekable and lseek sets errno
to ESPIPE (pipes, FIFOs, maybe terminal devices). If it's not a
newline, only allow buffered reads if the file descriptor is a
regular file. Report from Koichi Murase <[email protected]>
builtins/read.def
- read_builtin: only set unbuffered_read = 1 if the input is coming
from a pipe (which we can't seek on) or the input is a terminal and
we want to read a specified number of characters or we're using a
non-standard delimiter
5/4
---
builtins/mapfile.def
- mapfile: call zsyncfd before calling the callback. Suggested by
Koichi Murase <[email protected]>; we'll see how it goes
5/5
---
subst.h
- expand_subscript_string: extern declaration
{arrayfunc,subst}.c
- expand_subscript_string: replace expand_assignment_string_to_string
with calls to this when expanding array subscripts
subst.c
- cond_expand_word: call expand_word_internal with Q_ARITH if `special'
says we should quote for an arithmetic expression context
- expand_word_internal: call expand_array_subscript when we see `[' in
arithmetic or array subscript contexts, make conditional on the
compatibility level later
- expand_word_internal: make sure W_ARRAYREF makes it through this
function and into the returned word
5/6
---
arrayfunc.c