]> git.ipfire.org Git - thirdparty/bash.git/blob - ChangeLog
Bash-5.2 patch 26: fix typo when specifying readline's custom color prefix
[thirdparty/bash.git] / ChangeLog
1
2 12/6/2020
3 ---------
4
5 [bash-5.1 released]
6
7 12/7
8 ----
9 Makefile.in
10 - bashline.o: add dependency on ${DEFDIR}/builtext.h. Report from
11 Fazal Majid <fazal@majid.org>
12
13 12/11
14 -----
15 builtins/wait.def
16 - wait_builtin: don't assign the variable given with -p if there are no
17 jobs to wait for. Report and fix from OÄuz <oguzismailuysal@gmail.com>
18
19 arrayfunc.c
20 - kvpair_assignment_p: return non-zero if argument L appears to be a
21 key-value pair associative array compound assignment
22 - expand_and_quote_kvpair_word: run a single word in a key-value pair
23 associative array compound assignment through the appropriate
24 expansions and single-quote the result
25
26 arrayfunc.h
27 - kvpair_assignment_p, expand_and_quote_kvpair_word: extern declarations
28
29 subst.c
30 - expand_oneword: detect whether VALUE appears to be a key-value
31 pair compound assignment and call the appropriate function to expand
32 each word in the resulting list. Fixes inconsistency reported by
33 oguzismailuysal@gmail.com
34
35 12/12
36 -----
37 subst.c
38 - command_substitute: don't reset pipeline_pgrp to shell_pgrp if we
39 are already forked to run a command (SUBSHELL_FORK). Fixes SIGINT
40 in command substitution in here-document in forked child issue
41 reported by oguzismailuysal@gmail.com
42
43 12/18
44 -----
45 execute_cmd.c
46 - execute_pipeline: execute the lastpipe code even if prev == 0. It
47 can only be 0 here if stdin was closed when this function was
48 executed
49 - execute_pipeline: if prev == 0, set lstdin to a sentinel (-1) that
50 means to close fd 0 after executing the command, and call close(prev)
51 before restoring stdin. restore_stdin now understands -1, and closes
52 fd 0. Fixes issue reported by Tomas Janousek <tomi@nomi.cz>
53
54 12/21
55 -----
56 doc/bashref.texi
57 - PROMPT_COMMANDS: clean up a couple of remaining instances of this
58 name. Report from Eli Schwartz <eschwartz@archlinux.org>
59
60 12/26
61 -----
62 subst.c
63 - command_substitute: make sure that the child process always has
64 pipeline_pgrp == shell_pgrp: if pipeline_pgrp is non-zero when we
65 get to the child, meaning that we're part of an already-forked
66 child that is, for instance, running redirections, we need to reset
67 shell_pgrp to it to preserve the invariant. Fixes bug with terminal
68 being set to the incorrect pgrp reported by oguzismailuysal@gmail.com
69
70 12/29
71 -----
72 configure.ac,builtins/shobj-conf,m4/threadlib.m4
73 - midnightbsd: update auto-configuration to treat MidnightBSD like
74 FreeBSD. From https://savannah.gnu.org/patch/?10006
75
76 12/30
77 -----
78 examples/loadables/stat.c
79 - stattime: use strftime with a default format or the format supplied
80 with the -F option to format the file time information
81 - stat_builtin: now takes a -F fmt option for a strftime format string;
82 change to function calling sequences to pass the format down to
83 stattime
84
85 examples/loadables/Makefile.in
86 - stat: now built and installed by default
87
88 12/31
89 -----
90 command.h
91 - SUBSHELL_IGNTRAP: new flag value
92
93 jobs.c
94 - make_child: set SUBSHELL_IGNTRAP in subshell_environment in the
95 child process, meaning that we should not execute trap handlers for
96 trapped signals
97
98 execute_cmd.c
99 - execute_in_subshell, execute_simple_command, execute_disk_command:
100 make sure to unset SUBSHELL_IGNTRAP after a child process restores
101 the original signal dispositions
102 - execute_simple_command: make sure to set SUBSHELL_IGNTRAP after
103 make_child returns and we're setting subshell_environment directly
104
105 subst.c
106 - command_substitute,process_substitute: unset SUBSHELL_IGNTRAP after
107 the child process has reset the trapped signal dispositions
108
109 trap.c
110 - trap_handler: if we get a signal for which we have set a trap, but
111 SUBSHELL_IGNTRAP is set in subshell_environmnent, make sure we
112 restore the original signal disposition and resend the signal to
113 ourselves. Fixes issue reported by Nikolay Borisov <nborisov@suse.com>
114 (or at least makes the race window much smaller)
115
116 sig.c
117 - initialize_terminating_signal: set the original signal handler from
118 the return value from sigaction; a minor optimization that saves a
119 system call or two
120
121 1/5/2021
122 --------
123 builtins/declare.def
124 - declare_internal: make some option combinations that don't make
125 sense errors (e.g., -f and -a/-A/-i/-n)
126 - declare_internal: if we build a new variable name by expanding the
127 value of a nameref variable, make sure to chop the `+' in a `+='
128 off before going on
129
130 1/7
131 ---
132 doc/{bash.1,bashref.texi}
133 - bind: add an example to the synopsis making it clear that you can
134 use any readline command line as a non-option argument, as it says
135 in the text. From a report from Dan Jacobson <jidanni@jidanni.org>
136
137 1/12
138 ----
139 locale.c
140 - local_shiftstates -> locale_shiftsates in the non-multibyte code
141 branch. Reported by Henry Bent <henry.r.bent@gmail.com>
142
143 subst.c
144 - expand_compound_assignment_word: make sure to call dispose_words on
145 the WORD_LIST * returned from expand_oneword after turning it back
146 into a string. Fixes memory leak reported by Alexander Mescheryakov
147 <alexander.s.m@gmail.com>
148
149 1/13
150 ----
151 variables.c
152 - bind_variable_internal: when performing an assignment to a subscripted
153 array variable that was the value of a nameref (used in the original
154 assignment), don't call make_variable_value on the value, since that
155 messes up +=. Just call assign_array_element and let that take care
156 of calling make_variable_value appropriately. Fixes bug reported by
157 Oguz <oguzismailuysal@gmail.com>
158
159 1/14
160 ----
161 findcmd.c
162 - search_for_command: if `checkhash' is set, don't add non-executable
163 files to the command hash table, since we will just remove them
164 later
165
166 lib/sh/winsize.c
167 - get_new_window_size: set *rp and *cp even if READLINE is not defined
168
169 1/15
170 ----
171 lib/sh/winsize.c
172 - get_new_window_size: call rl_set_window_size only if we can determine
173 we're using readline: an interactive shell without no-line-editing,
174 or if we've already initialized readline, presumably in a non-
175 interactive shell
176
177 support/Makefile.in
178 - man2html: add LDFLAGS_FOR_BUILD to the recipe. Report from
179 Jeffrey Walton <noloader@gmail.com>
180
181 1/17
182 ----
183 lib/readline/misc.c
184 - rl_operate_and_get_next: fix old K&R function declaration. Report
185 from Tom Tromey <tom@tromey.com>
186
187 lib/readline/readline.c
188 - _rl_internal_char_cleanup: move code that cleans up the active region
189 and deactivates the mark inside this function so callback mode
190 applications get the intended functionality. Report and fix from
191 sparrowhawk996@gmail.com
192
193 lib/readline/bind.c
194 - rl_parse_and_bind: when using the arithmetic comparison operators on
195 the version, make sure to invert the tests so that we stop parsing
196 if the test fails. Report and fix from Tom Tromey <tom@tromey.com>
197
198 1/19
199 ----
200 Makefile.in
201 - pipesize.h: add dependency on ${BUILTINS_LIBRARY} to avoid parallel
202 makes trying to create it twice. Report and fix from
203 Richard Purdie <richard.purdie@linuxfoundation.org>
204
205 1/21
206 ----
207 subst.c
208 - param_expand: if a nameref expands to array[@] or array[*], make sure
209 to call chk_atstar so the right variables are set to split the
210 result. Report from Oguz <oguzismailuysal@gmail.com>
211
212 1/22
213 ----
214 builtins/declare.def
215 - Rewrote to reduce complexity. Still needs some work.
216
217 lib/readline/*.h, lib/tilde/tilde.h
218 - PARAMS: remove, rely on compilers understanding function prototypes
219
220 lib/readline/{undo.c,histlib.h}
221 - _hs_replace_history_data: move extern declaration to histlib.h
222
223 lib/readline/readline.c
224 - _rl_parse_colors: instead of an extern declaration for this, include
225 "parse-colors.h" for it
226
227 lib/readline/{histfile.c,histlib.h}
228 - _hs_append_history_line: move extern declaration to histlib.h
229
230 lib/readline/history.h
231 - HS_HISTORY_VERSION: define to 0x0801 (current library version) if
232 it's not already defined. We conditionally define it in case an
233 application has (unwisely) chosen to use it, since the history
234 library doesn't do anything with it yet
235
236 lib/readine/{rlprivate.h,{search,misc,readline}.c}
237 - _rl_free_history_entry: add extern declaration to rlprivate.h, remove
238 extern declaration from c source files. Use HS_HISTORY_VERSION as a
239 sentinel that it's ok to use HIST_ENTRY in rlprivate.h
240
241 lib/readline/{rlprivate.h,{isearch,search,undo}.c}
242 - _rl_saved_line_for_history: add extern declaration to rlprivate.h,
243 remove extern declaration from c source files, using HS_HISTORY_VERSION
244 in the same way
245
246 1/24
247 ----
248 lib/readline/signals.c
249 - _rl_handle_signal: make sure that all sigprocmask calls are protected
250 by HAVE_POSIX_SIGNALS. Report and fix from Tom Tromey <tom@tromey.com>
251
252 1/26
253 ----
254 lib/readline/callback.c
255 - rl_callback_read_char: make sure rl_linefunc is non-NULL before
256 calling through the pointer. The line function could have been
257 removed by the application before readline processes any typeahead
258 input. Bug reported by Matthias Klose <doko@debian.org>, pointer
259 to root cause from Koichi Murase <myoga.murase@gmail.com>
260
261 lib/glob/glob.c
262 - skipname,wskipname: put in some additional checks for `.' to ensure
263 that we don't get false positives (or incomplete tests) that can
264 affect the results of extglob patterns. Reported by
265 gregrwm <rhn-users@greatlakedata.com>
266
267 1/27
268 ----
269 lib/glob/glob.c
270 - extglob_skipname,wextglob_skipname: fixed an off-by-one error (SE
271 was being set to one character before the end of the pattern string,
272 not the null character at the end of the pattern string like other
273 callers of glob_patscan) that caused the last character of the last
274 subpattern to be cut off when calling skipname
275 - extglob_skipname,wextglob_skipname: some cleanups so the code is
276 closer to identical for the single-byte and wide character versions
277
278 2/1
279 ---
280 execute_cmd.c
281 - execute_simple_command: in posix mode, if we have a variable
282 assignment error while assigning into the temporary environment (e.g.,
283 assigning to a readonly variable), a non-interactive shell running a
284 special builtin exits; a non-interactive shell running anything else
285 jumps back to the top level. A shell compiled with -DSTRICT_POSIX
286 exits unconditionally.
287 - execute_simple_command: make sure posix mode sets $? to non-zero
288 if a variable assignment error occurs preceding a non-special builtin
289
290 subst.c
291 - do_assignment_statements: take the code from expand_word_list_internal
292 that performs assignment statements, either standalone or preceding
293 simple command names, and factor it out into this function
294 - expand_word_list_internal: call do_assignment_statements where
295 appropriate
296
297 2/2
298 ---
299 lib/glob/glob.c
300 - dequote_pathname: fix function definition for non-multibyte systems.
301 Report and fix from Marc Aurèle La France <tsi@tuyoix.net>
302
303 Makefile.in,doc/Makefile.in
304 - for certain targets, remove files before creating them to deal with
305 symlinked build trees.
306 Report and fix from Marc Aurèle La France <tsi@tuyoix.net>
307
308 examples/loadables/accept.c
309 - include limits.h before typemax.h
310 Report and fix from Marc Aurèle La France <tsi@tuyoix.net>
311
312 builtins/gen-helpfiles.c
313 - if USING_BASH_MALLOC is defined, make sure to undefine malloc as well
314 as free. Fixes bug reported by George R Goffe <grgoffe@yahoo.com>
315
316 builtins/Makefile.in
317 - install-help: now depends on $(HELPFILES_TARGET) so we make sure the
318 separate helpfiles are created before we try to install them if we
319 don't go through the `all' makefile target
320
321 configure.ac
322 - HELPDIR: now ${datadir}/bash/helpfiles
323
324 2/3
325 ---
326 parse.y
327 - parse_string_to_word_list: before expanding a compound assignment
328 statement body, make sure to save any alias that's currently being
329 expanded. Restore the alias after the compound assignment is parsed.
330 Reported back in 11/2020 by Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
331
332 2/4
333 ---
334 lib/readline/histexpand.c
335 - history_expand_internal: when calling the history_inhibit_expansion
336 function, make sure to call it using the string as we've expanded it
337 to that point (RESULT), adding the expansion and next characters
338 temporarily, since we make expansion decisions based on what we've
339 accumulated, not what we started with. This makes things like
340 echo abc!$!$ work, where before the second `!' inhibited expansion
341 because bash_history_inhibit_expansion mistakenly took it as the
342 second character in a `$!' word expansion. Fixes bug reported back
343 in 10/2020 by Paul Fox <paul.d.fox@gmail.com>
344
345 array.h
346 - array_pop: instead of calling array_dispose_element from this macro,
347 just call array_shift with the AS_DISPOSE flag
348
349 2/5
350 ---
351 bashhist.c
352 - shell_comment: move condition to return 0 if the delimiter stack is
353 not empty or the shell is parsing a here document into the function
354 itself, don't have the callers check so the check is in one place.
355 Fixes bug reported by Oguz <oguzismailuysal@gmail.com>
356
357 array.h,variables.c
358 - ARRAY_ELEMENT_REPLACE: convenience define for modifying an array
359 element's value
360
361 variables.c
362 - pop_args: a couple of code simplifications
363
364 2/7
365 ---
366 lib/malloc/malloc.c
367 - pagesz: at least MALLOC_PAGESIZE_MIN (4096) bytes
368 - union mhead: now 16-byte aligned on all systems, 32-bit and 64-bit
369 pointers
370 - binsizes: since the smallest allocation overhead is now 16 bytes,
371 redo the buckets so binsizes[0] == 32; adjust the thresholds for
372 split/coalesce/prepopulate/mmap (NBUCKETS = 28; STARTBUCK = 0).
373 Sizes stay pretty much the same; indices change
374 - consistently use MALLOC_SIZE_T instead of long/unsigned int/int
375 - use MAGIC8_NUMBYTES as the length of the mh_magic8 buffer, in case
376 it changes later for alignment
377 - internal_remap: new function, calls mremap to reallocate a chunk of
378 memory allocated using mmap(); called from internal_realloc if the
379 old size and new size are both bigger than the mmap threshold
380 - internal_realloc: call internal_remap if the old size and new size
381 are both above the threshold where we use mmap for allocation
382
383 2/10
384 ----
385 include/timer.h
386 - new file, declaration for a timer struct to be used by a set of
387 functions to implement timers using SIGALRM or select/pselect
388
389 lib/sh/timers.c
390 - new file, set of functions to manipulate timer objects and timeouts
391 using SIGALRM or select/pselect. Inspired by a patch from
392 Koichi Murase <myoga.murase@gmail.com>. Not used yet
393
394 2/11
395 ----
396 builtins/read.def
397 - read_builtin: if there is a timeout set, block SIGCHLD around calls
398 to zread and its siblings, or calls to readline for `read -e', so
399 SIGCHLD (and the consequent waitpid) doesn't interrupt the read.
400 Fixes bug reported by Koichi Murase <myoga.murase@gmail.com>, but
401 there may be a different fix coming
402
403 Makefile.in,builtins/Makefile.in
404 - fix up dependencies, especially on builtins.h and builtext.h
405
406
407 2/12
408 ----
409 lib/readline/input.c
410 - rl_read_key: if we set rl_done == 1, set RL_STATE_DONE as well
411 Reported by Koichi Murase <myoga.murase@gmail.com>
412
413 lib/readline/isearch.c
414 - _rl_search_getchar: only call _rl_read_mbstring if rl_read_key returns
415 >= 0, avoid some work
416
417 lib/readline/vi_mode.c
418 - _rl_vi_callback_change_char,_rl_vi_change_char: don't overwrite the
419 last replacement string if _rl_vi_callback_getchar returns -1.
420 It will likely make no difference, since the next read will return
421 an error or EOF, but being careful
422 - rl_vi_overstrike: if _rl_overwrite_char doesn't return 0, break out
423 of the loop
424
425 lib/readline/text.c
426 - _rl_overwrite_char: return 1 if _rl_read_mbstring returns < 0 so
427 we don't try to insert garbage
428
429 bashline.c
430 - posix_edit_macros: handle rl_read_key() returning <= 0
431
432 2/15
433 ----
434 parse.y
435 - read_comsub: make sure to turn on the LEX_RESWDOK flag if we are in
436 a case statement and read a `)', since we can get a valid `esac'.
437 Fixes bug reported by Oguz <oguzismailuysal@gmail.com>
438 - read_comsub: if we're in a case statement, recognize `}' as a
439 reserved word and set the LEX_RESWDOK flag for the next word, since
440 we can get an esac (or another reserved word) after it
441
442 2/16
443 ----
444 parse.y
445 - reserved_word_acceptable: add ARITH_CMD and COND_END to the list of
446 tokens that can precede a reserved word, so you can use reserved
447 words after ((...)) and [[...]].
448 Reported by Koichi Murase <myoga.murase@gmail.com>
449
450 2/17
451 ----
452 parse.y
453 - parse_comsub: use new LEX_CASEWD flag to track when we are reading
454 the WORD in `case WORD in' and turn on the LEX_RESWDOK flag when
455 that word ends. This allows $(case x in esac), which no one uses.
456 - parse_comsub: use LEX_PATLIST flag to track when we are reading a
457 case pattern list so `|' doesn't turn on the LES_RESWDOK flag
458 - parse_comsub: case_level: simple counter to count the number of esacs
459 we need to see before we're no longer in a case statement; analog of
460 esacs_needed_count from the lexer
461
462 2/19
463 ----
464 parse.y
465 - CHECK_FOR_RESERVED_WORD: don't return ESAC if we read `esac' after a
466 left paren in a case pattern list. From an austingroup-bugs discussion
467 about https://www.austingroupbugs.net/view.php?id=1454
468 - parse_comsub: if we read a `(' while looking for a case pattern list
469 and LEX_CKESAC is set, we have a leading left paren in the pattern
470 list and should turn off LEX_CKESAC so (esac) doesn't prematurely
471 terminate the case command. From an austingroup-bugs discussion
472 about https://www.austingroupbugs.net/view.php?id=1454
473
474 2/26
475 ----
476 builtins/history.def
477 - history_builtin: when checking negative offsets to -d, which are
478 supposed to count back from the end of the history list, check the
479 range against 0 instead of history_base, because the calculation is
480 done against history_length, which is independent of history_base.
481 Report and fix from Christopher Gurnee <chris@gurneeconsulting.net>
482
483 2/28
484 ----
485 doc/bashref.texi
486 - replaced a number of uses of @var with a mixture of @env and @dfn
487 to better match up with the texinfo standards
488
489 doc/{bash.1,bashref.texi}
490 - clarify some aspects of the coproc description, especially the
491 use of NAME and when it's optional
492
493 3/1
494 ---
495 subst.c
496 - read_comsub: fix off-by-one error in mbrtowc that causes a read one
497 character past the end of buf. Report and fix from
498 Platon Pronko <platon7pronko@gmail.com> in
499 https://savannah.gnu.org/patch/?10035
500
501 3/3
502 ---
503 builtins/ulimit.def
504 - ulimit_builtin: Posix compatibility: if the last command specified
505 by an option does not have an option argument, but there is an
506 operand remaining after all the options are parsed, treat the
507 operand as an argument to that last command. From an austin-group
508 discussion and a Geoff Clare suggestion back in November, 2020.
509 Austin Group interpretation 1418
510
511 examples/shellmath
512 - a package of shell functions to perform floating-point math entirely
513 in bash. Contributed by Michael Wood <mawood20@gmail.com>. Available
514 at https://github.com/clarity20/shellmath
515
516 3/4
517 ---
518 support/shobj-conf
519 - darwin: take out the -arch-only option in SHOBJ_XLDFLAGS and
520 SHOBJ_ARCHFLAGS; no longer needed
521
522 doc/{bash.1,bashref.texi}
523 - coprocesses: suggested changes from rms@gnu.org; recommend the
524 `coproc NAME { commands; }' form as the simplest and most flexible
525
526 3/5
527 ---
528 builtins/exec.def
529 - exec_builtin: set last_command_exit_value before calling exit_shell
530 so any exit trap gets the right value for $?. From Matthew Bauer
531 <mjbauer95@gmail.com> via https://savannah.gnu.org/patch/?10039
532
533 3/8
534 ---
535 include/timer.h
536 - SHTIMER_ALRMSET: new flag, indicates that there is an active alarm
537 associated with this timer (falarm() was called)
538
539 lib/sh/timers.c
540 - shtimer_set: set the SHTIMER_ALRMSET flag after calling falarm
541 - shtimer_unset: don't call falarm(0,0) unless the SHTIMER_ALRMSET flag
542 is set
543
544 3/9
545 ---
546 include/posixtime.h
547 - added some BSD convenience defines if they are not present
548
549 parse.y,shell.h
550 - {save,restore}_parser_state: save and restore shell_eof_token and
551 pushed_string_list; change callers (e.g., xparse_dolparen) so they
552 don't have to manage them
553
554 3/10
555 ----
556 builtins/common.h
557 - extern declarations for moving to timers (sh_timer) for read builtin
558 timeouts
559
560 quit.h
561 - CHECK_ALRM: remove, no longer used
562
563 trap.c
564 - check_signals: call check_read_timeout instead of CHECK_ALRM
565
566 bashline.c
567 - bash_event_hook: use read_timeout instead of checking `sigalrm_seen';
568 that no longer exists
569 - bash_event_hook: accommodate readline timing out (not used yet)
570
571 lib/sh/zread.c
572 - zread: call read_builtin_timeout() to check for a timeout before
573 calling a blocking read()
574
575 builtins/read.def
576 - sigalrm,reset_timeout,check_read_timeout,read_builtin_timeout: new
577 and modified functions to use sh_timers for timeouts instead of
578 SIGALRM. Based on work contributed by Koichi Murase
579 <myoga.murase@gmail.com>
580 - read_builtin: use sh_timers for read timeouts (-t N) instead of
581 using SIGALRM
582 - edit_line: simulate receiving SIGALRM if readline times out (not
583 used yet)
584
585 3/11
586 ----
587 lib/readline/readline.c
588 - rl_initialize: call _rl_timeout_init to set things up for any timeout
589 that was set with rl_set_timeout
590 - readline_internal_charloop: if we longjmped because of a timeout,
591 make sure to set rl_done/RL_STATE_DONE and return; we are
592 abandoning this call to readline(). The readline timeout changes
593 were based on work contributed by Koichi Murase
594 <myoga.murase@gmail.com>
595
596 lib/readline/readline.h
597 - extern declarations for new timeout functions and hook
598 - rl_clear_timeout: new define
599
600 lib/readline/callback.c
601 - rl_callback_read_char: if we longjmped because of a timeout,
602 make sure to set rl_done/RL_STATE_DONE and return; we are
603 abandoning this call to readline()
604
605 lib/readline/util.c
606 - _rl_abort_internal: if we time out, don't ring the bell; let the
607 caller handle it
608
609 lib/readline/input.c
610 - extern declarations for public and readline-library-private functions
611 and hooks to implement timeouts
612 - rl_set_timeout,rl_timeout_remaining: new public functions
613 - _rl_timeout_select: new function, uses select/pselect to implement
614 read timeouts that take timeouts set with rl_set_timeout into account;
615 calling hook function if a timeout occurs
616 - rl_gather_tyi, _rl_input_available: use _rl_timeout_select, taking
617 any existing timeout into consideration if it expires before the
618 timeout passed as an argument
619 - rl_getc: use _rl_timeout_select and handle any timeouts by calling
620 _rl_timehout_handle
621 - set_alarm,reset_alarm: new functions to implement timeouts using
622 SIGALRM for systems that lack a working select/pselect
623 - _rl_timeout_init: new function, sets things up for reading input
624 with a specified timeout
625 - _rl_timeout_handle: a timeout handler; calls any event hook and
626 sets up to abort the current readline() call
627 - _rl_timeout_handle_sigalrm: a timeout handler for systems using
628 SIGALRM to implement timeouts
629
630 lib/readline/parens.c
631 - rl_insert_close: use _rl_timeout_select to take timeouts into account
632
633 lib/readline/rlprivate.h
634 - extern declarations for readline-library-private timeout functions
635
636 lib/readline/rltty.c
637 - rl_deprep_terminal: don't print a newline after the bracketed paste
638 disable sequence if we timed out
639
640 lib/readline/signals.c
641 - _rl_handle_signal: if sig is SIGALRM, call _rl_timeout_handle_sigalrm()
642
643 lib/readline/doc/rltech.texi
644 - rl_set_timeout,rl_timeout_remaining: document new public functions
645 - RL_STATE_TIMEOUT: document new possible state value for rl_readline_state
646 - rl_timeout_event_hook: document new hook function, called when
647 readline times out
648
649 builtins/read.def
650 - read_builtin: changes to use the readline timeout functions to
651 implement timeouts with `read -e'; these use rl_set_timeout and
652 sh_timer structs together
653
654 3/12
655 ----
656 subst.c
657 - expand_string_dollar_quote: new function, expands $'...' and $"..."
658 in a string for those code paths that don't expand it themselves
659
660 subst.h
661 - expand_string_dollar_quote: extern declaration
662
663 parse.y
664 - read_secondary_line: if $'...' or $"..." appears in the line, call
665 expand_string_dollar_quote to expand them. This now returns new
666 memory, need to change callers
667
668 make_cmd.c
669 - make_here_document: account for read_secondary_line returning newly
670 allocated memory, free `full_line' appropriately
671
672 bashline.c
673 - shell_expand_line,history_and_alias_expand_line: expand $'...' and
674 $"..." in the line by calling expand_string_dollar_quote, since
675 that happens after history expansion and before alias expansion in
676 normal processing
677
678 3/15
679 ----
680 subst.c
681 - expand_string_dollar_quote: fix out-of-order initialization
682
683 Makefile.in
684 - {TAGS,tags}: add ETAGS/ETAGSFLAGS/CTAGS/CTAGS flags; make sure to
685 cd to the source directory before running them to get source files
686 that don't have absolute paths. Fix from Mike Jonkmans
687 <bashbug@jonkmans.nl>
688
689 parse.y
690 - xparse_dolparen: don't longjmp if FLAGS includes SX_NOLONGJMP. From
691 a report by Xu Lu <oliver_lew@outlook.com>
692
693 3/16
694 ----
695 subst.c
696 - process_substitute: set startup_state and parse_and_execute_level
697 to see if we can avoid a fork()
698
699 bashline.c
700 - bash_spell_correct_word: bindable command (spell-correct-word) to
701 perform spelling correction on the current `shellword', using the
702 same code as the `cdspell' option and directory spelling correction
703 during completion. Feature suggested by in 10/2020 by
704 Karl Kleinpaste <karl@kleinpaste.org>
705 - bash_spell_correct_word: bound to "C-x s" by default in emacs mode
706
707 lib/readline/display.c
708 - rl_redisplay: fix redisplay problem that occurs when switching from
709 the rl-digit-argument prompt "(arg: N)" back to the regular prompt,
710 and the regular prompt contains invisible characters
711
712 doc/bash.1,lib/readline/doc/rluser.texi
713 - spell-correct-word: document new function and its default binding
714
715 3/17
716 ----
717 doc/{bash.1,bashref.texi}
718 - cd: slight changes to specify that it sets PWD and OLDPWD
719 - {pushd,popd}: make it clear that these builtins use cd to change
720 the current working directory; change wording to simplify the
721 description and clarify the exit status
722
723 3/18
724 ----
725 execute_cmd.c
726 - execute_disk_command: after performing redirections, call
727 unlink_all_fifos() to remove the FIFOs created as part of
728 expanding redirections. They should have been opened by then, and
729 we're going to call shell_execve right away anyway, so we won't be
730 around to remove the FIFOs. From a report from
731 Michael Felt <aixtools@gmail.com>
732
733 3/22
734 ----
735 parse.y
736 - alias_expand_token: slight tweak to check for alias expansion: perform
737 expansion unconditionally if PST_ALEXPNEXT is set, and disable it
738 in case statement pattern lists if the previous token indicates a
739 command name is acceptable.
740 From a report by Oguz <oguzismailuysal@gmail.com>
741
742 config-bot.h
743 - HAVE_MKDTEMP: fix typo
744
745 3/25
746 ----
747 lib/readline/terminal.c
748 - look in terminfo for key sequences for page up (kP) and page down
749 (kN) and bind them to history-search-{backward,forward},
750 respectively. From a patch from Xose Vazquez Perez
751 <xose.vazquez@gmail.com>
752
753 3/30
754 ----
755 doc/bashref.texi
756 - expand the node describing $"..." string translation with additional
757 details and examples
758
759 3/31
760 ----
761 misc.c
762 - rl_fetch_history: moved here from vi_mode.c
763 - rl_fetch_history: negative arguments count back from the end of
764 the history, instead of taking you to the beginning of the history
765 list
766 - rl_fetch_history: in vi mode, an out-of-range argument rings the
767 bell and doesn't change the line
768
769 vi_mode.c
770 - rl_vi_fetch_history: call rl_fetch_history
771
772 readline.h
773 - rl_fetch_history: new extern declaration
774
775 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
776 - rl_fetch_history: add description
777
778 builtins/setattr.def
779 - show_var_attributes: if a variable's value indicates that it should
780 be ANSI-C quoted, use ansic_quote instead of sh_double_quote to
781 format the value string. From proposal by Greg Wooledge
782 <greg@wooledge.org>
783
784 4/5
785 ---
786 arrayfunc.c
787 - unbind_array_element: if FLAGS includes VA_ONEWORD, don't use
788 skipsubscript to parse the subscript, just assume the entire SUB is
789 the subcript and that it contains the closing `]', so we just want
790 everything in SUB except the last character.
791
792 parse.y:
793 - select_command: use compound_list instead of list, like for_command.
794 Report by Greywolf <greywolf@starwolf.com>
795 - list: move this into compound_list (replacing the instance of `list'
796 in the compound_list production), remove from the grammar
797
798 4/6
799 ---
800 arrayfunc.c
801 - unbind_array_element: use VA_NOEXPAND instead of literal 1
802
803 4/7
804 ---
805 lib/readline/funmap.c
806 - default_funmap: add missing `vi-undo' to the list of vi-mode bindable
807 functions. Reported by Xirui Zhao <quinean@icloud.com>
808
809 4/8
810 ---
811
812 config-top.h
813 - DEFAULT_LOADABLE_BUILTINS_PATH: default value for BASH_LOADABLES_PATH
814
815 doc/{bash.1,bashref.texi}
816 - enable: note that it uses $BASH_LOADABLES_PATH, and that the default
817 is system-dependent
818
819 variables.c
820 - initialize_shell_variables: initialize BASH_LOADABLES_PATH to the
821 default given in DEFAULT_LOADABLE_BUILTINS_PATH
822
823 4/12
824 ----
825 doc/{bash.1,bashref.texi}
826 - add link to git master tar file as a place to get the current version
827
828 4/14
829 ----
830 bashline.c
831 - attempt_shell_completion: use -1 as a sentinel value for
832 in_command_position indicating that we cannot be in a command position
833 (e.g., because we're the target of a redirection) and should not
834 check for a programmable command completion or tell the programmable
835 completion code to use command completion. Report and fix from
836 Marc Aurèle La France <tsi@tuyoix.net>
837
838 4/16
839 ----
840 builtins/bind.def
841 - bind_builtin: reverse sense of strvec_search return value when
842 deciding whether or not to remove a unix-command binding from the
843 cmd keymap. Bug report by Dale Sedivec <dale@codefu.org>
844
845 lib/readline/doc/rltech.texi
846 - RL_PROMPT_{START,END}_IGNORE: document current values of \001 and
847 \002. Report from Mingye Wang <arthur200126@gmail.com>
848
849 4/19
850 ----
851 arrayfunc.c
852 - assign_assoc_from_kvlist: fix memory leak reported by konsolebox
853 <konsolebox@gmail.com>
854
855 4/20
856 ----
857 command.h,subst.c
858 - W_ITILDE: remove, replace with a variable since it's only used inside
859 a single call to expand_word_internal
860
861 4/21
862 ----
863 {subst.c,make_cmd.c,parse.y}
864 - W_DQUOTE: no longer used, use W_NOPROCSUB and W_NOTILDE directly
865 (for arithmetic commands and words in arithmetic for commands)
866
867 4/24
868 ----
869 bashline.c
870 - executable_completion: since this function gets an unquoted filename
871 from rl_filename_completion_function, we need to quote special
872 characters before passing it to bash_directory_completion_hook.
873 Report from Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
874
875 4/26
876 ----
877 lib/readline/search.c
878 - _rl_nsearch_abort: move function calls around so _rl_restore_prompt
879 happens before rl_clear_message, like when aborting an incremental
880 search. Suggested by sparrowhawk996@gmail.com
881
882 subst.h
883 - ASS_ALLOWALLSUB: new assignment flag value, means to allow @ and * as
884 valid array subscripts when assigning to existing associative arrays
885
886 arrayfunc.c
887 - assign_array_element: allow assignment of key `@' to an existing
888 associative array if the caller passes ASS_ALLOWALLSUB
889 - assign_compound_array_list: allow ( [@]=value ) to an existing
890 associative array
891
892 builtins/declare.def
893 - declare_internal: allow assignment of key `@' to an existing
894 associative array by passing ASS_ALLOWALLSUB to assign_array_element
895 as part of local_aflags. This affects declare, local, and typeset
896
897 subst.c
898 - do_assignment_internal: allow a[@]=value to an existing associative
899 array by passing ASS_ALLOWALLSUB to assign_array_element
900
901 4/27
902 ----
903 builtins/common.[ch]
904 - builtin_bind_var_to_int: wrapper for bind_var_to_int to be used by
905 builtin commands; placeholder for future work
906
907 builtins/wait.def
908 - builtin_bind_var_to_int: use instead of bind_var_to_int
909
910 builtins/common.c
911 - builtin_bind_variable: allow assignment of key `@' to an existing
912 associative array by passing ASS_ALLOWALLSUB to assign_array_element.
913 This affects printf and read
914
915 builtins/variables.[ch]
916 - bind_var_to_int: add third `flags' argument to pass to bind_variable
917 instead of always passing 0
918
919 redir.c,builtins/common.c,builtins/printf.def
920 - bind_var_to_int: change callers, add third flags argument
921
922 builtins/common.c
923 - builtin_bind_var_to_int: pass ASS_ALLOWALLSUB to bind_var_to_int so
924 builtins like wait can assign to assoc[@] and assoc[*]
925
926 4/28
927 ----
928 bashline.c
929 - command_word_completion_function: make sure to initialize
930 old_glob_ignore_case before trying to restore from it
931 - command_word_completion_function: if we are completing a glob
932 pattern, make sure to set rl_filename_completion_desired, so we get
933 quoting and appending -- we are completing a filename, after all.
934 From a report from Manuel Boni <ziosombrero@gmail.com>
935
936 lib/readline/bind.c
937 - enable-active-region: separate control of the active region and
938 bracketed paste. Still set to the same default value as bracketed
939 paste, and enabling bracketed paste enables the active region.
940 Now you can enable bracketed paste and then turn off the active
941 region.
942
943 doc/bash.1,lib/readline/doc/{readline.3,rltech.texi}
944 - enable-active-region: document new bindable readline variable and
945 its effects
946
947 4/30
948 ----
949 command.h
950 - W_ARRAYREF: new flag, meaning the word is a valid array reference
951 with subscript, replaces W_DOLLARSTAR, which was unused
952
953 subst.c
954 - expand_subscript_string,expand_array_subscript: new functions to
955 parse and expand-and-quote array subscripts. For future use
956
957 5/3
958 ---
959 builtins/mapfile.def
960 - mapfile: if the delimiter is a newline, set unbuffered_read = 1
961 for any file descriptor that isn't seekable and lseek sets errno
962 to ESPIPE (pipes, FIFOs, maybe terminal devices). If it's not a
963 newline, only allow buffered reads if the file descriptor is a
964 regular file. Report from Koichi Murase <myoga.murase@gmail.com>
965
966 builtins/read.def
967 - read_builtin: only set unbuffered_read = 1 if the input is coming
968 from a pipe (which we can't seek on) or the input is a terminal and
969 we want to read a specified number of characters or we're using a
970 non-standard delimiter
971
972 5/4
973 ---
974
975 builtins/mapfile.def
976 - mapfile: call zsyncfd before calling the callback. Suggested by
977 Koichi Murase <myoga.murase@gmail.com>; we'll see how it goes
978
979 5/5
980 ---
981 subst.h
982 - expand_subscript_string: extern declaration
983
984 {arrayfunc,subst}.c
985 - expand_subscript_string: replace expand_assignment_string_to_string
986 with calls to this when expanding array subscripts
987
988 subst.c
989 - cond_expand_word: call expand_word_internal with Q_ARITH if `special'
990 says we should quote for an arithmetic expression context
991 - expand_word_internal: call expand_array_subscript when we see `[' in
992 arithmetic or array subscript contexts, make conditional on the
993 compatibility level later
994 - expand_word_internal: make sure W_ARRAYREF makes it through this
995 function and into the returned word
996
997 5/6
998 ---
999
1000 arrayfunc.c
1001 - array_expand_index: call evalexp with a flag of 0 since we call
1002 expand_arith_string with Q_ARITH and we want evalexp to remove
1003 the quotes
1004
1005 execute_cmd.c
1006 - eval_arith_for_expr,execute_arith_command: now that Q_ARITH has an
1007 effect on array subscripts (it quotes the special expansion
1008 characters), call evalexp with 0 as the flags arg so quote removal
1009 is performed on this quoted argument. Make this conditional on the
1010 shell compatibility level later
1011 - execute_cond_command: make sure to expand the argument to -v by
1012 calling cond_expand_node with Q_ARITH, and correspondingly turn off
1013 assoc_expand_once when calling unary_test with that argument, since
1014 we want it to be expanded again to remove the quotes
1015 - execute_cond_command: expand the arguments to the arithmetic operators
1016 with Q_ARITH and pass TEST_ARITHEXP to binary_test to ensure that
1017 it lets evalexp expand the arguments to remove the quoting
1018
1019 test.c
1020 - arithcomp: if TEST_ARITHEXP is in FLAGS, call evalexp with a flag
1021 if 0 to force evalexp to expand the arguments to remove the quoting
1022
1023 subst.c
1024 - param_expand: since we call expand_arith_string with Q_ARITH, we need
1025 to call evalexp with 0 instead of EXP_EXPANDED for $((...)) expansion
1026 - expand_word_internal: if we recursively call expand_word_internal to
1027 expand the contents of a double-quoted string, make sure we pass
1028 through Q_ARITH if it appears in QUOTED
1029 - verify_substring_values: call expand_arith_string with Q_ARITH and
1030 correspondingly call evalexp with 0 instead of EXP_EXPANDED
1031
1032 execute_cmd.c
1033 - execute_cond_node: if -v is the operator, and the operand is a valid
1034 array reference, pass TEST_ARRAYEXP flag to unary_test
1035
1036 5/7
1037 ---
1038 builtins/common.[ch]
1039 - set_expand_once: set array_expand_once to the value passed as the
1040 first argument, returning the original value
1041
1042 builtins.h
1043 - ARRAYREF_BUILTIN: new flag for shell builtins, means that the builtin
1044 can take array references, with subscripts, as arguments
1045
1046 builtins/mkbuiltins.c
1047 - set ARRAYREF_BUILTIN flag on builtins given in the arrayvar_builtins
1048 array
1049
1050 execute_cmd.c
1051 - execute_cond_node: use set_expand_once to set array_expand_once to 0
1052 before calling unary_test with -v (see change from 5/6)
1053
1054 arrayfunc.c
1055 - unbind_array_element: allow the caller to choose whether or not a
1056 subscript of `*' or `@' unsets the entire array by passing
1057 VA_ALLOWALL in FLAGS. Right now, since the unset builtin doesn't
1058 pass VA_ALLOWALL, those subscripts unset individual elements for
1059 associative arrays. We preserve the old behavior of unsetting
1060 indexed arrays for the time being with new indexed-array-specific
1061 code
1062
1063 5/9
1064 ---
1065
1066 builtins/shopt.def
1067 - expand_once_flag: "assoc_expand_once" option now sets this flag,
1068 calls set_assoc_expand on change
1069 - set_assoc_expand: sets assoc_expand_once to mirror expand_once_flag;
1070 placeholder for future changes
1071
1072 builtins/common.h
1073 - expand_once_flag: extern declaration
1074
1075 5/10
1076 ----
1077 doc/{bash.1,bashref.texi}
1078 - note that case patterns undergo quote removal. Reported by
1079 AlvinSeville7cf <alvinseville7cf@gmail.com>
1080
1081 5/11
1082 ----
1083
1084 builtins/bashgetopt.c
1085 - list_optflags: flags associated with the word corresponding to
1086 list_optarg, assuming list_optarg is a separate argument
1087
1088 builtins/bashgetopt.h
1089 - list_optflags: extern declaration
1090
1091 builtins/set.def
1092 - unset_builtin: set VFLAGS each time through the loop, since we take
1093 whether or not the word has W_ARRAYREF set into account
1094 - unset_builtin: don't pass VA_ALLOWALL to unbind_array_element for
1095 now
1096
1097 test.c
1098 - unary_test: in the -v case, use assoc_expand_once in the first call
1099 to valid_array_reference ()
1100
1101 builtins/printf.def
1102 - printf_builtin: only set VA_ONEWORD if the option argument to -v has
1103 W_ARRAYREF set (look at list_optflags)
1104
1105 5/12
1106 ----
1107
1108 subst.c
1109 - expand_array_subscript: don't quote @ or * in the expanded subscript
1110 at all, even when they are the only character in the subscript. See
1111 how this works out -- it might uncover places where we need to allow
1112 `*' and `@' as subscripts where they are not allowed now
1113
1114 expr.c
1115 - expr_bind_variable: pass ASS_ALLOWALLSUB to bind_int_variable so we
1116 can allow (( A[@]=value )) when A is an existing associative array
1117
1118 arrayfunc.h
1119 - AV_ATSTARKEYS: new flag value, means to accept a[@] and a[*] but
1120 treat them as keys/expressions and not special values
1121
1122 arrayfunc.c
1123 - array_value_internal: check AV_ATSTARKEYS and don't treat them as
1124 ALL_ELEMENT_SUB values; they fall through to use as keys/indices
1125
1126 test.c
1127 - unary_test: if -v is passed an array reference, add AV_ATSTARKEYS to
1128 the flags passed to array_value so we treat @ and * as keys for an
1129 existing associative array
1130
1131 5/13
1132 ----
1133
1134 subst.c
1135 - expand_cond_word: if SPECIAL == 3 (arithmetic expression), dequote the
1136 resulting WORD_LIST * as if special == 0, because we don't want to
1137 quote the list for pattern matching. Report from
1138 Adjudicator Darren <adjudicatordarren@protonmail.com>
1139
1140 5/14
1141 ----
1142 subst.c
1143 - expand_array_subscript: add double quote (") to the list of characters
1144 that are backslash-quoted in subscripts after word expansion.
1145 skipsubscript treats them specially, so you have to quote them to
1146 do things like `key='"' ; array[$key]=1 ; [[ -v array[$key] ]]'
1147
1148 5/16
1149 ----
1150
1151 builtins/wait.def
1152 - wait_builtin: if we longjmp to wait_intr_buf, call unset_waitlist if
1153 we have called set_waitlist (wflags & JWAIT_WAITING). Fixes bug with
1154 wait -n interrupted by a trapped signal (not SIGINT) reported by
1155 Jonas Alfredsson <jonas.alfredsson@protonmail.com>
1156
1157 jobs.c
1158 - wait_sigint_cleanup: restore the old sigint handler before we longjmp
1159 out by calling restore_sigint_handler()
1160
1161 5/17
1162 ----
1163 builtins/read.def
1164 - bind_read_variable: now takes an additional argument, flags to pass
1165 to builtin_bind_variable; change callers
1166 - SET_VFLAGS: set vflags and bindflags
1167 - read_builtin: call SET_VFLAGS to set vflags and bindflags from each
1168 word before calling valid_array_reference and bind_read_variable
1169
1170 builtins/common.c
1171 - builtin_bind_variable: set vflags (for valid_array_reference) and
1172 bindflags (for bind_variable/assign_array_element) separately for
1173 clarity
1174
1175 arrayfunc.c
1176 - assign_array_element: sanity check: make sure that the subscript
1177 returned by array_variable_name consumes the entire NAME, otherwise
1178 flag it as a subscript error. This keeps things like
1179 `KEY=' ]'; read assoc[$KEY] <<< hello' from assigning to incomplete
1180 subscripts
1181
1182 builtins/printf.def
1183 - printf_builtin: if LIST_OPTFLAGS includes W_ARRAYREF, set VA_NOEXPAND
1184 in VFLAGS
1185
1186 5/17
1187 ----
1188
1189 lib/readline/complete.c
1190 - compute_lcd_of_matches: move a couple of strlen calls out of a loop
1191 in calls to mbrtowc; performance improvement only. Report and fix
1192 from sparrowhawk996@gmail.com
1193
1194 lib/readline/bind.c
1195 - rl_trim_arg_from_keyseq: take a key sequence and its length and
1196 return the index into the key sequence following any initial numeric
1197 argument. Return -1 if there is no numeric argument (the caller is
1198 expected to make sure) or if the key sequence consists *only* of
1199 the numeric argument. The caller should use the remainder of the
1200 key sequence to look up the desired key binding.
1201
1202 lib/readline/readline.h
1203 - rl_trim_arg_from_keyseq: extern declaration
1204
1205 bashline.c
1206 - bash_execute_unix_command: if the argument count is > 1 or we have
1207 an explicit argument, call rl_trim_arg_from_keyseq to get past the
1208 numeric argument and deal with the rest of the key sequence. We still
1209 need a way to pass it to the invoked program or function. From
1210 a report from Jesper Nygards <jesper.nygards@gmail.com>
1211
1212 5/18
1213 ----
1214
1215 bashline.c
1216 - bash_execute_unix_command: if the user supplied a numeric argument
1217 when invoking bash_execute_unix_command, pass it to the command in
1218 the READLINE_ARGUMENT variable
1219
1220 lib/readline/readline.[ch]
1221 - _rl_del_executing_keyseq: convenience function to `delete' the last
1222 character added to the executing key sequence. Intended to be used
1223 before calling rl_execute_next or similar functions that push input
1224 back to be re-read
1225
1226 doc/{bash.1,bashref.texi}
1227 - READLINE_ARGUMENT: documented new variable available for commands
1228 defined using `bind -x' keybindings
1229
1230 lib/readline/doc/rltech.texi
1231 - rl_trim_arg_from_keyseq: documented new function
1232
1233 5/19
1234 ----
1235
1236 builtins/evalstring.c
1237 - should_suppress_fork: suppress the fork if we're in a process
1238 substitution subshell, in addition to being a simple command
1239 without redirections. From a report back in 10/2020 from
1240 Hyunho Cho <mug896@gmail.com>
1241
1242 bashline.c
1243 - command_word_completion_function: if we're trying to complete an
1244 absolute program (one containing a slash), don't run strcmp or
1245 strcasecmp on the return value from rl_filename_completion_function,
1246 since that duplicates work the filename completion function already
1247 does. From a report back in 1/2021 by awa54@cdak.net
1248
1249 5/22
1250 ----
1251 parse.y
1252 - CHECK_FOR_RESERVED_WORD: if we are returning an ESAC and unsetting
1253 PST_CASESTMT, decrement esacs_needed_count
1254
1255 parse.y,shell.h
1256 - sh_parser_state_t: save and restore esacs_needed_count and
1257 expecting_in_token in the shell parser state struct and
1258 save_parser_state/restore_parser_state
1259
1260 print_cmd.c
1261 - print_simple_command: don't bother to call command_print_word_list
1262 with an empty list
1263 - print_simple_command: don't print a space before a redirection list
1264 if there weren't any command words to print
1265
1266 5/24
1267 ----
1268
1269 lib/sh/input_avail.c
1270 - nchars_avail: make sure SET and OSET are declared on systems with
1271 select(2). Reported by Larkin Nickle <me@larbob.org>
1272
1273 parse.y
1274 - cond_term: if we read a `!' toggle CMD_INVERT_RETURN instead of
1275 setting it unconditionally. Report and patch from
1276 Vincent Menegaux <vincent.menegaux@gmail.com> via
1277 https://savannah.gnu.org/patch/?10070
1278
1279 5/25
1280 ----
1281 doc/{bash.1,bashref.texi}
1282 - test: add the ( $2 $3 ) case to the description of the four-argument
1283 behavior. Inspired by a discussion with Christoph Anton Mitterer
1284 <calestyo@scientia.net>
1285
1286 5/27
1287 ----
1288 doc/bashref.texi
1289 - replace most of the GNU parallel section with a reference to the
1290 tutorial on gnu.org
1291
1292 lib/glob/glob.h
1293 - GX_NEGATE: new flag; indicates whether the pattern is being negated
1294 as part of an extglob pattern. Not used yet
1295
1296 lib/glob/glob.c
1297 - extglob_skipname,wextglob_skipname: pass GX_NEGATE to the skipname
1298 functions if the pattern is being negated. Not checked yet
1299
1300 5/28
1301 ----
1302 doc/{bash.1,bashref.texi}
1303 - dotglob: add text to clarify that `.' and `..' have to be matched by
1304 a pattern beginning with `.' or -- and this is the sketchy part --
1305 that a pattern beginning with `.' has to be one of the patterns in
1306 an extended glob expression
1307
1308 lib/glob/glob.c
1309 - skipname,wskipname: perform the special checks for `.' only if the
1310 pattern is not being negated
1311
1312 6/3
1313 ---
1314 parse.y,shell.h
1315 - eol_ungetc_lookahead: save and restore as part of the parser state
1316 included in {save,restore}_parser_state
1317
1318 6/7
1319 ---
1320 lib/readline/display.c
1321 - puts_face: make sure to cast each member of STR to unsigned char, so
1322 it's not misinterpreted as EOF, which putc_face does not display.
1323 Report and fix from Volodymyr Prodan <vovcat@gmail.com> in
1324 https://savannah.gnu.org/patch/?10076
1325
1326 examples/shobj-conf
1327 - aix*gcc: change SHOBJ_LD to ${CC}, prefix the SHOBJ_LDFLAGS flags
1328 with -Wl, so gcc will pass them to the linker. Report from
1329 lehel@maxer.hu in https://savannah.gnu.org/support/?110505
1330
1331 6/11
1332 ----
1333 doc/{bash.1,bashref.texi}
1334 - cd: additional arguments are not ignored; they raise an error.
1335 Report from Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
1336
1337 lib/glob/strmatch.h
1338 - FNM_DOTDOT: enable special handling for `.' and `..': if FNM_PERIOD
1339 is not set, `.' and `..' at the start of a string or as a pathname
1340 component need to be matched by a `.' in the pattern and cannot be
1341 matched by `?', `*', or a bracket expression
1342
1343 lib/glob/glob.c
1344 - glob_vector: pass FNM_DOTDOT to strmatch() if noglob_dot_filenames
1345 is not set to enable special handling of `.' and `..'. Prompted by a
1346 discussion with Nora Platiel <nplatiel@gmx.us>
1347 - skipname,wskipname: remove special checks for `.' and (disabled)
1348 checks for `..'
1349
1350 lib/glob/sm_loop.c
1351 - GMATCH: implement special handling for FNM_DOTDOT and `.' and `..':
1352 make sure they can't be matched by any special glob characters at
1353 the start of the string or as a pathname component (if FNM_PATHNAME
1354 is set). This also means that !(pattern) won't return `.' or `..'
1355 if dotglob is set
1356 - GMATCH,EXTMATCH: don't pass FNM_DOTDOT down to recursive calls, like
1357 FNM_PERIOD, once we process the first character in the string or
1358 pathname component
1359
1360 lib/glob/smatch.c
1361 - ISDIRSEP,PATHSEP,SDOT_OR_DOTDOT,PDOT_OR_DOTDOT: provide definitions
1362 for single-byte or wide character strings for sm_loop.c to use
1363
1364 6/16
1365 ----
1366
1367 doc/{bash.1,bashref.texi},lib/readline/doc/{rluser,rltech}.texi
1368 - slight wording changes to rewrite gender-specific language. From a
1369 report by Vipul Kumar <kumar+bug-bash@onenetbeyond.org>, suggested
1370 language from G. Branden Robinson <g.branden.robinson@gmail.com>,
1371 Lawrence Velázquez <vq@larryv.me>,
1372 and Andrew Church <achurch+bash@achurch.org>
1373
1374 builtins/fc.def
1375 - fc_builtin: make sure an entry in the history list is non-null
1376 before trying to write it to stdout or the temporary file. From a
1377 report from Sibo Dong <sibo.dong@outlook.com>
1378
1379 builtins/common.[ch]
1380 - builtin_arrayref_flags: given a WORD_DESC * (which includes flags)
1381 and a base set of flags, return a set of flags to pass to
1382 valid_array_reference and similar functions
1383
1384 builtins/set.def
1385 - unset_builtin: call builtin_arrayref_flags to set vflags
1386
1387 6/19
1388 ----
1389
1390 parse.y
1391 - parse_comsub: rewrite to recursively call the parser (yyparse()) and
1392 return a string constructed from the resulting parse tree. Probably
1393 will only work with bison. Error reporting is more accurate about
1394 line numbers and invalid tokens, and command substitution errors
1395 are caught earlier, before expansion
1396 - DOLPAREN: new token, never created by yylex; only ever set by
1397 parse_comsub and xparse_dolparen to indicate we're recursively
1398 calling the parser for a command substitution
1399 - comsub: new grammar production that's triggered by DOLPAREN and
1400 parses a command substitution, returning a <command>. It's one of
1401 the possible end states for the top-level parser
1402 - grammar: only call rewind_input_string if the shell's input is
1403 coming from a string
1404 - shell_ungets: push a string back onto the shell input; only used by
1405 make_here_document for backwards compatibility -- allowing a here-
1406 document to be terminated by a token at the end of a command
1407 substitution
1408 - yylex: don't need any more special handling when returning
1409 shell_eof_token, but we keep the clause for future work
1410 - read_token_word: don't handle backslashes (leave them in the input
1411 stream) if we are reading a command substitution (PST_NOEXPAND)
1412 - reserved_word_acceptable: allow reserved words after DOLPAREN
1413 - report_syntax_error: better error handling if we hit EOF while
1414 looking for the ending right paren in a command substitution
1415 - parse_string_to_word_list,parse_compound_assignment: make sure to
1416 turn off parse_comsub sentinel temporarily
1417
1418 make_cmd.c
1419 - make_here_document: backwards compatibility: if we end a here
1420 document on the same line as the end of a command substitution,
1421 allow the token to terminate the here document (without requiring
1422 a newline) and push the remainder of the line back for the parser
1423 to consume and terminate the command substitution
1424
1425 builtins/evalstring.c
1426 - parse_string: if we read shell_eof_token and use it to terminate a
1427 command, rewind the input string here before returning, instead of
1428 guessing where to rewind it in the caller
1429
1430 6/22
1431 ----
1432
1433 redir.c
1434 - do_redirection_internal: if VARASSIGN_REDIR_AUTOCLOSE is non-zero,
1435 add a redirect to automatically close {var}<fn and other styles of
1436 varassign redirection. It's zero by default
1437
1438 builtins/shopt.def
1439 - varredir_close: new shell option, mirrors the value of
1440 varassign_redir_autoclose. Suggested multiple times by multiple
1441 people
1442
1443 doc/{bash.1,bashref.texi}
1444 - varredir_close: document new shell option (the name is tentative)
1445
1446 6/24
1447 ----
1448
1449 parse.y
1450 - yylex: if read_token returns a value < 0, return YYerror to the
1451 parser
1452 - parse_comsub: if the current_token is not shell_eof_token when
1453 yyparse returns, return an error to read_token_word instead of
1454 trying to keep parsing. Fixes interactive-only (?) bug reported by
1455 Koichi Murase <myoga.murase@gmail.com>
1456
1457 parser.h
1458 - PST_NOERROR: don't print error messages in yyerror(), just reset
1459 the parser and return
1460
1461 parse.y
1462 - yyerror: if parser_state & PST_NOERROR, don't print an error message
1463 - xparse_dolparen: if the flags includes SX_COMPLETE, add PST_NOERROR
1464 to parser_state, to inhibit error messages. Fixes bug with adding
1465 lines with incomplete command substitutions to the history list
1466 reported by Koichi Murase <myoga.murase@gmail.com>
1467
1468 subst.c
1469 - skip_matched_pair: make sure to pass the SX_COMPLETE flag to
1470 extract_delimited_string
1471
1472 6/28
1473 ----
1474
1475 lib/readline/bind.c
1476 - rl_trim_arg_from_keyseq: handle rl_vi_arg_digit if VI_MODE is
1477 defined. Report and fix from Koichi Murase <myoga.murase@gmail.com>
1478 - rl_trim_arg_from_keyseq: rework to handle case where the digit
1479 argument is given as a discrete sequence of multiple rl_digit_argument
1480 commands (e.g, "M-1 M-2" instead of "M-1 2"). Report and fix from
1481 Koichi Murase <myoga.murase@gmail.com>
1482
1483 subst.c
1484 - pat_subst: avoid calling RESIZE_MALLOCED_BUFFER with STRLEN(s) as an
1485 argument, since it ends up going into a loop. Report and fix from
1486 Koichi Murase <myoga.murase@gmail.com>
1487
1488 lib/sh/casemod.c
1489 - cval: take the string length as an argument, to avoid having to call
1490 strlen every time (in HANDLE_MULTIBYTE mode). The caller already has
1491 this info. Report and fix from Koichi Murase <myoga.murase@gmail.com>
1492
1493 builtins/complete.def
1494 - print_cmd_name: single-quote the command name if it contains any
1495 shell metacharacters
1496 - print_one_completion: call print_arg with a second arg of 1 if the
1497 function name contains shell metacharacters. Report and fix from
1498 Koichi Murase <myoga.murase@gmail.com>
1499
1500 6/30
1501 ----
1502
1503 configure.ac
1504 - substitute BASE_CFLAGS_FOR_BUILD and STYLE_CFLAGS into Makefile
1505 targets
1506 - take STYLE_CFLAGS out of the CFLAGS_FOR_BUILD variable that gets
1507 substituted
1508 - remove STYLE_CFLAGS from CFLAGS
1509 - use `:+' expansion to set variables based on whether $GCC is set
1510 or null, since configure can do GCC=
1511
1512 support/Makefile.in
1513 - man2html: remove CCFLAGS_FOR_BUILD from the recipe, leaving only
1514 LDFLAGS_FOR_BUILD. Report from Jay K <jayk123@hotmail.com>
1515 - gen-helpfiles: remove CCFLAGS_FOR_BUILD from the recipe, leaving
1516 only LDFLAGS_FOR_BUILD
1517 - man2html: use $(STYLE_CFLAGS) in BASE_CCFLAGS variable for C file
1518 compilation options
1519
1520 {,builtins}/Makefile.in, lib/{sh,readline,malloc,glob}/Makefile.in
1521 - use STYLE_CFLAGS so specifying CFLAGS=-g to make doesn't clutter the
1522 output with warnings about parens and format strings
1523
1524 7/9
1525 ---
1526 lib/readline/search.c
1527 - make_history_line_current: call _rl_free_saved_history_line to clean
1528 up _rl_saved_line_from_history and get all the code that frees it
1529 into one place
1530
1531 lib/readline/misc.c
1532 - _rl_free_saved_history_line: if rl_undo_list points to the data
1533 member of _rl_saved_line_from_history, set it to NULL to avoid having
1534 it point to freed memory, since the next thing we do now is to free
1535 the undo list the data member points to
1536 - _rl_start_using_history: call _rl_free_saved_history_line instead of
1537 calling _rl_free_history_entry directly. Fixes memory leak reported
1538 by Trung Dam <trungdam@yahoo.com>
1539
1540 7/12
1541 ----
1542 lib/readline/search.c
1543 - make_history_line_current: free rl_undo_list before replacing the
1544 current line with the line from history, since it is a private
1545 undo list from reading the search string
1546
1547 lib/readline/rlmbutil.h
1548 - Since wchar_t/mbrtowc/wcrtomb are limited to 16 bits on Windows
1549 with MSVC, start abstracting the differences using WCHAR_T/
1550 MBRTOWC/WCRTOMB
1551
1552 7/13
1553 ----
1554
1555 lib/readline/{complete,display,input,text,util,vi_mode}.c
1556 - use WCHAR_T/MBRTOWC/WCRTOMB. Part of a set of Windows MSVC fixes
1557 from sparrowhawk996@gmail.com
1558
1559 builtins/{enable,hash,help}.def
1560 - enable_builtin: use sh_chkwrite after output to check for write errors
1561
1562 7/16
1563 ----
1564 arrayfunc.c
1565 - quote_compound_array_word: free SUB and VALUE after assigning from
1566 sh_single_quote(). From a coverity report from
1567 Siteshwar Vashisht <svashisht@redhat.com>
1568
1569 bashhist.c
1570 - bash_remove_history_range: free DISCARD_LIST after freeing its
1571 elements
1572
1573 bashline.c
1574 - bash_directory_expansion: add code to free D as a separate branch,
1575 though it's never hit in practice
1576
1577 builtins/trap.def
1578 - showtrap: free T even if show_default == 1 if it's a non-default
1579 trap string
1580
1581 7/17
1582 ----
1583 execute_cmd.c
1584 - execute_coproc: free NAME on invalid identifier error
1585
1586 lib/glob/glob.c
1587 - glob_vector: make sure NEXTLINK is allocated using malloc before
1588 passing it to free()
1589 - glob_filename: free RESULT before returning glob_error_return when
1590 there is only a filename
1591
1592 print_cmd.c
1593 - indirection_level_string: make sure we free PS4 after calling
1594 decode_prompt_string if *ps4 == 0
1595
1596 subst.c
1597 - parameter_brace_transform: if vtype == VT_VARIABLE, we need to free
1598 a non-null VAL
1599
1600 variables.c
1601 - assign_in_env: if NAME is not a valid shell identifier, free it
1602 after printing the error message and before returning. These are
1603 the rest of the fixes from Siteshwar Vashisht <svashisht@redhat.com>
1604
1605 7/22
1606 ----
1607 shell.c
1608 - main: set dollar_vars[0] to shell_script_filename before calling
1609 run_startup_files() in the non-interactive case. Restore it after
1610 run_startup_files returns so we can get better error messages if
1611 we can't open a script file. Suggested by several people, originally
1612 by Marc Aurèle La France <tsi@tuyoix.net> back in 2/2021 (in a
1613 different form) and most recently by Tapani Tarvainen
1614 <bash@tapanitarvainen.fi>
1615
1616 7/28
1617 ----
1618 trap.c
1619 - any_signals_trapped: return that a signal is trapped only if it's
1620 not ignored. This is an additional opportunity for optimization,
1621 reported in https://bugzilla.redhat.com/show_bug.cgi?id=1981926
1622
1623 7/30
1624 ----
1625 examples/loadables/sleep.c
1626 - main: if the uconvert conversion fails, but the argument appears to
1627 contain a GNU-like interval specifier like "1m30s", return
1628 EX_DISKFALLBACK so the execute_builtin code tries to run the
1629 external version
1630
1631 builtins/enable.def
1632 - enable_shell_builtin: if the builtin isn't found, return EX_NOTFOUND
1633 to allow the caller (enable_builtin) to react differently if it
1634 wants to
1635 - dyn_load_builtin: if the shared object isn't found, return EX_NOTFOUND,
1636 change enable_builtin to deal with it
1637 - enable_builtin: if there are no supplied options, and we attempt to
1638 enable a non-existent builtin, try modifying `enable name' to the
1639 equivalent of `enable -f name name' and return success if we
1640 successfully load a builtin from a shared object. Proposed several
1641 times, most recently by Robert Elz <kre@munnari.OZ.AU>
1642
1643 doc/{bash.1,bashref.texi}
1644 - enable: document new behavior of `enable NAME' when NAME is not a
1645 current shell builtin
1646
1647 8/3
1648 ---
1649 lib/glob/sm_loop.c
1650 - GMATCH: check for interrupts or terminating signals each time through
1651 the loop and return FNM_NOMATCH immediately if received. Let the
1652 higher layers deal with interrupting the match and jumping out.
1653 Inspired by a report from andrej@podzimek.org
1654
1655 8/6
1656 ---
1657 subst.c
1658 - {parameter_brace_remove_pattern,parameter_brace_transform,
1659 parameter_brace_substring,parameter_brace_casemod,
1660 parameter_brace_patsub}: make sure the IND argument is of type
1661 arrayind_t to handle the full range of subscripts. Reported by
1662 felix@f-hauri.ch
1663
1664 builtins/printf.def
1665 - printf_builtin: take new format specifier: %Q. This acts like %q
1666 but applies any supplied precision to the original unquoted
1667 argument, then quotes that result and outputs the entire quoted
1668 string, preserving the original field width. Originally suggested
1669 back in 4/2020 by Sam Liddicott <sam@liddicott.com>
1670
1671 subst.c
1672 - char_is_quoted: check whether or not we are on the second or later
1673 line of a command with an unclosed quoted string from a previous
1674 line. If we are, see if it's closed before the character we're
1675 checking, so we don't interpret a closing quote as starting a new
1676 quoted string. Reported several times, most recently by
1677 Phi Debian <phi.debian@gmail.com> in 6/2021.
1678
1679 8/9
1680 ---
1681 parse.y,subst.c
1682 - locale_expand: if the variable SINGLEQUOTE_TRANSLATIONS is non-zero,
1683 single-quote the translated result of $"..." (if it's different from
1684 the untranslated string)
1685
1686 builtins/shopt.def
1687 - noexpand_translation: new option to expose the value of
1688 SINGLEQUOTE_TRANSLATIONS
1689
1690 8/10
1691 ----
1692 doc/{bash.1,bashref.texi}
1693 - noexpand_translation: add description of new option
1694
1695 8/16
1696 ----
1697 builtins/printf.def
1698 - printf_builtin: initialize retval after parsing arguments, since we
1699 use it for the `v' option. Bug report from Keith Thompson
1700 <Keith.S.Thompson@gmail.com>
1701
1702 lib/sh/unicode.c
1703 - u32tocesc: fix typo that returned \uXXXXXXXX instead of \UXXXXXXXX.
1704 From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992257 by
1705 <nabijaczleweli@nabijaczleweli.xyz>
1706
1707 8/17
1708 ----
1709 siglist.c
1710 - include command.h before general.h for PARAMS and prototypes. Report
1711 from Osipov, Michael (LDA IT PLM) <michael.osipov@siemens.com>
1712
1713 8/18
1714 ----
1715 lib/readline/colors.c
1716 - S_ISBLK: make sure it's defined before we use it, like in complete.c
1717
1718 lib/readline/complete.c,{bashline,variables}.c
1719 - minor changes to prep for making rl_completer_word_break_characters
1720 `const'
1721
1722 subst.[ch],pcomplete.c
1723 - split_at_delims: the DELIMS argument is now `const'; change callers
1724
1725 lib/readline/rlmbutil.h
1726 - _rl_wcwidth: add function prototype for inline function declaration
1727
1728 lib/readline/bind.c
1729 - _rl_get_keyname: print keys greater than 160 (which are valid UTF-8)
1730 as octal escape sequences
1731
1732 lib/readline/text.c
1733 - do_lowercase_version: return 99999 to prevent the linker from
1734 combining it with _rl_null_function and optimizing away the separate
1735 copy. That messes with function pointer comparisons. Part of this
1736 batch of fixes from sparrowhawk996@gmail.com
1737
1738 8/19
1739 ----
1740 complete.c,readline.c,readline.h
1741 - rl_completer_word_break_characters: now const char * like
1742 rl_basic_word_break_characters; element of readline state struct
1743 used to save it also const. THIS IS AN API CHANGE
1744
1745 bashline.c
1746 - orig_rl_completer_word_break_characters: now const char * like
1747 rl_completer_word_break_characters
1748
1749 8/20
1750 ----
1751 bashline.c
1752 - bash_directory_completion_hook: if direxpand and dirspell are both
1753 set while trying to complete an absolute pathname as a command, don't
1754 take a spell-corrected directory name that is shorter than the
1755 original hint. https://bugzilla.redhat.com/show_bug.cgi?id=1782809
1756
1757 builtins/common.[ch]
1758 - sh_noassign: convenience function to print an error message when a
1759 user attempts an assignment to a "noassign" variable. Not used yet
1760
1761 assoc.[ch]
1762 - assoc_to_kvpair_list: new function, returns a WORD_LIST containing
1763 key-value pairs as separate words
1764
1765 array.[ch]
1766 - array_to_kvpair_list: new function, returns a WORD_LIST containing
1767 index-value pairs as separate words
1768
1769 subst.c
1770 - string_transform: handle '@k' transform like '@K'
1771 - valid_parameter_transform: 'k' is a valid transform operator
1772 - array_transform: handle '@k' transformation by calling one of
1773 array_to_kvpair_list or assoc_to_kvpair_list and treating the
1774 result as if expanding the array depending on whether the index is
1775 `@' or `*' with the usual meanings
1776
1777 doc/{bash.1,bashref.texi}
1778 - document new '@k' parameter transformation operator
1779
1780 8/27
1781 ----
1782 lib/readline/kill.c
1783 - rl_unix_filename_rubout: handle pathnames that consist only of one
1784 or more slashes. The old code went too far and deleted the previous
1785 word as well. From dabe@dabe.com
1786
1787 8/31
1788 ----
1789 parse.y
1790 - STRING_SAVER: now save and restore shell_input_line_len; not sure
1791 why it wasn't done before; fix push_string and pop_string accordingly
1792 - prompt_again: now takes a parameter FORCE; not used yet (every
1793 caller passes 0), needs more thought
1794
1795 builtins/evalstring.h
1796 - open_redir_file: broke code that expands the redirection and opens
1797 the resultant filename into a new function, called from cat_file
1798
1799 redir.h
1800 - open_redir_file: extern declaration here for now
1801
1802 builtins/evalstring.c
1803 - parse_string: takes a new argument: COMMAND **cmdp; if non-null, saves
1804 the parsed command to *cmdp and lets the caller manage it itself.
1805 global_command is still not modified. Changed callers in parse.y
1806
1807 9/1
1808 ---
1809 parse.y
1810 - parse_string_to_command: stripped-down version of xparse_dolparen
1811 that takes a string, runs it through the parser, and returns the
1812 resultant COMMAND *; uses parse_string with the new argument
1813
1814 externs.h
1815 - parse_string_to_command: extern declaration
1816
1817 builtins/evalstring.c
1818 - can_optimize_cat_file: new function, takes a COMMAND * argument and
1819 returns true if the command can be optimized like $(<file); changed
1820 parse_and_execute to call it
1821
1822 subst.c
1823 - optimize_cat_file: new function, optimizes $(<file) without creating
1824 a new process. Uses redir_open to open the redirection file, after
1825 expansion, and calls read_comsub to read from it directly
1826 - read_comsub: now reads into a 4096 byte buffer (COMSUB_PIPEBUF)
1827 - command_substitute: if the string begins with a `<' and isn't followed
1828 by any of "<>&", see if we can optimize the command and call
1829 optimize_cat_file to do it if we can.
1830
1831 9/2
1832 ---
1833 configure.ac,config.h.in,lib/sh/setlinebuf.c
1834 - SETVBUF_REVERSED: remove all references
1835
1836 configure.ac,aclocal.m4
1837 - AC_OUTPUT: move created files and commands to AC_CONFIG_FILES and
1838 AC_CONFIG_COMMANDS; call AC_OUTPUT without any arguments
1839 - require autoconf version 2.63
1840 - AC_HELP_STRING -> AS_HELP_STRING
1841 - replace references to $ac_cv_prog_gcc with $GCC
1842 - AC_C_LONG_DOUBLE -> AC_TYPE_LONG_DOUBLE
1843 - enable-alt-array-implementation: new configure option, placeholder
1844 for later
1845
1846 unwind_prot.c
1847 - stddef.h: include if HAVE_STDDEF_H is defined, not STDC_HEADERS
1848
1849 bashansi.h
1850 - memory.h: don't include any more; assume <string.h> has all the
1851 necessary defines
1852
1853 aclocal.m4
1854 - AC_HEADER_STDC: remove AC_REQUIRE calls to this; change tests to use
1855 appropriate checks instead of STDC_HEADERS
1856
1857 9/3
1858 ---
1859 configure.ac,config.h.in
1860 - AC_TYPE_SIGNAL,BASH_TYPE_SIGHANDLER: remove calls, remove mention of
1861 RETSIGTYPE and VOID_SIGHANDLER
1862 - AC_USE_SYSTEM_EXTENSIONS: use this instead of AC_ISC_POSIX (which is
1863 well and truly obsolete) and AC_MINIX (which just calls it anyway).
1864 All the right defines are already present
1865 - AC_HEADER_TIME: removed
1866 - AC_HEADER_STDC: removed
1867 - AC_DECL_SYS_SIGLIST: replaced with BASH_DECL_SYS_SIGLIST
1868 - BASH_FUNC_CTYPE_NONASCII: removed
1869
1870 sig.h,lib/readline/signals.c
1871 - RETSIGTYPE -> void, SIGHANDLER_RETURN -> return
1872
1873 include/posixtime.h
1874 - don't bother with TIME_WITH_SYS_TIME, just include <sys/times.h> if
1875 we have it and include <time.h> unconditionally
1876
1877 include/chartypes.h,lib/readline/chardefs.h
1878 - IN_CTYPE_DOMAIN: no longer uses STDC_HEADERS define, checks against
1879 CHAR_MAX for non-C89 systems, still a no-op on C89 systems
1880
1881 lib/readline/chardefs.h
1882 - memory.h: don't include, no need for STDC_HEADERS; assume the mem*
1883 functions are defined in <string.h> as in C89
1884 - now that we assume IN_CTYPE_DOMAIN bounds its argument to unsigned
1885 chars, we don't need NON_NEGATIVE checks at all
1886
1887 lib/readline/chardefs.h,util.c
1888 - ALPHABETIC -> _rl_alphabetic_p
1889
1890 9/8
1891 ---
1892
1893 lib/sh/strftime.c
1894 - include <posixtime.h> after reworking above; include <sys/types.h>
1895 unconditionally in case it defines time_t. From a report by
1896 Ori Sky Farrell <bash@ori.mx>
1897
1898 9/9
1899 ---
1900 lib/readline/search.c
1901 - rl_history_search_internal: set rl_undo_list to NULL after calling
1902 rl_maybe_save_line, since it will be restored one way or another
1903 after the search completes, and we don't want it to be freed twice
1904 - rl_history_search_internal: leave the current history offset at the
1905 position of the last matching history entry. This means that things
1906 like ^P will start back from that history entry, ^N will move
1907 forward from there, and operate-and-get-next will work like it does
1908 with incremental searches. Reported by Vandrus Zoltán
1909 <vandrus.zoltan@gmail.com>
1910
1911 9/10
1912 ----
1913 aclocal.m4
1914 - BASH_C_LONG_LONG: removed
1915 - BASH_TYPE_LONG_DOUBLE: removed
1916 - BASH_TYPE_LONG_LONG,BASH_TYPE_UNSIGNED_LONG_LONG: removed
1917 - BASH_FUNC_CTYPE_NONASCII: removed
1918 - BASH_SYS_SIGNAL_VINTAGE,BASH_SYS_REINSTALL_SIGHANDLERS: don't
1919 require AC_TYPE_SIGNAL, use void instead of RETSIGTYPE
1920 - BASH_TYPE_SIGHANDLER: removed
1921
1922 configure.ac,aclocal.m4,config.h.in
1923 - BASH_TYPE_LONG_LONG: removed, call AC_TYPE_LONG_LONG_INT directly,
1924 change #define to HAVE_LONG_LONG_INT
1925 - BASH_TYPE_UNSIGNED_LONG_LONG: removed, call AC_TYPE_UNSIGNED_LONG_LONG_INT
1926 directly, change #define to HAVE_UNSIGNED_LONG_LONG_INT
1927
1928 externs.h,include/typemax.h,lib/sh/{fmtullong,snprintf,strtoimax,strtoll,
1929 strtoull,strtoumax}.c
1930 - HAVE_LONG_LONG -> HAVE_LONG_LONG_INT
1931 - HAVE_UNSIGNED_LONG_LONG -> HAVE_UNSIGNED_LONG_LONG_INT
1932
1933 configure.ac
1934 - AC_TRY_COMPILE -> AC_COMPILE_IFELSE
1935 - BASH_CHECK_TYPE (intmax_t) -> AC_TYPE_INTMAX_T
1936 - BASH_CHECK_TYPE (uintmax_t) -> AC_TYPE_UINTMAX_T
1937 - BASH_CHECK_TYPE (sig_atomic_t): removed
1938
1939 aclocal.m4
1940 - BASH_FUNC_STRSIGNAL: changed to use AC_LINK_IFELSE
1941 - BASH_FUNC_LSTAT: changed to use AC_LINK_IFELSE
1942 - BASH_FUNC_SBRK: changed to use AC_LINK_IFELSE and AC_RUN_IFELSE,
1943 fixed typo
1944 - BASH_CHECK_SPEED_T: changed to use AC_COMPILE_IFELSE
1945 - BASH_TYPE_SIG_ATOMIC_T: use BASH_CHECK_TYPE instead of AC_CHECK_TYPE
1946 - BASH_STRUCT_DIRENT: new macro, like _AC_STRUCT_DIRENT but public and
1947 sets a different bash-specific shell variable
1948 - BASH_STRUCT_DIRENT_D_{INO,FILENO,NAMLEN}: call BASH_STRUCT_DIRENT
1949 with a different first argument instead of using inline code and
1950 AC_TRY_COMPILE
1951
1952 9/11
1953 ----
1954 [prayers for the victims of 9/11/2001]
1955
1956 aclocal.m4
1957 - BASH_CHECK_DECL: just call AC_CHECK_DECLS and use the default
1958 includes, which includes the files we used to specify
1959 - BASH_FUNC_INET_ATON: changed to use AC_LINK_IFELSE
1960 - BASH_STRUCT_WEXITSTATUS_OFFSET: changed to use AC_RUN_IFELSE
1961 - BASH_FUNC_OPENDIR_CHECK: changed to use AC_RUN_IFELSE
1962 - BASH_FUNC_ULIMIT_MAXFDS: changed to use AC_RUN_IFELSE
1963 - BASH_UNDER_SYS_SIGLIST: changed to use AC_RUN_IFELSE
1964 - BASH_SYS_SIGLIST: changed to use AC_RUN_IFELSE
1965 - BASH_FUNC_DUP2_CLOEXEC_CHECK: changed to use AC_RUN_IFELSE
1966 - BASH_FUNC_GETENV: changed to use AC_RUN_IFELSE
1967 - BASH_FUNC_GETCWD: changed to use AC_RUN_IFELSE
1968 - BASH_FUNC_FNMATCH_EXTMATCH: changed to use AC_RUN_IFELSE
1969 - BASH_FUNC_POSIX_SETJMP: changed to use AC_RUN_IFELSE
1970 - BASH_FUNC_STRCOLL: changed to use AC_RUN_IFELSE
1971 - BASH_FUNC_PRINTF_A_FORMAT: changed to use AC_RUN_IFELSE
1972 - BASH_SYS_PGRP_SYNC: changed to use AC_RUN_IFELSE
1973 - BASH_SYS_SIGNAL_VINTAGE: changed to use AC_RUN_IFELSE
1974 - BASH_SYS_NAMED_PIPES: changed to use AC_RUN_IFELSE
1975 - BASH_CHECK_RTSIGS: changed to use AC_RUN_IFELSE
1976 - BASH_CHECK_MULTIBYTE: changed to use AC_RUN_IFELSE
1977 - RL_LIB_READLINE_VERSION: changed to use AC_RUN_IFELSE
1978 - BASH_CHECK_WCONTINUED: changed to use AC_RUN_IFELSE
1979 - BASH_FUNC_SNPRINTF: changed to use AC_RUN_IFELSE
1980 - BASH_FUNC_VSNPRINTF: changed to use AC_RUN_IFELSE
1981 - BASH_FUNC_FNMATCH_EQUIV_FALLBACK: changed to use AC_RUN_IFELSE
1982 - BASH_DECL_PRINTF: changed to use AC_RUN_IFELSE
1983 - BASH_TYPE_RLIMIT: rewrote to avoid quad_t, now uses AC_COMPILE_IFELSE
1984 to determine whether rlim_t is available, otherwise determines the
1985 value of RLIMTYPE based on sizeof(rlim.rlim_cur): int, long, or
1986 long long
1987 - BASH_SIZEOF_RLIMIT,BASH_SIZEOF_QUAD_T: helper macros for
1988 BASH_TYPE_RLIMIT in the case that rlim_t is not present
1989
1990 configure.ac
1991 - BASH_CHECK_DECL -> AC_CHECK_DECLS
1992 - quad_t: use AC_CHECK_TYPE (new style) instead of BASH_CHECK_TYPE
1993
1994
1995 9/14
1996 ----
1997 execute_cmd.c
1998 - time_command: if we longjmp back to the top_level we saved, make sure
1999 we're in the same subshell environment before printing the timing
2000 stats. We could have longjmped back from a child process of the
2001 command or pipeline we want to time. From a report by
2002 Sergej Alikov <sergej@alikov.com>
2003 - time_command: restore command->flags even if we longjmp back
2004
2005 general.c
2006 - check_binary_file: if the first line of the ENOEXEC file starts with
2007 a `#!', check the rest of the buffer for NULs to determine whether
2008 this is a binary file. Since we only check the first line, a #! line
2009 followed by binary data could be confused for a shell script
2010
2011 9/16
2012 ----
2013 bashjmp.h
2014 - EXITBLTIN: new longjmp `code' value: used by the exit builtin
2015
2016 {execute_cmd,shell,subst,trap}.c,builtins/evalstring.c
2017 - treat EXITBLTIN exactly the same as EXITPROG (for now)
2018
2019 builtins/exit.def
2020 - exit_builtin: jump_to_top_level with value EXITBLTIN
2021
2022 builtins/evalstring.c
2023 - parse_and_execute: EXITBLTIN has its own case, with the same contents
2024 as EXITPROG
2025
2026 9/17
2027 ----
2028 builtins/evalstring.c
2029 - parse_and_execute: change EXITBLTIN case to avoid running the
2030 unwind-protect stack to the `pe_dispose' tag (which has the effect
2031 of running all the unwind-protects installed by the commands in
2032 the string) if we're executing in a function and EXIT is trapped.
2033 This has the effect of running the EXIT trap in the function context,
2034 which is what we do when we're not in parse_and_execute (eval,
2035 bash -c, command substitution, etc.)
2036
2037 9/18
2038 ----
2039 arrayfunc.c
2040 - expand_and_quote_kvpair_word,quote_compound_array_word,
2041 expand_and_quote_assoc_word,quote_compound_array_list: make sure
2042 the value has CTLESC characters doubled even when being single-
2043 quoted, since that's what the parser does with standalone assignment
2044 statements. From https://savannah.gnu.org/support/?110538
2045
2046 9/19
2047 ----
2048 aclocal.m4
2049 - AC_TRY_COMPILE -> AC_COMPILE_IFELSE (AC_TRY_LINK calls left to
2050 modify to avoid obsolete warnings)
2051 - BASH_STRUCT_WINSIZE: broke out checks for separate headers into new
2052 macros, call them and work with the results; needed to avoid two
2053 calls to AC_TRY_COMPILE
2054 - BASH_CHECK_KERNEL_RLIMIT: avoid multiple calls to AC_TRY_COMPILE by
2055 breaking basic test for RLIMIT_ defines into a separate test and
2056 calling the HPUX-specific _KERNEL test only if that fails
2057
2058 m4/gettext.m4,configure.ac
2059 - AM_GNU_GETTEXT -> BASH_GNU_GETTEXT: remove deprecation warning, since
2060 [no-libtool] is how we use this; rename to avoid someone's local
2061 copy from overriding ours
2062
2063 9/20
2064 ----
2065 aclocal.m4
2066 - BASH_CHECK_MULTIBYTE: take out code that checks for nl_langinfo(CODESET)
2067 since that's already provided by AM_LANGINFO_CODESET, which is
2068 called by BASH_GNU_GETTEXT. We AC_REQUIRE it here, though, to avoid
2069 problems from future changes
2070 - BASH_SYS_SIGNAL_VINTAGE: broke the code that checks for the different
2071 signal vintages into different AC_DEFUNed macros, changed
2072 BASH_SYS_SIGNAL_VINTAGE to stitch them together with shell code
2073 testing the cached variables
2074 - AC_TRY_LINK -> AC_LINK_IFELSE: there are no more autoconf warnings
2075
2076 9/21
2077 ----
2078 array.[ch]
2079 - array_from_argv: new convenience function
2080
2081 array.h
2082 - num_elements: now an arrayind_t, since that's the type of indices, it
2083 makes sense to allow that many elements
2084
2085 9/22
2086 ----
2087 lib/readline/terminal.c
2088 - rl_term_kP: fix typo. Fix from Koichi Murase <myoga.murase@gmail.com>
2089
2090 9/25
2091 ----
2092 lib/readline/display.c
2093 - rl_clear_visible_line: call _rl_clear_to_eol with _rl_screenwidth as
2094 the argument so we clear out the entire line even if the terminal
2095 doesn't have a clear-to-eol sequence; make sure to add a call to
2096 rl_cr after that so we know we're always in column 0
2097 - _rl_redisplay_after_sigwinch: just call rl_clear_visible_line instead
2098 of erasing the last line of the display
2099 - _rl_redisplay_after_sigwinch: if the prompt is longer than the screen
2100 width, make sure to call _rl_reset_prompt to recalculate the
2101 local_prompt_newlines array. Should fix issue from
2102 https://savannah.gnu.org/support/index.php?110543
2103
2104 redir.c
2105 - do_redirection_internal: if given [N]<&WORD- or [N]>&WORD- and WORD
2106 expands to null, make it identical to <&- or >&- and close file
2107 descriptor N (default 0). From a discussion back in 5/2021
2108
2109 9/27
2110 ----
2111 arrayfunc.c
2112 - expand_compound_array_assignment: since we run the string through
2113 the parser to turn it into a list (so we can make sure all shell
2114 metacharacters are properly quoted), we need to remove the CTLESC
2115 the parser uses to quote CTLESC and CTLNUL in *unquoted* words.
2116 The rest of the code assumes this has been done, and assumes that
2117 any CTLESC characters passed to expansion are part of the original
2118 word and should themselves be quoted, doubling the number of CTLESCs
2119
2120 9/28
2121 ----
2122 arrayfunc.c
2123 - expand_and_quote_kvpair_word,quote_compound_array_word,
2124 expand_and_quote_assoc_word,quote_compound_array_list: if we are
2125 single-quoting associative array subscripts and associative and
2126 indexed array values, we need to quote CTLESC characters, because
2127 that's how they come out of the parser and how the assignment
2128 statement code expects to see them.
2129 Fixes https://savannah.gnu.org/support/index.php?110538
2130
2131 9/29
2132 ----
2133 subst.c
2134 - parameter_brace_transform: invalid transformation operators are now
2135 fatal errors in non-interactive shells, as with the other word
2136 expansions. Reported by Martin Schulte <gnu@schrader-schulte.de> in
2137 https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00026.html
2138
2139 execute_cmd.c
2140 - execute_disk_command: if we're optimizing out the fork (nofork) and
2141 not directly in a pipeline (pipe_in == pipe_out == NO_PIPE), only
2142 modify shell_level if subshell_environment says we're not already in
2143 a pipeline. Reported by Paul Smith <psmith@gnu.org> 10/11/2020
2144 against GNU make
2145
2146 evalstring.c
2147 - should_suppress_fork: remove #if 1 for code that tries to suppress
2148 the fork in a process substitution subshell
2149
2150 9/30
2151 ----
2152 builtins/mapfile.def
2153 - do_chop: make sure we're comparing unsigned chars when checking
2154 whether the delim is the last character on the line. Reported by
2155 Greg Wooledge <greg@wooledge.org>
2156
2157 10/1
2158 ----
2159 lib/readline/rltty.c
2160 - rl_deprep_terminal: if we're not echoing to the terminal
2161 (_rl_echoing_p == 0), and we just output the bracketed paste end
2162 sequence, output a newline to compensate for the \r at the end of
2163 BRACK_PASTE_FINI, since redisplay didn't do it for us. Reported by
2164 Siteshwar Vashisht <svashisht@redhat.com>
2165
2166 shell.h
2167 - MATCH_EXPREP: new matching flag, understood only by pattern
2168 substitution; means to expand unquoted `&' in the replacement
2169 STRING to the match of PATTERN
2170
2171 subst.c
2172 - shouldexp_replacement: uncommented
2173 - pat_subst: we expand & in the replacement string if MATCH_EXPREP
2174 appears in MFLAGS
2175 - parameter_brace_patsub: push call to shouldexp_replacement out here,
2176 after the replacement string is expanded; set MATCH_EXPREP if there
2177 is an unquoted `&' (by backslash) in the expanded replacement
2178 string
2179
2180 doc/{bash.1,bashref.texi}
2181 - pattern substitution: overhauled the description, moved each of the
2182 possible forms to be tags in the tagged paragraph. The description
2183 now specifies the expansions that the replacement string undergoes
2184 - pattern substitution: documented new behavior of unquoted & in the
2185 replacement string
2186
2187 10/4
2188 ----
2189 shell.c
2190 - include <malloc/shmalloc.h> if we're debugging malloc (MALLOC_DEBUG)
2191 so we can get an extern declaration of trace_malloc_stats
2192
2193 10/5
2194 ----
2195 subst.c
2196 - expand_subscript_string: allocate new memory for td.word, copying
2197 STRING, in case it gets freed on error by expand_word_internal.
2198 Report and fix from Koichi Murase <myoga.murase@gmail.com>
2199
2200 lib/malloc/malloc.c
2201 - malloc_usable_size: return the allocated size instead of the chunk
2202 size, since writing over the bounds checking will cause fatal errors.
2203 Reported by Julien Moutinho <julm+bash@sourcephile.fr>, fix from
2204 Dominique Martinet <asmadeus@codewreck.org>
2205
2206 arrayfunc.c
2207 - unbind_array_elememnt: pass (flags&VA_NOEXPAND) to skipsubscript(),
2208 instead of unconditionally passing 1 if we're operating on an
2209 associative array. This is consistent with how valid_array_reference
2210 determines the length of the subscript.
2211 Report and fix from Koichi Murase <myoga.murase@gmail.com>
2212
2213 10/6
2214 ----
2215
2216 subst.c
2217 - skip_to_delim: add a new value for FLAGS. If FLAGS&2, we assume that
2218 START is one character after the opening OPEN. If not, we assume that
2219 START is at OPEN, and needs to be incremented past it. Part of fix
2220 from Koichi Murase <myoga.murase@gmail.com>
2221
2222 arrayfunc.c
2223 - unbind_array_element: make sure to pass FLAGS to skipsubscript with
2224 bit 2 set, since we are passed a SUB index that's one past the
2225 opening bracket. Rest of fix from
2226 Koichi Murase <myoga.murase@gmail.com>
2227 - array_variable_name: make sure we pass (FLAGS&1) to skipsubscript, so
2228 we don't inadvertently pass a value with bit 2 set, which would
2229 cause an off-by-one error in subscript parsing
2230
2231 10/8
2232 ----
2233 trap.c
2234 - restore_traps: inverse of reset_signal_handlers. This understands
2235 how reset_signal_handlers changes the signal disposition while
2236 leaving the trap string in place, and knows how to restore flags
2237 and state based on that preserved trap string and whether or not
2238 the signal is "special" to the shell.
2239
2240 builtins/exec.def
2241 - exec_builtin: instead of using restore_original_signals to completely
2242 cancel the traps, call reset_signal_handlers so the trap strings are
2243 preserved. Then if the exec fails (and we're not exiting) we can
2244 look at the trap strings and see how to restore the trap state.
2245 This calls restore_traps after reinitializing the shell signal
2246 handlers, using the trap strings saved by reset_signal_handlers.
2247 Fixes issue with not exiting after a failed exec clearing the EXIT
2248 trap reported by Mark March <march@systempad.org>, using the
2249 approach suggested by Robert Elz <kre@munnari.OZ.AU>
2250
2251 subst.c
2252 - expand_declaration_argument: when parsing options that modify
2253 attributes that affect how the value is handled (i, c, u, etc.),
2254 make sure to create an option string and call make_internal_declare
2255 with options that start with a `+' so the attribute is off when
2256 the assignment is performed and changes how the value is expanded.
2257 From a report by Léa Gris <lea.gris@noiraude.net>
2258
2259 lib/readline/complete.c
2260 - rl_display_match_list: even if _rl_completion_prefix_display_length
2261 is set to a non-zero value, pass the common prefix length to
2262 fnprint if we've turned on colored completion prefixes; passes
2263 through to fnprint via print_filename
2264 - fnprint: add the ellipsis if prefix_bytes exceeds the
2265 _rl_completion_prefix_display_length, add explicit check for
2266 prefix_bytes being longer since print_filename passes it through
2267 if colored-completion-prefix is set. This means that while
2268 completion-prefix-display-length still has precedence over
2269 colored-completion-prefix, it doesn't override it if both are set
2270 and the common prefix length is shorter than
2271 completion-prefix-display-length. From a report by
2272 Christoph Anton Mitterer <calestyo@scientia.net>
2273
2274 10/10
2275 -----
2276 parse.y
2277 - parse_dparen: if the last token is FOR, increment word_top and assign
2278 word_lineno like for other for loops. Fixes bug with LINENO after
2279 arithmetic for commands reported by
2280 Tom Coleman <thomas.james.coleman@gmail.com>
2281
2282 10/11
2283 -----
2284 execute_cmd.c
2285 - shell_execve: if execve fails with ENOENT, but executable_file()
2286 succeeds, display a slightly more descriptive error message. Prompted
2287 by a report from Andrea Monaco <andrea.monaco@autistici.org>
2288
2289 stringlib.c
2290 - strcreplace: allow backslash to escape a backslash, since we allow it
2291 to escape a `&'
2292
2293 10/14
2294 -----
2295 pcomplib.c
2296 - COMPLETE_HASH_BUCKETS: double to 512
2297
2298 stringlib.c
2299 - strcreplace: the last argument is now a flags argument. 1 has its
2300 previous meaning (glob); 2 means to allow backslash to escape a
2301 backslash (as added on 10/11)
2302
2303 subst.c
2304 - pat_subst: call strcreplace with 2 as the flags value
2305
2306 10/15
2307 -----
2308 doc/bashref.texi
2309 - updates to Installation section
2310
2311 doc/{mkposix,mkinst,mkrbash},doc/Makefile.in
2312 - changes to allow scripts to be run outside the source directory
2313
2314 10/18
2315 -----
2316 subst.c
2317 - patsub_replacement: controls whether pattern substitution expands `&'
2318 in the replacement string. Initialized to 1 by default
2319
2320 10/19
2321 -----
2322 doc/{bash.1,bashref.texi}
2323 - document bash's WCE SIGINT behavior when job control is not enabled
2324 and the shell receives a SIGINT while waiting for the foreground
2325 command to complete. Added at Red Hat's request. A complete
2326 discussion is at https://www.cons.org/cracauer/sigint.html
2327
2328 10/25
2329 -----
2330 builtins/shopt.def
2331 - patsub_replacement: new shell option, exposes patsub_replacement
2332 variable controlling whether pattern substitution expands `&' in
2333 the replacement string. Still enabled by default.
2334
2335 doc/{bash.1,bashref.texi}
2336 - patsub_replacement: document new shopt option
2337
2338 10/26
2339 -----
2340 lib/readline/display.c
2341 - expand_prompt: group runs of invisible characters at the right edge
2342 of the screen with the previous physical characters when setting
2343 local_prompt_newlines, since that's how update_line() expects to
2344 get it. Fix from sparrowhawk996@gmail.com.
2345
2346 lib/readline/macro.c
2347 - rl_end_kbd_macro: make sure current_macro_index is > 0 after
2348 subtracting the key sequence length, clamp it to 0 before writing
2349 the ending NULL. From a fuzzing report by
2350 Tillmann Osswald <tosswald@ernw.de>
2351
2352 lib/readline/isearch.c
2353 - _rl_isearch_dispatch: in the bracketed paste case, don't assume the
2354 pasted text is null-terminated, so use memcpy instead of strcpy for
2355 the length of the pasted text, then make sure the search string is
2356 null-terminated. From a fuzzing report by
2357 Tillmann Osswald <tosswald@ernw.de>
2358
2359 lib/readline/text.c
2360 - rl_transpose_words: make sure to preserve the value of rl_end from
2361 the beginning to the end of the function. From a fuzzing report by
2362 Tillmann Osswald <tosswald@ernw.de>
2363
2364 lib/readline/vi_mode.c
2365 - rl_vi_delete_to,rl_vi_change_to,rl_vi_yank_to: if we are redoing a
2366 command (_rl_vi_redoing == 1), save the old _rl_vimvcxt, allocate a
2367 new one, and restore the old one before returning. Prevents some
2368 pointer aliasing problems. From a fuzzing report by
2369 Tillmann Osswald <tosswald@ernw.de>
2370
2371 10/29
2372 -----
2373 arrayfunc.c
2374 - tokenize_array_reference: take valid_array_reference and add a third
2375 argument (char **SUBP), which, if non-NULL, gets the null-terminated
2376 subscript parsed from the NAME argument. If it's NULL, the caller
2377 gets the old valid_array_reference behavior. Fix from
2378 Koichi Murase <myoga.murase@gmail.com>
2379 - valid_array_reference: just call tokenize_array_reference with a
2380 NULL third argument
2381 - unbind_array_element: assume the caller (unset_builtin) passes a
2382 null-terminated SUB that's already been validated by a call to
2383 tokenize_array_reference so we don't need to call skipsubscript() or
2384 check VA_ONEWORD. Fix from Koichi Murase <myoga.murase@gmail.com>
2385
2386 arrayfunc.h
2387 - tokenize_array_reference: extern declaration
2388
2389 builtins/set.def
2390 - unset_builtin: use tokenize_array_reference to figure out T and pass
2391 that to unbind_array_element. Fix from
2392 Koichi Murase <myoga.murase@gmail.com>
2393 - unset_builtin: pass non-null argument to array_variable_part to get
2394 the length of the subscript (T), then cut off any final `]' before
2395 passing it to unbind_array_element, since that's what it now
2396 expects
2397
2398 subst.c
2399 - expand_string_for_rhs,expand_string_for_pat: assign td.word from
2400 newly-allocated memory in case it gets freed on error during the
2401 call to call_expand_word_internal(); free it manually when that
2402 call returns
2403
2404 11/1
2405 ----
2406 findcmd.c
2407 - search_for_command: if FLAGS includes CMDSRCH_STDPATH, don't look in
2408 the hash table for the command name. Prompted by a report from
2409 Roger Morris <roger.morris@gmail.com>
2410
2411 aclocal.m4
2412 - BASH_FUNC_POSIX_SETJMP: add a check by fetching the signal mask
2413 after the siglongjmp and making sure that SIGINT is not blocked,
2414 indicating we restored the original signal mask
2415
2416 11/2
2417 ----
2418 subst.c
2419 - expand_string_assignment: make sure to add W_TILDEEXP to the flags so
2420 expand_word_internal performs the right tilde expansion on tildes
2421 following an unquoted colon. Report from Anders Kaseorg
2422 <andersk@mit.edu>
2423
2424
2425 11/3
2426 ----
2427 aclocal.m4
2428 - BASH_FUNC_POSIX_SETJMP: if cross-compiling, default to `present' if
2429 we've determined we have posix signal functions
2430
2431 11/4
2432 ----
2433 execute_cmd.c
2434 - SET_LINE_NUMBER: set line_number, but don't set line_number_for_err_trap
2435 if we're already running the ERR trap
2436 - GET_LINE_NUMBER: evaluates to line_number_for_err_trap if we're
2437 running the ERR trap and executing_line_number() otherwise
2438 - execute_function: use GET_LINE_NUMBER to push the value for the line
2439 number into the BASH_LINENO array
2440 - execute_command_internal,execute_arith_command,execute_cond_command:
2441 use SET_LINE_NUMBER to avoid overwriting line_number_for_err trap
2442 while executing the ERR trap. Tentative fix for `caller' problem
2443 reported by Quinn Grier <quinn@quinngrier.com>
2444
2445 configure.ac,patchlevel.h
2446 - set bash version to 5.2-devel, meaning shell_compatibility_level = 52,
2447 which required updating tests (array.tests, array21.sub,
2448 quotearray3.sub, new-exp10.sub, history2.sub). The first three are
2449 because bash-5.2 flushes an indexed array but does not unset the
2450 variable when given `unset a[@]' or `unset[*]' (that is, it acts
2451 like `a=()' instead of `unset a'); the other two are because the
2452 version number changed
2453
2454 11/8
2455 ----
2456 doc/Makefile.in
2457 - bash.info: use `makeinfo -o' instead of calling infopost.sh to edit
2458 the filename, since the tags table includes absolute byte offsets to
2459 nodes. From https://savannah.gnu.org/support/?110557
2460
2461 11/15
2462 -----
2463 examples/loadables/realpath.c
2464 - add -a NAME argument to put canonicalized pathnames into an indexed
2465 array instead of displaying them on stdout. Suggested by
2466 felix@f-hauri.ch
2467
2468 lib/readline/colors.c
2469 - _rl_custom_readline_prefix: new function, looks in $LS_COLORS for a
2470 custom extension (*.readline-colored-completion-prefix) and uses that,
2471 if found, as the default color for the common prefix displayed when
2472 `colored-completion-prefix' is set. Suggested by
2473 Christoph Anton Mitterer <calestyo@scientia.net>
2474 - _rl_print_prefix_color: try the return value from _rl_custom_readline_prefix
2475 before defaulting to the C_PREFIX (C_SOCK) color. Suggested by
2476 Christoph Anton Mitterer <calestyo@scientia.net>
2477
2478 lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
2479 - readline-colored-completion-prefix: document new custom suffix for
2480 readline's colored-completion-prefix color
2481
2482 11/16
2483 -----
2484 doc/{bash.1,bashref.texi},builtins/set.def
2485 - set: modify usage synopsis slightly, based on
2486 https://bugzilla.redhat.com/show_bug.cgi?id=2022324
2487
2488 builtins/set.def
2489 - unset_builtin: add shell compatibility level check <= bash-5.1 to
2490 force `unset a[@]' to unset array variable `a', like in previous
2491 versions, instead of unsetting associative array element `@' or
2492 removing all elements of an indexed array without unsetting the
2493 variable itself
2494
2495 builtins/common.c
2496 - set_expand_once: now a no-op if the shell compatibility level is
2497 <= bash-5.1, preserving the previous versions' behavior for [[ -v
2498 (dependent on assoc_expand_once instead of forcing it)
2499
2500 subst.c
2501 - parameter_brace_expand_rhs: make sure that the final value assigned
2502 is always returned from ${a:=b}, even when `a' has a variable
2503 attribute that modifies the value on assignment. Reported back on
2504 1/20/2021 by oguzismailuysal@gmail.com; bash-5.2 tag removed
2505
2506 11/22
2507 -----
2508 doc/{bashref.texi,bash.1}
2509 - unset: change the description of `unset name[@]' (unset name[*])
2510 to reflect the new behavior (unset associative array subscripts or
2511 remove all elements from an indexed array) and the difference from
2512 previous versions
2513 - set: document -r for restricted shell mode
2514 - restricted shell: change occurrences of `set +o restricted' to
2515 `shopt -u restricted_shell'. From a report from
2516 Jin Xiang <jxiang.sd@gmail.com>
2517 - read: note that read -t0 may return 0 if a subsequent read will
2518 return EOF. From a suggestion by Dale R. Worley
2519 <worley@alum.mit.edu>
2520
2521 execute_cmd.c
2522 - execute_arith_command,eval_arith_for_expr: don't pass EXP_EXPANDED
2523 to evalexp if shell_compatibility_level > 5.1, assuming that the
2524 expression has been quoted by Q_ARITH handling
2525
2526 test.c
2527 - test_arithcomp: if we're being called by the conditional command
2528 code and treating the arguments to the arithmetic operators as
2529 expressions, don't pass EXP_EXPANDED to evalexp if the shell
2530 compatibility level is > 5.1, assuming that the expression has been
2531 quoted by Q_ARITH handling
2532
2533 11/29
2534 -----
2535 examples/loadables/getconf.[ch]
2536 - getconf: new implementation of loadable builtin, based on glibc
2537 getconf
2538
2539 examples/loadables/sleep.c
2540 - parse_gnutimefmt: parse GNU interval format (2m30s), returning
2541 seconds and microseconds like uconvert
2542 - sleep: use parse_gnutimefmt if uconvert can't parse the format right
2543 away and "dhms" appears in the format string. Don't return
2544 EX_DISKFALLBACK under any circumstances
2545
2546 11/30
2547 -----
2548
2549 builtins/wait.def
2550 - wait_builtin: refer to unset_waitlist only if JOB_CONTROL is enabled.
2551 Report from Joel Ebel <jbebel@google.com>
2552
2553 parse.y,builtins/set.def
2554 - changes for minimal config restrictions
2555
2556 configure.ac,config.h.in
2557 - --enable-translatable-strings: new configuration option to allow
2558 $"..." support to be compiled in or out; not included in the minimal
2559 shell configuration
2560
2561 shell.c
2562 - main: don't include any of the dump-strings options if
2563 TRANSLATABLE_STRINGS is not defined
2564
2565 lib/sh/shquote.c
2566 - sh_backslash_quote_for_double_quotes: needed for translatable strings
2567
2568 parse.y
2569 - support for translating $"..." strings now conditional on
2570 TRANSLATABLE_STRINGS
2571
2572 locale.c
2573 - locale_expand: now conditional on TRANSLATABLE_STRINGS
2574
2575 subst.c
2576 - expand_string_dollar_quote: support for $"..." now conditional on
2577 TRANSLATABLE_STRINGS
2578
2579 doc/bashref.texi
2580 - --enable-translatable-strings: document new configuration option
2581
2582 12/2
2583 ----
2584 subst.c
2585 - verify_substring_values: now that the default compatibility level is
2586 52, and the Q_ARITH code is enabled, make the EXP_EXPANDED flag for
2587 evalexp() dependent on the compatibility level
2588 - param_expand: arithmetic substitution: make EXP_EXPANDED flag
2589 for evalexp() dependent on the compatibility level
2590 - expand_word_internal: don't call expand_array_subscript if the
2591 shell compatibility level is 51 or below (Q_ARITH)
2592
2593 test.c
2594 - test_unop: if the shell compatibility level is > 51, using [@] with
2595 an existing associative array will report on a key of `@'
2596
2597 arrayfunc.c
2598 - array_expand_index: if the compatibility level is > 51, Q_ARITH is
2599 used and we don't pass EXP_EXPANDED to evalexp()
2600
2601 COMPAT,doc/bashref.texi
2602 - shell compatibility mode: document effects of setting the
2603 compatibility mode to 51
2604
2605 12/3
2606 ----
2607 lib/malloc/malloc.c
2608 - mremap: only use if MREMAP_MAYMOVE is defined, since we use the Linux
2609 version of the function signature
2610
2611 12/6
2612 ----
2613 bashhist.c
2614 - bash_add_history: if we're parsing a here-document (PST_HEREDOC), only
2615 suppress adding the newline between lines if we're not at the first
2616 line of the here-document (here_doc_first_line != 0). From a report
2617 by S0AndS0 <strangerthanbland@gmail.com>
2618
2619 12/8
2620 ----
2621 lib/readline/colors.c
2622 - _rl_custom_readline_prefix: use STREQN to check for the extension
2623 string in $LS_COLORS, since it's not necessarily null-terminated.
2624 From https://savannah.gnu.org/patch/?10158
2625
2626 12/10
2627 -----
2628 variables.c
2629 - set_int_value,set_string_value: broke common code for setting int
2630 and string dynamic variable values out into separate functions;
2631 changed all callers to use them where appropriate. set_int_value
2632 takes a flags argument saying whether or not to force the integer
2633 attribute on
2634 - assign_random: store the value assigned as the variable value so
2635 things like RANDOM=42; RANDOM+=7 generate consistent sequences
2636 like in ksh93
2637 - assign_seconds: store the value assigned as the variable value so
2638 things like SECONDS=42 ; SECONDS+=7 generate what's expected
2639
2640 doc/Makefile.in
2641 - changes to allow man pages that include others (.so FN) to be built
2642 outside the source tree
2643
2644 12/13
2645 -----
2646 arrayfunc.c
2647 - assign_array_element_internal: take an additional argument: char **NVALP.
2648 If non-null, it gets the value eventually assigned to the array
2649 element
2650 - assign_array_element: take an additional NVALP argument; pass it to
2651 assign_array_element_internal
2652
2653 arrayfunc.h
2654 - assign_array_element: new extern function declaration
2655
2656 {subst,variables}.c,builtins/{common.c,declare.def}
2657 - assign_array_element: change callers
2658
2659 subst.c
2660 - parameter_brace_expand_rhs: for the ${param:=value}, use the value
2661 returned by assign_array_element in NVALP as the return value, since
2662 it's the value ultimately assigned to the variable after possible
2663 modification (e.g., arithmetic evaluation). Reported by
2664 oguzismailuysal@gmail.com after flawed fix applied 11/16
2665
2666 12/14
2667 -----
2668 arrayfunc.h
2669 - array_eltstate_t: an object that encapsulates an array element's
2670 state (type, index, key, value) whether it's an indexed or
2671 associative array
2672
2673 arrayfunc.c
2674 - {init,flush}_eltstate: new functions to initialize and flush any
2675 allocated memory from array_eltstate_t objects. No allocation/
2676 deallocation functions yet; the only use is with a static instance
2677 - assign_array_element_internal: take an array_eltstate_t * instead of
2678 a char ** as the final argument, so we can return keys/indices and
2679 values depending on the type of array; populates it with the
2680 appropriate values
2681 - assign_array_element: take array_eltstate_t * as final argument
2682 instead of a char **; pass it to assign_array_element_internal
2683
2684 {subst,variables}.c,builtins/{common.c,declare.def}
2685 - assign_array_element: change callers to modify final argument
2686
2687 12/15
2688 -----
2689 arrayfunc.c
2690 - array_value_internal: now takes an array_eltstate_t * as the final
2691 argument; there is no more `rtype' argument in favor of the
2692 `subtype' member; returns the appropriate values in its members
2693 - array_value: changed to pass array_eltstate_t to array_value_internal,
2694 saves and fetches its `ind' member into *indp; saves `subtype'
2695 member into *rtype
2696 - get_arrary_value: changed to take array_eltstate_t as third argument,
2697 passes it to array_value_internal
2698
2699 {redir,expr}.c
2700 - get_array_value: changed callers; initializing the array_eltstate_t
2701 argument as necessary
2702
2703 test.c
2704 - test_builtin: changed to use get_array_value, adding AV_ALLOWALL to
2705 the flags, since it didn't use any QUOTED argument. Pass
2706 array_eltstate_t * as final argument and get subtype from it (the
2707 only thing we're interested in, to deallocate memory)
2708
2709 12/16
2710 -----
2711 arrayfunc.c
2712 - array_value: now takes a final argument of array_eltstate_t *, which
2713 it passes to array_value_internal; no more rtype and indp args.
2714 Callers are responsible for marshalling values into estatep
2715
2716 arrayfunc.h
2717 - array_value: changed function signature
2718
2719 subst.c
2720 - get_var_and_type,parameter_brace_expand_word: changed calls to
2721 array_value to use array_eltstate_t argument and initialize it
2722 appropriately. Copy values back from it to the parameters we need
2723 to modify
2724
2725 variables.c
2726 - assign_lineno: call set_int_value to store the value, like with
2727 RANDOM and SECONDS (from 12/10)
2728
2729 12/17
2730 -----
2731 {eval,execute_cmd}.c
2732 - when bypassing a parsed command because read_but_dont_execute is
2733 set, don't modify last_command_exit_value. From a report by
2734 Robert Elz <kre@munnari.OZ.AU>
2735
2736 parse.y
2737 - parse_comsub: make sure the first call to shell_getc to check whether
2738 or not it's an arithmetic expansion skips a quoted newline. From a
2739 report by Robert Elz <kre@munnari.OZ.AU>
2740
2741 12/21
2742 -----
2743 subst.c
2744 - parameter_brace_remove_pattern,parameter_brace_patsub,parameter_brace_casemod,
2745 parameter_brace_transform,parameter_brace_substring: now take an
2746 array_eltstate_t * argument in place of the arrayind_t argument, pass
2747 it to get_var_and_type; this generalizes the indexed array behavior
2748 of expanding array subscripts once to associative arrays via an
2749 eventual call to array_value_internal with a non-null KEY member
2750 - get_var_and_type: now takes an array_eltstate_t * argument in place
2751 of the arrayind_t argument; use it in calls to array_value so we
2752 can only expand array subscripts once whether they are indexed or
2753 associative arrays
2754 - parameter_brace_expand_word: take an array_eltstate_t * argument in
2755 place of the arrayind_t * argument; pass it to array_value; use a
2756 static version (which we init and flush) if the argument passed is
2757 NULL so we can get the right state passed back and forth
2758 - parameter_brace_expand: pass a pointer to a static array_eltstate_t
2759 to parameter_brace_expand_word, and use that in the various calls to
2760 parameter_brace_XXX functions that perform specific expansions in
2761 place of the old arrayind_t argument; make sure to flush it before
2762 returning, even on errors
2763
2764 12/22
2765 -----
2766 {trap,variables}.c
2767 - internal_warning: calls changed to use translatable strings
2768 consistently
2769
2770 error.[ch]
2771 - internal_debug: new function, prints a message like internal_warning,
2772 no-op if DEBUG is not defined
2773 - INTERNAL_DEBUG: macro that expands to internal_debug when DEBUG is
2774 defined, and nothing otherwise
2775
2776 {jobs,trap}.c
2777 - changed some internal_warning and internal_inform calls to use
2778 internal_debug, since they were active only when DEBUG is defined
2779
2780 parse.y
2781 - parse_comsub: add internal_debug call when a command substitution
2782 ends with unterminated here-documents
2783
2784 builtins/common.c
2785 - number_of_args: unconditionally return posparam_count
2786
2787 {jobs,execute_cmd,subst}.c,parse.y,builtins/{command.def,evalstring.c}
2788 - INTERNAL_DEBUG: use instead of calls to itrace protected by #ifdef
2789 DEBUG
2790
2791 12/26
2792 -----
2793 lib/glob/glob.c
2794 - glob_always_skip_dot_and_dotdot: initialize to 1 (enabled)
2795
2796 builtins/shopt.def
2797 - globskipdots: new shell option, exposes glob_always_skip_dot_and_dotdot
2798
2799 doc/{bash.1,bashref.texi}
2800 - globskipdots: document new shell option
2801
2802 execute_cmd.c
2803 - fix_arrayref_words: call valid_array_reference with 0 for third arg
2804 because the words have not undergone any word expansions yet and
2805 the quotes are still present. This makes things like
2806 A=[\[]=set
2807 unset A[\[]
2808 work
2809
2810 subst.c
2811 - word_list_split: if a word undergoes word splitting but is not
2812 changed, preserve any W_ARRAYREF flag into the new word. This makes
2813 things like
2814 rkey=']'
2815 unset A[$rkey]
2816 work because the unset builtin sees the W_ARRAYREF flag on its
2817 argument
2818
2819 12/29
2820 -----
2821 builtins/common.h
2822 - SET_VFLAGS: take a set of word flags, and set flags for use with
2823 valid_array_reference (vflags) and assign_array_element/bind_int_variable
2824 (bindflags) based on those flags and the setting of assoc_expand_once
2825 (moved from read.def and generalized)
2826
2827 arrayfunc.c
2828 - array_variable_name: now exclusively takes AV_xxx flags; understands
2829 how to translate AV_NOEXPAND to the right flag for skipsubscript;
2830 understands AV_ONEWORD and AV_NOEXPAND
2831 - array_variable_part: just passes the FLAGS arg to array_variable_name
2832 - assign_array_element: translates ASS_ flags to AV_ flags for
2833 array_variable_name
2834 - array_value_internal: now just passes flags straight through to
2835 array_variable_part (which sends them to array_variable_name)
2836
2837 builtins/common.[ch]
2838 - builtin_bind_var_to_int: now takes a new FLAGS third argument; passes
2839 it to bind_var_to_int
2840
2841 builtins/printf.def
2842 - printf_builtin: use SET_VFLAGS to set flags for builtin_bind_variable
2843 (bindflags); makes things like
2844 declare -A A; key=']' ; printf -v A[$key] "foo"
2845 work without a subscript error as long as assoc_expand_once is defined
2846
2847 builtins/read.def
2848 - read_builtin: use new common version of SET_VFLAGS instead of
2849 private version; changed to use new calling sequence; makes things like
2850 declare -A A; key=']' ; read A[$key] <<<"foo"
2851 work without a subscript error as long as assoc_expand_once is defined
2852
2853 builtins/wait.def
2854 - wait_builtin: use SET_VFLAGS for variable name with -p option
2855 - wait_builtin: call builtin_bind_var_to_int with new bindflags third
2856 argument
2857
2858 expr.c
2859 - expr_streval: just pass TFLAG (AV_xxx flags) straight through to
2860 array_variable_part
2861
2862 variables.c
2863 - bind_int_variable: translate the assignment flags (ASS_xxx) to
2864 VA_xxx flags for valid_array_reference calls (ASS_ONEWORD); translate
2865 assignment flags to AV_xxx flags for array_variable_part
2866
2867 12/30
2868 -----
2869 subst.c
2870 - parameter_brace_expand: when expanding an indirect variable, extend
2871 the special case for array[@] and array[*] (set -u/no positional
2872 parameters, obeying the baroque quoting rules) to the value of the
2873 indirection. Report and fix from konsolebox <konsolebox@gmail.com>
2874
2875 12/31
2876 -----
2877 parse.y
2878 - compound_list: when parsing a compound_list production, collect any
2879 pending here-documents after reading a newline, not after reading
2880 any command terminator. Fixes interactive-only prompting bug
2881 reported back in 8/2021 by Hyunho Cho <mug896@gmail.com>
2882
2883 1/1/2022
2884 --------
2885 bashline.c
2886 - set_filename_quote_chars: break code that modifies
2887 rl_filename_quote_characters based on whether DIRNAME needs to be
2888 expanded from bash_directory_completion_hook into its own function
2889 - bash_check_expchar: break code that checks whether DIRNAME will be
2890 word expanded from bash_directory_completion_hook into its own
2891 function
2892 - bashline_reset,attempt_shell_completion: make sure complete_fullquote
2893 is set to 1 (as it is by default) in case a completion modifies it
2894 - bash_quote_filename: if we are completing (but not expanding --
2895 direxpand is unset) and backslash-quoting a filename with expansion
2896 characters as determined by bash_check_expchar, make sure
2897 filename_bstab is set not to include the expansion char (and any
2898 following char and closer) and set complete_fullquote to 0 so
2899 sh_backslash_quote uses filename_bstab. Fixes the longstanding issue
2900 of quoting a `$', for instance, if the rest of the filename contains
2901 any characters that need quoting in filenames. This assumes that the
2902 filename is unquoted (*QCP == 0) so the word will be expanded and is
2903 not part of the filename (if needed, we can use file_exists to check
2904 whether the expansion characters are actually part of the filename)
2905
2906 1/7
2907 ---
2908 examples/loadables/accept.c
2909 - new -b bindaddr option to bind to a specific IP address
2910 - move setsockopt calls before bind() to avoid TIME_WAIT issues. Fixes
2911 from Dzogovic Vehbo <dzove855@gmail.com>
2912
2913 1/10
2914 ----
2915 configure.ac
2916 - bumped version to 5.2-alpha.
2917
2918 1/16
2919 ----
2920
2921 tests/{unicode1,glob2,intl2}.sub, tests/run-intl
2922 - minor changes to add warnings for missing locales that cause test
2923 failures
2924
2925 1/17
2926 ----
2927 parse.y
2928 - history_delimiting_chars: if we have a blank line by the time we
2929 hit the end of the tests, return a semicolon for the first blank
2930 line to avoid running lines of a multi-line command together.
2931 Fixes bug reported by Joakim Lindblad <joakim@cb.uu.se>
2932
2933 subst.c
2934 - expand_string_for_patsub: expand the replacement string for pattern
2935 substitution assuming that it will eventually be passed to
2936 strcreplace to replace `&' with the matched portion of the string.
2937 This calls expand_string_for_pat(), which leaves the string quoted
2938 and does not perform word splitting, then calls
2939 quote_string_for_repl to post-process the expanded string.
2940 - quote_string_for_repl: perform quote removal on passed string while
2941 replacing CTLESC escaping a `&' or a backslash with a backslash. The
2942 result must be passed to strcreplace
2943 - parameter_brace_patsub: call expand_string_for_patsub if
2944 patsub_replacement is set to quote
2945
2946 1/18
2947 ----
2948 subst.c
2949 - read_comsub: make istring_index a size_t to avoid overflow with very
2950 large values of istring_size.
2951 From https://savannah.gnu.org/support/index.php?110596
2952 - expand_word_internal: make istring_index a size_t
2953
2954 1/20
2955 ----
2956 buitins/cd.def
2957 - add a description of `cd -' to the help text. Suggested by
2958 Rob Landley <rob@landley.net>
2959
2960 1/21
2961 ----
2962 lib/glob/glob.c
2963 - glob_vector: if we allocate NEXTLINK using malloc, and free it due to
2964 some allocation failure, reset FIRSTMALLOC to avoid duplicate frees
2965 later on
2966
2967 subst.[ch]
2968 - sub_append_string: the INDX parameter is now a size_t to avoid
2969 overflow
2970
2971 parse.y
2972 - decode_prompt_string: RESULT_INDEX is now a size_t to pass to
2973 sub_append_string
2974
2975 jobs.[ch],nojobs.c
2976 - wait_for_background_pids: now returns the number of jobs/processes
2977 reaped
2978
2979 builtins/wait.def
2980 - wait_builtin: if -p pid supplied without -n, make sure we do something
2981 useful if no job/pid arguments are supplied and there are no jobs.
2982 Reported by Oguz <oguzismailuysal@gmail.com>
2983
2984 builtins/read.def
2985 - read_builtin: if we have a timeout, use SIGALRM instead of select
2986 when in posix mode, since we use read instead of zread. Fixes bug
2987 reported by Andreas Schwab <schwab@linux-m68k.org>
2988
2989 subst.c
2990 - expand_string_dollar_quote: handle single-quoted and double-quoted
2991 strings that might include $' and $" without attempting translation;
2992 do more error checking for unterminated $' and $" that leaves those
2993 characters unmodified. This is for use by readline's various line
2994 expansion functions (shell_expand_line)
2995
2996 1/23
2997 ----
2998 parse.y,make_cmd.c
2999 - revert change that unconditionally processes $'...' and $"..." in
3000 here-document bodies; there are only a couple of cases where they
3001 should be processed in a double-quote environment
3002
3003 1/24
3004 ----
3005
3006 subst.c
3007 - extract_dollar_brace_string: if we see another `${' on the rhs of
3008 the operator, reset the dolbrace_state to DOLBRACE_PARAM while we
3009 read this new ${...} string
3010 - extract_heredoc_dolbrace_string: new function, variant of
3011 extract_dollar_brace_string, to process the WORD in ${PARAM OP WORD}
3012 while expanding lines of here-document data. It's complicated by the
3013 requirement to add to the result string as we go along, since we
3014 need to change the contents of the input string with ansi expansion
3015 or locale translation.
3016 - string_extract_single_quoted: take a new third argument: ALLOWESC.
3017 This allows backslash to escape an embedded single quote, needed by
3018 extract_heredoc_dolbrace_string to process $'...'; changed callers
3019
3020 1/25
3021 ----
3022 parse.y
3023 - parse_matched_pair: ansi-expand $'...' in WORD for ${PARAM OP WORD}
3024 and single-quote the result if dolbrace_state == DOLBRACE_QUOTE
3025 (posix pattern removal operators) even if extended_quote == 0
3026
3027 subst.c
3028 - extract_heredoc_dolbrace_string: add logic to align with parse.y:
3029 parse_matched_pair and its $'...' expansion, including handling
3030 extended_quote
3031
3032 1/27
3033 ----
3034 builtins/evalstring.c
3035 - should_optimize_fork: broke conditions for optimizing away the fork
3036 for a simple command out of optimize_fork into new function, call
3037 from should_suppress_fork and optimize_subshell_command. Call from
3038 optimize_fork if (subshell_environment & SUBSHELL_PAREN), relying
3039 on fact that CMD_TRY_OPTIMIZING is only set in a couple of specific
3040 conditions
3041 - optimize_fork: call should_suppress_fork only if startup_state == 2;
3042 it does the extra checks for that specific case
3043 - optimize_fork: call should_optimize_fork if we're in a (list)
3044 subshell (subshell_environment & SUBSHELL_PAREN)
3045 - optimize_subshell_command: set CMD_TRY_OPTIMIZING on the right side
3046 of a `&&', `||', or `;' list as long as it's a simple command so
3047 we can check with optimize_fork() when it's time to execute it
3048
3049 execute_cmd.c
3050 - execute_in_subshell: call optimize_subshell_command for (list)
3051 subshells to either set CMD_NO_FORK for simple commands or set
3052 CMD_TRY_OPTIMIZING for likely candidates for later optimization
3053
3054 builtins/common.h,builtins/evalstring.c
3055 - optimize_fork: renamed to optimize_connection_fork; changed callers
3056
3057 1/31
3058 ----
3059 include/shmbutil.h
3060 - COPY_CHAR_I,SCOPY_CHAR_I: add check for locale_utf8locale and
3061 (c & 0x80) as in other macros
3062
3063 lib/sh/shquote.c
3064 - sh_backslash_quote_for_double_quotes: rewrote to use array indexing
3065 and COPY_CHAR_I to make it easier to drop in future calls to
3066 charvis() to make `unsafe' characters visible if FLAGS == 1
3067
3068 2/1
3069 ---
3070 parse.y
3071 - parse_comsub: if we are currently expanding aliases, temporarily
3072 turn off alias expansion if we are not in posix mode so we defer
3073 alias expansion until command_substitute(). Fixes double-expansion
3074 bug reported by Martijn Dekker <martijn@inlv.org> and aligns with
3075 https://www.austingroupbugs.net/view.php?id=1342
3076 - xparse_dolparen: turn off alias expansion entirely while running the
3077 parser: either we do it in parse_comsub (posix mode) or in
3078 command_substitute (default mode)
3079 - parse_string_to_command: ditto
3080
3081 subst.c
3082 - command_substitute: if we are expanding aliases, temporarily turn
3083 off alias expansion if we are in posix mode, since we already
3084 performed it in parse_comsub() and are using the command string
3085 reconstituted from the parse result
3086
3087 doc/bashref.texi
3088 - bash posix mode: add description of alias expansion and command
3089 substitution parsing and execution
3090
3091 2/4
3092 ---
3093 lib/readline/rltty.c
3094 - rl_deprep_terminal: set _rl_last_c_pos to 0 after outputting
3095 BRACK_PASTE_FINI, since the last character in that is \r. Partially
3096 address issue raised by Markus Schwarzenberg <markus.schwarzenberg@freenet.de>
3097 in https://lists.gnu.org/archive/html/bug-bash/2022-02/msg00056.html
3098
3099 2/5
3100 ---
3101 doc/{bash.1,bashref.texi}
3102 - minor typo fixes from Helge Kreutzmann <debian@helgefjell.de>
3103
3104 2/7
3105 ---
3106 {arrayfunc,variables}.c
3107 - ARRAY_EXPORT: changes to encode array and assoc variables using a
3108 scheme similar to shell functions so we can export arrays and
3109 differentiate them from scalar variables and differentiate array
3110 and assoc variables. Still not enabled by default.
3111
3112 variables.c
3113 - mk_env_string: third argument is now the variable's attributes or 0,
3114 with all the attributes we can export arrays
3115
3116 lib/readline/bind.c
3117 - active-region-start-color,active-region-end-color: new bindable
3118 string variables, one to set the active region color (instead of
3119 standout mode) and one to turn it off (instead of the "se" terminal
3120 capability). They set _rl_active_region_start_color and
3121 _rl_active_region_end_color variables via functions
3122
3123 lib/readline/display.c
3124 - putc_face: if setting standout mode, check for both the start color
3125 and end color variables and output the start color string. If turning
3126 off standout mode (normal face), output the end color string. Both
3127 variables must be set
3128
3129 lib/readline/{readline.c,rlprivate.h}
3130 - declarations for _rl_active_region_start_color and
3131 _rl_active_region_end_color
3132
3133 2/8
3134 ---
3135 bashline.c
3136 - initialize_readline: add bindable name `vi-edit-and-execute-command'
3137
3138 shell.c
3139 - subshell_exit: make sure to set last_command_exit_value before
3140 calling the exit trap. Fixes bug reported by Greg Edwards
3141 <gedwards@ddn.com>
3142
3143 2/9
3144 ---
3145 lib/readline/{terminal.c,rlprivate.h}
3146 - _rl_region_color_on,_rl_region_color_off: functions to output the
3147 _rl_active_region_start_color and _rl_active_region_end_color
3148 - _rl_reset_region_color: function to encapsulate setting the region
3149 color to an arbitrary string, including doing memory management
3150
3151 lib/readline/display.c
3152 - putc_face: call _rl_region_color_on and _rl_region_color_off instead
3153 of _rl_standout_on and _rl_standout_off
3154
3155 lib/readline/terminal.c
3156 - _rl_init_terminal_io: initialize _rl_active_region_start_color and
3157 _rl_active_region_end_color from _rl_term_so and _rl_term_se,
3158 respectively; reset every time the terminal is changed
3159 - _rl_init_terminal_io: turn off the active region for a dumb terminal
3160
3161 lib/readline/bind.c
3162 - sv_region_{start,end}_color: call _rl_reset_region_color with the
3163 appropriate value for WHICH
3164
3165 2/10
3166 ----
3167 lib/readline/doc/{rluser.texi,readline.3},doc/bash.1
3168 - active-region-start-color,active-region-end-color: documented new
3169 bindable readline variables
3170 - enable-active-region: document using active-region-start-color to
3171 highlight the text in the region
3172
3173 2/11
3174 ----
3175 parse.y
3176 - read_token,read_token_word: make sure characters read by shell_getc
3177 are protected by appropriate calls to MBTEST when testing for shell
3178 metacharacters and operators
3179
3180 2/14
3181 ----
3182 builtins/shopt.def
3183 - set_compatibility_level: if the current compatibility level is outside
3184 the range of the compatNN options, just leave it alone when
3185 unsetting one of the options (which by definition was already
3186 unset). Fixes issue reported by Mihai Moldovan <ionic@ionic.de>
3187
3188 2/16
3189 ----
3190 lib/readline/search.c
3191 - rl_history_search_{pos,len,flags}: rename to have a leading `_'
3192 - _rl_history_search_pos: no longer static so other parts of readline
3193 can see it
3194
3195 lib/readline/rlprivate.h
3196 - _rl_history_search_pos: extern declaration
3197
3198 lib/readline/readline.c
3199 - readline_internal_teardown: don't run the undo list against the
3200 current history entry if the non-incremental search functions have
3201 set _rl_history_search_pos to it, since it doesn't reflect the
3202 current contents of the line buffer. Fixes issue reported by
3203 Andreas Schwab <schwab@linux-m68k.org>
3204
3205 lib/readline/misc.c
3206 - _rl_start_using_history: initialize _rl_history_search_pos to
3207 something invalid so it doesn't match where_history()
3208
3209 2/17
3210 ----
3211 lib/readline/callback.c
3212 - rl_callback_read_char: make sure _rl_eof_found is set to the value
3213 of eof before calling the deprep terminal function, so it can do
3214 different things based on whether the input code read EOF (or the
3215 user entered the EOF character). From a gdb discussion started by
3216 Andrew Burgess <aburgess@redhat.com> (still more to do, since this
3217 is not part of the public API)
3218
3219 2/18
3220 ----
3221 lib/readline/readline.h
3222 - RL_STATE_EOF: new readline state value; set when readline reads an
3223 EOF character on an empty line or a read returns an error
3224 - rl_eof_found: new public variable
3225
3226 lib/readline/rprivate.h
3227 - _rl_eof_found: renamed to rl_eof_found, so not declared here
3228
3229 lib/readline/{callback,readline}.c
3230 - RL_STATE_EOF: set appropriately when readline gets an EOF. Suggested
3231 by Andrew Burgess <aburgess@redhat.com>
3232 - RL_STATE_EOF: make sure it's not set when readline starts
3233 - rl_eof_found: set appropriately when readline gets an EOF
3234
3235 lib/readline/{callback,readline,rltty}.c
3236 - rl_eof_found: new name for _rl_eof_found
3237
3238 lib/readline/doc/rltech.texi
3239 - RL_STATE_EOF: document
3240
3241 2/19
3242 ----
3243 parse.y
3244 - parse_comsub: turn off parser state flags we don't want to inherit
3245 into this call to the parser (PST_REGEXP, PST_EXTPAT, PST_CONDCMD,
3246 PST_CONDEXPR for now). Fixes bug reported by konsolebox
3247 <konsolebox@gmail.com>
3248
3249 2/23
3250 ----
3251 findcmd.c,builtins/hash.def
3252 - replace calls to is_directory with file_isdir, which only performs a
3253 stat and doesn't do the eaccess call to check for an executable file
3254
3255 findcmd.c
3256 - find_in_path_element: takes a new RFLAGSP argument, an int * where
3257 the status flags for the returned pathname are returned; saves
3258 additional calls to stat/eaccess
3259 - search_for_command: get the returned flags from
3260 find_user_command_in_path so we don't need any additional calls to
3261 file_status after we find the command in $PATH
3262
3263 2/24
3264 ----
3265 doc/{bash.1,bashref.texi}
3266 - FUNCTIONS: some small changes to the description of local variables
3267 and dynamic scoping, with emphasis on how that affects `unset'
3268 behavior. Inspired by a discussion with
3269 Christoph Anton Mitterer <calestyo@scientia.net>
3270
3271 2/25
3272 ----
3273 examples/loadables/realpath.c
3274 - renamed -s option to -q to align with other versions
3275 - perform array assignment for `-a varname' even if -q option supplied
3276 - renamed -S option to -s for Linux compatibility
3277
3278 2/28
3279 ----
3280 lib/readline/misc.c
3281 - _rl_free_saved_history_line: call rl_free_undo_list, saving and
3282 setting rl_undo_list to the saved history line's data, so the right
3283 call to _hs_replace_history_data happens and we don't end up with
3284 a pointer aliasing problem. Fixes core dump reported by
3285 Andreas Schwab <schwab@linux-m68k.org>, but does not make his
3286 scenario equivalent to incremental search
3287
3288 3/1
3289 ---
3290 lib/readline/search.c
3291 - make_history_line_current: save the current line before replacing it
3292 with the found history entry using rl_maybe_save_line
3293 - noninc_dosearch: we don't want the saved history line, so free it
3294 after calling make_history_line_current
3295 - _rl_history_search_internal: call rl_maybe_replace_line after making
3296 changes to the line buffer with make_history_line_current so we can
3297 save the undo list we constructed before we set the history position
3298
3299 3/2
3300 ---
3301 lib/readline/display.c
3302 - expand_prompt: add missing piece to patch from 10/26/2021: if we are
3303 recalculating the number of invisible characters on the first line
3304 of the prompt, we need to update INVFL, even if we already set it
3305 when we hit the number of physical characters. This ends up being
3306 assigned to prompt_invis_chars_first_line, and is used in several
3307 subsequent calculations. Reported by
3308 Andreas Schwab <schwab@linux-m68k.org>
3309
3310 lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
3311 - enable-bracketed-paste: add some language making it clearer that
3312 bracketed paste prevents the pasted text from being interpreted as
3313 editing commands. Suggested by Karl O. Pinc <kop@karlpinc.com>
3314
3315 3/4
3316 ---
3317 make_cmd.c
3318 - make_here_document: perform quote removal on the here-doc delimiter
3319 only if it's marked as quoted, which prevents quotes from inside a
3320 command substitution from being removed (they're supposed to begin a
3321 new quoting context) when the word itself isn't flagged as quoted
3322 (which means the body of the here-document gets expanded). You can't
3323 perform quote removal *and* expand the here-document lines. From an
3324 austin-group discussion back in early February
3325
3326 lib/sh/strvis.c
3327 - charvis -> sh_charvis; change caller
3328 - sh_charvis: now take an additional SLEN argument to avoid having to
3329 compute the string length every time; change callers
3330 - sh_charvis: add a utf-8 locale-specific check before calling
3331 COPY_CHAR_I (in practice, doesn't make any real difference)
3332
3333 3/10
3334 ----
3335 arrayfunc.c
3336 - convert_var_to_array: if we're being asked to create an associative
3337 array (flags & 2), and we have an existing variable that is not an
3338 assoc array (and not an existing indexed array), call
3339 convert_var_to_assoc to make it one
3340
3341 3/11
3342 ----
3343 jobs.c
3344 - wait_for: don't call get_tty_state() if readline is dispatching
3345 (RL_STATE_DISPATCHING) with the terminal settings changed
3346 (RL_STATE_TERMPREPPED), the same way we don't if we are running a
3347 command for programmable completion. Fixes bug with SIGINT reverting
3348 to the saved readline terminal settings reported by
3349 Markus Napierkowski <markus.napierkowski@cyberus-technology.de>
3350
3351 parse.y
3352 - decode_prompt_string: make sure the expansion of \w, \W, and \s
3353 are all run through sh_strvis before calling
3354 sh_backslash_quote_for_double_quotes or just through sh_strvis if
3355 we're not running the prompt string through word expansions.
3356 Fixes issue reported by Josh Harcome <joshharc@gmail.com> back
3357 in mid-January
3358
3359 3/16
3360 ----
3361 bashline.c
3362 - bash_quote_filename: if we have a word to complete that contains
3363 characters that introduce a word expansion, make sure the passed
3364 string does *not* exist as a filename before removing those
3365 characters from the set that must be backslash-quoted. See change
3366 from 1/1/2022
3367
3368 3/18
3369 ----
3370 lib/readline/search.c
3371 - make_history_line_current: don't free rl_undo_list or
3372 _rl_saved_line_for_history; don't unconditionally save the history
3373 line. This reverts some of the changes to support setting the
3374 history position in history-search-backward
3375 - rl_history_search_internal: only free the saved history line if we
3376 were the ones who created it
3377
3378 3/21
3379 ----
3380 lib/readline/nls.c
3381 - xmalloc.h: include for systems without setlocale(), so xfree has a
3382 prototype. Report and fix from András Kucsma <r0maikx02b@gmail.com>
3383
3384 lib/readline/search.c
3385 - _rl_history_search_internal: use previous-history/next-history to
3386 move to the found history line instead of directly calling
3387 history_set_pos. This makes the behavior more similar to incremental
3388 search
3389 - rl_history_search_internal: make sure to set rl_undo_list to the
3390 current history undo list around the calls to rl_get_previous_history
3391 or rl_get_next_history, in order to fool the call to
3392 maybe_replace_line they make
3393
3394 lib/readline/readline.c
3395 - _rl_executing_func: the currently-executing readline command function
3396
3397 lib/readline/rlprivate.h
3398 - _rl_executing_func: extern declaration
3399
3400 lib/readline/search.c
3401 - _rl_history_search_internal: removed (commented out) code that sets
3402 the current history entry to the found history entry, too much
3403 assumes that the current undo list should be applied to the current
3404 history entry (where_history())
3405
3406 3/23
3407 ----
3408 subst.c
3409 - parameter_brace_expand_word: if we have double-quoted ${*} or ${@},
3410 make sure we are setting W_HASQUOTEDNULL in the flags we return to
3411 the caller if we are returning QUOTED_NULL(word)
3412 - parameter_brace_expand_word: if we have a double-quoted associative
3413 array reference using `*' or `@', make sure we are setting
3414 W_HASQUOTEDNULL in the flags we return to the caller if we are
3415 returning QUOTED_NULL(word)
3416 - parameter_brace_expand: if we're using the `[:]+' word expansion
3417 operator, we need to note a quoted null string and pass the
3418 W_QUOTEDNULL flag back to the caller
3419 - expand_word_internal: make sure to return a QUOTED_NULL
3420 (word[0] == CTLNUL) back to the caller if HAD_QUOTED_NULL is set,
3421 regardless of whether or not we see a quoted dollar at. Fix for bug
3422 reported by Andreas Luik <andreas.luik@innovative-navigation.de>
3423
3424 arrayfunc.c
3425 - array_value_internal: fix typo and set estatep->type to ARRAY_INDEXED
3426 for indexed arrays
3427
3428 3/31
3429 ----
3430 lib/readline/{history.c,histlib.h}
3431 - _hs_at_end_of_history: convenience function to tell whether or not
3432 the current history position is at the end of the history list
3433
3434 4/1
3435 ---
3436 lib/readline/search.c
3437 - make_history_line_current: don't free rl_undo_list if it is equal to
3438 _rl_saved_line_for_history->data, since we will need to restore it
3439 later if we got it from a history entry. Fixes issue dating back to
3440 7/2021 and changes to _rl_free_saved_line_for_history, current issue
3441 reported by Andreas Schwab <schwab@linux-m68k.org>
3442
3443 4/5
3444 ---
3445 lib/readline/{complete,histfile,histsearch,isearch,terminal}.c
3446 - xfree: use instead of free
3447
3448 4/7
3449 ---
3450 configure.ac
3451 - bumped version to bash-5.2-beta
3452
3453 [bash-5.2-beta frozen]
3454
3455 4/8
3456 ---
3457 lib/readline/input.c
3458 - _rl_orig_sigset: need extern declaration if HAVE_SELECT is defined.
3459 From https://savannah.gnu.org/support/?110634
3460
3461 examples/loadables/seq.c
3462 - PRIdMAX: redefine if PRI_MACROS_BROKEN is defined.
3463 From https://savannah.gnu.org/support/index.php?110635
3464
3465 4/11
3466 ----
3467 configure.ac
3468 - BASH_FUNC_STRTOIMAX: replace strtoimax if the system doesn't provide
3469 a declaration in a standard header file. Uses new m4/strtoimax.m4.
3470 From https://savannah.gnu.org/support/index.php?110633
3471
3472 builtins/printf.def
3473 - getdouble: new function, parses string into `double' using strtod
3474 - printf_builtin: check for the `L' length modifier and use long
3475 doubles for the floating point conversion specifiers. If it's not
3476 supplied, use `double' when in posix mode (as posix specifies) and
3477 long double (if it's available, double if not) in default mode.
3478 From a report from Paul Eggert <eggert@cs.ucla.edu>
3479
3480 4/12
3481 ----
3482 lib/sh/oslib.c
3483 - bzero: update function signature to modern BSD version
3484
3485 4/14
3486 ----
3487 lib/sh/oslib.c
3488 - bcopy, gethostname, mkfifo: update function signatures to modern
3489 versions
3490
3491 4/15
3492 ----
3493 jobs.c,nojobs.c
3494 - wait_for_single_pid: if the pid or job argument is invalid -- isn't
3495 a child of this shell -- return 257, which is out of the range of
3496 valid 8-bit status values
3497
3498 execute_cmd.c
3499 - execute_pipeline: if wait_for_single_pid returns > 256, set it to
3500 127 (invalid process)
3501
3502 jobs.c
3503 - wait_for_background_pids: if wait_for_single_pid returns > 256, set
3504 the status we return in PS to 127 (what it was before)
3505
3506 builtins/wait.def
3507 - wait_builtin: if wait_for_single_pid returns > 256, treat it as an
3508 error and set pstat.pid to NO_PID
3509 - wait_builtin: if -p supplied, and we get to the end of the argument
3510 list with PSTAT.PID != NO_PID (which we assume means that the return
3511 value is set from PSTAT.STATUS), set the variable name to PSTAT.PID.
3512 From a report by Robert Elz <kre@munnari.OZ.AU>
3513 - wait_builtin: for compatibility with the netbsd sh, leave the variable
3514 name specified with `-p' unset if there are no PID arguments.
3515 From a report by Robert Elz <kre@munnari.OZ.AU>
3516
3517 4/17
3518 ----
3519 parse.y
3520 - xparse_dolparen: if (flags & SX_NOLONGJMP), don't call
3521 jump_to_top_level() on errors
3522
3523 bashline.c
3524 - bash_quote_filename: don't call quote_word_break_chars() unless we
3525 have word break chars initialized. Fixes bug reported by
3526 Sam James <sam@gentoo.org>
3527
3528 4/18
3529 ----
3530 pcomplete.c
3531 - gen_globpat_matches: call glob_filename with the GX_GLOBSTAR flag if
3532 the `globstar' shell option is enabled. From a report by
3533 Steve <bash@lonetwin.net>
3534
3535 lib/malloc/malloc.c
3536 - internal_free: remove the GLIBC21 code (!)
3537 - internal_free: make the code that tests against memtop and calls
3538 lesscore depend on USE_LESSCORE being defined, which it is by
3539 default
3540
3541 lib/malloc/imalloc.h
3542 - USE_LESSCORE: define
3543
3544 parse.y,shell.h
3545 - token_buffer_size and its corresponding saved value in the shell's
3546 parser state are now size_t instead of int
3547
3548 stringlib.c
3549 - strsub,strcreplace: use size_t instead of int for local length and
3550 indexing variables
3551
3552 lib/sh/zmapfd.c
3553 - zmapfd: use size_t instead of int for local length and indexing
3554 variables
3555
3556 lib/sh/zgetline.c
3557 - zgetline: use size_t instead of int for local length and indexing
3558 variables
3559
3560 4/20
3561 ----
3562 pcomplete.c
3563 - init_itemlist_from_varlist: free VLIST after assigning it from
3564 *SVFUNC and after we get the variable names and values out of it.
3565 Report from Robert E. Griffith <bobg@junga.com>
3566
3567 4/25
3568 ----
3569 redir.c
3570 - here_document_to_fd: if the shell compatibility level is bash-5.0 or
3571 earlier, use tempfiles for all here-documents and here-strings. From
3572 a bug-bash discussion started by Sam Liddicott <sam@liddicott.com>
3573
3574 4/26
3575 ----
3576 parse.y
3577 - parse_comsub: non-interactive shells exit on a syntax error while
3578 parsing the command substitution
3579 - parse_comsub: unset additional PARSER_STATE flags before calling
3580 yyparse(). Inspired by https://bugs.gentoo.org/837203; unsetting
3581 PST_COMPASSIGN is the fix for that bug
3582 - parse_string_to_word_list: use save_parser_state/restore_parser_state
3583 instead of saving pieces of the shell state in individual variables
3584 - parse_compound_assignment: use save_parser_state/restore_parser_state
3585 instead of saving pieces of the shell state in individual variables
3586 - parse_compound_assignment: unset additional PARSER_STATE flags before
3587 calling read_token(); set esacs_needed_count and expecting_in_token
3588 to 0 like in parse_comsub() since read_token can use them
3589
3590 4/27
3591 ----
3592 lib/sh/strvis.c
3593 - sh_charvis: changes to handle being compiled without multibyte support
3594
3595 4/29
3596 ----
3597 lib/readline/callback.c
3598 - rl_callback_read_char: don't set rl_eof_found unless eof is > 0,
3599 since it can be -3 if we need to read more input in a multi-key
3600 sequence. Report from Andrew Burgess <aburgess@redhat.com>
3601
3602 examples/loadables/Makefile.sample.in
3603 - new file, containing the rules to build the example shared object
3604 - includes Makefile.inc from wherever it's installed. Suggested by
3605 Robert E. Griffith <bobg@junga.com>
3606
3607 examples/loadables/Makefile.inc.in
3608 - remove rules that create the example shared object
3609
3610 4/30
3611 ----
3612 builtins/evalstring.c
3613 - parse_and_execute: check for terminating signals before returning,
3614 after any longjmp, to improve responsiveness and fix the -c code
3615 path before running any exit trap. Report from
3616 Emanuele Torre <torreemanuele6@gmail.com>
3617
3618 5/17
3619 ----
3620 builtins/suspend.def
3621 - suspend_builtin: the -f option now forces a suspend even if job
3622 control is not enabled. Inspired by a discussion with
3623 Robert Elz <kre@munnari.OZ.AU>
3624
3625 doc/{bash.1,bashref.texi}
3626 - suspend: updated description to include expanded -f behavior
3627
3628 5/25
3629 ----
3630 builtins/mkbuiltins.c
3631 - -includefile: new argument, specifies extern filename to insert
3632 into the #include statement in the structfile (builtins.c) and
3633 the filename in the comment in the extern file (builtext.h).
3634 From Alexander Kanavin <alex.kanavin@gmail.com> via
3635 https://savannah.gnu.org/patch/?10210
3636
3637 builtins/Makefile.in
3638 - builtins.c: change call to mkbuiltins to add -includefile option
3639 - builtins.c: change recipe to run all the commands in the same shell
3640 invocation
3641 - builtins.c: change recipe to specify new filenames in the call to
3642 mkbuiltins and move them onto builtins.c/builtext.h if the new ones
3643 are different; make the new filenames use the current make recipe
3644 shell pid in the filename ($$RECPID).
3645 Inspired by Alexander Kanavin <alex.kanavin@gmail.com> via
3646 https://savannah.gnu.org/patch/?10210
3647
3648 6/2
3649 ---
3650 builtins/common.c
3651 - builtin_find_indexed_array: new function, factored common code out
3652 of mapfile and read builtins to find an in-scope indexed array or
3653 create one
3654
3655 builtins/common.h
3656 - builtin_find_indexed_array: extern declaration
3657
3658 builtins/{mapfile,read}.def
3659 - change callers to use builtin_find_indexed_array
3660
3661 variables.c
3662 - unbind_global_variable, unbind_global_variable_noref: new functions
3663 that remove variables from the global_variables table
3664
3665 lib/sh/shmatch.c
3666 - sh_regmatch: use unbind_global_variable_noref to make sure we act on
3667 the copy of BASH_REMATCH in the global scope all the time, ignoring
3668 any local variables that might exist. Tentative fix for memory leak
3669 report from Emanuele Torre <torreemanuele6@gmail.com>
3670
3671 doc/{bash.1,bashref.texi}
3672 - BASH_REMATCH: add caveat about making it a local variable
3673
3674 6/6
3675 ---
3676 print_cmd.c
3677 - print_redirection: if the redirectee for r_duplicating_output_word
3678 (r_duplicating_input_word) is 1 (0), don't print it; only print a
3679 non-default file descriptor number
3680 - print_redirection_list: remove the code that tries to temporarily
3681 translate a >&word redirection to >&word now that we won't print a
3682 non-default file descriptor number. Fixes issue with `declare -f' and
3683 function export reported by Namikaze Minato <lloydsensei@gmail.com>
3684
3685 6/13
3686 ----
3687 configure.ac
3688 - bumped version to bash-5.2-rc1
3689
3690 [bash-5.2-rc1 released]
3691
3692 6/15
3693 ----
3694 parse.y
3695 - parse_string_to_word_list: save the parser state before any state-
3696 changing functions like bash_history_disable(). Reported by
3697 Clark Wang <dearvoid@gmail.com>
3698
3699 6/16
3700 ----
3701 doc/bash.1
3702 - play tricks with the value of the zZ number register to refer to
3703 `bash(1)' instead of `above' or `below' when creating the builtins
3704 man page
3705
3706 6/17
3707 ----
3708 doc/{bash.1,bashref.texi}
3709 - wait: note that wait will return > 128 if interrupted by a signal.
3710 Reported by AA <aathan_github@memeplex.com>
3711
3712 execute_cmd.c
3713 - {execute_cond_node,execute_arith_command,eval_arith_for_expr}: make
3714 sure to reset this_command_name after running any DEBUG trap so the
3715 DEBUG trap doesn't overwrite it.
3716 Reported by Emanuele Torre <torreemanuele6@gmail.com>.
3717 - execute_select_command: set this_command_name to NULL after running
3718 any DEBUG trap like execute_for_command does
3719
3720 6/23
3721 ----
3722 test.c
3723 - three_arguments: when given [ ! ! arg ], make sure to advance POS
3724 after calling two_arguments to avoid a `too many arguments' error.
3725 Report from Steffen Nurpmeso <steffen@sdaoden.eu>
3726
3727 6/27
3728 ----
3729 subst.c
3730 - expand_word_internal: when expanding backquoted command substitution,
3731 call string_extract with the SX_REQMATCH flag (closing backquote
3732 required) only if the word flags don't contain W_COMPLETE,
3733 indicating that we're doing this for completion, probably to
3734 determine whether or not to append something to the word. Fixes bug
3735 reported by Emanuele Torre <torreemanuele6@gmail.com>.
3736
3737 7/5
3738 ---
3739 execute_cmd.c
3740 - execute_connection: treat a connector of '\n' the same as ';'
3741
3742 print_cmd.c
3743 - print_comsub: new function, sets flag noting we are printing a
3744 command substitution and calls make_command_string
3745 - make_command_string_internal: add '\n' to the ';' case; print command
3746 list with newline connector appropriately
3747
3748 parse.y
3749 - parse_comsub: call print_comsub instead of make_command_string
3750 - list1 production (part of compound_list): if a list is separated by
3751 newlines, and the parser is parsing a command substitution, make
3752 the connection command with a '\n' connector. Makes the text
3753 output of parse_comsub closer to the original source text. From a
3754 report from Martijn Dekker <martijn@inlv.org>
3755
3756 7/6
3757 ---
3758 doc/bash.1,lib/readline/doc/rluser.texi
3759 - complete: add note about arguments passed to command specified by
3760 `complete -C'; suggested by Mark Chandler <mcp@synq.so>
3761
3762 builtins/setattr.def
3763 - show_local_var_attributes: special-case `local -', since there is
3764 no `declare -' equivalent.
3765 Reported by Emanuele Torre <torreemanuele6@gmail.com>.
3766 - show_all_var_attributes: use `local -' when printing a variable named
3767 `-' at the current non-zero variable context
3768
3769 parse.y
3770 - shell_getc: if we are at the end of an alias, returning a space,
3771 make sure we mark the previous character as single-byte by modifying
3772 shell_input_line_property so the space we return is properly
3773 recognized. This would fail before if the last character of the
3774 alias was a multi-byte character. Reported by
3775 Vangelis Natsios <vnatsios@gmail.com>
3776
3777 7/12
3778 ----
3779 lib/readline/isearch.c
3780 - rl_display_search: don't call rl_redisplay_function before returning;
3781 rl_message already calls it. Reported by
3782 Frédéric Moulins <frederic@moulins.org>
3783
3784 configure.ac
3785 - bumped version to bash-5.2-rc2
3786
3787 7/18
3788 ----
3789 jobs.c
3790 - set_job_control: don't bother calling tcgetpgrp if shell_tty < 0,
3791 since it will just fail
3792
3793 variables.c
3794 - reset_local_contexts: new function, delete all context tables
3795 associated with shell functions and set variable_context to 0.
3796 Called when we want to stop executing in a shell function without
3797 going through the pop_context chain with its side effects
3798
3799 variables.h
3800 - reset_local_contexts: extern declaration
3801
3802 builtins/evalstring.c
3803 - parse_and_execute: call reset_local_contexts instead of setting
3804 variable_context to 0
3805
3806 eval.c
3807 - reader_loop: call reset_local_contexts in cases where the shell has
3808 longjmped for a fatal error and errexit is enabled (ERREXIT), but
3809 not for other cases, and especially not for the exit builtin,
3810 instead of just setting variable_context to 0. Fixes issue originally
3811 reported by Robert Stoll <robert.stoll@tegonal.com>
3812
3813 subst.c
3814 - pat_subst: implement sed-like behavior when presented with a null
3815 pattern that's anchored at the start or end of the string, or when
3816 presented with a null string: process the replacement string for `&'
3817 and `\&' and substitute in the result as before. Patch from
3818 Koichi Murase <myoga.murase@gmail.com>
3819
3820 7/20
3821 ----
3822
3823 [bash-5.2-rc2 frozen]
3824
3825 7/27
3826 ----
3827 parse.y
3828 - reset_parser: set need_here_doc, esacs_needed_count, expecting_in_token
3829 all to 0, since jumping back to a top-level parse needs that
3830 - parse_comsub: make sure to reset expand_aliases and shell_eof_token
3831 if we're not going to exit immediately out of this function
3832
3833 7/28
3834 ----
3835 parse.y
3836 - parse_comsub: if the compatibility level is <= 51, set extglob while
3837 parsing the command substitution, so bad pattern errors can still be
3838 caught but valid patterns are let through and can be evaluated at
3839 runtime, when extglob may have been set. If it isn't set, it will
3840 still be a parser error when the command substitution is executed.
3841 Fixes report from Sam James <sam@gentoo.org> about gentoo scripts.
3842 - reset_parser: set extended_glob from global_extglob if the parser
3843 state includes PST_CMDSUBST
3844 - xparse_dolparen: set global_extglob but don't modify extended_glob,
3845 so parse errors can be caught before forking a child for command
3846 substitution, as part of word expansion, but after extglob may have
3847 been set by command execution (e.g., in a shell function)
3848
3849 8/5
3850 ---
3851 [bump version to bash-5.2-rc3]
3852
3853 8/6
3854 ---
3855 trap.c
3856 - run_pending_traps: move code from evalstring() so we call
3857 parse_and_execute() directly and handle any `return' invocations so
3858 we can restore the value of running_trap. Otherwise, if we longjmp
3859 past this function, we will think we're running a trap after we
3860 finish. Prompted by post from Koichi Murase <myoga.murase@gmail.com>
3861
3862 8/9
3863 ---
3864
3865 lib/readline/nls.c
3866 - _rl_current_locale: private variable, stores the value of the
3867 LC_CTYPE locale category, as determined by _rl_init_locale; set
3868 to allocated memory in _rl_init_locale()
3869 - _rl_set_localevars: new function, code from _rl_init_eightbit that
3870 checks the current locale (passed as an argument) and sets the
3871 various locale-aware variables based on it. It accepts a second
3872 argument: FORCE. If non-zero, it means to restore the default "C"
3873 locale values if the locale is "C" or "POSIX", now that this
3874 function can be called multiple times
3875 - _rl_init_eightbit: now just calls _rl_init_locale and
3876 _rl_set_localevars
3877 - _rl_reset_locale: new function, checks whether our the locale has
3878 changed since we last called _rl_init_locale to set our internal
3879 idea of its value. If it has changed, call _rl_set_localevars with
3880 the new locale and a FORCE argument of 1 to change the
3881 locale-dependent variables.
3882
3883 lib/readline/rlprivate.h
3884 - _rl_reset_locale: extern declaration
3885
3886 lib/readline/readline.c
3887 - rl_initialize: call _rl_reset_locale instead of _rl_init_locale so
3888 the internal readline variables get set when we move from a non-
3889 multibyte locale ("C") to a multibyte one ("en_US.UTF-8"). Report
3890 from Alan Coopersmith <alan.coopersmith@oracle.com>
3891
3892 8/16
3893 ----
3894 lib/sh/setlinebuf.c
3895 - sh_setlinebuf: allocate buffers for line-buffering stdout and stderr
3896 only once, the first time it is requested. Only allocate memory if
3897 we're using setvbuf (we usually are). Double the buffer size to 2016
3898 if we're using the bash malloc. Otherwise, let stdio handle it.
3899
3900 8/17
3901 ----
3902 builtins/exec.def
3903 - exec_builtin: make sure to initialize orig_job_control in case the
3904 command is not found by search_for_command. Report and fix from
3905 Xiami <i@f2light.com>
3906
3907 [bash-5.2-rc3 frozen]
3908
3909 8/27
3910 ----
3911 parse.y
3912 - parse_comsub: restore extended_glob to a local copy (local_extglob)
3913 only if we changed it; a safer way to do it. Fixes extglob change
3914 issue reported by Kerin Millar <kfm@plushkava.net>
3915 - cond_term: restore extended_glob to a local copy; safer than using
3916 global_extglob, which we will reserve for error recovery
3917
3918 8/30
3919 ----
3920 parse.y
3921 - parse_comsub: don't clear the pushed string list; we might need it to
3922 consume additional input to satisfy this command substitution. When
3923 we restore the parser state, don't restore the pushed string list in
3924 case we used it. From
3925 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018727
3926 - parse_comsub: don't modify extended_glob if parser_state includes
3927 PST_EXTPAT, in which case we've already set extended_glob and
3928 global_extglob appropriately. Only matters in compatibility mode.
3929
3930 8/31
3931 ----
3932 subst.c
3933 - parameter_brace_transform: make sure we return an error if *xform
3934 is '\0'. Report from Ivan Kapranov <koltiradw@yandex.ru>
3935
3936 9/7
3937 ---
3938 [bump version to bash-5.2-rc4]
3939
3940 9/8
3941 ---
3942 [bash-5.2-rc4 frozen]
3943
3944 9/20
3945 ----
3946 lib/readline/history.c
3947 - replace_history_entry: check for a NULL timestamp before trying to
3948 copy it. Report from nov.ondrej@gmail.com
3949
3950 9/23
3951 ----
3952 [bash-5.2 frozen]