-
Notifications
You must be signed in to change notification settings - Fork 0
/
changelog
11681 lines (9870 loc) · 429 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
2/14/2011
---------
[bash-4.2 released]
2/15
----
lib/glob/gmisc.c
- fix wmatchlen and umatchlen to avoid going past the end of the
string on an incomplete bracket expression that ends with a
NUL. Partial fix for bug reported by Clark Wang <[email protected]>
2/16
----
subst.h
- new string extract flag value: SX_WORD. Used when calling
extract_dollar_brace_string to skip over the word in
${param op word} from parameter_brace_expand
subst.c
- change parameter_brace_expand to add SX_WORD to flags passed to
extract_dollar_brace_string
- change parameter_brace_expand to use SX_POSIXEXP for all non-posix
word expansion operators that treat single quotes as special, not
just % and #
- change extract_dollar_brace_string to initialize dolbrace_state to
DOLBRACE_WORD if SX_WORD flag supplied and we shouldn't use
DOLBRACE_QUOTE. Fixes bug reported by Juergen Daubert <[email protected]>
doc/{bash.1,bashref.texi}
- document the exact expansions here strings undergo
2/17
----
lib/readline/vi_mode.c
- make sure that `dd', `cc', and `yy' call vidomove_dispatch from
rl_domove_read_callback. Fixes bug reported by Clark Wang
lib/readline/callback.c
- make sure _rl_internal_char_cleanup is called after the
vi-motion callbacks (rl_vi_domove_callback) in rl_callback_read_char.
Companion to above fix
doc/{bash.1,bashref.texi}
- make sure that the text describing the rhs of the == and =~
operators to [[ states that only the quoted portion of the pattern
is matched as a string
2/18
----
lib/glob/gmisc.c
- better fix for umatchlen/wmatchlen: keep track of the number of
characters in a bracket expression as the value to increase
matchlen by if the bracket expression is not well-formed. Fixes
bug reported by Clark Wang <[email protected]>
subst.c
- change expand_string_for_rhs so that it sets the W_NOSPLIT2 flag
in the word flags. We will not perform word splitting or quote
removal on the result, so we do not want to add quoted nulls if
we see "" or ''. Fixes bug reported by Mike Frysinger
2/19
----
variables.c
- new function, int chkexport(name), checks whether variable NAME is
exported and remakes the export environment if necessary. Returns
1 if NAME is exported and 0 if not
- call chkexport(name) to get tzset to look at the right variable in
the environment when modifying TZ in sv_tz. Don't call tzset if
chkexport doesn't indicate that the variable is exported
variables.h
- new extern declaration for chkexport
{parse.y,builtins/printf.def}
- call sv_tz before calling localtime() when formatting time strings
in prompt strings or using printf. Fixes bug reported by
Dennis Williamson <[email protected]>
execute_cmd.c
- modify fix of 2/9 to add casts when those variables are passed to
functions; some compilers throw errors instead of warnings. Report
and fix from Joachim Schmitz <[email protected]>
support/shobj-conf
- add a stanza for nsk on the Tandem from Joachim Schmitz
{shell,lib/readline/shell}.c
- Tandem systems should use getpwnam (getlogin()); for some reason
they don't do well with using getuid(). Fix from Joachim Schmitz
3/1
---
variables.c
- make sure that the return value from find_variable is non-null
before trying to use it in chkexport. Fixes bug reported by
Evangelos Foutras <[email protected]>
3/3
---
parse.y
- when adding $$ to the current token buffer in read_token_word(),
don't xmalloc a buffer for two characters and then strcpy it, just
copy the characters directly into the token buffer. Fix from
Michael Whitten <[email protected]>
execute_cmd.c
- fix expand_word_unsplit to add the W_NOSPLIT2 flag to the word to
be expanded, so "" doesn't add CTLNUL. Similar to fix of 2/18 to
expand_string_for_rhs. Fixes bug reported by Nathanael D. Noblet
<[email protected]> and Matthias Klose <[email protected]>
parse.y
- fix extended_glob case of read_token_word to allocate an extra
space in the buffer for the next character read after the extended
glob specification if it's a CTLESC or CTLNUL. Report and fix from
Michael Witten <[email protected]>
- fix shell expansions case of read_token_word to allocate an extra
space in the buffer for the next character read after the shell
expansion if it's a CTLESC or CTLNUL. Report and fix from
Michael Witten <[email protected]>
- TENTATIVE: fix read_token_word to reduce the amount of buffer space
required to hold the translated and double-quoted value of $"..."
strings. Report and fix from Michael Witten <[email protected]>
- change code around got_character and got_escaped_character labels to
make sure that we call RESIZE_MALLOCED_BUFFER before adding the
CTLESC before a CTLESC or CTLNUL, and before adding the character if
we're not adding a CTLESC. Report and fix from
Michael Witten <[email protected]>
subst.c
- new param flags value, PF_ASSIGNRHS, mirrors W_ASSIGNRHS, noting that
parameter expansion is on rhs of assignment statement. That inhibits
word splitting
- change param_expand to call string_list_dollar_at with quoted == 1
if PF_ASSIGNRHS is set, so it will quote IFS characters in the
positional parameter before separating them with the first char of
$IFS. This keeps the rhs from being split inappropriately. Fixes
bug reported by Andres Perera <[email protected]>
3/4
---
lib/readline/bind.c
- add a missing free of `names' in rl_function_dumper. Bug report
and fix from Michael Snyder <[email protected]>
3/5
---
lib/readline/rltty.c
- change rl_deprep_terminal so it uses fileno (stdin) for the tty fd
if rl_instream is not set, like rl_prep_terminal
3/6
---
lib/readline/display.c
- fix rl_message to use a dynamically-allocated buffer instead of a
fixed-size buffer of 128 chars for the `local message prompt'. Bug
report and fix from Micah Cowan <[email protected]>
3/7
---
jobs.c
- add sentinel to wait_sigint_handler so it only sets wait_sigint_received
if waiting_for_child is non-zero; otherwise, it restores the old
SIGINT handler and sends itself the SIGINT
- set waiting_for_child around the calls to waitchld that use it to
synchronously wait for a process
- change logic that decides whether or not the child process blocked
or handled SIGINT based on whether or not waitpid returns -1/EINTR
and the shell receives a SIGINT and the child does not exit. If
the child later exits due to SIGINT, cancel the assumoption that it
was handled
- instead of testing whether or not the child exited due to SIGINT
when deciding whether the shell should act on a SIGINT it received
while waiting, test whether or not we think the child caught
SIGINT. If it did, we let it go (unless the shell has it trapped);
if it did not catch it, the shell acts on the SIGINT. Fix from
Linus Torvalds <[email protected]>, bug report originally
from Oleg Nesterov <[email protected]>
3/8
---
shell.c
- initialize no_line_editing to 1 if READLINE is not defined -- we
can't have line editing without readline
3/12
----
lib/readline/signals.c
- add SIGHUP to the set of signals readline handles
lib/readline/doc/rltech.texi
- document that SIGHUP is now part of the set of signals readline
handles
lib/readline/input.c
- if _rl_caught_signal indicates that read() was interrupted by a
SIGHUP or SIGTERM, return READERR or EOF as appropriate
- call rl_event_hook, if it's set, if call to read in rl_getc
returns -1/EINTR. If rl_event_hook doesn't do anything, this
continues the loop as before. This handles the other fatal
signals
execute_cmd.c
- add a couple of QUIT; calls to execute_disk_command and
execute_simple_command to improve responsiveness to interrupts
and fatal signals
input.c
- rearrange getc_with_restart so that the return values from read()
are handled right
parse.y
- don't need to set terminate_immediately in yy_stream_get, since
getc_with_restart checks for terminating signals itself
- since readline returns READERR on SIGHUP or SIGTERM, don't need
to set terminate_immediately. Still doesn't handle other
signals well -- will have to check that some more
bashline.c
- new function, bash_event_hook, for rl_event_hook. Just checks for
terminating signals and acts on them using CHECK_TERMSIG.
- set rl_event_hook to bash_event_hook
builtins/read.def
- take out setting terminate_immediately; add calls to CHECK_TERMSIG
after read calls
doc/{bash.1,bashref.texi}
- move the text describing the effect of negative subscripts used to
reference indexed array elements to the paragraphs describing
${parameter[subscript]}, since that's where they are implemented.
Pointed out by Christopher F. A. Johnson <[email protected]>
arrayfunc.[ch],subst.c
- array_expand_index now takes a new first argument: a SHELL_VAR *
of the array variable being subscripted. Can be used later to fully
implement negative subscripts
3/14
----
lib/glob/glob.c
- fix mbskipname to not turn the directory entry name into a wide char
string if the conversion of the pattern to a wide char string fails
- fix mbskipname to call skipname if either the pattern or the filename
can't be converted into a wide-char string
lib/glob/xmbsrtowcs.c
- fix xdupmbstowcs2 to handle return value of 0 from mbsnrtowcs and
short-circuit with failure in that case. Fixes bug reported by
Roman Rakus <[email protected]>
3/15
----
bashline.c
- new variable, bash_filename_quote_characters to store the value
assigned to rl_filename_quote_characters so it can be restored
if changed.
- change bashline_reset and attempt_shell_completion to restore
rl_filename_quote_characters if not set to default
3/22
----
lib/glob/glob.c
- wdequote_pathname falls back to udequote_pathname if xdupmbstowcs
fails to convert the pathname to a wide-character string
lib/glob/xmbsrtowcs.c
- xdupmbstowcs2: change to fix problem with leading '\\' (results in
nms == 0, which causes it to short-circuit with failure right
away). Fixes bug pointed out by Werner Fink <[email protected]>
- xdupmbstowcs2: compensate for mbsnrtowcs returning 0 by taking the
next single-byte character and going on
- xdupmbstowcs2: change memory allocation to increase by WSBUF_INC
bytes; try to avoid calls to realloc (even if they don't actually
result in more memory being allocated)
3/24
----
doc/{bash.1,bashref.texi}
- slightly modify BASH_SUBSHELL description based on complaint from
Sam Liddicott <[email protected]>
3/25
----
trap.c
- change free_trap_strings to not call free_trap_string for signals
that are being ignored, like reset_or_restore_signal_handlers.
Fixes bug reported by Satoshi Takahashi <[email protected]>
3/26
----
lib/readline/rltypedefs.h
- remove old Function/VFunction/CPFunction/CPPFunction typedefs as
suggested by Tom Tromey <[email protected]>
lib/readline/rlstdc.h
- move defines for USE_VARARGS/PREFER_STDARG/PREFER_VARARGS from
config.h.in to here because declaration of rl_message in
readline.h uses the defines. This makes it hard for another packages
to use after the header files are installed, since config.h is not
one of the installed files. Suggested by Tom Tromey
3/27
----
print_cmd.c
- change indirection_string from a static buffer to a dynamic one
managed by indirection_level_string(), so we don't end up truncating
PS4. Suggested by Dennis Williamson <[email protected]>
lib/readline/shell.c
- change sh_set_lines_and_columns to use static buffers instead of
allocating the buffers to pass to setenv/putenv
lib/readline/terminal.c
- change _rl_get_screen_size to not call sh_set_lines_and_columns if
ignore_env == 0
- _rl_sigwinch_resize_terminal: new function to just retrieve terminal
size, ignoring environment
lib/readline/rlprivate.h
- new external declaration for _rl_sigwinch_resize_terminal() (currently
unused)
lib/readline/signals.c
- rl_sigwinch_handler: set _rl_caught_signal to SIGWINCH
- rl_sigwinch_handler: don't immediately call rl_resize_terminal; just
leave _rl_caught_signal set for RL_CHECK_SIGNALS to handle
- _rl_signal_handler: call rl_resize_terminal if sig == SIGWINCH.
Should fix hang when sending multiple repeated SIGWINCH reported by
Henning Bekel <[email protected]>
3/29
----
lib/sh/snprintf.c
- include math.h for any defines for isinf/isnan
- use code from gnulib documentation to implement isinf/isnan if they
are not defined
configure.in
- don't check for isinf or isnan; c99 says they're macros anyway
config.h.in
- remove defines for ISINF_IN_LIBC and ISNAN_IN_LIBC, no longer used
by snprintf.c
4/2
---
braces.c
- brace_gobbler: fix to understand double-quoted command substitution,
since the shell understands unquoted comsubs. Fixes bug reported
by Michael Whitten <[email protected]>
lib/readline/display.c
- include <pc.h> on MDOS
- get and set screen size using DJGPP-specific calls on MSDOS
- move cursor up clear screen using DJGPP-specific calls
- don't call tputs on DJGPP; there is no good terminfo support
lib/readline/terminal.c
- include <pc.h> on MDOS
- get and set screen size using DJGPP-specific calls on MSDOS
- use DJGPP-specific initialization on MSDOS, zeroing all the
_rl_term_* variables
- don't call tputs on DJGPP; there is no good terminfo support
DJGPP support from Eli Zaretskii <[email protected]>
4/6
---
config-top.h
- change DEFAULT_PATH_VALUE to something more useful and modern
4/8
---
tests/printf2.sub
- make sure LC_ALL and LC_CTYPE are set so LANG assignment takes effect.
Reported by Cedric Arbogast <[email protected]>
4/11
----
include/chartypes.h
- fix a couple of dicey defines (though ones that don't cause any
compiler warnings) in IN_CTYPE_DOMAIN
doc/{bashref.texi,bash.1}
- add note referring to duplicating file descriptors in sections
describing redirecting stdout and stderr and appending to stdout
and stderr. Suggested by Matthew Dinger <[email protected]>
pcomplete.c
- it_init_helptopics: new function to support completing on help topics,
not just builtins
- it_helptopics: new programmable completion list of help topics
- build list of helptopic completions in gen_action_completions on
demand
pcomplete.h
- new extern declaration for it_helptopics
builtins/complete.def
- the `helptopic' action now maps to CA_HELPTOPIC intead of CA_BUILTIN,
since there are more help topics than just builtins. Suggested by
Clark Wang <[email protected]>
4/12
----
print_cmd.c
- fix print_arith_for_command to add a call to PRINT_DEFERRED_HEREDOCS
before ending the body of the command, so heredocs get attached to
the right command instead of to the loop. From gentoo bug 363371
http://bugs.gentoo.org/show_bug.cgi?id=363371
execute_cmd.c
- change coproc_pidchk to unset the appropriate shell variables when
the (currently single) known coproc pid terminates
- cleanup and new functions to fully support multiple coprocesses when
and if I decide to go there
4/13
----
print_cmd.c
- fix print_group_command to add a call to PRINT_DEFERRED_HEREDOCS
after call to make_command_string_internal before printing closing
`}'
- fix make_command_string_internal to add a call to
PRINT_DEFERRED_HEREDOCS after recursive call to
make_command_string_internal in case cm_subshell before printing
closing `)'
4/14
----
print_cmd.c
- change overlapping strcpy in named_function_string to memmove
sig.h
- UNBLOCK_SIGNAL: convenience define, same as UNBLOCK_CHILD, just
restores an old signal mask
trap.c
- set_signal: instead of setting the signal handler to SIG_IGN while
installing the new trap handler, block the signal and unblock it
after the new handler is installed. Fixes bug reported by Roman
Rakus <[email protected]>
4/15
----
doc/{bash.1,bashref.texi}
- make it clear that enabling monitor mode means that all jobs run in
separate process groups
4/18
----
builtins/fc.def
- update fix of 4/15/2010 to not take saved_command_line_count into
account when stepping down the history list to make sure that
last_hist indexes something that is valid. Fixes bug reported by
4/19
----
builtins/fc.def
- fc_gethnum: make sure the calculation to decide the last history
entry is exactly the same as fc_builtin. Fixes bug uncovered by
fix of 4/18 to stop seg fault
4/22
----
lib/readline/terminal.c
- change _rl_enable_meta_key to set a flag indicating that it sent the
enable-meta sequence
- _rl_disable_meta_key: new function to turn off meta mode after we
turned it on with _rl_enable_meta_key
lib/readline/rlprivate.h
- extern declaration for _rl_disable_meta_key
configure.in
- if not cross-compiling, set CFLAGS_FOR_BUILD from any CFLAGS inherited
from the environment. Fixes HP/UX build problem reported by
"Daniel Richard G." <[email protected]>
4/26
----
config-top.h
- define MULTIPLE_COPROCS to 0 so the code is still disabled but easy
to enable via configure option or editing this file
4/29
----
lib/sh/eaccess.c
- freebsd provides faccessat, with the same misfeature as their eaccess
and access implementations (X_OK returns true for uid==0 regardless
of the actual file permissions), so reorganize code to check the
file permissions as with eaccess. Report and fix from Johan Hattne
5/2
---
doc/{bash.1,bashref.texi}
- add forward reference to `Pattern Matching' from `Pathname
Expansion', suggested by Greg Wooledge <[email protected]>
5/5
---
pcomplib.c
- the bash_completion project now distributes over 200 completions
for various programs, with no end in sight, so increase the value
of COMPLETE_HASH_BUCKETS from 32 to 128
pathexp.c
- quote_string_for_globbing: make sure CTLESC quoting CTLESC is
translated into \<CTLESC> even if the flags include QGLOB_REGEXP.
We don't want to process the second CTLESC as a quote character.
Fixes bug reported by Shawn Bohrer <[email protected]>
5/6
---
builtins/printf.def
- change PRETURN to not call fflush if ferror(stdout) is true
- if a call to one of the stdio functions or printstr leaves
ferror(stdout) true, and PRETURN is going to be called, let PRETURN
print the error message rather than doubling up the messages. Fixes
problem reported by Roman Rakus <[email protected]>
5/9
---
doc/{bash.1,bashref.texi}
- add note to the effect that lists inside compound command can be
terminated by newlines as well as semicolons. Suggested by
Roman Byshko <[email protected]>
5/10
----
subst.c
- remove_quoted_nulls: fix problem that caused it to skip over the
character after a CTLNUL, which had the effect of skipping every
other of a series of CTLNULs. Fixes bug reported by
Marten Wikstrom <[email protected]>
5/11
----
subst.c
- extract_process_subst: add SX_COMMAND flag to call to
extract_delimited_string, since we're expanding the same sort of
command as command substitution. Fixes bug reported in Ubuntu
bug 779848
5/12
----
configure.in
- set the prefer_shared and prefer_static variables appropriately
depending on the value of $opt_static_link
aclocal.m4
- AC_LIB_LINKFLAGS_BODY: change to not prefer shared versions of the
libraries it's searching for if the prefer_shared variable is "no".
Fixes problem reported by Cedric Arbogast <[email protected]>
5/13
----
lib/readline/readline.c
- _rl_internal_teardown: add call to _rl_disable_meta_key to make the
meta key active only for the duration of the call to readline()
- _rl_internal_setup: move call to _rl_enable_meta_key here from
readline_initialize_everything so the meta key is active only for
the duration of the call to readline(). Suggestion from Miroslav
Lichvar <[email protected]>
builtins/help.def
- help_builtin: change strncmp to strcmp so that `help read' no longer
matches `readonly'. Suggested by Clark Wang <[email protected]>
config.h.in
- add define for GLIBC21, checked using jm_GLIBC21 as part of the tests
for libintl
lib/malloc/malloc.c
- internal_free: don't use the cached value of memtop when deciding
whether or not to adjust the break and give memory back to the kernel
when using the GNU C library, since glibc uses sbrk for its own
internal purposes. From Debian bug 614815, reported by Samuel
Thibault <[email protected]>
aclocal.m4
- BASH_STRUCT_WEXITSTATUS_OFFSET: change AC_RUN_IFELSE to AC_TRY_RUN
to avoid warning about not using AC_LANG_SOURCE
5/14
----
bashline.[ch]
- two new functions, bashline_set_event_hook and bashline_reset_event_hook,
to set rl_event_hook to bash_event_hook and back to NULL, respectively
- don't set rl_event_hook unconditionally
sig.c
- termsig_sighandler: if the shell is currently interactive and
readline is active, call bashline_set_event_hook to cause
termsig_handler to be called via bash_event_hook when the shell
returns from the signal handler
5/15
----
lib/readline/display.c
- _rl_col_width: Mac OS X has a bug in wcwidth: it does not return 0
for UTF-8 combining characters. Added workaround dependent on
MACOSX. Fixes problem pointed out by Thomas De Contes
5/16
----
lib/readline/rlmbutil.h
- WCWIDTH: wrapper for wcwidth that returns 0 for Unicode combining
characters on systems where wcwidth is broken (e.g., Mac OS X).
lib/readline/{complete,display,mbutil}.c
- use WCWIDTH instead of wcwidth
5/17
----
lib/readline/display.c
- update_line: after computing ofd and nfd, see whether the next
character in ofd is a zero-width combining character. If it is,
back ofd and nfd up one, so the base characters no longer compare
as equivalent. Fixes problem reported by Keith Winstein
lib/readline/nls.c
- _rl_utf8locale: new flag variable, set to non-zero if the current
locale is UTF-8
- utf8locale(): new function, returns 1 if the passed lspec (or the
current locale) indicates that the locale is UTF-8. Called from
_rl_init_eightbit
lib/readline/rlprivate.h
- extern declaration for _rl_utf8locale
locale.c
- locale_utf8locale: new flag variable, set to non-zero if the current
locale is UTF-8 (currently unused)
- locale_isutf8(): new function, returns 1 if the passed lspec (or the
current locale) indicates that the locale is UTF-8. Should be called
whenever the locale or LC_CTYPE value is modified
aclocal.m4
- BASH_WCWIDTH_BROKEN: new test for whether or not wcwidth returns
zero-width characters like unicode combining characters as having
display length 1; define WCWIDTH_BROKEN in this case
config.h.in
- WCWIDTH_BROKEN: new define
lib/readline/rlmbutil.h
- change WCWIDTH macro to use _rl_utf8locale and the full range of
Unicode combining characters (U+0300-U+036F)
5/19
----
lib/readline/rlprivate.h
- _rl_search_context: new member, prevc, will hold character read
prior to lastc
lib/readline/isearch.c
- _rl_isearch_dispatch: if the character causes us to index into
another keymap, save that character in cxt->prevc
- _rl_isearch_dispatch: if we index into another keymap, but don't
find a function that's special to i-search, and the character that
caused us to index into that keymap would have terminated the
search, push back cxt->prevc and cxt->lastc to make it appear as
if `prevc' terminated the search, and execute lastc as a command.
We have to push prevc back so we index into the same keymap before
we read lastc. Fixes bug report from Davor Cubranic
5/20
----
expr.c
- expr_bind_variable: pay attention to the return value from
bind_variable and check whether or not we should error out due to
a readonly or noassign variable. Fixes bug reported by Eric
Blake <[email protected]>
5/26
----
lib/readline/search.c
- include histlib.h for ANCHORED_SEARCH defines
- rl_history_search_flags: new variable, holds ANCHORED_SEARCH flag for
the duration of a history search
- rl_history_search_reinit: takes a new flags variable, defines whether
or not the search is anchored; assigned to rl_history_search_flags
- rl_history_serarch_reinit: if ANCHORED_SEARCH flag passed, add ^ to
beginning of search string; otherwise search string is unmodified
- rl_history_search_internal: set rl_point appropriately based on
whether or not rl_history_search_flags includes ANCHORED_SEARCH
- rl_history_substr_search_forward: new function, for non-anchored
substring search forward through history for string of characters
preceding rl_point
- rl_history_substr_search_backward: new function, for non-anchored
substring search backward through history for string of characters
preceding rl_point. Original code from Niraj Kulkarni
lib/readline/readline.h
- extern declarations for rl_history_substr_search_{for,back}ward
lib/readline/funmap.c
- history-substring-search-forward: new bindable command, invokes
rl_history_substr_search_forward
- history-substring-search-backward: new bindable command, invokes
rl_history_substr_search_backward
lib/readline/doc/{rluser.texi,readline.3}
- document history-substring-search-forward and
history-substring-search-backward
5/27
----
{nojobs,jobs}.c
- add support for DONT_REPORT_SIGTERM so that the shell doesn't print
a message when a job exits due to SIGTERM since that's the default
signal sent by the kill builtin. Suggested by Marc Herbert
config-top.h
- DONT_REPORT_SIGTERM: new user-modifiable setting. Commented out
by default
5/28
----
lib/readline/bind.c
- _rl_skip_to_delim: skip to a closing double quote or other delimiter,
allowing backslash to quote any character, including the delimiter
- rl_parse_and_bind: call _rl_skip_to_delim instead of using inline
code
- rl_parse_and_bind: allow quoted strings as the values of string
variables. Variable values without double quotes have trailing
whitespace removed (which still allows embedded whitespace, for
better or worse). Fixes problem with string variables not matching
in `set' command if values happen to have trailing spaces or tabs
(debian bash bug #602762), but introduces slight incompatibility.
5/29
----
doc/{bash.1,bashref.texi}
- clarify unset description to specify that without options, a
variable, then a shell function if there is no variable by that
name, is unset. Fixes discrepancy reported by Mu Qiao
6/4
----
doc/{bash.1,bashref.texi}
- clarify description of LINES and COLUMNS (and checkwinsize shopt
option) to make it clear that only interactive shells set a
handler for SIGWINCH and update LINES and COLUMNS. Original
report submitted by Jonathan Nieder <[email protected]>
arrayfunc.c
- expand_compound_array_assignment: defer expansion of words between
parens when performing compound assignmnt to an associative array
variable
- assign_compound_array_list: perform the same expansions when doing
a compound array assignment to an associative array variable as
when doing a straight array index assignment. The idea is that
foo=( [ind1]=bar [ind2]=quux)
is the same as
foo[ind1]=bar ; foo[ind2]=quux
This fixes problems with double-expansion and quote removal being
performed on the array indices
6/13
----
doc/{bash.1,bashref.texi}
- Add a little text to make it clear that the locale determines how
range expressions in glob patterns are handled.
6/21
----
builtins/read.def
- display a message and return error status if -a is used with an
existing associative array. Fixes bug reported by Curtis Doty
6/24
----
{jobs,nojobs}.c
- non-interactive shells now react to the setting of checkwinsize
and set LINES and COLUMNS after a foreground job exits. From a
suggestion by Leslie Rhorer <[email protected]>
doc/{bash.1,bashref.texi}
- checkwinsize: remove language saying that only interactive shells
check the window size after each command
lib/readline/histfile.c
- history_backupfile: new file, creates a backup history file name
given a filename (appending `-')
- history_do_write: when overwriting the history file, back it up
before writing. Restore backup file on a write error. Suggested
bashline.c
- find_cmd_name: two new arguments, return the start and end of the
actual text string used to find the command name, without taking
whitespace into account
- attempt_shell_completion: small changes to make sure that completion
attempted at the beginning of a non-empty line does not find a
programmable completion, even if the command name starts at point
- attempt_shell_completion: small change to make sure that completion
does not find a progcomp when in whitespace before the command
name
- attempt_shell_completion: small change to make sure that completion
does not find a progcomp when point is at the first character of a
command name, even when there is leading whitespace (similar to
above). Fixes problems noted by Ville Skytta <[email protected]>
subst.c
- brace_expand_word_list: since the individual strings in the strvec
returned by brace_expand are already allocated, don't copy them to
newly-allocated memory when building the WORD_LIST, just use them
intact
locale.c
- locale_mb_cur_max: cache value of MB_CUR_MAX when we set or change
the locale to avoid a function call every time we need to read it
shell.h
- new struct to save shell_input_line and associated variables:
shell_input_line_state_t
- add members of sh_parser_state_t to save and restore token and the
size of the token buffer
parse.y
- {save,restore}_input_line_state: new functions to save and restore
shell_input_line and associated variables
- {save,restore}_parser_state: add code to save and restore the token
and token buffer size
- xparse_dolparen: call save_ and restore_input_line_state to avoid
problems with overwriting shell_input_line when we recursively
call the parser to parse a command substitution. Fixes bug
reported by Rui Santos <[email protected]>
include/shmbutil.h
- use locale_mb_cur_max instead of MB_CUR_MAX in ADVANCE_CHAR and
similar macros
lib/glob/smatch.c
- rangecmp,rangecmp_wc: change to take an additional argument, which
forces the use of strcoll/wscoll when non-zero. If it's 0, a new
variable `glob_asciirange' controls whether or not we use strcoll/
wscoll. If glob_asciirange is non-zero, we use straight
C-locale-like ordering. Suggested by Aharon Robbins
6/30
----
execute_cmd.c
- execute_pipeline: make sure the lastpipe code is protected by
#ifdef JOB_CONTROL. Fixes problem reported by Thomas Cort
7/2
---
lib/readline/complete.c
- EXPERIMENTAL: remove setting of _rl_interrupt_immediately around
completion functions that touch the file system. Idea from Jan
Kratochvil <[email protected]> and the GDB development
team
lib/readline/signals.c
- rl_signal_handler: if we're in callback mode, don't interrupt
immediately on a SIGWINCH
7/3
---
bashline.c
- set_directory_hook: and its siblings are a new set of functions to
set, save, and restore the appropriate directory completion hook
- change callers to use {set,save,restore}_directory_hook instead of
manipulating rl_directory_rewrite_hook directly
- dircomplete_expand: new variable, defaults to 0, if non-zero causes
directory names to be word-expanded during word and filename
completion
- change {set,save,restore}_directory_hook to look at dircomplete_expand
and change rl_directory_completion_hook or rl_directory_rewrite_hook
appropriately
bashline.h
- extern declaration for set_directory_hook so shopt code can use it
7/6
---
builtins/shopt.def
- globasciiranges: new settable shopt option, makes glob ranges act
as if in the C locale (so b no longer comes between A and B).
Suggested by Aharon Robbins <[email protected]>
7/7
---
doc/{bash.1,bashref.texi}
- document new `globasciiranges' shopt option
7/8
---
builtins/shopt.def
- direxpand: new settable option, makes filename completion expand
variables in directory names like bash-4.1 did.
- shopt_set_complete_direxpand: new function, does the work for the
above by calling set_directory_hook
doc/{bash.1,bashref.texi}
- document new `direxpand' shopt option
7/15
----
lib/readline/isearch.c
- _rl_isearch_dispatch: when adding character to search string, use
cxt->lastc (which we use in the switch statement) instead of c,
since lastc can be modified earlier in the function
7/18
----
lib/readline/rlprivate.h
- _rl_search_context: add another member to save previous value of
(multibyte) lastc: pmb is to mb as prevc is to lastc
lib/readline/isearch.c:
- _rl_isearch_dispatch: if a key sequence indexes into a new keymap,
but doesn't find any bound function (k[ind].function == 0) or is
bound to self-insert (k[ind].function == rl_insert), back up and
insert the previous character (the one that caused the index into a
new keymap) and arrange things so the current character is the next
one read, so both of them end up in the search string. Fixes bug
reported by Clark Wang <[email protected]>
- _rl_isearch_dispatch: a couple of efficiency improvements when adding
characters to the isearch string
7/24
----
lib/readline/isearch.c
- _rl_isearch_dispatch: save and restore cxt->mb and cxt->pmb
appropriately when in a multibyte locale
doc/{bash.1,bashref.texi}
- correct description of {x}>file (and other redirection operators
that allocate a file descriptor) to note the the fd range is
greater than or equal to 10. Fixes problem reported by
Christian Ullrich
lib/readline/signals.c
- rl_signal_handler: don't interrupt immediately if in callback mode
lib/readline/callback.c
- rl_callback_read_char: install signal handlers only when readline
has control in callback mode, so readline's signal handlers aren't
called when the application is active (e.g., between the calls to
rl_callback_handler_install and rl_callback_read_char). If the
readline signal handlers only set a flag, which the application
doesn't know about, the signals will effectively be ignored until
the next time the application calls into the readline callback
interface. Fixes problem of calling unsafe functions from signal
handlers when in callback mode reported by Jan Kratochvil
execute_cmd.c
- fix_assignment_words: when in Posix mode, the `command' builtin
doesn't change whether or not the command name it protects is an
assignment builtin. One or more instances of `command'
preceding `export', for instance, doesn't make `export' treat its
assignment statement arguments differently. Posix interpretation
#351
doc/{bash.1,bashref.texi}
- document new Posix-mode behavior of `command' when preceding builtins
that take assignment statements as arguments
builtins/printf.def
- printstr: if fieldwidth or precision are < 0 or > INT_MAX when
supplied explicitly (since we take care of the `-' separately),
clamp at INT_MAX like when using getint(). Fixes issue reported
by Ralph Coredroy <[email protected]>
7/25
----
lib/readline/chardefs.h
- isxdigit: don't define if compiling with c++; declared as a c++
template function. Fixes bug reported by Miroslav Lichvar
builtins/printf.def
- getint: if garglist == 0, return whatever getintmax returns (0).