]> git.ipfire.org Git - thirdparty/bash.git/blob - ChangeLog
Bash-5.3 distribution sources and documentation
[thirdparty/bash.git] / ChangeLog
1 12/6/2020
2 ---------
3
4 [bash-5.1 released]
5
6 12/7
7 ----
8 Makefile.in
9 - bashline.o: add dependency on ${DEFDIR}/builtext.h. Report from
10 Fazal Majid <fazal@majid.org>
11
12 12/11
13 -----
14 builtins/wait.def
15 - wait_builtin: don't assign the variable given with -p if there are no
16 jobs to wait for. Report and fix from OÄuz <oguzismailuysal@gmail.com>
17
18 arrayfunc.c
19 - kvpair_assignment_p: return non-zero if argument L appears to be a
20 key-value pair associative array compound assignment
21 - expand_and_quote_kvpair_word: run a single word in a key-value pair
22 associative array compound assignment through the appropriate
23 expansions and single-quote the result
24
25 arrayfunc.h
26 - kvpair_assignment_p, expand_and_quote_kvpair_word: extern declarations
27
28 subst.c
29 - expand_oneword: detect whether VALUE appears to be a key-value
30 pair compound assignment and call the appropriate function to expand
31 each word in the resulting list. Fixes inconsistency reported by
32 oguzismailuysal@gmail.com
33
34 12/12
35 -----
36 subst.c
37 - command_substitute: don't reset pipeline_pgrp to shell_pgrp if we
38 are already forked to run a command (SUBSHELL_FORK). Fixes SIGINT
39 in command substitution in here-document in forked child issue
40 reported by oguzismailuysal@gmail.com
41
42 12/18
43 -----
44 execute_cmd.c
45 - execute_pipeline: execute the lastpipe code even if prev == 0. It
46 can only be 0 here if stdin was closed when this function was
47 executed
48 - execute_pipeline: if prev == 0, set lstdin to a sentinel (-1) that
49 means to close fd 0 after executing the command, and call close(prev)
50 before restoring stdin. restore_stdin now understands -1, and closes
51 fd 0. Fixes issue reported by Tomas Janousek <tomi@nomi.cz>
52
53 12/21
54 -----
55 doc/bashref.texi
56 - PROMPT_COMMANDS: clean up a couple of remaining instances of this
57 name. Report from Eli Schwartz <eschwartz@archlinux.org>
58
59 12/26
60 -----
61 subst.c
62 - command_substitute: make sure that the child process always has
63 pipeline_pgrp == shell_pgrp: if pipeline_pgrp is non-zero when we
64 get to the child, meaning that we're part of an already-forked
65 child that is, for instance, running redirections, we need to reset
66 shell_pgrp to it to preserve the invariant. Fixes bug with terminal
67 being set to the incorrect pgrp reported by oguzismailuysal@gmail.com
68
69 12/29
70 -----
71 configure.ac,builtins/shobj-conf,m4/threadlib.m4
72 - midnightbsd: update auto-configuration to treat MidnightBSD like
73 FreeBSD. From https://savannah.gnu.org/patch/?10006
74
75 12/30
76 -----
77 examples/loadables/stat.c
78 - stattime: use strftime with a default format or the format supplied
79 with the -F option to format the file time information
80 - stat_builtin: now takes a -F fmt option for a strftime format string;
81 change to function calling sequences to pass the format down to
82 stattime
83
84 examples/loadables/Makefile.in
85 - stat: now built and installed by default
86
87 12/31
88 -----
89 command.h
90 - SUBSHELL_IGNTRAP: new flag value
91
92 jobs.c
93 - make_child: set SUBSHELL_IGNTRAP in subshell_environment in the
94 child process, meaning that we should not execute trap handlers for
95 trapped signals
96
97 execute_cmd.c
98 - execute_in_subshell, execute_simple_command, execute_disk_command:
99 make sure to unset SUBSHELL_IGNTRAP after a child process restores
100 the original signal dispositions
101 - execute_simple_command: make sure to set SUBSHELL_IGNTRAP after
102 make_child returns and we're setting subshell_environment directly
103
104 subst.c
105 - command_substitute,process_substitute: unset SUBSHELL_IGNTRAP after
106 the child process has reset the trapped signal dispositions
107
108 trap.c
109 - trap_handler: if we get a signal for which we have set a trap, but
110 SUBSHELL_IGNTRAP is set in subshell_environmnent, make sure we
111 restore the original signal disposition and resend the signal to
112 ourselves. Fixes issue reported by Nikolay Borisov <nborisov@suse.com>
113 (or at least makes the race window much smaller)
114
115 sig.c
116 - initialize_terminating_signal: set the original signal handler from
117 the return value from sigaction; a minor optimization that saves a
118 system call or two
119
120 1/5/2021
121 --------
122 builtins/declare.def
123 - declare_internal: make some option combinations that don't make
124 sense errors (e.g., -f and -a/-A/-i/-n)
125 - declare_internal: if we build a new variable name by expanding the
126 value of a nameref variable, make sure to chop the `+' in a `+='
127 off before going on
128
129 1/7
130 ---
131 doc/{bash.1,bashref.texi}
132 - bind: add an example to the synopsis making it clear that you can
133 use any readline command line as a non-option argument, as it says
134 in the text. From a report from Dan Jacobson <jidanni@jidanni.org>
135
136 1/12
137 ----
138 locale.c
139 - local_shiftstates -> locale_shiftsates in the non-multibyte code
140 branch. Reported by Henry Bent <henry.r.bent@gmail.com>
141
142 subst.c
143 - expand_compound_assignment_word: make sure to call dispose_words on
144 the WORD_LIST * returned from expand_oneword after turning it back
145 into a string. Fixes memory leak reported by Alexander Mescheryakov
146 <alexander.s.m@gmail.com>
147
148 1/13
149 ----
150 variables.c
151 - bind_variable_internal: when performing an assignment to a subscripted
152 array variable that was the value of a nameref (used in the original
153 assignment), don't call make_variable_value on the value, since that
154 messes up +=. Just call assign_array_element and let that take care
155 of calling make_variable_value appropriately. Fixes bug reported by
156 Oguz <oguzismailuysal@gmail.com>
157
158 1/14
159 ----
160 findcmd.c
161 - search_for_command: if `checkhash' is set, don't add non-executable
162 files to the command hash table, since we will just remove them
163 later
164
165 lib/sh/winsize.c
166 - get_new_window_size: set *rp and *cp even if READLINE is not defined
167
168 1/15
169 ----
170 lib/sh/winsize.c
171 - get_new_window_size: call rl_set_window_size only if we can determine
172 we're using readline: an interactive shell without no-line-editing,
173 or if we've already initialized readline, presumably in a non-
174 interactive shell
175
176 support/Makefile.in
177 - man2html: add LDFLAGS_FOR_BUILD to the recipe. Report from
178 Jeffrey Walton <noloader@gmail.com>
179
180 1/17
181 ----
182 lib/readline/misc.c
183 - rl_operate_and_get_next: fix old K&R function declaration. Report
184 from Tom Tromey <tom@tromey.com>
185
186 lib/readline/readline.c
187 - _rl_internal_char_cleanup: move code that cleans up the active region
188 and deactivates the mark inside this function so callback mode
189 applications get the intended functionality. Report and fix from
190 sparrowhawk996@gmail.com
191
192 lib/readline/bind.c
193 - rl_parse_and_bind: when using the arithmetic comparison operators on
194 the version, make sure to invert the tests so that we stop parsing
195 if the test fails. Report and fix from Tom Tromey <tom@tromey.com>
196
197 1/19
198 ----
199 Makefile.in
200 - pipesize.h: add dependency on ${BUILTINS_LIBRARY} to avoid parallel
201 makes trying to create it twice. Report and fix from
202 Richard Purdie <richard.purdie@linuxfoundation.org>
203
204 1/21
205 ----
206 subst.c
207 - param_expand: if a nameref expands to array[@] or array[*], make sure
208 to call chk_atstar so the right variables are set to split the
209 result. Report from Oguz <oguzismailuysal@gmail.com>
210
211 1/22
212 ----
213 builtins/declare.def
214 - Rewrote to reduce complexity. Still needs some work.
215
216 lib/readline/*.h, lib/tilde/tilde.h
217 - PARAMS: remove, rely on compilers understanding function prototypes
218
219 lib/readline/{undo.c,histlib.h}
220 - _hs_replace_history_data: move extern declaration to histlib.h
221
222 lib/readline/readline.c
223 - _rl_parse_colors: instead of an extern declaration for this, include
224 "parse-colors.h" for it
225
226 lib/readline/{histfile.c,histlib.h}
227 - _hs_append_history_line: move extern declaration to histlib.h
228
229 lib/readline/history.h
230 - HS_HISTORY_VERSION: define to 0x0801 (current library version) if
231 it's not already defined. We conditionally define it in case an
232 application has (unwisely) chosen to use it, since the history
233 library doesn't do anything with it yet
234
235 lib/readine/{rlprivate.h,{search,misc,readline}.c}
236 - _rl_free_history_entry: add extern declaration to rlprivate.h, remove
237 extern declaration from c source files. Use HS_HISTORY_VERSION as a
238 sentinel that it's ok to use HIST_ENTRY in rlprivate.h
239
240 lib/readline/{rlprivate.h,{isearch,search,undo}.c}
241 - _rl_saved_line_for_history: add extern declaration to rlprivate.h,
242 remove extern declaration from c source files, using HS_HISTORY_VERSION
243 in the same way
244
245 1/24
246 ----
247 lib/readline/signals.c
248 - _rl_handle_signal: make sure that all sigprocmask calls are protected
249 by HAVE_POSIX_SIGNALS. Report and fix from Tom Tromey <tom@tromey.com>
250
251 1/26
252 ----
253 lib/readline/callback.c
254 - rl_callback_read_char: make sure rl_linefunc is non-NULL before
255 calling through the pointer. The line function could have been
256 removed by the application before readline processes any typeahead
257 input. Bug reported by Matthias Klose <doko@debian.org>, pointer
258 to root cause from Koichi Murase <myoga.murase@gmail.com>
259
260 lib/glob/glob.c
261 - skipname,wskipname: put in some additional checks for `.' to ensure
262 that we don't get false positives (or incomplete tests) that can
263 affect the results of extglob patterns. Reported by
264 gregrwm <rhn-users@greatlakedata.com>
265
266 1/27
267 ----
268 lib/glob/glob.c
269 - extglob_skipname,wextglob_skipname: fixed an off-by-one error (SE
270 was being set to one character before the end of the pattern string,
271 not the null character at the end of the pattern string like other
272 callers of glob_patscan) that caused the last character of the last
273 subpattern to be cut off when calling skipname
274 - extglob_skipname,wextglob_skipname: some cleanups so the code is
275 closer to identical for the single-byte and wide character versions
276
277 2/1
278 ---
279 execute_cmd.c
280 - execute_simple_command: in posix mode, if we have a variable
281 assignment error while assigning into the temporary environment (e.g.,
282 assigning to a readonly variable), a non-interactive shell running a
283 special builtin exits; a non-interactive shell running anything else
284 jumps back to the top level. A shell compiled with -DSTRICT_POSIX
285 exits unconditionally.
286 - execute_simple_command: make sure posix mode sets $? to non-zero
287 if a variable assignment error occurs preceding a non-special builtin
288
289 subst.c
290 - do_assignment_statements: take the code from expand_word_list_internal
291 that performs assignment statements, either standalone or preceding
292 simple command names, and factor it out into this function
293 - expand_word_list_internal: call do_assignment_statements where
294 appropriate
295
296 2/2
297 ---
298 lib/glob/glob.c
299 - dequote_pathname: fix function definition for non-multibyte systems.
300 Report and fix from Marc Aurèle La France <tsi@tuyoix.net>
301
302 Makefile.in,doc/Makefile.in
303 - for certain targets, remove files before creating them to deal with
304 symlinked build trees.
305 Report and fix from Marc Aurèle La France <tsi@tuyoix.net>
306
307 examples/loadables/accept.c
308 - include limits.h before typemax.h
309 Report and fix from Marc Aurèle La France <tsi@tuyoix.net>
310
311 builtins/gen-helpfiles.c
312 - if USING_BASH_MALLOC is defined, make sure to undefine malloc as well
313 as free. Fixes bug reported by George R Goffe <grgoffe@yahoo.com>
314
315 builtins/Makefile.in
316 - install-help: now depends on $(HELPFILES_TARGET) so we make sure the
317 separate helpfiles are created before we try to install them if we
318 don't go through the `all' makefile target
319
320 configure.ac
321 - HELPDIR: now ${datadir}/bash/helpfiles
322
323 2/3
324 ---
325 parse.y
326 - parse_string_to_word_list: before expanding a compound assignment
327 statement body, make sure to save any alias that's currently being
328 expanded. Restore the alias after the compound assignment is parsed.
329 Reported back in 11/2020 by Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
330
331 2/4
332 ---
333 lib/readline/histexpand.c
334 - history_expand_internal: when calling the history_inhibit_expansion
335 function, make sure to call it using the string as we've expanded it
336 to that point (RESULT), adding the expansion and next characters
337 temporarily, since we make expansion decisions based on what we've
338 accumulated, not what we started with. This makes things like
339 echo abc!$!$ work, where before the second `!' inhibited expansion
340 because bash_history_inhibit_expansion mistakenly took it as the
341 second character in a `$!' word expansion. Fixes bug reported back
342 in 10/2020 by Paul Fox <paul.d.fox@gmail.com>
343
344 array.h
345 - array_pop: instead of calling array_dispose_element from this macro,
346 just call array_shift with the AS_DISPOSE flag
347
348 2/5
349 ---
350 bashhist.c
351 - shell_comment: move condition to return 0 if the delimiter stack is
352 not empty or the shell is parsing a here document into the function
353 itself, don't have the callers check so the check is in one place.
354 Fixes bug reported by Oguz <oguzismailuysal@gmail.com>
355
356 array.h,variables.c
357 - ARRAY_ELEMENT_REPLACE: convenience define for modifying an array
358 element's value
359
360 variables.c
361 - pop_args: a couple of code simplifications
362
363 2/7
364 ---
365 lib/malloc/malloc.c
366 - pagesz: at least MALLOC_PAGESIZE_MIN (4096) bytes
367 - union mhead: now 16-byte aligned on all systems, 32-bit and 64-bit
368 pointers
369 - binsizes: since the smallest allocation overhead is now 16 bytes,
370 redo the buckets so binsizes[0] == 32; adjust the thresholds for
371 split/coalesce/prepopulate/mmap (NBUCKETS = 28; STARTBUCK = 0).
372 Sizes stay pretty much the same; indices change
373 - consistently use MALLOC_SIZE_T instead of long/unsigned int/int
374 - use MAGIC8_NUMBYTES as the length of the mh_magic8 buffer, in case
375 it changes later for alignment
376 - internal_remap: new function, calls mremap to reallocate a chunk of
377 memory allocated using mmap(); called from internal_realloc if the
378 old size and new size are both bigger than the mmap threshold
379 - internal_realloc: call internal_remap if the old size and new size
380 are both above the threshold where we use mmap for allocation
381
382 2/10
383 ----
384 include/timer.h
385 - new file, declaration for a timer struct to be used by a set of
386 functions to implement timers using SIGALRM or select/pselect
387
388 lib/sh/timers.c
389 - new file, set of functions to manipulate timer objects and timeouts
390 using SIGALRM or select/pselect. Inspired by a patch from
391 Koichi Murase <myoga.murase@gmail.com>. Not used yet
392
393 2/11
394 ----
395 builtins/read.def
396 - read_builtin: if there is a timeout set, block SIGCHLD around calls
397 to zread and its siblings, or calls to readline for `read -e', so
398 SIGCHLD (and the consequent waitpid) doesn't interrupt the read.
399 Fixes bug reported by Koichi Murase <myoga.murase@gmail.com>, but
400 there may be a different fix coming
401
402 Makefile.in,builtins/Makefile.in
403 - fix up dependencies, especially on builtins.h and builtext.h
404
405
406 2/12
407 ----
408 lib/readline/input.c
409 - rl_read_key: if we set rl_done == 1, set RL_STATE_DONE as well
410 Reported by Koichi Murase <myoga.murase@gmail.com>
411
412 lib/readline/isearch.c
413 - _rl_search_getchar: only call _rl_read_mbstring if rl_read_key returns
414 >= 0, avoid some work
415
416 lib/readline/vi_mode.c
417 - _rl_vi_callback_change_char,_rl_vi_change_char: don't overwrite the
418 last replacement string if _rl_vi_callback_getchar returns -1.
419 It will likely make no difference, since the next read will return
420 an error or EOF, but being careful
421 - rl_vi_overstrike: if _rl_overwrite_char doesn't return 0, break out
422 of the loop
423
424 lib/readline/text.c
425 - _rl_overwrite_char: return 1 if _rl_read_mbstring returns < 0 so
426 we don't try to insert garbage
427
428 bashline.c
429 - posix_edit_macros: handle rl_read_key() returning <= 0
430
431 2/15
432 ----
433 parse.y
434 - read_comsub: make sure to turn on the LEX_RESWDOK flag if we are in
435 a case statement and read a `)', since we can get a valid `esac'.
436 Fixes bug reported by Oguz <oguzismailuysal@gmail.com>
437 - read_comsub: if we're in a case statement, recognize `}' as a
438 reserved word and set the LEX_RESWDOK flag for the next word, since
439 we can get an esac (or another reserved word) after it
440
441 2/16
442 ----
443 parse.y
444 - reserved_word_acceptable: add ARITH_CMD and COND_END to the list of
445 tokens that can precede a reserved word, so you can use reserved
446 words after ((...)) and [[...]].
447 Reported by Koichi Murase <myoga.murase@gmail.com>
448
449 2/17
450 ----
451 parse.y
452 - parse_comsub: use new LEX_CASEWD flag to track when we are reading
453 the WORD in `case WORD in' and turn on the LEX_RESWDOK flag when
454 that word ends. This allows $(case x in esac), which no one uses.
455 - parse_comsub: use LEX_PATLIST flag to track when we are reading a
456 case pattern list so `|' doesn't turn on the LES_RESWDOK flag
457 - parse_comsub: case_level: simple counter to count the number of esacs
458 we need to see before we're no longer in a case statement; analog of
459 esacs_needed_count from the lexer
460
461 2/19
462 ----
463 parse.y
464 - CHECK_FOR_RESERVED_WORD: don't return ESAC if we read `esac' after a
465 left paren in a case pattern list. From an austingroup-bugs discussion
466 about https://www.austingroupbugs.net/view.php?id=1454
467 - parse_comsub: if we read a `(' while looking for a case pattern list
468 and LEX_CKESAC is set, we have a leading left paren in the pattern
469 list and should turn off LEX_CKESAC so (esac) doesn't prematurely
470 terminate the case command. From an austingroup-bugs discussion
471 about https://www.austingroupbugs.net/view.php?id=1454
472
473 2/26
474 ----
475 builtins/history.def
476 - history_builtin: when checking negative offsets to -d, which are
477 supposed to count back from the end of the history list, check the
478 range against 0 instead of history_base, because the calculation is
479 done against history_length, which is independent of history_base.
480 Report and fix from Christopher Gurnee <chris@gurneeconsulting.net>
481
482 2/28
483 ----
484 doc/bashref.texi
485 - replaced a number of uses of @var with a mixture of @env and @dfn
486 to better match up with the texinfo standards
487
488 doc/{bash.1,bashref.texi}
489 - clarify some aspects of the coproc description, especially the
490 use of NAME and when it's optional
491
492 3/1
493 ---
494 subst.c
495 - read_comsub: fix off-by-one error in mbrtowc that causes a read one
496 character past the end of buf. Report and fix from
497 Platon Pronko <platon7pronko@gmail.com> in
498 https://savannah.gnu.org/patch/?10035
499
500 3/3
501 ---
502 builtins/ulimit.def
503 - ulimit_builtin: Posix compatibility: if the last command specified
504 by an option does not have an option argument, but there is an
505 operand remaining after all the options are parsed, treat the
506 operand as an argument to that last command. From an austin-group
507 discussion and a Geoff Clare suggestion back in November, 2020.
508 Austin Group interpretation 1418
509
510 examples/shellmath
511 - a package of shell functions to perform floating-point math entirely
512 in bash. Contributed by Michael Wood <mawood20@gmail.com>. Available
513 at https://github.com/clarity20/shellmath
514
515 3/4
516 ---
517 support/shobj-conf
518 - darwin: take out the -arch-only option in SHOBJ_XLDFLAGS and
519 SHOBJ_ARCHFLAGS; no longer needed
520
521 doc/{bash.1,bashref.texi}
522 - coprocesses: suggested changes from rms@gnu.org; recommend the
523 `coproc NAME { commands; }' form as the simplest and most flexible
524
525 3/5
526 ---
527 builtins/exec.def
528 - exec_builtin: set last_command_exit_value before calling exit_shell
529 so any exit trap gets the right value for $?. From Matthew Bauer
530 <mjbauer95@gmail.com> via https://savannah.gnu.org/patch/?10039
531
532 3/8
533 ---
534 include/timer.h
535 - SHTIMER_ALRMSET: new flag, indicates that there is an active alarm
536 associated with this timer (falarm() was called)
537
538 lib/sh/timers.c
539 - shtimer_set: set the SHTIMER_ALRMSET flag after calling falarm
540 - shtimer_unset: don't call falarm(0,0) unless the SHTIMER_ALRMSET flag
541 is set
542
543 3/9
544 ---
545 include/posixtime.h
546 - added some BSD convenience defines if they are not present
547
548 parse.y,shell.h
549 - {save,restore}_parser_state: save and restore shell_eof_token and
550 pushed_string_list; change callers (e.g., xparse_dolparen) so they
551 don't have to manage them
552
553 3/10
554 ----
555 builtins/common.h
556 - extern declarations for moving to timers (sh_timer) for read builtin
557 timeouts
558
559 quit.h
560 - CHECK_ALRM: remove, no longer used
561
562 trap.c
563 - check_signals: call check_read_timeout instead of CHECK_ALRM
564
565 bashline.c
566 - bash_event_hook: use read_timeout instead of checking `sigalrm_seen';
567 that no longer exists
568 - bash_event_hook: accommodate readline timing out (not used yet)
569
570 lib/sh/zread.c
571 - zread: call read_builtin_timeout() to check for a timeout before
572 calling a blocking read()
573
574 builtins/read.def
575 - sigalrm,reset_timeout,check_read_timeout,read_builtin_timeout: new
576 and modified functions to use sh_timers for timeouts instead of
577 SIGALRM. Based on work contributed by Koichi Murase
578 <myoga.murase@gmail.com>
579 - read_builtin: use sh_timers for read timeouts (-t N) instead of
580 using SIGALRM
581 - edit_line: simulate receiving SIGALRM if readline times out (not
582 used yet)
583
584 3/11
585 ----
586 lib/readline/readline.c
587 - rl_initialize: call _rl_timeout_init to set things up for any timeout
588 that was set with rl_set_timeout
589 - readline_internal_charloop: if we longjmped because of a timeout,
590 make sure to set rl_done/RL_STATE_DONE and return; we are
591 abandoning this call to readline(). The readline timeout changes
592 were based on work contributed by Koichi Murase
593 <myoga.murase@gmail.com>
594
595 lib/readline/readline.h
596 - extern declarations for new timeout functions and hook
597 - rl_clear_timeout: new define
598
599 lib/readline/callback.c
600 - rl_callback_read_char: if we longjmped because of a timeout,
601 make sure to set rl_done/RL_STATE_DONE and return; we are
602 abandoning this call to readline()
603
604 lib/readline/util.c
605 - _rl_abort_internal: if we time out, don't ring the bell; let the
606 caller handle it
607
608 lib/readline/input.c
609 - extern declarations for public and readline-library-private functions
610 and hooks to implement timeouts
611 - rl_set_timeout,rl_timeout_remaining: new public functions
612 - _rl_timeout_select: new function, uses select/pselect to implement
613 read timeouts that take timeouts set with rl_set_timeout into account;
614 calling hook function if a timeout occurs
615 - rl_gather_tyi, _rl_input_available: use _rl_timeout_select, taking
616 any existing timeout into consideration if it expires before the
617 timeout passed as an argument
618 - rl_getc: use _rl_timeout_select and handle any timeouts by calling
619 _rl_timehout_handle
620 - set_alarm,reset_alarm: new functions to implement timeouts using
621 SIGALRM for systems that lack a working select/pselect
622 - _rl_timeout_init: new function, sets things up for reading input
623 with a specified timeout
624 - _rl_timeout_handle: a timeout handler; calls any event hook and
625 sets up to abort the current readline() call
626 - _rl_timeout_handle_sigalrm: a timeout handler for systems using
627 SIGALRM to implement timeouts
628
629 lib/readline/parens.c
630 - rl_insert_close: use _rl_timeout_select to take timeouts into account
631
632 lib/readline/rlprivate.h
633 - extern declarations for readline-library-private timeout functions
634
635 lib/readline/rltty.c
636 - rl_deprep_terminal: don't print a newline after the bracketed paste
637 disable sequence if we timed out
638
639 lib/readline/signals.c
640 - _rl_handle_signal: if sig is SIGALRM, call _rl_timeout_handle_sigalrm()
641
642 lib/readline/doc/rltech.texi
643 - rl_set_timeout,rl_timeout_remaining: document new public functions
644 - RL_STATE_TIMEOUT: document new possible state value for rl_readline_state
645 - rl_timeout_event_hook: document new hook function, called when
646 readline times out
647
648 builtins/read.def
649 - read_builtin: changes to use the readline timeout functions to
650 implement timeouts with `read -e'; these use rl_set_timeout and
651 sh_timer structs together
652
653 3/12
654 ----
655 subst.c
656 - expand_string_dollar_quote: new function, expands $'...' and $"..."
657 in a string for those code paths that don't expand it themselves
658
659 subst.h
660 - expand_string_dollar_quote: extern declaration
661
662 parse.y
663 - read_secondary_line: if $'...' or $"..." appears in the line, call
664 expand_string_dollar_quote to expand them. This now returns new
665 memory, need to change callers
666
667 make_cmd.c
668 - make_here_document: account for read_secondary_line returning newly
669 allocated memory, free `full_line' appropriately
670
671 bashline.c
672 - shell_expand_line,history_and_alias_expand_line: expand $'...' and
673 $"..." in the line by calling expand_string_dollar_quote, since
674 that happens after history expansion and before alias expansion in
675 normal processing
676
677 3/15
678 ----
679 subst.c
680 - expand_string_dollar_quote: fix out-of-order initialization
681
682 Makefile.in
683 - {TAGS,tags}: add ETAGS/ETAGSFLAGS/CTAGS/CTAGS flags; make sure to
684 cd to the source directory before running them to get source files
685 that don't have absolute paths. Fix from Mike Jonkmans
686 <bashbug@jonkmans.nl>
687
688 parse.y
689 - xparse_dolparen: don't longjmp if FLAGS includes SX_NOLONGJMP. From
690 a report by Xu Lu <oliver_lew@outlook.com>
691
692 3/16
693 ----
694 subst.c
695 - process_substitute: set startup_state and parse_and_execute_level
696 to see if we can avoid a fork()
697
698 bashline.c
699 - bash_spell_correct_word: bindable command (spell-correct-word) to
700 perform spelling correction on the current `shellword', using the
701 same code as the `cdspell' option and directory spelling correction
702 during completion. Feature suggested by in 10/2020 by
703 Karl Kleinpaste <karl@kleinpaste.org>
704 - bash_spell_correct_word: bound to "C-x s" by default in emacs mode
705
706 lib/readline/display.c
707 - rl_redisplay: fix redisplay problem that occurs when switching from
708 the rl-digit-argument prompt "(arg: N)" back to the regular prompt,
709 and the regular prompt contains invisible characters
710
711 doc/bash.1,lib/readline/doc/rluser.texi
712 - spell-correct-word: document new function and its default binding
713
714 3/17
715 ----
716 doc/{bash.1,bashref.texi}
717 - cd: slight changes to specify that it sets PWD and OLDPWD
718 - {pushd,popd}: make it clear that these builtins use cd to change
719 the current working directory; change wording to simplify the
720 description and clarify the exit status
721
722 3/18
723 ----
724 execute_cmd.c
725 - execute_disk_command: after performing redirections, call
726 unlink_all_fifos() to remove the FIFOs created as part of
727 expanding redirections. They should have been opened by then, and
728 we're going to call shell_execve right away anyway, so we won't be
729 around to remove the FIFOs. From a report from
730 Michael Felt <aixtools@gmail.com>
731
732 3/22
733 ----
734 parse.y
735 - alias_expand_token: slight tweak to check for alias expansion: perform
736 expansion unconditionally if PST_ALEXPNEXT is set, and disable it
737 in case statement pattern lists if the previous token indicates a
738 command name is acceptable.
739 From a report by Oguz <oguzismailuysal@gmail.com>
740
741 config-bot.h
742 - HAVE_MKDTEMP: fix typo
743
744 3/25
745 ----
746 lib/readline/terminal.c
747 - look in terminfo for key sequences for page up (kP) and page down
748 (kN) and bind them to history-search-{backward,forward},
749 respectively. From a patch from Xose Vazquez Perez
750 <xose.vazquez@gmail.com>
751
752 3/30
753 ----
754 doc/bashref.texi
755 - expand the node describing $"..." string translation with additional
756 details and examples
757
758 3/31
759 ----
760 misc.c
761 - rl_fetch_history: moved here from vi_mode.c
762 - rl_fetch_history: negative arguments count back from the end of
763 the history, instead of taking you to the beginning of the history
764 list
765 - rl_fetch_history: in vi mode, an out-of-range argument rings the
766 bell and doesn't change the line
767
768 vi_mode.c
769 - rl_vi_fetch_history: call rl_fetch_history
770
771 readline.h
772 - rl_fetch_history: new extern declaration
773
774 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
775 - rl_fetch_history: add description
776
777 builtins/setattr.def
778 - show_var_attributes: if a variable's value indicates that it should
779 be ANSI-C quoted, use ansic_quote instead of sh_double_quote to
780 format the value string. From proposal by Greg Wooledge
781 <greg@wooledge.org>
782
783 4/5
784 ---
785 arrayfunc.c
786 - unbind_array_element: if FLAGS includes VA_ONEWORD, don't use
787 skipsubscript to parse the subscript, just assume the entire SUB is
788 the subcript and that it contains the closing `]', so we just want
789 everything in SUB except the last character.
790
791 parse.y:
792 - select_command: use compound_list instead of list, like for_command.
793 Report by Greywolf <greywolf@starwolf.com>
794 - list: move this into compound_list (replacing the instance of `list'
795 in the compound_list production), remove from the grammar
796
797 4/6
798 ---
799 arrayfunc.c
800 - unbind_array_element: use VA_NOEXPAND instead of literal 1
801
802 4/7
803 ---
804 lib/readline/funmap.c
805 - default_funmap: add missing `vi-undo' to the list of vi-mode bindable
806 functions. Reported by Xirui Zhao <quinean@icloud.com>
807
808 4/8
809 ---
810
811 config-top.h
812 - DEFAULT_LOADABLE_BUILTINS_PATH: default value for BASH_LOADABLES_PATH
813
814 doc/{bash.1,bashref.texi}
815 - enable: note that it uses $BASH_LOADABLES_PATH, and that the default
816 is system-dependent
817
818 variables.c
819 - initialize_shell_variables: initialize BASH_LOADABLES_PATH to the
820 default given in DEFAULT_LOADABLE_BUILTINS_PATH
821
822 4/12
823 ----
824 doc/{bash.1,bashref.texi}
825 - add link to git master tar file as a place to get the current version
826
827 4/14
828 ----
829 bashline.c
830 - attempt_shell_completion: use -1 as a sentinel value for
831 in_command_position indicating that we cannot be in a command position
832 (e.g., because we're the target of a redirection) and should not
833 check for a programmable command completion or tell the programmable
834 completion code to use command completion. Report and fix from
835 Marc Aurèle La France <tsi@tuyoix.net>
836
837 4/16
838 ----
839 builtins/bind.def
840 - bind_builtin: reverse sense of strvec_search return value when
841 deciding whether or not to remove a unix-command binding from the
842 cmd keymap. Bug report by Dale Sedivec <dale@codefu.org>
843
844 lib/readline/doc/rltech.texi
845 - RL_PROMPT_{START,END}_IGNORE: document current values of \001 and
846 \002. Report from Mingye Wang <arthur200126@gmail.com>
847
848 4/19
849 ----
850 arrayfunc.c
851 - assign_assoc_from_kvlist: fix memory leak reported by konsolebox
852 <konsolebox@gmail.com>
853
854 4/20
855 ----
856 command.h,subst.c
857 - W_ITILDE: remove, replace with a variable since it's only used inside
858 a single call to expand_word_internal
859
860 4/21
861 ----
862 {subst.c,make_cmd.c,parse.y}
863 - W_DQUOTE: no longer used, use W_NOPROCSUB and W_NOTILDE directly
864 (for arithmetic commands and words in arithmetic for commands)
865
866 4/24
867 ----
868 bashline.c
869 - executable_completion: since this function gets an unquoted filename
870 from rl_filename_completion_function, we need to quote special
871 characters before passing it to bash_directory_completion_hook.
872 Report from Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
873
874 4/26
875 ----
876 lib/readline/search.c
877 - _rl_nsearch_abort: move function calls around so _rl_restore_prompt
878 happens before rl_clear_message, like when aborting an incremental
879 search. Suggested by sparrowhawk996@gmail.com
880
881 subst.h
882 - ASS_ALLOWALLSUB: new assignment flag value, means to allow @ and * as
883 valid array subscripts when assigning to existing associative arrays
884
885 arrayfunc.c
886 - assign_array_element: allow assignment of key `@' to an existing
887 associative array if the caller passes ASS_ALLOWALLSUB
888 - assign_compound_array_list: allow ( [@]=value ) to an existing
889 associative array
890
891 builtins/declare.def
892 - declare_internal: allow assignment of key `@' to an existing
893 associative array by passing ASS_ALLOWALLSUB to assign_array_element
894 as part of local_aflags. This affects declare, local, and typeset
895
896 subst.c
897 - do_assignment_internal: allow a[@]=value to an existing associative
898 array by passing ASS_ALLOWALLSUB to assign_array_element
899
900 4/27
901 ----
902 builtins/common.[ch]
903 - builtin_bind_var_to_int: wrapper for bind_var_to_int to be used by
904 builtin commands; placeholder for future work
905
906 builtins/wait.def
907 - builtin_bind_var_to_int: use instead of bind_var_to_int
908
909 builtins/common.c
910 - builtin_bind_variable: allow assignment of key `@' to an existing
911 associative array by passing ASS_ALLOWALLSUB to assign_array_element.
912 This affects printf and read
913
914 builtins/variables.[ch]
915 - bind_var_to_int: add third `flags' argument to pass to bind_variable
916 instead of always passing 0
917
918 redir.c,builtins/common.c,builtins/printf.def
919 - bind_var_to_int: change callers, add third flags argument
920
921 builtins/common.c
922 - builtin_bind_var_to_int: pass ASS_ALLOWALLSUB to bind_var_to_int so
923 builtins like wait can assign to assoc[@] and assoc[*]
924
925 4/28
926 ----
927 bashline.c
928 - command_word_completion_function: make sure to initialize
929 old_glob_ignore_case before trying to restore from it
930 - command_word_completion_function: if we are completing a glob
931 pattern, make sure to set rl_filename_completion_desired, so we get
932 quoting and appending -- we are completing a filename, after all.
933 From a report from Manuel Boni <ziosombrero@gmail.com>
934
935 lib/readline/bind.c
936 - enable-active-region: separate control of the active region and
937 bracketed paste. Still set to the same default value as bracketed
938 paste, and enabling bracketed paste enables the active region.
939 Now you can enable bracketed paste and then turn off the active
940 region.
941
942 doc/bash.1,lib/readline/doc/{readline.3,rltech.texi}
943 - enable-active-region: document new bindable readline variable and
944 its effects
945
946 4/30
947 ----
948 command.h
949 - W_ARRAYREF: new flag, meaning the word is a valid array reference
950 with subscript, replaces W_DOLLARSTAR, which was unused
951
952 subst.c
953 - expand_subscript_string,expand_array_subscript: new functions to
954 parse and expand-and-quote array subscripts. For future use
955
956 5/3
957 ---
958 builtins/mapfile.def
959 - mapfile: if the delimiter is a newline, set unbuffered_read = 1
960 for any file descriptor that isn't seekable and lseek sets errno
961 to ESPIPE (pipes, FIFOs, maybe terminal devices). If it's not a
962 newline, only allow buffered reads if the file descriptor is a
963 regular file. Report from Koichi Murase <myoga.murase@gmail.com>
964
965 builtins/read.def
966 - read_builtin: only set unbuffered_read = 1 if the input is coming
967 from a pipe (which we can't seek on) or the input is a terminal and
968 we want to read a specified number of characters or we're using a
969 non-standard delimiter
970
971 5/4
972 ---
973
974 builtins/mapfile.def
975 - mapfile: call zsyncfd before calling the callback. Suggested by
976 Koichi Murase <myoga.murase@gmail.com>; we'll see how it goes
977
978 5/5
979 ---
980 subst.h
981 - expand_subscript_string: extern declaration
982
983 {arrayfunc,subst}.c
984 - expand_subscript_string: replace expand_assignment_string_to_string
985 with calls to this when expanding array subscripts
986
987 subst.c
988 - cond_expand_word: call expand_word_internal with Q_ARITH if `special'
989 says we should quote for an arithmetic expression context
990 - expand_word_internal: call expand_array_subscript when we see `[' in
991 arithmetic or array subscript contexts, make conditional on the
992 compatibility level later
993 - expand_word_internal: make sure W_ARRAYREF makes it through this
994 function and into the returned word
995
996 5/6
997 ---
998
999 arrayfunc.c
1000 - array_expand_index: call evalexp with a flag of 0 since we call
1001 expand_arith_string with Q_ARITH and we want evalexp to remove
1002 the quotes
1003
1004 execute_cmd.c
1005 - eval_arith_for_expr,execute_arith_command: now that Q_ARITH has an
1006 effect on array subscripts (it quotes the special expansion
1007 characters), call evalexp with 0 as the flags arg so quote removal
1008 is performed on this quoted argument. Make this conditional on the
1009 shell compatibility level later
1010 - execute_cond_command: make sure to expand the argument to -v by
1011 calling cond_expand_node with Q_ARITH, and correspondingly turn off
1012 assoc_expand_once when calling unary_test with that argument, since
1013 we want it to be expanded again to remove the quotes
1014 - execute_cond_command: expand the arguments to the arithmetic operators
1015 with Q_ARITH and pass TEST_ARITHEXP to binary_test to ensure that
1016 it lets evalexp expand the arguments to remove the quoting
1017
1018 test.c
1019 - arithcomp: if TEST_ARITHEXP is in FLAGS, call evalexp with a flag
1020 if 0 to force evalexp to expand the arguments to remove the quoting
1021
1022 subst.c
1023 - param_expand: since we call expand_arith_string with Q_ARITH, we need
1024 to call evalexp with 0 instead of EXP_EXPANDED for $((...)) expansion
1025 - expand_word_internal: if we recursively call expand_word_internal to
1026 expand the contents of a double-quoted string, make sure we pass
1027 through Q_ARITH if it appears in QUOTED
1028 - verify_substring_values: call expand_arith_string with Q_ARITH and
1029 correspondingly call evalexp with 0 instead of EXP_EXPANDED
1030
1031 execute_cmd.c
1032 - execute_cond_node: if -v is the operator, and the operand is a valid
1033 array reference, pass TEST_ARRAYEXP flag to unary_test
1034
1035 5/7
1036 ---
1037 builtins/common.[ch]
1038 - set_expand_once: set array_expand_once to the value passed as the
1039 first argument, returning the original value
1040
1041 builtins.h
1042 - ARRAYREF_BUILTIN: new flag for shell builtins, means that the builtin
1043 can take array references, with subscripts, as arguments
1044
1045 builtins/mkbuiltins.c
1046 - set ARRAYREF_BUILTIN flag on builtins given in the arrayvar_builtins
1047 array
1048
1049 execute_cmd.c
1050 - execute_cond_node: use set_expand_once to set array_expand_once to 0
1051 before calling unary_test with -v (see change from 5/6)
1052
1053 arrayfunc.c
1054 - unbind_array_element: allow the caller to choose whether or not a
1055 subscript of `*' or `@' unsets the entire array by passing
1056 VA_ALLOWALL in FLAGS. Right now, since the unset builtin doesn't
1057 pass VA_ALLOWALL, those subscripts unset individual elements for
1058 associative arrays. We preserve the old behavior of unsetting
1059 indexed arrays for the time being with new indexed-array-specific
1060 code
1061
1062 5/9
1063 ---
1064
1065 builtins/shopt.def
1066 - expand_once_flag: "assoc_expand_once" option now sets this flag,
1067 calls set_assoc_expand on change
1068 - set_assoc_expand: sets assoc_expand_once to mirror expand_once_flag;
1069 placeholder for future changes
1070
1071 builtins/common.h
1072 - expand_once_flag: extern declaration
1073
1074 5/10
1075 ----
1076 doc/{bash.1,bashref.texi}
1077 - note that case patterns undergo quote removal. Reported by
1078 AlvinSeville7cf <alvinseville7cf@gmail.com>
1079
1080 5/11
1081 ----
1082
1083 builtins/bashgetopt.c
1084 - list_optflags: flags associated with the word corresponding to
1085 list_optarg, assuming list_optarg is a separate argument
1086
1087 builtins/bashgetopt.h
1088 - list_optflags: extern declaration
1089
1090 builtins/set.def
1091 - unset_builtin: set VFLAGS each time through the loop, since we take
1092 whether or not the word has W_ARRAYREF set into account
1093 - unset_builtin: don't pass VA_ALLOWALL to unbind_array_element for
1094 now
1095
1096 test.c
1097 - unary_test: in the -v case, use assoc_expand_once in the first call
1098 to valid_array_reference ()
1099
1100 builtins/printf.def
1101 - printf_builtin: only set VA_ONEWORD if the option argument to -v has
1102 W_ARRAYREF set (look at list_optflags)
1103
1104 5/12
1105 ----
1106
1107 subst.c
1108 - expand_array_subscript: don't quote @ or * in the expanded subscript
1109 at all, even when they are the only character in the subscript. See
1110 how this works out -- it might uncover places where we need to allow
1111 `*' and `@' as subscripts where they are not allowed now
1112
1113 expr.c
1114 - expr_bind_variable: pass ASS_ALLOWALLSUB to bind_int_variable so we
1115 can allow (( A[@]=value )) when A is an existing associative array
1116
1117 arrayfunc.h
1118 - AV_ATSTARKEYS: new flag value, means to accept a[@] and a[*] but
1119 treat them as keys/expressions and not special values
1120
1121 arrayfunc.c
1122 - array_value_internal: check AV_ATSTARKEYS and don't treat them as
1123 ALL_ELEMENT_SUB values; they fall through to use as keys/indices
1124
1125 test.c
1126 - unary_test: if -v is passed an array reference, add AV_ATSTARKEYS to
1127 the flags passed to array_value so we treat @ and * as keys for an
1128 existing associative array
1129
1130 5/13
1131 ----
1132
1133 subst.c
1134 - expand_cond_word: if SPECIAL == 3 (arithmetic expression), dequote the
1135 resulting WORD_LIST * as if special == 0, because we don't want to
1136 quote the list for pattern matching. Report from
1137 Adjudicator Darren <adjudicatordarren@protonmail.com>
1138
1139 5/14
1140 ----
1141 subst.c
1142 - expand_array_subscript: add double quote (") to the list of characters
1143 that are backslash-quoted in subscripts after word expansion.
1144 skipsubscript treats them specially, so you have to quote them to
1145 do things like `key='"' ; array[$key]=1 ; [[ -v array[$key] ]]'
1146
1147 5/16
1148 ----
1149
1150 builtins/wait.def
1151 - wait_builtin: if we longjmp to wait_intr_buf, call unset_waitlist if
1152 we have called set_waitlist (wflags & JWAIT_WAITING). Fixes bug with
1153 wait -n interrupted by a trapped signal (not SIGINT) reported by
1154 Jonas Alfredsson <jonas.alfredsson@protonmail.com>
1155
1156 jobs.c
1157 - wait_sigint_cleanup: restore the old sigint handler before we longjmp
1158 out by calling restore_sigint_handler()
1159
1160 5/17
1161 ----
1162 builtins/read.def
1163 - bind_read_variable: now takes an additional argument, flags to pass
1164 to builtin_bind_variable; change callers
1165 - SET_VFLAGS: set vflags and bindflags
1166 - read_builtin: call SET_VFLAGS to set vflags and bindflags from each
1167 word before calling valid_array_reference and bind_read_variable
1168
1169 builtins/common.c
1170 - builtin_bind_variable: set vflags (for valid_array_reference) and
1171 bindflags (for bind_variable/assign_array_element) separately for
1172 clarity
1173
1174 arrayfunc.c
1175 - assign_array_element: sanity check: make sure that the subscript
1176 returned by array_variable_name consumes the entire NAME, otherwise
1177 flag it as a subscript error. This keeps things like
1178 `KEY=' ]'; read assoc[$KEY] <<< hello' from assigning to incomplete
1179 subscripts
1180
1181 builtins/printf.def
1182 - printf_builtin: if LIST_OPTFLAGS includes W_ARRAYREF, set VA_NOEXPAND
1183 in VFLAGS
1184
1185 5/17
1186 ----
1187
1188 lib/readline/complete.c
1189 - compute_lcd_of_matches: move a couple of strlen calls out of a loop
1190 in calls to mbrtowc; performance improvement only. Report and fix
1191 from sparrowhawk996@gmail.com
1192
1193 lib/readline/bind.c
1194 - rl_trim_arg_from_keyseq: take a key sequence and its length and
1195 return the index into the key sequence following any initial numeric
1196 argument. Return -1 if there is no numeric argument (the caller is
1197 expected to make sure) or if the key sequence consists *only* of
1198 the numeric argument. The caller should use the remainder of the
1199 key sequence to look up the desired key binding.
1200
1201 lib/readline/readline.h
1202 - rl_trim_arg_from_keyseq: extern declaration
1203
1204 bashline.c
1205 - bash_execute_unix_command: if the argument count is > 1 or we have
1206 an explicit argument, call rl_trim_arg_from_keyseq to get past the
1207 numeric argument and deal with the rest of the key sequence. We still
1208 need a way to pass it to the invoked program or function. From
1209 a report from Jesper Nygards <jesper.nygards@gmail.com>
1210
1211 5/18
1212 ----
1213
1214 bashline.c
1215 - bash_execute_unix_command: if the user supplied a numeric argument
1216 when invoking bash_execute_unix_command, pass it to the command in
1217 the READLINE_ARGUMENT variable
1218
1219 lib/readline/readline.[ch]
1220 - _rl_del_executing_keyseq: convenience function to `delete' the last
1221 character added to the executing key sequence. Intended to be used
1222 before calling rl_execute_next or similar functions that push input
1223 back to be re-read
1224
1225 doc/{bash.1,bashref.texi}
1226 - READLINE_ARGUMENT: documented new variable available for commands
1227 defined using `bind -x' keybindings
1228
1229 lib/readline/doc/rltech.texi
1230 - rl_trim_arg_from_keyseq: documented new function
1231
1232 5/19
1233 ----
1234
1235 builtins/evalstring.c
1236 - should_suppress_fork: suppress the fork if we're in a process
1237 substitution subshell, in addition to being a simple command
1238 without redirections. From a report back in 10/2020 from
1239 Hyunho Cho <mug896@gmail.com>
1240
1241 bashline.c
1242 - command_word_completion_function: if we're trying to complete an
1243 absolute program (one containing a slash), don't run strcmp or
1244 strcasecmp on the return value from rl_filename_completion_function,
1245 since that duplicates work the filename completion function already
1246 does. From a report back in 1/2021 by awa54@cdak.net
1247
1248 5/22
1249 ----
1250 parse.y
1251 - CHECK_FOR_RESERVED_WORD: if we are returning an ESAC and unsetting
1252 PST_CASESTMT, decrement esacs_needed_count
1253
1254 parse.y,shell.h
1255 - sh_parser_state_t: save and restore esacs_needed_count and
1256 expecting_in_token in the shell parser state struct and
1257 save_parser_state/restore_parser_state
1258
1259 print_cmd.c
1260 - print_simple_command: don't bother to call command_print_word_list
1261 with an empty list
1262 - print_simple_command: don't print a space before a redirection list
1263 if there weren't any command words to print
1264
1265 5/24
1266 ----
1267
1268 lib/sh/input_avail.c
1269 - nchars_avail: make sure SET and OSET are declared on systems with
1270 select(2). Reported by Larkin Nickle <me@larbob.org>
1271
1272 parse.y
1273 - cond_term: if we read a `!' toggle CMD_INVERT_RETURN instead of
1274 setting it unconditionally. Report and patch from
1275 Vincent Menegaux <vincent.menegaux@gmail.com> via
1276 https://savannah.gnu.org/patch/?10070
1277
1278 5/25
1279 ----
1280 doc/{bash.1,bashref.texi}
1281 - test: add the ( $2 $3 ) case to the description of the four-argument
1282 behavior. Inspired by a discussion with Christoph Anton Mitterer
1283 <calestyo@scientia.net>
1284
1285 5/27
1286 ----
1287 doc/bashref.texi
1288 - replace most of the GNU parallel section with a reference to the
1289 tutorial on gnu.org
1290
1291 lib/glob/glob.h
1292 - GX_NEGATE: new flag; indicates whether the pattern is being negated
1293 as part of an extglob pattern. Not used yet
1294
1295 lib/glob/glob.c
1296 - extglob_skipname,wextglob_skipname: pass GX_NEGATE to the skipname
1297 functions if the pattern is being negated. Not checked yet
1298
1299 5/28
1300 ----
1301 doc/{bash.1,bashref.texi}
1302 - dotglob: add text to clarify that `.' and `..' have to be matched by
1303 a pattern beginning with `.' or -- and this is the sketchy part --
1304 that a pattern beginning with `.' has to be one of the patterns in
1305 an extended glob expression
1306
1307 lib/glob/glob.c
1308 - skipname,wskipname: perform the special checks for `.' only if the
1309 pattern is not being negated
1310
1311 6/3
1312 ---
1313 parse.y,shell.h
1314 - eol_ungetc_lookahead: save and restore as part of the parser state
1315 included in {save,restore}_parser_state
1316
1317 6/7
1318 ---
1319 lib/readline/display.c
1320 - puts_face: make sure to cast each member of STR to unsigned char, so
1321 it's not misinterpreted as EOF, which putc_face does not display.
1322 Report and fix from Volodymyr Prodan <vovcat@gmail.com> in
1323 https://savannah.gnu.org/patch/?10076
1324
1325 examples/shobj-conf
1326 - aix*gcc: change SHOBJ_LD to ${CC}, prefix the SHOBJ_LDFLAGS flags
1327 with -Wl, so gcc will pass them to the linker. Report from
1328 lehel@maxer.hu in https://savannah.gnu.org/support/?110505
1329
1330 6/11
1331 ----
1332 doc/{bash.1,bashref.texi}
1333 - cd: additional arguments are not ignored; they raise an error.
1334 Report from Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
1335
1336 lib/glob/strmatch.h
1337 - FNM_DOTDOT: enable special handling for `.' and `..': if FNM_PERIOD
1338 is not set, `.' and `..' at the start of a string or as a pathname
1339 component need to be matched by a `.' in the pattern and cannot be
1340 matched by `?', `*', or a bracket expression
1341
1342 lib/glob/glob.c
1343 - glob_vector: pass FNM_DOTDOT to strmatch() if noglob_dot_filenames
1344 is not set to enable special handling of `.' and `..'. Prompted by a
1345 discussion with Nora Platiel <nplatiel@gmx.us>
1346 - skipname,wskipname: remove special checks for `.' and (disabled)
1347 checks for `..'
1348
1349 lib/glob/sm_loop.c
1350 - GMATCH: implement special handling for FNM_DOTDOT and `.' and `..':
1351 make sure they can't be matched by any special glob characters at
1352 the start of the string or as a pathname component (if FNM_PATHNAME
1353 is set). This also means that !(pattern) won't return `.' or `..'
1354 if dotglob is set
1355 - GMATCH,EXTMATCH: don't pass FNM_DOTDOT down to recursive calls, like
1356 FNM_PERIOD, once we process the first character in the string or
1357 pathname component
1358
1359 lib/glob/smatch.c
1360 - ISDIRSEP,PATHSEP,SDOT_OR_DOTDOT,PDOT_OR_DOTDOT: provide definitions
1361 for single-byte or wide character strings for sm_loop.c to use
1362
1363 6/16
1364 ----
1365
1366 doc/{bash.1,bashref.texi},lib/readline/doc/{rluser,rltech}.texi
1367 - slight wording changes to rewrite gender-specific language. From a
1368 report by Vipul Kumar <kumar+bug-bash@onenetbeyond.org>, suggested
1369 language from G. Branden Robinson <g.branden.robinson@gmail.com>,
1370 Lawrence Velázquez <vq@larryv.me>,
1371 and Andrew Church <achurch+bash@achurch.org>
1372
1373 builtins/fc.def
1374 - fc_builtin: make sure an entry in the history list is non-null
1375 before trying to write it to stdout or the temporary file. From a
1376 report from Sibo Dong <sibo.dong@outlook.com>
1377
1378 builtins/common.[ch]
1379 - builtin_arrayref_flags: given a WORD_DESC * (which includes flags)
1380 and a base set of flags, return a set of flags to pass to
1381 valid_array_reference and similar functions
1382
1383 builtins/set.def
1384 - unset_builtin: call builtin_arrayref_flags to set vflags
1385
1386 6/19
1387 ----
1388
1389 parse.y
1390 - parse_comsub: rewrite to recursively call the parser (yyparse()) and
1391 return a string constructed from the resulting parse tree. Probably
1392 will only work with bison. Error reporting is more accurate about
1393 line numbers and invalid tokens, and command substitution errors
1394 are caught earlier, before expansion
1395 - DOLPAREN: new token, never created by yylex; only ever set by
1396 parse_comsub and xparse_dolparen to indicate we're recursively
1397 calling the parser for a command substitution
1398 - comsub: new grammar production that's triggered by DOLPAREN and
1399 parses a command substitution, returning a <command>. It's one of
1400 the possible end states for the top-level parser
1401 - grammar: only call rewind_input_string if the shell's input is
1402 coming from a string
1403 - shell_ungets: push a string back onto the shell input; only used by
1404 make_here_document for backwards compatibility -- allowing a here-
1405 document to be terminated by a token at the end of a command
1406 substitution
1407 - yylex: don't need any more special handling when returning
1408 shell_eof_token, but we keep the clause for future work
1409 - read_token_word: don't handle backslashes (leave them in the input
1410 stream) if we are reading a command substitution (PST_NOEXPAND)
1411 - reserved_word_acceptable: allow reserved words after DOLPAREN
1412 - report_syntax_error: better error handling if we hit EOF while
1413 looking for the ending right paren in a command substitution
1414 - parse_string_to_word_list,parse_compound_assignment: make sure to
1415 turn off parse_comsub sentinel temporarily
1416
1417 make_cmd.c
1418 - make_here_document: backwards compatibility: if we end a here
1419 document on the same line as the end of a command substitution,
1420 allow the token to terminate the here document (without requiring
1421 a newline) and push the remainder of the line back for the parser
1422 to consume and terminate the command substitution
1423
1424 builtins/evalstring.c
1425 - parse_string: if we read shell_eof_token and use it to terminate a
1426 command, rewind the input string here before returning, instead of
1427 guessing where to rewind it in the caller
1428
1429 6/22
1430 ----
1431
1432 redir.c
1433 - do_redirection_internal: if VARASSIGN_REDIR_AUTOCLOSE is non-zero,
1434 add a redirect to automatically close {var}<fn and other styles of
1435 varassign redirection. It's zero by default
1436
1437 builtins/shopt.def
1438 - varredir_close: new shell option, mirrors the value of
1439 varassign_redir_autoclose. Suggested multiple times by multiple
1440 people
1441
1442 doc/{bash.1,bashref.texi}
1443 - varredir_close: document new shell option (the name is tentative)
1444
1445 6/24
1446 ----
1447
1448 parse.y
1449 - yylex: if read_token returns a value < 0, return YYerror to the
1450 parser
1451 - parse_comsub: if the current_token is not shell_eof_token when
1452 yyparse returns, return an error to read_token_word instead of
1453 trying to keep parsing. Fixes interactive-only (?) bug reported by
1454 Koichi Murase <myoga.murase@gmail.com>
1455
1456 parser.h
1457 - PST_NOERROR: don't print error messages in yyerror(), just reset
1458 the parser and return
1459
1460 parse.y
1461 - yyerror: if parser_state & PST_NOERROR, don't print an error message
1462 - xparse_dolparen: if the flags includes SX_COMPLETE, add PST_NOERROR
1463 to parser_state, to inhibit error messages. Fixes bug with adding
1464 lines with incomplete command substitutions to the history list
1465 reported by Koichi Murase <myoga.murase@gmail.com>
1466
1467 subst.c
1468 - skip_matched_pair: make sure to pass the SX_COMPLETE flag to
1469 extract_delimited_string
1470
1471 6/28
1472 ----
1473
1474 lib/readline/bind.c
1475 - rl_trim_arg_from_keyseq: handle rl_vi_arg_digit if VI_MODE is
1476 defined. Report and fix from Koichi Murase <myoga.murase@gmail.com>
1477 - rl_trim_arg_from_keyseq: rework to handle case where the digit
1478 argument is given as a discrete sequence of multiple rl_digit_argument
1479 commands (e.g, "M-1 M-2" instead of "M-1 2"). Report and fix from
1480 Koichi Murase <myoga.murase@gmail.com>
1481
1482 subst.c
1483 - pat_subst: avoid calling RESIZE_MALLOCED_BUFFER with STRLEN(s) as an
1484 argument, since it ends up going into a loop. Report and fix from
1485 Koichi Murase <myoga.murase@gmail.com>
1486
1487 lib/sh/casemod.c
1488 - cval: take the string length as an argument, to avoid having to call
1489 strlen every time (in HANDLE_MULTIBYTE mode). The caller already has
1490 this info. Report and fix from Koichi Murase <myoga.murase@gmail.com>
1491
1492 builtins/complete.def
1493 - print_cmd_name: single-quote the command name if it contains any
1494 shell metacharacters
1495 - print_one_completion: call print_arg with a second arg of 1 if the
1496 function name contains shell metacharacters. Report and fix from
1497 Koichi Murase <myoga.murase@gmail.com>
1498
1499 6/30
1500 ----
1501
1502 configure.ac
1503 - substitute BASE_CFLAGS_FOR_BUILD and STYLE_CFLAGS into Makefile
1504 targets
1505 - take STYLE_CFLAGS out of the CFLAGS_FOR_BUILD variable that gets
1506 substituted
1507 - remove STYLE_CFLAGS from CFLAGS
1508 - use `:+' expansion to set variables based on whether $GCC is set
1509 or null, since configure can do GCC=
1510
1511 support/Makefile.in
1512 - man2html: remove CCFLAGS_FOR_BUILD from the recipe, leaving only
1513 LDFLAGS_FOR_BUILD. Report from Jay K <jayk123@hotmail.com>
1514 - gen-helpfiles: remove CCFLAGS_FOR_BUILD from the recipe, leaving
1515 only LDFLAGS_FOR_BUILD
1516 - man2html: use $(STYLE_CFLAGS) in BASE_CCFLAGS variable for C file
1517 compilation options
1518
1519 {,builtins}/Makefile.in, lib/{sh,readline,malloc,glob}/Makefile.in
1520 - use STYLE_CFLAGS so specifying CFLAGS=-g to make doesn't clutter the
1521 output with warnings about parens and format strings
1522
1523 7/9
1524 ---
1525 lib/readline/search.c
1526 - make_history_line_current: call _rl_free_saved_history_line to clean
1527 up _rl_saved_line_from_history and get all the code that frees it
1528 into one place
1529
1530 lib/readline/misc.c
1531 - _rl_free_saved_history_line: if rl_undo_list points to the data
1532 member of _rl_saved_line_from_history, set it to NULL to avoid having
1533 it point to freed memory, since the next thing we do now is to free
1534 the undo list the data member points to
1535 - _rl_start_using_history: call _rl_free_saved_history_line instead of
1536 calling _rl_free_history_entry directly. Fixes memory leak reported
1537 by Trung Dam <trungdam@yahoo.com>
1538
1539 7/12
1540 ----
1541 lib/readline/search.c
1542 - make_history_line_current: free rl_undo_list before replacing the
1543 current line with the line from history, since it is a private
1544 undo list from reading the search string
1545
1546 lib/readline/rlmbutil.h
1547 - Since wchar_t/mbrtowc/wcrtomb are limited to 16 bits on Windows
1548 with MSVC, start abstracting the differences using WCHAR_T/
1549 MBRTOWC/WCRTOMB
1550
1551 7/13
1552 ----
1553
1554 lib/readline/{complete,display,input,text,util,vi_mode}.c
1555 - use WCHAR_T/MBRTOWC/WCRTOMB. Part of a set of Windows MSVC fixes
1556 from sparrowhawk996@gmail.com
1557
1558 builtins/{enable,hash,help}.def
1559 - enable_builtin: use sh_chkwrite after output to check for write errors
1560
1561 7/16
1562 ----
1563 arrayfunc.c
1564 - quote_compound_array_word: free SUB and VALUE after assigning from
1565 sh_single_quote(). From a coverity report from
1566 Siteshwar Vashisht <svashisht@redhat.com>
1567
1568 bashhist.c
1569 - bash_remove_history_range: free DISCARD_LIST after freeing its
1570 elements
1571
1572 bashline.c
1573 - bash_directory_expansion: add code to free D as a separate branch,
1574 though it's never hit in practice
1575
1576 builtins/trap.def
1577 - showtrap: free T even if show_default == 1 if it's a non-default
1578 trap string
1579
1580 7/17
1581 ----
1582 execute_cmd.c
1583 - execute_coproc: free NAME on invalid identifier error
1584
1585 lib/glob/glob.c
1586 - glob_vector: make sure NEXTLINK is allocated using malloc before
1587 passing it to free()
1588 - glob_filename: free RESULT before returning glob_error_return when
1589 there is only a filename
1590
1591 print_cmd.c
1592 - indirection_level_string: make sure we free PS4 after calling
1593 decode_prompt_string if *ps4 == 0
1594
1595 subst.c
1596 - parameter_brace_transform: if vtype == VT_VARIABLE, we need to free
1597 a non-null VAL
1598
1599 variables.c
1600 - assign_in_env: if NAME is not a valid shell identifier, free it
1601 after printing the error message and before returning. These are
1602 the rest of the fixes from Siteshwar Vashisht <svashisht@redhat.com>
1603
1604 7/22
1605 ----
1606 shell.c
1607 - main: set dollar_vars[0] to shell_script_filename before calling
1608 run_startup_files() in the non-interactive case. Restore it after
1609 run_startup_files returns so we can get better error messages if
1610 we can't open a script file. Suggested by several people, originally
1611 by Marc Aurèle La France <tsi@tuyoix.net> back in 2/2021 (in a
1612 different form) and most recently by Tapani Tarvainen
1613 <bash@tapanitarvainen.fi>
1614
1615 7/28
1616 ----
1617 trap.c
1618 - any_signals_trapped: return that a signal is trapped only if it's
1619 not ignored. This is an additional opportunity for optimization,
1620 reported in https://bugzilla.redhat.com/show_bug.cgi?id=1981926
1621
1622 7/30
1623 ----
1624 examples/loadables/sleep.c
1625 - main: if the uconvert conversion fails, but the argument appears to
1626 contain a GNU-like interval specifier like "1m30s", return
1627 EX_DISKFALLBACK so the execute_builtin code tries to run the
1628 external version
1629
1630 builtins/enable.def
1631 - enable_shell_builtin: if the builtin isn't found, return EX_NOTFOUND
1632 to allow the caller (enable_builtin) to react differently if it
1633 wants to
1634 - dyn_load_builtin: if the shared object isn't found, return EX_NOTFOUND,
1635 change enable_builtin to deal with it
1636 - enable_builtin: if there are no supplied options, and we attempt to
1637 enable a non-existent builtin, try modifying `enable name' to the
1638 equivalent of `enable -f name name' and return success if we
1639 successfully load a builtin from a shared object. Proposed several
1640 times, most recently by Robert Elz <kre@munnari.OZ.AU>
1641
1642 doc/{bash.1,bashref.texi}
1643 - enable: document new behavior of `enable NAME' when NAME is not a
1644 current shell builtin
1645
1646 8/3
1647 ---
1648 lib/glob/sm_loop.c
1649 - GMATCH: check for interrupts or terminating signals each time through
1650 the loop and return FNM_NOMATCH immediately if received. Let the
1651 higher layers deal with interrupting the match and jumping out.
1652 Inspired by a report from andrej@podzimek.org
1653
1654 8/6
1655 ---
1656 subst.c
1657 - {parameter_brace_remove_pattern,parameter_brace_transform,
1658 parameter_brace_substring,parameter_brace_casemod,
1659 parameter_brace_patsub}: make sure the IND argument is of type
1660 arrayind_t to handle the full range of subscripts. Reported by
1661 felix@f-hauri.ch
1662
1663 builtins/printf.def
1664 - printf_builtin: take new format specifier: %Q. This acts like %q
1665 but applies any supplied precision to the original unquoted
1666 argument, then quotes that result and outputs the entire quoted
1667 string, preserving the original field width. Originally suggested
1668 back in 4/2020 by Sam Liddicott <sam@liddicott.com>
1669
1670 subst.c
1671 - char_is_quoted: check whether or not we are on the second or later
1672 line of a command with an unclosed quoted string from a previous
1673 line. If we are, see if it's closed before the character we're
1674 checking, so we don't interpret a closing quote as starting a new
1675 quoted string. Reported several times, most recently by
1676 Phi Debian <phi.debian@gmail.com> in 6/2021.
1677
1678 8/9
1679 ---
1680 parse.y,subst.c
1681 - locale_expand: if the variable SINGLEQUOTE_TRANSLATIONS is non-zero,
1682 single-quote the translated result of $"..." (if it's different from
1683 the untranslated string)
1684
1685 builtins/shopt.def
1686 - noexpand_translation: new option to expose the value of
1687 SINGLEQUOTE_TRANSLATIONS
1688
1689 8/10
1690 ----
1691 doc/{bash.1,bashref.texi}
1692 - noexpand_translation: add description of new option
1693
1694 8/16
1695 ----
1696 builtins/printf.def
1697 - printf_builtin: initialize retval after parsing arguments, since we
1698 use it for the `v' option. Bug report from Keith Thompson
1699 <Keith.S.Thompson@gmail.com>
1700
1701 lib/sh/unicode.c
1702 - u32tocesc: fix typo that returned \uXXXXXXXX instead of \UXXXXXXXX.
1703 From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992257 by
1704 <nabijaczleweli@nabijaczleweli.xyz>
1705
1706 8/17
1707 ----
1708 siglist.c
1709 - include command.h before general.h for PARAMS and prototypes. Report
1710 from Osipov, Michael (LDA IT PLM) <michael.osipov@siemens.com>
1711
1712 8/18
1713 ----
1714 lib/readline/colors.c
1715 - S_ISBLK: make sure it's defined before we use it, like in complete.c
1716
1717 lib/readline/complete.c,{bashline,variables}.c
1718 - minor changes to prep for making rl_completer_word_break_characters
1719 `const'
1720
1721 subst.[ch],pcomplete.c
1722 - split_at_delims: the DELIMS argument is now `const'; change callers
1723
1724 lib/readline/rlmbutil.h
1725 - _rl_wcwidth: add function prototype for inline function declaration
1726
1727 lib/readline/bind.c
1728 - _rl_get_keyname: print keys greater than 160 (which are valid UTF-8)
1729 as octal escape sequences
1730
1731 lib/readline/text.c
1732 - do_lowercase_version: return 99999 to prevent the linker from
1733 combining it with _rl_null_function and optimizing away the separate
1734 copy. That messes with function pointer comparisons. Part of this
1735 batch of fixes from sparrowhawk996@gmail.com
1736
1737 8/19
1738 ----
1739 complete.c,readline.c,readline.h
1740 - rl_completer_word_break_characters: now const char * like
1741 rl_basic_word_break_characters; element of readline state struct
1742 used to save it also const. THIS IS AN API CHANGE
1743
1744 bashline.c
1745 - orig_rl_completer_word_break_characters: now const char * like
1746 rl_completer_word_break_characters
1747
1748 8/20
1749 ----
1750 bashline.c
1751 - bash_directory_completion_hook: if direxpand and dirspell are both
1752 set while trying to complete an absolute pathname as a command, don't
1753 take a spell-corrected directory name that is shorter than the
1754 original hint. https://bugzilla.redhat.com/show_bug.cgi?id=1782809
1755
1756 builtins/common.[ch]
1757 - sh_noassign: convenience function to print an error message when a
1758 user attempts an assignment to a "noassign" variable. Not used yet
1759
1760 assoc.[ch]
1761 - assoc_to_kvpair_list: new function, returns a WORD_LIST containing
1762 key-value pairs as separate words
1763
1764 array.[ch]
1765 - array_to_kvpair_list: new function, returns a WORD_LIST containing
1766 index-value pairs as separate words
1767
1768 subst.c
1769 - string_transform: handle '@k' transform like '@K'
1770 - valid_parameter_transform: 'k' is a valid transform operator
1771 - array_transform: handle '@k' transformation by calling one of
1772 array_to_kvpair_list or assoc_to_kvpair_list and treating the
1773 result as if expanding the array depending on whether the index is
1774 `@' or `*' with the usual meanings
1775
1776 doc/{bash.1,bashref.texi}
1777 - document new '@k' parameter transformation operator
1778
1779 8/27
1780 ----
1781 lib/readline/kill.c
1782 - rl_unix_filename_rubout: handle pathnames that consist only of one
1783 or more slashes. The old code went too far and deleted the previous
1784 word as well. From dabe@dabe.com
1785
1786 8/31
1787 ----
1788 parse.y
1789 - STRING_SAVER: now save and restore shell_input_line_len; not sure
1790 why it wasn't done before; fix push_string and pop_string accordingly
1791 - prompt_again: now takes a parameter FORCE; not used yet (every
1792 caller passes 0), needs more thought
1793
1794 builtins/evalstring.h
1795 - open_redir_file: broke code that expands the redirection and opens
1796 the resultant filename into a new function, called from cat_file
1797
1798 redir.h
1799 - open_redir_file: extern declaration here for now
1800
1801 builtins/evalstring.c
1802 - parse_string: takes a new argument: COMMAND **cmdp; if non-null, saves
1803 the parsed command to *cmdp and lets the caller manage it itself.
1804 global_command is still not modified. Changed callers in parse.y
1805
1806 9/1
1807 ---
1808 parse.y
1809 - parse_string_to_command: stripped-down version of xparse_dolparen
1810 that takes a string, runs it through the parser, and returns the
1811 resultant COMMAND *; uses parse_string with the new argument
1812
1813 externs.h
1814 - parse_string_to_command: extern declaration
1815
1816 builtins/evalstring.c
1817 - can_optimize_cat_file: new function, takes a COMMAND * argument and
1818 returns true if the command can be optimized like $(<file); changed
1819 parse_and_execute to call it
1820
1821 subst.c
1822 - optimize_cat_file: new function, optimizes $(<file) without creating
1823 a new process. Uses redir_open to open the redirection file, after
1824 expansion, and calls read_comsub to read from it directly
1825 - read_comsub: now reads into a 4096 byte buffer (COMSUB_PIPEBUF)
1826 - command_substitute: if the string begins with a `<' and isn't followed
1827 by any of "<>&", see if we can optimize the command and call
1828 optimize_cat_file to do it if we can.
1829
1830 9/2
1831 ---
1832 configure.ac,config.h.in,lib/sh/setlinebuf.c
1833 - SETVBUF_REVERSED: remove all references
1834
1835 configure.ac,aclocal.m4
1836 - AC_OUTPUT: move created files and commands to AC_CONFIG_FILES and
1837 AC_CONFIG_COMMANDS; call AC_OUTPUT without any arguments
1838 - require autoconf version 2.63
1839 - AC_HELP_STRING -> AS_HELP_STRING
1840 - replace references to $ac_cv_prog_gcc with $GCC
1841 - AC_C_LONG_DOUBLE -> AC_TYPE_LONG_DOUBLE
1842 - enable-alt-array-implementation: new configure option, placeholder
1843 for later
1844
1845 unwind_prot.c
1846 - stddef.h: include if HAVE_STDDEF_H is defined, not STDC_HEADERS
1847
1848 bashansi.h
1849 - memory.h: don't include any more; assume <string.h> has all the
1850 necessary defines
1851
1852 aclocal.m4
1853 - AC_HEADER_STDC: remove AC_REQUIRE calls to this; change tests to use
1854 appropriate checks instead of STDC_HEADERS
1855
1856 9/3
1857 ---
1858 configure.ac,config.h.in
1859 - AC_TYPE_SIGNAL,BASH_TYPE_SIGHANDLER: remove calls, remove mention of
1860 RETSIGTYPE and VOID_SIGHANDLER
1861 - AC_USE_SYSTEM_EXTENSIONS: use this instead of AC_ISC_POSIX (which is
1862 well and truly obsolete) and AC_MINIX (which just calls it anyway).
1863 All the right defines are already present
1864 - AC_HEADER_TIME: removed
1865 - AC_HEADER_STDC: removed
1866 - AC_DECL_SYS_SIGLIST: replaced with BASH_DECL_SYS_SIGLIST
1867 - BASH_FUNC_CTYPE_NONASCII: removed
1868
1869 sig.h,lib/readline/signals.c
1870 - RETSIGTYPE -> void, SIGHANDLER_RETURN -> return
1871
1872 include/posixtime.h
1873 - don't bother with TIME_WITH_SYS_TIME, just include <sys/times.h> if
1874 we have it and include <time.h> unconditionally
1875
1876 include/chartypes.h,lib/readline/chardefs.h
1877 - IN_CTYPE_DOMAIN: no longer uses STDC_HEADERS define, checks against
1878 CHAR_MAX for non-C89 systems, still a no-op on C89 systems
1879
1880 lib/readline/chardefs.h
1881 - memory.h: don't include, no need for STDC_HEADERS; assume the mem*
1882 functions are defined in <string.h> as in C89
1883 - now that we assume IN_CTYPE_DOMAIN bounds its argument to unsigned
1884 chars, we don't need NON_NEGATIVE checks at all
1885
1886 lib/readline/chardefs.h,util.c
1887 - ALPHABETIC -> _rl_alphabetic_p
1888
1889 9/8
1890 ---
1891
1892 lib/sh/strftime.c
1893 - include <posixtime.h> after reworking above; include <sys/types.h>
1894 unconditionally in case it defines time_t. From a report by
1895 Ori Sky Farrell <bash@ori.mx>
1896
1897 9/9
1898 ---
1899 lib/readline/search.c
1900 - rl_history_search_internal: set rl_undo_list to NULL after calling
1901 rl_maybe_save_line, since it will be restored one way or another
1902 after the search completes, and we don't want it to be freed twice
1903 - rl_history_search_internal: leave the current history offset at the
1904 position of the last matching history entry. This means that things
1905 like ^P will start back from that history entry, ^N will move
1906 forward from there, and operate-and-get-next will work like it does
1907 with incremental searches. Reported by Vandrus Zoltán
1908 <vandrus.zoltan@gmail.com>
1909
1910 9/10
1911 ----
1912 aclocal.m4
1913 - BASH_C_LONG_LONG: removed
1914 - BASH_TYPE_LONG_DOUBLE: removed
1915 - BASH_TYPE_LONG_LONG,BASH_TYPE_UNSIGNED_LONG_LONG: removed
1916 - BASH_FUNC_CTYPE_NONASCII: removed
1917 - BASH_SYS_SIGNAL_VINTAGE,BASH_SYS_REINSTALL_SIGHANDLERS: don't
1918 require AC_TYPE_SIGNAL, use void instead of RETSIGTYPE
1919 - BASH_TYPE_SIGHANDLER: removed
1920
1921 configure.ac,aclocal.m4,config.h.in
1922 - BASH_TYPE_LONG_LONG: removed, call AC_TYPE_LONG_LONG_INT directly,
1923 change #define to HAVE_LONG_LONG_INT
1924 - BASH_TYPE_UNSIGNED_LONG_LONG: removed, call AC_TYPE_UNSIGNED_LONG_LONG_INT
1925 directly, change #define to HAVE_UNSIGNED_LONG_LONG_INT
1926
1927 externs.h,include/typemax.h,lib/sh/{fmtullong,snprintf,strtoimax,strtoll,
1928 strtoull,strtoumax}.c
1929 - HAVE_LONG_LONG -> HAVE_LONG_LONG_INT
1930 - HAVE_UNSIGNED_LONG_LONG -> HAVE_UNSIGNED_LONG_LONG_INT
1931
1932 configure.ac
1933 - AC_TRY_COMPILE -> AC_COMPILE_IFELSE
1934 - BASH_CHECK_TYPE (intmax_t) -> AC_TYPE_INTMAX_T
1935 - BASH_CHECK_TYPE (uintmax_t) -> AC_TYPE_UINTMAX_T
1936 - BASH_CHECK_TYPE (sig_atomic_t): removed
1937
1938 aclocal.m4
1939 - BASH_FUNC_STRSIGNAL: changed to use AC_LINK_IFELSE
1940 - BASH_FUNC_LSTAT: changed to use AC_LINK_IFELSE
1941 - BASH_FUNC_SBRK: changed to use AC_LINK_IFELSE and AC_RUN_IFELSE,
1942 fixed typo
1943 - BASH_CHECK_SPEED_T: changed to use AC_COMPILE_IFELSE
1944 - BASH_TYPE_SIG_ATOMIC_T: use BASH_CHECK_TYPE instead of AC_CHECK_TYPE
1945 - BASH_STRUCT_DIRENT: new macro, like _AC_STRUCT_DIRENT but public and
1946 sets a different bash-specific shell variable
1947 - BASH_STRUCT_DIRENT_D_{INO,FILENO,NAMLEN}: call BASH_STRUCT_DIRENT
1948 with a different first argument instead of using inline code and
1949 AC_TRY_COMPILE
1950
1951 9/11
1952 ----
1953 [prayers for the victims of 9/11/2001]
1954
1955 aclocal.m4
1956 - BASH_CHECK_DECL: just call AC_CHECK_DECLS and use the default
1957 includes, which includes the files we used to specify
1958 - BASH_FUNC_INET_ATON: changed to use AC_LINK_IFELSE
1959 - BASH_STRUCT_WEXITSTATUS_OFFSET: changed to use AC_RUN_IFELSE
1960 - BASH_FUNC_OPENDIR_CHECK: changed to use AC_RUN_IFELSE
1961 - BASH_FUNC_ULIMIT_MAXFDS: changed to use AC_RUN_IFELSE
1962 - BASH_UNDER_SYS_SIGLIST: changed to use AC_RUN_IFELSE
1963 - BASH_SYS_SIGLIST: changed to use AC_RUN_IFELSE
1964 - BASH_FUNC_DUP2_CLOEXEC_CHECK: changed to use AC_RUN_IFELSE
1965 - BASH_FUNC_GETENV: changed to use AC_RUN_IFELSE
1966 - BASH_FUNC_GETCWD: changed to use AC_RUN_IFELSE
1967 - BASH_FUNC_FNMATCH_EXTMATCH: changed to use AC_RUN_IFELSE
1968 - BASH_FUNC_POSIX_SETJMP: changed to use AC_RUN_IFELSE
1969 - BASH_FUNC_STRCOLL: changed to use AC_RUN_IFELSE
1970 - BASH_FUNC_PRINTF_A_FORMAT: changed to use AC_RUN_IFELSE
1971 - BASH_SYS_PGRP_SYNC: changed to use AC_RUN_IFELSE
1972 - BASH_SYS_SIGNAL_VINTAGE: changed to use AC_RUN_IFELSE
1973 - BASH_SYS_NAMED_PIPES: changed to use AC_RUN_IFELSE
1974 - BASH_CHECK_RTSIGS: changed to use AC_RUN_IFELSE
1975 - BASH_CHECK_MULTIBYTE: changed to use AC_RUN_IFELSE
1976 - RL_LIB_READLINE_VERSION: changed to use AC_RUN_IFELSE
1977 - BASH_CHECK_WCONTINUED: changed to use AC_RUN_IFELSE
1978 - BASH_FUNC_SNPRINTF: changed to use AC_RUN_IFELSE
1979 - BASH_FUNC_VSNPRINTF: changed to use AC_RUN_IFELSE
1980 - BASH_FUNC_FNMATCH_EQUIV_FALLBACK: changed to use AC_RUN_IFELSE
1981 - BASH_DECL_PRINTF: changed to use AC_RUN_IFELSE
1982 - BASH_TYPE_RLIMIT: rewrote to avoid quad_t, now uses AC_COMPILE_IFELSE
1983 to determine whether rlim_t is available, otherwise determines the
1984 value of RLIMTYPE based on sizeof(rlim.rlim_cur): int, long, or
1985 long long
1986 - BASH_SIZEOF_RLIMIT,BASH_SIZEOF_QUAD_T: helper macros for
1987 BASH_TYPE_RLIMIT in the case that rlim_t is not present
1988
1989 configure.ac
1990 - BASH_CHECK_DECL -> AC_CHECK_DECLS
1991 - quad_t: use AC_CHECK_TYPE (new style) instead of BASH_CHECK_TYPE
1992
1993
1994 9/14
1995 ----
1996 execute_cmd.c
1997 - time_command: if we longjmp back to the top_level we saved, make sure
1998 we're in the same subshell environment before printing the timing
1999 stats. We could have longjmped back from a child process of the
2000 command or pipeline we want to time. From a report by
2001 Sergej Alikov <sergej@alikov.com>
2002 - time_command: restore command->flags even if we longjmp back
2003
2004 general.c
2005 - check_binary_file: if the first line of the ENOEXEC file starts with
2006 a `#!', check the rest of the buffer for NULs to determine whether
2007 this is a binary file. Since we only check the first line, a #! line
2008 followed by binary data could be confused for a shell script
2009
2010 9/16
2011 ----
2012 bashjmp.h
2013 - EXITBLTIN: new longjmp `code' value: used by the exit builtin
2014
2015 {execute_cmd,shell,subst,trap}.c,builtins/evalstring.c
2016 - treat EXITBLTIN exactly the same as EXITPROG (for now)
2017
2018 builtins/exit.def
2019 - exit_builtin: jump_to_top_level with value EXITBLTIN
2020
2021 builtins/evalstring.c
2022 - parse_and_execute: EXITBLTIN has its own case, with the same contents
2023 as EXITPROG
2024
2025 9/17
2026 ----
2027 builtins/evalstring.c
2028 - parse_and_execute: change EXITBLTIN case to avoid running the
2029 unwind-protect stack to the `pe_dispose' tag (which has the effect
2030 of running all the unwind-protects installed by the commands in
2031 the string) if we're executing in a function and EXIT is trapped.
2032 This has the effect of running the EXIT trap in the function context,
2033 which is what we do when we're not in parse_and_execute (eval,
2034 bash -c, command substitution, etc.)
2035
2036 9/18
2037 ----
2038 arrayfunc.c
2039 - expand_and_quote_kvpair_word,quote_compound_array_word,
2040 expand_and_quote_assoc_word,quote_compound_array_list: make sure
2041 the value has CTLESC characters doubled even when being single-
2042 quoted, since that's what the parser does with standalone assignment
2043 statements. From https://savannah.gnu.org/support/?110538
2044
2045 9/19
2046 ----
2047 aclocal.m4
2048 - AC_TRY_COMPILE -> AC_COMPILE_IFELSE (AC_TRY_LINK calls left to
2049 modify to avoid obsolete warnings)
2050 - BASH_STRUCT_WINSIZE: broke out checks for separate headers into new
2051 macros, call them and work with the results; needed to avoid two
2052 calls to AC_TRY_COMPILE
2053 - BASH_CHECK_KERNEL_RLIMIT: avoid multiple calls to AC_TRY_COMPILE by
2054 breaking basic test for RLIMIT_ defines into a separate test and
2055 calling the HPUX-specific _KERNEL test only if that fails
2056
2057 m4/gettext.m4,configure.ac
2058 - AM_GNU_GETTEXT -> BASH_GNU_GETTEXT: remove deprecation warning, since
2059 [no-libtool] is how we use this; rename to avoid someone's local
2060 copy from overriding ours
2061
2062 9/20
2063 ----
2064 aclocal.m4
2065 - BASH_CHECK_MULTIBYTE: take out code that checks for nl_langinfo(CODESET)
2066 since that's already provided by AM_LANGINFO_CODESET, which is
2067 called by BASH_GNU_GETTEXT. We AC_REQUIRE it here, though, to avoid
2068 problems from future changes
2069 - BASH_SYS_SIGNAL_VINTAGE: broke the code that checks for the different
2070 signal vintages into different AC_DEFUNed macros, changed
2071 BASH_SYS_SIGNAL_VINTAGE to stitch them together with shell code
2072 testing the cached variables
2073 - AC_TRY_LINK -> AC_LINK_IFELSE: there are no more autoconf warnings
2074
2075 9/21
2076 ----
2077 array.[ch]
2078 - array_from_argv: new convenience function
2079
2080 array.h
2081 - num_elements: now an arrayind_t, since that's the type of indices, it
2082 makes sense to allow that many elements
2083
2084 9/22
2085 ----
2086 lib/readline/terminal.c
2087 - rl_term_kP: fix typo. Fix from Koichi Murase <myoga.murase@gmail.com>
2088
2089 9/25
2090 ----
2091 lib/readline/display.c
2092 - rl_clear_visible_line: call _rl_clear_to_eol with _rl_screenwidth as
2093 the argument so we clear out the entire line even if the terminal
2094 doesn't have a clear-to-eol sequence; make sure to add a call to
2095 rl_cr after that so we know we're always in column 0
2096 - _rl_redisplay_after_sigwinch: just call rl_clear_visible_line instead
2097 of erasing the last line of the display
2098 - _rl_redisplay_after_sigwinch: if the prompt is longer than the screen
2099 width, make sure to call _rl_reset_prompt to recalculate the
2100 local_prompt_newlines array. Should fix issue from
2101 https://savannah.gnu.org/support/index.php?110543
2102
2103 redir.c
2104 - do_redirection_internal: if given [N]<&WORD- or [N]>&WORD- and WORD
2105 expands to null, make it identical to <&- or >&- and close file
2106 descriptor N (default 0). From a discussion back in 5/2021
2107
2108 9/27
2109 ----
2110 arrayfunc.c
2111 - expand_compound_array_assignment: since we run the string through
2112 the parser to turn it into a list (so we can make sure all shell
2113 metacharacters are properly quoted), we need to remove the CTLESC
2114 the parser uses to quote CTLESC and CTLNUL in *unquoted* words.
2115 The rest of the code assumes this has been done, and assumes that
2116 any CTLESC characters passed to expansion are part of the original
2117 word and should themselves be quoted, doubling the number of CTLESCs
2118
2119 9/28
2120 ----
2121 arrayfunc.c
2122 - expand_and_quote_kvpair_word,quote_compound_array_word,
2123 expand_and_quote_assoc_word,quote_compound_array_list: if we are
2124 single-quoting associative array subscripts and associative and
2125 indexed array values, we need to quote CTLESC characters, because
2126 that's how they come out of the parser and how the assignment
2127 statement code expects to see them.
2128 Fixes https://savannah.gnu.org/support/index.php?110538
2129
2130 9/29
2131 ----
2132 subst.c
2133 - parameter_brace_transform: invalid transformation operators are now
2134 fatal errors in non-interactive shells, as with the other word
2135 expansions. Reported by Martin Schulte <gnu@schrader-schulte.de> in
2136 https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00026.html
2137
2138 execute_cmd.c
2139 - execute_disk_command: if we're optimizing out the fork (nofork) and
2140 not directly in a pipeline (pipe_in == pipe_out == NO_PIPE), only
2141 modify shell_level if subshell_environment says we're not already in
2142 a pipeline. Reported by Paul Smith <psmith@gnu.org> 10/11/2020
2143 against GNU make
2144
2145 evalstring.c
2146 - should_suppress_fork: remove #if 1 for code that tries to suppress
2147 the fork in a process substitution subshell
2148
2149 9/30
2150 ----
2151 builtins/mapfile.def
2152 - do_chop: make sure we're comparing unsigned chars when checking
2153 whether the delim is the last character on the line. Reported by
2154 Greg Wooledge <greg@wooledge.org>
2155
2156 10/1
2157 ----
2158 lib/readline/rltty.c
2159 - rl_deprep_terminal: if we're not echoing to the terminal
2160 (_rl_echoing_p == 0), and we just output the bracketed paste end
2161 sequence, output a newline to compensate for the \r at the end of
2162 BRACK_PASTE_FINI, since redisplay didn't do it for us. Reported by
2163 Siteshwar Vashisht <svashisht@redhat.com>
2164
2165 shell.h
2166 - MATCH_EXPREP: new matching flag, understood only by pattern
2167 substitution; means to expand unquoted `&' in the replacement
2168 STRING to the match of PATTERN
2169
2170 subst.c
2171 - shouldexp_replacement: uncommented
2172 - pat_subst: we expand & in the replacement string if MATCH_EXPREP
2173 appears in MFLAGS
2174 - parameter_brace_patsub: push call to shouldexp_replacement out here,
2175 after the replacement string is expanded; set MATCH_EXPREP if there
2176 is an unquoted `&' (by backslash) in the expanded replacement
2177 string
2178
2179 doc/{bash.1,bashref.texi}
2180 - pattern substitution: overhauled the description, moved each of the
2181 possible forms to be tags in the tagged paragraph. The description
2182 now specifies the expansions that the replacement string undergoes
2183 - pattern substitution: documented new behavior of unquoted & in the
2184 replacement string
2185
2186 10/4
2187 ----
2188 shell.c
2189 - include <malloc/shmalloc.h> if we're debugging malloc (MALLOC_DEBUG)
2190 so we can get an extern declaration of trace_malloc_stats
2191
2192 10/5
2193 ----
2194 subst.c
2195 - expand_subscript_string: allocate new memory for td.word, copying
2196 STRING, in case it gets freed on error by expand_word_internal.
2197 Report and fix from Koichi Murase <myoga.murase@gmail.com>
2198
2199 lib/malloc/malloc.c
2200 - malloc_usable_size: return the allocated size instead of the chunk
2201 size, since writing over the bounds checking will cause fatal errors.
2202 Reported by Julien Moutinho <julm+bash@sourcephile.fr>, fix from
2203 Dominique Martinet <asmadeus@codewreck.org>
2204
2205 arrayfunc.c
2206 - unbind_array_elememnt: pass (flags&VA_NOEXPAND) to skipsubscript(),
2207 instead of unconditionally passing 1 if we're operating on an
2208 associative array. This is consistent with how valid_array_reference
2209 determines the length of the subscript.
2210 Report and fix from Koichi Murase <myoga.murase@gmail.com>
2211
2212 10/6
2213 ----
2214
2215 subst.c
2216 - skip_to_delim: add a new value for FLAGS. If FLAGS&2, we assume that
2217 START is one character after the opening OPEN. If not, we assume that
2218 START is at OPEN, and needs to be incremented past it. Part of fix
2219 from Koichi Murase <myoga.murase@gmail.com>
2220
2221 arrayfunc.c
2222 - unbind_array_element: make sure to pass FLAGS to skipsubscript with
2223 bit 2 set, since we are passed a SUB index that's one past the
2224 opening bracket. Rest of fix from
2225 Koichi Murase <myoga.murase@gmail.com>
2226 - array_variable_name: make sure we pass (FLAGS&1) to skipsubscript, so
2227 we don't inadvertently pass a value with bit 2 set, which would
2228 cause an off-by-one error in subscript parsing
2229
2230 10/8
2231 ----
2232 trap.c
2233 - restore_traps: inverse of reset_signal_handlers. This understands
2234 how reset_signal_handlers changes the signal disposition while
2235 leaving the trap string in place, and knows how to restore flags
2236 and state based on that preserved trap string and whether or not
2237 the signal is "special" to the shell.
2238
2239 builtins/exec.def
2240 - exec_builtin: instead of using restore_original_signals to completely
2241 cancel the traps, call reset_signal_handlers so the trap strings are
2242 preserved. Then if the exec fails (and we're not exiting) we can
2243 look at the trap strings and see how to restore the trap state.
2244 This calls restore_traps after reinitializing the shell signal
2245 handlers, using the trap strings saved by reset_signal_handlers.
2246 Fixes issue with not exiting after a failed exec clearing the EXIT
2247 trap reported by Mark March <march@systempad.org>, using the
2248 approach suggested by Robert Elz <kre@munnari.OZ.AU>
2249
2250 subst.c
2251 - expand_declaration_argument: when parsing options that modify
2252 attributes that affect how the value is handled (i, c, u, etc.),
2253 make sure to create an option string and call make_internal_declare
2254 with options that start with a `+' so the attribute is off when
2255 the assignment is performed and changes how the value is expanded.
2256 From a report by Léa Gris <lea.gris@noiraude.net>
2257
2258 lib/readline/complete.c
2259 - rl_display_match_list: even if _rl_completion_prefix_display_length
2260 is set to a non-zero value, pass the common prefix length to
2261 fnprint if we've turned on colored completion prefixes; passes
2262 through to fnprint via print_filename
2263 - fnprint: add the ellipsis if prefix_bytes exceeds the
2264 _rl_completion_prefix_display_length, add explicit check for
2265 prefix_bytes being longer since print_filename passes it through
2266 if colored-completion-prefix is set. This means that while
2267 completion-prefix-display-length still has precedence over
2268 colored-completion-prefix, it doesn't override it if both are set
2269 and the common prefix length is shorter than
2270 completion-prefix-display-length. From a report by
2271 Christoph Anton Mitterer <calestyo@scientia.net>
2272
2273 10/10
2274 -----
2275 parse.y
2276 - parse_dparen: if the last token is FOR, increment word_top and assign
2277 word_lineno like for other for loops. Fixes bug with LINENO after
2278 arithmetic for commands reported by
2279 Tom Coleman <thomas.james.coleman@gmail.com>
2280
2281 10/11
2282 -----
2283 execute_cmd.c
2284 - shell_execve: if execve fails with ENOENT, but executable_file()
2285 succeeds, display a slightly more descriptive error message. Prompted
2286 by a report from Andrea Monaco <andrea.monaco@autistici.org>
2287
2288 stringlib.c
2289 - strcreplace: allow backslash to escape a backslash, since we allow it
2290 to escape a `&'
2291
2292 10/14
2293 -----
2294 pcomplib.c
2295 - COMPLETE_HASH_BUCKETS: double to 512
2296
2297 stringlib.c
2298 - strcreplace: the last argument is now a flags argument. 1 has its
2299 previous meaning (glob); 2 means to allow backslash to escape a
2300 backslash (as added on 10/11)
2301
2302 subst.c
2303 - pat_subst: call strcreplace with 2 as the flags value
2304
2305 10/15
2306 -----
2307 doc/bashref.texi
2308 - updates to Installation section
2309
2310 doc/{mkposix,mkinst,mkrbash},doc/Makefile.in
2311 - changes to allow scripts to be run outside the source directory
2312
2313 10/18
2314 -----
2315 subst.c
2316 - patsub_replacement: controls whether pattern substitution expands `&'
2317 in the replacement string. Initialized to 1 by default
2318
2319 10/19
2320 -----
2321 doc/{bash.1,bashref.texi}
2322 - document bash's WCE SIGINT behavior when job control is not enabled
2323 and the shell receives a SIGINT while waiting for the foreground
2324 command to complete. Added at Red Hat's request. A complete
2325 discussion is at https://www.cons.org/cracauer/sigint.html
2326
2327 10/25
2328 -----
2329 builtins/shopt.def
2330 - patsub_replacement: new shell option, exposes patsub_replacement
2331 variable controlling whether pattern substitution expands `&' in
2332 the replacement string. Still enabled by default.
2333
2334 doc/{bash.1,bashref.texi}
2335 - patsub_replacement: document new shopt option
2336
2337 10/26
2338 -----
2339 lib/readline/display.c
2340 - expand_prompt: group runs of invisible characters at the right edge
2341 of the screen with the previous physical characters when setting
2342 local_prompt_newlines, since that's how update_line() expects to
2343 get it. Fix from sparrowhawk996@gmail.com.
2344
2345 lib/readline/macro.c
2346 - rl_end_kbd_macro: make sure current_macro_index is > 0 after
2347 subtracting the key sequence length, clamp it to 0 before writing
2348 the ending NULL. From a fuzzing report by
2349 Tillmann Osswald <tosswald@ernw.de>
2350
2351 lib/readline/isearch.c
2352 - _rl_isearch_dispatch: in the bracketed paste case, don't assume the
2353 pasted text is null-terminated, so use memcpy instead of strcpy for
2354 the length of the pasted text, then make sure the search string is
2355 null-terminated. From a fuzzing report by
2356 Tillmann Osswald <tosswald@ernw.de>
2357
2358 lib/readline/text.c
2359 - rl_transpose_words: make sure to preserve the value of rl_end from
2360 the beginning to the end of the function. From a fuzzing report by
2361 Tillmann Osswald <tosswald@ernw.de>
2362
2363 lib/readline/vi_mode.c
2364 - rl_vi_delete_to,rl_vi_change_to,rl_vi_yank_to: if we are redoing a
2365 command (_rl_vi_redoing == 1), save the old _rl_vimvcxt, allocate a
2366 new one, and restore the old one before returning. Prevents some
2367 pointer aliasing problems. From a fuzzing report by
2368 Tillmann Osswald <tosswald@ernw.de>
2369
2370 10/29
2371 -----
2372 arrayfunc.c
2373 - tokenize_array_reference: take valid_array_reference and add a third
2374 argument (char **SUBP), which, if non-NULL, gets the null-terminated
2375 subscript parsed from the NAME argument. If it's NULL, the caller
2376 gets the old valid_array_reference behavior. Fix from
2377 Koichi Murase <myoga.murase@gmail.com>
2378 - valid_array_reference: just call tokenize_array_reference with a
2379 NULL third argument
2380 - unbind_array_element: assume the caller (unset_builtin) passes a
2381 null-terminated SUB that's already been validated by a call to
2382 tokenize_array_reference so we don't need to call skipsubscript() or
2383 check VA_ONEWORD. Fix from Koichi Murase <myoga.murase@gmail.com>
2384
2385 arrayfunc.h
2386 - tokenize_array_reference: extern declaration
2387
2388 builtins/set.def
2389 - unset_builtin: use tokenize_array_reference to figure out T and pass
2390 that to unbind_array_element. Fix from
2391 Koichi Murase <myoga.murase@gmail.com>
2392 - unset_builtin: pass non-null argument to array_variable_part to get
2393 the length of the subscript (T), then cut off any final `]' before
2394 passing it to unbind_array_element, since that's what it now
2395 expects
2396
2397 subst.c
2398 - expand_string_for_rhs,expand_string_for_pat: assign td.word from
2399 newly-allocated memory in case it gets freed on error during the
2400 call to call_expand_word_internal(); free it manually when that
2401 call returns
2402
2403 11/1
2404 ----
2405 findcmd.c
2406 - search_for_command: if FLAGS includes CMDSRCH_STDPATH, don't look in
2407 the hash table for the command name. Prompted by a report from
2408 Roger Morris <roger.morris@gmail.com>
2409
2410 aclocal.m4
2411 - BASH_FUNC_POSIX_SETJMP: add a check by fetching the signal mask
2412 after the siglongjmp and making sure that SIGINT is not blocked,
2413 indicating we restored the original signal mask
2414
2415 11/2
2416 ----
2417 subst.c
2418 - expand_string_assignment: make sure to add W_TILDEEXP to the flags so
2419 expand_word_internal performs the right tilde expansion on tildes
2420 following an unquoted colon. Report from Anders Kaseorg
2421 <andersk@mit.edu>
2422
2423
2424 11/3
2425 ----
2426 aclocal.m4
2427 - BASH_FUNC_POSIX_SETJMP: if cross-compiling, default to `present' if
2428 we've determined we have posix signal functions
2429
2430 11/4
2431 ----
2432 execute_cmd.c
2433 - SET_LINE_NUMBER: set line_number, but don't set line_number_for_err_trap
2434 if we're already running the ERR trap
2435 - GET_LINE_NUMBER: evaluates to line_number_for_err_trap if we're
2436 running the ERR trap and executing_line_number() otherwise
2437 - execute_function: use GET_LINE_NUMBER to push the value for the line
2438 number into the BASH_LINENO array
2439 - execute_command_internal,execute_arith_command,execute_cond_command:
2440 use SET_LINE_NUMBER to avoid overwriting line_number_for_err trap
2441 while executing the ERR trap. Tentative fix for `caller' problem
2442 reported by Quinn Grier <quinn@quinngrier.com>
2443
2444 configure.ac,patchlevel.h
2445 - set bash version to 5.2-devel, meaning shell_compatibility_level = 52,
2446 which required updating tests (array.tests, array21.sub,
2447 quotearray3.sub, new-exp10.sub, history2.sub). The first three are
2448 because bash-5.2 flushes an indexed array but does not unset the
2449 variable when given `unset a[@]' or `unset[*]' (that is, it acts
2450 like `a=()' instead of `unset a'); the other two are because the
2451 version number changed
2452
2453 11/8
2454 ----
2455 doc/Makefile.in
2456 - bash.info: use `makeinfo -o' instead of calling infopost.sh to edit
2457 the filename, since the tags table includes absolute byte offsets to
2458 nodes. From https://savannah.gnu.org/support/?110557
2459
2460 11/15
2461 -----
2462 examples/loadables/realpath.c
2463 - add -a NAME argument to put canonicalized pathnames into an indexed
2464 array instead of displaying them on stdout. Suggested by
2465 felix@f-hauri.ch
2466
2467 lib/readline/colors.c
2468 - _rl_custom_readline_prefix: new function, looks in $LS_COLORS for a
2469 custom extension (*.readline-colored-completion-prefix) and uses that,
2470 if found, as the default color for the common prefix displayed when
2471 `colored-completion-prefix' is set. Suggested by
2472 Christoph Anton Mitterer <calestyo@scientia.net>
2473 - _rl_print_prefix_color: try the return value from _rl_custom_readline_prefix
2474 before defaulting to the C_PREFIX (C_SOCK) color. Suggested by
2475 Christoph Anton Mitterer <calestyo@scientia.net>
2476
2477 lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
2478 - readline-colored-completion-prefix: document new custom suffix for
2479 readline's colored-completion-prefix color
2480
2481 11/16
2482 -----
2483 doc/{bash.1,bashref.texi},builtins/set.def
2484 - set: modify usage synopsis slightly, based on
2485 https://bugzilla.redhat.com/show_bug.cgi?id=2022324
2486
2487 builtins/set.def
2488 - unset_builtin: add shell compatibility level check <= bash-5.1 to
2489 force `unset a[@]' to unset array variable `a', like in previous
2490 versions, instead of unsetting associative array element `@' or
2491 removing all elements of an indexed array without unsetting the
2492 variable itself
2493
2494 builtins/common.c
2495 - set_expand_once: now a no-op if the shell compatibility level is
2496 <= bash-5.1, preserving the previous versions' behavior for [[ -v
2497 (dependent on assoc_expand_once instead of forcing it)
2498
2499 subst.c
2500 - parameter_brace_expand_rhs: make sure that the final value assigned
2501 is always returned from ${a:=b}, even when `a' has a variable
2502 attribute that modifies the value on assignment. Reported back on
2503 1/20/2021 by oguzismailuysal@gmail.com; bash-5.2 tag removed
2504
2505 11/22
2506 -----
2507 doc/{bashref.texi,bash.1}
2508 - unset: change the description of `unset name[@]' (unset name[*])
2509 to reflect the new behavior (unset associative array subscripts or
2510 remove all elements from an indexed array) and the difference from
2511 previous versions
2512 - set: document -r for restricted shell mode
2513 - restricted shell: change occurrences of `set +o restricted' to
2514 `shopt -u restricted_shell'. From a report from
2515 Jin Xiang <jxiang.sd@gmail.com>
2516 - read: note that read -t0 may return 0 if a subsequent read will
2517 return EOF. From a suggestion by Dale R. Worley
2518 <worley@alum.mit.edu>
2519
2520 execute_cmd.c
2521 - execute_arith_command,eval_arith_for_expr: don't pass EXP_EXPANDED
2522 to evalexp if shell_compatibility_level > 5.1, assuming that the
2523 expression has been quoted by Q_ARITH handling
2524
2525 test.c
2526 - test_arithcomp: if we're being called by the conditional command
2527 code and treating the arguments to the arithmetic operators as
2528 expressions, don't pass EXP_EXPANDED to evalexp if the shell
2529 compatibility level is > 5.1, assuming that the expression has been
2530 quoted by Q_ARITH handling
2531
2532 11/29
2533 -----
2534 examples/loadables/getconf.[ch]
2535 - getconf: new implementation of loadable builtin, based on glibc
2536 getconf
2537
2538 examples/loadables/sleep.c
2539 - parse_gnutimefmt: parse GNU interval format (2m30s), returning
2540 seconds and microseconds like uconvert
2541 - sleep: use parse_gnutimefmt if uconvert can't parse the format right
2542 away and "dhms" appears in the format string. Don't return
2543 EX_DISKFALLBACK under any circumstances
2544
2545 11/30
2546 -----
2547
2548 builtins/wait.def
2549 - wait_builtin: refer to unset_waitlist only if JOB_CONTROL is enabled.
2550 Report from Joel Ebel <jbebel@google.com>
2551
2552 parse.y,builtins/set.def
2553 - changes for minimal config restrictions
2554
2555 configure.ac,config.h.in
2556 - --enable-translatable-strings: new configuration option to allow
2557 $"..." support to be compiled in or out; not included in the minimal
2558 shell configuration
2559
2560 shell.c
2561 - main: don't include any of the dump-strings options if
2562 TRANSLATABLE_STRINGS is not defined
2563
2564 lib/sh/shquote.c
2565 - sh_backslash_quote_for_double_quotes: needed for translatable strings
2566
2567 parse.y
2568 - support for translating $"..." strings now conditional on
2569 TRANSLATABLE_STRINGS
2570
2571 locale.c
2572 - locale_expand: now conditional on TRANSLATABLE_STRINGS
2573
2574 subst.c
2575 - expand_string_dollar_quote: support for $"..." now conditional on
2576 TRANSLATABLE_STRINGS
2577
2578 doc/bashref.texi
2579 - --enable-translatable-strings: document new configuration option
2580
2581 12/2
2582 ----
2583 subst.c
2584 - verify_substring_values: now that the default compatibility level is
2585 52, and the Q_ARITH code is enabled, make the EXP_EXPANDED flag for
2586 evalexp() dependent on the compatibility level
2587 - param_expand: arithmetic substitution: make EXP_EXPANDED flag
2588 for evalexp() dependent on the compatibility level
2589 - expand_word_internal: don't call expand_array_subscript if the
2590 shell compatibility level is 51 or below (Q_ARITH)
2591
2592 test.c
2593 - test_unop: if the shell compatibility level is > 51, using [@] with
2594 an existing associative array will report on a key of `@'
2595
2596 arrayfunc.c
2597 - array_expand_index: if the compatibility level is > 51, Q_ARITH is
2598 used and we don't pass EXP_EXPANDED to evalexp()
2599
2600 COMPAT,doc/bashref.texi
2601 - shell compatibility mode: document effects of setting the
2602 compatibility mode to 51
2603
2604 12/3
2605 ----
2606 lib/malloc/malloc.c
2607 - mremap: only use if MREMAP_MAYMOVE is defined, since we use the Linux
2608 version of the function signature
2609
2610 12/6
2611 ----
2612 bashhist.c
2613 - bash_add_history: if we're parsing a here-document (PST_HEREDOC), only
2614 suppress adding the newline between lines if we're not at the first
2615 line of the here-document (here_doc_first_line != 0). From a report
2616 by S0AndS0 <strangerthanbland@gmail.com>
2617
2618 12/8
2619 ----
2620 lib/readline/colors.c
2621 - _rl_custom_readline_prefix: use STREQN to check for the extension
2622 string in $LS_COLORS, since it's not necessarily null-terminated.
2623 From https://savannah.gnu.org/patch/?10158
2624
2625 12/10
2626 -----
2627 variables.c
2628 - set_int_value,set_string_value: broke common code for setting int
2629 and string dynamic variable values out into separate functions;
2630 changed all callers to use them where appropriate. set_int_value
2631 takes a flags argument saying whether or not to force the integer
2632 attribute on
2633 - assign_random: store the value assigned as the variable value so
2634 things like RANDOM=42; RANDOM+=7 generate consistent sequences
2635 like in ksh93
2636 - assign_seconds: store the value assigned as the variable value so
2637 things like SECONDS=42 ; SECONDS+=7 generate what's expected
2638
2639 doc/Makefile.in
2640 - changes to allow man pages that include others (.so FN) to be built
2641 outside the source tree
2642
2643 12/13
2644 -----
2645 arrayfunc.c
2646 - assign_array_element_internal: take an additional argument: char **NVALP.
2647 If non-null, it gets the value eventually assigned to the array
2648 element
2649 - assign_array_element: take an additional NVALP argument; pass it to
2650 assign_array_element_internal
2651
2652 arrayfunc.h
2653 - assign_array_element: new extern function declaration
2654
2655 {subst,variables}.c,builtins/{common.c,declare.def}
2656 - assign_array_element: change callers
2657
2658 subst.c
2659 - parameter_brace_expand_rhs: for the ${param:=value}, use the value
2660 returned by assign_array_element in NVALP as the return value, since
2661 it's the value ultimately assigned to the variable after possible
2662 modification (e.g., arithmetic evaluation). Reported by
2663 oguzismailuysal@gmail.com after flawed fix applied 11/16
2664
2665 12/14
2666 -----
2667 arrayfunc.h
2668 - array_eltstate_t: an object that encapsulates an array element's
2669 state (type, index, key, value) whether it's an indexed or
2670 associative array
2671
2672 arrayfunc.c
2673 - {init,flush}_eltstate: new functions to initialize and flush any
2674 allocated memory from array_eltstate_t objects. No allocation/
2675 deallocation functions yet; the only use is with a static instance
2676 - assign_array_element_internal: take an array_eltstate_t * instead of
2677 a char ** as the final argument, so we can return keys/indices and
2678 values depending on the type of array; populates it with the
2679 appropriate values
2680 - assign_array_element: take array_eltstate_t * as final argument
2681 instead of a char **; pass it to assign_array_element_internal
2682
2683 {subst,variables}.c,builtins/{common.c,declare.def}
2684 - assign_array_element: change callers to modify final argument
2685
2686 12/15
2687 -----
2688 arrayfunc.c
2689 - array_value_internal: now takes an array_eltstate_t * as the final
2690 argument; there is no more `rtype' argument in favor of the
2691 `subtype' member; returns the appropriate values in its members
2692 - array_value: changed to pass array_eltstate_t to array_value_internal,
2693 saves and fetches its `ind' member into *indp; saves `subtype'
2694 member into *rtype
2695 - get_arrary_value: changed to take array_eltstate_t as third argument,
2696 passes it to array_value_internal
2697
2698 {redir,expr}.c
2699 - get_array_value: changed callers; initializing the array_eltstate_t
2700 argument as necessary
2701
2702 test.c
2703 - test_builtin: changed to use get_array_value, adding AV_ALLOWALL to
2704 the flags, since it didn't use any QUOTED argument. Pass
2705 array_eltstate_t * as final argument and get subtype from it (the
2706 only thing we're interested in, to deallocate memory)
2707
2708 12/16
2709 -----
2710 arrayfunc.c
2711 - array_value: now takes a final argument of array_eltstate_t *, which
2712 it passes to array_value_internal; no more rtype and indp args.
2713 Callers are responsible for marshalling values into estatep
2714
2715 arrayfunc.h
2716 - array_value: changed function signature
2717
2718 subst.c
2719 - get_var_and_type,parameter_brace_expand_word: changed calls to
2720 array_value to use array_eltstate_t argument and initialize it
2721 appropriately. Copy values back from it to the parameters we need
2722 to modify
2723
2724 variables.c
2725 - assign_lineno: call set_int_value to store the value, like with
2726 RANDOM and SECONDS (from 12/10)
2727
2728 12/17
2729 -----
2730 {eval,execute_cmd}.c
2731 - when bypassing a parsed command because read_but_dont_execute is
2732 set, don't modify last_command_exit_value. From a report by
2733 Robert Elz <kre@munnari.OZ.AU>
2734
2735 parse.y
2736 - parse_comsub: make sure the first call to shell_getc to check whether
2737 or not it's an arithmetic expansion skips a quoted newline. From a
2738 report by Robert Elz <kre@munnari.OZ.AU>
2739
2740 12/21
2741 -----
2742 subst.c
2743 - parameter_brace_remove_pattern,parameter_brace_patsub,parameter_brace_casemod,
2744 parameter_brace_transform,parameter_brace_substring: now take an
2745 array_eltstate_t * argument in place of the arrayind_t argument, pass
2746 it to get_var_and_type; this generalizes the indexed array behavior
2747 of expanding array subscripts once to associative arrays via an
2748 eventual call to array_value_internal with a non-null KEY member
2749 - get_var_and_type: now takes an array_eltstate_t * argument in place
2750 of the arrayind_t argument; use it in calls to array_value so we
2751 can only expand array subscripts once whether they are indexed or
2752 associative arrays
2753 - parameter_brace_expand_word: take an array_eltstate_t * argument in
2754 place of the arrayind_t * argument; pass it to array_value; use a
2755 static version (which we init and flush) if the argument passed is
2756 NULL so we can get the right state passed back and forth
2757 - parameter_brace_expand: pass a pointer to a static array_eltstate_t
2758 to parameter_brace_expand_word, and use that in the various calls to
2759 parameter_brace_XXX functions that perform specific expansions in
2760 place of the old arrayind_t argument; make sure to flush it before
2761 returning, even on errors
2762
2763 12/22
2764 -----
2765 {trap,variables}.c
2766 - internal_warning: calls changed to use translatable strings
2767 consistently
2768
2769 error.[ch]
2770 - internal_debug: new function, prints a message like internal_warning,
2771 no-op if DEBUG is not defined
2772 - INTERNAL_DEBUG: macro that expands to internal_debug when DEBUG is
2773 defined, and nothing otherwise
2774
2775 {jobs,trap}.c
2776 - changed some internal_warning and internal_inform calls to use
2777 internal_debug, since they were active only when DEBUG is defined
2778
2779 parse.y
2780 - parse_comsub: add internal_debug call when a command substitution
2781 ends with unterminated here-documents
2782
2783 builtins/common.c
2784 - number_of_args: unconditionally return posparam_count
2785
2786 {jobs,execute_cmd,subst}.c,parse.y,builtins/{command.def,evalstring.c}
2787 - INTERNAL_DEBUG: use instead of calls to itrace protected by #ifdef
2788 DEBUG
2789
2790 12/26
2791 -----
2792 lib/glob/glob.c
2793 - glob_always_skip_dot_and_dotdot: initialize to 1 (enabled)
2794
2795 builtins/shopt.def
2796 - globskipdots: new shell option, exposes glob_always_skip_dot_and_dotdot
2797
2798 doc/{bash.1,bashref.texi}
2799 - globskipdots: document new shell option
2800
2801 execute_cmd.c
2802 - fix_arrayref_words: call valid_array_reference with 0 for third arg
2803 because the words have not undergone any word expansions yet and
2804 the quotes are still present. This makes things like
2805 A=[\[]=set
2806 unset A[\[]
2807 work
2808
2809 subst.c
2810 - word_list_split: if a word undergoes word splitting but is not
2811 changed, preserve any W_ARRAYREF flag into the new word. This makes
2812 things like
2813 rkey=']'
2814 unset A[$rkey]
2815 work because the unset builtin sees the W_ARRAYREF flag on its
2816 argument
2817
2818 12/29
2819 -----
2820 builtins/common.h
2821 - SET_VFLAGS: take a set of word flags, and set flags for use with
2822 valid_array_reference (vflags) and assign_array_element/bind_int_variable
2823 (bindflags) based on those flags and the setting of assoc_expand_once
2824 (moved from read.def and generalized)
2825
2826 arrayfunc.c
2827 - array_variable_name: now exclusively takes AV_xxx flags; understands
2828 how to translate AV_NOEXPAND to the right flag for skipsubscript;
2829 understands AV_ONEWORD and AV_NOEXPAND
2830 - array_variable_part: just passes the FLAGS arg to array_variable_name
2831 - assign_array_element: translates ASS_ flags to AV_ flags for
2832 array_variable_name
2833 - array_value_internal: now just passes flags straight through to
2834 array_variable_part (which sends them to array_variable_name)
2835
2836 builtins/common.[ch]
2837 - builtin_bind_var_to_int: now takes a new FLAGS third argument; passes
2838 it to bind_var_to_int
2839
2840 builtins/printf.def
2841 - printf_builtin: use SET_VFLAGS to set flags for builtin_bind_variable
2842 (bindflags); makes things like
2843 declare -A A; key=']' ; printf -v A[$key] "foo"
2844 work without a subscript error as long as assoc_expand_once is defined
2845
2846 builtins/read.def
2847 - read_builtin: use new common version of SET_VFLAGS instead of
2848 private version; changed to use new calling sequence; makes things like
2849 declare -A A; key=']' ; read A[$key] <<<"foo"
2850 work without a subscript error as long as assoc_expand_once is defined
2851
2852 builtins/wait.def
2853 - wait_builtin: use SET_VFLAGS for variable name with -p option
2854 - wait_builtin: call builtin_bind_var_to_int with new bindflags third
2855 argument
2856
2857 expr.c
2858 - expr_streval: just pass TFLAG (AV_xxx flags) straight through to
2859 array_variable_part
2860
2861 variables.c
2862 - bind_int_variable: translate the assignment flags (ASS_xxx) to
2863 VA_xxx flags for valid_array_reference calls (ASS_ONEWORD); translate
2864 assignment flags to AV_xxx flags for array_variable_part
2865
2866 12/30
2867 -----
2868 subst.c
2869 - parameter_brace_expand: when expanding an indirect variable, extend
2870 the special case for array[@] and array[*] (set -u/no positional
2871 parameters, obeying the baroque quoting rules) to the value of the
2872 indirection. Report and fix from konsolebox <konsolebox@gmail.com>
2873
2874 12/31
2875 -----
2876 parse.y
2877 - compound_list: when parsing a compound_list production, collect any
2878 pending here-documents after reading a newline, not after reading
2879 any command terminator. Fixes interactive-only prompting bug
2880 reported back in 8/2021 by Hyunho Cho <mug896@gmail.com>
2881
2882 1/1/2022
2883 --------
2884 bashline.c
2885 - set_filename_quote_chars: break code that modifies
2886 rl_filename_quote_characters based on whether DIRNAME needs to be
2887 expanded from bash_directory_completion_hook into its own function
2888 - bash_check_expchar: break code that checks whether DIRNAME will be
2889 word expanded from bash_directory_completion_hook into its own
2890 function
2891 - bashline_reset,attempt_shell_completion: make sure complete_fullquote
2892 is set to 1 (as it is by default) in case a completion modifies it
2893 - bash_quote_filename: if we are completing (but not expanding --
2894 direxpand is unset) and backslash-quoting a filename with expansion
2895 characters as determined by bash_check_expchar, make sure
2896 filename_bstab is set not to include the expansion char (and any
2897 following char and closer) and set complete_fullquote to 0 so
2898 sh_backslash_quote uses filename_bstab. Fixes the longstanding issue
2899 of quoting a `$', for instance, if the rest of the filename contains
2900 any characters that need quoting in filenames. This assumes that the
2901 filename is unquoted (*QCP == 0) so the word will be expanded and is
2902 not part of the filename (if needed, we can use file_exists to check
2903 whether the expansion characters are actually part of the filename)
2904
2905 1/7
2906 ---
2907 examples/loadables/accept.c
2908 - new -b bindaddr option to bind to a specific IP address
2909 - move setsockopt calls before bind() to avoid TIME_WAIT issues. Fixes
2910 from Dzogovic Vehbo <dzove855@gmail.com>
2911
2912 1/10
2913 ----
2914 configure.ac
2915 - bumped version to 5.2-alpha.
2916
2917 1/16
2918 ----
2919
2920 tests/{unicode1,glob2,intl2}.sub, tests/run-intl
2921 - minor changes to add warnings for missing locales that cause test
2922 failures
2923
2924 1/17
2925 ----
2926 parse.y
2927 - history_delimiting_chars: if we have a blank line by the time we
2928 hit the end of the tests, return a semicolon for the first blank
2929 line to avoid running lines of a multi-line command together.
2930 Fixes bug reported by Joakim Lindblad <joakim@cb.uu.se>
2931
2932 subst.c
2933 - expand_string_for_patsub: expand the replacement string for pattern
2934 substitution assuming that it will eventually be passed to
2935 strcreplace to replace `&' with the matched portion of the string.
2936 This calls expand_string_for_pat(), which leaves the string quoted
2937 and does not perform word splitting, then calls
2938 quote_string_for_repl to post-process the expanded string.
2939 - quote_string_for_repl: perform quote removal on passed string while
2940 replacing CTLESC escaping a `&' or a backslash with a backslash. The
2941 result must be passed to strcreplace
2942 - parameter_brace_patsub: call expand_string_for_patsub if
2943 patsub_replacement is set to quote
2944
2945 1/18
2946 ----
2947 subst.c
2948 - read_comsub: make istring_index a size_t to avoid overflow with very
2949 large values of istring_size.
2950 From https://savannah.gnu.org/support/index.php?110596
2951 - expand_word_internal: make istring_index a size_t
2952
2953 1/20
2954 ----
2955 buitins/cd.def
2956 - add a description of `cd -' to the help text. Suggested by
2957 Rob Landley <rob@landley.net>
2958
2959 1/21
2960 ----
2961 lib/glob/glob.c
2962 - glob_vector: if we allocate NEXTLINK using malloc, and free it due to
2963 some allocation failure, reset FIRSTMALLOC to avoid duplicate frees
2964 later on
2965
2966 subst.[ch]
2967 - sub_append_string: the INDX parameter is now a size_t to avoid
2968 overflow
2969
2970 parse.y
2971 - decode_prompt_string: RESULT_INDEX is now a size_t to pass to
2972 sub_append_string
2973
2974 jobs.[ch],nojobs.c
2975 - wait_for_background_pids: now returns the number of jobs/processes
2976 reaped
2977
2978 builtins/wait.def
2979 - wait_builtin: if -p pid supplied without -n, make sure we do something
2980 useful if no job/pid arguments are supplied and there are no jobs.
2981 Reported by Oguz <oguzismailuysal@gmail.com>
2982
2983 builtins/read.def
2984 - read_builtin: if we have a timeout, use SIGALRM instead of select
2985 when in posix mode, since we use read instead of zread. Fixes bug
2986 reported by Andreas Schwab <schwab@linux-m68k.org>
2987
2988 subst.c
2989 - expand_string_dollar_quote: handle single-quoted and double-quoted
2990 strings that might include $' and $" without attempting translation;
2991 do more error checking for unterminated $' and $" that leaves those
2992 characters unmodified. This is for use by readline's various line
2993 expansion functions (shell_expand_line)
2994
2995 1/23
2996 ----
2997 parse.y,make_cmd.c
2998 - revert change that unconditionally processes $'...' and $"..." in
2999 here-document bodies; there are only a couple of cases where they
3000 should be processed in a double-quote environment
3001
3002 1/24
3003 ----
3004
3005 subst.c
3006 - extract_dollar_brace_string: if we see another `${' on the rhs of
3007 the operator, reset the dolbrace_state to DOLBRACE_PARAM while we
3008 read this new ${...} string
3009 - extract_heredoc_dolbrace_string: new function, variant of
3010 extract_dollar_brace_string, to process the WORD in ${PARAM OP WORD}
3011 while expanding lines of here-document data. It's complicated by the
3012 requirement to add to the result string as we go along, since we
3013 need to change the contents of the input string with ansi expansion
3014 or locale translation.
3015 - string_extract_single_quoted: take a new third argument: ALLOWESC.
3016 This allows backslash to escape an embedded single quote, needed by
3017 extract_heredoc_dolbrace_string to process $'...'; changed callers
3018
3019 1/25
3020 ----
3021 parse.y
3022 - parse_matched_pair: ansi-expand $'...' in WORD for ${PARAM OP WORD}
3023 and single-quote the result if dolbrace_state == DOLBRACE_QUOTE
3024 (posix pattern removal operators) even if extended_quote == 0
3025
3026 subst.c
3027 - extract_heredoc_dolbrace_string: add logic to align with parse.y:
3028 parse_matched_pair and its $'...' expansion, including handling
3029 extended_quote
3030
3031 1/27
3032 ----
3033 builtins/evalstring.c
3034 - should_optimize_fork: broke conditions for optimizing away the fork
3035 for a simple command out of optimize_fork into new function, call
3036 from should_suppress_fork and optimize_subshell_command. Call from
3037 optimize_fork if (subshell_environment & SUBSHELL_PAREN), relying
3038 on fact that CMD_TRY_OPTIMIZING is only set in a couple of specific
3039 conditions
3040 - optimize_fork: call should_suppress_fork only if startup_state == 2;
3041 it does the extra checks for that specific case
3042 - optimize_fork: call should_optimize_fork if we're in a (list)
3043 subshell (subshell_environment & SUBSHELL_PAREN)
3044 - optimize_subshell_command: set CMD_TRY_OPTIMIZING on the right side
3045 of a `&&', `||', or `;' list as long as it's a simple command so
3046 we can check with optimize_fork() when it's time to execute it
3047
3048 execute_cmd.c
3049 - execute_in_subshell: call optimize_subshell_command for (list)
3050 subshells to either set CMD_NO_FORK for simple commands or set
3051 CMD_TRY_OPTIMIZING for likely candidates for later optimization
3052
3053 builtins/common.h,builtins/evalstring.c
3054 - optimize_fork: renamed to optimize_connection_fork; changed callers
3055
3056 1/31
3057 ----
3058 include/shmbutil.h
3059 - COPY_CHAR_I,SCOPY_CHAR_I: add check for locale_utf8locale and
3060 (c & 0x80) as in other macros
3061
3062 lib/sh/shquote.c
3063 - sh_backslash_quote_for_double_quotes: rewrote to use array indexing
3064 and COPY_CHAR_I to make it easier to drop in future calls to
3065 charvis() to make `unsafe' characters visible if FLAGS == 1
3066
3067 2/1
3068 ---
3069 parse.y
3070 - parse_comsub: if we are currently expanding aliases, temporarily
3071 turn off alias expansion if we are not in posix mode so we defer
3072 alias expansion until command_substitute(). Fixes double-expansion
3073 bug reported by Martijn Dekker <martijn@inlv.org> and aligns with
3074 https://www.austingroupbugs.net/view.php?id=1342
3075 - xparse_dolparen: turn off alias expansion entirely while running the
3076 parser: either we do it in parse_comsub (posix mode) or in
3077 command_substitute (default mode)
3078 - parse_string_to_command: ditto
3079
3080 subst.c
3081 - command_substitute: if we are expanding aliases, temporarily turn
3082 off alias expansion if we are in posix mode, since we already
3083 performed it in parse_comsub() and are using the command string
3084 reconstituted from the parse result
3085
3086 doc/bashref.texi
3087 - bash posix mode: add description of alias expansion and command
3088 substitution parsing and execution
3089
3090 2/4
3091 ---
3092 lib/readline/rltty.c
3093 - rl_deprep_terminal: set _rl_last_c_pos to 0 after outputting
3094 BRACK_PASTE_FINI, since the last character in that is \r. Partially
3095 address issue raised by Markus Schwarzenberg <markus.schwarzenberg@freenet.de>
3096 in https://lists.gnu.org/archive/html/bug-bash/2022-02/msg00056.html
3097
3098 2/5
3099 ---
3100 doc/{bash.1,bashref.texi}
3101 - minor typo fixes from Helge Kreutzmann <debian@helgefjell.de>
3102
3103 2/7
3104 ---
3105 {arrayfunc,variables}.c
3106 - ARRAY_EXPORT: changes to encode array and assoc variables using a
3107 scheme similar to shell functions so we can export arrays and
3108 differentiate them from scalar variables and differentiate array
3109 and assoc variables. Still not enabled by default.
3110
3111 variables.c
3112 - mk_env_string: third argument is now the variable's attributes or 0,
3113 with all the attributes we can export arrays
3114
3115 lib/readline/bind.c
3116 - active-region-start-color,active-region-end-color: new bindable
3117 string variables, one to set the active region color (instead of
3118 standout mode) and one to turn it off (instead of the "se" terminal
3119 capability). They set _rl_active_region_start_color and
3120 _rl_active_region_end_color variables via functions
3121
3122 lib/readline/display.c
3123 - putc_face: if setting standout mode, check for both the start color
3124 and end color variables and output the start color string. If turning
3125 off standout mode (normal face), output the end color string. Both
3126 variables must be set
3127
3128 lib/readline/{readline.c,rlprivate.h}
3129 - declarations for _rl_active_region_start_color and
3130 _rl_active_region_end_color
3131
3132 2/8
3133 ---
3134 bashline.c
3135 - initialize_readline: add bindable name `vi-edit-and-execute-command'
3136
3137 shell.c
3138 - subshell_exit: make sure to set last_command_exit_value before
3139 calling the exit trap. Fixes bug reported by Greg Edwards
3140 <gedwards@ddn.com>
3141
3142 2/9
3143 ---
3144 lib/readline/{terminal.c,rlprivate.h}
3145 - _rl_region_color_on,_rl_region_color_off: functions to output the
3146 _rl_active_region_start_color and _rl_active_region_end_color
3147 - _rl_reset_region_color: function to encapsulate setting the region
3148 color to an arbitrary string, including doing memory management
3149
3150 lib/readline/display.c
3151 - putc_face: call _rl_region_color_on and _rl_region_color_off instead
3152 of _rl_standout_on and _rl_standout_off
3153
3154 lib/readline/terminal.c
3155 - _rl_init_terminal_io: initialize _rl_active_region_start_color and
3156 _rl_active_region_end_color from _rl_term_so and _rl_term_se,
3157 respectively; reset every time the terminal is changed
3158 - _rl_init_terminal_io: turn off the active region for a dumb terminal
3159
3160 lib/readline/bind.c
3161 - sv_region_{start,end}_color: call _rl_reset_region_color with the
3162 appropriate value for WHICH
3163
3164 2/10
3165 ----
3166 lib/readline/doc/{rluser.texi,readline.3},doc/bash.1
3167 - active-region-start-color,active-region-end-color: documented new
3168 bindable readline variables
3169 - enable-active-region: document using active-region-start-color to
3170 highlight the text in the region
3171
3172 2/11
3173 ----
3174 parse.y
3175 - read_token,read_token_word: make sure characters read by shell_getc
3176 are protected by appropriate calls to MBTEST when testing for shell
3177 metacharacters and operators
3178
3179 2/14
3180 ----
3181 builtins/shopt.def
3182 - set_compatibility_level: if the current compatibility level is outside
3183 the range of the compatNN options, just leave it alone when
3184 unsetting one of the options (which by definition was already
3185 unset). Fixes issue reported by Mihai Moldovan <ionic@ionic.de>
3186
3187 2/16
3188 ----
3189 lib/readline/search.c
3190 - rl_history_search_{pos,len,flags}: rename to have a leading `_'
3191 - _rl_history_search_pos: no longer static so other parts of readline
3192 can see it
3193
3194 lib/readline/rlprivate.h
3195 - _rl_history_search_pos: extern declaration
3196
3197 lib/readline/readline.c
3198 - readline_internal_teardown: don't run the undo list against the
3199 current history entry if the non-incremental search functions have
3200 set _rl_history_search_pos to it, since it doesn't reflect the
3201 current contents of the line buffer. Fixes issue reported by
3202 Andreas Schwab <schwab@linux-m68k.org>
3203
3204 lib/readline/misc.c
3205 - _rl_start_using_history: initialize _rl_history_search_pos to
3206 something invalid so it doesn't match where_history()
3207
3208 2/17
3209 ----
3210 lib/readline/callback.c
3211 - rl_callback_read_char: make sure _rl_eof_found is set to the value
3212 of eof before calling the deprep terminal function, so it can do
3213 different things based on whether the input code read EOF (or the
3214 user entered the EOF character). From a gdb discussion started by
3215 Andrew Burgess <aburgess@redhat.com> (still more to do, since this
3216 is not part of the public API)
3217
3218 2/18
3219 ----
3220 lib/readline/readline.h
3221 - RL_STATE_EOF: new readline state value; set when readline reads an
3222 EOF character on an empty line or a read returns an error
3223 - rl_eof_found: new public variable
3224
3225 lib/readline/rprivate.h
3226 - _rl_eof_found: renamed to rl_eof_found, so not declared here
3227
3228 lib/readline/{callback,readline}.c
3229 - RL_STATE_EOF: set appropriately when readline gets an EOF. Suggested
3230 by Andrew Burgess <aburgess@redhat.com>
3231 - RL_STATE_EOF: make sure it's not set when readline starts
3232 - rl_eof_found: set appropriately when readline gets an EOF
3233
3234 lib/readline/{callback,readline,rltty}.c
3235 - rl_eof_found: new name for _rl_eof_found
3236
3237 lib/readline/doc/rltech.texi
3238 - RL_STATE_EOF: document
3239
3240 2/19
3241 ----
3242 parse.y
3243 - parse_comsub: turn off parser state flags we don't want to inherit
3244 into this call to the parser (PST_REGEXP, PST_EXTPAT, PST_CONDCMD,
3245 PST_CONDEXPR for now). Fixes bug reported by konsolebox
3246 <konsolebox@gmail.com>
3247
3248 2/23
3249 ----
3250 findcmd.c,builtins/hash.def
3251 - replace calls to is_directory with file_isdir, which only performs a
3252 stat and doesn't do the eaccess call to check for an executable file
3253
3254 findcmd.c
3255 - find_in_path_element: takes a new RFLAGSP argument, an int * where
3256 the status flags for the returned pathname are returned; saves
3257 additional calls to stat/eaccess
3258 - search_for_command: get the returned flags from
3259 find_user_command_in_path so we don't need any additional calls to
3260 file_status after we find the command in $PATH
3261
3262 2/24
3263 ----
3264 doc/{bash.1,bashref.texi}
3265 - FUNCTIONS: some small changes to the description of local variables
3266 and dynamic scoping, with emphasis on how that affects `unset'
3267 behavior. Inspired by a discussion with
3268 Christoph Anton Mitterer <calestyo@scientia.net>
3269
3270 2/25
3271 ----
3272 examples/loadables/realpath.c
3273 - renamed -s option to -q to align with other versions
3274 - perform array assignment for `-a varname' even if -q option supplied
3275 - renamed -S option to -s for Linux compatibility
3276
3277 2/28
3278 ----
3279 lib/readline/misc.c
3280 - _rl_free_saved_history_line: call rl_free_undo_list, saving and
3281 setting rl_undo_list to the saved history line's data, so the right
3282 call to _hs_replace_history_data happens and we don't end up with
3283 a pointer aliasing problem. Fixes core dump reported by
3284 Andreas Schwab <schwab@linux-m68k.org>, but does not make his
3285 scenario equivalent to incremental search
3286
3287 3/1
3288 ---
3289 lib/readline/search.c
3290 - make_history_line_current: save the current line before replacing it
3291 with the found history entry using rl_maybe_save_line
3292 - noninc_dosearch: we don't want the saved history line, so free it
3293 after calling make_history_line_current
3294 - _rl_history_search_internal: call rl_maybe_replace_line after making
3295 changes to the line buffer with make_history_line_current so we can
3296 save the undo list we constructed before we set the history position
3297
3298 3/2
3299 ---
3300 lib/readline/display.c
3301 - expand_prompt: add missing piece to patch from 10/26/2021: if we are
3302 recalculating the number of invisible characters on the first line
3303 of the prompt, we need to update INVFL, even if we already set it
3304 when we hit the number of physical characters. This ends up being
3305 assigned to prompt_invis_chars_first_line, and is used in several
3306 subsequent calculations. Reported by
3307 Andreas Schwab <schwab@linux-m68k.org>
3308
3309 lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
3310 - enable-bracketed-paste: add some language making it clearer that
3311 bracketed paste prevents the pasted text from being interpreted as
3312 editing commands. Suggested by Karl O. Pinc <kop@karlpinc.com>
3313
3314 3/4
3315 ---
3316 make_cmd.c
3317 - make_here_document: perform quote removal on the here-doc delimiter
3318 only if it's marked as quoted, which prevents quotes from inside a
3319 command substitution from being removed (they're supposed to begin a
3320 new quoting context) when the word itself isn't flagged as quoted
3321 (which means the body of the here-document gets expanded). You can't
3322 perform quote removal *and* expand the here-document lines. From an
3323 austin-group discussion back in early February
3324
3325 lib/sh/strvis.c
3326 - charvis -> sh_charvis; change caller
3327 - sh_charvis: now take an additional SLEN argument to avoid having to
3328 compute the string length every time; change callers
3329 - sh_charvis: add a utf-8 locale-specific check before calling
3330 COPY_CHAR_I (in practice, doesn't make any real difference)
3331
3332 3/10
3333 ----
3334 arrayfunc.c
3335 - convert_var_to_array: if we're being asked to create an associative
3336 array (flags & 2), and we have an existing variable that is not an
3337 assoc array (and not an existing indexed array), call
3338 convert_var_to_assoc to make it one
3339
3340 3/11
3341 ----
3342 jobs.c
3343 - wait_for: don't call get_tty_state() if readline is dispatching
3344 (RL_STATE_DISPATCHING) with the terminal settings changed
3345 (RL_STATE_TERMPREPPED), the same way we don't if we are running a
3346 command for programmable completion. Fixes bug with SIGINT reverting
3347 to the saved readline terminal settings reported by
3348 Markus Napierkowski <markus.napierkowski@cyberus-technology.de>
3349
3350 parse.y
3351 - decode_prompt_string: make sure the expansion of \w, \W, and \s
3352 are all run through sh_strvis before calling
3353 sh_backslash_quote_for_double_quotes or just through sh_strvis if
3354 we're not running the prompt string through word expansions.
3355 Fixes issue reported by Josh Harcome <joshharc@gmail.com> back
3356 in mid-January
3357
3358 3/16
3359 ----
3360 bashline.c
3361 - bash_quote_filename: if we have a word to complete that contains
3362 characters that introduce a word expansion, make sure the passed
3363 string does *not* exist as a filename before removing those
3364 characters from the set that must be backslash-quoted. See change
3365 from 1/1/2022
3366
3367 3/18
3368 ----
3369 lib/readline/search.c
3370 - make_history_line_current: don't free rl_undo_list or
3371 _rl_saved_line_for_history; don't unconditionally save the history
3372 line. This reverts some of the changes to support setting the
3373 history position in history-search-backward
3374 - rl_history_search_internal: only free the saved history line if we
3375 were the ones who created it
3376
3377 3/21
3378 ----
3379 lib/readline/nls.c
3380 - xmalloc.h: include for systems without setlocale(), so xfree has a
3381 prototype. Report and fix from András Kucsma <r0maikx02b@gmail.com>
3382
3383 lib/readline/search.c
3384 - _rl_history_search_internal: use previous-history/next-history to
3385 move to the found history line instead of directly calling
3386 history_set_pos. This makes the behavior more similar to incremental
3387 search
3388 - rl_history_search_internal: make sure to set rl_undo_list to the
3389 current history undo list around the calls to rl_get_previous_history
3390 or rl_get_next_history, in order to fool the call to
3391 maybe_replace_line they make
3392
3393 lib/readline/readline.c
3394 - _rl_executing_func: the currently-executing readline command function
3395
3396 lib/readline/rlprivate.h
3397 - _rl_executing_func: extern declaration
3398
3399 lib/readline/search.c
3400 - _rl_history_search_internal: removed (commented out) code that sets
3401 the current history entry to the found history entry, too much
3402 assumes that the current undo list should be applied to the current
3403 history entry (where_history())
3404
3405 3/23
3406 ----
3407 subst.c
3408 - parameter_brace_expand_word: if we have double-quoted ${*} or ${@},
3409 make sure we are setting W_HASQUOTEDNULL in the flags we return to
3410 the caller if we are returning QUOTED_NULL(word)
3411 - parameter_brace_expand_word: if we have a double-quoted associative
3412 array reference using `*' or `@', make sure we are setting
3413 W_HASQUOTEDNULL in the flags we return to the caller if we are
3414 returning QUOTED_NULL(word)
3415 - parameter_brace_expand: if we're using the `[:]+' word expansion
3416 operator, we need to note a quoted null string and pass the
3417 W_QUOTEDNULL flag back to the caller
3418 - expand_word_internal: make sure to return a QUOTED_NULL
3419 (word[0] == CTLNUL) back to the caller if HAD_QUOTED_NULL is set,
3420 regardless of whether or not we see a quoted dollar at. Fix for bug
3421 reported by Andreas Luik <andreas.luik@innovative-navigation.de>
3422
3423 arrayfunc.c
3424 - array_value_internal: fix typo and set estatep->type to ARRAY_INDEXED
3425 for indexed arrays
3426
3427 3/31
3428 ----
3429 lib/readline/{history.c,histlib.h}
3430 - _hs_at_end_of_history: convenience function to tell whether or not
3431 the current history position is at the end of the history list
3432
3433 4/1
3434 ---
3435 lib/readline/search.c
3436 - make_history_line_current: don't free rl_undo_list if it is equal to
3437 _rl_saved_line_for_history->data, since we will need to restore it
3438 later if we got it from a history entry. Fixes issue dating back to
3439 7/2021 and changes to _rl_free_saved_line_for_history, current issue
3440 reported by Andreas Schwab <schwab@linux-m68k.org>
3441
3442 4/5
3443 ---
3444 lib/readline/{complete,histfile,histsearch,isearch,terminal}.c
3445 - xfree: use instead of free
3446
3447 4/7
3448 ---
3449 configure.ac
3450 - bumped version to bash-5.2-beta
3451
3452 [bash-5.2-beta frozen]
3453
3454 4/8
3455 ---
3456 lib/readline/input.c
3457 - _rl_orig_sigset: need extern declaration if HAVE_SELECT is defined.
3458 From https://savannah.gnu.org/support/?110634
3459
3460 examples/loadables/seq.c
3461 - PRIdMAX: redefine if PRI_MACROS_BROKEN is defined.
3462 From https://savannah.gnu.org/support/index.php?110635
3463
3464 4/11
3465 ----
3466 configure.ac
3467 - BASH_FUNC_STRTOIMAX: replace strtoimax if the system doesn't provide
3468 a declaration in a standard header file. Uses new m4/strtoimax.m4.
3469 From https://savannah.gnu.org/support/index.php?110633
3470
3471 builtins/printf.def
3472 - getdouble: new function, parses string into `double' using strtod
3473 - printf_builtin: check for the `L' length modifier and use long
3474 doubles for the floating point conversion specifiers. If it's not
3475 supplied, use `double' when in posix mode (as posix specifies) and
3476 long double (if it's available, double if not) in default mode.
3477 From a report from Paul Eggert <eggert@cs.ucla.edu>
3478
3479 4/12
3480 ----
3481 lib/sh/oslib.c
3482 - bzero: update function signature to modern BSD version
3483
3484 4/14
3485 ----
3486 lib/sh/oslib.c
3487 - bcopy, gethostname, mkfifo: update function signatures to modern
3488 versions
3489
3490 4/15
3491 ----
3492 jobs.c,nojobs.c
3493 - wait_for_single_pid: if the pid or job argument is invalid -- isn't
3494 a child of this shell -- return 257, which is out of the range of
3495 valid 8-bit status values
3496
3497 execute_cmd.c
3498 - execute_pipeline: if wait_for_single_pid returns > 256, set it to
3499 127 (invalid process)
3500
3501 jobs.c
3502 - wait_for_background_pids: if wait_for_single_pid returns > 256, set
3503 the status we return in PS to 127 (what it was before)
3504
3505 builtins/wait.def
3506 - wait_builtin: if wait_for_single_pid returns > 256, treat it as an
3507 error and set pstat.pid to NO_PID
3508 - wait_builtin: if -p supplied, and we get to the end of the argument
3509 list with PSTAT.PID != NO_PID (which we assume means that the return
3510 value is set from PSTAT.STATUS), set the variable name to PSTAT.PID.
3511 From a report by Robert Elz <kre@munnari.OZ.AU>
3512 - wait_builtin: for compatibility with the netbsd sh, leave the variable
3513 name specified with `-p' unset if there are no PID arguments.
3514 From a report by Robert Elz <kre@munnari.OZ.AU>
3515
3516 4/17
3517 ----
3518 parse.y
3519 - xparse_dolparen: if (flags & SX_NOLONGJMP), don't call
3520 jump_to_top_level() on errors
3521
3522 bashline.c
3523 - bash_quote_filename: don't call quote_word_break_chars() unless we
3524 have word break chars initialized. Fixes bug reported by
3525 Sam James <sam@gentoo.org>
3526
3527 4/18
3528 ----
3529 pcomplete.c
3530 - gen_globpat_matches: call glob_filename with the GX_GLOBSTAR flag if
3531 the `globstar' shell option is enabled. From a report by
3532 Steve <bash@lonetwin.net>
3533
3534 lib/malloc/malloc.c
3535 - internal_free: remove the GLIBC21 code (!)
3536 - internal_free: make the code that tests against memtop and calls
3537 lesscore depend on USE_LESSCORE being defined, which it is by
3538 default
3539
3540 lib/malloc/imalloc.h
3541 - USE_LESSCORE: define
3542
3543 parse.y,shell.h
3544 - token_buffer_size and its corresponding saved value in the shell's
3545 parser state are now size_t instead of int
3546
3547 stringlib.c
3548 - strsub,strcreplace: use size_t instead of int for local length and
3549 indexing variables
3550
3551 lib/sh/zmapfd.c
3552 - zmapfd: use size_t instead of int for local length and indexing
3553 variables
3554
3555 lib/sh/zgetline.c
3556 - zgetline: use size_t instead of int for local length and indexing
3557 variables
3558
3559 4/20
3560 ----
3561 pcomplete.c
3562 - init_itemlist_from_varlist: free VLIST after assigning it from
3563 *SVFUNC and after we get the variable names and values out of it.
3564 Report from Robert E. Griffith <bobg@junga.com>
3565
3566 4/25
3567 ----
3568 redir.c
3569 - here_document_to_fd: if the shell compatibility level is bash-5.0 or
3570 earlier, use tempfiles for all here-documents and here-strings. From
3571 a bug-bash discussion started by Sam Liddicott <sam@liddicott.com>
3572
3573 4/26
3574 ----
3575 parse.y
3576 - parse_comsub: non-interactive shells exit on a syntax error while
3577 parsing the command substitution
3578 - parse_comsub: unset additional PARSER_STATE flags before calling
3579 yyparse(). Inspired by https://bugs.gentoo.org/837203; unsetting
3580 PST_COMPASSIGN is the fix for that bug
3581 - parse_string_to_word_list: use save_parser_state/restore_parser_state
3582 instead of saving pieces of the shell state in individual variables
3583 - parse_compound_assignment: use save_parser_state/restore_parser_state
3584 instead of saving pieces of the shell state in individual variables
3585 - parse_compound_assignment: unset additional PARSER_STATE flags before
3586 calling read_token(); set esacs_needed_count and expecting_in_token
3587 to 0 like in parse_comsub() since read_token can use them
3588
3589 4/27
3590 ----
3591 lib/sh/strvis.c
3592 - sh_charvis: changes to handle being compiled without multibyte support
3593
3594 4/29
3595 ----
3596 lib/readline/callback.c
3597 - rl_callback_read_char: don't set rl_eof_found unless eof is > 0,
3598 since it can be -3 if we need to read more input in a multi-key
3599 sequence. Report from Andrew Burgess <aburgess@redhat.com>
3600
3601 examples/loadables/Makefile.sample.in
3602 - new file, containing the rules to build the example shared object
3603 - includes Makefile.inc from wherever it's installed. Suggested by
3604 Robert E. Griffith <bobg@junga.com>
3605
3606 examples/loadables/Makefile.inc.in
3607 - remove rules that create the example shared object
3608
3609 4/30
3610 ----
3611 builtins/evalstring.c
3612 - parse_and_execute: check for terminating signals before returning,
3613 after any longjmp, to improve responsiveness and fix the -c code
3614 path before running any exit trap. Report from
3615 Emanuele Torre <torreemanuele6@gmail.com>
3616
3617 5/17
3618 ----
3619 builtins/suspend.def
3620 - suspend_builtin: the -f option now forces a suspend even if job
3621 control is not enabled. Inspired by a discussion with
3622 Robert Elz <kre@munnari.OZ.AU>
3623
3624 doc/{bash.1,bashref.texi}
3625 - suspend: updated description to include expanded -f behavior
3626
3627 5/25
3628 ----
3629 builtins/mkbuiltins.c
3630 - -includefile: new argument, specifies extern filename to insert
3631 into the #include statement in the structfile (builtins.c) and
3632 the filename in the comment in the extern file (builtext.h).
3633 From Alexander Kanavin <alex.kanavin@gmail.com> via
3634 https://savannah.gnu.org/patch/?10210
3635
3636 builtins/Makefile.in
3637 - builtins.c: change call to mkbuiltins to add -includefile option
3638 - builtins.c: change recipe to run all the commands in the same shell
3639 invocation
3640 - builtins.c: change recipe to specify new filenames in the call to
3641 mkbuiltins and move them onto builtins.c/builtext.h if the new ones
3642 are different; make the new filenames use the current make recipe
3643 shell pid in the filename ($$RECPID).
3644 Inspired by Alexander Kanavin <alex.kanavin@gmail.com> via
3645 https://savannah.gnu.org/patch/?10210
3646
3647 6/2
3648 ---
3649 builtins/common.c
3650 - builtin_find_indexed_array: new function, factored common code out
3651 of mapfile and read builtins to find an in-scope indexed array or
3652 create one
3653
3654 builtins/common.h
3655 - builtin_find_indexed_array: extern declaration
3656
3657 builtins/{mapfile,read}.def
3658 - change callers to use builtin_find_indexed_array
3659
3660 variables.c
3661 - unbind_global_variable, unbind_global_variable_noref: new functions
3662 that remove variables from the global_variables table
3663
3664 lib/sh/shmatch.c
3665 - sh_regmatch: use unbind_global_variable_noref to make sure we act on
3666 the copy of BASH_REMATCH in the global scope all the time, ignoring
3667 any local variables that might exist. Tentative fix for memory leak
3668 report from Emanuele Torre <torreemanuele6@gmail.com>
3669
3670 doc/{bash.1,bashref.texi}
3671 - BASH_REMATCH: add caveat about making it a local variable
3672
3673 6/6
3674 ---
3675 print_cmd.c
3676 - print_redirection: if the redirectee for r_duplicating_output_word
3677 (r_duplicating_input_word) is 1 (0), don't print it; only print a
3678 non-default file descriptor number
3679 - print_redirection_list: remove the code that tries to temporarily
3680 translate a >&word redirection to >&word now that we won't print a
3681 non-default file descriptor number. Fixes issue with `declare -f' and
3682 function export reported by Namikaze Minato <lloydsensei@gmail.com>
3683
3684 6/13
3685 ----
3686 configure.ac
3687 - bumped version to bash-5.2-rc1
3688
3689 [bash-5.2-rc1 released]
3690
3691 6/15
3692 ----
3693 parse.y
3694 - parse_string_to_word_list: save the parser state before any state-
3695 changing functions like bash_history_disable(). Reported by
3696 Clark Wang <dearvoid@gmail.com>
3697
3698 6/16
3699 ----
3700 doc/bash.1
3701 - play tricks with the value of the zZ number register to refer to
3702 `bash(1)' instead of `above' or `below' when creating the builtins
3703 man page
3704
3705 6/17
3706 ----
3707 doc/{bash.1,bashref.texi}
3708 - wait: note that wait will return > 128 if interrupted by a signal.
3709 Reported by AA <aathan_github@memeplex.com>
3710
3711 execute_cmd.c
3712 - {execute_cond_node,execute_arith_command,eval_arith_for_expr}: make
3713 sure to reset this_command_name after running any DEBUG trap so the
3714 DEBUG trap doesn't overwrite it.
3715 Reported by Emanuele Torre <torreemanuele6@gmail.com>.
3716 - execute_select_command: set this_command_name to NULL after running
3717 any DEBUG trap like execute_for_command does
3718
3719 6/23
3720 ----
3721 test.c
3722 - three_arguments: when given [ ! ! arg ], make sure to advance POS
3723 after calling two_arguments to avoid a `too many arguments' error.
3724 Report from Steffen Nurpmeso <steffen@sdaoden.eu>
3725
3726 6/27
3727 ----
3728 subst.c
3729 - expand_word_internal: when expanding backquoted command substitution,
3730 call string_extract with the SX_REQMATCH flag (closing backquote
3731 required) only if the word flags don't contain W_COMPLETE,
3732 indicating that we're doing this for completion, probably to
3733 determine whether or not to append something to the word. Fixes bug
3734 reported by Emanuele Torre <torreemanuele6@gmail.com>.
3735
3736 7/5
3737 ---
3738 execute_cmd.c
3739 - execute_connection: treat a connector of '\n' the same as ';'
3740
3741 print_cmd.c
3742 - print_comsub: new function, sets flag noting we are printing a
3743 command substitution and calls make_command_string
3744 - make_command_string_internal: add '\n' to the ';' case; print command
3745 list with newline connector appropriately
3746
3747 parse.y
3748 - parse_comsub: call print_comsub instead of make_command_string
3749 - list1 production (part of compound_list): if a list is separated by
3750 newlines, and the parser is parsing a command substitution, make
3751 the connection command with a '\n' connector. Makes the text
3752 output of parse_comsub closer to the original source text. From a
3753 report from Martijn Dekker <martijn@inlv.org>
3754
3755 7/6
3756 ---
3757 doc/bash.1,lib/readline/doc/rluser.texi
3758 - complete: add note about arguments passed to command specified by
3759 `complete -C'; suggested by Mark Chandler <mcp@synq.so>
3760
3761 builtins/setattr.def
3762 - show_local_var_attributes: special-case `local -', since there is
3763 no `declare -' equivalent.
3764 Reported by Emanuele Torre <torreemanuele6@gmail.com>.
3765 - show_all_var_attributes: use `local -' when printing a variable named
3766 `-' at the current non-zero variable context
3767
3768 parse.y
3769 - shell_getc: if we are at the end of an alias, returning a space,
3770 make sure we mark the previous character as single-byte by modifying
3771 shell_input_line_property so the space we return is properly
3772 recognized. This would fail before if the last character of the
3773 alias was a multi-byte character. Reported by
3774 Vangelis Natsios <vnatsios@gmail.com>
3775
3776 7/12
3777 ----
3778 lib/readline/isearch.c
3779 - rl_display_search: don't call rl_redisplay_function before returning;
3780 rl_message already calls it. Reported by
3781 Frédéric Moulins <frederic@moulins.org>
3782
3783 configure.ac
3784 - bumped version to bash-5.2-rc2
3785
3786 7/18
3787 ----
3788 jobs.c
3789 - set_job_control: don't bother calling tcgetpgrp if shell_tty < 0,
3790 since it will just fail
3791
3792 variables.c
3793 - reset_local_contexts: new function, delete all context tables
3794 associated with shell functions and set variable_context to 0.
3795 Called when we want to stop executing in a shell function without
3796 going through the pop_context chain with its side effects
3797
3798 variables.h
3799 - reset_local_contexts: extern declaration
3800
3801 builtins/evalstring.c
3802 - parse_and_execute: call reset_local_contexts instead of setting
3803 variable_context to 0
3804
3805 eval.c
3806 - reader_loop: call reset_local_contexts in cases where the shell has
3807 longjmped for a fatal error and errexit is enabled (ERREXIT), but
3808 not for other cases, and especially not for the exit builtin,
3809 instead of just setting variable_context to 0. Fixes issue originally
3810 reported by Robert Stoll <robert.stoll@tegonal.com>
3811
3812 subst.c
3813 - pat_subst: implement sed-like behavior when presented with a null
3814 pattern that's anchored at the start or end of the string, or when
3815 presented with a null string: process the replacement string for `&'
3816 and `\&' and substitute in the result as before. Patch from
3817 Koichi Murase <myoga.murase@gmail.com>
3818
3819 7/20
3820 ----
3821
3822 [bash-5.2-rc2 frozen]
3823
3824 7/27
3825 ----
3826 parse.y
3827 - reset_parser: set need_here_doc, esacs_needed_count, expecting_in_token
3828 all to 0, since jumping back to a top-level parse needs that
3829 - parse_comsub: make sure to reset expand_aliases and shell_eof_token
3830 if we're not going to exit immediately out of this function
3831
3832 7/28
3833 ----
3834 parse.y
3835 - parse_comsub: if the compatibility level is <= 51, set extglob while
3836 parsing the command substitution, so bad pattern errors can still be
3837 caught but valid patterns are let through and can be evaluated at
3838 runtime, when extglob may have been set. If it isn't set, it will
3839 still be a parser error when the command substitution is executed.
3840 Fixes report from Sam James <sam@gentoo.org> about gentoo scripts.
3841 - reset_parser: set extended_glob from global_extglob if the parser
3842 state includes PST_CMDSUBST
3843 - xparse_dolparen: set global_extglob but don't modify extended_glob,
3844 so parse errors can be caught before forking a child for command
3845 substitution, as part of word expansion, but after extglob may have
3846 been set by command execution (e.g., in a shell function)
3847
3848 8/5
3849 ---
3850 [bump version to bash-5.2-rc3]
3851
3852 8/6
3853 ---
3854 trap.c
3855 - run_pending_traps: move code from evalstring() so we call
3856 parse_and_execute() directly and handle any `return' invocations so
3857 we can restore the value of running_trap. Otherwise, if we longjmp
3858 past this function, we will think we're running a trap after we
3859 finish. Prompted by post from Koichi Murase <myoga.murase@gmail.com>
3860
3861 8/9
3862 ---
3863
3864 lib/readline/nls.c
3865 - _rl_current_locale: private variable, stores the value of the
3866 LC_CTYPE locale category, as determined by _rl_init_locale; set
3867 to allocated memory in _rl_init_locale()
3868 - _rl_set_localevars: new function, code from _rl_init_eightbit that
3869 checks the current locale (passed as an argument) and sets the
3870 various locale-aware variables based on it. It accepts a second
3871 argument: FORCE. If non-zero, it means to restore the default "C"
3872 locale values if the locale is "C" or "POSIX", now that this
3873 function can be called multiple times
3874 - _rl_init_eightbit: now just calls _rl_init_locale and
3875 _rl_set_localevars
3876 - _rl_reset_locale: new function, checks whether our the locale has
3877 changed since we last called _rl_init_locale to set our internal
3878 idea of its value. If it has changed, call _rl_set_localevars with
3879 the new locale and a FORCE argument of 1 to change the
3880 locale-dependent variables.
3881
3882 lib/readline/rlprivate.h
3883 - _rl_reset_locale: extern declaration
3884
3885 lib/readline/readline.c
3886 - rl_initialize: call _rl_reset_locale instead of _rl_init_locale so
3887 the internal readline variables get set when we move from a non-
3888 multibyte locale ("C") to a multibyte one ("en_US.UTF-8"). Report
3889 from Alan Coopersmith <alan.coopersmith@oracle.com>
3890
3891 8/16
3892 ----
3893 lib/sh/setlinebuf.c
3894 - sh_setlinebuf: allocate buffers for line-buffering stdout and stderr
3895 only once, the first time it is requested. Only allocate memory if
3896 we're using setvbuf (we usually are). Double the buffer size to 2016
3897 if we're using the bash malloc. Otherwise, let stdio handle it.
3898
3899 8/17
3900 ----
3901 builtins/exec.def
3902 - exec_builtin: make sure to initialize orig_job_control in case the
3903 command is not found by search_for_command. Report and fix from
3904 Xiami <i@f2light.com>
3905
3906 [bash-5.2-rc3 frozen]
3907
3908 8/27
3909 ----
3910 parse.y
3911 - parse_comsub: restore extended_glob to a local copy (local_extglob)
3912 only if we changed it; a safer way to do it. Fixes extglob change
3913 issue reported by Kerin Millar <kfm@plushkava.net>
3914 - cond_term: restore extended_glob to a local copy; safer than using
3915 global_extglob, which we will reserve for error recovery
3916
3917 8/30
3918 ----
3919 parse.y
3920 - parse_comsub: don't clear the pushed string list; we might need it to
3921 consume additional input to satisfy this command substitution. When
3922 we restore the parser state, don't restore the pushed string list in
3923 case we used it. From
3924 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018727
3925 - parse_comsub: don't modify extended_glob if parser_state includes
3926 PST_EXTPAT, in which case we've already set extended_glob and
3927 global_extglob appropriately. Only matters in compatibility mode.
3928
3929 8/31
3930 ----
3931 subst.c
3932 - parameter_brace_transform: make sure we return an error if *xform
3933 is '\0'. Report from Ivan Kapranov <koltiradw@yandex.ru>
3934
3935 9/7
3936 ---
3937 [bump version to bash-5.2-rc4]
3938
3939 9/8
3940 ---
3941 [bash-5.2-rc4 frozen]
3942
3943 9/20
3944 ----
3945 lib/readline/history.c
3946 - replace_history_entry: check for a NULL timestamp before trying to
3947 copy it. Report from nov.ondrej@gmail.com
3948
3949 9/23
3950 ----
3951 [bash-5.2 frozen]
3952
3953 9/26
3954 ----
3955 [bash-5.2 released]
3956
3957 9/27
3958 ----
3959 mailcheck.c
3960 - time_to_check_mail: don't bother if we're in the middle of readline
3961 completion or command dispatching.
3962 From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019462
3963
3964 lib/readline/display.c
3965 - rl_forced_update_display: use memset to clear out visible_line
3966 instead of trying to use a loop; line_size is the size.
3967 Report from <srobertson@peratonlabs.com>
3968
3969 print_cmd.c
3970 - indirection_level_string: use MBRLEN and an initialized mbstate_t
3971 object to avoid altering an internal mbstate_t.
3972 From Koichi Murase <myoga.murase@gmail.com>
3973
3974 subst.c
3975 - string_extract_verbatim: use an explicit mbstate_t object and pass
3976 it to MBRLEN and mbrtowc to avoid altering the state that
3977 ADVANCE_CHAR is using.
3978 From Koichi Murase <myoga.murase@gmail.com>
3979 - setifs: use an explicit mbstate_t object and pass it to MBRLEN so
3980 to avoid altering an internal mbstate_t.
3981 From Koichi Murase <myoga.murase@gmail.com>
3982
3983 builtins/printf.def
3984 - asciicode: use an explicit mbstate_t object and pass it to mbrtowc
3985 to avoid using an incorrect internal mbstate_t
3986 From Koichi Murase <myoga.murase@gmail.com>
3987
3988 lib/sh/{mbscasecmp,mbscmp}.c
3989 - mbscasecmp,mbscmp: use different mbstate_t objects for the different
3990 strings so they don't affect each others' intermediate mbstate.
3991 From Koichi Murase <myoga.murase@gmail.com>
3992
3993 9/28
3994 ----
3995 execute_cmd.c
3996 - execute_command_internal: if executing a (command) subshell, restore
3997 the value of line_number from save_line_number before returning early
3998 due to being a non-terminal pipeline element.
3999 From https://savannah.gnu.org/support/index.php?110714
4000
4001 9/30
4002 ----
4003 subst.c
4004 - expand_array_subscript: make sure to pass a non-NULL first argument
4005 to sh_backslash_quote. Report from Emanuele Torre <torreemanuele6@gmail.com>,
4006 patch from Koichi Murase <myoga.murase@gmail.com>
4007
4008 9/30
4009 ----
4010 jobs.c
4011 - cleanup_dead_jobs: delete dead foreground jobs we won't notify the
4012 user about (those not killed by a signal or killed by SIGINT/SIGPIPE).
4013 From a report from Koichi Murase <myoga.murase@gmail.com>
4014 - wait_for_any_job: never return a foreground job, even when requested
4015 by pid, if it's in the jobs list
4016 Report and fix from Koichi Murase <myoga.murase@gmail.com>
4017
4018 m4/strtoimax.m4
4019 - BASH_FUNC_STRTOIMAX: fix logic inversion of result; we should be
4020 replacing the function if the tests show we *don't* have a working
4021 version. Report from Emanuel Haupt <ehaupt@FreeBSD.org>
4022
4023 10/4
4024 ----
4025 lib/readline/nls.c
4026 - _rl_init_locale: cope with setlocale returning NULL, make sure we
4027 set up a default value for LC_CTYPE. Report from
4028 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
4029
4030 lib/readline/{input.c,rlprivate.h}
4031 - fixes for compiling on w64-mingw32
4032
4033 10/5
4034 ----
4035 parse.y
4036 - xparse_dolparen: save and restore extended_glob using local_extglob
4037 in the same way that parse_comsub does. Fixes compat issue reported in
4038 https://bugs.gentoo.org/873931 and by Kerin Millar <kfm@plushkava.net>
4039
4040 10/6
4041 ----
4042 subst.c
4043 - extract_dollar_brace_string: keep a stack of dolbrace_state values
4044 to handle nested expansions. Report from
4045 Antoine <bug-bash@glitchimini.net>
4046
4047 10/7
4048 ----
4049 builtins/{shopt.def,common.h}
4050 - extglob_flag: new variable to hold the state of the `extglob' option;
4051 initialized to EXTGLOB_DEFAULT like extended_glob
4052 - shopt_set_extglob: new function to set extended_glob to the right
4053 value for the rest of the shell
4054
4055 parse.y
4056 - reset_parser: set extended_glob to extglob_flag, which is only
4057 changed by shopt, remove global_extglob
4058 - parse_comsub,parse_cond_command,xparse_dolparen: no longer use
4059 global_extglob
4060
4061 execute_cmd.c
4062 - execute_cond_node: reset extended_glob to the value of extglob_flag,
4063 since we're executing a command here
4064
4065 10/8
4066 ----
4067 parse.y
4068 - save_dstart: when we set the value of function_dstart, save the old
4069 value in save_dstart (read_token, read_token_word); restore it in
4070 the grammar production after calling make_function_def. This gives
4071 you correct line numbers for one level of function nesting.
4072 Report from Daniel Castro <danicc097@gmail.com>
4073
4074 10/10
4075 -----
4076 execute_cmd.c
4077 - shell_execve: rearrange code so that we check for a bad interpreter
4078 before printing a generic ENOENT error message. Report from
4079 Kirill Elagin <kirelagin@gmail.com>
4080
4081 10/12
4082 -----
4083 lib/readline/callback.c
4084 - CALLBACK_READ_RETURN: add an inlined call to RL_CHECK_SIGNALS so we
4085 can handle any signals that arrived before we restored the calling
4086 application's signal handlers. From a gdb dicussion with
4087 Simon Marchi <simon.marchi@polymtl.ca>
4088
4089 10/12
4090 -----
4091 variables.c
4092 - pop_var_context: flag an internal error for shell_variables not
4093 pointing to a function context only if we haven't already flushed
4094 all the local contexts and reset variable_context. This can happen
4095 if errexit is enabled and we're going to be exiting the shell, but
4096 we're running unwind-protects on our way out. Report from
4097 Xavier Delaruelle <xavier.delaruelle@gmail.com>
4098
4099 10/13
4100 -----
4101 sig.c
4102 - kill_shell: broke the code that resets the signal disposition to the
4103 default and sends a terminating signal to the shell into a separate
4104 function
4105 - termsig_handler: set handling_termsig to terminating_signal and make
4106 it file-scope so other functions know we're handling a terminating
4107 signal and are about to exit, and which signal it is (latter not used
4108 yet)
4109 - termsig_sighandler: if we get a fatal signal while we're handling a
4110 fatal signal, kill ourselves with the second fatal signal immediately.
4111 Fixes issue reported by Andreas Schwab <schwab@suse.de>
4112
4113 execute_cmd.c
4114 - execute_case_command: call CHECK_TERMSIG after the call to strmatch,
4115 since gmatch will return FNM_NOMATCH if there's a pending terminating
4116 signal and we don't want incorrect results
4117
4118 subst.c
4119 - pat_subst: make sure REP is non-NULL before calling savestring on it.
4120 Report from Justin Wood (Callek) <callek@gmail.com>
4121
4122 10/14
4123 -----
4124 builtins/{shopt.def,common.h}
4125 - expand_aliases: split into a variable that holds the current state
4126 of alias expansion (expand_aliases) and a variable that reflects the
4127 global option value (expalias_flag), make sure expand_aliases is set
4128 appropriately by shopt
4129
4130 shell.c,execute_cmd.c,general.c
4131 - expand_aliases: make sure expand_aliases and expalias_flag always
4132 agree
4133
4134 parser.h
4135 - PST_STRING: new parser flag, set when parsing a string to a command
4136 or word list
4137
4138 parse.y
4139 - reset_parser: if we're parsing a command substitution or a string,
4140 and need to restore expand_aliases, make sure it's set to the value
4141 of expalias_flag.
4142 Fixes SIGINT during interactive command substitution parsing bug
4143 reported by feng xiangjun <fengxj325@gmail.com>
4144 - parse_string_to_word_list,parse_string_to_command: make sure to set
4145 PST_STRING in parser_flags since we're resetting expand_aliases
4146
4147 10/17
4148 -----
4149 print_cmd.c
4150 - print_function_def, named_function_string: if the function doesn't
4151 have any here-documents, unset was_heredoc after printing the
4152 closing brace so we can add a separator if there is another command
4153 following the function definition. Fixes bug with multiple function
4154 definitions and here-documents reported by D630 <d630@posteo.net>
4155 - make_command_string_internal: if we're printing a command
4156 substitution, make sure to preserve newlines in the comsub so we
4157 avoid problems with re-parsing function defs or command substitutions
4158 containing multiple compound commands that need to be separated
4159 by newlines, but don't double them up
4160
4161 parse.y
4162 - P_ARITH: new parse_matched_pair flags value; used to jump to
4163 parse_comsub if we see a $( inside a $(( )), $[ ], or (( ))
4164 - parse_matched_pair,parse_comsub,parse_arith_command,read_token_word:
4165 make sure to call parse_matched_pair with P_ARITH if we're parsing
4166 an arithmetic command or expansion
4167 - parse_matched_pair: if we see $( inside a call with P_ARITH in the
4168 flags argument, jump to parse_dollar_word and call parse_comsub to
4169 parse it. The rest of the steps assume that parse_comsub has
4170 expanded aliases (or not) appropriately. Fixes bug 2 from
4171 https://bugzilla.redhat.com/show_bug.cgi?id=2134307
4172
4173 10/18
4174 -----
4175 builtins/evalstring.c
4176 - parse_and_execute: we play tricks in the parser and in command_substitute
4177 to turn expand_aliases on and off depending on the comsub parser
4178 pass and whether or not we're in posix mode. Since this should only
4179 matter for parsing, when we're processing a command substitution, we
4180 set expand_aliases to the global flag value after parsing the
4181 command and before executing it, and restore it if the global flag
4182 value isn't changed during execution. Fixes bug 1 from
4183 https://bugzilla.redhat.com/show_bug.cgi?id=2134307
4184
4185 command.h
4186 - PF_BACKQUOTE: new flag value, only used by command_substitute to
4187 differentiate between `` and $() forms. The former does not have
4188 aliases expanded by parse_comsub in posix mode, so needs to expand
4189 them in parse_and_execute like default mode
4190
4191 subst.c
4192 - command_substitute: don't modify expand_aliases if PF_BACKQUOTE is
4193 included in flags, since aliases haven't been expanded in the
4194 command string (it was run through parse.y:parse_matched_pair())
4195 - expand_word_internal: pass PF_BACKQUOTE to command_substitute() if
4196 expanding a `` command substitution
4197
4198 10/20
4199 -----
4200 parse.y
4201 - yylex: return YYUNDEF as current_token if read_token returns < 0.
4202 Fixes parser reset issue reported by Todd Stein <toddbstein@gmail.com>
4203 in https://savannah.gnu.org/support/index.php?110745
4204
4205 subst.c
4206 - ARITH_EXP_CHARS: chars that are special and trigger expansion in
4207 arithmetic expressions, EXP_CHARS without `<' and `>'. Fixes bug
4208 reported by Glenn Jackman <glenn.jackman@gmail.com>
4209
4210 execute_cmd.c
4211 - retain_fifos: replace executing_list (which is still present) as the
4212 indicator of whether or not to save and restore the FIFO list around
4213 a call to execute_command_internal/execute_command; it's more
4214 descriptive and can be used elsewhere
4215 - execute_for_command: set retain_fifos so we don't unlink the fifo
4216 list until the for command completes. Fixes issue reported in
4217 https://savannah.gnu.org/support/index.php?110743
4218
4219 lib/readline/xmalloc.c
4220 - memory_error_and_abort: add `const' qualifiers to the argument. Fix
4221 from Markus Elfring <Markus.Elfring@web.de>
4222
4223 10/24
4224 -----
4225 general.c
4226 - check_binary_file: check the first two lines for NULs if the first
4227 line begins with a `#!'; otherwise check the first. From a discussion
4228 and patch in https://savannah.gnu.org/support/?110744
4229 (larsh@apache.org)
4230
4231 parse.y
4232 - parse_matched_pair: set PST_NOERROR if we read to EOF without finding
4233 a closing match and call parser_error; avoids redundant error
4234 message
4235
4236 lib/sh/uconvert.c
4237 - uconvert: RETURN: if ipart (integer part) is 0, but upart (fractional
4238 part) is non-zero, multiply upart by mult so we don't lose the sign
4239 for values in the range (-1, 0]. From a report by
4240 izabera <izaberina@gmail.com>
4241
4242 execute_cmd.c
4243 - execute_in_subshell: check for terminating signals before we return
4244 to our caller, which will immediately exit, and before running any
4245 exit trap (since termsig_handler will run any exit trap). Fixes bug
4246 reported by Andrew Neff <andrew.neff@visionsystemsinc.com>
4247
4248 10/26
4249 -----
4250 lib/readline/complete.c
4251 - rl_filename_completion_function: if the application doesn't supply
4252 any directory hook functions, we need to handle the case where we
4253 dequoted users_dirname and also tilde-expanded dirname. We choose
4254 to tilde expand users_dirname rather than call the application
4255 dequoting function again. Report and patch from
4256 Stefan H. Holek <stefan@epy.co.at>
4257
4258 10/27
4259 -----
4260 execute_cmd.c
4261 - execute_in_subshell: call procsub_clear in addition to clear_fifo_list,
4262 since none of these process substitutions are children of this new
4263 subshell
4264
4265 jobs.c
4266 - wait_for_background_pids: call procsub_waitpid on the last procsub
4267 created as long as it's the same as $!, then call reap_procsubs to
4268 clean up the procsub list. Don't call procsub_waitall. Report from
4269 Oguz İsmail Uysal <oguzismailuysal@gmail.com>
4270
4271 10/31
4272 -----
4273 expr.c
4274 - expr_streval: explicitly permit `@' and `*' as associative array
4275 subscripts if the shell compatibility level is greater than 51.
4276 Prompted by report from Corey Hickey <bugfood-ml@fatooh.org>
4277
4278 subst.c
4279 - string_list_pos_params, param_expand: make sure that $* is treated
4280 the same as "$*" in here-document bodies that are being expanded.
4281 From https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00002.html
4282
4283 11/1
4284 ----
4285 lib/readline/readline.c
4286 - readline_internal_char: save and restore the value of _rl_top_level
4287 around our use of setjmp, even though it doesn't matter in most
4288 cases. Report from sparrowhawk996@gmail.com that it causes crashes
4289 in some obscure callback-mode cases
4290
4291 lib/readline/isearch.c
4292 - _rl_isearch_dispatch: if we end the search and stuff characters back
4293 to be read again, decrement the current key sequence index by 2 so
4294 we don't have duplicate characters in the sequence
4295
4296 lib/readline/misc.c
4297 - rl_digit_argument: call _rl_del_executing_keyseq after rl_execute_next
4298
4299 11/3
4300 ----
4301 builtins/setattr.def
4302 - show_localname_attributes: special-case "-" local variable, since
4303 there is no `declare -' equivalent.
4304 Reported by Emanuele Torre <torreemanuele6@gmail.com>.
4305
4306 11/4
4307 ----
4308 lib/sh/tmpfile.c
4309 - sh_mktmpname,sh_mktmpfd: use get_urandom32() instead of random() if
4310 we're not using mktemp or mkstemp and the system provides the
4311 appropriate support
4312
4313 trap.c
4314 - trap_variable_context: new variable, set to variable_context every
4315 time a trap string runs (that is, every time running_trap is set to
4316 a value > 0) in _run_trap_internal, run_exit_trap, run_pending_traps
4317
4318 trap.h
4319 - trap_variable_context: extern declaration
4320
4321 builtins/common.c
4322 - get_exitstat: if the `return' builtin is running, we are running a
4323 trap (but not the DEBUG trap), and the return would cause the trap
4324 string to complete (variable_context == trap_variable_context, so
4325 we haven't executed another shell function), use the last command
4326 exit value as the return status. POSIX interp 1602, from
4327 https://www.austingroupbugs.net/view.php?id=1602
4328
4329 11/4
4330 ----
4331
4332 lib/readline/display.c
4333 - local_prompt_invis_chars: new array variable, similar to
4334 local_prompt_newlines, that keeps track of the number of invisible
4335 characters on each line of the prompt string. Use in WRAP_OFFSET
4336 macro with eye to using in W_OFFSET as well. Used for the case where
4337 the last line of the prompt is not the last line with invisible
4338 characters. Can use this in more calculations replacing wrap_offset
4339 and prompt_invis_chars_first_line going forward. Inspired by report
4340 from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018851
4341 - update_line: use local_prompt_invis_chars to set _rl_last_c_pos
4342 correctly when on a non-terminal prompt line that contains
4343 invisible characters
4344
4345 11/7
4346 ----
4347 subst.c
4348 - get_var_and_type: allocate new memory for *valp and return it if the
4349 type is VT_ARRAYMEMBER. The callers -- all of which treat this case
4350 the same as VT_VARIABLE -- will free appropriately. Fixes problems
4351 with using parameter operations like ## on dynamic array variables,
4352 reported by Ivan Kapranov <koltiradw@yandex.ru> back on 8/31/2022
4353
4354 expr.c
4355 - change some error messages to make it clearer these are arithmetic
4356 syntax errors. These will require new translations.
4357
4358 test.c
4359 - integer_expected_error: change the message to remove `expression',
4360 since this is only called for the `test' builtin, where TEST_ARITHEXP
4361 is not in FLAGS. This will require a new translation.
4362 Reported by Emanuele Torre <torreemanuele6@gmail.com> back on
4363 6/15/2022
4364
4365 11/10
4366 -----
4367 builtins/read.def
4368 - reset_timeout: when a timer expires, make sure to cancel any
4369 readline timeout as well with rl_clear_timeout().
4370 From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1023776
4371
4372 11/11
4373 -----
4374 builtins/reserved.def
4375 - !: add short help text
4376
4377 lib/readline/complete.c
4378 - make_quoted_replacement: if readline found quote characters anywhere
4379 in the filename, but is not completing on an unclosed quoted string,
4380 and there is an application filename quoting function, let that
4381 function quote the filename if necessary
4382
4383 bashline.c
4384 - COMPLETE_DQUOTE2: new completion quoting style define
4385 - bash_expand_filename: new function, runs a filename passed to it
4386 through word expansion, suppressing command and process substitution
4387 and returns the result (in new memory if it's different than the
4388 filename argument)
4389 - bash_quote_filename: if the return value from bash_check_expchar is
4390 `$' or ``', expand the filename and if it contains characters that
4391 should be quoted, set the quoting style to COMPLETE_DQUOTE2
4392 - bash_quote_filename: if the completion quoting style is COMPLETE_DQUOTE2,
4393 use sh_mkdoublequoted to put double quotes around the entire
4394 unexpanded filename instead of using sh_double_quote, which will
4395 backslash-quote any `$'. This is a start at preserving user-supplied
4396 quotes if the (expanded) completed filename requires them. From
4397 reports by Peng Yu <pengyu.ut@gmail.com> in 5/2020 and
4398 Pedro Gimeno <pgba-da0a@personal.formauri.es> in 6/2021
4399
4400 11/14
4401 -----
4402 parse.y
4403 - report_syntax_error: if word_top is set and we reach EOF, report the
4404 starting line number in the error message. From a patch from
4405 L A Walsh <bash@tlinx.org> and Manuel Reiter <manuel.reiter@dwd.de>
4406 back in 9/2018
4407 - MAX_CASE_NEST: doubled to 256, renamed to MAX_COMPOUND_NEST
4408 - read_token_word: add `if', `while', and `until' to the set of
4409 compound commands that use WORD_TOP and WORD_LINENO (with
4410 corresponding changes to grammar productions)
4411 - [grammar]: changed check to decrement WORD_TOP to >= 0 since we
4412 start at -1 and we want to decrement back to -1 when all loops are
4413 closed
4414
4415 builtins/jobs.def
4416 - jobs_builtin: call notify_and_cleanup after displaying the status of
4417 jobs to implement POSIX requirement that `jobs' remove terminated
4418 jobs from the jobs list
4419 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/jobs.html#tag_20_62
4420
4421 11/15
4422 -----
4423 lib/sh/input_avail.c
4424 - include signal.h unconditionally, we need it for HAVE_SELECT and
4425 HAVE_PSELECT
4426 - nchars_avail: make sure we declare and use readfds and exceptfds if
4427 we have pselect or select available
4428
4429 lib/readline/input.c
4430 - rl_gather_tyi,rl_getc: need to declare and use readfds and exceptfds
4431 if HAVE_PSELECT or HAVE_SELECT is set. Report from
4432 Henry Bent <henry.r.bent@gmail.com>, fixes from
4433 Koichi Murase <myoga.murase@gmail.com>
4434
4435 11/16
4436 -----
4437 lib/sh/ufuncs.c
4438 - quit.h: include unconditionally for declaration of sigemptyset even
4439 if HAVE_SELECT is not defined
4440
4441 lib/sh/timers.c
4442 - USEC_PER_SEC: make sure it's defined even if HAVE_SELECT is not
4443
4444 lib/glob/sm_loop.c
4445 - BRACKMATCH: if an equivalence class does not match, and the next
4446 character following the class is a `]', treat that as the end of
4447 the bracket expression.
4448 Report and fix from Koichi Murase <myoga.murase@gmail.com>
4449 - GMATCH: if the current character in the string is a `/' and the
4450 current element in the pattern is a bracket expresion, and the FLAGS
4451 include FNM_PATHNAME, return FNM_NOMATCH immediately. A bracket
4452 expression can never match a slash.
4453 Report and fix from Koichi Murase <myoga.murase@gmail.com>
4454 - BRACKMATCH: if we encounter a <slash> in a bracket expression, either
4455 individually or as part of an equivalence class, nullify the bracket
4456 expression and force the `[' to be matched as an ordinary
4457 character
4458
4459 11/17
4460 -----
4461 lib/glob/sm_loop.c
4462 - BRACKMATCH: if a slash character appears as the first character
4463 after a non-matching character class or equivalence class, treat
4464 the bracket as an ordinary character that must be matched literally
4465 - BRACKMATCH: if a slash character appears as the second character
4466 of a range expression, treat the bracket as an ordinary character
4467 - BRACKMATCH: if a slash character appears in the portion of a
4468 bracket expression that already matched, treat the bracket as an
4469 ordinary character
4470 Updates from Koichi Murase <myoga.murase@gmail.com>
4471 - BRACKMATCH: if a range expression is incomplete (no end char),
4472 treat the bracket as an ordinary character
4473
4474 11/18
4475 -----
4476 doc/bashref.texi
4477 - Reporting Bugs: add mention of the Savannah project page. Suggested
4478 by Loïc Yhuel <loic.yhuel@gmail.com>
4479
4480 11/20
4481 -----
4482 builtins/common.h
4483 - SEVAL_NOOPTIMIZE: new flag for parse_and_execute: means don't try to
4484 optimize forks out of any simple or conditional commands
4485
4486 builtins/evalstring.c
4487 - parse_and_execute: if FLAGS includes SEVAL_NOOPTIMIZE, don't try to
4488 call can_optimize_connection to optimize away forks from AND_AND or
4489 OR_OR commands
4490
4491 builtins/eval.def,trap.c,parse.y,jobs.c
4492 - parse_and_execute: include SEVAL_NOOPTIMIZE in any calls to
4493 parse_and_execute. Fixes bug reported by
4494 Frode Nordahl <frode.nordahl@canonical.com>
4495
4496 11/21
4497 -----
4498 lib/readline/readline.c
4499 - readline_initialize_everything: use xmalloc to initialize
4500 rl_executing_keyseq, since we use xrealloc to reallocate it and
4501 don't check it for NULL anywhere
4502
4503 subst.c
4504 - parameter_brace_expand_word: make sure to update *ESTATEP and pass
4505 ES back to the caller even if array_value returns NULL. Fixes
4506 memory leak referencing unset associative array elements reported
4507 by Ralf Oehler <Ralf@Oehler-Privat.de>; fix from
4508 Koichi Murase <myoga.murase@gmail.com>
4509
4510 11/22
4511 -----
4512 lib/glob/sm_loop.c
4513 - BRACKMATCH: if a backslash appears before a slash in a bracket
4514 expression, treat the whole thing as literal and try to match the
4515 open bracket
4516 - BRACKMATCH: if a bracket expression ends in an unquoted backslash,
4517 try to match the left bracket literally and go on. More discussion with
4518 Koichi Murase <myoga.murase@gmail.com>
4519
4520 execute_cmd.c
4521 - execute_in_subshell: don't try to optimize away forks in the command
4522 if the subshell command is being timed or its return value is being
4523 inverted. Report from Dabrien 'Dabe' Murphy <dabe@dabe.com>
4524
4525 11/23
4526 -----
4527 lib/readline/complete.c
4528 - __WIN32__: remove uses of this preprocessor symbol, use _WIN32
4529
4530 lib/readline/rldefs.h
4531 - Don't define NEW_TTY_DRIVER on _WIN32. Fix from
4532 sparrowhawk996@gmail.com
4533
4534 include/posixselect.h
4535 - include "posixtime.h" instead of <sys/time.h> so the right guards
4536 are present
4537
4538 builtins/read.def
4539 - read_builtin_timeout: make sure we don't try to call shtimer_select
4540 if HAVE_SELECT isn't define; it won't be compiled in
4541
4542 include/stdc.h
4543 - restrict: make sure we have a definition if __STDC__ is not defined
4544
4545 include/posixtime.h,lib/sh/gettimeofday.c
4546 - gettimeofday: make sure the function signature matches POSIX by
4547 adding `restrict'
4548
4549 11/25
4550 -----
4551 include/posixselect.h
4552 - don't try to define HAVE_SELECT at all if _WIN32 is defined
4553
4554 lib/readline/kill.c
4555 - define WIN32_LEAN_AND_MEAN for the windows-specific paste function
4556
4557 lib/readline/rlprivate.h
4558 - _rl_timeout_select: only include declaration if HAVE_SELECT or
4559 HAVE_PSELECT are defined
4560
4561 11/28
4562 -----
4563 lib/readline/input.c
4564 - rl_gather_tyi: call rl_input_available_hook after FIONREAD test,
4565 let the application hook into whether or not there are characters
4566 to read
4567
4568 execute_cmd.c
4569 - execute_function: if the maximum function nesting level is exceeded,
4570 run the unwind-protects before jumping back to top level. Report
4571 from felix <felix@f-hauri.ch>
4572
4573 variables.c
4574 - find_variable_nameref_for_create,find_variable_nameref_for_assignment:
4575 handle find_variable_nameref returning &nameref_maxloop_value, return
4576 NULL and print a warning message in that case
4577 - find_variable_nameref: return &namref_maxloop_value instead of NULL
4578 if the number of resolution cycles exceeds NAMEREF_MAX; change
4579 callers to print a new error message in this case; no other change
4580 in behavior. From a 4/2020 suggestion from Andrej Podzimek
4581 <andrej@podzimek.org>
4582 - find_variable_nameref_context, find_nameref_at_context,
4583 find_variable_last_nameref_context: make sure to return
4584 &nameref_maxloop_value consistently and handle getting it as a
4585 return value from other functions
4586
4587 11/29
4588 -----
4589 lib/readline/display.c
4590 - _rl_update_final: if there is only one line (_rl_vis_botlin == 0)
4591 and that line is empty (botline_length == 0), assume there is no
4592 prompt and the line has no contents, so output the CR/LF to indicate
4593 that the newline has been read. From a report from
4594 Kevin Pulo <kev@pulo.com.au>
4595
4596 11/30
4597 -----
4598 builtins/evalstring.c
4599 - parse_and_execute: if we are executing the eval builtin, and the
4600 return status from the command is suppressed (builtin_ignoring_errexit),
4601 set CMD_IGNORE_RETURN in the parsed command's flags. From a report
4602 from Tycho Kirchner <tychokirchner@mail.de>
4603
4604 12/1
4605 ----
4606 lib/glob/sm_loop.c
4607 - PARSE_SUBBRACKET: a reworked PARSE_COLLSYM, generalized to handle
4608 [:, [=, and [. special bracket expressions
4609 - BRACKMATCH: change to use PARSE_SUBBRACKET consistently to parse
4610 [:, [=, and [. special bracket expressions
4611 - PATSCAN: takes new FLAGS arg, changed all callers to just pass the
4612 flags they get through to PATSCAN
4613 - PATSCAN: call PARSE_SUBBRACKET for [:, [=, and [. to treat them
4614 consistently (uses FLAGS argument here)
4615 - PATSCAN: handle FNM_NOESCAPE appearing in FLAGS argument
4616 This set of fixes contributed by Koichi Murase <myoga.murase@gmail.com>
4617
4618 lib/glob/{glob,gmisc}.c
4619 - PATSCAN: change all callers to add extra flags arg of 0
4620
4621 doc/{bash.1,bashref.texi}
4622 - trap description: replace ARG with ACTION
4623 - clarify the language describing what trap without arguments and
4624 trap -p without arguments display
4625 - clarify that trap in non-interactive shells does not allow signals
4626 that were ignored at shell start to be trapped; interactive shells
4627 allow this
4628 - trap: add missing command types to the description of when the
4629 DEBUG trap is executed
4630
4631 builtins/trap.def
4632 - LONG_DOC: replace ARG with ACTION
4633 - make it clear that trap and trap -p without arguments display a
4634 information about specified signals, but in a form that may be
4635 reused as shell input
4636
4637 12/5
4638 ----
4639 pcomplete.c
4640 - compgen_compspec: new flag saying whether or not we're running via
4641 the compgen builtin or via programmable completion: set to 0
4642 every time gen_progcomp_completions runs, set to 1 in
4643 gen_compspec_completions if this_shell_builtin == compgen_builtin
4644 - gen_shell_function_completions: call rl_clear_signals and
4645 rl_set_signals so the shell's signal handlers are active when
4646 running shell functions to generate completions. We try to do it
4647 only when programmable completion, not the compgen builtin, is active.
4648 Idea from Koichi Murase <myoga.murase@gmail.com>, fixes bug
4649 reported in 9/22
4650
4651 sig.c
4652 - sigint_sighandler, termsig_sighandler: since these can now be called
4653 during programmable completion, we need to set the readline signal
4654 event hook if the readline state includes RL_STATE_DISPATCHING or
4655 RL_STATE_COMPLETING, since we can't rely on RL_STATE_SIGHANDLER
4656 being set and we want to call throw_to_top_level here
4657 - throw_to_top_level: if the shell is interactive, before calling
4658 bashline_reset (which zeroes rl_signal_event_hook), call
4659 rl_cleanup_after_signal if we think readline hasn't called it
4660 already
4661
4662 12/9
4663 ----
4664 configure.ac
4665 - add "LOCAL_LDFLAGS = -rdynamic" for freebsd/openbsd/netbsd. Reported
4666 by Christian Weisgerber <naddy@mips.inka.de>
4667
4668 12/12
4669 -----
4670 subst.c
4671 - parameter_brace_expand_length: handle namerefs with values that are
4672 valid length expansion expressions but invalid identifiers. From
4673 ed7-aspire4925@hotmail.com via https://savannah.gnu.org/support/?110799
4674
4675 12/13
4676 -----
4677 subst.c
4678 - extract_heredoc_dolbrace_string: fix off-by-one error after calling
4679 extract_command_subst and extract_process_subst that caused it to
4680 copy one too many parsed characters. Fix for bug reported by
4681 Norbert Lange <nolange79@gmail.com>
4682
4683 12/14
4684 -----
4685 execute_cmd.c
4686 - execute_cond_node: if a regular expression fails to compile, print
4687 an error message. Report from Emanuele Torre <torreemanuele6@gmail.com>
4688 back on 6/15/2022
4689
4690 trap.c
4691 - trap_variable_context -> trap_return_context, initialize from
4692 funcnest + sourcenest instead of variable_context so we handle
4693 shell function execution and `./source', both of which can use
4694 `return'. Idea from Koichi Murase <myoga.murase@gmail.com>
4695
4696 builtins/common.c
4697 - get_exitstat: compare trap_return_context against funcnest+sourcenest,
4698 since that's how it's initialized now
4699
4700 lib/readline/readline.c
4701 - readline_internal_charloop: if we're not using the callback interface,
4702 don't restore _rl_top_level from olevel, since we will just be going
4703 around the loop again and will potentially need to use it multiple
4704 times. Report from Emanuele Torre <torreemanuele6@gmail.com>
4705
4706 12/15
4707 -----
4708 shell.h
4709 - EX_UTILERROR: new generic special builtin return status to indicate a
4710 POSIX utility error that should cause a non-interactive shell to abort
4711
4712 execute_cmd.c
4713 - builtin_status: translate EX_UTILERROR to EXECUTION_FAILURE
4714
4715 builtins/set.def
4716 - unset_builtin: return EX_UTILERROR if posix_utility_error is set;
4717 set it when trying to unset a non-identifier (variable) or a
4718 non-unsettable or readonly variable
4719
4720 12/16
4721 -----
4722 subst.c
4723 - de_backslash: now takes a second argument with the current quoting
4724 flags
4725 - de_backslash: if the quoting flags include Q_HERE_DOCUMENT and the
4726 shell is in posix mode, remove backslashes quoting double quotes
4727
4728 subst.h
4729 - de_backslash: update extern declaration
4730
4731 lib/readline/histexpand.c
4732 - history_expand_internal,get_history_word_specifier,get_subst_pattern,
4733 hist_error,history_find_word,hist_string_extract_single_quoted:
4734 now take const char * string arguments
4735
4736 lib/readline/mbutil.c
4737 - _rl_get_char_len,_rl_adjust_point,_rl_find_next_mbchar_internal,
4738 _rl_find_next_mbchar,_rl_find_prev_mbchar,_rl_find_prev_mbchar_internal,
4739 _rl_test_nonzero,_rl_find_prev_utf8char,_rl_is_mbchar_matched,
4740 _rl_compare_chars,_rl_char_value: take const char * string arguments
4741
4742 12/17
4743 -----
4744 builtins/umask.def
4745 - parse_symbolic_umask: add missing POSIX pieces:
4746 o `action' of ugo, meaning to copy portions of initial mask
4747 o multiple `op' specs as part of the action string (`u=r-w')
4748 (resets perm)
4749 o missing perm characters Xst in action string
4750 o default `who' equivalent to `a' instead of fixing up later
4751
4752 12/19
4753 -----
4754 builtins/type.def
4755 - if -a and -P are both supplied, look in the command hash table but
4756 continue and perform a $PATH search even if the NAME is hashed.
4757 From a report by Adam Vodopjan <adam.vodopjan@gmail.com>
4758
4759 doc/{bash.1,bashref.texi}
4760 - type: update description to fix it to what the code actually does
4761
4762 builtins/set.def
4763 - set_edit_mode: don't run with_input_from_stdin or with_input_from_stream
4764 unless command_execution_string is NULL. Report from
4765 Harald van Dijk <harald@gigawatt.nl>
4766
4767 12/20
4768 -----
4769 braces.c
4770 - array_concat: add a check for interrupts and terminating signals
4771 into the inner loop
4772
4773 jobs.c
4774 - without_job_control: set original_pgrp == NO_PID since we don't
4775 want to be messing with the terminal pgrp if we call end_job_control.
4776 From a report from ks1322 ks1322 <ks1322@gmail.com>
4777
4778 12/21
4779 -----
4780 include/{posixtime.h,systimes.h,shmbutil.h,shtty.h}
4781 - PARAMS: remove
4782
4783 12/22
4784 -----
4785 builtins/evalfile.c
4786 - _evalfile: add SEVAL_NOOPTIMIZE to the parse_and_execute flags
4787 (maybe overkill, but safer). From a report by
4788 Dan Church <h3xx@gmx.com> and Oguz <oguzismailuysal@gmail.com>
4789
4790 lib/sh/gettimeofday.c
4791 - gettimeofday: added code for _WIN32 version
4792
4793 12/27
4794 -----
4795 doc/{bash.1,bashref.texi},builtins/printf.def
4796 - specify the valid format characters as a subset of what printf(3)
4797 specifies, note that the %n format specifier takes a variable name
4798 as an argument. Suggestion from Emanuele Torre <torreemanuele6@gmail.com>
4799
4800 12/28
4801 -----
4802 {xmalloc,variables,unwind_prot,trap,test,subst,sig,siglist,shell,redir,
4803 pcomplete,pathexp,make_cmd,mailcheck,jobs,input,hashcmd,hashlib,general,
4804 flags,findcmd,externs,execute_cmd,error,dispose_cmd,command,bashline,
4805 bashhist,assoc,arrayfunc,array,alias}.h
4806 {version,version2}.c
4807 - PARAMS: remove for ANSI C-ification
4808
4809 builtins/{getopt,common,bashgetopt}.h
4810 builtins/{mkbuiltins,gen-helpfiles,psize,psize-posix}.c
4811 builtins/{evalstring,bashgetopt,common,evalfile,getopt}.c
4812 builtins{alias,bind,break,cd,command,complete,declare,enable,exit,fc,
4813 fg_bg,getopts,hash,help,history,jobs,kill,mapfile,printf,pushd,read,set,
4814 shopt,source,suspend,trap,type,ulimit,umask,wait}.def
4815 - PARAMS: remove for ANSI C-ification
4816
4817 lib/malloc/{watch,table,shmalloc,mstats,imalloc}.h
4818 lib/malloc/{malloc,stats,table,trace}.c
4819 - PARAMS: remove for ANSI C-ification
4820
4821 lib/glob/{glob,strmatch}.h
4822 lib/glob/{glob,glob_loop,gmisc,sm_loop,smatch,strmatch,xmbsrtowcs}.c
4823 - PARAMS: remove for ANSI C-ification
4824
4825 lib/intl/{eval-plural,plural-exp,loadinfo,hash-string,gettextP}.h,
4826 lib/intl{plural.y,plural.c},
4827 lib/intl/{finddomain,bindtextdom,dcigettext,l10nflist,loadmsgcat,localealias,plural-exp}.c
4828 - PARAMS: remove for ANSI C-ification
4829 - STATIC -> static
4830 - internal_function -> inline
4831
4832 lib/sh/{casemod,clock,eaccess,fnxform,fpurge,makepath,mktime,netopen,pathphys,random,shquote,snprintf,spell,strtod,strtoimax,strtoumax,times,timeval,tmpfile,unicode,winsize,zcatfd,zgetline,zmapfd}.c
4833 - PARAMS: remove for ANSI C-ification
4834
4835 support/{bashversion.c,mkversion.sh,mksignames.c}
4836 - PARAMS: remove for ANSI C-ification
4837
4838 lib/sh/{clock,strchrnul,getcwd,times,rename,inet_aton,strdup,strerror,strnlen
4839 strpbrk,strtod,strtoimax,strtol,strtoumax,wcsdup,wcsnwidth,wcswidth,strcasecmp,
4840 strcasestr}.c
4841 - C89-style function declarations
4842
4843 lib/malloc/{alloca,malloc,stats,table,trace,xmalloc}.c
4844 - C89-style function declarations
4845
4846 12/29
4847 -----
4848 lib/glob/{glob,glob_loop,gmisc,sm_loop,smatch,strmatch,xmbsrtowcs}.c
4849 - C89-style function declarations
4850
4851 lib/sh/{zcatfd,zgetline,zmapfd,zread,zwrite,winsize,vprint,uconvert,ufuncs,
4852 unicode,utf8}.c
4853 lib/sh/{stringlist,stringvec,strtrans,strvis,timeval,tmpfile}.c
4854 lib/sh/{setlinebuf,shmatch,shmbchar,shquote,shtty,snprintf,spell}.c
4855 lib/sh/{random,pathcanon,pathphys,oslib,netconn,netopen}.c
4856 lib/sh/{mailstat,makepath,mbscasecmp,mbschr,mbscmp,mktime}.c
4857 lib/sh/{input_avail,itos,getenv,fmtulong,fnxform,eaccess,dprintf,casemod,clktck}.c
4858 - C89-style function declarations
4859
4860 examples/loadables/{accept,asort,basename,bcat,cat,csv,cut,dirname,dsv}.c
4861 examples/loadables/{fdflags,finfo,head,hello,id,lcut,ln}.c
4862 examples/loadables/{mkdir,mkfifo,mktemp,mypid,necho,pathchk}.c
4863 examples/loadables/{print,printenv,push,realpath,rm,rmdir,seq}.c
4864 examples/loadables/{setpgid,stat,strftime,sync,tee,template,truefalse,tty}.c
4865 examples/loadables/{uname,unlink,whoami}.c
4866 - C89-style function declarations
4867
4868 xmalloc.c, array2.c, list.c, dispose_cmd.c, copy_cmd.c, bracecomp.c, mksyntax.c
4869 - PARAMS: remove for ANSI C-ification
4870 - C89-style function declarations
4871
4872 12/30
4873 -----
4874 hashlib.c,assoc.c,input.c,hashcmd.c,alias.c,alias.h,array.c,flags.c,pcomplib.c,
4875 pcomplib.h,locale.c
4876 variables.c,arrayfunc.c,bashhist.c,bashline.c,error.c,pathexp.c,nojobs.c,
4877 stringlib.c,eval.c,findcmd.c,mailcheck.c,make_cmd.c,shell.c,print_cmd.c,
4878 general.c,expr.c
4879 - PARAMS: remove for ANSI C-ification
4880 - C89-style function declarations
4881 - add `const' and `inline' where it makes sense
4882
4883 12/31
4884 -----
4885 test.c,execute_cmd.c,parse.y,pcomplete.c,trap.c,subst.c,braces.c,jobs.c,sig.c
4886 builtins/{evalstring.c,gen-helpfiles.c,mkbuiltins.c}
4887 builtins/{alias.def,bind.def,break.def,builtin.def,caller.def,cd.def,colon.def}
4888 builtins/{command.def,complete.def,declare.def,echo.def,enable.def,eval.def}
4889 builtins/{exec.def,exit.def,fc.def,fg_bg.def,hash.def,help.def,history.def}
4890 builtins/{jobs.def,kill.def,let.def,mapfile.def,printf.def,pushd.def,read.def}
4891 builtins/{return.def,set.def,setattr.def,shift.def,shopt.def,source.def}
4892 builtins/{suspend.def,test.def,times.def,trap.def,type.def,ulimit.def}
4893 builtins/{umask.def,wait.def}
4894 - PARAMS: remove for ANSI C-ification
4895 - C89-style function declarations
4896 - add `const' and `inline' where it makes sense
4897
4898 1/2/2023
4899 --------
4900 lib/sh/{stringvec.c,inet_aton.c,strnlen.c,spell.c,netopen.c,stringlist.c}
4901 lib/sh/{strtrans.c,tmpfile.c,uconvert.c,zcatfd.c}
4902 builtins/{common.c,common.h}
4903 mailcheck.c,bashline.c,pathexp.c,stringlib.c,locale.c,pcomplete.c,redir.c
4904 test.c,trap.c,variables.c,bashhist.c,expr.c,arrayfunc.c,assoc.c,variables.c
4905 subst.c,findcmd.c
4906 arrayfunc.h,variables.h,findcmd.h,bashline.h,trap.h,pathexp.h,externs.h,
4907 pcomplete.h,bashhist.h,assoc.h,general.h,subst.h
4908 - more `const' changes, remove `register'
4909
4910 1/3
4911 ---
4912 parse.y
4913 - more `const' changes, remove `register'
4914
4915 variables.h
4916 - VARLIST: list_len and list_size now size_t
4917
4918 variables.c
4919 - vlist_alloc: take size_t parameter, changed callers
4920 - vlist_realloc: take size_t parameter, changed callers
4921
4922 lib/sh/stringvec.c,externs.h
4923 - functions that take int size params now take size_t
4924 - strvec_len: returns size_t
4925
4926 lib/sh/stringlist.c,externs.h
4927 - STRINGLIST: list_size and list_len now size_t
4928 - functions that take int size params now take size_t
4929
4930 variables.c,bashline.c,builtins/bind.def
4931 - change strvec_ int parameters to size_t where it makes sense
4932 - change strlist_ int parameters to size_t where it makes sense
4933
4934 builtins/shopt.def
4935 - reset_shopt_options: set glob_always_skip_dot_and_dotdot to 1,
4936 since that's the current default in lib/glob/glob.c
4937
4938 1/4
4939 ---
4940 execute_cmd.c,parse.y,general.c,make_cmd.c,print_cmd.c,variables.c,expr.c
4941 jobs.c,subst.c,input.c,unwind_prot.c,pathexp.c,pathexp.h,alias.c,bashline.c
4942 bashhist.c,lib/sh/shquote.c,externs.h,stringlib.c,locale.c,findcmd.c
4943 builtins/common.c,builtins/declare.def,builtins/enable.def,builtins/fc.def
4944 lib/sh/zmapfd.c,builtins/help.def,builtins/mapfile.def,builtins/read.def
4945 builtins/shopt.def,lib/glob/glob.c,lib/glob/smatch.c,lib/glob/sm_loop.c
4946 lib/glob/xmbsrtowcs.c,lib/glob/gmisc.c,lib/glob/gm_loop.c
4947 lib/sh/getenv.c,lib/sh/makepath.c,lib/sh/pathphys.c,lib/sh/tmpfile.c
4948 lib/sh/stringlib.c,lib/sh/spell.c,lib/sh/strtrans.c,lib/sh/zgetline.c
4949 lib/sh/mbscasecmp.c,lib/sh/utf8.c
4950 lib/readline/readline.c,lib/readline/rlprivate.h,lib/readline/vi_mode.c
4951 lib/readline/complete.c,lib/readline/bind.c,lib/readline/isearch.c
4952 lib/readline/util.c,lib/readline/kill.c,lib/readline/macro.c
4953 lib/readline/text.c,lib/readline/histexpand.c,lib/readline/histfile.c
4954 lib/readline/mbutil.c,lib/tilde/tilde.c
4955 - size_t changes
4956 - remove some unused variables
4957 - remove `register'
4958
4959 1/5
4960 ---
4961 builtins/getopt.c
4962 - sh_getopt_restore_state: make sure argv[sh_curopt] is non-null before
4963 using it
4964
4965 parse.y
4966 - CHECK_FOR_RESERVED_WORD: make sure to set word_top appropriately if
4967 the last token was IF, WHILE, or UNTIL, since these tokens can follow
4968 those reserved words
4969
4970 Makefile.in
4971 - ubsan: new target, to build with gcc/clang UBSan undefined behavior
4972 sanitizer
4973
4974 1/6
4975 ---
4976 execute_cmd.[ch],locale.c,parse.y,expr.c,bracecomp.c,bashline.c,externs.h
4977 stringlib.c,general.[ch]
4978 builtins/{subst.c,array.c,echo.def,printf.def,enable.def,help.def,set.def}
4979 lib/sh/{strtrans.c,stringvec.c,shquote.c}
4980 lib/glob/sm_loop.c
4981 lib/readline/{vi_mode.c,histfile.c,funmap.c,complete.c,display.c,bind.c,isearch.c}
4982 lib/tilde/tilde.c
4983 - final code cleanups for ANSI C and lint/ubsan/asan runs
4984
4985 1/7
4986 ---
4987 lib/readline/complete.c
4988 - rl_complete_internal: when computing nontrivial_lcd and the length
4989 of the text from the line buffer, dequote the text from the line
4990 buffer before comparing it against the common prefix of the matches
4991 (matches[0]), so we don't get spurious mismatches if the quoted text
4992 from the line is longer than the unquoted match. Report from
4993 Martin Castillo <castilma@uni-bremen.de>
4994
4995 input.[ch]
4996 - get_buffered_stream(fd): new function, return the BUFFERED_STREAM *
4997 corresponding to file descriptor FD, if it exists
4998
4999 1/8
5000 ---
5001 parse.y
5002 - shell_getc: if yy_getc returns EOF but the buffered stream input
5003 indicates an error state, set shell_input_line_terminator to
5004 READERR. Currently treated the same as EOF.
5005
5006 1/10
5007 ----
5008 lib/sh/random.c
5009 - intrand32: use % operator instead of (mathematically equivalent)
5010 subtraction and multiplication, which can cause signed 32-bit
5011 overflow. Report from Sam James <sam@gentoo.org>
5012
5013 lib/readline/input.c
5014 - rl_getc: if the application hasn't defined a signal event handler,
5015 and readline is in callback mode, make sure SIGINT breaks out of
5016 operations like incremental and non-incremental searches and digit
5017 arguments by calling _rl_abort_internal, since the callback code
5018 expects the various contexts that rl_callback_sigcleanup() resets
5019 to be valid
5020 - rl_getc: if there is a pending signal when we enter the while loop
5021 in callback mode, handle it in the same way we would if a signal
5022 arrived while we were waiting in select/pselect. That forces
5023 callback mode to call _rl_abort_internal in the right place.
5024 From a report from Andrew Burgess <aburgess@redhat.com>
5025
5026 1/13
5027 ----
5028 trap.c
5029 - SIG_ASYNCSIG: new value for sigmodes; means that the signal is
5030 ignored because an async command is being executed
5031 - set_signal: if the original signal disposition is SIG_IGN only
5032 return if SIG_ASYNCSIG isn't set. This implements POSIX interp 751
5033 for setting a trap
5034 - ignore_signal: if we're ignoring a signal that already has SIG_IGNORED
5035 set, make sure we set SIG_TRAPPED in case of SIG_ASYNCSIG (POSIX
5036 interp 751)
5037 - reset_signal,restore_signal: if we want to reset or restore a signal
5038 that has SIG_ASYNCSIG set, make sure we reset to SIG_DFL if the
5039 signal is trapped to maintain POSIX semantics
5040 - set_signal_async_ignored: new function to set original_signals to
5041 SIG_IGN and set the SIG_IGNORED and SIG_ASYNCSIG sigmode flags; used
5042 by setup_async_signals
5043 - signal_is_async_ignored: return true if the SIG argument is being
5044 ignored because it's part of an async list
5045
5046 trap.h
5047 - set_signal_async_ignored,signal_is_async_ignored: extern declarations
5048
5049 sig.c
5050 - initialize_terminating_signals: if a signal is ignored because it's
5051 part of an async list, don't bother trying to initialize or set the
5052 hard ignored flag
5053
5054 execute_cmd.c
5055 - execute_simple_command: if we're executing a builtin or function
5056 asynchronously, call reset_terminating_signals like we do in
5057 execute_in_subshell()
5058 - execute_subshell_builtin_or_function: only call set_sigint_handler
5059 if async is 0, so we don't undo the work done by setup_async_signals.
5060 If the old handler is SIG_IGN and the signal has SIG_ASYNCSIG set
5061 and isn't trapped, restore the old handler
5062 - setup_async_signals: call set_signal_async_ignored to set the right
5063 flags
5064
5065 1/16
5066 ----
5067 parse.y
5068 - read_token_word: if we're in posix mode, and we find a reserved word
5069 before checking a token for aliases, turn off the `check next word
5070 for aliases' flag (PST_ALEXPNEXT). This is for compatibility with
5071 other shells. From a report by <anonymous4feedback@outlook.com>
5072 - shell_getc: make sure the shell is reading a buffered stream before
5073 checking the default buffered stream for errors if yy_getc returns 0
5074
5075 1/17
5076 ----
5077 subst.c
5078 - split_at_delims: if the cursor is at whitespace just preceding a
5079 word, and we're doing this for completion (e.g., to build COMP_WORDS),
5080 force the creation of an empty word and set the current word to it.
5081 This is a change from previous behavior, but a useful one: it makes
5082 COMP_WORDS[COMP_CWORD] and $2 to a completion function consistent
5083 and the same as the word readline wants to complete. From a report
5084 from Naim Favier <n@monade.li> back in 6/2022
5085
5086 parse.y
5087 - read_token: turn off PST_ALEXPNEXT if we read a shell metacharacter:
5088 we will expand aliases anyway if the token puts the shell in a
5089 command word position and we took pains to turn it off for
5090 redirection tokens; remove special cases that turned it off
5091 - pop_string: don't turn off PST_ALEXPNEXT if it's on; this is what
5092 prevents it from being enabled if an alias expansion of more than
5093 two aliases ends with a space. Fixes issue reported by
5094 <anonymous4feedback@outlook.com>
5095
5096 1/18
5097 ----
5098 jobs.c
5099 - wait_for: if we are reaping a background job, don't bother trying to
5100 give the terminal back to shell_pgrp -- we never set the terminal's
5101 pgrp to that job in the first place. Fixes issue reported by
5102 Steffen Nurpmeso <steffen@sdaoden.eu>
5103
5104 1/19
5105 ----
5106 lib/readline/{histexpand.c,history.h}
5107 - history_expand: first argument is now `const char *'. Request from
5108 Simon Marchi <simon.marchi@polymtl.ca>
5109
5110 lib/readline/doc/{history.3,hstech.texi}
5111 - history_expansion: change description to note new const first arg
5112
5113 1/21
5114 ----
5115 lib/readline/input.c
5116 - rl_gather_tyi: move call to rl_input_available_hook to the top,
5117 giving it first shot. There's still no way for it to set chars_avail.
5118 Conditionalize the rest of the input methods based on whether the
5119 result == -1.
5120
5121 lib/readline/rl_private.h
5122 - move the decision making about RL_TIMEOUT_USE_SELECT/RL_TIMEOUT_USE_SIGALRM
5123 here from input.c
5124
5125 1/23
5126 ----
5127 trap.c
5128 - restore_default_signal: if we have a signal that's not trapped, but
5129 is a signal that is set to SIG_ASYNCSIG, POSIX interp 751 requires
5130 the shell to allow it to be reset to the default, even though it
5131 wasn't already trapped
5132
5133 subst.c
5134 - do_assignment_internal: don't allocate new memory for NAME, just
5135 modify and restore it in place
5136
5137 1/25
5138 ----
5139 lib/readline/histfile.c
5140 - history_write_slow: a fallback function that uses stdio to write the
5141 history list to a supplied file descriptor
5142 - history_do_write: call history_write_slow if ftruncate/mmap/malloc
5143 fail; hope the simpler approach works
5144
5145 1/27
5146 ----
5147 general.[ch]
5148 - valid_function_name: new function, returns non-zero if the name
5149 can be used as a function name without the `function' prefix
5150
5151 print_cmd.c
5152 - named_function_string,print_function_def: use valid_function_name so
5153 the rules about when to use the `function' reserved word are
5154 consistent
5155
5156 builtins/trap.def
5157 - new option -P, which prints only the action associated with each
5158 signal spec argument
5159
5160 doc/{bash.1,bashref.texi}
5161 - trap: document new -P option, add note that trap -p or trap -P in a
5162 subshell can print the parent's traps
5163
5164 1/28
5165 ----
5166 parse.y
5167 - shell_getc: make sure references to shell_input_line_property are
5168 protected by #ifdef HANDLE_MULTIBYTE. From
5169 https://savannah.gnu.org/patch/?10309
5170
5171 print_cmd.c
5172 - named_function_string,print_function_def: don't copy the function
5173 COMMAND * before printing it as text; unwind-protect any redirects
5174 attached to the function body
5175
5176 parse.y
5177 - PST_CMDBLTIN: new parser state, means the previous token word was
5178 `command' in a command position
5179 - read_token_word: in posix mode, "command" followed by a declaration
5180 utility preserves the declaration utility status of the following
5181 word, so we mark that state and then check a word for being an
5182 assignment builtin if in that state on the next call. This makes
5183 compound assignments to builtins that accept them (e.g., `declare')
5184 work as if `command' were not present. This is a POSIX issue 8
5185 requirement
5186 - read_token: turn off PST_CMDBLTIN state as appropriate
5187
5188 subst.c
5189 - use locale_mb_cur_max instead of MB_CUR_MAX consistently
5190
5191 2/1
5192 ---
5193 builtins/printf.def
5194 - printf_builtin: %q and %Q use the `alternate form' flag to force
5195 single quoting instead of backslash quoting. $'...' is still
5196 preferred if there are characters that require it
5197 - getwidestr, getwidechar: functions to take a possibly multibyte
5198 character string and convert to a wide character string or a wide
5199 character, respectively
5200 - convwidestr, convwidechar: functions to take a wide character string
5201 or single character, apply any precision, convert back to a multibyte
5202 character string, and return the result for printing
5203 - printf_builtin: consistently print an error message if printstr()
5204 returns < 0, since it will only do that if ferror(stdout) is true;
5205 let the PRETURN macro do that if appropriate, so we don't duplicate
5206 code
5207
5208 2/2
5209 ---
5210 builtins/printf.def
5211 - printwidestr: wide-character version of printstr; understands
5212 fieldwidth and precision as characters instead of bytes
5213 - printf_builtin: interpret %ls and %lc as referring to wide strings
5214 and characters, respectively; use printwidestr to print the wide-
5215 character string obtained from the (presumably multibyte) argument.
5216 Fieldwidth and precision are characters, not bytes
5217
5218 2/3
5219 ---
5220 builtins/set.def
5221 - unset_builtin: since tokenize_array_reference modifies its NAME
5222 argument, we need to restore the original word if there is no
5223 array variable found with that name, so we can go ahead and try to
5224 unset a function with that wonky name. Inspired by a report from
5225 Emanuele Torre <torreemanuele6@gmail.com>
5226
5227 parse.y
5228 - read_token_word: don't set the W_HASDOLLAR flag in the returned WORD
5229 for <(command) and >(command). That way they can be used in function
5230 names.
5231
5232 execute_cmd.c
5233 - execute_simple_command: if in posix mode, don't perform function
5234 lookup for command names that contain a slash
5235
5236 builtins/enable.def
5237 - dyn_load_builtins: don't allow dynamically loaded builtins to have
5238 slashes in their name
5239
5240 2/4
5241 ---
5242 general.c
5243 - valid_function_word: new function, used to check whether a word can
5244 be used as a function name. Replaces call to check_identifier();
5245 incorporates POSIX interp 383 check for special builtin so we can
5246 move it out of execute_intern_function().
5247 - valid_function_name: use the FLAGS argument instead of POSIXLY_CORRECT;
5248 only reject reserved words if FLAGS&1
5249
5250 execute_cmd.c
5251 - execute_intern_function: call valid_function_word() instead of
5252 check_identifier(); remove check for special builtin that
5253 valid_function_word performs
5254
5255 print_cmd.c
5256 - print_function_def,named_function_string: pass POSIXLY_CORRECT to
5257 valid_function_name as the FLAGS argument
5258
5259 2/6
5260 ---
5261 subst.c
5262 - expand_subscript_string: don't set W_NOTILDE in td.flags so we
5263 perform `normal' tilde expansion (expansion at the start of the
5264 word) on the array subscript
5265 - expand_oneword,expand_compound_assignment_word: change second arg to
5266 ATYPE, which better reflects its use
5267
5268 arrayfunc.c
5269 - assign_assoc_from_kvlist,assign_compound_array_list,expand_and_quote_assoc_word:
5270 use expand_assignment_string_to_string instead of expand_subscript_string
5271 for the rhs of the assignment or the second word in the kvpair to
5272 be more consistent with how assignment statements behave (e.g.,
5273 tilde expansion). Fixes issue reported by maroloccio@gmail.com
5274
5275 2/7
5276 ---
5277 parse.y
5278 - discard_until: now returns the last character read. If we get an
5279 EOF while processing a comment, return EOF (rarely happens;
5280 shell_getc returns EOF only under certain circumstances)
5281 - read_token: if discard_until returns EOF, return yacc_EOF
5282
5283 input.h
5284 - bclearerror: new macro, clears the B_ERROR flag in the buffered
5285 stream BP
5286
5287 input.c
5288 - b_fill_buffer: try making errors `sticky': if the B_ERROR flag is
5289 set for the buffered stream, return EOF immediately. This is similar
5290 to what stdio does
5291
5292 builtins/fc.def
5293 - fc_builtin: in posix mode, if there are extra arguments supplied to
5294 -s (e.g. pat=rep first last), throw an error
5295
5296 doc/{bash.1,bashref.texi}
5297 - printf: document new altform for %q/%Q and %ls/%lc
5298
5299 2/8
5300 ---
5301 bashline.c
5302 - set_up_new_line: if the new line doesn't change rl_line_buffer,
5303 just return right away without changing rl_point. Affects
5304 alias-expand-line, history-expand-line, and history-and-alias-expand-line.
5305 Inspired by a report from
5306 Addison Brendtro <addison.brendtro@gmail.com>
5307
5308 builtins/declare.def
5309 - declare_internal: make multiple calls to `local -' at the same
5310 context have no effect after the first one. That way we don't keep
5311 overwriting the saved option set. Report and fix from
5312 Emanuele Torre <torreemanuele6@gmail.com>
5313
5314 2/10
5315 ----
5316 execute_cmd.[ch]
5317 - bind_lastarg: now a public function
5318
5319 parse.y
5320 - execute_variable_command: call bind_lastarg instead of bind_variable
5321 to avoid exporting $_ if allexport is set. Fix from
5322 Emanuele Torre <torreemanuele6@gmail.com>
5323 - history_delimiting_chars: if we're parsing some kind of delimited
5324 construct that's *not* a quoted string, don't bother adding an extra
5325 newline to the history if the current history entry already ends in
5326 a newline. From https://savannah.gnu.org/support/?110838 via
5327 Ganapathi Kamath <hgkamath@hotmail.com>
5328
5329 2/13
5330 ----
5331 bashline.c
5332 - set_up_new_line: add some more heuristics to try and usefully
5333 position rl_point
5334
5335 2/16
5336 ----
5337 lib/readline/complete.c
5338 - complete_fncmp: fix for case mapping `-' and `_' if the bytes do not
5339 form a valid multibyte character
5340
5341 lib/readline/util.c
5342 - new functions: _rl_strcaseeqn, like strcasencmp but with a flag to
5343 handle character mapping (-_) like completion-map-case wants, and
5344 _rl_charcasecmp, to do the same thing for two characters.
5345 Inspired by a patch from Brennan Vincent <brennan@umanwizard.com>
5346
5347 lib/readline/mbutil.c
5348 - new functions: _rl_mb_strcaseeqn and _rl_mb_charcasecmp, multibyte
5349 versions of the above
5350 Inspired by a patch from Brennan Vincent <brennan@umanwizard.com>
5351
5352 lib/readline/{rlprivate.h,rlmbutil.h}
5353 - extern declarations for the above functions
5354
5355 lib/readline/complete.c
5356 - complete_fncmp: use _rl_mb_strcaseeqn and _rl_strcaseeqn as
5357 appropriate, remove duplicated inline code
5358 Inspired by a patch from Brennan Vincent <brennan@umanwizard.com>
5359
5360 lib/readline/{isearch.c,rlprivate.h}
5361 - _rl_search_case_fold: new variable, will be used to indicate case-
5362 insensitive incremental and non-incremental searches
5363
5364 lib/readline/bind.c
5365 - search-ignore-case: new bindable variable, tied to _rl_search_case_fold
5366 Inspired by a patch from Brennan Vincent <brennan@umanwizard.com>
5367
5368 lib/sh/mbsncmp.c
5369 - mbsncmp(3) replacement
5370
5371 lib/readline/isearch.c
5372 - _rl_isearch_dispatch: honor `search-ignore-case' variable and perform
5373 case-insensitive incremental searches if it's set
5374 Inspired by a patch from Brennan Vincent <brennan@umanwizard.com>
5375
5376 lib/readline/histlib.h
5377 - CASEFOLD_SEARCH: new flag for history searching, means to search
5378 strings case-insensitively
5379
5380 lib/readline/histsearch.c
5381 - history_search_internal: anchored searches honor CASEFOLD_SEARCH
5382
5383 lib/readline/histsearch.c
5384 - history_search_internal: searches now honor CASEFOLD_SEARCH
5385 - _hs_history_search: new function, just external interface to
5386 history_search_internal, allows the rest of the library to specify
5387 search flags
5388
5389 lib/readline/histlib.h
5390 - _hs_history_search: extern declaration
5391
5392 lib/readline/search.c
5393 - noninc_search_from_pos: use _hs_history_search, add CASEFOLD_SEARCH
5394 to flags if _rl_search_case_fold is non-zero
5395
5396 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
5397 - search-ignore-case: document new bindable variable
5398
5399 2/17
5400 ----
5401 config-top.h
5402 - PATSUB_REPLACE_DEFAULT: macro set to 1 or 0 to set the default value
5403 of `patsub_replacement'. Can be overridden by -DPATSUB_REPLACE_DEFAULT=0
5404 in the `make' command
5405
5406 builtins/shopt.def
5407 - reset_shopt_options: reset patsub_replacement to PATSUB_REPLACE_DEFAULT
5408
5409 subst.c
5410 - patsub_replacement: initialize to PATSUB_REPLACE_DEFAULT
5411
5412 parse.y
5413 - shell_getc: only call clearerr(stdin) when yy_stream_get returns EOF
5414 if the shell is currently interactive (interactive != 0)
5415 - shell_getc: if the shell is not interactive (interactive_shell == 0)
5416 and using stdio to read the script (bash_input.type == st_stream),
5417 set shell_input_line_terminator to READERR if ferror(stdin) is true
5418 after yy_stream_get returns EOF
5419
5420 2/20
5421 ----
5422 doc/{bash.1,bashref.texi}
5423 - update aliases description based on a bug-bash discussion
5424 - update description of word splitting behavior when IFS is unset
5425
5426 builtins/evalfile.c
5427 - _evalfile: if reading the entire file doesn't return the same
5428 number of bytes as requested (the file size), treat this as a read
5429 error
5430
5431 2/21
5432 ----
5433 parse.y
5434 - yylex: if read_token returns < 0, return YYEOF if EOF_Reached = 1.
5435 Don't return yacc_EOF because that allows commands to be executed.
5436 - grammar: add a production to handle YYEOF, treating it the same as
5437 yacc_EOF. Based on a report from
5438 Eduardo A. Bustamante López <dualbus@gmail.com>
5439
5440 jobs.c
5441 - wait_for: if we're checking for window size changes, allow checks
5442 during trap commands while readline is active or `bind -x' command
5443 execution. Fix from Koichi Murase <myoga.murase@gmail.com>
5444
5445 2/22
5446 ----
5447 jobs.c
5448 - wait_for: check for window size changes during programmable completion
5449
5450 2/23
5451 ----
5452 execute_cmd.c,input.c,jobs.c,nojobs.c,parse.y,redir.c,shell.c
5453 builtins/{exec.def,read.def}
5454 input.h
5455 - BUFFERED_INPUT: preprocessor #define is gone, this code is now
5456 unconditional
5457
5458 2/24
5459 ----
5460 builtins/declare.def
5461 - declare_internal: set the att_propagate flag on a variable that is
5462 marked as att_tempvar only if it's *not* marked att_local. The
5463 effect is that local variables with the same name as variables in
5464 the temporary environment are not propagated to the previous scope.
5465 From a report by Voldemar Lazarev <voldemar.lazarev@alludo.com>
5466 that prompted a bug-bash discussion
5467
5468 builtins/setattr.def
5469 - set_var_attribute: don't set local variables for which we are setting
5470 export or readonly to propagate back to the previous context, but
5471 make sure we preserve posix semantics
5472
5473 parse.y
5474 - read_token_word: if we're parsing the words of a compound assignment
5475 (parser_state & PST_COMPASSIGN), and we have a valid assignment
5476 statement as a word ([sub]=value), set W_NOBRACE in the word so we
5477 don't try and perform brace expansion on it. This makes ( [sub]=word )
5478 closer to name[sub]=word.
5479 From a report by Ilkka Virta <itvirta@iki.fi> back in July, 2020:
5480 https://lists.gnu.org/archive/html/bug-bash/2020-07/msg00133.html
5481
5482 2/27
5483 ----
5484 lib/readline/display.c
5485 - rl_redisplay: if HANDLE_MULTIBYTE is defined, do the special META_CHAR
5486 handling if wc_bytes == wc_width == 1
5487
5488 execute_cmd.c
5489 - eval_arith_for_expr: make sure we don't call make_word with a NULL
5490 string if expand_arith_string returns NULL. Report from
5491 F G <frank.graziano@gmail.com>
5492
5493 arrayfunc.c
5494 - assign_assoc_from_kvlist: added code, currently disabled, to perform
5495 all expansions, including word splitting, on the kv-pair word list
5496
5497 2/28
5498 ----
5499 lib/readline/search.c
5500 - rl_history_search_reinit: change check against history_string_size
5501 to account for history_string_size now being a size_t. Report and
5502 fix from Grisha Levit <grishalevit@gmail.com>
5503
5504 3/2
5505 ---
5506 lib/readline/history.c
5507 - _hs_search_history_data: search the history list for an entry with
5508 `data' matching the argument; return the index
5509 - _hs_replace_history_data: search backwards through the history list
5510 from the end
5511
5512 lib/readline/histlib.h
5513 - _hs_search_history_data: extern declaration
5514
5515 lib/readline/search.c
5516 - make_history_line_current: make sure rl_undo_list doesn't appear in
5517 any history entries (it should be a private search string undo list)
5518 before freeing it
5519
5520 lib/readline/misc.c
5521 - _rl_free_saved_history_line: make sure the undo list in
5522 _rl_saved_line_for_history isn't rl_undo_list and doesn't appear in
5523 any history list entries as `data' before freeing it. Fixes core
5524 dump after SIGINT reported by Grisha Levit <grishalevit@gmail.com>
5525
5526 parse.y,print_cmd.c
5527 - changes for size_t when computing new amount for xrealloc
5528
5529 3/3
5530 ---
5531 parse.y
5532 - set_word_top: new inline function to check and set word_top; called
5533 from the appropriate places
5534 - parse_dparen: call set_word_top before parsing an arith command or
5535 nested subshell. Fixes underflow issue reported by
5536 Grisha Levit <grishalevit@gmail.com>
5537
5538 examples/loadables/kv.c
5539 - kv: new loadable builtin, reads key-value pairs from stdin and assigns
5540 them to an associative array
5541
5542 3/7
5543 ---
5544 builtins/trap.def
5545 - trap_builtin: if trying to restore SIGQUIT to its default disposition,
5546 and the shell is in posix mode, set to SIG_DFL if the shell is
5547 running as an async command and signal_is_async_ignored (SIGQUIT) is
5548 true. Posix conformance issue 751
5549
5550 3/8
5551 ---
5552 builtins/alias.def
5553 - print_alias: now returns int. Check for write errors using sh_chkwrite
5554 and return EXECUTION_FAILURE if it fails
5555 - alias_builtin: if print_alias returns EXECUTION_FAILURE, return
5556 EXECUTION_FAILURE immediately (write error). POSIX test conformance
5557
5558 3/9
5559 ---
5560 builtins/cd.def
5561 - change_to_directory: if we're not in physical mode and are in posix
5562 mode, add step 9 of the posix cd algorithm, which essentially tries
5563 the pathname the user supplied if it's shorter than PATH_MAX and the
5564 length of the canonicalized pathname is longer than PATH_MAX. This
5565 is basically what default bash mode does without the length checks.
5566 POSIX test conformance.
5567
5568 subst.c
5569 - strip_trailing_ifs_whitespace: use ifs_whitespace(*s) instead of
5570 spctabnl(*s) like word splitting and get_word_from_string. POSIX
5571 test conformance
5572
5573 jobs.c
5574 - wait_for: tweak change from 1/18 to make sure a J_ASYNC job isn't in
5575 the foreground (J_FOREGROUND) as it would be if it had been continued
5576 in the foreground with `fg'; if it is, we want to give the terminal
5577 back to shell_pgrp
5578
5579 3/10
5580 ----
5581 input.c
5582 - fd_berror: returns true if the file descriptor passed as an arg
5583 corresponds to a buffered stream with an error condition
5584
5585 parse.y
5586 - shell_getc: use fd_berror instead of inline code
5587 - shell_getc: if yy_getc returns EOF, immediately set line[0] to NULL
5588 and set shell_input_line_terminator to READERR. Then exit immediately
5589 with status 128 if index == 0, line[index] == NULL, and READERR.
5590 Posix interp 1629
5591
5592 config-top.h
5593 - FATAL_READERROR: now defined to 1 by default
5594
5595 lib/readline/display.c
5596 - rl_expand_prompt: allocate an empty string for local_prompt if prompt
5597 is the NULL or empty string. Fixes seg fault with rl_message and
5598 empty prompt reported by Grisha Levit <grishalevit@gmail.com>
5599
5600 lib/readline/histexpand.c
5601 - history_expand: if hist_extract_single_quoted returns an index at or
5602 past the end of the string, correct the index and break the loop,
5603 which will cause a return. Report and fix from
5604 Grisha Levit <grishalevit@gmail.com>
5605
5606 3/13
5607 ----
5608 lib/readline/vi_mode.c
5609 - rl_domove_motion_callback: set the MOVE_FAILED flag in the context M
5610 if rl_dispatch returns non-zero and other movement-command-specific
5611 conditions are met. Right now, an unsuccessful `f' or `F' command
5612 is failure.
5613 - _rl_vi_domove_motion_cleanup: if the command is `c' or `C', we don't
5614 enter insert mode if the MOVE_FAILED flag is set in the context M.
5615 This is how standalone vi works.
5616
5617 lib/readline/kill.c
5618 - rl_unix_filename_rubout: add some checks for rl_point > 0 before
5619 looking at rl_line_buffer[rl_point - 1]. Report and fix from
5620 Grisha Levit <grishalevit@gmail.com>
5621
5622 lib/readline/isearch.c
5623 - _rl_isearch_dispatch: reset cxt->sline_index to 0 if it's past the
5624 end of the history string (sline_len). Fixes asan bug reported by
5625 Grisha Levit <grishalevit@gmail.com>
5626
5627 lib/readline/histexpand.c
5628 - history_tokenize_word: don't increment the string index past the
5629 NULL if the line ends in a backslash.Fixes asan bug reported by
5630 Grisha Levit <grishalevit@gmail.com>
5631
5632 lib/readline/vi_mode.c
5633 - rl_vi_yank_to,rl_vi_change_to,rl_vi_delete_to: if these are called
5634 with an existing valid vimvcxt, save it and allocate a new one for
5635 the current function call to use, then restore it before returning.
5636 This prevents referencing vimvcxt after freeing it in the case that
5637 these functions call each other recursively (e.g., y1y1, c1d1, etc.).
5638 Fixes asan bug reported by Grisha Levit <grishalevit@gmail.com>
5639
5640 3/14
5641 ----
5642 bashhist.c
5643 - bash_add_history: make sure curlen is large enough before checking
5644 curlen - 1 and curlen - 2, otherwise you can get buffer underflow.
5645 Fixes asan bug reported by Grisha Levit <grishalevit@gmail.com>
5646
5647 bashline.c
5648 - bash_spell_correct_shellword: don't bother trying to correct empty
5649 words. Fixes asan bug reported by Grisha Levit <grishalevit@gmail.com>
5650
5651 lib/sh/shquote.c
5652 - sh_mkdoublequoted: make sure to allocate enough memory for the
5653 pathological case: where every character in the string needs to be
5654 backslash-escaped because it's special within double quotes.
5655 Fixes asan bug reported by Grisha Levit <grishalevit@gmail.com>
5656
5657 doc/{bash.1,bashref.texi}
5658 - here documents: make sure the summary specifies the here-document is
5659 terminated by `delimiter'; specify what the delimiter is if the word
5660 is not quoted. Prompted by a help-bash post from
5661 goncholden <goncholden@protonmail.com>
5662
5663 3/15
5664 ----
5665 doc/bash.1,lib/readline/doc/rluser.texi
5666 - shell-expand-line: enumerate the specific expansions performed.
5667 From a request by Alex Bochannek <alex@bochannek.com>
5668
5669 findcmd.c
5670 - path_value: new function, returns normalized version of $PATH. Takes
5671 a single argument saying whether or not to look in the temporary
5672 environment first. Normalizes null $PATH (PATH=) into ".". From a
5673 bug-bash discussion started by Moshe Looks <moshe.looks@gmail.com>
5674 - _find_user_command_in_path: use path_value()
5675 - user_command_matches: use path_value()
5676 - search_for_command: if PATH[0] == 0, set PATH = "." like path_value().
5677 This has the side effect of calling command_not_found_handle when
5678 PATH is the empty string and the command isn't in the current
5679 directory
5680 - search_for_command: if path == 0, but we found an executable in the
5681 current directory, make sure to set dot_found_in_search before adding
5682 it to the command hash table
5683
5684 findcmd.h
5685 - path_value: extern declaration
5686
5687 bashline.c
5688 - command_word_completion_function: use path_value()
5689
5690 builtins/enable.def
5691 - dyn_load_builtin: use path_value for BASH_LOADABLES_PATH; it's cleaner
5692 though it doesn't change the behavior
5693
5694 3/17
5695 ----
5696 bashline.c
5697 - bashline_reset: reset rl_filename_quoting_function, since there is a
5698 SIGINT code path where it could remain reset by glob completion.
5699 Reported by Grisha Levit <grishalevit@gmail.com>
5700 - command_word_completion_function,command_subst_completion_function,
5701 glob_complete_word: set some static variables to NULL
5702 after freeing them so they don't potentially get freed twice after
5703 a SIGINT during completion
5704 Reported by Grisha Levit <grishalevit@gmail.com>
5705
5706 parse.y
5707 - read_token_word: when deciding how to quote translated strings, don't
5708 free ttok before comparing it to ttrans
5709 Reported by Grisha Levit <grishalevit@gmail.com>
5710 - parse_matched_pair: same thing for freeing nestret
5711 - read_token: if we return a newline, make sure we call set_word_top()
5712 if necessary.
5713 Fixes underflow reported by Grisha Levit <grishalevit@gmail.com>
5714
5715 lib/glob/sm_loop.c
5716 - EXTMATCH: don't bother with FNM_PATHNAME checks; this function isn't
5717 called with a pathname.
5718 Fixes underflow reported by Grisha Levit <grishalevit@gmail.com>
5719
5720 lib/readline/misc.c
5721 - rl_maybe_replace_line: if we replace a history entry's data with
5722 rl_undo_list, we need to set rl_undo_list to 0, since we should not
5723 have rl_undo_list pointing to something from a history entry
5724 Fixes asan error reported by Grisha Levit <grishalevit@gmail.com>
5725
5726 3/20
5727 ----
5728 lib/readline/histexpand.c
5729 - postproc_subst_rhs: fix off-by-one error when reallocating new string
5730 for case where we're *not* substituting for `&'
5731 Fixes asan error reported by Grisha Levit <grishalevit@gmail.com>
5732
5733 jobs.c
5734 - terminate_current_pipeline: add a SIGKILL call in there in case the
5735 SIGTERM doesn't work
5736 - terminate_current_pipeline: add a version that works when job control
5737 isn't enabled (pipeline_pgrp == shell_pgrp)
5738
5739 subst.c
5740 - skip_to_delim: pass completeflag (SX_COMPLETE) to extract_dollar_brace_string
5741 in case it includes a command substitution, since we want to inhibit
5742 error messages in this case
5743
5744 parse.y
5745 - no_semi_successors: add DOLPAREN to list since something like $(\n
5746 shouldn't have a semicolon added there.
5747 From a report by Grisha Levit <grishalevit@gmail.com>
5748
5749 3/21
5750 ----
5751 pcomplete.c
5752 - gen_globpat_matches: set noglob_dot_filenames here since we're not
5753 calling shell_glob_filename to do it
5754 From a report by Grisha Levit <grishalevit@gmail.com>
5755
5756 3/22
5757 ----
5758 lib/readline/misc.c
5759 - rl_maybe_replace_line: if we're replacing a history entry with the
5760 current line buffer and undo list, then zero out any undo list in
5761 _rl_saved_line_for_history, since we're not going to use it any more
5762 Fixes asan error reported by Grisha Levit <grishalevit@gmail.com>
5763
5764 lib/readline/undo.c
5765 - rl_free_undo_list: if we're freeing rl_undo_list, it can't be a
5766 valid value for data in _rl_saved_line_for_history
5767 Fixes asan error reported by Grisha Levit <grishalevit@gmail.com>
5768
5769 lib/readline/complete.c
5770 - display_matches: don't call rl_display_match_list if we received a
5771 signal during get_y_or_n and didn't jump out for some reason
5772 From a report by Grisha Levit <grishalevit@gmail.com>
5773 - rl_display_match_list: return if we received a signal during
5774 _rl_internal_pager (via get_y_or_n) and didn't jump out
5775 From a report by Grisha Levit <grishalevit@gmail.com>
5776
5777 3/23
5778 ----
5779 lib/readline/history.c
5780 - history_truncate_file: don't bother trying to read the existing
5781 history file if we're just truncating it to 0 lines
5782
5783 3/24
5784 ----
5785 lib/readline/histfile.c
5786 - history_truncate_file: fix off-by-one error that resulted in the
5787 timestamp associated with the first history entry not being written
5788 to the truncated history file
5789 From a report by Grisha Levit <grishalevit@gmail.com>
5790
5791 parse.y
5792 - decode_prompt_string: do something rational if localtime() returns
5793 NULL (extraordinarily rare)
5794 From a report by Paul Eggert <eggert@cs.ucla.edu>
5795
5796 examples/loadables/stat.c
5797 - stattime: ditto
5798
5799 examples/loadables/strftime.c
5800 - strftime_builtin: ditto
5801
5802 lib/readline/examples/histexamp.c
5803 - main: ditto
5804
5805 include/posixtime.h
5806 - getnow(): new inline function, calls gettimeofday and returns tv_sec;
5807 replacement for time(0). From Paul Eggert <eggert@cs.ucla.edu>
5808
5809 general.h
5810 - NOW: use a call to getnow() to standardize on gettimeofday for time
5811 information
5812
5813 lib/readline/history.c
5814 - include #posixtime.h for getnow()
5815 - hist_inittime: use getnow() instead of calling time(0)
5816
5817 parse.y
5818 - posixtime.h: include instead of <time.h>
5819 - decode_prompt_string: use getnow() instead of calling time(0)
5820
5821 3/27
5822 ----
5823 parse.y
5824 - count_all_jobs: add extern definition if JOB_CONTROL is not defined.
5825 From Emanuele Torre <torreemanuele6@gmail.com>
5826
5827 bashhist.c
5828 - bash_add_history: make sure the current history line is not empty
5829 before checking what ended it.
5830 From a report by Grisha Levit <grishalevit@gmail.com>
5831
5832 lib/readline/histexpand.c
5833 - history_tokenize_word: break out of loop for incomplete command and
5834 process substitution or extended globbing patterns
5835 From a report by Grisha Levit <grishalevit@gmail.com>
5836
5837 bashline.c
5838 - hostnames_matching: fix size_t issue when checking whether to realloc
5839 From a report by Grisha Levit <grishalevit@gmail.com>
5840
5841 lib/sh/random.c
5842 - genseed: use uintptr_t instead of u_bits32_t to silence compiler
5843 warnings. From Paul Eggert <eggert@cs.ucla.edu>
5844
5845 aclocal.m4
5846 array2.c
5847 builtins/mkbuiltins.c,builtins/psize-posix.c,version.c
5848 builtins/getopts.def
5849 lib/readline/text.c,lib/readline/bind.c
5850 support/recho.c,support/mksignames.c,support/zecho.c,support/xcase.c
5851 support/printenv.c,support/signames.c,support/bashversion.c
5852 support/memtest.c,support/endian.c
5853 lib/glob/gm_loop.c
5854 - some cleanups for function prototypes and other stdc requirements
5855 From Paul Eggert <eggert@cs.ucla.edu>
5856
5857 lib/readline/doc/{rltech.texi,hstech.texi}
5858 - add prototypes and stdc requirements to the examples
5859
5860 builtins/complete.def
5861 - compgen_builtin: save and restore readline variables affecting how
5862 filename completions are treated in case someone uses compgen in
5863 the foreground.
5864 From a report by Grisha Levit <grishalevit@gmail.com>
5865
5866 3/28
5867 ----
5868 aclocal.m4
5869 builtins/enable.def,builtins/gen-helpfiles.c,builtins/help.def,builtins/printf.def
5870 general.h,hashlib.h
5871 include/ansi_stdlib.h,include/ocache.h
5872 lib/glob/collsyms.h,lib/glob/glob.c
5873 lib/readline/history.h,lib/readline/xmalloc.h
5874 xmalloc.c,xmalloc.h
5875 lib/sh/strtrans.c
5876 lib/tilde/tilde.c
5877 mksyntax.c
5878 support/endian.c
5879 - don't bother with __STDC__ if we are just using C89 features like
5880 const, function prototypes, etc.
5881 From Paul Eggert <eggert@cs.ucla.edu>
5882
5883 externs.h
5884 - prototype the list functions that take GENERIC_LIST *
5885 From Paul Eggert <eggert@cs.ucla.edu>
5886
5887 builtins/common.c,examples/loadables/getconf.c
5888 execute_cmd.c,pcomplete.c,subst.c
5889 lib/sh/stringlist.c,lib/sh/stringvec.c
5890 - changes and casts now that the generic list functions are prototyped
5891 From Paul Eggert <eggert@cs.ucla.edu>
5892
5893 3/29
5894 ----
5895 aclocal.m4,configure.ac
5896 builtins/common.c,builtins/mkbuiltins.c,builtins/printf.def
5897 include/memalloc.h,include/stdc.h
5898 general.h,jobs.h
5899 pcomplete.c,print_cmd.c
5900 m4/iconv.m4
5901 lib/readline/bind.c,lib/readline/complete.c,lib/readline/display.c
5902 lib/readline/funmap.c,lib/readline/util.c,lib/readline/parens.c
5903 lib/readline/histlib.h
5904 lib/readline/readline.h,lib/readline/rldefs.h,lib/readline/rlstdc.h,lib/readline/rlprivate.h
5905 lib/sh/dprintf.c,lib/sh/snprintf.c,lib/sh/vprintf.c
5906 lib/malloc/shmalloc.h,lib/malloc/imalloc.h,lib/malloc/xmalloc.c
5907 lib/termcap/termcap.h
5908 - stdarg: since we now assume C89 for prototypes at least, always
5909 prefer stdarg to old-style varargs
5910 - SH_VA_START: now use plain old va_start
5911 - don't bother with extern declarations for standard C89 functions
5912 From Paul Eggert <eggert@cs.ucla.edu>
5913
5914 config-bot.h
5915 - PREFER_STDARG: remove
5916
5917 builtins/mkbuiltins.c
5918 execute_cmd.c,unwind_prot.c
5919 unwind_prot.h
5920 - start on ANSI/ISO C changes for the unwind-protect framework
5921 - introduce new unwind-protect function pointer type to replace
5922 Function
5923 From Paul Eggert <eggert@cs.ucla.edu>
5924
5925 3/30
5926 ----
5927 builtins/command.def,builtins/fc.def,builtins/read.def,builtins/source.def
5928 builtins/evalfile.c,builtins/evalstring.c
5929 dispose_cmd.c,execute_cmd.c,pcomplete.c,print_cmd.c,subst.c,jobs.c,variables.c
5930 dispose_cmd.h,general.h,trap.h
5931 unwind_prot.c,unwind_prot.h
5932 - rest of work to convert unwind-protect framework to ANSI/ISO C.
5933 Convert unwind-protects to use new shim functions that obey the new
5934 unwind-protect function type
5935 From Paul Eggert <eggert@cs.ucla.edu>
5936
5937 general.h
5938 - STREQ, STREQN: now static inline functions to take advantage of arg
5939 type conversion
5940
5941 pcomplete.c,subst.c
5942 lib/readline/histexpand.c,lib/readline/mbutil.c
5943 - fix size_t subtractions in comparisons to avoid unsigned underflow
5944
5945 externs.h
5946 execute_cmd.c
5947 builtins/times.h
5948 - add prototypes for functions taking clock_t and timeval, make their
5949 declaration in externs.h conditional on NEED_CLOCK_FUNCS_DECL and
5950 NEED_TIMEVAL_FUNCS_DECL, respectively
5951
5952 3/31
5953 ----
5954 subst.c
5955 - expand_string_dollar_quote: check for zero-length return from
5956 string_extract_{single,double}_quoted and avoid size_t underflow
5957 Fixes asan error reported by Grisha Levit <grishalevit@gmail.com>
5958
5959 4/3
5960 ---
5961 builtins/evalstring.c
5962 - open_redir_file: treat the case of failing to open the file as a
5963 non-fatal expansion error instead of a (fatal) redirection error.
5964 Report from Zev Weiss <zev@bewilderbeest.net>
5965
5966 4/4
5967 ---
5968 lib/readline/vi_mode.c
5969 - _rl_domove_motion_cleanup: d/D require the same special case as c/C
5970 so that a motion command that doesn't move the cursor consumes/deletes
5971 at least one character.
5972 From Emanuele Torre <torreemanuele6@gmail.com>
5973 - _rl_domove_motion_cleanup: ditto for y/Y
5974 - rl_domove_motion_callback: if t/T/;/, fail (return non-zero without
5975 moving point), flag the motion command as having failed (MOVE_FAILED)
5976
5977 4/6
5978 ---
5979 subst.c
5980 - command_substitute: save the return status of the child process in
5981 last_command_subst_status; don't assign to last_command_exit_value
5982 in posix mode (posix interp 1150)
5983
5984 execute_cmd.c
5985 - execute_null_command: a simple command without a command word but
5986 with command substitutions now returns last_command_subst_status.
5987 It may or may not have already modified $? depending on posix mode
5988
5989 redir.c
5990 - redir_varvalue: legal_number validity check should be == 0, not < 0
5991 From a report by Grisha Levit <grishalevit@gmail.com>
5992
5993 4/10
5994 ----
5995 subst.c
5996 - parameter_brace_expand_rhs: check for namerefs in the variable name
5997 part of the ${name=word} expansion so we can go back and implement
5998 the POSIX semantics of returning "the final value of parameter."
5999 From a report by Grisha Levit <grishalevit@gmail.com>
6000
6001 sig.c,sig.h
6002 - sigpipe_handler: clean up, set $?, and throw to top level on receipt
6003 of a SIGPIPE
6004 - termsig_handler: if the variable builtin_catch_sigpipe is set (it's
6005 not set anywhere yet), call sigpipe_handler instead of terminating
6006 the shell. Still need to make sure a sighandler is installed for
6007 SIGPIPE even if initialize_terminating_signals isn't called
6008
6009 4/14
6010 ----
6011 lib/sh/tmpfile.c
6012 - sh_mktmpfd: add support for MT_UNLINK flag, unlinks created filename
6013 before returning fd, fails if the unlink fails for some reason
6014
6015 4/15
6016 ----
6017 pathexp.c,pathexp.h
6018 - globsort: support for various glob sorting criteria as defined by
6019 the GLOBSORT variable: name, size, blocks, mtime, atime, ctime.
6020 Default is ascending sort by name, as is traditional. Based on an
6021 idea from Evan Gates <evan.gates@gmail.com>
6022 - setup_globsort: parse the value of the GLOBSORT variable, find
6023 sorting type and whether or not it's ascending or descending
6024 - noquote_glob_filename: glob_filename for programmable completion,
6025 doesn't call quote_string_for_globbing and honors GLOBSORT, dotglob,
6026 and globstar
6027
6028 pcomplete.c
6029 - gen_globpat_matches: call noquote_glob_filename, let that handle
6030 all the variables and GLOB_FAILED
6031
6032 variables.c
6033 - GLOBSORT: support for special variable, call setup_globsort on
6034 set or unset
6035
6036 doc/bash.1,doc/bashref.texi
6037 - GLOBSORT: document variable and its effects on pathname expansion
6038
6039 4/17
6040 ----
6041 builtins/complete.def
6042 - build_actions: take an additional char ** arg VNAMEP; if it is non-
6043 null, accept a -V VARNAME option that names an indexed array
6044 variable in which to store the completions.
6045 - compgen_builtin: if the -V option is supplied, store the possible
6046 completions into VARNAME instead of printing them on stdout. From a
6047 patch from Grisha Levit <grishalevit@gmail.com>, idea originally
6048 from konsolebox <konsolebox@gmail.com> back in 2/2022
6049
6050 doc/bash.1,lib/readline/doc/rluser.texi
6051 - compgen: document new -V option
6052
6053 4/18
6054 ----
6055 lib/readline/vi_mode.c
6056 - rl_domove_read_callback: call _rl_arg_init before reading digit
6057 argument so prompt gets saved, both callback and non-callback modes
6058 From a report by Grisha Levit <grishalevit@gmail.com>
6059 - rl_vi_arg_dispatch: if we return 0 to end the digit argument and
6060 turn off NUMERICARG, call rl_restore_prompt
6061
6062 lib/readline/histexpand.c
6063 - history_expand_internal: make sure subst_lhs is not null before we
6064 call postproc_subst_rhs.
6065 From a report by Grisha Levit <grishalevit@gmail.com>
6066
6067 lib/readline/display.c
6068 - rl_redisplay: remove redundant code that ends up incrementing lpos
6069 too much for meta characters displayed as octal escape sequences.
6070 From a report by Grisha Levit <grishalevit@gmail.com>
6071
6072 4/19
6073 ----
6074 bashline.c
6075 - attempt_shell_completion: handle case where s > e after calls to
6076 find_cmd_start and find_cmd_end, respectively.
6077 From a report by Grisha Levit <grishalevit@gmail.com>
6078
6079 lib/readline/display.c
6080 - update_line: fix setting of `wsatend' when computing ols and nls in
6081 the multibyte case; this caused redisplay to print more characters
6082 than it needed
6083 - update_line: fix calculation of visible_wrap_offset when moving up
6084 to line 0, trying to figure whether or not the visible prompt has
6085 any invisible characters. Fixes C locale issue reported by
6086 Grisha Levit <grishalevit@gmail.com>
6087
6088 4/20
6089 ----
6090 lib/readline/text.c
6091 - _rl_rubout_char: update erase-at-end-of-line hack to deal with the
6092 unlikely event that a character in a non-multibyte locale is
6093 displayed using an octal representation.
6094 From a report by Grisha Levit <grishalevit@gmail.com>
6095
6096 execute_cmd.c,execute_cmd.h,builtins/evalstring.c
6097 - interrupt_execution: replaces `executing_list'
6098 - interrupt_execution: set while executing while, for, until, select,
6099 and arithmetic for loops
6100
6101 jobs.c
6102 - wait_for: if a process dies due to a SIGINT while the shell is
6103 executing a loop or a list, act as if the shell got SIGINT. This
6104 is no longer dependent on the compatibility level
6105 From a report by Grisha Levit <grishalevit@gmail.com>
6106
6107 bashline.c
6108 - name_is_acceptable: allow FIGNORE suffixes to match the entire
6109 pathname like tcsh does instead of requiring a non-empty prefix.
6110 From Emanuele Torre <torreemanuele6@gmail.com>
6111
6112 4/23
6113 ----
6114 lib/readline/misc.c
6115 - _rl_unsave_line: new function, takes a HIST_ENTRY * as an argument,
6116 generalized rl_maybe_unsave_line
6117 - _rl_alloc_saved_line: allocate a new HIST_ENTRY *, populate it like
6118 rl_saved_line_for_history
6119 - _rl_free_saved_line: free a saved HIST_ENTRY *
6120 - _rl_free_saved_history_line: call _rl_free_saved_line
6121 - _rl_previous_history_internal: new function, internals of
6122 rl_get_previous_history; change rl_get_previous_history to call it
6123
6124 lib/readline/history.h
6125 - HIST_ENTRY_DEFINED: define sentinel if HIST_ENTRY struct defined
6126
6127 lib/readline/rlprivate.h
6128 - _rl_alloc_saved_line,_rl_free_saved_line,_rl_unsave_line: new extern
6129 function definitions
6130 - _rl_free_saved_search_line: new extern definition
6131
6132 lib/readline/search.c
6133 - _rl_saved_line_for_search: use private storage to save current line,
6134 avoid clashes with rl_saved_line_for_history
6135 - _rl_free_saved_search_line,_rl_unsave_saved_search_line: new functions
6136 to manage _rl_saved_line_for_search
6137 - noninc_dosearch,_rl_nsearch_abort: clean up _rl_saved_line_for_search
6138 instead of rl_saved_line_for_history
6139 - rl_history_search_internal: allocate private _rl_saved_line_for_search;
6140 unsave or free it as appropriate
6141 - _rl_history_search_reinit: free up any _rl_saved_line_for_search just
6142 in case
6143
6144 lib/readline/vi_mode.c
6145 - rl_vi_search: free _rl_saved_line_for_search, since that's what the
6146 non-incremental search functions use now
6147 - rl_domove_read_callback: if we read a numeric argument, then a motion
6148 character, make sure the motion character is valid before returning
6149 it and going on
6150 From a report by minipython <599192367@qq.com>
6151
6152 4/27
6153 ----
6154 lib/readline/display.c
6155 - _rl_move_cursor_relative: when checking to see whether data is within
6156 the invisible line, make sure to stay within the invisible line
6157 line break boundaries
6158 From a report by minipython <599192367@qq.com>
6159
6160 lib/readline/search.c
6161 - dispose_saved_search_line: new function, either unsave the saved
6162 search line (if we're not at the end of the history) or free it
6163 (if we are). Needs to be immediately followed by call to
6164 make_history_line_current, which resets rl_undo_list
6165 - make_history_line_current: change strategy: rely on callers to
6166 manage _rl_saved_line_for_search and rl_undo_list; just copy the
6167 data from the passed history entry into the line buffer and reset
6168 rl_undo_list
6169 - noninc_dosearch,rl_history_search_internal: call dispose_saved_search_line
6170 before calling make_history_line_current
6171
6172 lib/readline/misc.c
6173 - _rl_start_using_history: free the undo list associated with
6174 _rl_saved_line_for_history, if one exists. Have to watch out for
6175 this causing pointer aliasing problems, maybe add a call to
6176 _hs_search_history_data()
6177
6178 4/28
6179 ----
6180 pathexp.c
6181 - sh_globsort: a sort specifier of `nosort' disables sorting completely
6182
6183 doc/bash.1,doc/bashref.texi
6184 - GLOBSORT: document `nosort' sort specifier
6185
6186 bashline.c
6187 - attempt_shell_completion: attempt completion with the empty command
6188 for a null command word on a line with only whitespace following any
6189 optional assignment statements
6190 - attempt_shell_completion: make sure that the start of the command
6191 word is not after rl_point before calling the programmable completion
6192 for the initial word.
6193 From a report by Grisha Levit <grishalevit@gmail.com>
6194
6195 lib/readline/histexpand.c
6196 - history_expand: don't read past the end of the string if it ends with
6197 an incomplete multibyte character
6198 From a report by Grisha Levit <grishalevit@gmail.com>
6199
6200 5/1
6201 ---
6202 lib/readline/text.c
6203 - _rl_insert_char: make sure to return 1 in all cases where there are
6204 pending bytes accumulating for a multibyte character
6205 - _rl_insert_char: if the COUNT argument is 0, insert any pending
6206 bytes read so far. The idea is that these bytes were accumulating
6207 to compose a possible multibyte character, and the count of 0
6208 indicates that the current character doesn't contribute to that
6209 because it's bound to an editing command.
6210 - rl_insert, rl_quoted_insert: make sure to call _rl_insert_char
6211 with a 0 count as appropriate to insert any accumulating bytes
6212 From a patch by Grisha Levit <grishalevit@gmail.com>
6213
6214 sig.c
6215 - top_level_cleanup,throw_to_top_level: set variable_context to 0, just
6216 to make sure
6217
6218 execute_cmd.c
6219 - function_misc_cleanup: new function, runs make_funcname_visible and
6220 unlink_fifo_list at the end of execute_function, replaces inline
6221 code
6222 - uw_function_misc_cleanup: unwind-protect function, just calls
6223 function_misc_cleanup. Installed by execute_function.
6224 Partial fix for FUNCNAME bug reported by Grisha Levit <grishalevit@gmail.com>
6225 - execute_builtin: run unwind-protects if evalnest exeeds max
6226 - execute_builtin: run unwind-protects if sourcenest exeeds max
6227
6228 parse.y
6229 - parse_string_to_word_list: set current_token = '\n' on error
6230 - parse_string_to_word_list: if we're executing and not running in
6231 parse_and_execute, call top_level_cleanup before we jump to the
6232 top level. Rest of fix for FUNCNAME bug
6233 - parse_compound_assignment: set last_read_token and current_token to
6234 '\n' on parse error. Fix for alias expansion bug reported by
6235 Grisha Levit <grishalevit@gmail.com>
6236 - parse_compound_assignment: if we're executing and not running in
6237 parse_and_execute, call top_level_cleanup before we jump to the
6238 top level
6239
6240 5/2
6241 ---
6242 jobs.c
6243 - run_sigchld_trap: don't freeze and unfreeze the jobs list; move it
6244 to the callers who are running this on SIGCHLD receipt and cannot
6245 deal with jobs disappearing from the list while they're running
6246 - waitchld: if we are running the wait builtin, continue to run the
6247 SIGCHLD trap immediately upon signal receipt, but freeze and
6248 unfreeze the jobs list around the call to run_sigchld_trap().
6249 Fixes issue with `jobs' in a SIGCHLD trap not removing jobs from
6250 the jobs list reported by Guldrelokk <me@rarity.fan>
6251
6252 5/4
6253 ---
6254 input.c
6255 - fd_to_buffered_stream: make sure buffers[fd2] is non-null before
6256 turning on SHAREDBUF.
6257 From Emanuele Torre <torreemanuele6@gmail.com>
6258
6259 eval.c
6260 - reader_loop: save and restore EOF_Reached around expanding $PS0,
6261 setting it to 0 for the expansion so it doesn't affect things like
6262 command substitution.
6263 From a report by Grisha Levit <grishalevit@gmail.com>
6264
6265 parse.y
6266 - parse_comsub: handle ${Ccommand; }, where C == space, tab, newline,
6267 or '|'
6268 - read_token_word: understand ${Ccommand; } and call parse_comsub to
6269 parse the contents
6270 - parse_matched_pair: understand ${Ccommand; } inside another paired
6271 construct
6272 - new `funsub' production, like comsub but for ${Ccommand;} nofork
6273 command substitution
6274
6275 execute_cmd.c
6276 - execute_simple_command: if we fork because of pipes in or out, clear
6277 the fifo list, since subshell aren't supposed to inherit fifos
6278
6279 5/8
6280 ---
6281 parser.h
6282 - PST_FUNSUBST: new parser state, parsing the command in ${Ccommand;}.
6283 Primarily used to have read_token_word return `}' as a separate
6284 token even if it's not delimited like a reserved word
6285
6286 subst.h
6287 - SX_FUNSUB: new flag, tell xparse_dolparen we are parsing the command
6288 in a ${Ccommand;} nofork command substitution
6289
6290 parse.y
6291 - xparse_dolparen: handle parsing ${Ccommand;} nofork command
6292 substitution like parse_comsub
6293 - read_token: if we're parsing a foreground command substitution,
6294 treat a word that begins with an unquoted `}' as a `}' token to
6295 terminate the ${Ccommand;} construct without requiring that the
6296 close brace be delimited like a reserved word
6297 - no_semi_successors: add DOLBRACE
6298 - reserved_word_acceptable: add DOLBRACE
6299
6300 subst.c
6301 - extract_function_subst: like extract_command_subst, but for nofork
6302 command substitutions; calls xparse_dolparen with the SX_FUNSUB
6303 flag to differentiate
6304 - string_extract_double_quoted,extract_delimited_string,
6305 extract_heredoc_dolbrace_string,extract_dollar_brace_string,
6306 param_expand: call extract_function_subst as appropriate
6307 - function_substitute: like command_substitute, but for nofork command
6308 substitutions. Just a stub for now
6309
6310 5/11
6311 ----
6312 jobs.[ch]
6313 - pipeline_saver: already_making_children now saved and restored as
6314 part of the struct; no longer need a separate variable
6315 - save_pipeline,restore_pipeline: save already_making_children to struct
6316
6317 parse.y
6318 - parse_comsub,xparse_dolparen: handle `(' as the first char of a
6319 funsub (ksh93 supports that)
6320
6321 subst.c
6322 - function_substitute: complete implementation; handle both funsubs
6323 and valsubs (need different terminology); dummy up a fake shell
6324 function so local variables and `return' work; do the right thing
6325 with process groups
6326 - executing_funsub: flag for the rest of the shell to know we're
6327 expanding a funsub; used by parse_and_execute
6328
6329 builtins/evalstring.c
6330 - parse_and_execute: check executing_funsub to do the right thing with
6331 alias expansion and posix mode
6332
6333 5/12
6334 ----
6335 doc/bash.1,doc/bashref.texi
6336 - function substitution (or lambda substitution, or nofork command
6337 substitution): document
6338
6339 5/15
6340 ----
6341 subst.c
6342 - function_substitute: make sure to decrement variable_context in the
6343 unwind-protects since we don't unwind_protect it individually.
6344 Report from Oguz <oguzismailuysal@gmail.com>
6345
6346 5/17
6347 ----
6348 configure.ac
6349 - i370 machines cannot use the bash malloc
6350 Patch from Igor Todorovski <itodorov@ca.ibm.com>
6351
6352 support/signames.c
6353 - initialize_signames: add support for z/OS signals.
6354 Patch from Igor Todorovski <itodorov@ca.ibm.com>
6355
6356 lib/glob/smatch.c
6357 - collseqcmp: new name for collequiv[_wc], that function apparently
6358 exists in libc on z/OS
6359 Patch from Igor Todorovski <itodorov@ca.ibm.com>
6360
6361 jobs.c
6362 - mark_all_jobs_as_dead: make sure to reset js.j_ndead to the right
6363 number of jobs in the array
6364
6365 execute_cmd.c
6366 - execute_while_or_until: move call to REAP() after the action
6367 executes, like other loop functions
6368
6369 shell.c,parse.y,lib/intl/gettextP.h
6370 - add some __MVS__ checks for z/OS systems
6371
6372 5/18
6373 ----
6374 jobs.c
6375 - wait_for_any_job: catch jobs that can terminate and be reaped
6376 when we call UNBLOCK_CHILD between the loop where we check the
6377 jobs list for dead jobs and the loop where we check for running
6378 jobs and poll for them with wait_for().
6379 Fixes bug reported by Aleksey Covacevice <aleksey.covacevice@gmail.com>
6380
6381 5/20
6382 ----
6383 subst.c
6384 - read_comsub: quote CTLNUL if it's in $IFS and we're parsing the
6385 RHS of an assignment statement
6386 - comsub_quote_string: ditto
6387 - comsub_shouldquote: break code that decides whether to CTLESC escape
6388 a character read from a command substitution or $REPLY into its own
6389 inline function; change read_comsub/comsub_quote_string callers
6390
6391 5/21
6392 ----
6393 subst.c
6394 - quote_escapes_internal: use ifs_cmap instead of iterating through
6395 ifs_value to set skip_ctlesc and skip_ctlnul
6396
6397 5/23
6398 ----
6399 parser.h
6400 - remove `(' from FUNSUB_CHARS
6401
6402 parse.y
6403 - parse_comsub: don't bother with `(' as one of the FUNSUB_CHARS
6404
6405 doc/bash.1,doc/bashref.texi
6406 - command substitution: remove mention of `(' as a valid character
6407 following the open brace in nofork command substitution
6408
6409 5/24
6410 ----
6411 parse.y
6412 - parse_comsub: avoid adding `;' to an empty ${ command substitution
6413 - parse_comsub: if open == '{', push back a newline we read into
6414 peekc to get PS2 prompting right.
6415 From a report by Grisha Levit <grishalevit@gmail.com>
6416
6417 subst.c
6418 - skip_double_quoted: pass the SX_COMPLETE flag down to
6419 extract_dollar_brace_string in case it contains an unclosed command
6420 substitution.
6421 From a report by Grisha Levit <grishalevit@gmail.com>
6422
6423 5/25
6424 ----
6425 shell.c
6426 - make sure shell_initialized is set to 1 before running -c command
6427
6428 make_cmd.c
6429 - make_function_def: initialize source_file to something other than
6430 `main' or `environment' if the shell is not interactive.
6431 From a report from Emanuele Torre <torreemanuele6@gmail.com>
6432
6433 parse.y
6434 - save_token_state,restore_token_state: save and restore token_to_read
6435 - read_token_word: if we read EOF in an interactive shell, set
6436 token_to_read to yacc_EOF and EOF_Reached to 1 so the token will
6437 be delimited but the next call to read_token returns yacc_EOF
6438 - handle_ignoreeof: broke the code that checks eof_encountered and
6439 possibly exceeds the ignoreeof limit out into a separate public
6440 function, called from handle_eof_input_unit
6441
6442 eval.c
6443 - reader_loop: if EOF_Reached is set in an interactive shell after
6444 parse_command and execute_command, and ignoreeof has been enabled,
6445 check for ignoreeof with handle_ignoreeof and reset EOF_Reached
6446 back to 0 if we should not exit. This can occur when EOF delimits
6447 a simple command (simple_command_terminator)
6448 From a report by Grisha Levit <grishalevit@gmail.com>
6449
6450 5/27
6451 ----
6452 lib/readline/mbutil.c
6453 - _rl_get_char_len: if SRC is "", make sure to return 0
6454
6455 lib/readline/isearch.c
6456 - _rl_isearch_callback: if _rl_search_getchar returns EOF, return 1
6457 to abort search; if it returns with RL_STATE_ISEARCH unset, return
6458 1 (handling a signal can turn it off via _rl_isearch_cleanup)
6459
6460 5/29
6461 ----
6462 lib/readline/text.c
6463 - _rl_insert_char, rl_quoted_insert: minor fixes from Grisha Levit
6464
6465 builtins/printf.def
6466 - bexpand: use the same calculation for the size of the return buffer
6467 as ansicstr().
6468 From a report by Grisha Levit <grishalevit@gmail.com>
6469
6470 locale.c
6471 - locale_setblanks: work around problem with macOS where isblank(x)
6472 incorrectly returns true for characters 0x80-0xff in a UTF-8 locale
6473 From a report by Grisha Levit <grishalevit@gmail.com>
6474 - set_default_locale_vars,set_locale_vars,reset_locale_vars: make sure
6475 we call locale_setblanks after setting/resetting locale_utf8locale,
6476 since we use that in locale_setblanks
6477
6478 lib/sh/smatch.c
6479 - charseqcmp,is_cclass,FOLD: make sure we don't treat chars >= 0x80
6480 as valid in a UTF-8 locale, since they are multibyte characters.
6481 From a report by Grisha Levit <grishalevit@gmail.com> with a full
6482 explanation in http://www.openradar.me/FB9973780
6483
6484 5/30
6485 ----
6486 builtins/enable.def
6487 - enable_builtin: don't call dlopen with a null pathname, it will
6488 succeed. Report from Wiley Young <wyeth2485@gmail.com>
6489
6490 lib/readline/readline.c
6491 - _rl_dispatch_subseq: if a user binds do-lowercase-version to something
6492 that isn't an uppercase character, flag an error rather than recurse.
6493 From a report by Grisha Levit <grishalevit@gmail.com>
6494
6495 5/31
6496 ----
6497 builtins/enable.def
6498 - enable_builtin: don't try to load a builtin that's not found if
6499 the -n flag is supplied.
6500 From a report from Emanuele Torre <torreemanuele6@gmail.com>
6501
6502 parse.y
6503 - parse_comsub: use was_word code again to make sure we add a closing
6504 `;' if the last token parsed before the closing ';' or '\n' was a
6505 word, no matter what character ends it.
6506 From a report by Grisha Levit <grishalevit@gmail.com>
6507
6508 aclocal.m4,configure.ac,findcmd.c
6509 - IBM z/OS changes from Igor Todorovski <itodorov@ca.ibm.com>
6510
6511 6/1
6512 ---
6513 parse.y
6514 - shell_getc: if the shell is not interactive and reading from a
6515 buffered stream or stdin, and not expanding an alias, add a
6516 backslash to a line ending with <backslash><EOF> like we do when
6517 reading from a string. This prevents a backslash-newline from
6518 being discarded when we are removing backslash-newlines from the
6519 input, since we will add a newline to shell_input_line in this case.
6520 From a report by Rob Landley <rob@landley.net>
6521
6522 parse.y
6523 - parse_compound_assignment: check and compensate for an alias being
6524 popped out from underneath this function by read_token() (e.g.,
6525 alias L='m=("x")'. Since we don't push a new input source, we should
6526 never restore pushed_string_list from the saved parser state, but
6527 we check and only do this if we were expanding an alias when this
6528 function was called.
6529 From a report by Wiley Young <wyeth2485@gmail.com>
6530
6531 6/2
6532 ---
6533 print_cmd.c
6534 - print_if_command: make sure to print any pending here-documents after
6535 printing the test.
6536 From https://bugzilla.redhat.com/show_bug.cgi?id=2211214
6537
6538 builtins/enable.def
6539 - if -n is supplied with -f, attempt to load the builtin but mark it
6540 as disabled after loading.
6541 Suggested by Robert Elz <kre@munnari.OZ.AU>
6542
6543 builtins/evalfile.c
6544 - _evalfile: increment retain_fifos, so we don't delete any FIFOs or
6545 pipes we inherited before sourcing this file; restore original value
6546 before we return.
6547 From https://savannah.gnu.org/support/index.php?110883
6548
6549 6/3
6550 ---
6551 subst.c
6552 - expand_string_dollar_quote: if singlequote_translations is set, there
6553 is a chance for a use-after-free of `t'.
6554 From a report by Grisha Levit <grishalevit@gmail.com>
6555
6556 6/7
6557 ---
6558 jobs.c,nojobs.c,jobs.h
6559 - job_control_active_p: new function, returns 1 if job control is
6560 currently enabled and we have given away the terminal
6561
6562 builtins/evalstring.c
6563 - should_suppress_fork: don't optimize away the fork if job control is
6564 active because we need to call end_job_control and give the terminal
6565 back to the original process group when this command finishes. Call
6566 job_control_active_p() to check this.
6567 Report from Andrew Hamon <and.ham95@gmail.com>
6568
6569 6/8
6570 ---
6571 shell.c
6572 - ssh_run_startup_files: new variable, set by run_startup_files if
6573 the shell decides it's being run by ssh and runs bashrc (only if
6574 SSH_SOURCE_BASHRC is defined). Non-zero while the startup files
6575 are being run. Not used by any other part of the shell yet.
6576
6577 6/12
6578 ----
6579 arrayfunc.h
6580 - new inline functions to convert between assignment flags (ASS_*),
6581 array value flags (AV_*), and valid array flags (VA_*)
6582
6583 shell.h
6584 - include arrayfunc.h after subst.h and variables.h so all the values
6585 for the new inline functions are available
6586
6587 variables.c
6588 - bind_int_variable: use convert_assign_flags_to_validarray_flags and
6589 convert_assign_flags_to_arrayval flags instead of inline assignments
6590
6591 builtins/common.c
6592 - builtin_bind_variable: use convert_assign_flags_to_validarray_flags
6593 instead of inline assignments
6594
6595 arrayfunc.c
6596 - assign_array_element: use convert_assign_flags_to_arrayval_flags
6597 instead of inline code
6598 - assign_array_element_internal: use convert_assign_flags_to_arrayval_flags
6599 to pass the right values to array_expand_index
6600 - assign_array_var_from_string: since expand_compound_array_assignment
6601 performs one round of expansion on the subscripts, make sure to add
6602 ASS_NOEXPAND (if assoc_expand_once is set) and ASS_ALLOWALLSUB to the
6603 flags we pass to assign_compound_array_list
6604 - unbind_array_index: use convert_validarray_flags_to_array_value_flags
6605 to pass the right values to array_expand_index
6606 - array_expand_index: uncomment code tagged for bash-5.3 that checks
6607 AV_NOEXPAND and suppresses call to expand_arith_string if it's set.
6608 This set of changes extends assoc_expand_once to indexed arrays
6609
6610 arrayfunc.[ch],execute_cmd.c,expr.c,test.c,builtins/common.c,builtins/mkbuiltins.c
6611 builtins/declare.def,builtins/set.def,builtins/shopt.def
6612 - array_expand_once: new name for internal assoc_expand_once variable
6613
6614 6/13
6615 ----
6616 builtins/shopt.def
6617 - array_expand_once: new option, replaces assoc_expand_once
6618
6619 doc/bash.1,doc/bashref.texi
6620 - array_expand_once: document new shopt option
6621
6622 6/15
6623 ----
6624 lib/readline/complete.c
6625 - rl_full_quoting_desired: new application-settable variable, if set
6626 to non-zero by an application completion function, all completions
6627 will be quoted as if they were filenames, subject to the value of
6628 rl_filename_quote_characters. Initialized to 0 and reset to 0
6629 by set_completion_defaults.
6630 From a contribution by Grisha Levit <grishalevit@gmail.com>
6631 - QUOTING_DESIRED: new macro to check whether we should quote completions
6632
6633 lib/readline/readline.h
6634 - rl_full_quoting_desired: extern declaration
6635
6636 lib/readline/doc/rltech.texi
6637 - rl_full_quoting_desired: document
6638
6639 configure.ac
6640 - bumped version to 5.3-devel
6641
6642 pcomplete.h
6643 - COPT_FULLQUOTE: new compspec option, for rl_full_quoting_desired
6644
6645 pcomplete.c
6646 - pcomp_set_readline_variables: set rl_full_quoting_desired according
6647 to COPT_FULLQUOTE
6648
6649 builtins/complete.def
6650 - fullquote: add new complete/compopt option value
6651
6652 doc/bash.1,lib/readline/doc/rluser.texi
6653 - fullquote: document new complete/compopt option
6654
6655 lib/sh/timeval.c
6656 - timeval_to_secs: sfp argument is now a long *; there is a new
6657 maxval argument (always 10^6 for now) that determines how to
6658 round; returns tv_usec in *sfp if maxval == 10^6; otherwise
6659 return value is basically tv_usec/maxval with rounding
6660 - print_timeval: change argument type in call to timeval_to_secs
6661
6662 lib/sh/clock.c
6663 - clock_t_to_secs: sfp argument is now a long *
6664 - print_clock_t: change argument type in call to clock_t_to_secs
6665
6666 externs.h
6667 - timeval_to_seconds, clock_t_to_seconds: change prototypes
6668
6669 execute_cmd.c
6670 - mkfmt,print_formatted_time: fractional seconds arguments are now
6671 longs
6672 - mkfmt: accept precisions up to 6; since sec_fraction is in usecs,
6673 perform any necessary rounding for precisions < 6
6674 - print_formatted_time: allow precision specifiers up to 6; default
6675 is still 3
6676 - time_command: fractional seconds variables are now long; add new
6677 argument to timeval_to_secs (always 1000000)
6678 - time_command: if we call clock_t_to_secs, multiply the return
6679 fractional seconds value by 1000 to convert it from msec to usec
6680
6681 doc/bash.1,doc/bashref.texi
6682 - TIMEFORMAT: document that the max precision is now 6
6683 From https://savannah.gnu.org/support/?110343
6684
6685 6/16
6686 ----
6687 variables.c
6688 - get_monoseconds: use clock_gettime to return the value of the
6689 system's monotonic clock, if available
6690 - BASH_MONOSECONDS: a new dynamic variable that returns the value of
6691 get_monoseconds
6692 From a suggestion by William Kennington <wak@google.com>
6693
6694 doc/bash.1,doc/bashref.texi
6695 - BASH_MONOSECONDS: document
6696
6697 trap.c
6698 - save_bash_trapsig,set_bash_trapsig,restore_bash_trapsig: functions
6699 to manage value of BASH_TRAPSIG
6700 - run_pending_traps: save and restore the value of BASH_TRAPSIG; set
6701 it to the numeric signal number of the trap being run while it's
6702 executing
6703 From a feature request by Eric Marceau <ericmarceau@rogers.com>
6704 - _run_trap_internal,run_exit_trap: save and restore BASH_TRAPSIG;
6705 make sure it's set appropriately
6706
6707 doc/bash.1,doc/bashref.texi
6708 - BASH_TRAPSIG: document
6709
6710 builtins/declare.def
6711 - declare_internal: if declare is supplied -f and an argument that
6712 looks like an assignment statement, fail only if there is not a
6713 function with that name already defined.
6714 From a report from Emanuele Torre <torreemanuele6@gmail.com>
6715 back in 12/22
6716
6717 jobs.c
6718 - wait_for: make checkwinsize work in subshell commands started from
6719 interactive shells
6720 New feature request by Kerin Millar <kfm@plushkava.net>
6721
6722 print_cmd.c
6723 - semicolon: don't return immediately unless a preceding `&' is
6724 itself preceded by a space, as the rest of the printing code prints
6725 asynchronous commands.
6726 Report and patch by Grisha Levit <grishalevit@gmail.com>
6727
6728 6/17
6729 ----
6730 arrayfunc.c
6731 - arrayvar_copyval: copy an array or hash table from shell variable
6732 V1 to V2
6733
6734 arrayfunc.h
6735 - arrayvar_copyval: extern declaration
6736
6737 subst.h
6738 - ASS_NOTEMPENV: new flag for bind_variable and assignments
6739
6740 variables.c
6741 - bind_variable: if ASS_NOTEMPENV is in FLAGS, don't bother calling
6742 bind_tempenv_variable
6743
6744 builtins/declare.def
6745 - declare_internal: if we find the variable in the temporary
6746 environment, call bind_variable with the ASS_NOTEMPENV flag since
6747 we are already dealing with a variable from the temporary environment
6748 - declare_internal: if we bind a new global variable because we're
6749 modifying a variable from the temporary environment, make sure to
6750 call arrayvar_copyval to copy array variables from the temporary
6751 environment to the global scope
6752
6753 variables.c
6754 - push_temp_var: if we are pushing an array variable, make sure to
6755 call arrayvar_copyval on the new variable
6756 Final fix for bug reported by Wiley Young <wyeth2485@gmail.com>
6757 - push_posix_tempvar_internal: call arrayar_copyval instead of using
6758 inline code
6759
6760 6/19
6761 ----
6762 lib/sh/shmatch.c
6763 - sh_regmatch: use builtin_find_indexed_array to allow a local copy
6764 of BASH_REMATCH.
6765 From https://lists.gnu.org/archive/html/bug-bash/2022-05/msg00052.html
6766
6767 execute_cmd.c
6768 - execute_in_subshell: tentative change to clear procsub list after
6769 performing redirections, so nothing in a redirection can affect
6770 what's in the subshell.
6771 From https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00114.html
6772
6773 test.c
6774 - binary_operator: in posix mode, the < and > operators compare strings
6775 using the current locale (strcoll).
6776 From https://www.austingroupbugs.net/view.php?id=375
6777
6778 bashline.c
6779 - bash_default_completion: make sure that command completion adds the
6780 trailing `/' suffix for directories even if the directory name is
6781 the same as the common prefix of matches.
6782 From https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00034.html
6783
6784 lib/readline/kill.c
6785 - rl_vi_yank_pop: make repeated invocations of vi-yank-pop cycle
6786 through the kill ring just like in emacs mode, even when point
6787 is at the end of the line.
6788 From https://lists.gnu.org/archive/html/bug-bash/2022-08/msg00105.html
6789
6790 parse.y
6791 - parse_comsub: set variables if the last token (last_read_token) is
6792 `;', `\n', or `&', in addition to was_word
6793 - parse_comsub: if the last read token was a newline (was_newline),
6794 terminate the comsub with a newline instead of a semicolon; keeps
6795 the line numbers more consistent.
6796 From a report by Grisha Levit <grishalevit@gmail.com>
6797
6798 lib/sh/anonfile.c
6799 - anonopen: use memfd_create if it is available, fall through to
6800 traditional Unix/POSIX implementation if it fails
6801
6802 6/20
6803 ----
6804 parse.y
6805 - yy_string_unget: don't push EOF back to a string, like the other
6806 unget functions
6807
6808 6/21
6809 ----
6810 parse.y
6811 - read_a_line: don't push an EOF back into the string or line if the
6812 line ends in a backslash.
6813 From a report by Rob Landley <rob@landley.net>
6814
6815 6/22
6816 ----
6817 lib/readline/input.c
6818 - rl_gather_tyi: make sure result is initialized
6819
6820 lib/readline/kill.c
6821 - _rl_read_bracketed_paste_prefix: make sure key is initialized
6822
6823 builtins/read.def
6824 - read_builtin: make sure pass_next and saw_escape are initialized
6825 before a possible goto
6826 - read_builtin: make sure to initialize prevset for very short
6827 timeouts
6828
6829 subst.c
6830 - function_substitute: make sure tflag is initialized even when we
6831 don't call read_comsub, since we return it in ret->flags
6832 All from a report by Grisha Levit <grishalevit@gmail.com>
6833
6834 builtins/complete.def
6835 - compgen_builtin: use array_from_argv to assign elements of the
6836 stringlist to the array variable.
6837 Update from Grisha Levit <grishalevit@gmail.com>
6838
6839 builtins/cd.def
6840 - bindpwd: fix seg fault from an unlikely set of circumstances
6841 From a report by Grisha Levit <grishalevit@gmail.com>
6842
6843 arrayfunc.h
6844 - convert_validarray_flags_to_arrayval_flags: initialize avflags
6845 From a report by Grisha Levit <grishalevit@gmail.com>
6846
6847 lib/sh/anonfile.c
6848 - anonopen: set *fn if memfd_create is used
6849 From a report by Grisha Levit <grishalevit@gmail.com>
6850
6851 6/23
6852 ----
6853 arrayfunc.c
6854 - bind_assoc_var_internal: free key to fix small leak if assign_func
6855 used
6856 - quote_compound_array_word: free value to fix small leak
6857
6858 builtins/evalstring.c
6859 - parse_and_execute: free parsed command on failed function definition
6860 import
6861 - open_redir_file: free FN if we're not passing it back to the caller
6862
6863 subst.c
6864 - param_expand: free TEMP1 in code paths that don't do it now
6865
6866 bashline.c
6867 - bash_command_name_stat_hook: if we modify *NAME, free the old value
6868
6869 examples/loadables/{kv,stat}.c
6870 - bind_assoc_variable is caller-free VALUE, so free when needed and
6871 don't allocate a new copy if not
6872 All from a report by Grisha Levit <grishalevit@gmail.com>
6873
6874 6/24
6875 ----
6876 lib/readline/complete.c
6877 - rl_menu_complete: use _rl_free_match_list instead of just freeing
6878 MATCHES if we have too many possible completions to display.
6879 From a report by Grisha Levit <grishalevit@gmail.com>
6880
6881 6/25
6882 ----
6883 eval.c
6884 - reader_loop: make sure to allow exit builtin (code == EXITBLTIN) to
6885 exit the shell when ignoreeof is set
6886 From a report by Grisha Levit <grishalevit@gmail.com>
6887
6888 6/26
6889 ----
6890 lib/readline/complete.c
6891 - complete_sigcleanarg_t: new struct to hold match list and saved line
6892 buffer for cleanup on receipt of SIGINT
6893 - _rl_complete_sigcleanup: use new sigcleanarg_t struct and free both
6894 members
6895 - rl_complete_internal: whenever we display the match list, set up to
6896 clean the matches and saved line buffer in the event of a SIGINT
6897 From a report by Grisha Levit <grishalevit@gmail.com>
6898
6899 lib/readline/signals.c
6900 - _rl_handle_signal: if readline is compiled to include callbacks, only
6901 call rl_echo_signal_char if we're not in callback mode or the
6902 application has set rl_persistent_signal_handlers, leaving any
6903 application signal handler to call it (or not) otherwise.
6904 From a discussion with Andrew Burgess <aburgess@redhat.com>
6905
6906 lib/glob/glob.c
6907 - glob_filename: if ARRAY == TEMP_RESULTS, make sure to free TEMP_RESULTS
6908 after copying the filenames out of ARRAY, since we either assigned it
6909 directly or glob_dir_to_array returned it because the dirname was
6910 the empty string.
6911 From a report by Grisha Levit <grishalevit@gmail.com>
6912
6913 lib/readline/rltypedefs.h
6914 - Function: only compile in these obsolete typedefs if
6915 WANT_OBSOLETE_TYPEDEFS is defined
6916
6917 print_cmd.c
6918 - xtrace_print_assignment,xtrace_print_word_list: prioritize checking
6919 for characters that need $'...' printing over shell metacharacters
6920 so that strings containing both get the $'...' treatment
6921 From a report by Grisha Levit <grishalevit@gmail.com>
6922
6923 6/27
6924 ----
6925 subst.c
6926 - skip_double_quoted: make sure to call extract_function_subst with
6927 the SX_NOALLOC flag
6928 From a report by Grisha Levit <grishalevit@gmail.com>
6929
6930 trap.c
6931 - _run_trap_internal: if we're running a trap but shell_eof_token is
6932 set, this means we're somehow running a trap while parsing a
6933 command substitution (weird set of circumstances). Call
6934 reset_parser and unset shell_eof_token if shell_eof_token is set
6935 From a report by Wiley Young <wyeth2485@gmail.com>
6936
6937 builtins/setattr.def
6938 - set_var_attribute: don't set the att_propagate attribute unless the
6939 variable whose attribute is being modified is in the temporary
6940 environment for this builtin, not any previous temporary environments
6941 (like the temp env for a function call, or a special builtin like
6942 `.')
6943
6944 variables.c
6945 - push_posix_temp_var: if we have an array variable we're trying to
6946 push up here, use arrayvar_copyval to copy the value correctly
6947
6948 arrayfunc.c
6949 - arrayvar_copyval: make sure that V2 ends up being the same type of
6950 array as V1 (att_array or att_assoc), since we're copying the value.
6951 Fixes issue reported by Grisha Levit <grishalevit@gmail.com>, but
6952 with the previous fix to set_var_attribute, it's not needed
6953 - assign_compound_array_list: check for integer overflow if the max
6954 index of the array is already INT_MAX.
6955 From a report from Emanuele Torre <torreemanuele6@gmail.com>
6956 - assign_array_var_from_word_list: ditto
6957
6958 6/28
6959 ----
6960 pcomplete.c,bashline.c
6961 - uw_restore_parser_state,uw_rl_set_signals: move to bashline.c so the
6962 general readline support can use them
6963
6964 bashline.h
6965 - uw_restore_parser_state,uw_rl_set_signals: extern declarations
6966
6967 bashline.c
6968 - unset_readline_variables,uw_unset_readline_variables: function to
6969 unset READLINE_{LINE,POINT,MARK,ARGUMENT} and its unwind-protect
6970 counterpart
6971 - bash_execute_unix_command: add unwind-protect to free up allocated
6972 memory
6973 Report and patch by Grisha Levit <grishalevit@gmail.com>
6974
6975 doc/bash.1,doc/bashref.texi
6976 - BASH_ARGC,BASH_ARGV,BASH_SOURCE,BASH_LINENO: note that these variables
6977 may not be assigned to or unset
6978
6979 6/29
6980 ----
6981 builtins/declare.def
6982 - declare_internal: attempting to assign to a noassign variable is no
6983 longer an assignment error; the attempt is just ignored
6984
6985 arrayfunc.c
6986 - find_or_make_array_variable: take a new flag value, 4: means to
6987 return noassign variables as themselves instead of NULL without
6988 performing the assignment so the caller can handle them differently.
6989 - assign_array_from_string: pass flags & 4 to find_or_make_array_variable
6990 so we can simply ignore attempted assignments to noassign array
6991 variables instead of treating them as assignment errors
6992 From a report by Kerin Millar <kfm@plushkava.net>
6993
6994 expr.c
6995 - exppower: only report negative exponent error if noeval == 0.
6996 Fixes issue reported by Steffen Nurpmeso <steffen@sdaoden.eu>
6997
6998 6/30
6999 ----
7000 lib/sh/anonfile.c
7001 - anonopen: add support for using shm_open or shm_mkstemp to create
7002 an anonymous file using POSIX shared memory
7003
7004 configure.ac
7005 - if --enable-static-link is supplied, add -static to LDFLAGS on
7006 Linux if opt_profiling isn't enabled
7007 From a report from Emanuele Torre <torreemanuele6@gmail.com>
7008
7009 print_cmd.c
7010 - make_command_string_internal: if we're recursively printing a list
7011 (connection) with more than two elements, don't print any deferred
7012 here-documents after the make_command_string_internal on the right
7013 side of the connection unless we're at the end of the list
7014 (printing_connection == 1). This way the caller gets to add the
7015 appropriate connector before printing the deferred here-documents.
7016 From a report by Grisha Levit <grishalevit@gmail.com>
7017 - make_command_string_internal,print_group_command: after we call
7018 PRINT_DEFERRED_HEREDOCS and follow it with a closing `)' (subshell)
7019 or `}' (group command), we can set was_heredoc to 0 because we are
7020 no longer printing a here-document
7021 From a report by Grisha Levit <grishalevit@gmail.com>
7022
7023 7/3
7024 ---
7025 lib/readline/complete.c
7026 - rl_username_completion_function: simplify things by just skipping the
7027 function body if HAVE_GETPWENT is not defined.
7028 From a report by Grisha Levit <grishalevit@gmail.com>
7029
7030 lib/sh/ufuncs.c
7031 - fsleep: broke into three functions: nsleep, which uses nanosleep,
7032 ssleep, which uses select/pselect, and ancientsleep, which uses
7033 sleep. Prefer nanosleep, use the others depending on what's
7034 defined.
7035 From a report and patch by Grisha Levit <grishalevit@gmail.com>
7036
7037 arrayfunc.c
7038 - assign_compound_array_list: now behaves more like a series of
7039 assignment statements (a=(one two) is more like a[0]=one a[1]=two)
7040 in terms of error handling -- break after the first invalid
7041 assignment -- and return value -- now return int, 0 on failure and
7042 1 on success so the callers can throw assignment errors
7043 - assign_compound_array_list: if we have an explicit [subscript]=value
7044 assignment, use the negative-indices-count-back-from-the-end strategy;
7045 otherwise use last_ind and throw an error on overflow. This is like
7046 standalone assignment statements
7047 - assign_array_var_from_string: catch new return value from
7048 assign_compound_array_list; return NULL if assign_compound_array_list
7049 returns failure
7050
7051 subst.c
7052 - do_compound_assignment: if assign_compound_array_list or
7053 assign_array_var_from_string return error (0 or NULL, respectively),
7054 treat as an assignment error similar to assigning to a readonly
7055 variable
7056 Inspired by a report from Emanuele Torre <torreemanuele6@gmail.com>
7057
7058 arrayfunc.h
7059 - assign_compound_array_list: new return type
7060
7061 7/5
7062 ---
7063 builtins/enable.def
7064 - enable_builtin: make sure dynamic builtin loading and unloading
7065 updates the `enabled' and `disabled' programmable completion lists.
7066 From a report and patch by Grisha Levit <grishalevit@gmail.com>
7067
7068 doc/bash.1,doc/bashref.texi
7069 - hash: add note that assigment to PATH clears the hash table.
7070 Report by Sebastian Carlos <sebaaa1754@gmail.com>
7071
7072 lib/readline/complete.c
7073 - rl_filename_completion_function: make sure the results of
7074 *rl_filename_rewrite_hook are freed consistently if the function
7075 returns newly-allocated memory
7076 From a report and patch by Grisha Levit <grishalevit@gmail.com>
7077 back in May
7078
7079 7/6
7080 ---
7081 builtins/cd.def
7082 - cd_builtin: if $OLDPWD is set by the user or script to something
7083 that's not a full pathname, allow it to use $CDPATH.
7084 From a report by Dustin Boyd <chronokitsune3233@gmail.com>
7085
7086 7/7
7087 ---
7088 shell.h
7089 - user_info: add members for saved uid and saved gid
7090
7091 shell.c
7092 - uidget: if we have setresuid/setresgid, get the saved uid and saved
7093 gid so we can set them if we disable privileged mode
7094 - disable_priv_mode: only call setuid/setresuid and setgid/setresgid
7095 if the euid (egid) != uid (gid). If we have setresuid/setresgid,
7096 add a check whether the saved uid (gid) isn't the same as the real
7097 uid (gid). Potentially saves a couple of system calls.
7098 Fixes Android issue, patch by Grisha Levit <grishalevit@gmail.com>
7099
7100 test.c
7101 - unary_operator: only support historical handling of -t and its
7102 optional argument when not in posix mode
7103 - unary_test: print an error if the argument to -t is not a number
7104 - unary_operator: only make the argument to -t optional if the
7105 next argument is -a or -o and we are using the historical algorithm
7106 (argc >= 5), otherwise force it to be a number and print an error
7107 message if it's not
7108 From a report by Stephane Chazelas <stephane@chazelas.org>
7109
7110 doc/bash.1,doc/bashref.texi
7111 - added note about test/[ sorting using the current locale with the
7112 `<' and `>' operators when in posix mode
7113 - added note about the integer argument to test -t being required
7114 when in posix mode
7115 - added note recommending against the use of test with 5 or more
7116 arguments in favor of combining multiple instances of test with
7117 && or ||
7118 From a report by Stephane Chazelas <stephane@chazelas.org>
7119
7120 7/10
7121 ----
7122 jobs.c
7123 - start_job: turn off (on) the J_ASYNC flag depending on whether the
7124 job is being started in the foreground (background). It matters now
7125 that we use IS_ASYNC to determine whether to give the terminal
7126 back to the shell's process group.
7127 From a report by Grisha Levit <grishalevit@gmail.com>
7128
7129 bashline.c
7130 - command_word_completion_function: if we have a glob pattern that
7131 expands to multiple words, dispose of the list before returning NULL.
7132 From a report by Grisha Levit <grishalevit@gmail.com>
7133
7134 variables.c
7135 - makunbound: if we're unsetting a local variable, preserve the export
7136 attribute even if the variable's not in the temporary environment
7137 Tentative fix, compatible with other POSIX shells (except the BSD
7138 variants of ash)
7139
7140 7/12
7141 ----
7142 lib/sh/unicode.c
7143 - include <langinfo.h> if HAVE_LANGINFO_CODESET is defined, use
7144 nl_langinfo (CODESET) if HAVE_LANGINFO_CODESET is define, since
7145 we no longer check for nl_langinfo. This is what locale.c does.
7146
7147 7/15
7148 ----
7149 lib/readline/display.c
7150 - rl_redisplay: rudimentary code to handle some cases where the line
7151 buffer consumes more than the physical number of screen lines. It's
7152 not a screen editor, but it handles some of the common cases.
7153 From https://bugs.launchpad.net/ubuntu/+source/bash/+bug/2024628
7154
7155 7/17
7156 ----
7157 builtins/printf.def
7158 - getwidestr: make sure to force mbsrtowcs to convert the closing NULL
7159 so the wide-character string is NULL-terminated.
7160 From a report by Grisha Levit <grishalevit@gmail.com>
7161
7162 lib/sh/shmatch.c
7163 - strregerror: new function to return regerror(3) error message text
7164 in allocated memory
7165 - sh_regmatch: add an additional argument to hold the error message
7166 from regerror(3), in newly-allocated memory; generated by call to
7167 strregerror() on regcomp(3) failure
7168 From a patch by Grisha Levit <grishalevit@gmail.com>
7169
7170 externs.h
7171 - sh_regmatch: update extern declaration
7172
7173 execute_cmd.c
7174 - execute_cond_node: pass pointer to buffer to return any error
7175 message; if sh_regmatch returns 2, use a non-NULL error buffer in
7176 the error message.
7177
7178 lib/readline/bind.c
7179 - _rl_get_string_variable_value: return the values for
7180 active-region-start-color (_rl_active_region_start_color) and
7181 active-region-end-color (_rl_active_region_end_color) if they
7182 are set.
7183 Fixes bind -v issue reported by Sebastian Carlos <sebaaa1754@gmail.com>
7184 - _rl_get_string_variable_value: if the history is stifled, make
7185 sure we report the history size as < 0 so the output of bind -v
7186 can be reused as input.
7187 Fixes bind -v issue reported by Sebastian Carlos <sebaaa1754@gmail.com>
7188
7189 7/20
7190 ----
7191 pathexp.c
7192 - quote_string_for_globbing: don't bother backslash-quoting multibyte
7193 characters. It matters for macOS and doesn't make a difference for
7194 other systems, and those aren't going to be special globbing chars.
7195 From a report by Grisha Levit <grishalevit@gmail.com>
7196
7197 lib/glob/glob.c
7198 - glob_vector: normalize the pattern with fnx_fromfs so we make sure
7199 it's also in NFC on macOS (other systems don't care). This is a
7200 POSIX violation, but part of correcting the longtime HFS+ (and Finder)
7201 misfeature
7202
7203 lib/readline/complete.c
7204 - rl_filename_completion_function: if the application sets a filename
7205 rewrite hook, use it to rewrite the filename we're matching as well
7206 as filenames read with readdir().
7207 [SUPERSEDED BY CHANGE OF 10/4/2023]
7208 From a report by Grisha Levit <grishalevit@gmail.com>
7209
7210 7/21
7211 ----
7212 pathexp.c
7213 - quote_string_for_globbing: see if we can get away without backslash-
7214 quoting single-byte characters that aren't CTLESC or characters
7215 that are special to EREs or BREs, even if they're quoted
7216
7217 bashline.c
7218 - bashline_set_filename_hooks: convenience function to set the
7219 directory hook and the filename rewrite and stat hooks; call from
7220 other places in the file so these are set consistently
7221
7222 bashline.h
7223 - bashline_set_filename_hooks: extern declaration
7224
7225 builtins/complete.def
7226 - compgen_builtin: make sure to set the directory and filename hooks
7227 so compgen called from a script works more like compgen called
7228 from a word completion context.
7229 Inspired by a report by Grisha Levit <grishalevit@gmail.com>
7230
7231 doc/Makefile.in
7232 - bash.pdf: use groff -T pdf to create, instead of creating postscript
7233 and then using ghostscript
7234
7235 7/24
7236 ----
7237 jobs.c
7238 - start_job: unconditionally send SIGCONT to the job we just started,
7239 even if we think it was already running, to reduce the window for a
7240 potential race condition, and only change the state to RUNNING if
7241 the SIGCONT succeeds or if the process has terminated so we can
7242 clean it up later.
7243 Report from Earl Chew <earl_chew@yahoo.com>
7244
7245 make_cmd.c
7246 - make_simple_command,make_bare_simple_command: now take line number as
7247 an argument; used instead of line_number to set the line associated
7248 with the simple command
7249
7250 make_cmd.h
7251 - make_simple_command,make_bare_simple_command: change prototype
7252
7253 parse.y,builtins/command.def,builtins.jobs.def
7254 - make_simple_command,make_bare_simple_command: change callers
7255
7256 7/25
7257 ----
7258 parse.y
7259 - read_token_word: try to keep track of whether we are parsing the
7260 first word of a simple command and set simplecmd_lineno if we
7261 are. We start a simple command when we return ASSIGNMENT_WORD
7262 or WORD in a command token position. This gives better values for
7263 $LINENO in multi-line simple commands
7264 - redirection: set simplecmd_lineno if it's -1, meaning this is a
7265 simple command with a leading redirection or a null command with
7266 only a redirection
7267 - pass simplecmd_lineno to make_simple_command if we are starting a
7268 simple command (the first ELEMENT)
7269 - parse_comsub,xparse_dolparen: save and restore simplecmd_lineno
7270 - simple_command,function_def production: reset simplecmd_lineno to -1
7271 after parsing a simple command or a function declared as WORD()
7272
7273 7/26
7274 ----
7275 doc/bash.1,doc/bashref.texi
7276 - xpg_echo: add description of how this can be used to suppress echo
7277 option interpretation
7278 Inspired by report from Zachary Santer <zsanter@gmail.com>
7279
7280 7/27
7281 ----
7282 builtins/printf.def
7283 - printf_erange: make out-of-range errors conversion errors even if
7284 the conversion function fully consumes the argument.
7285 From a report by thomas@habets.se
7286
7287 7/31
7288 ----
7289 lib/readline/rltypedefs.h
7290 - rl_macro_print_func_t: typedef for a function to print macro key
7291 bindings
7292
7293 lib/readline/bind.c
7294 - rl_macro_display_hook: hook function to call if the application
7295 wants to display a key sequence bound to a macro
7296 - rl_macro_dumper: if rl_macro_display_hook is non-NULL, call it to
7297 display the macro value (after `untranslating' it to add back any
7298 required backslashes)
7299
7300 lib/readline/doc/rltech.texi
7301 - rl_macro_display_hook: add description
7302
7303 pathexp.c
7304 - glob_char_p: add the characters that are special within BRE bracket
7305 expressions.
7306 Inspired by a report by Grisha Levit <grishalevit@gmail.com>
7307
7308 bashline.c
7309 - bind_keyseq_to_unix_command: allow whitespace to separate the keyseq
7310 and the command string, but require the command string to be
7311 surrounded by double quotes if it is. If we get a whitespace
7312 separator, call rl_macro_bind so we get the string `translated'
7313 according to how readline does it (backslash-escape sequences
7314 processed, etc.)
7315 - print_unix_command: function to print a key sequence and a unix
7316 command bound to it from cmd_xmap, using a space separator
7317 - print_unix_command_map: make sure to set rl_macro_display_hook to
7318 print_unix_command before calling rl_macro_dumper to print the
7319 bound command strings
7320
7321 8/1
7322 ---
7323 builtins/read.def
7324 - read_builtin: saw_escape is now a count of CTLESCs we added to the
7325 input
7326 - read_builtin: since we increment saw_escape when we add a CTLESC,
7327 decrement it when we remove one from the input (\\\n, \\\0)
7328 - read_builtin: remove the CTLESC we added if we have a backslash-
7329 escaped NULL character ('\0')
7330 - read_builtin: if the input ends with an unescaped newline, remove
7331 the CTLESC we added
7332 From a report by Grisha Levit <grishalevit@gmail.com>
7333
7334 8/2
7335 ---
7336 builtins/history.def
7337 - history_builtin: if history -[anrw] is used without a filename
7338 argument, and HISTFILE is unset or null, return success immediately
7339 From a report by Grisha Levit <grishalevit@gmail.com>
7340
7341 doc/{bash.1,bashref.texi},lib/readline/doc/hsuser.texi
7342 - history: document that if filename is not supplied, and HISTFILE is
7343 unset or null, the [-anrw] options have no effect
7344
7345 8/3
7346 ---
7347 pcomplete.c
7348 - gen_progcomp_completions: if the actual compspec that's run is
7349 something different from what's typed (full pathname, alias, etc.),
7350 set pcomp_curcmd to the word corresponding to the actual compspec,
7351 instead of what was typed. This is what eventually gets used by
7352 the compopt builtin's output.
7353 From a report by Grisha Levit <grishalevit@gmail.com>
7354
7355 execute_cmd.c
7356 - execute_coproc: in parent, close /dev/fd FIFOs only if we're not
7357 executing a shell function, like other calls to unlink_fifo_list().
7358 Report from Hal Blackburn in
7359 https://savannah.gnu.org/support/index.php?110910
7360
7361 subst.c
7362 - do_compound_assignment: don't attempt to convert a global associative
7363 array to an indexed array with declare -g.
7364 From a report and patch by Grisha Levit <grishalevit@gmail.com>
7365
7366 8/7
7367 ---
7368 lib/readline/bind.c
7369 - rl_print_keybinding: new function, prints a the key bindings for a
7370 single function specified by name
7371 - rl_function_dumper: call rl_print_keybinding for every function name
7372
7373 lib/readline/readline.h
7374 - rl_print_keybinding: extern declaration
7375
7376 lib/readline/bind.c
7377 - _rl_untranslate_macro_value: make sure characters betweeen 128 and
7378 159 (metafied control characters) are printed using the \M-\C-
7379 notation instead of directly writing the control character.
7380 From a report and patch by Grisha Levit <grishalevit@gmail.com>
7381 - rl_get_keyname: if a key binding shadows a function or macro, print
7382 the ANYOTHERKEY binding as a null string
7383 From a report and patch by Grisha Levit <grishalevit@gmail.com>
7384 - rl_untranslate_keyseq: make changes analogous to
7385 _rl_untranslate_macro_value so that we don't print control characters
7386 directly
7387 - rl_invoking_keyseqs_in_map: if the key corresponds to a keymap, use
7388 _rl_get_keyname to get its text representation, so this function
7389 returns consistent results
7390 - rl_translate_keyseq: if convert-meta is on, don't convert meta chars
7391 that are, e.g., \M-\C-@ (128) into \e followed by a NUL, resulting
7392 in truncated key sequences. Just don't honor convert-meta in this
7393 case
7394
7395 8/8
7396 ---
7397 bashhist.c
7398 - bash_history_no_expand_chars: add the rest of the shell
7399 metacharacters so we don't get empty history events; tcsh does more
7400 or less the same thing
7401 Inspired by a report from Emanuele Torre <torreemanuele6@gmail.com>
7402
7403 8/9
7404 ---
7405 parse.y
7406 - grammar: change bare `time' and `!' productions to use nullcmd_terminator,
7407 which is a list_terminator or a `&' to allow things like `time &'
7408 and `! &' which the original version of POSIX interp 267 (the one
7409 I implemented) says we should support
7410
7411 8/11
7412 ----
7413 m4/bison.m4,m4/flexmember.m4,m4/locale_h.m4
7414 - new m4 files from gettext-0.21.1
7415
7416 m4/gettext.m4,m4/intl.m4
7417 m4/{codeset,extern-inline,fcntl-o,glibc2,glibc21,host-cpu-c-abi,iconv,intdiv0}.$
7418 m4/{intl-thread-locale,intlmacosx,intmax,inttypes-pri,inttypes,inttypes_h}.m4
7419 m4/{lcmessage,lib-ld,lib-link,lib-prefix,locale_h,lock,nls,po,printf-posix}.m4
7420 m4/{progtest,pthread_rwlock_rdlock,size_max,stdint_h,strtoimax,threadlib}.m4
7421 m4/{uintmax_t,ulonglong,visibility,wchar_t,wint_t,xsize}.m4
7422 - updated m4 files from gettext-0.21.1
7423
7424 configure.ac,config.h.in
7425 - updated autoconf files with changes for gettext-0.21.1
7426
7427 MANIFEST
7428 - updated distribution manifest with new files from gettext-0.21.1
7429
7430 lib/sh/unicode.c
7431 - u32cconv: prefer nl_langinfo to locale_charset like locale.c:
7432 locale_isutf8()
7433
7434 execute_cmd.c
7435 - uw_restore_lineno: an unwind-protect fuction to restore a saved
7436 line_number
7437 - execute_command: add an unwind-protect to restore line_number in
7438 case execute_simple_command longjmps back to top_level or a
7439 return context.
7440 Side effect of https://savannah.gnu.org/support/index.php?110919
7441 - execute_for_command, execute_select_command, execute_case_command:
7442 add unwind-protect to restore line_number (could also do it for
7443 if, while, until but those don't modify line_number)
7444 - execute_command_internal: add_unwind_protect to restore line number
7445 for arith, cond, function def commands
7446
7447 8/14
7448 ----
7449 execute_cmd.c
7450 - execute_simple_command: don't call savestring on the_printed_command_except_trap
7451 if it's NULL.
7452 From a report by Grisha Levit <grishalevit@gmail.com>
7453
7454 8/15
7455 ----
7456 lib/readline/rltty.c
7457 - prepare_terminal_settings: replace USE_XON_XOFF macro with private
7458 variable _rl_use_tty_xon_xoff (initially set to 1); if it's set to
7459 0 disable the tty start and stop characters. Prep for making it a
7460 bindable variable setting
7461
7462 builtins/read.def
7463 - edit_line: now takes a third argument saying whether or not to
7464 set rl_attempted_completion_function to NULL to use readline's
7465 default filename completion (the default)
7466 - read_builtin: new option -E to use readline and use the bash
7467 default completion (that is, leave rl_attempted_completion_function
7468 unchanged)
7469 From a suggestion by konsolebox <konsolebox@gmail.com> back in 5/2021
7470
7471
7472 doc/bash.1,doc/bashref.texi
7473 - read: document new -E option
7474
7475 8/17
7476 ----
7477 aclocal.m4
7478 - BASH_CHECK_LIB_TERMCAP: add a check for bash_cv_termcap_lib ==
7479 "libcurses"; set TERMCAP_LIB=-lcurses in this case
7480
7481 8/18
7482 ----
7483 subst.c
7484 - bash_variable_assignment_error: new function, implements default mode
7485 behavior for variable assignment errors
7486 - posix_variable_assignment_error: new function, implements posix mode
7487 behavior for variable assignment errors
7488 - parameter_brace_expand_rhs,expand_declaration_argument,
7489 do_assignment_statements: call posix_variable_assignment_error or
7490 bash_variable_assignment_error as appropriate
7491
7492 8/21
7493 ----
7494 lib/readline/misc.c
7495 - _rl_arg_dispatch: add the digits or other characters to
7496 rl_executing_keyseq if we're not calling _rl_dispatch.
7497 From a report by Grisha Levit <grishalevit@gmail.com>
7498
7499 print_cmd.c
7500 - print_simple_command: make sure that the_printed_command[0] == '\0'
7501 if we're printing a null simple command with no words
7502 Patch by Grisha Levit <grishalevit@gmail.com>
7503
7504 8/22
7505 ----
7506 builtins/read.def
7507 - read_builtin: make `delim' variable local, pass to edit_line to
7508 set the last character of the returned line; change edit_line
7509 prototype.
7510 From a suggestion by Grisha Levit <grishalevit@gmail.com>
7511
7512 8/23
7513 ----
7514 parse.y
7515 - comsub and funsub productions: don't reset eof_encountered to 0 in
7516 the action
7517
7518 subst.c
7519 - function_substitute: unwind-protect eof_encountered so ignoreeof
7520 doesn't keep getting reset to 0 if PS1 includes a ${ ...;} command.
7521 From a report by Grisha Levit <grishalevit@gmail.com>
7522
7523 8/25
7524 ----
7525 doc/{bash.1,bashref.texi}
7526 - clarify the cases where arrayname[@] doesn't refer to all the
7527 elements of an associative array (the unset builtin and test/[/[[ -v
7528 for now)
7529 Inspired by https://savannah.gnu.org/support/index.php?110924
7530
7531 8/28
7532 ----
7533 execute_cmd.c
7534 - execute_for_command,execute_select_command,execute_arith_command,
7535 execute_case_command: fix up order in which BASH_COMMAND is set,
7536 the DEBUG trap is run, and PS4 is printed.
7537 From a report by Grisha Levit <grishalevit@gmail.com>
7538
7539 lib/readline/colors.c
7540 - RL_COLOR_PREFIX_EXTENSION: make sure the custom suffix has a leading
7541 `.'
7542 Report and fix from Stefan Klinger <readline-gnu.org@stefan-klinger.de>
7543
7544 lib/readline/parse-colors.c
7545 - free_color_ext_list: new function, called on parse error, frees the
7546 list of extensions
7547 - rl_reparse_colors: new public function, frees old extension list and
7548 reparses (presumably new) value of LS_COLORS; some minimal checking
7549 to make sure the value has really changed
7550
7551 9/1
7552 ---
7553 parse.y
7554 - time_command_acceptable: make sure `time' is recognized as a
7555 reserved word after DOLPAREN and DOLBRACE.
7556 Report from Dima Korobskiy <dkroot2@gmail.com>
7557
7558 builtins/printf.def
7559 - printf_builtin: make 'C' equivalent to 'lc'; 'S' equivalent to 'ls'
7560 as POSIX specifies
7561
7562 9/6
7563 ---
7564 eval.c
7565 - parse_command: don't run pending traps if we're parsing a command
7566 substitution
7567 From a report from Emanuele Torre <torreemanuele6@gmail.com>
7568
7569 9/8
7570 ---
7571 jobs.c
7572 - stop_pipeline: don't have the parent set the terminal pgrp; rely on
7573 child processes to do it to avoid potential race conditions.
7574 From a discussion beginning at
7575 https://lists.gnu.org/archive/html/bug-bash/2023-08/msg00087.html
7576
7577 builtins/printf.def
7578 - bexpand: when parsing the string to be expanded, consume entire
7579 multibyte characters at a time, in case their encoding includes a
7580 '\\'
7581 - printf_builtin: when parsing the format string, consume entire
7582 multibyte characters at a time unless they begin with '\\' or '%',
7583 to avoid characters whose encoding contains those characters
7584
7585 9/11
7586 ----
7587 builtins/hash.def
7588 - hash_builtin: if the -p option is supplied without a name to hash,
7589 it's an error
7590
7591 hashcmd.c
7592 - phash_remove: if the hash table is empty, return 1 like unalias does
7593 when the alias isn't in the hash table.
7594 Report from from Mike Jonkmans <bashbug@jonkmans.nl>
7595
7596 9/13
7597 ----
7598 test.c
7599 - binary_test,unary_test: now static
7600 - cond_test: new function, calls binary_test or unary_test as appropriate
7601 and handles longjmps from test_syntax_error
7602
7603 test.h
7604 - cond_test: extern declaration
7605
7606 execute_cmd.c
7607 - execute_cond_node: call cond_test instead of binary_test or unary_test.
7608 From a report and patch from Grisha Levit <grishalevit@gmail.com>
7609
7610 doc/bash.1,doc/bashref.texi
7611 - hash: add some text about the mutual exclusivity of the -t, -p, and
7612 -d options
7613
7614 9/14
7615 ----
7616 subst.c,subst.h,externs.h
7617 - string_extract,string_extract_verbatim,string_extract_double_quoted,
7618 string_extract_single_quoted,skip_single_quoted,skip_double_quoted,
7619 extract_delimited_string,extract_heredoc_dolbrace_string,
7620 extract_dollar_brace_string,parameter_brace_expand,param_expand,
7621 extract_command_subst,extract_function_subst,extract_arithmetic_subst,
7622 extract_process_subst,extract_array_assignment_list,
7623 expand_array_subscript
7624 change function signatures to take size_t * instead of int * for
7625 arguments that are string indices or lengths, change callers
7626 - unquoted_substring,unquoted_member,string_extract,
7627 string_extract_double_quoted,skip_double_quoted,
7628 string_extract_single_quoted,skip_single_quoted,
7629 string_extract_verbatim,extract_delimited_string,
7630 extract_heredoc_dolbrace_string,extract_dollar_brace_string,
7631 parameter_brace_expand,param_expand,skip_matched_pair,skip_to_delim,
7632 skip_to_histexp,list_string,expand_string_dollar_quote,
7633 parameter_brace_expand_rhs,expand_array_subscript,shouldexp_replacement,
7634 expand_array_subscript,string_quote_removal: change variables used
7635 for string indexes to size_t
7636 [merge from size_t branch]
7637
7638 arrayfunc.c
7639 - expand_compound_array_assignment: use size_t for string indices
7640
7641 braces.c
7642 - brace_gobbler: use size_t for string indices
7643
7644 parse.y
7645 - xparse_dolparen: change function signature to use size_t *
7646 instead of int * for string index, use size_t for string indices
7647
7648 general.c, general.h
7649 - bash_tilde_find_word: change function signature to use size_t *
7650 instead of int * for string index
7651
7652 lib/readline/readline.h
7653 - rl_reparse_colors: extern declaration
7654
7655 lib/readline/doc/rltech.texi
7656 - rl_reparse_colors: document as public function
7657
7658 9/21
7659 ----
7660 pcomplete.c
7661 - it_init_aliases: move the free (alias_list) inside #ifdef ALIAS.
7662 Report and fix from Mike Jonkmans <bashbug@jonkmans.nl>
7663
7664 redir.c
7665 - redirection_error: set W_NOPROCSUB in the word redirection_error
7666 creates to call redirection_expand
7667
7668 builtins/bind.def
7669 - bind_builtin: use CASE_HELPOPT so the long doc gets printed when
7670 --help is supplied
7671
7672 builtins/getopts.def
7673 - getopts_builtin: change to use no_options()
7674
7675 9/22
7676 ----
7677 execute_cmd.c
7678 - execute_select_command: in posix mode, an invalid selection variable
7679 name is a fatal error, just like with `for'. This is compatible with
7680 ksh93 and mksh
7681
7682 9/25
7683 ----
7684 subst.c
7685 - parameter_brace_expand_length: rearrange the code slightly to reduce
7686 the number of find_variable calls. This matters if the variable is
7687 dynamic and produces a new value each time (e.g., RANDOM).
7688
7689 9/26
7690 ----
7691 builtins/shift.def
7692 - shift_builtin: if get_numeric_arg returns a number out of range and
7693 we're going to print an error message, make sure to skip over an
7694 argument of `--' so we can print the right argument
7695
7696 builtins/break.def
7697 - break_builtin,continue_builtin: ditto with get_numeric_arg and `--'
7698
7699 9/28
7700 ----
7701 builtins/history.def
7702 - history_builtin: changed error message if the numeric argument to -d
7703 is invalid
7704
7705 9/29
7706 ----
7707 subst.c
7708 - array_length_reference: include the open bracket in the error message
7709 passed to err_badarraysub; it looks cleaner
7710
7711 10/2
7712 ----
7713 jobs.c
7714 - delete_all_jobs: if we are clearing the jobs list, reset the stats
7715 about running and dead jobs and child processes
7716 Report from Koichi Murase <myoga.murase@gmail.com>
7717
7718 10/4
7719 ----
7720 lib/readline/complete.c
7721 - rl_completion_rewrite_hook: rewrite hook applied to the completion
7722 word before comparing against the possible completions from the
7723 file system (modified by rl_filename_rewrite_hook)
7724 - rl_filename_completion_function: call rl_completion_rewrite_hook,
7725 if set by the calling application, on the filename portion of the
7726 word to be completed
7727
7728 lib/readline/readline.h
7729 - rl_completion_rewrite_hook: extern declaration
7730
7731 bashline.c
7732 - bash_set_filename_hooks: set rl_completion_rewrite_hook to
7733 bash_filename_rewrite_hook now that we've separated them
7734 From a report and patch from Grisha Levit <grishalevit@gmail.com>;
7735 original report from Stefan H. Holek <stefan@epy.co.at>
7736
7737 lib/readline/doc/rltech.texi
7738 - rl_completion_rewrite_hook: document
7739
7740 10/5
7741 ----
7742 lib/readline/complete.c
7743 - rl_complete_internal: use `%' as an op character to indicate that
7744 we should just display the completions, like '?' in previous versions
7745 (nothing uses this yet)
7746 - rl_possible_completions: set last_completion_failed to 0 before we
7747 pass '?' to rl_complete_internal so we don't worry about trying to
7748 insert a single completion
7749
7750 10/6
7751 ----
7752 subst.c
7753 - string_transform: use ansicstr directly for the `E' transformation
7754 so we don't accidentally remove too many escapes.
7755 From a report and patch from Grisha Levit <grishalevit@gmail.com>
7756
7757 execute_cmd.c
7758 - execute_arith_for_command: make sure a failed init expression resets
7759 loop_level so break and continue work correctly
7760 From a report and patch from Grisha Levit <grishalevit@gmail.com>
7761 - execute_for_command: set line_number for invalid identifier error
7762 messages; restore before returning error
7763 From a report and patch from Grisha Levit <grishalevit@gmail.com>
7764
7765 lib/readline/misc.c
7766 - _rl_set_insert_mode: manage RL_STATE_OVERWRITE when modifiying
7767 insert mode
7768
7769 doc/bash.1,doc/bashref.texi
7770 - some style and formatting changes from Bjarni Ingi Gislason
7771 <bjarniig@simnet.is>
7772
7773 subst.c
7774 - getifs: now returns allocated memory to insulate it from changes to
7775 $IFS
7776
7777 builtins/read.def
7778 - read_builtin: since getifs now returns allocated memory, note when
7779 we need to free ifs_chars and free it before returning.
7780 Reported by Robert Elz <kre@munnari.OZ.AU> in
7781 https://www.austingroupbugs.net/view.php?id=1778#c6513
7782
7783 10/7
7784 ----
7785 pathexp.c
7786 - glob_char_p: add more of the extglob pattern characters; it doesn't
7787 hurt to quote them
7788 Report and patch from Grisha Levit <grishalevit@gmail.com>
7789 - unquoted_glob_pattern_p: don't treat a `(' immediately following a
7790 `/' as a potential globbing character
7791 - unquoted_glob_pattern_p: only treat the extended glob characters
7792 followed by a `(' as a glob pattern if extended_glob is enabled
7793 - unquoted_glob_pattern_p: an unquoted backslash isn't treated
7794 specially any more, but if it's followed by a CTLESC, you still
7795 don't treat the next character as an unquoted globbing char
7796 Report and patch from Grisha Levit <grishalevit@gmail.com>
7797
7798 10/9
7799 ----
7800 builtins/common.c
7801 - get_numeric_arg: if fatal > 0, set the exit status to EX_USAGE
7802 and call jump_to_top_level with EXITPROG or DISCARD. We don't
7803 need to do everything that throw_to_top_level() does here (it's
7804 really meant for signals and other exceptional failure conditions).
7805
7806 builtins/cd.def
7807 - cd_builtin: exit with EX_USAGE on too many arguments
7808
7809 builtins/shift.def
7810 - shift_builtin: return EX_USAGE if get_numeric_arg returns 0,
7811 indicating that the argument wasn't a valid number
7812
7813 builtins/history.def
7814 - shift_builtin: return EX_USAGE if get_numeric_arg returns 0
7815
7816 builtins/exit.def
7817 - exit_or_logout: if get_exitstat (which calls get_numeric_arg) returns
7818 a value > EX_SHERRBASE, indicating an error, just return that to
7819 the caller and let the caller deal with it. This means that
7820 `exit xyz' is no longer a fatal error, but can potentially cause a
7821 non-interactive posix-mode shell to exit because exit is a special
7822 builtin
7823
7824 builtins/return.def
7825 - return_builtin: if a non-interactive shell in posix mode gets an
7826 invalid numeric arg from get_exitstat, return immediately and let
7827 the caller deal with exiting
7828 All prompted by a report by Martin Schulte <gnu@schrader-schulte.de>
7829
7830 10/13
7831 -----
7832 pathexp.c
7833 - unquoted_glob_pattern_p: restore some of the special treatment of
7834 backslash followed by CTLESC removed on 10/7
7835 Report and patch from Grisha Levit <grishalevit@gmail.com>
7836
7837 parse.y
7838 - parse_matched_pair: don't add an extra CTLESC after reading \CTLESC,
7839 like in other parts of the parser
7840
7841 subst.c
7842 - dequote_string: don't drop trailing CTLESC in a string with more
7843 than a single character
7844 Report and patch from Grisha Levit <grishalevit@gmail.com>
7845
7846 lib/sh/strtrans.c
7847 - ansicstr: handle $'\c^A' and $'\c^?' correctly when being expanded
7848 by the parser (flags&2). The parser passes these as \c^A^A and
7849 \c^A^?, respectively, so we should strip the quoting CTLESC.
7850 Report from Grisha Levit <grishalevit@gmail.com>
7851
7852 subst.[ch]
7853 - extract_dollar_brace_string: now global so brace expansion can use it
7854
7855 braces.c
7856 - brace_gobbler: use extract_dollar_brace_string if we see ${ with
7857 the appropriate value of QUOTING, so we don't have to teach brace
7858 expansion more shell syntax.
7859 Report from Emanuele Torre <torreemanuele6@gmail.com>
7860 - brace_gobbler: call the word extraction functions with SX_NOALLOC
7861 so we don't have to allocate memory we're just going to free
7862
7863 10/16
7864 -----
7865 builtins/read.def
7866 - read_builtin: return EX_MISCERROR (2) if there is an error trying
7867 to assign to one of the variables. This is what the newest POSIX
7868 draft specifies.
7869
7870 variables.c
7871 - dispose_variable_value: do the right thing for att_nofree vars
7872 - makunbound: call dispose_variable_value instead of using inline code
7873
7874 braces.c
7875 - brace_gobbler: make sure to set no_longjmp_on_fatal_error around
7876 calls to extract_dollar_brace_string
7877
7878 10/17
7879 -----
7880 braces.c
7881 - brace_gobbler: set SX_NOLONGJMP|SX_NOERROR in the flags passed
7882 to extract_command_subst; make sure no_longjmp_on_fatal_error
7883 is set before that call
7884 - brace_gobbler: revert 10/13 change to use extract_dollar_brace_string
7885
7886 10/20
7887 -----
7888 parse.y
7889
7890 - xparse_dolparen,parse_string_to_command: if SX_NOERROR is set in
7891 FLAGS, add PST_NOERROR to parser_state. Not much effect yet.
7892 - parse_matched_pair: if PST_NOERROR is set in parser_state, don't
7893 print an error message if we hit EOF, just return an error. A start
7894 at using PST_NOERROR to suppress error messages, not just duplicate
7895 ones. We'll see how this goes before adding more
7896
7897 builtins/printf.def
7898 - decodeprec: decode the precision into an intmax_t; clamp the return
7899 value at INT_MAX
7900 - printf_builtin: update to posix interp 1647 (even though it's about
7901 fprintf(3)) and output a NUL byte if %lc is supplied a null argument.
7902 - printf_builtin: fix case where %Q is supplied with a precision in
7903 the format string
7904 - printf_builtin: fix case where %Q is supplied with a precision
7905 greater than INT_MAX
7906 - getwidestr,getwidechar: handle case where there is no argument
7907 supplied; return NULL or NUL
7908 - convwidestr: allow a precedence of 0 for %ls
7909 - getint: don't call getintmax any more, just use the same code style
7910 inline; getintmax will consume an extra argument on an error
7911 Report and patches from Grisha Levit <grishalevit@gmail.com>
7912 - printf_builtin: handle field width and precision overflow from
7913 getint() by ignoring the argument (fieldwidth = 0, precision = -1)
7914
7915 10/26
7916 -----
7917 jobs.c
7918 - wait_for: rearrange code that sets the SIGINT handler to
7919 wait_sigint_handler and saves the old handler to old_sigint_handler
7920 to avoid delay before assigning the handler
7921 Report from Wenlin Kang <wenlin.kang@windriver.com>
7922 - wait_sigint_handler: if cur_sigint_handler (what restore_sigint_handler)
7923 just restored or ignored) is INVALID_SIGNAL_HANDLER, set the
7924 appropriate SIGINT handler with set_sigint_handler before sending
7925 ourselves SIGINT
7926
7927 10/30
7928 -----
7929 general.c
7930 - legal_number: use the same test (isspace(3)) to skip trailing
7931 whitespace that strtoimax uses to skip leading whitespace.
7932 Report and patch from Paul Eggert <eggert@cs.ucla.edu>
7933
7934 general.c,general.h
7935 - legal_number: renamed to valid_number, changed all callers
7936 - legal_identifier: renamed to valid_identifier, changed all callers
7937 - legal_alias_name: renamed to valid_alias_name, changed all callers
7938
7939 lib/sh/compat.c
7940 - legal_number: definition of legal_number here for backwards compat
7941 with old loadable builtins
7942 - legal_identifier: definition of legal_identifier here for backwards
7943 compat with old loadable builtins
7944 - legal_alias_name: same
7945
7946 subst.c
7947 - brace_expand_word_list: if brace_expand returns NULL, dummy up a
7948 single-element vector with a copy of the original word so we can
7949 add it to the result list unchanged.
7950 Inspired by https://savannah.gnu.org/support/?110948
7951
7952 11/3
7953 ----
7954 lib/readline/text.c
7955 - readstr: set of functions to read a string from the keyboard, using
7956 rl_line_buffer for temporary storage, with minimal editing and an
7957 optional caller-supplied completion function. Doesn't use the
7958 callback framework yet since none of the functions are public
7959 - rl_execute_named_command: new bindable function to read a bindable
7960 command name (from the funmap_names array) and execute it, with
7961 command name completion on SPACE and TAB
7962
7963 lib/readline/readline.h
7964 - rl_execute_named_command: new extern declaration
7965
7966 lib/readline/rlprivate.h
7967 - new extern declarations for the readstr function framework
7968
7969 lib/readline/funmap.c
7970 - execute-named-command: new bindable function name
7971
7972 lib/readline/emacs_keymap.c
7973 - rl_execute_named_function: bound to M-x by default
7974
7975 lib/readline/doc/rluser.texi
7976 - execute-named-command: document as bindable function name with its
7977 default binding to M-x in emacs mode
7978
7979 11/6
7980 ----
7981 lib/readline/search.c
7982 - _rl_nsearch_dispatch: use ^V/^Q for rl_quoted_insert into the
7983 search string
7984
7985 lib/readline/isearch.c
7986 - _rl_isearch_dispatch: use ^V or anything bound to rl_quoted_insert
7987 for rl_quoted_insert into the search string
7988
7989 lib/readline/terminal.c
7990 - add support for new BE/BD and PS/PE bracketed-paste capabilities.
7991 Nothing uses them yet.
7992
7993 11/10
7994 -----
7995 builtins/enable.def
7996 - dyn_load_builtin: if we don't find a pathname argument without a
7997 slash in BASH_LOADABLES_PATH, convert it to a pathname with a slash
7998 before calling dlopen, to force the loader to look in the current
7999 directory (Linux, for example, will not).
8000
8001 11/14
8002 -----
8003 examples/loadables/fdflags.c
8004 - fdflags_builtin: only parse the setspec once, since parsing uses
8005 strtok.
8006 Report and patch from Emanuele Torre <torreemanuele6@gmail.com>
8007
8008 11/15
8009 -----
8010 builtins/enable.def
8011 - dyn_load_builtin: if BASH_LOADABLES_PATH is set, use only it: don't
8012 fall back to looking in the current directory. This changes the
8013 historical behavior and brings the path behavior more in line with
8014 PATH, but not CDPATH.
8015
8016 11/20
8017 -----
8018 lib/readline/complete.c
8019 - rl_complete_internal: add `|' as a character for rl_complete_internal
8020 that also just displays the completions, since `%' is overloaded by
8021 rl_menu_complete
8022
8023 11/23
8024 -----
8025 examples/loadables/strptime.c
8026 - strptime: new loadable builtin, interface to strptime(3). Takes a
8027 date-time string as its arguments and tries to parse it according
8028 to a number of built-in formats. If successful, it outputs the
8029 result as a number of seconds since the epoch. Understands some
8030 handy shorthands like "now" and "tomorrow".
8031
8032 11/24
8033 -----
8034 tests/unicode1.sub
8035 - update the driver function using namerefs and ${!x[@]}
8036 - zh_TW.BIG5: fixed some problems with the test encodings.
8037 Report and patches from Grisha Levit <grishalevit@gmail.com>
8038
8039 11/25
8040 -----
8041 tests/glob2.sub
8042 - zh_HK.big5hkscs -> zh_TW.big5 to work around macOS 14 issues with
8043 BSD-based locale definition
8044
8045 bashline.c
8046 - bash_execute_unix_command: check count != 1 instead of count > 1 to
8047 handle negative arguments
8048
8049 lib/readline/bind.c
8050 - rl_trim_arg_from_keyseq: change the parsing_digits logic to handle
8051 multiple instances of `-' the same way rl_digit_loop does (collapse
8052 to 1)
8053 - rl_trim_arg_from_keyseq: fix typo to correctly recognize a `-'
8054 after a key sequence bound to universal-argument
8055 - rl_trim_arg_from_keyseq: trim negative argument for a key sequence
8056 that is shadowed by a longer key sequence (ANYOTHERKEY)
8057 Report and patches from Grisha Levit <grishalevit@gmail.com>
8058
8059 11/27
8060 -----
8061 support/shobj-conf
8062 - solaris2: change PIC option for non-gcc Solaris 2 builds
8063
8064 lib/malloc/malloc.c
8065 - binsize: make sure indexing into binsizes casts to size_t (unsigned)
8066
8067 examples/loadables/getconf.c
8068 - protect more of the _SC defines with #ifdefs for different systems
8069
8070 examples/loadables/fdflags.c
8071 - ALLFLAGS: add some more flag values from Solaris/AIX/HP-UX
8072
8073 11/28
8074 -----
8075 subst.c
8076 - function_substitute: unwind return_catch_flag unconditionally
8077 Report and patch from Grisha Levit <grishalevit@gmail.com>
8078 - function_substitute: save getopts state and restore it if the
8079 funsub declares a local copy of OPTIND
8080 Report and patch from Grisha Levit <grishalevit@gmail.com>
8081
8082 lib/readline/display.c
8083 - rl_redisplay: make sure lpos is initialized to 0 if local_prompt is
8084 NULL
8085
8086 shell.c
8087 - run_startup_files: make sure ssh_reading_startup_files is set to 0
8088 in more places; still dependent on SSH_SOURCE_BASHRC
8089
8090 builtins/evalstring.c
8091 - should_suppress_fork: make sure ssh_reading_startup_files is 0 in
8092 order to suppress a fork. It will never be non-zero unless someone
8093 enables SSH_SOURCE_BASHRC.
8094 Fixes https://issues.redhat.com/browse/RHEL-5653
8095
8096 variables.c
8097 - posix_unbind_tempvar: new function to implement POSIX interp 1009,
8098 which says that `x=4 unset x' not only unsets the variable in the
8099 temporary environment but the most recent scope as well.
8100
8101 variables.h
8102 - posix_unbind_tempvar: extern declaration
8103
8104 builtins/set.def
8105 - unset_builtin: if we are unsetting a variable that is in some
8106 temporary environment, and the shell is in posix mode, call
8107 posix_unbind_tempvar to implement the right posix behavior
8108
8109 doc/bashref.texi
8110 - update posix mode section with change to unset for interp 1009
8111
8112 12/1
8113 ----
8114 lib/readline/readline.c
8115 - _rl_subseq_result: add check before _rl_do_lowercase_version that
8116 _rl_to_lower actually results in a different key sequence
8117 Report and patch from Grisha Levit <grishalevit@gmail.com>
8118
8119 lib/readline/isearch.c
8120 - _rl_isearch_dispatch: if the function bound to a key and the function
8121 bound to the result of _rl_to_lower for that key are both
8122 rl_do_lowercase_version, just insert the key into the search string
8123
8124 12/5
8125 ----
8126 parse.y,parser.h
8127 - heredoc_string: new variable to indicate whether or not we're reading
8128 a here-document from an alias (a pushed string). Set in
8129 gather_here_documents individually for each call to
8130 make_here_document.
8131
8132 parse.y
8133 - read_a_line: if heredoc_string is non-zero, use shell_getc instead
8134 of yy_getc to get the right alias processing
8135 - shell_getc: if heredoc_string is non-zero, don't add a space to the
8136 end of the alias -- it can mess up the here-document delimiter if
8137 the next character is a newline
8138 Report and sample patch from gldrk <me@rarity.fan>
8139
8140 parse.y,make_cmd.c
8141 - read_a_line,make_here_document: if we're using shell_getc to read
8142 the body of a here-document, let it manage line_number
8143
8144 12/8
8145 ----
8146 bashline.c
8147 - bash_dequote_filename: fix an off-by-one error that didn't remove a
8148 closing single quote in a filename if it was backslash-escaped.
8149 Report by Ole Tange <ota@prosa.dk>, fix from Grisha Levit <grishalevit@gmail.com>
8150
8151 lib/readline/terminal.c
8152 - _rl_check_ansi_terminal: check whether or not rl_terminal_name
8153 appears to be an ANSI/ECMA-48 terminal. Check some common terminal
8154 types and then check whether some common terminal capabilities
8155 (ce, nd, ho, up) begin with CSI (ESC-[) and then have a correct
8156 subsequent character
8157 - _rl_term_isansi: new variable, holds readline's idea about whether
8158 the value of rl_terminal_name is an ANSI/ECMA-48 terminal. Initialized
8159 to RL_ANSI_TERM_DEFAULT; set to the result of _rl_check_ansi_terminal
8160 if initialized to 0 and on a `non-dumb' terminal
8161 From an idea by John Tsiombikas <nuclear@mutantstargoat.com> in 11/2023
8162
8163 lib/readline/rlconf.h
8164 - RL_ANSI_TERM_DEFAULT: define to 1 (yes) or 0 (no) to tell readline
8165 whether or not to assume it's running on an ANSI/ECMA-48 terminal.
8166 The default is 1 (yes)
8167
8168 12/11
8169 -----
8170 print_cmd.c
8171 - make_command_string_internal: when printing a coproc, print the
8172 coproc name only if the coproc command is not a simple command.
8173 Report from Albert Akchurin <ackbeat@gmail.com>
8174
8175 12/14
8176 -----
8177 doc/bash.1,doc/bashref.texi
8178 - bind: clarify meaning of `re-read' as being individual arguments
8179 to `bind'.
8180 Report from Dan Jacobson <jidanni@jidanni.org>
8181 - history expansion: add that the quick substitution character is
8182 only active when it's the first character on the line.
8183 Suggested by Dale R. Worley <worley@alum.mit.edu>
8184
8185 lib/readline/histexpand.c
8186 - history_expand: if history_quoting_state is "'", don't try to
8187 interpret the quick substitution syntax at the start of the string.
8188 Report from Sundeep Agarwal <learnbyexample.net@gmail.com>
8189
8190 execute_cmd.c,execute_cmd.h
8191 - save_lastarg: new function, returns saved value of $_ in allocated
8192 memory
8193
8194 parse.y
8195 - execute_variable_command: instead of inline code, call save_lastarg
8196
8197 mailcheck.c
8198 - check_mail: instead of inline code, call save_lastarg
8199 - check_mail: instead of calling bind_variable, use bind_lastarg
8200
8201 parse.y
8202 - decode_prompt_string: use save_lastarg() and bind_lastarg() to preserve
8203 the value of $_ across prompt string decoding.
8204 Patch from Grisha Levit <grishalevit@gmail.com>
8205
8206 12/21
8207 -----
8208 lib/readline/doc/readline.3
8209 - updates to some vi-mode bindings
8210 Patch from Josh Brobst <josh@brob.st>
8211
8212 builtins/setattr.def
8213 - set_or_show_attributes: in posix mode, supplying an argument that is
8214 not an identifier when not acting on functions is a utility error.
8215 This will cause a non-interactive shell to exit
8216
8217 12/27
8218 -----
8219 print_cmd.c
8220 - command_print_word_list,print_select_command_head,print_case_command_head,
8221 print_function_def: if we're in pretty-print mode, dequote words
8222 before printing them
8223 Report from Seth Sabar <sethsabar@gmail.com>
8224
8225 shell.c
8226 - execute_profile_file,execute_bashrc_file: separate the (duplicated)
8227 code that sources the various profile and bashrc files out into
8228 separate functions
8229 - find_bashrc_file: new function, returns the name of the interactive
8230 shell startup file that should be executed if --rcfile (--init-file)
8231 is not supplied; currently returns DEFAULT_BASHRC
8232 - bashrc_file: default to NULL, making it just the filename supplied as
8233 an argument to --rcfile/--init-file
8234 - execute_bashrc_file: execute whatever find_bashrc_file() returns
8235 if bashrc_file is NULL
8236 From a patch from Allison Karlitskaya <allison.karlitskaya@redhat.com>
8237
8238 1/3/2024
8239 --------
8240 print_cmd.c
8241 - print_case_clauses: if we're printing a comsub for subsequent parsing,
8242 don't add a newline before the first case clause, since it adds a
8243 token after the `in' that will allow reserved words to be parsed.
8244 Report from Oguz <oguzismailuysal@gmail.com>
8245
8246 1/5
8247 ---
8248 lib/readline/doc/rltech.texi,lib/readline/doc/readline.3
8249 - Note that since quoted characters are possible, the line readline()
8250 returns may contain embedded newlines.
8251 From a report by Martin Buck <mb-tmp-tah.bet@gromit.dyndns.org>
8252
8253 1/8
8254 ---
8255 parse.y
8256 - parse_compound_assignment,parse_string_to_word_list: if we call
8257 reset_parser, directly or indirectly via yyerror, make sure to set
8258 the pushed_strings member of the saved parser state to NULL, since
8259 reset_parser already freed it and we don't want to try and restore
8260 it in restore_parser_state.
8261 From a report by Nathan Mills <the.true.nathan.mills@gmail.com>
8262
8263 1/10
8264 ----
8265 builtins/hash.def, builtins/ulimit.def
8266 - add some calls to sh_chkwrite where there is builtin output
8267
8268 lib/sh/eaccess.c
8269 - sh_stat: use strcpy/strcpy when constructing pbuf instead of
8270 strcpy/strcat
8271
8272 lib/sh/tmpfile.c
8273 - sh_mktmpname,sh_mktmpfd,sh_mktmpdir: use snprintf (filename, PATH_MAX, ...)
8274 instead of sprintf (filename, ...)
8275
8276 1/11
8277 ----
8278 configure.ac
8279 - unconditionally AC_DEFINE(PGRP_PIPE), to prevent the problem with a
8280 pipeline and a DEBUG trap containing an external command described
8281 in https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00037.html
8282
8283 1/12
8284 ----
8285 jobs.c
8286 - wait_for_any_job: if we're executing a funsub/varsub, do the wait
8287 even if the jobs list is frozen, but don't remove the job from the
8288 table or change its notification status
8289 Report from Oguz <oguzismailuysal@gmail.com>
8290
8291 subst.c
8292 - uw_unbind_variable: unset the first instance of the named variable,
8293 don't follow namerefs. This is for REPLY in a varsub if it's made
8294 a nameref.
8295 Report from Oguz <oguzismailuysal@gmail.com>
8296
8297 shell.c
8298 - main: call compat_init() so the linker drags in the old compatibility
8299 functions from lib/sh/compat.c. Primarily for use by existing loadable
8300 builtins
8301
8302 parse.y
8303 - parse_compound_assignment: handle error case (wl == &parse_string_error)
8304 before restoring the parser state from ps
8305 Report from Grisha Levit <grishalevit@gmail.com>
8306
8307 1/13
8308 ----
8309 lib/readline/complete.c
8310 - compute_lcd_of_matches: move a strlen out of a call to MBRTOWC by
8311 computing the length of the entire string once and then using an
8312 offset from it while going through the loop
8313
8314 1/15
8315 ----
8316 parse.y
8317 - parse_compound_assignment: treat parsing a string following (( (read
8318 by parse_dparen but not an arithmetic command) the same as
8319 expanding an alias when fixing up the pushed string list
8320 Report from Grisha Levit <grishalevit@gmail.com>
8321
8322 1/18
8323 ----
8324 doc/bash.1
8325 - typos and style fixes to satisfy groff warnings; remove uses of the
8326 `CW' constant-width font; use .EX/.EE for examples; use consistent
8327 style for double-quoted strings; fix inconsistent inter-paragraph
8328 spacing
8329 Fixes from G. Branden Robinson <g.branden.robinson@gmail.com>
8330
8331 1/19
8332 ----
8333 test.c
8334 - binary_test: make sure all calls in posix mode use TEST_LOCALE for
8335 locale-specific string comparisons
8336
8337 shell.c
8338 - find_bashrc_file: remove
8339
8340 1/20
8341 ----
8342 shell.c
8343 - exit_shell: don't try to call rl_deprep_terminal, regardless of the
8344 readline state we inherited, if bash_readline_initialized is 0
8345 Fixes bug reported by Oguz <oguzismailuysal@gmail.com>
8346 - shell_reinitialize: reset startup_state and reading_shell_script to 0;
8347 reset debugging_mode to 0
8348
8349 1/22
8350 ----
8351 builtins/shopt.def
8352 - reset_shopt_options: reset debugging_mode to 0
8353
8354 builtins/set.def
8355 - reset_shell_options: reset interactive_comments to 1
8356
8357 braces.c
8358 - brace_expand: if the first call to brace_gobbler consumes the entire
8359 string, don't try to call it again
8360 - brace_expand: check that i < tlen before checking to see if
8361 expand_seqterm left more of the string unconsumed
8362 - brace_gobbler: if extract_command_subst hits the end of the string
8363 without closing the command substitution, make sure we return 0 as
8364 well as set *i = tlen
8365 From a fuzzing report by Nathan Mills <the.true.nathan.mills@gmail.com>
8366
8367 1/23
8368 ----
8369 subst.c
8370 - function_substitute: unwind-protect current_builtin and this_shell_builtin
8371 like we do this_shell_function
8372 From a fuzzing report by Nathan Mills <the.true.nathan.mills@gmail.com>
8373
8374 1/24
8375 ----
8376 braces.c
8377 - brace_gobbler: handle nofork command substitutions; skip over any
8378 enclosed command and any braces it contains
8379
8380 bashline.c
8381 - check_redir: return 0 if we're in a nofork comsub, so we will attempt
8382 command word completion if appropriate
8383
8384 1/26
8385 ----
8386 lib/readline/readline.h
8387 - RL_STATE_READSTR: new state flag saying we are reading an arbitrary
8388 string from the keyboard using rl_readstr
8389
8390 lib/readline/rlprivate.h
8391 - READSTR_FREEPMT: new context state flag for rl_readstr; indicates
8392 that we have allocated a new prompt with _rl_make_prompt_for_search
8393 and we should free it with rl_restore_prompt because rl_clear_message
8394 will not do it
8395
8396 lib/readline/text.c
8397 - _rl_readstr_init,_rl_readstr_cleanup: set and unset RL_STATE_READSTR
8398 - _rl_unsave_saved_readstr_line: free any rl_undo_list, which we may
8399 have accumulated while reading the string, before restoring the line
8400 Fixes leaks reported by sparrowhawk996@gmail.com.
8401 - _rl_readstr_init: set the READSTR_FREEPMT context flag after we
8402 call _rl_make_prompt_for_search, which calls rl_save_prompt
8403 - _rl_readstr_sigcleanup: new function to call from signal cleanup;
8404 restores prompt and calls _rl_readstr_cleanup to free the readstr
8405 context
8406 - _rl_readstr_restore: if the RL_READSTR_FREEPMT flag is set in the
8407 context, call rl_restore_prompt to deallocate the prompt we created
8408
8409 lib/readline/callback.c
8410 - rl_callback_sigcleanup: call _rl_readstr_sigcleanup to deallocate
8411 readstr state on a signal
8412
8413 lib/readline/text.c
8414 - rl_execute_named_command: free COMMAND before returning
8415
8416 1/27
8417 ----
8418 lib/readline/rlprivate.h
8419 - SF_FREEPMT: new flag for non-incremental search contexts: means we
8420 saved the prompt data with _rl_make_prompt_for_search and need to
8421 restore it with rl_restore_prompt, since rl_clear_message will not
8422
8423 lib/readline/search.c
8424 - _rl_nsearch_sigcleanup: new function that if calls rl_restore_prompt
8425 to clean up the saved prompt data if necessary before calling the
8426 context cleanup function, avoids memory leak
8427 - _rl_nsearch_init: set the SF_FREEPMPT flag after calling
8428 _rl_make_prompt_from_search so we can clean it up properly on errors
8429 - _rl_nsearch_abort,_rl_nsearch_dosearch: call rl_restore_prompt only
8430 if cxt->sflags includes SF_FREEPMT, manage SF_FREEPMT state
8431
8432 lib/readline/signals.c
8433 - _rl_state_sigcleanup: call _rl_nsearch_sigcleanup
8434
8435 lib/readline/callback.c
8436 - _rl_callback_sigcleanup: call _rl_nsearch_sigcleanup
8437
8438 1/29
8439 ----
8440 builtins/cd.def
8441 - change_to_directory: don't try to canonicalize a NULL path that's
8442 NULL after make_absolute.
8443 From a report by Kerin Millar <kfm@plushkava.net>
8444
8445 jobs.c
8446 - retrieve_proc_status,delete_proc_status: external interfaces to
8447 bgp_search and bgp_delete, respectively; these take an argument
8448 that says whether or not to block SIGCHLD
8449
8450 jobs.h
8451 - retrieve_proc_status,delete_proc_status: extern declarations
8452
8453 builtins/wait.def
8454 - check_bgpids: new function to check whether a requested PID is in
8455 the bgpids table (retrieve_proc_status) and optionally delete it
8456 if it is (posixly_correct delete_proc_status) while returning its
8457 status. If the PID isn't in the bgpids table, return -1
8458 - wait_builtin: if -n is supplied with pid/job arguments, use
8459 check_bgpids to check the bgpids table for any of the requested
8460 pids. Tagged for bash-5.3, might need another option
8461 From a report by Steven Pelley <stevenpelley@gmail.com>
8462
8463 1/30
8464 ----
8465 redir.c
8466 - redir_open: assume the AFS bug with O_CREAT and existing files in
8467 protected directories has been fixed over the years, so take out
8468 the workaround.
8469 From a report by Etienne Champetier <champetier.etienne@gmail.com>
8470
8471 jobs.c
8472 - wait_for_any_job: if the jobs list is frozen and we're running a
8473 funsub, mark the job as notified so it gets cleaned up later
8474 - wait_for_any_job: if we're in posix mode, we should remove the job
8475 from the job list and not add it to the bgpids list, as posix
8476 requires
8477
8478 builtins/set.def
8479 - set_shellopts: use ASS_FORCE in the call to bind_variable so we
8480 don't have to mess with temporarily turning off readonly
8481
8482 builtins/shopt.def
8483 - set_bashopts: same
8484 Report by Emanuele Torre <torreemanuele6@gmail.com>
8485
8486 2/1
8487 ---
8488 builtins/printf.def
8489 - vblen: make it a size_t to avoid going negative on underflow
8490 - clearerr, ferror, fflush: don't test these if vflag is set and we're
8491 writing to a string (multiple places)
8492 - vbprintf: pass through failure returns (< 0) from vsnprintf to the
8493 caller(s) so we can return on errors
8494 - printf_builtin: remove redundant test for empty or missing format
8495 string
8496 - PF: call builtin_error if vflag is set, sh_wrerror otherwise
8497 (via PRETURN)
8498 - PF: use PRETURN so we can get partial output to the variable on
8499 error (if vflag is set)
8500 - PRETURN: free conv_buf before attempting the write (it would get
8501 cleaned up on the next call, but why not)
8502 - PRETURN: clean up vbuf only if vflag is set, and clean it up on
8503 error (it would get cleaned up on the next call, but...)
8504 Fixes from Grisha Levit <grishalevit@gmail.com>
8505
8506 2/2
8507 ---
8508 doc/bash.1,doc/bashref.texi
8509 - word expansions: make it clearer that quote removal is one of the
8510 shell word expansions
8511
8512 execute_cmd.c,execute_cmd.h
8513 - currently_executing_command: no longer static, so other parts of
8514 the shell can save and restore it if necessary
8515
8516 subst.c
8517 - function_substitute: unwind-protect currently_executing_command,
8518 since parse_and_execute can overwrite it in the current shell
8519 execution context.
8520 Report from Grisha Levit <grishalevit@gmail.com>
8521
8522 lib/readline/readline.c
8523 - readline_common_teardown: new function from the guts of
8524 readline_internal_teardown, manages and deallocates rl_undo_list.
8525
8526 lib/readline/callback.c
8527 - rl_callback_handler_remove: if we're removing the line handler
8528 while we still have an undo list, we didn't call
8529 readline_internal_teardown. Call readline_common_teardown to manage
8530 the undo list in case we are calling this from a signal handler
8531 but not exiting the program.
8532 Fixes leaks reported by sparrowhawk996@gmail.com.
8533
8534 variables.c
8535 - initialize_shell_variables: use ASS_FORCE when binding SHELLOPTS or
8536 BASHOPTS if we get them from the environment, in case they've
8537 already been created as shell variables and set to readonly (like
8538 changes from 1/30)
8539 - set_ppid: use ASS_FORCE in the call to bind_variable instead of
8540 temporarily turning off att_readonly
8541
8542 subst.c
8543 - extract_delimited_string: pass FLAGS down to skip_single_quoted and
8544 skip_double_quoted so we propagate SX_COMMAND and SX_COMPLETE
8545 properly.
8546 Fixes bug reported by A4-Tacks <wdsjxhno1001@163.com>
8547
8548 2/3
8549 ---
8550 bashline.c
8551 - initialize_readline: add `bash-vi-complete' as a bindable command
8552 name so users can bind other key sequences to it
8553 - vi_advance_point: function to advance point by one character even
8554 in the presence of multibyte characters
8555 - bash_vi_complete: call vi_advance_point instead of just incrementing
8556 rl_point
8557
8558 2/5
8559 ---
8560 doc/bash.1,lib/readline/doc/readline.3
8561 - minor updates to handle old versions of troff and groff warnings
8562 Fixes from G. Branden Robinson <g.branden.robinson@gmail.com>
8563
8564 2/7
8565 ---
8566 jobs.c
8567 - notify_of_job_status: in non-interactive shells, if we're not going
8568 to print information about a terminated background job
8569 (SIGINT/SIGTERM/SIGPIPE), don't mark it as notified, in the same
8570 way that we don't mark background jobs that exit cleanly as notified
8571 Inspired by a discussion with Robert Elz <kre@munnari.oz.au> and
8572 https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00189.html
8573
8574 2/9
8575 ---
8576 lib/readline/history.c
8577 - DEFAULT_HISTORY_GROW_SIZE: bump up to 256
8578 - real_history, real_history_size: the true history array and its
8579 allocated size. the_history begins a user-visible window into this
8580 list, extending for history_size entries
8581 - history_list_grow_size: compute how much to extend the history list;
8582 increase by roughly sqrt(history_size), don't extend by less than
8583 (new) DEFAULT_HISTORY_GROW_SIZE
8584 - history_list_resize: possibly resize/realloc real_history and reset
8585 the_history to real_history and history_size to real_history_size
8586 - advance_history: make the `window' that the_history provides into
8587 real_history advance to simulate dropping an initial entry; don't
8588 need to memmove all the entries any more
8589 - add_history: call advance_history as necessary to move the_history
8590 window
8591 - add_history: call history_list_resize as necessary
8592 Report and initial patch from Casey Johnson <strykre@hotmail.com>
8593
8594 2/12
8595 ----
8596 bashline.c,lib/readline/bind.c,lib/readline/display.c
8597 - replace some sprintf calls with snprintf to appease clang
8598
8599 execute_cmd.c
8600 - execute_simple_command: unwind-protect this_command_name, since we
8601 assign it to something we will free if unwind-protects are run
8602 - execute_function: unwind-protect currently_executing_command, since
8603 execute_command_internal will change it to something will will free
8604 if unwind-protects are run
8605 Report from Grisha Levit <grishalevit@gmail.com>
8606 - execute_function: if we didn't compile with debugger support, restore
8607 currently_executing_command after run_debug_trap, like in other
8608 cases
8609
8610 2/13
8611 ----
8612 builtins/declare.def
8613 - declare_invalid_opts: move the code that checks for invalid option
8614 combinations to its own function; it returns 0 for no errors and
8615 a return code for declare_internal to return otherwise
8616 Inspired by report from Grisha Levit <grishalevit@gmail.com>
8617 - declare_invalid_opts: make -A -a and -A +A/-a +a option combinations
8618 invalid
8619 Report from Grisha Levit <grishalevit@gmail.com>
8620
8621 2/14
8622 ----
8623 bashline.c,general.c,subst.c,lib/sh/pathphys.c,builtins/read.def,
8624 support/bashversion.c
8625 - changes for cygwin and msys (no new features)
8626
8627 bashline.c,builtins/fc.def,general.c,parse.y,stringlib.c,subst.c,variables.c
8628 - MSYS-specific changes to support \r\n line endings and DOS-style
8629 paths
8630
8631 configure.ac,cross-build/msys32.cache,support/config.rpath,support/shobj-conf
8632 - MSYS-specific build options
8633
8634 configure.ac,config.h.in,m4/unlocked-io.m4,general.h,include/unlocked-io.h
8635 MANIFEST
8636 - adapt Gnulib's unlocked-io module for faster stdio functions.
8637 From Grisha Levit <grishalevit@gmail.com>
8638
8639 lib/malloc/malloc.c,lib/malloc/table.h,lib/sh/strlcpy.c
8640 - fixes for ISO C 23
8641 Patch from Collin Funk <collin.funk1@gmail.com>
8642
8643 2/16
8644 ----
8645 jobs.c
8646 - waitchld: note whether or not we are executing in a signal handler
8647 context and break out of the loop if we receive a terminating
8648 signal instead of calling termsig_handler, which can execute unsafe
8649 functions
8650 From https://issues.redhat.com/browse/RHEL-22295
8651
8652 variables.h
8653 - valid_readonly_attrs,invalid_readonly_attrs: new defines for declare
8654 to use to validate attempts to modify attributes of readonly
8655 variables
8656
8657 builtins/declare.def
8658 - declare_internal: reject attempts to modify (set or unset) attributes
8659 in invalid_readonly_attrs for readonly variables.
8660 From a discussion with Grisha Levit <grishalevit@gmail.com>
8661
8662 2/17
8663 ----
8664 variables.h
8665 - add att_readonly to valid_readonly_attrs; it's valid to use
8666 declare -r var ; declare -r var
8667
8668 Makefile.in,builtins/Makefile.in
8669 - add unlocked-io.h to dependencies and variable contents where
8670 appropriate
8671 - add additional include files to INSTALLED_INCFILES
8672
8673 builtins/pushd.def,examples/loadables/necho.c
8674 - fix order of includes to get unlocked-io.h
8675 From Grisha Levit <grishalevit@gmail.com>
8676
8677 subst.c,subst.h
8678 - rename quote_rhs -> quote_nosplit
8679
8680 2/19
8681 ----
8682
8683 subst.c
8684 - quote_var_value: break the code that quotes a variable value ($x,
8685 ${x}, ${x[n]}, etc.) into a separate inline function and call it
8686 from param_expand and parameter_brace_expand_word so they do it
8687 consistently
8688 - param_expand: quote $* appropriately using quote_nosplit if we are
8689 in a place where word splitting will not occur (PF_NOSPLIT2),
8690 expand_no_split_dollar_star == 1 but quoted is 0
8691 - quote_var_value: use quote_nosplit if we are in a place where word
8692 splitting will not occur (PF_NOSPLIT2) but quoted == 0.
8693 Fixes bug with IFS=$'\1' reported by alex xmb sw ratchev <fxmbsw7@gmail.com>
8694
8695 arrayfunc.c
8696 - array_value: make sure to quote ${A[*]} appropriately if not quoted
8697 (quoted == 0) and in a place where word splitting does not occur
8698 (flags & AV_ASSIGNRHS); the caller expects array_value to quote in
8699 this case
8700
8701 subst.c
8702 - parameter_brace_expand_word: make sure to call array_value with
8703 AV_ASSIGNRHS if we are expanding unquoted ${A[*]} in a place where
8704 word splitting does not occur with a non-null $IFS; array_value will
8705 quote appropriately here
8706 - parameter_brace_expand_word,param_expand: use quote_var_value when
8707 expanding $N and ${N}
8708
8709 doc/bash.1,doc/bashref.texi
8710 - HISTIGNORE: clarify the description a little to emphasize that lines
8711 matching one of the patterns are not saved in the history list
8712 From https://savannah.gnu.org/support/index.php?111020
8713
8714 2/20
8715 ----
8716 builtins/evalfile.c
8717 - FEVAL_RETRY: if set in FLAGS, _evalfile will retry an interrupted
8718 open
8719 - _evalfile: if open() returns -1, FEVAL_RETRY is set in FLAGS, and
8720 errno == EINTR, retry the open after checking for interrupts or
8721 terminating signals
8722 - maybe_execute_file,force_execute_file: pass FEVAL_RETRY in flags
8723
8724 bashhist.c
8725 - load_history: retry read_history if it returns EINTR after checking
8726 for interrupts or terminating signals
8727
8728 lib/readline/bind.c
8729 - _rl_read_init_file: retry the open once if it's interrupted due to a
8730 signal. If we are at a point where readline has installed its
8731 signal handlers, check for signals readline handles
8732 From a patch from Grisha Levit <grishalevit@gmail.com>
8733
8734 2/21
8735 ----
8736 subst.c
8737 - make_internal_declare: now takes two strings of option arguments:
8738 those to turn on (`-') and those to turn off (`+')
8739 - expand_declaration_argument: simplify the code; handle `-' and `+'
8740 optionsns; always call make_internal_declare
8741 From a patch from Grisha Levit <grishalevit@gmail.com>
8742
8743 2/22
8744 ----
8745 aclocal.m4
8746 - add additional character to test for broken wcwidth (0x200b)
8747
8748 lib/readline/display.c
8749 - update_line: use IS_COMBINING_CHAR instead of UNICODE_COMBINING_CHAR
8750 plus WCWIDTH; it doesn't make sense on systems where wcwidth isn't
8751 broken
8752
8753 2/27
8754 ----
8755 print_cmd.c
8756 - print_case_clauses: if one of the case command pattern lists begins
8757 with the word `esac' (unquoted), precede the pattern list with `(',
8758 since it had to be there originally to get through the parser.
8759 Report by Emanuele Torre <torreemanuele6@gmail.com>
8760
8761 2/29
8762 ----
8763 general.c,general.h
8764 - string_to_rlimtype: takes a second ENDP argument, like strtol, so
8765 the caller doesn't have to check that the string is all digits,
8766 but can optionally check for and disallow a 0x prefix
8767
8768 3/2
8769 ---
8770 subst.c
8771 - dequote_list: unset the W_QUOTED flag in the word after dequoting it
8772 - parameter_brace_expand_rhs: if the word in the list returned by
8773 expand_string_for_rhs has W_QUOTED set, but the string being
8774 expanded was not quoted, turn on the W_QUOTED in the returned word
8775 so we can potentially avoid word splitting
8776 - expand_word_internal: if CTLNUL is a IFS character, don't add quoted
8777 null strings to istring if we're going to be word splitting, since
8778 they will be treated as word delimiters
8779
8780 3/6
8781 ---
8782 examples/loadables/getconf.c
8783 - getconf_builtin,getconf_all: changes for POSIX interp 1808 proposal
8784 to allow an optional pathname argument with -a that forces its use
8785 for pathconf variables
8786 https://www.austingroupbugs.net/view.php?id=1808
8787
8788 3/11
8789 ----
8790 builtins/printf.def
8791 - printf_builtin: %lc/%ls (%C/%S) should only work on wide characters
8792 when in a locale where MB_CUR_MAX > 1.
8793 Report by Emanuele Torre <torreemanuele6@gmail.com>
8794
8795 3/12
8796 ----
8797 jobs.c
8798 - notify_of_job_status: don't mark terminated background jobs or stopped
8799 jobs as notified in shells started to run -c command
8800 From a report by Greg Wooledge <greg@wooledge.org>
8801 - notify_of_job_status: make the final marking the dead job as notified
8802 a true catch-all so we can put a debugging message in there to see
8803 if there are other missing cases
8804 - notify_of_job_status: don't mark terminated jobs that died due to
8805 a signal the shell trapped (on the assumption that the shell
8806 received the signal, too) as notified, since we don't report on it
8807 in the JDEAD case if the signal is trapped
8808
8809 3/13
8810 ----
8811 builtins/printf.def
8812 - PF: print an error message if printf returns an error or leaves
8813 ferror(stdout) true
8814 From a report by Paul Eggert <eggert@cs.ucla.edu>
8815
8816 3/14
8817 ----
8818 builtins/printf.def
8819 - getint: now takes an int argument and returns it if the conversion
8820 overflows an int; changed callers in printf_builtin
8821 - getint: consolidate checks for overflow. This changes the behavior
8822 if the argument overflows an intmax_t: it returns a field width of
8823 0 (the overflow result) instead of -1, which changes how printf
8824 behaves. This is consistent with the behavior when the argument
8825 overflows an int
8826 - printf_builtin: change check for overflow of [LONG_MIN..LONG_MAX]
8827 for %d/%i to be explicit instead of relying on integer overflow of p
8828 - printstr,printwidestr: print message if field width or precision
8829 overflow, since we don't call printf
8830 - printstr,printwidestr: set field width and precision on integer
8831 overflow the way we do in printf_builtin
8832 From a report and patch by Paul Eggert <eggert@cs.ucla.edu>
8833
8834 bashtypes.h
8835 - PRIdMAX: move redefinition here after including inttypes.h
8836
8837 builtins/printf.def,examples/loadables/seq.c,examples/loadables/getconf.h
8838 - remove PRIdMAX redefinitions, since it's now fixed in bashtypes.h
8839 From a report and patch by Paul Eggert <eggert@cs.ucla.edu>
8840
8841 3/15
8842 ----
8843 include/stdckdint.in.h,include/intprops-internal.h
8844 - new files, from gnulib
8845
8846 configure.ac
8847 - stdckdint.h: create in the build directory if the system doesn't
8848 provide one by copying ${srcdir}/include/stdckdint.in.h; make
8849 sure we don't create a new one every time, changing the timestamp
8850
8851 Makefile.in
8852 - CREATED_HEADERS: add stdckdint.h
8853
8854 stringlib.c,externs.h
8855 - substring: now takes size_t arguments for START and END
8856
8857 lib/sh/stringvec.c
8858 - strvec_create,strvec_mcreate,strvec_resize,strvec_mresize: use
8859 ckd_mul to avoid size_t overflow
8860 - strvec_len,strvec_flush: use size_t variable as array index
8861 From a report by Paul Eggert <eggert@cs.ucla.edu>
8862
8863 bashansi.h
8864 - stdbool.h: include if we have it, typedef bool as unsigned char if
8865 we don't and HAVE_C_BOOL isn't defined
8866
8867
8868 m4/c-bool.m4
8869 - autoconf check for `bool' from gnulib
8870
8871 configure.ac
8872 - include m4/c-bool.m4, call gl_C_BOOL; don't explicitly check for
8873 stdbool.h using AC_CHECK_HEADERS any more
8874
8875 config.h.in
8876 - HAVE_C_BOOL: define
8877
8878 3/16
8879 ----
8880
8881 builtins/printf.def
8882 - decodeprec: now decodeint, takes new arguments: a char ** that is
8883 the string to parse and update, an argument saying whether or not
8884 to print an error message on overflow, and an argument that should
8885 be the return value on overflow; use ckd_* macros to check overflow
8886 - printstr, printwidestr: use a different mechanism to check overflow;
8887 call decodeint to get precision and field width
8888
8889 braces.c
8890 - include stdckdint.h for the ckd_* overflow checking macros
8891 - mkseq: the width argument is now size_t
8892 - mkseq: perform overflow detection using the ckd_* macros
8893 - mkseq: perform zero-padding directly instead of using asprintf; the
8894 sprintf family has trouble when width > INT_MAX
8895 - expand_seqterm: use size_t instead of int for length and width
8896 variables
8897 From a report and patch by Paul Eggert <eggert@cs.ucla.edu>
8898
8899 3/18
8900 ----
8901 builtins/printf.def
8902 - printstr,bexpand: changed size/length arguments to be size_t; changed
8903 callers
8904
8905 subst.c
8906 - string_var_assignment: if the variable is a local variable at the
8907 current scope, output a declare command even if there are no
8908 attributes or value. Still tagged as tentative
8909
8910 3/23
8911 ----
8912 test.c
8913 - posixtest: takes an argument, the number of test arguments to parse
8914 - two_arguments,three_arguments: use advance() instead of accessing
8915 and manipulating pos directly
8916 - posixtest,three_arguments,two_arguments: don't set pos = argc
8917 directly, rely on functions to advance pos appropriately
8918 Picked up from coreutils test
8919 - term: if we see a left paren, scan forward for a closing right paren
8920 and use posixtest() if there are 1-4 arguments between the parens to
8921 avoid ambiguous behavior for expressions like true -a \( ! -a \),
8922 which, though it's horribly ambiguous, a user would expect to
8923 return false instead of an error message
8924 Picked up from coreutils-9.2 test
8925
8926 3/25
8927 ----
8928 bashansi.c
8929 - HAVE_C_BOOL: prefer if defined, fall back to stdbool.h if bool isn't
8930 a compiler builtin
8931
8932 braces.c
8933 - mkseq: simplify break condition
8934
8935 builtins/printf.def
8936 - decodeint: let the caller decide what to do with an overflow return,
8937 don't return -1 after calling report_erange(). This will honor a
8938 precision even if the field width overflows
8939 - printf_builtin: check for overflow when adjusting precision for
8940 string length with %Q
8941 - printstr,printwidestr: now that the code uses decodeint, we don't
8942 need to check the precision against INT_MAX
8943
8944 bashansi.h
8945 - include stddef.h if we have it, otherwise define replacements for
8946 NULL and offsetof()
8947
8948 builtins/help.def,lib/sh/fmtulong.c,lib/sh/getcwd.c,lib/sh/makepath.c,
8949 lib/sh/snprintf.c,lib/sh/strtod.c,lib/sh/strtol.c,unwind_prot.c,
8950 lib/readline/shell.c
8951 - include bashansi.h instead of stddef.h, or remove a stddef.h include
8952 if bashansi.h is already included
8953 - remove extra definitions that appear in stddef.h or bashansi.h
8954
8955 lib/sh/reallocarray.c,externs.h
8956 - implementation of reallocarray(), originally from OpenBSD, from
8957 Paul Eggert
8958
8959 configure.ac
8960 - use AC_REPLACE_FUNCS for reallocarray
8961
8962 xmalloc.c,xmalloc.h
8963 - xreallocarray: implementation of reallocarray that uses xrealloc
8964 - sh_xreallocarray: implementation of reallocarray that uses
8965 sh_xrealloc and has file and line information for error messages
8966
8967 lib/sh/stringvec.c
8968 - strvec_create, strvec_resize: rewrite in terms of xreallocarray
8969 - strvec_mcreate, strvec_mresize: rewrite in terms of reallocarray
8970 - strvec_remove, strvec_search, strvec_copy, strvec_from_word_list,
8971 strvec_to_word_list: use size_t instead of int where appropriate
8972
8973 lib/sh/stringvec.c,externs.h
8974 - strvec_search: return a value of type ptrdiff_t, since size_t is
8975 unsigned and we want to return -1 if not found
8976
8977 All from a report and patch by Paul Eggert <eggert@cs.ucla.edu>
8978
8979 test.c
8980 - term: change paren scan algorithm to count open and close parens so
8981 we handle nested subexpressions. Still not compatible in the case
8982 of something like test true -a \( ! -a \) \)
8983
8984 3/27
8985 ----
8986 parse.y
8987 - flush_parser_state: new function, deallocates the members of a
8988 parser state struct that are dynamically allocated
8989 - parse_comsub: call flush_parser_state in places where we will
8990 return an error or jump to the top level
8991 Fixes memory leaks on error reported by bug_reports00@protonmail.com
8992
8993 Makefile.in
8994 - CREATED_MACOS: list of dSYM directories created by building and
8995 testing
8996 - distclean,maintainer-clean: remove $(CREATED_HEADERS) and
8997 $(CREATED_MACOS)
8998 - maintainer-clean: remove ctags/etags files
8999
9000 3/28
9001 ----
9002 bashline.c,bashline.h
9003 - uw_restore_parser_state: moved to parse.y and declaration to shell.h
9004
9005 shell.c,shell.h
9006 - parsing_command: new flag, set to 1 when calling yyparse; saved and
9007 restored by save_parser_state/restore_parser_state
9008
9009 parse.y,shell.h
9010 - parsing_command: new element of sh_parser_state_t
9011
9012 sig.c
9013 - throw_to_top_level: reset executing and parsing_command to 0
9014
9015 parse.y
9016 - parse_comsub: set parsing_command to 1 before calling yyparse()
9017
9018 eval.c
9019 - parse_command: set parsing_command to 1 before calling yyparse(),
9020 restore old value when yyparse returns
9021
9022 subst.c
9023 - function_substitute: if we are parsing a command, save the parser
9024 state with save_parser_state and add an unwind-protect to restore it
9025 From a report from Grisha Levit <grishalevit@gmail.com>
9026 - function_substitute: only save and restore the pipestatus array if
9027 we are not parsing a command, since save_parser_state saves it
9028
9029 parse.y,externs.h
9030 - decode_prompt_string: now takes an additional argument to determine
9031 whether this is expanding PS[0124] or the @P transformation
9032 - decode_prompt_string: keep track of the (last) real prompt string
9033 being decoded so a @P expansion embedded in the prompt returns the
9034 same result as the prompt string itself for the \! and \# expansions
9035 From a patch from Grisha Levit <grishalevit@gmail.com>
9036
9037 parse.y,print_cmd.c,eval.c,subst.c
9038 - decode_prompt_string: changed all callers
9039
9040
9041 3/29
9042 ----
9043
9044 doc/bash.1,lib/readline/doc/readline.3,lib/readline/doc/history.3
9045 - fix some font-setting directives
9046 - fix some word breaks for font-changing macros
9047
9048 lib/readline/doc/history.3
9049 - fix the macros for function signatures for AT&T troff limitations
9050 - fix some paragraph spacing and other layout/spacing/hyphenation
9051 issues
9052 Fixes from G. Branden Robinson <g.branden.robinson@gmail.com>
9053
9054 4/1
9055 ---
9056 execute_cmd.c
9057 - shell_execve: minor changes to code that checks the #! interpreter
9058 name
9059
9060 execute_cmd.c
9061 - execute_coproc: if MULTIPLE_COPROCS is not defined, close any old
9062 file descriptors corresponding to sh_coproc. The user can still
9063 copy them from the coproc array if desired; this prevents the shell
9064 from hanging if a second coproc inherits file descriptors from a
9065 previous one
9066 From a report by Carl Edquist <edquist@cs.wisc.edu>
9067
9068 jobs.c,nojobs.c,jobs.h
9069 - process_exit_status: no longer static, public function with an
9070 extern declaration
9071
9072 4/2
9073 ---
9074 execute_cmd.c,execute_cmd.h
9075 - coproc_pidchk: now takes a full WAIT status word as a second
9076 argument instead of just the exit status; arranged the prototype
9077 to only be included if the source file includes posixwait.h for WAIT
9078
9079 jobs.c
9080 - waitchld: call coproc_pidchk with a WAIT second argument (like
9081 nojobs.c does)
9082
9083 command.h
9084 - COPROC_STOPPED,COPROC_FOREGROUND: new flags values for coproc
9085
9086 execute_cmd.c
9087 - coproc_setstatus: now takes a full WAIT status word as the second
9088 argument, passed from coproc_pidchk
9089 - coproc_setstatus: use process_exit_status to translate a WAIT into
9090 an int status, doing proper termsig+128 handling
9091 - coproc_getstate: take a WAIT and return the appropriate COPROC_
9092 status flag (DEAD, STOPPED, etc.)
9093 - coproc_setstatus: use coproc_getstate to set cp->c_flags
9094
9095 4/4
9096 ---
9097 configure.ac
9098 - changed release status to bash-5.3-alpha
9099 - AC_PROG_GCC_TRADITIONAL: removed, since it no longer is supported
9100 in autoconf-2.72 (which MacPorts upgraded me to)
9101
9102 test.c
9103 - term: made change of 3/25 dependent on the compatibility level
9104
9105 support/config.guess,support/config.sub,support/config.rpath
9106 - new versions, imported from gnulib
9107
9108 4/5
9109 ---
9110 doc/bashref.texi
9111 - update compatibility, posix mode, and bourne shell sections for
9112 bash-5.3-alpha release
9113
9114 version.c
9115 - update copyright date to 2024
9116
9117 [bash-5.3-alpha frozen]
9118
9119 4/6
9120 ---
9121 builtins/cd.def
9122 - cd_builtin: a null pathname argument is now an error; POSIX interp
9123 1047
9124
9125 variables.c
9126 - makunbound: revert change from 7/10/2023 about preserving the export
9127 attribute when unsetting a local variable in light of POSIX interp
9128 1806
9129
9130 4/8
9131 ---
9132 bashline.c
9133 - command_word_completion_function: we don't need to perform an extra
9134 comparison against what rl_filename_completion_function returns if
9135 we are searching $PATH for executable completions
9136 - command_word_completion_function: if a directory name from $PATH
9137 contains characters that need to be quoted, quote them and set
9138 rl_completion_found_quote to force rl_filename_completion_function
9139 to dequote the entire pathname
9140 - command_word_completion_function: since the directory name from $PATH
9141 is not quoted, use the dequoted hint to construct the full pathname
9142 to pass to rl_filename_completion_function (possibly after quoting it)
9143 From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=306043
9144
9145 4/10
9146 ----
9147 redir.h
9148 - RX_EXPANDED: flag set when translating redirects to their final form;
9149 indicates the redirection should not be expanded again
9150
9151 redir.c
9152 - do_redirection_internal: when translating a redirect into
9153 r_err_and_out, set the RX_EXPANDED flag so the filename doesn't
9154 get expanded again.
9155 Fixes bug reported by squeaky <q7d9y9muja@liamekaens.com>
9156
9157 4/12
9158 ----
9159 parse.y
9160 - expecting_in_command: new variable, set to FOR or CASE depending on
9161 which command is expecting the IN token to follow it
9162 - {save,restore}_parser_state: save and restore expecting_in_command
9163 in `incmd' member
9164 - special_case_tokens: for POSIX rule 6, check expecting_in_token
9165 instead of last_read_token/token_before_that for case/for command
9166 and whether we should return IN and maybe set PST_CASEPAT
9167 - special_case_tokens: reset expecting_in_command before returning DO
9168 - read_token_word: set expecting_in_command if last_read_token was
9169 CASE or FOR and we are returning a WORD
9170 - reset_parser: reset expecting_in_command
9171 - parse_comsub,parse_compound_assignment: reset expecting_in_command
9172 Fixes bug reported by nbowler@draconx.ca
9173
9174 parser.h
9175 - incmd: new member of parser_state, saves and restores the value of
9176 expecting_in_command
9177 - PST_FORCMD: new parser state, used to say if we're parsing a `for'
9178 command and waiting for an IN token (not used yet)
9179
9180 4/22
9181 ----
9182 config-top.h
9183 - MULTIPLE_COPROCS: now enabled by default
9184
9185 4/23
9186 ----
9187 doc/bash.1,doc/bashref.texi
9188 - add text clarifying the difference between PIPESTATUS and $?
9189
9190 expr.c,redir.c,jobs.c,parse.y,arrayfunc.c,test.c,subst.c
9191 builtins/declare.def,builtins/wait.def,builtins/printf.def
9192 - went through and removed or modified TAGs for bash-5.3
9193
9194 lib/readline/bind.c
9195 - rl_print_keybinding: handle case where there are no key sequences
9196 bound to the command name; don't just print out every unbound key
9197
9198 builtins/bind.def
9199 - bind_builtin: if the shell compatibility level is > 52, interpret
9200 additional non-option arguments supplied with -P and -p as bindable
9201 command names and print out any bindings for those names
9202
9203 4/24
9204 ----
9205 Makefile.in,doc/Makefile.in,builtins/Makefile.in
9206 lib/sh/Makefile.in,lib/glob/Makefile.in,lib/tilde/Makefile.in
9207 lib/readline/Makefile.in
9208 - MFLAGS -> BASH_MAKEFLAGS, rely on make passing MAKEFLAGS in the
9209 environment
9210 From a report by Cedric Blancher <cedric.blancher@gmail.com>
9211
9212 buildconf.h
9213 - new build include file, construct from buildconf.h.in; contains a
9214 subset of config.h for use by the build tools
9215
9216 mksyntax.c
9217 - now assumes a C90 compilation environment; includes buildconf.h for
9218 any build-time configuration variables
9219
9220 Makefile.in
9221 - buildconf.h: add to CREATED_CONFIGURE
9222 - mksyntax: now depends on buildconf.h instead of config.h
9223
9224 4/25
9225 ----
9226 support/bashversion.c,version.c
9227 - now assumes a C90 compilation environment; includes buildconf.h for
9228 any build-time configuration variables
9229
9230 support/printenv.c,support/recho.c,support/xcase.c,support/zecho.c
9231 - now assumes a C90 compilation environment and POSIX.1-1990 execution
9232 environment
9233
9234 4/26
9235 ----
9236 redir.h
9237 - RX_INTERNAL, RX_USER (unused), RX_SAVCLEXEC, RX_SAVEFD, RX_EXPANDED:
9238 new values starting at 0x80, now intended for rflags member of a
9239 struct redirect; don't want them colliding with O_XX flags for open
9240 and fcntl
9241
9242 redir.c
9243 - rflags: save redirect->rflags and pass it to make_redirection if
9244 we're translating a redirection into a new one
9245 - new_redirect: pass rflags to all calls to make_redirection now that
9246 it holds more than REDIR_VARASSIGN
9247 - RX_INTERNAL, RX_USER (unused), RX_SAVCLEXEC, RX_SAVEFD, RX_EXPANDED:
9248 check and assign these in the rflags member; they're only used here
9249 - do_redirection_internal: assign new_redirect->rflags back to
9250 redirect->rflags since it can possibly be modified with RX_EXPANDED
9251 - do_redirection_internal: take care not to leave REDIR_VARASSIGN in
9252 new_redirect->rflags, since it will cause redirector to be freed,
9253 leading to accessing freed memory
9254 From a report by Clark Wang <dearvoid@gmail.com> and a hint from
9255 <oguzismailuysal@gmail.com> and Grisha Levit <grishalevit@gmail.com>
9256
9257 4/28
9258 ----
9259 lib/sh/anonfile.c
9260 - anonopen: call memfd_create with MFD_NOEXEC_SEAL
9261 From a report by Kerin Millar <kfm@plushkava.net>
9262
9263 4/29
9264 ----
9265 shell.c,shell.h
9266 - su_shell: now global
9267
9268 variables.c
9269 - get_bash_name: use the user's login shell for $BASH if the shell is
9270 a login shell and the name is "-su".
9271 From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1069978
9272
9273 subst.c
9274 - uw_unbind_localvar: unwind-protect to unbind a local variable at
9275 the current function context
9276 - function_substitute: make sure we unbind the local REPLY we created
9277 at the current (fake) context
9278 From a report by Koichi Murase <myoga.murase@gmail.com>
9279
9280 4/30
9281 ----
9282
9283 subst.c
9284 - expand_arrayref: fix crash from freeing memory that's only allocated
9285 and initialized if ARRAY_VARS is defined
9286 Report and patch from Henrik Lindström <henrik@lxm.se>
9287
9288 jobs.h,jobs.c
9289 - JLIST_POSIX: new format argument for pretty_print_job; implements
9290 POSIX requirement that jobs display the status of all background
9291 jobs and all jobs the user hasn't been notified about (unused yet)
9292 - JLIST_BGONLY: new format argument for pretty_print_job; restricts
9293 output to background jobs only (unused yet)
9294
9295 jobs.c,jobs.h,execute_cmd.c,subst.c
9296 - freeze_jobs_list: now takes an int argument with the new value of
9297 jobs_list_frozen; prep for having different values with different
9298 meanings; changed callers
9299
9300 jobs.c
9301 - wait_for_any_job: return right away if jobs_list_frozen > 0; allow
9302 job status changes (e.g., J_NOTIFIED) if jobs_list_frozen < 0; use
9303 this instead of testing executing_funsub directly
9304 - notify_and_cleanup: allow notification and status change if
9305 jobs_list_frozen < 0; don't delete any dead jobs
9306 - should_notify: takes a job index and returns 1 if the shell would
9307 notify the user about it, given the current job state
9308 - pretty_print_job: if the jobs list is frozen, only print status
9309 about jobs for which the shell would notify users (by calling
9310 should_notify())
9311
9312 subst.c
9313 - function_substitute: freeze the jobs list with value -1 so jobs
9314 can change status and possibly inhibit printing by `jobs'
9315
9316 5/2
9317 ---
9318 jobs.c
9319 - notify_and_cleanup: allow job notifications if an interactive shell
9320 is running a trap (interactive == 0 && interactive_shell && running_trap)
9321 Fixes report by Koichi Murase <myoga.murase@gmail.com> on 11/14/2022
9322 - print_pipeline: don't print an extra space before the pipeline; push
9323 that into pretty_print_job; print the space after the pid if we
9324 print one
9325
9326 jobs.h
9327 - LONGEST_SIGNAL_DESC: update to 27 (macos SIGPROF). This changes the
9328 test output
9329
9330 5/3
9331 ---
9332 builtins/common.h
9333 - SEVAL_NOTIFY: new flag for parse_and_execute; means we want job
9334 notifications even though we're not interactive at this time and
9335 would not satisfy the conditions
9336
9337 builtins/evalstring.c
9338 - parse_prologue: if SEVAL_NOTIFY is supplied, unwind-protect
9339 want_job_notifications and set it to 1
9340
9341 jobs.c,jobs.h.nojobs.c
9342 - want_job_notifications: new global variable, initialized to 0
9343
9344 jobs.c
9345 - notify_and_cleanup: notify about dead jobs if want_job_notifications
9346 is non-zero
9347
9348 parse.y
9349 - execute_variable_command: call parse_and_execute with the SEVAL_NOTIFY
9350 flag
9351
9352 eval.c
9353 - reader_loop: call notify_and_cleanup before executing $PROMPT_COMMAND
9354 if the shell is interactive and prompting
9355
9356 trap.c
9357 - run_pending_traps,_run_trap_internal,run_exit_trap: add SEVAL_NOTIFY
9358 to the flags for parse_and_execute if the shell is interactive
9359
9360 bashline.c
9361 - bash_execute_unix_command: add SEVAL_NOTIFY to the flags for
9362 parse_and_execute if the shell is interactive
9363 Rest of fix for report by Koichi Murase <myoga.murase@gmail.com>
9364 on 11/14/2022
9365
9366 5/6
9367 ---
9368
9369 execute_cmd.c,shell.c,builtins/evalfile.c,unwind_prot.c
9370 - change some translated error messages to make the text more uniform
9371 and reduce the number of gettext() calls
9372
9373 redir.c,parse.y,bashhist.c.locale.c
9374 builtins/common.c,builtins/bind.def,builtins/exec.def,builtins/fc.def
9375 builtins/help.def,builtins/mapfile.def,builtins/printf.def,builtins/read.def
9376 builtins/ulimit.def
9377 - change some error messages to avoid having the format be the return
9378 value from gettext() to avoid clang complaints; simplified
9379 translatable strings and made them more uniform by removing printf
9380 formatting directives
9381
9382 execute_cmd.c
9383 - notfound_str: cache the translated version of "command not found"
9384 so we can call gettext early on and work around a macOS misfeature
9385 From a MacPorts ticket https://trac.macports.org/ticket/68638
9386 forwarded by Tom <tom@msbit.com.au>
9387 - execute_disk_command: use notfound_str instead of calling gettext
9388 every time a command isn't found
9389
9390 execute_cmd.c,execute_cmd.h
9391 - init_notfound_str: call gettext to initialize and translate
9392 notfound_str
9393 - execute_disk_command: call init_notfound_str before forking if it
9394 hasn't been initialized
9395
9396 locale.c
9397 - set_default_locale_vars: after we set the appropriate values for the
9398 locale shell variables, call init_notfound_str to force a call to
9399 gettext()
9400
9401 jobs.c
9402 - wait_for: don't try to set the tty state if we're running a trap,
9403 even if a process terminates due to a signal
9404
9405 5/7
9406 ---
9407 builtins/enable.def
9408 - enable_builtin: don't try to turn enable f into enable -f f if the
9409 shell is restricted
9410
9411 5/11
9412 ----
9413
9414 doc/bash.1,lib/readline/doc/readline.3,lib/readline/doc/rltech.texi
9415 - document some of the bindable commands bound to Home, End, Insert,
9416 Page Up, and Page Down, if those keys exist
9417 From a report by Xose Vazquez Perez <xose.vazquez@gmail.com> in 3/2024
9418
9419 configure
9420 - make sure to note in CHANGES that configure now supports
9421 --enable-year2038 for large time_t
9422
9423 5/14
9424 ----
9425 pathexp.c
9426 - glob_quote_char: new function, identify characters that should have
9427 backslashes preserved when quoting a glob pattern. Currently has
9428 all the glob_char_p characters plus `%' and `#' for pattern
9429 substitution and removal.
9430 Fixes issue reported by Andreas Schwab <schwab@suse.de>
9431
9432 5/16
9433 ----
9434 pcomplete.c
9435 - programmable_completions: change to allow a newly-loaded compspec
9436 (after a completion function returns 124) to be used in more cases
9437 From a patch from Grisha Levit <grishalevit@gmail.com>
9438
9439 mksyntax.c,version.c,support/bashversion.c
9440 - include config.h if CROSS_COMPILING is not defined, assuming that
9441 the build host and target host are the same
9442
9443 buildconf.h.in
9444 - if cross-compiling, define _POSIX_C_SOURCE and _XOPEN_SOURCE to
9445 get the C90/1003.1-1992 compilation environment we assume
9446 From a report from Grisha Levit <grishalevit@gmail.com>
9447
9448 5/17
9449 ----
9450 pathexp.c
9451 - globsort_sizecmp,globsort_blockscmp: replace subtraction with a
9452 generic transitive comparison function to avoid problems with
9453 integer underflow
9454 From a report from Grisha Levit <grishalevit@gmail.com>
9455
9456 5/20
9457 ----
9458 lib/readline/kill.c
9459 - _rl_bracketed_text: make sure buf is null-terminated even if
9460 rl_read_key() returns an error
9461 From a report from Grisha Levit <grishalevit@gmail.com>
9462
9463 builtins/read.def
9464 - read_builtin: if -u and -e are both supplied, dup the file descriptor
9465 supplied as an argument to -u and use it in the new FILE * to pass
9466 to readline as rl_instream. Works around an android problem with
9467 stdio and application-managed file descriptors
9468 Report and patch from Grisha Levit <grishalevit@gmail.com>
9469
9470 5/21
9471 ----
9472 lib/sh/spell.c
9473 - mindist: don't check best unless we set it
9474 Report and patch from Grisha Levit <grishalevit@gmail.com>
9475
9476 jobs.c
9477 - make_child: if FORK_NOJOB is in the flags argument, don't call
9478 setpgid to set the child's process group in either the parent or
9479 child
9480 - alloc_process,dispose_process: allocate and deallocate a PROCESS;
9481 changed callers
9482
9483 subst.c
9484 - command_substitute: call cleanup_the_pipeline after waiting for
9485 the command substitution process, since we allocated it
9486
9487 5/22
9488 ----
9489 lib/readline/text.c
9490 - rl_execute_named_command: fix a leak if the command name is null or
9491 the bound function doesn't return (rl_abort)
9492 Report and patch from Grisha Levit <grishalevit@gmail.com>
9493
9494 bashline.c
9495 - command_word_completion_function: free directory_part if it's left
9496 over from a previous completion
9497 - command_subst_completion_function: free contents of match list left
9498 over from previous completion
9499 - bash_spell_correct_shellword: free text if it's "" before returning
9500 - build_history_completion_array: only call qsort if there's actually
9501 something in the array to sort
9502 Report and patches from Grisha Levit <grishalevit@gmail.com>
9503 - bash_spell_correct_shellword: fix bug where we would correct the
9504 previous word if we start on the first character of a word
9505 - bash_spell_correct_shellword: make negative argument counts work
9506 backwards, correcting words before point
9507 Report from Grisha Levit <grishalevit@gmail.com>
9508
9509 5/23
9510 ----
9511 lib/readline/text.c
9512 - rl_change_case: if mbrtowc returns -1 or -2, jump to changing case
9513 for a single character, since _rl_find_next_mbchar_internal() will
9514 treat an invalid multibyte character as a sequence of bytes
9515 Report from Grisha Levit <grishalevit@gmail.com>
9516
9517 5/25
9518 ----
9519 execute_cmd.c
9520 - shell_execve: fix typo in code that chops \r off the end of the #!
9521 interpreter
9522 Report and fix from Collin Funk <collin.funk1@gmail.com>
9523
9524 5/28
9525 ----
9526 execute_cmd.c
9527 - time_command: only restore command->flags if we haven't longjmped
9528 Report from Michael Maurer <michael.maurer@univie.ac.at> and
9529 Grisha Levit <grishalevit@gmail.com>
9530
9531 subst.c
9532 - skip_to_delim: if we're not skipping over command substitutions
9533 lexically, call extract_command_subst instead of using the old
9534 extract_delimited_string
9535 Fixes bug reported by Oguz <oguzismailuysal@gmail.com>
9536
9537 execute_cmd.c
9538 - execute_arith_for_command: handle the extremely unlikely case that
9539 the step or test expressions execute `break' or `continue' in a
9540 nofork command substitution
9541 Report from Oguz <oguzismailuysal@gmail.com>
9542
9543 5/29
9544 ----
9545 lib/readline/complete.c
9546 - compute_lcd_of_matches: if we have multiple matches that compare
9547 equally when using case-insensitive completion, but are different
9548 lengths due to the presence of multibyte characters, use the
9549 shorter match as the common prefix to avoid overflow
9550 Report from Grisha Levit <grishalevit@gmail.com>
9551
9552 5/30
9553 ----
9554 lib/readline/text.c
9555 - _rl_readstr_init: don't call rl_maybe_replace_line since we're not
9556 actually moving off this history line
9557 Report from Grisha Levit <grishalevit@gmail.com>
9558
9559 builtins/read.def
9560 - read_builtin: free ifs_chars in more return code paths
9561 Report and patch from Grisha Levit <grishalevit@gmail.com>
9562
9563 5/31
9564 ----
9565 quit.h
9566 - ZRESET: new macro, calls zreset() if interrupt_state is non-zero
9567
9568 lib/sh/zread.c
9569 - zread: if read returns -1/EINTR, and we're executing a builtin,
9570 call zreset just in case
9571
9572 builtins/read.def
9573 - read_builtin: if read returns > 0 (partial read) but interrupt_state
9574 is non-zero, we're going to call throw_to_top_level, so call
9575 ZRESET before that happens
9576 Report from Oguz <oguzismailuysal@gmail.com>
9577 - read_builtin: if zread/zreadc/zreadintr/zreadcintr return -1/EINTR,
9578 make sure we call ZRESET in case zread did not
9579
9580 variables.h
9581 - ASSIGN_DISALLOWED: macro that encapsulates when an assignment to
9582 SHELL_VAR *v with flags f will be disallowed and fail
9583
9584 arrayfunc.c,execute_cmd.c,expr.c,redir.c,subst.c,variables.c
9585 builtins/delare.def,builtins/getopts.def,builtins/printf.def,builtins/read.def
9586 - use ASSIGN_DISALLOWED where appropriate
9587
9588 arrayfunc.c
9589 - assign_array_element_internal: if the assignment failed, as tested by
9590 ASSIGN_DISALLOWED, free the assoc array key we allocated
9591 Report from Grisha Levit <grishalevit@gmail.com>
9592
9593 6/3
9594 ---
9595 variables.c
9596 - bind_function_def: don't copy the command tree if we're overwriting
9597 a function definition; after function binding, the function_def
9598 struct never uses the saved command anyway
9599 From a report and patch by Koichi Murase <myoga.murase@gmail.com>
9600
9601 parse.y
9602 - make sure to free WORD in coproc WORD COMMAND after creating the
9603 coproc struct
9604 Report and patch from Grisha Levit <grishalevit@gmail.com>
9605
9606 builtins/exec.def
9607 - exec_builtin: we don't need to set args to NULL; if shell_execve
9608 reallocates args to add more items at the front, it has committed
9609 to longjmp back to the top level
9610 Report and patch from Grisha Levit <grishalevit@gmail.com>
9611
9612 subst.c
9613 - expand_word_internal: dispose of the list used for $@ if we're not
9614 splitting and save the space-separated list back to tword->word
9615 Report and patch from Grisha Levit <grishalevit@gmail.com>
9616
9617 parse.y
9618 - read_token: if we try to parse a conditional command and get a syntax
9619 error, make sure to dispose of the partial command we created
9620 Report and patch from Grisha Levit <grishalevit@gmail.com>
9621 - read_token: if we try to parse a conditional command and get a syntax
9622 error because we read an unexpected WORD, dispose of the WORD_DESC
9623 before returning -1
9624 Report and patch from Grisha Levit <grishalevit@gmail.com>
9625 - cond_term: if we read a WORD where we expect something else, dispose
9626 of the WORD_DESC before returning COND_ERROR
9627 Report and patch from Grisha Levit <grishalevit@gmail.com>
9628
9629 6/10
9630 ----
9631 parse.y
9632 - cond_term: if we read a WORD when expecting a close paren, dispose
9633 of the WORD_DESC before returning COND_ERROR
9634 - error_token_from_token: use the TOK argument instead of
9635 current_token if we can't find the token as a reserved word or
9636 symbol
9637
9638 6/12
9639 ----
9640 builtins/source.def
9641 - source_builtin: add -p PATH option, searches PATH argument instead
9642 of $PATH; overrides sourcepath; does not search $PWD if path search
9643 fails
9644
9645 doc/bash.1,doc/bashref.texi
9646 - source: document -p
9647
9648 pathexp.c
9649 - if the size, blocks, or any of the time values compare equal, use
9650 the name for a secondary sort key
9651
9652 lib/sh/winsize.c
9653 - tcgetwinsize: provide definition for missing newly-standard function
9654 - get_new_window_size: use tcgetwinsize
9655
9656 subst.c
9657 - do_compound_assignment: if ASS_CHKLOCAL is in the flags, check for
9658 variables at previous local scopes instead of just the current local
9659 scope and the global scope
9660 Part of fix for inconsistency between arrays and scalar variables
9661 reported by Will Allan <billyzkid@yahoo.com>
9662
9663 builtins/declare.def
9664 - declare_find_variable: if `declare -G' is used, check for
9665 variables at previous local scopes instead of just the current local
9666 scope and the global scope
9667 Rest of fix for inconsistency between arrays and scalar variables
9668 reported by Will Allan <billyzkid@yahoo.com>
9669
9670 pathexp.h
9671 - SORT_NUMERIC: new "numeric" sort specifier
9672
9673 pathexp.c
9674 - globsort_numericcmp: new sort function for the "numeric" sort
9675 specifier: all-digit names are sorted as numbers; names containing
9676 any non-digits sort after all-digit names and are sorted
9677 lexicographically.
9678 Inspired by a discussion with Robert Elz <kre@munnari.oz.au>
9679
9680 6/21
9681 ----
9682 lib/readline/text.c
9683 - rl_change_case: make mlen size_t to assign the return value from
9684 wcrtomb; change the tests of < 0 to use MB_INVALIDCH.
9685 Report from Siteshwar Vashisht <svashisht@redhat.com>
9686
9687 6/26
9688 ----
9689 trap.c
9690 - run_debug_trap: give the terminal back to pipeline_pgrp only if
9691 job_control is enabled; that's the only way the trap command would
9692 have given it to a different process group
9693 Fixes bug reported by Mark March <march@systempad.cloud>
9694
9695 6/27
9696 ----
9697 configure.ac
9698 - remove support for cached files for cross-compiling; it's too hard
9699 to keep them up-to-date without access to the platforms
9700
9701 6/28
9702 ----
9703 lib/readline/util.c
9704 - _rl_audit_tty: make sure to close fd before returning on error
9705
9706 lib/sh/casemod.c
9707 - sh_modcase: use size_t variable as return value for wcrtomb; check
9708 for invalid wide char and copy all characters in the multibyte
9709 character as-is if it is
9710
9711 lib/sh/zwrite.c
9712 - zwrite: use size_t and ssize_t variables
9713
9714 builtins/evalfile.c
9715 - _evalfile: use size_t variable for return value from strlen()
9716
9717 lib/readline/funmap.c
9718 - rl_funmap_names: don't bother calling qsort if result doesn't have
9719 any entries
9720
9721 All from a report by Siteshwar Vashisht <svashisht@redhat.com>
9722
9723 6/29
9724 ----
9725 lib/readline/examples/histexamp.c,lib/readline/examples/manexamp.c,
9726 lib/readline/examples/rl-callbacktest.c,lib/readline/examples/rl-callbacktest2.c,
9727 lib/readline/examples/excallback.c,lib/readline/examples/rlptytest.c
9728 - small changes to fix warnings
9729 From a report by Hiroo Hayashi <hirooih@gmail.com>
9730
9731 7/1
9732 ---
9733 execute_cmd.c:
9734 - ADJUST_LINE_NUMBER: encapsulate code that adjusts line_number in
9735 shell functions executed in interactive shells into a macro
9736
9737 7/2
9738 ---
9739 doc/bash.1,doc/bashref.texi
9740 - changes to the --rcfile description to avoid the use of `force' and
9741 stay away from the word `replace'
9742
9743 lib/readline/misc.c
9744 - _rl_maybe_replace_line: old rl_maybe_replace_line, now takes an
9745 argument saying whether or not to clear rl_undo_list
9746 - rl_maybe_replace_line: now calls _rl_maybe_replace_line with a 0
9747 argument for backwards compatibility
9748
9749 lib/readline/rlprivate.h
9750 - _rl_maybe_replace_line: extern declaration
9751
9752 lib/readline/search.c
9753 - _rl_nsearch_init,rl_history_search_internal: call _rl_maybe_replace_line
9754 with a 1 argument so these searches can manage rl_undo_list and
9755 restore it appropriately
9756 - rl_history_search_internal: don't set the history offset back to
9757 oldpos if the history search is successful; we want the history offset
9758 to be set to the position of the last matching line, like isearch
9759
9760 7/5
9761 ---
9762 jobs.c
9763 - procsub_reap: new function, blocks and unblocks SIGCHLD around
9764 call to procsub_prune
9765 - cleanup_dead_jobs: call procsub_reap even if there are no jobs in
9766 the jobs list or the jobs list is frozen
9767 Inspired by report from Zachary Santer <zsanter@gmail.com>
9768
9769 7/6
9770 ---
9771 subst.c,subst.h,execute_cmd.c,jobs.c
9772 - reap_procsubs: rename to delete_procsubs
9773
9774 7/7
9775 ---
9776 aclocal.m4
9777 - BASH_CHECK_LIB_TERMCAP: check for ncursesw before ncurses, add
9778 -lncursesw if found, to avoid pkgconfig issues for readline (since
9779 this is a shared file)
9780 Report and fix from Rosen Penev <rosenp@gmail.com>
9781
9782 7/8
9783 ---
9784 builtins/evalstring.c
9785 - should_optimize_fork: don't optimize the fork if we're executing in
9786 a shell function and a return trap is set
9787 - optimize_shell_function: mark a simple command at the end of a shell
9788 function as a candidate for optimization, rather than setting
9789 CMD_NO_FORK before the function executes -- it could set a return
9790 trap
9791 Report from Jens Schmidt <farblos@vodafonemail.de>
9792 - parse_and_execute: don't let process substitutions or other calls
9793 to parse_and_execute do <file; that should be reserved for command
9794 substitutions and implemented in command_substitute
9795 Report by Emanuele Torre <torreemanuele6@gmail.com>
9796 - parse_string: if flags & SEVAL_ONECMD, stop after parsing a single
9797 command, even if it doesn't consume the entire string
9798
9799 parse.y
9800 - parse_string_to_command: call parse_string with SEVAL_ONECMD, since
9801 we only want to parse a single command and make sure it consumes
9802 the entire string, not consume the string and return the last command
9803 parsed
9804
9805 7/9
9806 ---
9807 bashline.c
9808 - _ignore_completion_names: restrict force_fignore to act only on
9809 completions that should be affected by FIGNORE; in other cases
9810 act as if it were set to 1
9811 From a report and patch by Koichi Murase <myoga.murase@gmail.com>
9812
9813 7/15
9814 ----
9815 builtins/ulimit.def
9816 - add help text saying that some of the units change in posix mode
9817
9818
9819 7/17
9820 ----
9821 subst.c
9822 - remove some unused functions
9823
9824 jobs.c,jobs.h
9825 - procsub_search,procsub_delete: now take an extra parameter saying
9826 whether or not to block SIGCHLD while they run; avoids overhead
9827 when called when SIGCHLD is already blocked; changed callers and
9828 extern declaration
9829 - struct process now has a new FLAGS member; possible values defined
9830 in jobs.h; initialized in alloc_process
9831 - procsub_setflag,procsub_setflag: set one of the PROC_XXX flags on
9832 one or all of the processes in the procsub list
9833 - new value for the flags argument to make_child: FORK_PROCSUB
9834 - add_process: now returns the PROCESS * it creates so the caller can
9835 set flags or otherwise modify it
9836 - get_job_by_pid: return NO_JOB for negative pids immediately
9837
9838 subst.c
9839 - process_substitute,command_substitute: call make_child with the
9840 appropriate FORK_ flag
9841
9842 jobs.c
9843 - make_child: set PROC_ flags in the PROCESS * we create based on the
9844 FORK_ flags the caller passes
9845 - wait_for: only call set_procsub_status if the process has terminated
9846 - wait_for_any_job: check for any terminated procsubs as well as any
9847 terminated background jobs
9848
9849 builtins/wait.def
9850 - check_bgpids: rename to check_nonjobs
9851 - wait_builtin: if the -n option is supplied and pid arguments are
9852 supplied, check the bgpids list and procsubs for terminated processes
9853 - check_nonjobs: if one of the pids in LIST corresponds to a terminated
9854 procsub, return its status and move the procsub to the bgpids list
9855 - set_waitlist: if we have a non-existent or invalid job, and a pid
9856 argument that's >= 0, look for a procsub with that pid and set
9857 PROC_WAITING if we have one
9858 - unset_waitlist: unset PROC_WAITING in all procsubs
9859
9860 7/18
9861 ----
9862 jobs.c
9863 - procsub_prune: set last_procsub_child to NULL if we are cleaning up
9864 that process because it's terminated, since that will invalidate the
9865 pointer
9866
9867 7/22
9868 ----
9869 lib/malloc/malloc.c
9870 - RIGHT_BUCKET: don't check binsizes[nu-1] unless nu >= 1; clamp at 0
9871 otherwise
9872 - internal_realloc: don't check bucket at nunits-1 unless nunits >= 1
9873 Report and fix from Collin Funk <collin.funk1@gmail.com>
9874
9875 7/25
9876 ----
9877 variables.c
9878 - push_source: new function, pushes a filename to BASH_SOURCE; changed
9879 callers (shell.c, execute_cmd.c, builtins/evalfile.c)
9880 - bash_source_fullpath: new variable, if non-zero, push_source runs
9881 the filename through sh_realpath before pushing it to BASH_SOURCE
9882 Feature requested by several, including konsolebox <konsolebox@gmail.com>
9883
9884 builtins/shopt.def
9885 - bash_source_fullpath: new option, controls bash_source_fullpath and
9886 whether or not BASH_SOURCE contains full pathnames
9887
9888 doc/bash.1,doc/bashref.texi
9889 - bash_source_fullpath: document new shell option
9890
9891 7/26
9892 ----
9893 jobs.c,jobs.h,subst.c
9894 - last_procsub_pid: new variable, set to the pid of last_procsub_child,
9895 so it will survive the PROCESS * being deleted if we need it. Not
9896 used yet
9897
9898 7/29
9899 ----
9900 doc/bash.1,doc/bashref.texi
9901 - wait: update description to clarify wait -n and unify language
9902 Inspired by report from Zachary Santer <zsanter@gmail.com>
9903 - set: note that the -e behavior for pipelines is affected by the
9904 state of the pipefail option
9905 From a report by Martin D Kealey <martin@kurahaupo.gen.nz>
9906
9907 variables.c,hashcmd.c,builtins/hash.def,builtins/history.def,builtins/source.def
9908 - use ABSPATH/RELPATH/absolute_program instead of testing for slash
9909 explicitly
9910
9911 7/30
9912 ----
9913 lib/readline/histfile.c
9914 - history_do_write: return 0 immediately if nelements < 0
9915 Report from ZeroIntensity Dev <zintensitydev@gmail.com>
9916
9917 8/3
9918 ---
9919 lib/sh/zread.c,externs.h
9920 - zungetc: new function, pushes a character back into a single char of
9921 storage so it can be used with the zread* functions that call read(2)
9922 directly and don't use lbuf. If we try to push back more than one
9923 char, we use lbuf, assuming that the caller will accommodate it
9924
9925 builtins/read.def
9926 - read_mbchar: if we read a partial multibyte character (-2) and then
9927 a delimiter that makes it an invalid multibyte character (-1), use
9928 zungetc to push the delimiter back, adjust mbchar, and return what
9929 we read so far to be added as single bytes
9930 From a report by Kerin Millar <kfm@plushkava.net>
9931
9932 8/7
9933 ---
9934 builtins/evalstring.c
9935 - can_optimize_connection: only check bash_input.location.string if
9936 bash_input.type == st_string, in case we want to use this in other
9937 contexts. If we do, the caller *must* make sure it's the last
9938 command in the calling context
9939
9940 execute_cmd.c
9941 - execute_subshell_builtin_or_function: if this is an async function
9942 call, try to optimize away the fork before the last simple command
9943 in the function body by calling optimize_shell_function
9944 - execute_command_internal: if we have a simple command for which
9945 CMD_TRY_OPTIMIZING is set in a SUBSHELL_ASYNC subshell environment,
9946 try to set CMD_NO_FORK by checking via should_optimize_fork
9947
9948 8/9
9949 ---
9950 parse.y
9951 - yy_readline_get: before calling readline, call rl_clear_signals to
9952 reset the signal handling disposition to a known state. Most of the
9953 time it's a no-op
9954
9955 lib/readline/signals.c
9956 - _rl_handle_signal: make the call to sigprocmask(SIG_UNBLOCK,...
9957 more symmetric with the corresponding call to SIG_BLOCK
9958
9959 trap.c
9960 - run_pending_traps: before calling run_interrupt_trap, restore
9961 running_trap and trap_return_context, since _run_trap_internal
9962 will save and restore them, too
9963
9964 builtins/read.def
9965 - read_builtin: if -e is supplied, make sure to install unwind-protects
9966 to reset the attempted completion function and the event hook even
9967 if the timeout is not supplied.
9968 Report from Oguz <oguzismailuysal@gmail.com>
9969
9970 8/12
9971 ----
9972 lib/readline/histsearch.c,lib/readline/histlib.h
9973 - history_search_internal: takes a new argument, LINEDIR, saying which
9974 direction to perform the substring/pattern search in the line,
9975 decoupling it from the direction through the history list; changed
9976 all callers (history_search, history_search_prefix, _hs_history_search,
9977 _hs_history_patsearch)
9978 - _hs_history_search,_hs_history_patsearch: takes the same new LINEDIR
9979 argument, just passes it to history_search_internal; changed all
9980 callers (noninc_search_from_pos)
9981
9982 lib/readline/search.c
9983 - noninc_search_from_pos: changed calls to _hs_history_search and
9984 _hs_history_patsearch
9985
9986 lib/readline/histexpand.c
9987 - get_history_event: instead of using function pointers to a history
9988 search function, set the right flags and just call _hs_history_search
9989 with those flags using -1 for list direction and line direction
9990
9991 8/13
9992 ----
9993 builtins/printf.def
9994 - printf_builtin: fix params to call to mklong for long double formats
9995 if STRTOLD_BROKEN is defined
9996
9997 lib/sh/winsize.c
9998 - rearrange includes to make sure <termios.h> is included if
9999 HAVE_TCGETWINSIZE is defined
10000 Report from Grisha Levit <grishalevit@gmail.com>
10001
10002 8/14
10003 ----
10004 lib/readline/rlmbutil.h
10005 - _rl_is_basic: adapted from gnulib is_basic; tells whether a character
10006 is a single byte because it's guaranteed by ISO C and POSIX
10007
10008 lib/readline/mbutil.c
10009 - _rl_mbstrlen: counts the number of possibly multibyte characters in a
10010 string depending on the current locale; uses _rl_utf8_mbstrlen or
10011 _rl_gen_mbstrlen as appropriate (or strlen for a single-byte locale)
10012
10013 lib/readline/readline.c
10014 - _rl_internal_char_cleanup: if we are using multibyte characters, call
10015 _rl_mbstrlen to determine whether or not we've read as many characters
10016 than rl_num_chars_to_read says we should
10017 Report from Grisha Levit <grishalevit@gmail.com>
10018
10019 builtins/read.def
10020 - delim,delim_char: once again an int so we can more easily
10021 distinguish -1 and other unsigned char values >= 0x7f; make
10022 sure delim gets an unsigned char if passed with -d
10023 - edit_line: now takes an int parameter for the delim char; only add
10024 the delim to the end of the string if it's non-negative
10025 - set_eol_delim,unset_eol_delim: now explicitly check whether or not
10026 the delimiter character is non-negativesince it's no longer unsigned
10027 - read_mbchar: make sure to cast the char read to unsigned before
10028 comparing it against the delim
10029 Report and patch from Grisha Levit <grishalevit@gmail.com>
10030
10031 8/15
10032 ----
10033 include/shmbchar.h,lib/sh/shmbchar.c
10034 - is_basic: update test for IS_BASIC_ASCII to include $, @, and `,
10035 which ISO C guarantees to be single-byte
10036 - is_basic_table: update bitmap to include new characters
10037
10038 8/21
10039 ----
10040 shell.c
10041 - main: make sure to set read_but_dont_execute (-n) to 0 in an
10042 interactive shell in case it was set at invocation, but not in
10043 cases where it was forced with -i
10044 Report from Milana <94888u@riseup.net>
10045
10046 8/22
10047 ----
10048 lib/readline/bind.c
10049 - force-meta-prefix: new bindable variable, used to determine whether
10050 to convert a meta character (>= 0x80) to an escape-prefixed key
10051 sequence (using ESC as the meta prefix). If set, do the conversion
10052 unconditionally; if unset, use the value of convert-meta as in
10053 previous bash/readline versions
10054 Suggestion from Reuben Thomas <rrt@sc3d.org>
10055 - _rl_function_of_keyseq_internal: if we encounter a character/byte
10056 with the eighth bit set, use force-meta-prefix to decide whether
10057 to translate it to an escape-prefixed key sequence
10058 - rl_bind_key: if we have a meta character, assume it was generated by
10059 Meta- and honor the setting of force-meta-prefix
10060 - rl_translate_keyseq: if we have \M-, use force-meta-prefix to decide
10061 whether or not to translate it to an escape-prefixed key sequence
10062
10063 lib/readline/doc/rluser.texi,lib/readline/doc/readline.3,doc/bash.1
10064 - force-meta-prefix: document new bindable variable and defaults
10065 - convert-meta, enable-meta-key, input-meta, output-meta: update
10066 description with better explanation of Meta key and meta characters,
10067 and locale character encoding
10068 - Key Bindings: expand description of \M- and Meta- modifiers
10069 - Readline Introduction: expand description of the Meta key and the
10070 various things it can do, reference force-meta-prefix and
10071 enable-meta-key
10072
10073 8/26
10074 ----
10075 doc/bashref.texi
10076 - case: add process substitution to the list of expansions for the
10077 word.
10078 Reported by shynur <one.last.kiss@outlook.com>
10079
10080 execute_cmd.c
10081 - execute_null_command: if an empty simple command (no words, just
10082 redirections) requires a fork, reset top_level and exit if we
10083 longjmp there. This can happen with an expansion error while we
10084 evaluate the redirection.
10085 Report from youheng.lue@gmail.com
10086 - execute_connection: in default mode, bash performs jobs notifications
10087 in an interactive shell between commands separated by ';' or '\n'.
10088 It shouldn't do this in posix mode, since posix now specifies when
10089 notifications can take place
10090
10091 examples/loadables/{realpath,csv,dsv,cut,stat,kv}
10092 - changes to make them build when arrays are not available
10093 Report from Dennis Clarke <dclarke@blastwave.org>
10094
10095 jobs.c
10096 - notify_and_cleanup: make interactive shells notifying during sourced
10097 scripts dependent on the shell compatibility level and inactive in
10098 versions beyond bash-5.2
10099 Inspired by report from Zachary Santer <zsanter@gmail.com>
10100
10101 doc/bashref.texi
10102 - Bash posix mode: note the change with job notifications in command
10103 lists
10104 - Shell compatibility mode: note job notification changes for compat
10105 level > 52
10106
10107 parse.y
10108 - CHECK_FOR_RESERVED_WORD: call set_word_top here on the reserved word
10109 token about to be returned; don't worry about trying to set it after
10110 the fact
10111 Report from Collin Funk <collin.funk1@gmail.com>
10112
10113 8/28
10114 ----
10115 parse.y
10116 - CHECK_FOR_RESERVED_WORD: change word_top to keep track of the line
10117 number where a compound command begins; call set_word_top on the
10118 current token about to be returned
10119 - read_token_word: call set_word_top if special_case_tokens returns
10120 something; currently used for `{'
10121 - set_word_top: add `{' to the list of compound commands we track
10122 - grammar: every time we parse a group command or equivalent for the
10123 `for' and `select' compound commands, decrement word_top after we
10124 see the `}'
10125 - parse_dparen: set arith_lineno from word_lineno[word_top] since we
10126 now set it for FOR when we read it
10127
10128 8/29
10129 ----
10130 parse.y
10131 - read_token: don't turn on PST_SUBSHELL after reading a left paren
10132 if the last token was a WORD, since that's a function definition,
10133 not a subshell
10134 - read_token,parse_dparen: don't turn on PST_SUBSHELL if we run into
10135 a left paren while parsing a conditional command (PST_CONDCMD is
10136 set in parser_state)
10137 - set_word_top: add `(' to the tokens saved in word_lineno
10138 - grammar: decrement word_top in the subshell_command production
10139 - read_token,parse_dparen: call set_word_top where we add PST_SUBSHELL
10140 to parser_state
10141
10142 8/30
10143 ----
10144 parse.y
10145 - set_word_top: add COND_START to the list of tokens that set
10146 word_lineno[word_top]
10147 - grammar: decrement word_top after COND_END
10148 - rename: word_lineno -> compoundcmd_lineno, word_top -> compoundcmd_top,
10149 set_word_top -> set_compoundcmd_top
10150
10151 lib/readline/signals.c
10152 - _rl_release_sigint: don't check for signals if we're already
10153 handling a received signal
10154 Report from Tycho Kirchner <tychokirchner@mail.de> and
10155 Eduardo A. Bustamante López <dualbus@gmail.com>
10156
10157 8/31
10158 ----
10159 builtins/printf.def
10160 - printf_builtin: when parsing a time specification format, don't
10161 increment the format pointer to check for 'T' unless it points
10162 to a closing right paren, rejecting the format if it's not a `)'
10163 when the loop breaks
10164 Report from Andrey Kovalev <i.not.student@yandex.ru>
10165
10166 9/6
10167 ---
10168 jobs.c,jobs.h
10169 - notify_and_cleanup: now takes an argument saying which job to notify
10170 about; if arg is -1 it notifies about all jobs as previously
10171 - maybe_print_job_notifications: convenience function to encapsulate
10172 policy about when to call notify_of_job_status in one place; called
10173 by notify_and_cleanup
10174 - notify_of_job_status,maybe_print_job_notifications: now take an int
10175 argument with the same semantics as notify_and_cleanup
10176 - wait_for_any_job: now call notify_of_job_status only on the job we
10177 just retrieved and will return
10178 - wait_for: don't call notify_and_cleanup if posixly_correct unless
10179 the shell is not currently interactive, since posix says we can
10180 notify in a non-interactive shell when a foreground job changes
10181 state
10182
10183 jobs.c,parse.y,eval.c,execute_cmd.c,builtins/jobs.def,trap.c
10184 - notify_and_cleanup: changed all callers appropriately
10185
10186 builtins/evalfile.c
10187 - _evalfile: renamed to evalfile_internal
10188 - evalfile_internal: increment and decrement (or unwind-protect) the
10189 value of want_job_notifications; increment it to a non-zero value
10190 if the shell is interactive and the compatibility level is <= 52
10191 (see change to notify_and_cleanup of 8/26)
10192
10193 jobs.c
10194 - maybe_print_job_notifications: remove clause testing sourcelevel;
10195 use want_job_notifications for this
10196
10197 9/11
10198 ----
10199
10200 [prayers for the victims of 9/11]
10201
10202 9/12
10203 ----
10204 support/mkdep
10205 - new version from Martin Kealey; modified for inclusion
10206
10207 Makefile.in
10208 - MKDEP_ variables to be able to control various aspects of `make
10209 depend'
10210
10211 9/13
10212 ----
10213 configure.ac
10214 - relstatus: update to `beta'
10215
10216
10217 9/16
10218 ----
10219 builtins/jobs.def
10220 - jobs_builtin: when listing individial jobs, don't call notify_and_cleanup
10221 (which notifies about outstanding terminated jobs) if the shell is
10222 interactive and in posix mode
10223
10224 9/20
10225 ----
10226 jobs.c
10227 - wait_for_single_pid: if wait finds a status for the pid argument in
10228 the bgp list, remove it from the bgp list if the shell is in posix
10229 mode
10230
10231 9/23
10232 ----
10233 execute_cmd.c
10234 - execute_command_internal: if the COMMAND * passed in to execute has
10235 the CMD_INVERT_RETURN flag set, make sure we propagate that to
10236 simple commands, for commands, arith for commands, select commands,
10237 case commands, while/until commands, if commands, group commands,
10238 shell functions, pipelines, subshells, and connections so if set -e
10239 is enabled in the body (or test for if/while/until) its effect is
10240 ignored
10241 - execute_in_subshell: if the subshell's return status is being inverted,
10242 make sure to ignore set -e in the commands the subshell executes
10243 - execute_pipeline: if the pipeline's return status is being inverted,
10244 make sure to ignore the effects of set -e in all pipeline elements
10245 - execute_connection: if the list's return status is being inverted
10246 (tough to do because of precedence), make sure the list commands
10247 ignore the effect of set -e
10248
10249 9/24
10250 ----
10251 jobs.c
10252 - start_job: don't fetch the tty settings if we're being called from
10253 a readline key binding (bind -x) or programmable completion
10254 From a report by David Moberg <kaddkaka@gmail.com>
10255
10256 9/25
10257 ----
10258 jobs.c
10259 - wait_for_any_job: if the jobs table is empty and there are no
10260 eligible procsubs, and the shell is in posix mode, take a random
10261 pid from the bgpids table, delete it, and return its status
10262 (since we would be deleting that pid from bgpids anyway)
10263
10264 9/26
10265 ----
10266 lib/readline/histexpand.c
10267 - history_tokenize_word: fix off-by-one error (incrementing i one too
10268 many positions after the increment in the loop) preventing words
10269 like `$((expr))' from being tokenized correctly
10270 Report from Milana <94888u@riseup.net>
10271
10272 config.h.in,configure.ac
10273 - new option: bash-source-fullpath-default: set it to make the
10274 bash_source_fullpath option enabled by default; sets
10275 BASH_SOURCE_FULLPATH_DEFAULT
10276 Based on a patch from konsolebox <konsolebox@gmail.com>
10277
10278 variables.c
10279 - bash_source_fullpath: initialize to BASH_SOURCE_FULLPATH_DEFAULT,
10280 set by configure
10281
10282 doc/bashref.texi
10283 - --enable-bash-source-default: document
10284
10285 9/27
10286 ----
10287 doc/bash.1,doc/bashref.texi
10288 - update builtins documenation: make language and paragraph breaks
10289 more consistent between the document formats; update active
10290 language
10291
10292 10/1
10293 ----
10294 doc/bash.1,doc/bashref.texi,lib/readline/doc/rluser.texi,lib/readline/doc/hsuser.texi
10295 - update more documentation sections to make language consistent
10296 between formats, reduce passive voice
10297
10298 10/7
10299 ----
10300 lib/readline/doc/history.3
10301 - update history expansion section to be consistent with hsuser.texi
10302 and bash.1
10303
10304 doc/bash.1,doc/bashref.texi,lib/readline/doc/rluser.texi,lib/readline/doc/readline.3
10305 lib/readline/doc/hsuser.texi,lib/readline/doc/history.3
10306 - next set of updates for consistency between formats, update language,
10307 fix formatting conventions
10308
10309 10/11
10310 -----
10311 lib/readline/doc/rltech.texi,lib/readline/doc/hstech.texi
10312 - next set of updates for consistency between formats, update language,
10313 fix formatting conventions
10314
10315 10/12
10316 -----
10317 Makefile.in,builtins/Makefile.in
10318 - update dependencies on readline, history include files
10319
10320 builtins/shopt.def
10321 - update bash_source_fullpath reset to use new default
10322
10323 configure.ac
10324 - update to use the right option name for bash-source-fullpath-default
10325 Report and patch from Grisha Levit <grishalevit@gmail.com>
10326
10327 braces.c
10328 - mkseq: fix loop condition to avoid integer overflow
10329 Report and patch from Grisha Levit <grishalevit@gmail.com>
10330
10331 builtins/help.def
10332 - show_desc: don't assume that long_doc[0] ends with a newline,
10333 just add one manually when we hit a newline or NULL
10334 Report and patch from Grisha Levit <grishalevit@gmail.com>
10335
10336 builtins/read.def
10337 - read_builtin: don't check the timeout after breaking out of the
10338 character read loop unless we didn't read anything (i == 0) and
10339 the last read return EOF or error
10340 - read_builtin: move check_read_timeout call to the end of the read
10341 loop, after we check for the delimiter and whether or not we've
10342 read the right number of characters, so we always return any
10343 valid data
10344 Report from Thomas Oettli <thomas.oettli@sfs.com>
10345
10346 10/14
10347 -----
10348 jobs.c
10349 - wait_for_any_job: in posix mode, take any terminated pid from bgpids
10350 before waiting for a running job to terminate
10351 Inspired by report from Zachary Santer <zsanter@gmail.com>
10352
10353 10/14
10354 -----
10355 doc/bash.1,doc/bashref.texi
10356 - next set of updates for consistency between formats, update language,
10357 fix formatting conventions (job control section)
10358
10359 doc/bash.1,doc/bashref.texi,lib/readline/doc/readline.3,lib/readline/doc/rluser.texi
10360 - minor wording updates and typo fixes from
10361 G. Branden Robinson <g.branden.robinson@gmail.com>
10362
10363 10/15
10364 -----
10365 doc/bash.1,doc/bashref.texi,lib/readline/doc/readline.3,lib/readline/doc/rluser.texi
10366 - wording/formatting updates and typo fixes from
10367 G. Branden Robinson <g.branden.robinson@gmail.com>
10368
10369 doc/bash.1
10370 - update .FN macro, use it consistently for filenames, like @file{}
10371
10372 doc/bashref.texi
10373 - make sure to use @dots and @file consistently
10374
10375 doc/bash.1,lib/readline/doc/readline.3
10376 - make sure `readline' is typeset consistently
10377
10378 10/18
10379 -----
10380 sig.c
10381 - fix minix typo
10382
10383 lib/readline/history.c
10384 - history_do_write: for portability, make sure that the offset argument
10385 to mmap is page-aligned, since some systems (linux, macos) require it.
10386 Report and patch from Grisha Levit <grishalevit@gmail.com>
10387
10388 lib/readline/util.c
10389 - rl_tilde_expand: rearrange code to do bounds checking before data
10390 validation when finding the end of the tilde-word to avoid
10391 touching uninitialized data
10392 Report and patch from Grisha Levit <grishalevit@gmail.com>
10393
10394 10/20
10395 -----
10396 doc/bash.1,doc/bashref.texi
10397 - update word splitting section to add what IFS whitespace means and
10398 how word splitting uses it. Based on a bug-bash discussion
10399
10400 10/21
10401 -----
10402 lib/readline/colors.c
10403 doc/bash.1,lib/readline/doc/readline.3,lib/readline/doc/rluser.texi
10404 - RL_COLOR_PREFIX_EXTENSION: remove the leading `.' again; this was
10405 the result of a misunderstanding about how `dircolors' works
10406 Report from Daniël Gerbrand Haasbroek <dghaasbroek@gmail.com>
10407
10408 lib/readline/isearch.c
10409 - _rl_isearch_dispatch: when adding the character to the search
10410 string, insert it as a single byte in the C locale (or if we're
10411 not doing multibyte characters)
10412 Report and patch from Grisha Levit <grishalevit@gmail.com>
10413
10414 10/23
10415 -----
10416 doc/bash.1,doc/bashref.texi
10417 - SIGNALS: update section to make it clear how job control affects
10418 SIGINT receipt and the behavior of the shell when it's waiting
10419 for a command that receives one.
10420 From a suggestion by Simone Robinson <robinson027@yahoo.com>
10421
10422 builtins/common.c
10423 - get_job_spec: warn about deprecated notation if the job spec doesn't
10424 have a leading `%'; code to return BAD_JOBSPEC tagged for bash-5.4
10425 - sh_invalidjob: new convenience function to print error for invalid
10426 job specifications
10427
10428 builtins/jobs.def, builtins/ kill.def, builtins/ wait.def, builtins/fg_bg.def
10429 - handle BAD_JOBSPEC return from get_job_spec; call sh_invalidjob.
10430 Nothing returns that yet.
10431
10432 builtins/kill.def
10433 - kill_builtin: change to use common error message via sh_badpid() if
10434 we get an argument where the first character is not a digit or `%'
10435
10436 builtins/jobs.def
10437 - jobs_builtin: check for INVALID_JOB return from get_job_spec to
10438 avoid call to get_job_by_jid
10439
10440 10/24
10441 -----
10442 error.c, error.h
10443 - err_invalidid: common error function for invalid identifiers;
10444 changed callers in execute_cmd.c, general.c
10445
10446 general.c
10447 - valid_function_word: separated posix check against special builtin
10448 names (flags&4) and posix check for valid identifiers (flags&1);
10449 callers need to differentiate. This means that posix mode does not
10450 require function names to be valid identifiers
10451
10452 execute_cmd.c
10453 - execute_intern_function: don't call valid_function_word with
10454 (flags&1) in posix mode unless POSIX_RESTRICT_FUNCNAME is defined;
10455 call with flags&4 to keep the check against special builtin names
10456
10457 print_cmd.c
10458 - print_function_def,named_function_string: don't print functions
10459 with names that are invalid identifiers with a leading `function'
10460
10461 config-top.h
10462 - POSIX_RESTRICT_FUNCNAME: placeholder, not defined by default
10463
10464 doc/bashref.texi
10465 - Posix mode: remove item about function names being valid shell
10466 identifiers
10467
10468 10/25
10469 -----
10470 aclocal.m4
10471 - simplify the checks for the various members of struct dirent
10472 Report and patch from Grisha Levit <grishalevit@gmail.com>
10473
10474 m4/strtoimax.m4
10475 - simplify and remove redundant caching and cache check
10476 Report and patch from Grisha Levit <grishalevit@gmail.com>
10477
10478 builtins/common.c
10479 - get_exitstat: make the behavior of exit with no arguments
10480 running in a trap action the same as return: check for any trap
10481 (running_trap > 0) in the current execution_context. This is
10482 POSIX interp 1602, in POSIX.1-2024
10483
10484 stringlib.c
10485 - find_token_in_alist: if FLAGS is non-zero, do *not* allocate new
10486 memory for the token. The existing behavior is to allocate memory
10487 and return a copy of the token, and all callers pass 0
10488
10489 parse.y
10490 - compoundcmd_lineno: now an array of `struct tokeninfo', which
10491 has line number and current compound command information
10492 - change compoundcmd_lineno[compoundcmd_top] to
10493 compoundcmd_lineno[compoundcmd_top].lineno in all calls
10494 - set_compoundcmd_top: in addition to assigning line number info,
10495 assign T to compoundcmd_lineno[compoundcmd_top].token
10496 - report_syntax_error: if we get a syntax error while looking for
10497 shell_eof_token (comsubs), include the token we were looking for
10498 in the error message
10499 - report_syntax_error: if we are reporting an unexpected EOF error,
10500 and compoundcmd_top >= 0, look up the token for the compound
10501 command we're parsing, including `(', and change the error message
10502 to include it
10503
10504 10/26
10505 -----
10506 Makefile.in
10507 - PURIFY,GLOBC,GLOBO,ALLOC_FILES,LIBRARY_SOURCE: remove
10508 - ADDON_CFLAGS,ADDON_LDDFLAGS: initialize to empty
10509 - GRAM_H: remove from HSOURCES
10510 - profiling-tests: use Program instead of PROGRAM
10511
10512 builtins/Makefile.in
10513 - DEBUG: initialize from configure
10514 - SYSTEM_FLAGS: remove, since it's not passed from topdir Makefile
10515 - ADDON_CFLAGS: initialize to empty
10516
10517 lib/glob/Makefile.in
10518 - ADDON_CFLAGS: initialize to empty
10519
10520 lib/readline/Makefile.in
10521 - ADDON_CFLAGS: initialize to empty
10522 - APP_CFLAGS: remove
10523
10524 lib/sh/Makefile.in
10525 - DEBUG: initialize from configure
10526 - ADDON_CFLAGS: initialize to empty
10527 - LIBOBJDIR: initialize to empty; configure uses it in LIBOBJS
10528
10529 lib/tilde/Makefile.in
10530 - ADDON_CFLAGS: initialize to empty
10531 - CCFLAGS: add ADDON_CFLAGS, replacing ASAN_CFLAGS
10532
10533 support/Makefile.in
10534 - SYSTEM_FLAGS: remove, since it's not passed from topdir Makefile
10535
10536 Makefiles report and patch from Grisha Levit <grishalevit@gmail.com>
10537
10538 version.c,shell.h
10539 - default_compatibility_level: int variable, initialized to
10540 DEFAULT_COMPAT_LEVEL like shell_compatibility_level
10541
10542 variables.c
10543 - sv_shcompat: use default_compatibility_level instead of
10544 DEFAULT_COMPAT_LEVEL so variables.o doesn't have to depend on
10545 version.h
10546
10547 builtins/shopt.def
10548 - set_compatibility_level: use default_compatibility_level instead
10549 of DEFAULT_COMPAT_LEVEL so shopt.o doesn't have to depend on
10550 version.h
10551 - don't include version.h any more
10552
10553 configure.ac,Makefile.in,support/Makefile.in,doc/Makefile.in
10554 - remove some unused variables: BASE_CFLAGS_FOR_BUILD, DEBUGGER_DIR,
10555 INTLOBJS, TEXINDEX, TEX, MALLOC, SIGNAMES_SUPPORT
10556 From a report by Martin D Kealey <martin@kurahaupo.gen.nz>
10557
10558 10/28
10559 -----
10560 builtins/exec.def
10561 - exec_builtin: don't try to print an error message in the cases
10562 where shell_execve prints one, in case we have execfail set
10563 Report from Emanuele Torre <torreemanuele6@gmail.com>
10564
10565 Makefile.in
10566 - LIBRARY_SOURCE: add back in to tags targets, add definition
10567 Suggestion from Mike Jonkmans <bashbug@jonkmans.nl>
10568
10569 10/31
10570 -----
10571 lib/readline/search.c
10572 - make_history_line_current: change to use the same strategy to move
10573 to a history line as incremental search: one or more calls to
10574 rl_get_{next,previous}_history
10575 - dispose_saved_search_line: remove
10576 - noninc_dosearch: no longer need to call _rl_unsave_saved_search_line
10577 or dispose_saved_search_line; use new calling convention for
10578 make_history_line_current
10579 - _rl_nsearch_init: don't need to call _rl_maybe_replace_line, wait
10580 until we move to the history line
10581 - _rl_nsearch_dosearch: free the undo list unconditionally, since we
10582 are committed to using the contents of rl_line_buffer as the search
10583 string
10584 - _rl_nsearch_dosearch: if we abort because of no search string, call
10585 _rl_unsave_saved_search_line and let the caller clean up
10586 - _rl_nsearch_dosearch: if the search fails, reset rl_point to the
10587 saved point, since we will be restoring the old line
10588 - rl_history_search_internal: don't bother to save and restore the
10589 search line, since we don't use rl_line_buffer for anything
10590 - rl_history_search_internal: use new calling convention for
10591 make_history_line_current
10592 - all these changes unify the incremental and non-incremental search
10593 implementations
10594
10595 lib/readline/readline.c
10596 - rl_initialize: reset rl_eof_found to 0 at the same time we reset
10597 the EOF state
10598 Report and fix from Andrew Burgess <aburgess@redhat.com> (GDB)
10599
10600 11/6
10601 ----
10602 lib/readline/display.c
10603 - rl_redisplay: if we changed screen lines during the redisplay and
10604 we need to return to the line with the cursor, make sure to account
10605 for differing numbers of invisible characters in the two lines
10606 - rl_redisplay: if we need to redisplay the prompt because we moved
10607 into a portion of it containing invisible characters while moving
10608 to the line containing the cursor, make sure to account for the
10609 cursor being on a line other than 0 and the prompt wrapping lines.
10610 If it wraps, we only want to redisplay the portion after the line
10611 wrap before the line the cursor is on
10612 Fix for C locale issues reported by Grisha Levit <grishalevit@gmail.com>
10613
10614 11/7
10615 ----
10616 lib/termcap/termcap.c
10617 - tgetent: fix small memory leak on file open error
10618
10619 Makefile.in
10620 - y.tab.h: move from CREATED_HEADERS to INSTALLED_HEADERS so we don't
10621 clean it
10622 - maybe-clean: slightly change the syntax of the recipe
10623
10624 doc/Makefile.in
10625 - PSFILES: split into CREATED_PS and ps files from the distro
10626 so we just remove CREATED_PS in maintainer-clean target
10627 - PDFFILES: split into CREATED_PDF and ps files from the distro
10628 so we just remove CREATED_PDF in maintainer-clean targets
10629 - clean,mostlyclean: swap
10630 - mostlyclean: don't remove Makefile
10631 - maybe-clean: use realpath equivalent like in top-level Makefile.in
10632 Report from Mike Jonkmans <bashbug@jonkmans.nl>
10633
10634 11/11
10635 -----
10636 Makefile.in,doc/Makefile.in,lib/glob/Makefile.in,lib/readline/Makefile.in
10637 lib/malloc/Makefile.in.,lib/tilde/Makefile.in
10638 - mostlyclean: swap with clean where appropriate
10639 - add .PHONY target for clean targets where appropriate
10640
10641 Makefile.in,configure.ac
10642 - STDCKDINT_H: variable for possibly-created file stdckdint.h, for
10643 dependencies; add dependencies where appropriate
10644
10645 Makefile.in,doc/Makefile.in
10646 - add various gnu-standard install targets that do nothing
10647
10648 11/14
10649 -----
10650 CHANGES,NEWS
10651 - updated for bash-5.3-beta
10652
10653 11/15
10654 -----
10655 lib/sh/snprintf.c
10656 - wchars: fix small memory leak by freeing lbuf if wcrtomb fails
10657 Report from SerGoGubarev <sergeygubarev263@gmail.com>
10658
10659 lib/readline/complete.c
10660 - vector_len: an inline convenience function to return the length
10661 of an array of strings; callers are remove_duplicate_matches,
10662 rl_old_menu_complete, rl_menu_complete
10663 - rl_complete_internal: add `$' as a value for what_to_do that
10664 exports a (possibly null) list of possible completions to an
10665 application or another process by writing them, using a specific
10666 protocol, to rl_outstream
10667 - rl_export_completions: bindable command to perform word completion
10668 and write the results, with other information, to rl_outstream
10669 - _rl_export_completions: workhorse function to export the completions
10670 Based on a patch from Matthew Tromp <matthewktromp@gmail.com>,
10671 original request from Spencer Baugh <sbaugh@catern.com> back in 11/23
10672
10673 lib/readline/readline.h
10674 - rl_export_completions: extern declaration
10675
10676 lib/readline/funmap.c
10677 - export-completions: new bindable command name
10678
10679 doc/bash.1,lib/readline/doc/readline.3,lib/readline/doc/rluser.texi
10680 - export-completions: document, including output format
10681
10682 11/19
10683 -----
10684 Makefile.in
10685 - HYBRID_HEADERS: new variable containing header files that may appear
10686 in the build directory or the source directory
10687 - maybe-install-headers: rule to install header files that may appear
10688 in the build directory or a subdirectory of it; install-headers
10689 depends on it
10690 - uninstall-headers: remove $(HYBRID_HEADERS); fix typo in recipe
10691
10692 11/21
10693 -----
10694 builtins/printf.def
10695 - chk_converror: inline function to use for single place to check
10696 for numeric overflow, change callers to use it
10697
10698 11/25
10699 -----
10700 doc/bash.1,doc/bashref.texi
10701 - minor updates to the section on bracket expressions in pattern
10702 matching
10703
10704 builtins/command.def
10705 - update -v help string to indicate that the output is a single word
10706 Report from Andrew Davis <addavis@gmail.com>
10707
10708 11/26
10709 -----
10710 builtins/printf.def
10711 - chk_converr: add check for no characters being converted at all,
10712 print same warning message as if *ep != 0. This covers the case of
10713 an empty string argument.
10714 Report by Paul Eggert <eggert@cs.ucla.edu>
10715
10716 Makefile.in,doc/Makefile.in
10717 - uninstall: make sure the bash-specific directories created by
10718 `make install' are emptied and removed
10719
10720 11/27
10721 -----
10722 doc/bash.1,doc/bashref.texi
10723 lib/readline/doc/readline.3,lib/readline/doc/history.3
10724 lib/readline/doc/rluser.texi,lib/readline/doc/rltech.texi
10725 - another set of updates for formatting consistency, language
10726 consistency between man pages and info files
10727
10728 12/1
10729 ----
10730 lib/readline/misc.c
10731 - rl_get_previous_history: call _rl_maybe_replace_line with arg of 1
10732 so it clears rl_undo_list, since this may not immediately replace
10733 rl_undo_list with something from history
10734 Report from Grisha Levit <grishalevit@gmail.com>
10735
10736 12/5
10737 ----
10738 doc/bash.1,doc/bashref.texi
10739 lib/readline/doc/rluser.texi
10740 - updates for active voice, future tense, formatting and fonts, edits
10741 to Programmable Completion
10742 Suggestions from G. Branden Robinson <g.branden.robinson@gmail.com>
10743
10744 12/10
10745 -----
10746 lib/readline/complete.c
10747 - fnprint: make sure _rl_completion_prefix_display_length and
10748 _rl_colored_completion_prefix are mutually exclusive, since the
10749 callers assume they are.
10750
10751 bashline.c
10752 - bash_default_completion: if we're trying to complete a glob pattern,
10753 and rl_completion_type is '?', tell readline not to append a slash
10754 if the pattern ends in one.
10755
10756 doc/bash.1,lib/readline/doc/readline.3,lib/readline/doc/rluser.texi
10757 - completion-prefix-display-length: note that readline uses `___'
10758 instead of an ellipsis if the filename begins with a period
10759 All reported by Frederick Abell <fkabell3@hotmail.com>
10760
10761 doc/bash.1,doc/bashref.texi
10762 - PIPESTATUS: enumerate the commands that set PIPESTATUS
10763 From a report by Ulrich Müller <ulm@gentoo.org>
10764
10765 lib/readline/isearch.c
10766 - _rl_isearch_init: change to call _rl_maybe_replace_line with arg
10767 of 1 so rl_undo_list gets cleared (see change from 12/1)
10768 Report from Grisha Levit <grishalevit@gmail.com>
10769
10770 12/13
10771 -----
10772 CHANGES,NEWS
10773 - updated for bash-5.3-beta
10774
10775 12/15
10776 -----
10777 lib/readline/histexpand.c
10778 - get_history_event: make sure we don't change history_offset whether
10779 the search succeeds or fails, don't set it to history_length.
10780 Callers don't expect to have the history offset changed out from
10781 under them.
10782 Fixes bug reported by Grisha Levit <grishalevit@gmail.com>
10783
10784 12/16
10785 -----
10786 lib/readline/util.c
10787 - _rl_abort_internal: make sure to clear _rl_command_to_execute
10788 Report and patch from Grisha Levit <grishalevit@gmail.com>
10789
10790 tests/printf7.sub,tests/cond-regexp2.sub
10791 - accommodate different error messages across different systems
10792
10793 1/2/2025
10794 --------
10795 tests/run-all, tests/run-minimal
10796 - BASHOPTS: unset or unexport as appropriate, same as SHELLOPTS
10797 From a report by Martin D Kealey <martin@kurahaupo.gen.nz>
10798
10799 1/9
10800 ---
10801 subst.c
10802 - string_extract_verbatim: take into account the fact that CTLESC can
10803 quote multibyte characters; use ADVANCE_CHAR instead of increment
10804 Fixes bug reported by jktseug@gmail.com
10805
10806 1/10
10807 ----
10808 expr.c
10809 - expr_bind_variable,expr_streval: suppress additional expansion if
10810 called by the `let' builtin, whether or not array_expand_once is set
10811 - expr_skipsubscript: suppress expansion while parsing subscripts
10812 whether array_expand_once is set or not
10813 Still have to change tests if this goes final
10814 These are all conditional on shell_compatibility_level > 51
10815 From a bug-bash post by Greg Wooledge <greg@wooledge.org>
10816
10817 1/14
10818 ----
10819 lib/readline/complete.c
10820 - _rl_export_completions: use print_filename instead of fprintf to
10821 display the possible completions so slashes and file types can
10822 be included
10823 From a patch from Matthew Tromp <matthewktromp@gmail.com>
10824
10825 1/15
10826 ----
10827 examples/loadables/fltexpr.c
10828 - fltexpr: new loadable builtin to do floating-point arithmetic
10829 expression evaluation and optionally print the result
10830
10831 1/16
10832 ----
10833 builtins/printf.def
10834 - getarg(), advancearg(): cosmetic changes to make it easier to
10835 implement %N$ format specifiers in the future
10836
10837 1/18
10838 ----
10839 subst.c
10840 - array_length_reference: requesting the length of an element of an
10841 unset variable using array syntax is a fatal error when `set -u'
10842 is enabled and the subscript is not `@' or `*'.
10843 Inspired by a report from Ian Kelling <iank@fsf.org>
10844
10845 1/20
10846 ----
10847 parse.y
10848 - decode_prompt_string: since Debian has made the spectaculary bad call
10849 to allow arbitrary characters in usernames, protect the results of
10850 the \u expansion in the same way as \[Ww] and \[Hh] (externally-
10851 controlled data)
10852 From https://savannah.gnu.org/patch/?10496
10853
10854 1/21
10855 ----
10856 eval.c
10857 - reader_loop: if we longjmp with ERREXIT, don't reset any local
10858 function contexts in posix mode, since POSIX says to exit as if
10859 executing the `exit builtin with no arguments'. Revision of change
10860 from 7/2022.
10861 From a report by Ivan Shapovalov <intelfx@intelfx.name> in 11/2024
10862
10863 lib/readline/display.c
10864 - rl_redisplay: after calling update_line, when putting the cursor
10865 where it needs to be and reprinting part of the line with the
10866 prompt that contains invisible characters, make sure we start to
10867 output characters at the portion in the prompt buffer that begins
10868 on the current line and only offset by the number of invisible
10869 characters on the current line, and set _rl_last_c_pos accordingly
10870 in both multibyte and singlebyte locales.
10871 Fixes bug reported by Andreas Schwab <schwab@linux-m68k.org>
10872
10873 1/22
10874 ----
10875 execute_cmd.c
10876 - execute_builtin_or_function: if we're executing the exec builtin,
10877 and there are redirections, let exec_builtin handle disposing of
10878 redirection_undo_list if there is no program name to execute, so
10879 it's still there if exec returns and doesn't exit the shell.
10880 Then we can manage disposing of exec_redirection_undo_list and
10881 letting the redirections be undone as normal.
10882 This is POSIX interp 1896, with modifications from
10883 https://www.austingroupbugs.net/view.php?id=1896#c7037
10884
10885 builtins/exec.def
10886 - exec_builtin: dispose of redirection_undo_list and set it to NULL
10887 if there is no program name operand; let execute_builtin_or_function
10888 clean it up
10889
10890 1/23
10891 ----
10892 lib/readline/terminal.c
10893 - _rl_tcgetwinsize,_rl_tcsetwinsize: function wrappers for tcgetwinsize/
10894 tcsetwinsize with fallbacks to ioctl if those functions aren't
10895 available
10896 - _rl_get_screensize: use _rl_tcgetwinsize
10897
10898 lib/readline/rlwinsize.h
10899 - _rl_tcgetwinsize,_rl_tcsetwinsize: extern function declarations
10900
10901 lib/readine/rltty.c
10902 - set_winsize: use _rl_tcgetwinsize/_rl_tcsetwinsize
10903 - set_winsize: if _rl_tcgetwinsize succeeds, use the values to set
10904 readline's idea of the screen size via _rl_set_screen_size
10905 Inspired by a discussion with Olav Mørkrid <omega@funker.no>
10906
10907 1/24
10908 ----
10909 lib/readline/signals.c
10910 - _rl_handling_signal: new private variable, set to the signal we're
10911 currently handling in _rl_signal_handler (SIGWINCH) or
10912 _rl_handle_signal (all others). Only valid if RL_STATE_SIGHANDLER
10913 is set
10914
10915 lib/readline/rlprivate.h
10916 - _rl_handling_signal: new extern declaration
10917
10918 lib/readline/rltty.c
10919 - set_winsize: only set readline's idea of the screen size if we're
10920 executing in a signal handler context and handling SIGTSTP and the
10921 application has indicated that it doesn't want the environment
10922 variables LINES and COLUMNS to have priority (rl_prefer_env_winsize)
10923
10924 1/30
10925 ----
10926 jobs.c
10927 - wait_for_single_pid: if wait_for returns -1/ECHILD, make sure to
10928 return 257 just as if the child was not found, optionally printing
10929 an error message if JWAIT_PERROR is supplied
10930 From a discussion with Ian <saturns_rings@protonmail.com>
10931
10932 2/8
10933 ---
10934 redir.c
10935 - do_redirection_internal: keep track of whether the redirector fd
10936 was active with a new variable. Not used yet, should be optimized
10937 out.
10938 - add_undo_fd_redirect: new undo function using r_move_input so we
10939 don't need a dup redir and a separate close redir to undo. Not
10940 used yet
10941 - do_redirection_internal: only call check_bash_input if we're
10942 creating an undo list and not running one
10943
10944 command.h
10945 - OUTPUT_REDIRECT: add r_output_force
10946
10947 input.c
10948 - check_bash_input: if we dup the bash input fd to another in
10949 save_bash_input, return that fd. Continue to return -1 on error
10950 and 0 if we don't do anything but sync
10951
10952 execute_cmd.c
10953 - execute_null_command: force a subshell if any of the redirections
10954 involve the bash input buffered fd.
10955 From a report by Martin D Kealey <martin@kurahaupo.gen.nz>
10956
10957 2/10
10958 ----
10959
10960 examples/loadables/chmod.c
10961 - chmod: new loadable builtin, inspired by zhixu.liu@gmail.com in
10962 https://savannah.gnu.org/patch/?10499
10963
10964 2/11
10965 ----
10966 builtins/kill.def
10967 - kill_builtin: in posix mode, return a failure status if any of the
10968 pid/job arguments are not found or sending the signal fails. This
10969 is consistent with
10970 https://pubs.opengroup.org/onlinepubs/9799919799/utilities/kill.html#tag_20_64_14
10971
10972 2/12
10973 ----
10974 braces.c
10975 - brace_gobbler: take a new argument in which to return the type of
10976 brace expansion (comma or sequence) we think we've found; change
10977 all callers
10978 - brace_expand: even if we find a BRACE_ARG_SEPARATOR, don't try to
10979 perform expansion if brace_gobbler doesn't think we have a
10980 BRACE_COMMA expansion
10981 - valid_seqterm: new function, performs minimal validation on a
10982 sequence expansion, used to skip over invalid sequence expressions
10983 in brace_expand
10984 - brace_expand: call valid_seqterm if brace_gobbler finds a BRACE_SEQ
10985 expansion
10986 Inspired by report from Robert Elz <kre@munnari.oz.au>
10987
10988 2/13
10989 ----
10990 doc/bash.1,doc/bashref.texi
10991 - clarified the handling of double quotes in EXPRESSION in
10992 (( EXPRESSION )) and $(( EXPRESSION )) to say that only unescaped
10993 double quotes are removed
10994
10995 expr.c
10996 - expr_bind_variable,expr_streval: revert change from 1/10 that
10997 suppresses additional expansion when called by the `let' builtin,
10998 tag for possible inclusion in a future release when I can look
10999 at parallel changes to ((...)) and $((...)) (and probably
11000 declare 'a[" "]=12' or similar)
11001
11002 2/14
11003 ----
11004
11005 lib/sh/zmapfd.c,externs.h
11006 - zmapfd: now returns ssize_t in case of large files when size_t is
11007 larger than int
11008
11009 builtins/evalfile.c,builtins/help.def
11010 - zmapfd: changed callers
11011
11012 print_cmd.c
11013 - print_redirection: the default file descriptor for <> is 0
11014 Report and fix from Emanuele Torre <torreemanuele6@gmail.com>
11015
11016 2/18
11017 ----
11018 configure.ac
11019 - check for d_type member of struct dirent for future use
11020
11021 2/24
11022 ----
11023 doc/bash.1,doc/bashref.texi
11024 - document the word expansions performed on indexed array subscripts
11025 and assoc array keys
11026 - document the possibility and effect of empty strings on arithmetic
11027 evaluation for substring expansion, arithmetic expansion, operands
11028 to the the [[ command's arithmetic operators, the expression in
11029 the (( compound command, and indexed array subscripts
11030
11031 2/24
11032 ----
11033 execute_cmd.c
11034 - execute_command_internal: if executing a (...) subshell, make sure
11035 to update BASH_COMMAND before exiting on an error return from the
11036 subshell with -e set
11037 Report from Max Bowsher <maxbowsher@gmail.com>
11038
11039 3/3
11040 ---
11041 redir.c
11042 - here_document_to_fd: if we are trying to use a pipe for a here
11043 document, but the F_GETPIPE_SZ fcntl returns a value shorter than
11044 the here document length, make sure to close the pipe file descriptors
11045
11046 builtins/ulimit.def
11047 - pipesize: use pathconf and _PC_PIPE_BUF if available
11048
11049 3/8
11050 ---
11051 braces.c
11052 - brace_expand: make sure to call valid_seqterm with the right length
11053 so that text[tlen] == '}'
11054
11055 3/10
11056 ----
11057 builtins/help.def
11058 - show_manpage: if the first line of long_doc doesn't contain a
11059 newline, e.g., if it's a loadable builtin, add one so there's the
11060 usual space between NAME and SYNOPSIS
11061
11062 m4/codeset.m4
11063 - define HAVE_NL_LANGINFO
11064
11065 lib/sh/strftime.c
11066 - updates for locale-awareness
11067
11068 3/14
11069 ----
11070 lib/termcap/termcap.c,lib/termcap/tparam.c
11071 - updates for ISO C
11072
11073 3/17
11074 ----
11075 configure.ac
11076 - update release to rc1, update CHANGES and NEWS
11077
11078 3/19
11079 ----
11080 lib/readline/rlmbutil.h
11081 - _rl_wcwidth: make sure wchar_t constants have an `L' prefix
11082
11083 3/24
11084 ----
11085 subst.c
11086 - function_substitute: set temporary_env to NULL (we've already
11087 set up an unwind-protect for it) before pushing the context, so
11088 pop_context doesn't free it out from underneath the caller.
11089 Report from Emanuele Torre <torreemanuele6@gmail.com>
11090
11091 3/27
11092 ----
11093 shell.c
11094 - set_bash_input: if the call to with_input_from_buffered_stream does
11095 not result in a valid buffer corresponding to the file descriptor,
11096 print an error message and set last_command_exit_value
11097 From a report in https://savannah.gnu.org/patch/?10512
11098
11099 4/3
11100 ---
11101 lib/sh/gettimeofday.c
11102 - updated from version in gnulib
11103
11104 [bash-5.3-rc1 frozen]
11105
11106 4/4
11107 ---
11108 examples/loadables/fltexpr.c
11109 - add support for function calls; support almost all math function
11110 calls in math.h
11111 - add support for pi, gamma, e mathematical constants
11112
11113 4/7
11114 ---
11115 doc/bash.1,doc/bashref.texi
11116 - HISTFILESIZE: note that the history file will contain complete
11117 history entries whose lines may total slightly more than
11118 $HISTFILESIZE if the entries contain multiple lines
11119 From a report from Jens Schmidt <farblos@vodafonemail.de>
11120 - export: note that you can use -f with -p to display exported functions
11121 From a report from Duncan Roe <duncan_roe@optusnet.com.au>
11122
11123 builtins/history.def
11124 - add history -d start-end to the long doc
11125 From a report from Duncan Roe <duncan_roe@optusnet.com.au>
11126
11127 4/9
11128 ---
11129 lib/readline/histfile.c
11130 - read_history_range: changes to not skip blank lines if we are
11131 reading a history file with multiline history entries.
11132 From a report by Jens Schmidt <farblos@vodafonemail.de>
11133
11134 4/11
11135 ----
11136 bashline.c
11137 - attempt_shell_completion: move the check for char_is_quoted from
11138 check_redir to the caller, set in_command_position to 0 if the
11139 command separator is quoted
11140 From https://savannah.gnu.org/support/?111224 david@mandelberg.org
11141 - check_extglob: break check for extended glob out into separate
11142 function, call from attempted_shell_completion, set in_command_position
11143 to -1 if it returns 1, as with the old call to check_redir
11144
11145 4/21
11146 ----
11147 builtins/read.def
11148 - read_mbchar: if we read a delimiter character that makes an
11149 incomplete multibyte character into an invalid multibyte character,
11150 only push the delimiter back if we read that character ourselves
11151 (i > 1).
11152 Report from Greg Wooledge <greg@wooledge.org>
11153
11154 4/23
11155 ----
11156 parse.y
11157 - pop_delimiter: only decrement delimiter_depth if it's > 0, since
11158 reset_parser() may have set it to 0 after the matching call to
11159 push_delimiter
11160 Report from Grisha Levit <grishalevit@gmail.com> based on a report
11161 from Александр Ушаков <aushakov@astralinux.ru>
11162
11163 4/25
11164 ----
11165 parse.y
11166 - read_a_line: if the shell is interactive, and not reading from a
11167 string, check whether a previous call to shell_getc has set
11168 EOF_Reached and return EOF in this case, after resetting the
11169 current token to '\n'. This makes EOFs that are not the first
11170 character on the line `sticky' instead of just token delimiters.
11171 From https://savannah.gnu.org/bugs/?67045
11172 - history_delimiting_chars: if it looks like we just finished a
11173 subshell, and the line we're adding begins with an operator that
11174 can't follow a semicolon, return a newline
11175 From https://savannah.gnu.org/patch/?10517
11176
11177 4/28
11178 ----
11179 parse.y
11180 - parse_arith_command: if the character after the first right paren
11181 isn't a right paren, making the construct a nested subshell, push
11182 that character back and return the subshell command as the current
11183 token string, which we push onto the pushed string list. Reading
11184 one character more can cause synchronization problems with backslash
11185 newline, among other things.
11186 From https://savannah.gnu.org/patch/?10517
11187
11188 4/29
11189 ----
11190 builtins/evalstring.c
11191 - parse_string: only run the top-level unwind-protects if we're
11192 actually going to be calling jump_to_top_level(); otherwise let
11193 xparse_dolparen take care of it
11194 From a report by Александр Ушаков <aushakov@astralinux.ru>
11195
11196 5/1
11197 ---
11198 lib/sh/zread.c
11199 - zungetc: rework to use a local 16-byte buffer so we can push back
11200 multiple characters whether we use read or zread
11201 - zread/zreadretry/zreadintr/zreadc/zreadcintr/zreadn: changed to use
11202 zpopbuf to check whether we have pushed back bytes
11203 - zreset,zsyncfd: reset the pushback buffer indices
11204
11205 builtins/read.def
11206 - read_mbchar: handle the delimiter being part of an invalid multibyte
11207 character, not just the byte that makes the multibyte character
11208 invalid: keep track of where the delimiter char is in the buffer and
11209 use zungetc to push back that character and everything we read
11210 after it so subsequent buffered (zread) or unbuffered (read) reads
11211 will return them
11212
11213 5/2
11214 ---
11215 lib/readline/display.c,lib/readline/histexpand.c,lib/readline/history.c,
11216 lib/readline/input.c,lib/readline/search.c,lib/readline/shell.c,
11217 lib/readline/util.c,lib/readline/readline.c,lib/readline/histfile.c
11218 - fixes for issues (unused variables, etc.) uncovered by static
11219 analysis
11220 All from a report by Siteshwar Vashisht <svashisht@redhat.com>
11221
11222 5/16
11223 ----
11224 lib/readline/terminal.c
11225 - NEED_EXTERN_PC: add __gnu_hurd__ to the systems that require this
11226 if not using ncurses; rework the structure of the defines
11227 Report from Collin Funk <collin.funk1@gmail.com>
11228
11229 braces.c
11230 - brace_gobbler: don't mark an expression as BRACE_SEQ if we've
11231 already seen a comma and marked it as BRACE_COMMA, so we treat
11232 it as a comma brace expansion.
11233 From a report by Sam James <sam@gentoo.org>
11234
11235 support/install-sh
11236 - new version from coreutils-git (2024-12-03.03); renamed from install.sh
11237
11238 aclocal.m4
11239 - AM_PROG_INSTALL_SH, AM_PROG_INSTALL_STRIP: added from automake
11240
11241 configure.ac
11242 - call AM_PROG_INSTALL_SH, AM_PROG_INSTALL_STRIP
11243
11244 Makefile.in
11245 - STRIP: let configure substitute it from AC_CHECK_TOOL result
11246 - INSTALL_STRIP_PROGRAM: let configure substitute it from
11247 AM_PROG_INSTALL_STRIP
11248 - install-strip: change to set INSTALL_PROGRAM=${INSTALL_STRIP_PROGRAM}
11249 to avoid hard-coding `-s' in the recipe
11250 All from a report by NR <nroycea+gnu@gmail.com>
11251
11252 5/18
11253 ----
11254 subst.c
11255 - param_expand: if we expand a nameref that references an unset array
11256 variable reference, make sure we enforce `nounset', with the usual
11257 exceptions for `@' and `*' subscripts
11258 From a report from Emanuele Torre <torreemanuele6@gmail.com>
11259
11260 5/22
11261 ----
11262 buildconf.h.in
11263 - add additional defines for conservative ISO C/POSIX environment
11264 - add HAVE_C_BOOL define in case someone cross-compiles with a C23
11265 compiler
11266 From a report by Bruce Dubbs <bdubbs@linuxfromscratch.org>
11267
11268 builtins/mkbuiltins.c
11269 - include buildconf.h instead of having separate defines when
11270 cross-compiling
11271
11272 6/11
11273 ----
11274 lib/readline/terminal.c
11275 - rework change from 5/16 to add __gnu_hurd__ to the list of systems
11276 that don't need extern PC/UP/BC
11277 Reported by Joel Ebel <jbebel@google.com> as a static link failure
11278 due to multiply-defined symbols
11279
11280 6/12
11281 ----
11282 general.c
11283 - valid_function_word: back out change from 2/4/2023 that allowed
11284 quoted characters in function names.
11285 Inspired by discussion with Robert Elz <kre@munnari.oz.au> and
11286 Koichi Murase <myoga.murase@gmail.com>
11287
11288 parse.y
11289 - read_token_word: set dollar_present if we see <( or >), backing
11290 out change from 2/4/2023