9 - bashline.o: add dependency on ${DEFDIR}/builtext.h. Report from
10 Fazal Majid <fazal@majid.org>
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>
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
26 - kvpair_assignment_p, expand_and_quote_kvpair_word: extern declarations
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
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
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
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>
56 - PROMPT_COMMANDS: clean up a couple of remaining instances of this
57 name. Report from Eli Schwartz <eschwartz@archlinux.org>
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
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
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
84 examples/loadables/Makefile.in
85 - stat: now built and installed by default
90 - SUBSHELL_IGNTRAP: new flag value
93 - make_child: set SUBSHELL_IGNTRAP in subshell_environment in the
94 child process, meaning that we should not execute trap handlers for
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
105 - command_substitute,process_substitute: unset SUBSHELL_IGNTRAP after
106 the child process has reset the trapped signal dispositions
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)
116 - initialize_terminating_signal: set the original signal handler from
117 the return value from sigaction; a minor optimization that saves a
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 `+='
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>
139 - local_shiftstates -> locale_shiftsates in the non-multibyte code
140 branch. Reported by Henry Bent <henry.r.bent@gmail.com>
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>
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>
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
166 - get_new_window_size: set *rp and *cp even if READLINE is not defined
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-
177 - man2html: add LDFLAGS_FOR_BUILD to the recipe. Report from
178 Jeffrey Walton <noloader@gmail.com>
183 - rl_operate_and_get_next: fix old K&R function declaration. Report
184 from Tom Tromey <tom@tromey.com>
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
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>
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>
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>
214 - Rewrote to reduce complexity. Still needs some work.
216 lib/readline/*.h, lib/tilde/tilde.h
217 - PARAMS: remove, rely on compilers understanding function prototypes
219 lib/readline/{undo.c,histlib.h}
220 - _hs_replace_history_data: move extern declaration to histlib.h
222 lib/readline/readline.c
223 - _rl_parse_colors: instead of an extern declaration for this, include
224 "parse-colors.h" for it
226 lib/readline/{histfile.c,histlib.h}
227 - _hs_append_history_line: move extern declaration to histlib.h
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
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
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
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>
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>
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>
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
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
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
299 - dequote_pathname: fix function definition for non-multibyte systems.
300 Report and fix from Marc Aurèle La France <tsi@tuyoix.net>
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>
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>
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>
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
321 - HELPDIR: now ${datadir}/bash/helpfiles
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>
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>
345 - array_pop: instead of calling array_dispose_element from this macro,
346 just call array_shift with the AS_DISPOSE flag
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>
357 - ARRAY_ELEMENT_REPLACE: convenience define for modifying an array
361 - pop_args: a couple of code simplifications
366 - pagesz: at least MALLOC_PAGESIZE_MIN (4096) bytes
367 - union mhead: now 16-byte aligned on all systems, 32-bit and 64-bit
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
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
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
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
402 Makefile.in,builtins/Makefile.in
403 - fix up dependencies, especially on builtins.h and builtext.h
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>
412 lib/readline/isearch.c
413 - _rl_search_getchar: only call _rl_read_mbstring if rl_read_key returns
414 >= 0, avoid some work
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
425 - _rl_overwrite_char: return 1 if _rl_read_mbstring returns < 0 so
426 we don't try to insert garbage
429 - posix_edit_macros: handle rl_read_key() returning <= 0
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
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>
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
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
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>
485 - replaced a number of uses of @var with a mixture of @env and @dfn
486 to better match up with the texinfo standards
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
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
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
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
518 - darwin: take out the -arch-only option in SHOBJ_XLDFLAGS and
519 SHOBJ_ARCHFLAGS; no longer needed
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
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
535 - SHTIMER_ALRMSET: new flag, indicates that there is an active alarm
536 associated with this timer (falarm() was called)
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
546 - added some BSD convenience defines if they are not present
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
556 - extern declarations for moving to timers (sh_timer) for read builtin
560 - CHECK_ALRM: remove, no longer used
563 - check_signals: call check_read_timeout instead of CHECK_ALRM
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)
571 - zread: call read_builtin_timeout() to check for a timeout before
572 calling a blocking read()
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
581 - edit_line: simulate receiving SIGALRM if readline times out (not
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>
595 lib/readline/readline.h
596 - extern declarations for new timeout functions and hook
597 - rl_clear_timeout: new define
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()
605 - _rl_abort_internal: if we time out, don't ring the bell; let the
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
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
629 lib/readline/parens.c
630 - rl_insert_close: use _rl_timeout_select to take timeouts into account
632 lib/readline/rlprivate.h
633 - extern declarations for readline-library-private timeout functions
636 - rl_deprep_terminal: don't print a newline after the bracketed paste
637 disable sequence if we timed out
639 lib/readline/signals.c
640 - _rl_handle_signal: if sig is SIGALRM, call _rl_timeout_handle_sigalrm()
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
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
656 - expand_string_dollar_quote: new function, expands $'...' and $"..."
657 in a string for those code paths that don't expand it themselves
660 - expand_string_dollar_quote: extern declaration
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
668 - make_here_document: account for read_secondary_line returning newly
669 allocated memory, free `full_line' appropriately
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
680 - expand_string_dollar_quote: fix out-of-order initialization
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>
689 - xparse_dolparen: don't longjmp if FLAGS includes SX_NOLONGJMP. From
690 a report by Xu Lu <oliver_lew@outlook.com>
695 - process_substitute: set startup_state and parse_and_execute_level
696 to see if we can avoid a fork()
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
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
711 doc/bash.1,lib/readline/doc/rluser.texi
712 - spell-correct-word: document new function and its default binding
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
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>
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>
742 - HAVE_MKDTEMP: fix typo
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>
755 - expand the node describing $"..." string translation with additional
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
765 - rl_fetch_history: in vi mode, an out-of-range argument rings the
766 bell and doesn't change the line
769 - rl_vi_fetch_history: call rl_fetch_history
772 - rl_fetch_history: new extern declaration
774 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
775 - rl_fetch_history: add description
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
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.
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
800 - unbind_array_element: use VA_NOEXPAND instead of literal 1
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>
812 - DEFAULT_LOADABLE_BUILTINS_PATH: default value for BASH_LOADABLES_PATH
814 doc/{bash.1,bashref.texi}
815 - enable: note that it uses $BASH_LOADABLES_PATH, and that the default
819 - initialize_shell_variables: initialize BASH_LOADABLES_PATH to the
820 default given in DEFAULT_LOADABLE_BUILTINS_PATH
824 doc/{bash.1,bashref.texi}
825 - add link to git master tar file as a place to get the current version
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>
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>
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>
851 - assign_assoc_from_kvlist: fix memory leak reported by konsolebox
852 <konsolebox@gmail.com>
857 - W_ITILDE: remove, replace with a variable since it's only used inside
858 a single call to expand_word_internal
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)
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>
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
882 - ASS_ALLOWALLSUB: new assignment flag value, means to allow @ and * as
883 valid array subscripts when assigning to existing associative arrays
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
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
897 - do_assignment_internal: allow a[@]=value to an existing associative
898 array by passing ASS_ALLOWALLSUB to assign_array_element
903 - builtin_bind_var_to_int: wrapper for bind_var_to_int to be used by
904 builtin commands; placeholder for future work
907 - builtin_bind_var_to_int: use instead of bind_var_to_int
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
914 builtins/variables.[ch]
915 - bind_var_to_int: add third `flags' argument to pass to bind_variable
916 instead of always passing 0
918 redir.c,builtins/common.c,builtins/printf.def
919 - bind_var_to_int: change callers, add third flags argument
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[*]
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>
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
942 doc/bash.1,lib/readline/doc/{readline.3,rltech.texi}
943 - enable-active-region: document new bindable readline variable and
949 - W_ARRAYREF: new flag, meaning the word is a valid array reference
950 with subscript, replaces W_DOLLARSTAR, which was unused
953 - expand_subscript_string,expand_array_subscript: new functions to
954 parse and expand-and-quote array subscripts. For future use
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>
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
975 - mapfile: call zsyncfd before calling the callback. Suggested by
976 Koichi Murase <myoga.murase@gmail.com>; we'll see how it goes
981 - expand_subscript_string: extern declaration
984 - expand_subscript_string: replace expand_assignment_string_to_string
985 with calls to this when expanding array subscripts
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
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
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
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
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
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
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
1042 - ARRAYREF_BUILTIN: new flag for shell builtins, means that the builtin
1043 can take array references, with subscripts, as arguments
1045 builtins/mkbuiltins.c
1046 - set ARRAYREF_BUILTIN flag on builtins given in the arrayvar_builtins
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)
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
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
1072 - expand_once_flag: extern declaration
1076 doc/{bash.1,bashref.texi}
1077 - note that case patterns undergo quote removal. Reported by
1078 AlvinSeville7cf <alvinseville7cf@gmail.com>
1083 builtins/bashgetopt.c
1084 - list_optflags: flags associated with the word corresponding to
1085 list_optarg, assuming list_optarg is a separate argument
1087 builtins/bashgetopt.h
1088 - list_optflags: extern declaration
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
1097 - unary_test: in the -v case, use assoc_expand_once in the first call
1098 to valid_array_reference ()
1101 - printf_builtin: only set VA_ONEWORD if the option argument to -v has
1102 W_ARRAYREF set (look at list_optflags)
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
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
1118 - AV_ATSTARKEYS: new flag value, means to accept a[@] and a[*] but
1119 treat them as keys/expressions and not special values
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
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
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>
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] ]]'
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>
1157 - wait_sigint_cleanup: restore the old sigint handler before we longjmp
1158 out by calling restore_sigint_handler()
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
1170 - builtin_bind_variable: set vflags (for valid_array_reference) and
1171 bindflags (for bind_variable/assign_array_element) separately for
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
1182 - printf_builtin: if LIST_OPTFLAGS includes W_ARRAYREF, set VA_NOEXPAND
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
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.
1201 lib/readline/readline.h
1202 - rl_trim_arg_from_keyseq: extern declaration
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>
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
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
1225 doc/{bash.1,bashref.texi}
1226 - READLINE_ARGUMENT: documented new variable available for commands
1227 defined using `bind -x' keybindings
1229 lib/readline/doc/rltech.texi
1230 - rl_trim_arg_from_keyseq: documented new function
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>
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
1251 - CHECK_FOR_RESERVED_WORD: if we are returning an ESAC and unsetting
1252 PST_CASESTMT, decrement esacs_needed_count
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
1260 - print_simple_command: don't bother to call command_print_word_list
1262 - print_simple_command: don't print a space before a redirection list
1263 if there weren't any command words to print
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>
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
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>
1288 - replace most of the GNU parallel section with a reference to the
1292 - GX_NEGATE: new flag; indicates whether the pattern is being negated
1293 as part of an extglob pattern. Not used yet
1296 - extglob_skipname,wextglob_skipname: pass GX_NEGATE to the skipname
1297 functions if the pattern is being negated. Not checked yet
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
1308 - skipname,wskipname: perform the special checks for `.' only if the
1309 pattern is not being negated
1314 - eol_ungetc_lookahead: save and restore as part of the parser state
1315 included in {save,restore}_parser_state
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
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
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>
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
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)
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 `..'
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
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
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>
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>
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
1384 - unset_builtin: call builtin_arrayref_flags to set vflags
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
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
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
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
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
1438 - varredir_close: new shell option, mirrors the value of
1439 varassign_redir_autoclose. Suggested multiple times by multiple
1442 doc/{bash.1,bashref.texi}
1443 - varredir_close: document new shell option (the name is tentative)
1449 - yylex: if read_token returns a value < 0, return YYerror to the
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>
1457 - PST_NOERROR: don't print error messages in yyerror(), just reset
1458 the parser and return
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>
1468 - skip_matched_pair: make sure to pass the SX_COMPLETE flag to
1469 extract_delimited_string
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>
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>
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>
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>
1503 - substitute BASE_CFLAGS_FOR_BUILD and STYLE_CFLAGS into Makefile
1505 - take STYLE_CFLAGS out of the CFLAGS_FOR_BUILD variable that gets
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=
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
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
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
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>
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
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/
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
1558 builtins/{enable,hash,help}.def
1559 - enable_builtin: use sh_chkwrite after output to check for write errors
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>
1569 - bash_remove_history_range: free DISCARD_LIST after freeing its
1573 - bash_directory_expansion: add code to free D as a separate branch,
1574 though it's never hit in practice
1577 - showtrap: free T even if show_default == 1 if it's a non-default
1583 - execute_coproc: free NAME on invalid identifier error
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
1592 - indirection_level_string: make sure we free PS4 after calling
1593 decode_prompt_string if *ps4 == 0
1596 - parameter_brace_transform: if vtype == VT_VARIABLE, we need to free
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>
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>
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
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
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
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>
1642 doc/{bash.1,bashref.texi}
1643 - enable: document new behavior of `enable NAME' when NAME is not a
1644 current shell builtin
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
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
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>
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.
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)
1686 - noexpand_translation: new option to expose the value of
1687 SINGLEQUOTE_TRANSLATIONS
1691 doc/{bash.1,bashref.texi}
1692 - noexpand_translation: add description of new option
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>
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>
1709 - include command.h before general.h for PARAMS and prototypes. Report
1710 from Osipov, Michael (LDA IT PLM) <michael.osipov@siemens.com>
1714 lib/readline/colors.c
1715 - S_ISBLK: make sure it's defined before we use it, like in complete.c
1717 lib/readline/complete.c,{bashline,variables}.c
1718 - minor changes to prep for making rl_completer_word_break_characters
1721 subst.[ch],pcomplete.c
1722 - split_at_delims: the DELIMS argument is now `const'; change callers
1724 lib/readline/rlmbutil.h
1725 - _rl_wcwidth: add function prototype for inline function declaration
1728 - _rl_get_keyname: print keys greater than 160 (which are valid UTF-8)
1729 as octal escape sequences
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
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
1745 - orig_rl_completer_word_break_characters: now const char * like
1746 rl_completer_word_break_characters
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
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
1761 - assoc_to_kvpair_list: new function, returns a WORD_LIST containing
1762 key-value pairs as separate words
1765 - array_to_kvpair_list: new function, returns a WORD_LIST containing
1766 index-value pairs as separate words
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
1776 doc/{bash.1,bashref.texi}
1777 - document new '@k' parameter transformation operator
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
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
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
1799 - open_redir_file: extern declaration here for now
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
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
1814 - parse_string_to_command: extern declaration
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
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.
1832 configure.ac,config.h.in,lib/sh/setlinebuf.c
1833 - SETVBUF_REVERSED: remove all references
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
1846 - stddef.h: include if HAVE_STDDEF_H is defined, not STDC_HEADERS
1849 - memory.h: don't include any more; assume <string.h> has all the
1853 - AC_HEADER_STDC: remove AC_REQUIRE calls to this; change tests to use
1854 appropriate checks instead of STDC_HEADERS
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
1869 sig.h,lib/readline/signals.c
1870 - RETSIGTYPE -> void, SIGHANDLER_RETURN -> return
1873 - don't bother with TIME_WITH_SYS_TIME, just include <sys/times.h> if
1874 we have it and include <time.h> unconditionally
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
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
1886 lib/readline/chardefs.h,util.c
1887 - ALPHABETIC -> _rl_alphabetic_p
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>
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>
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
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
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
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
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,
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
1953 [prayers for the victims of 9/11/2001]
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
1986 - BASH_SIZEOF_RLIMIT,BASH_SIZEOF_QUAD_T: helper macros for
1987 BASH_TYPE_RLIMIT in the case that rlim_t is not present
1990 - BASH_CHECK_DECL -> AC_CHECK_DECLS
1991 - quad_t: use AC_CHECK_TYPE (new style) instead of BASH_CHECK_TYPE
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
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
2013 - EXITBLTIN: new longjmp `code' value: used by the exit builtin
2015 {execute_cmd,shell,subst,trap}.c,builtins/evalstring.c
2016 - treat EXITBLTIN exactly the same as EXITPROG (for now)
2019 - exit_builtin: jump_to_top_level with value EXITBLTIN
2021 builtins/evalstring.c
2022 - parse_and_execute: EXITBLTIN has its own case, with the same contents
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.)
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
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
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
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
2078 - array_from_argv: new convenience function
2081 - num_elements: now an arrayind_t, since that's the type of indices, it
2082 makes sense to allow that many elements
2086 lib/readline/terminal.c
2087 - rl_term_kP: fix typo. Fix from Koichi Murase <myoga.murase@gmail.com>
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
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
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
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
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
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
2146 - should_suppress_fork: remove #if 1 for code that tries to suppress
2147 the fork in a process substitution subshell
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>
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>
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
2171 - shouldexp_replacement: uncommented
2172 - pat_subst: we expand & in the replacement string if MATCH_EXPREP
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
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
2189 - include <malloc/shmalloc.h> if we're debugging malloc (MALLOC_DEBUG)
2190 so we can get an extern declaration of trace_malloc_stats
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>
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>
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>
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>
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
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.
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>
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>
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>
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>
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>
2289 - strcreplace: allow backslash to escape a backslash, since we allow it
2295 - COMPLETE_HASH_BUCKETS: double to 512
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)
2303 - pat_subst: call strcreplace with 2 as the flags value
2308 - updates to Installation section
2310 doc/{mkposix,mkinst,mkrbash},doc/Makefile.in
2311 - changes to allow scripts to be run outside the source directory
2316 - patsub_replacement: controls whether pattern substitution expands `&'
2317 in the replacement string. Initialized to 1 by default
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
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.
2334 doc/{bash.1,bashref.texi}
2335 - patsub_replacement: document new shopt option
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.
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>
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>
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>
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>
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
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>
2386 - tokenize_array_reference: extern declaration
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
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
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>
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
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
2427 - BASH_FUNC_POSIX_SETJMP: if cross-compiling, default to `present' if
2428 we've determined we have posix signal functions
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>
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
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
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
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>
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
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
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
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)
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
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
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>
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
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
2534 examples/loadables/getconf.[ch]
2535 - getconf: new implementation of loadable builtin, based on glibc
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
2549 - wait_builtin: refer to unset_waitlist only if JOB_CONTROL is enabled.
2550 Report from Joel Ebel <jbebel@google.com>
2552 parse.y,builtins/set.def
2553 - changes for minimal config restrictions
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
2561 - main: don't include any of the dump-strings options if
2562 TRANSLATABLE_STRINGS is not defined
2565 - sh_backslash_quote_for_double_quotes: needed for translatable strings
2568 - support for translating $"..." strings now conditional on
2569 TRANSLATABLE_STRINGS
2572 - locale_expand: now conditional on TRANSLATABLE_STRINGS
2575 - expand_string_dollar_quote: support for $"..." now conditional on
2576 TRANSLATABLE_STRINGS
2579 - --enable-translatable-strings: document new configuration option
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)
2593 - test_unop: if the shell compatibility level is > 51, using [@] with
2594 an existing associative array will report on a key of `@'
2597 - array_expand_index: if the compatibility level is > 51, Q_ARITH is
2598 used and we don't pass EXP_EXPANDED to evalexp()
2600 COMPAT,doc/bashref.texi
2601 - shell compatibility mode: document effects of setting the
2602 compatibility mode to 51
2607 - mremap: only use if MREMAP_MAYMOVE is defined, since we use the Linux
2608 version of the function signature
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>
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
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
2633 - assign_random: store the value assigned as the variable value so
2634 things like RANDOM=42; RANDOM+=7 generate consistent sequences
2636 - assign_seconds: store the value assigned as the variable value so
2637 things like SECONDS=42 ; SECONDS+=7 generate what's expected
2640 - changes to allow man pages that include others (.so FN) to be built
2641 outside the source tree
2646 - assign_array_element_internal: take an additional argument: char **NVALP.
2647 If non-null, it gets the value eventually assigned to the array
2649 - assign_array_element: take an additional NVALP argument; pass it to
2650 assign_array_element_internal
2653 - assign_array_element: new extern function declaration
2655 {subst,variables}.c,builtins/{common.c,declare.def}
2656 - assign_array_element: change callers
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
2668 - array_eltstate_t: an object that encapsulates an array element's
2669 state (type, index, key, value) whether it's an indexed or
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
2680 - assign_array_element: take array_eltstate_t * as final argument
2681 instead of a char **; pass it to assign_array_element_internal
2683 {subst,variables}.c,builtins/{common.c,declare.def}
2684 - assign_array_element: change callers to modify final argument
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'
2695 - get_arrary_value: changed to take array_eltstate_t as third argument,
2696 passes it to array_value_internal
2699 - get_array_value: changed callers; initializing the array_eltstate_t
2700 argument as necessary
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)
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
2716 - array_value: changed function signature
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
2725 - assign_lineno: call set_int_value to store the value, like with
2726 RANDOM and SECONDS (from 12/10)
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>
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>
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
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
2766 - internal_warning: calls changed to use translatable strings
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
2776 - changed some internal_warning and internal_inform calls to use
2777 internal_debug, since they were active only when DEBUG is defined
2780 - parse_comsub: add internal_debug call when a command substitution
2781 ends with unterminated here-documents
2784 - number_of_args: unconditionally return posparam_count
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
2793 - glob_always_skip_dot_and_dotdot: initialize to 1 (enabled)
2796 - globskipdots: new shell option, exposes glob_always_skip_dot_and_dotdot
2798 doc/{bash.1,bashref.texi}
2799 - globskipdots: document new shell option
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
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
2815 work because the unset builtin sees the W_ARRAYREF flag on its
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)
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
2833 - array_value_internal: now just passes flags straight through to
2834 array_variable_part (which sends them to array_variable_name)
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
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
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
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
2858 - expr_streval: just pass TFLAG (AV_xxx flags) straight through to
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
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>
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>
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
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)
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>
2915 - bumped version to 5.2-alpha.
2920 tests/{unicode1,glob2,intl2}.sub, tests/run-intl
2921 - minor changes to add warnings for missing locales that cause test
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>
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
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
2956 - add a description of `cd -' to the help text. Suggested by
2957 Rob Landley <rob@landley.net>
2962 - glob_vector: if we allocate NEXTLINK using malloc, and free it due to
2963 some allocation failure, reset FIRSTMALLOC to avoid duplicate frees
2967 - sub_append_string: the INDX parameter is now a size_t to avoid
2971 - decode_prompt_string: RESULT_INDEX is now a size_t to pass to
2975 - wait_for_background_pids: now returns the number of jobs/processes
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>
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>
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)
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
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
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
3027 - extract_heredoc_dolbrace_string: add logic to align with parse.y:
3028 parse_matched_pair and its $'...' expansion, including handling
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
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
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
3053 builtins/common.h,builtins/evalstring.c
3054 - optimize_fork: renamed to optimize_connection_fork; changed callers
3059 - COPY_CHAR_I,SCOPY_CHAR_I: add check for locale_utf8locale and
3060 (c & 0x80) as in other macros
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
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
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
3087 - bash posix mode: add description of alias expansion and command
3088 substitution parsing and execution
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
3100 doc/{bash.1,bashref.texi}
3101 - minor typo fixes from Helge Kreutzmann <debian@helgefjell.de>
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.
3112 - mk_env_string: third argument is now the variable's attributes or 0,
3113 with all the attributes we can export arrays
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
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
3128 lib/readline/{readline.c,rlprivate.h}
3129 - declarations for _rl_active_region_start_color and
3130 _rl_active_region_end_color
3135 - initialize_readline: add bindable name `vi-edit-and-execute-command'
3138 - subshell_exit: make sure to set last_command_exit_value before
3139 calling the exit trap. Fixes bug reported by Greg Edwards
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
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
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
3161 - sv_region_{start,end}_color: call _rl_reset_region_color with the
3162 appropriate value for WHICH
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
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
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>
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
3194 lib/readline/rlprivate.h
3195 - _rl_history_search_pos: extern declaration
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>
3205 - _rl_start_using_history: initialize _rl_history_search_pos to
3206 something invalid so it doesn't match where_history()
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)
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
3225 lib/readline/rprivate.h
3226 - _rl_eof_found: renamed to rl_eof_found, so not declared here
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
3234 lib/readline/{callback,readline,rltty}.c
3235 - rl_eof_found: new name for _rl_eof_found
3237 lib/readline/doc/rltech.texi
3238 - RL_STATE_EOF: document
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>
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
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
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>
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
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
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
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>
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>
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
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)
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
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>
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
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
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
3380 - xmalloc.h: include for systems without setlocale(), so xfree has a
3381 prototype. Report and fix from András Kucsma <r0maikx02b@gmail.com>
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
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
3393 lib/readline/readline.c
3394 - _rl_executing_func: the currently-executing readline command function
3396 lib/readline/rlprivate.h
3397 - _rl_executing_func: extern declaration
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())
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>
3424 - array_value_internal: fix typo and set estatep->type to ARRAY_INDEXED
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
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>
3444 lib/readline/{complete,histfile,histsearch,isearch,terminal}.c
3445 - xfree: use instead of free
3450 - bumped version to bash-5.2-beta
3452 [bash-5.2-beta frozen]
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
3460 examples/loadables/seq.c
3461 - PRIdMAX: redefine if PRI_MACROS_BROKEN is defined.
3462 From https://savannah.gnu.org/support/index.php?110635
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
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>
3482 - bzero: update function signature to modern BSD version
3487 - bcopy, gethostname, mkfifo: update function signatures to modern
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
3498 - execute_pipeline: if wait_for_single_pid returns > 256, set it to
3499 127 (invalid process)
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)
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>
3519 - xparse_dolparen: if (flags & SX_NOLONGJMP), don't call
3520 jump_to_top_level() on errors
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>
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>
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
3540 lib/malloc/imalloc.h
3541 - USE_LESSCORE: define
3544 - token_buffer_size and its corresponding saved value in the shell's
3545 parser state are now size_t instead of int
3548 - strsub,strcreplace: use size_t instead of int for local length and
3552 - zmapfd: use size_t instead of int for local length and indexing
3556 - zgetline: use size_t instead of int for local length and indexing
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>
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>
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
3592 - sh_charvis: changes to handle being compiled without multibyte support
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>
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>
3606 examples/loadables/Makefile.inc.in
3607 - remove rules that create the example shared object
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>
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>
3624 doc/{bash.1,bashref.texi}
3625 - suspend: updated description to include expanded -f behavior
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
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
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
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
3655 - builtin_find_indexed_array: extern declaration
3657 builtins/{mapfile,read}.def
3658 - change callers to use builtin_find_indexed_array
3661 - unbind_global_variable, unbind_global_variable_noref: new functions
3662 that remove variables from the global_variables table
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>
3670 doc/{bash.1,bashref.texi}
3671 - BASH_REMATCH: add caveat about making it a local variable
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>
3687 - bumped version to bash-5.2-rc1
3689 [bash-5.2-rc1 released]
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>
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
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>
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
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>
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>.
3739 - execute_connection: treat a connector of '\n' the same as ';'
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
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>
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>
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
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>
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>
3784 - bumped version to bash-5.2-rc2
3789 - set_job_control: don't bother calling tcgetpgrp if shell_tty < 0,
3790 since it will just fail
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
3799 - reset_local_contexts: extern declaration
3801 builtins/evalstring.c
3802 - parse_and_execute: call reset_local_contexts instead of setting
3803 variable_context to 0
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>
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>
3822 [bash-5.2-rc2 frozen]
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
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)
3850 [bump version to bash-5.2-rc3]
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>
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
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.
3882 lib/readline/rlprivate.h
3883 - _rl_reset_locale: extern declaration
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>
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.
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>
3906 [bash-5.2-rc3 frozen]
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
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.
3932 - parameter_brace_transform: make sure we return an error if *xform
3933 is '\0'. Report from Ivan Kapranov <koltiradw@yandex.ru>
3937 [bump version to bash-5.2-rc4]
3941 [bash-5.2-rc4 frozen]
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
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
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>
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>
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>
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>
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>
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
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>
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>
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>
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
4030 lib/readline/{input.c,rlprivate.h}
4031 - fixes for compiling on w64-mingw32
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>
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>
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
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
4062 - execute_cond_node: reset extended_glob to the value of extglob_flag,
4063 since we're executing a command here
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>
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>
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>
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>
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
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
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>
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
4119 - pat_subst: make sure REP is non-NULL before calling savestring on it.
4120 Report from Justin Wood (Callek) <callek@gmail.com>
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
4130 shell.c,execute_cmd.c,general.c
4131 - expand_aliases: make sure expand_aliases and expalias_flag always
4135 - PST_STRING: new parser flag, set when parsing a string to a command
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
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
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
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
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
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
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
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
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>
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
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>
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
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
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>
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>
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>
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
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>
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>
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
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
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
4297 - rl_digit_argument: call _rl_del_executing_keyseq after rl_execute_next
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>.
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
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
4319 - trap_variable_context: extern declaration
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
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
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
4355 - change some error messages to make it clearer these are arithmetic
4356 syntax errors. These will require new translations.
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
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
4374 builtins/reserved.def
4375 - !: add short help text
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
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
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
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>
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
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
4423 lib/sh/input_avail.c
4424 - include signal.h unconditionally, we need it for HAVE_SELECT and
4426 - nchars_avail: make sure we declare and use readfds and exceptfds if
4427 we have pselect or select available
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>
4438 - quit.h: include unconditionally for declaration of sigemptyset even
4439 if HAVE_SELECT is not defined
4442 - USEC_PER_SEC: make sure it's defined even if HAVE_SELECT is not
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
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
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
4477 - Reporting Bugs: add mention of the Savannah project page. Suggested
4478 by Loïc Yhuel <loic.yhuel@gmail.com>
4483 - SEVAL_NOOPTIMIZE: new flag for parse_and_execute: means don't try to
4484 optimize forks out of any simple or conditional commands
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
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>
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
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>
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
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>
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>
4527 lib/readline/complete.c
4528 - __WIN32__: remove uses of this preprocessor symbol, use _WIN32
4530 lib/readline/rldefs.h
4531 - Don't define NEW_TTY_DRIVER on _WIN32. Fix from
4532 sparrowhawk996@gmail.com
4534 include/posixselect.h
4535 - include "posixtime.h" instead of <sys/time.h> so the right guards
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
4543 - restrict: make sure we have a definition if __STDC__ is not defined
4545 include/posixtime.h,lib/sh/gettimeofday.c
4546 - gettimeofday: make sure the function signature matches POSIX by
4551 include/posixselect.h
4552 - don't try to define HAVE_SELECT at all if _WIN32 is defined
4555 - define WIN32_LEAN_AND_MEAN for the windows-specific paste function
4557 lib/readline/rlprivate.h
4558 - _rl_timeout_select: only include declaration if HAVE_SELECT or
4559 HAVE_PSELECT are defined
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
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>
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
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>
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>
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>
4618 lib/glob/{glob,gmisc}.c
4619 - PATSCAN: change all callers to add extra flags arg of 0
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
4628 - trap: add missing command types to the description of when the
4629 DEBUG trap is executed
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
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
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
4665 - add "LOCAL_LDFLAGS = -rdynamic" for freebsd/openbsd/netbsd. Reported
4666 by Christian Weisgerber <naddy@mips.inka.de>
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
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>
4686 - execute_cond_node: if a regular expression fails to compile, print
4687 an error message. Report from Emanuele Torre <torreemanuele6@gmail.com>
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>
4697 - get_exitstat: compare trap_return_context against funcnest+sourcenest,
4698 since that's how it's initialized now
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>
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
4713 - builtin_status: translate EX_UTILERROR to EXECUTION_FAILURE
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
4723 - de_backslash: now takes a second argument with the current quoting
4725 - de_backslash: if the quoting flags include Q_HERE_DOCUMENT and the
4726 shell is in posix mode, remove backslashes quoting double quotes
4729 - de_backslash: update extern declaration
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
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
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')
4749 o missing perm characters Xst in action string
4750 o default `who' equivalent to `a' instead of fixing up later
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>
4759 doc/{bash.1,bashref.texi}
4760 - type: update description to fix it to what the code actually does
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>
4770 - array_concat: add a check for interrupts and terminating signals
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>
4780 include/{posixtime.h,systimes.h,shmbutil.h,shtty.h}
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>
4790 lib/sh/gettimeofday.c
4791 - gettimeofday: added code for _WIN32 version
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>
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
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
4817 lib/malloc/{watch,table,shmalloc,mstats,imalloc}.h
4818 lib/malloc/{malloc,stats,table,trace}.c
4819 - PARAMS: remove for ANSI C-ification
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
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
4830 - internal_function -> inline
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
4835 support/{bashversion.c,mkversion.sh,mksignames.c}
4836 - PARAMS: remove for ANSI C-ification
4838 lib/sh/{clock,strchrnul,getcwd,times,rename,inet_aton,strdup,strerror,strnlen
4839 strpbrk,strtod,strtoimax,strtol,strtoumax,wcsdup,wcsnwidth,wcswidth,strcasecmp,
4841 - C89-style function declarations
4843 lib/malloc/{alloca,malloc,stats,table,trace,xmalloc}.c
4844 - C89-style function declarations
4848 lib/glob/{glob,glob_loop,gmisc,sm_loop,smatch,strmatch,xmbsrtowcs}.c
4849 - C89-style function declarations
4851 lib/sh/{zcatfd,zgetline,zmapfd,zread,zwrite,winsize,vprint,uconvert,ufuncs,
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
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
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
4874 hashlib.c,assoc.c,input.c,hashcmd.c,alias.c,alias.h,array.c,flags.c,pcomplib.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,
4879 - PARAMS: remove for ANSI C-ification
4880 - C89-style function declarations
4881 - add `const' and `inline' where it makes sense
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
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
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'
4913 - more `const' changes, remove `register'
4916 - VARLIST: list_len and list_size now size_t
4919 - vlist_alloc: take size_t parameter, changed callers
4920 - vlist_realloc: take size_t parameter, changed callers
4922 lib/sh/stringvec.c,externs.h
4923 - functions that take int size params now take size_t
4924 - strvec_len: returns size_t
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
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
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
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
4956 - remove some unused variables
4962 - sh_getopt_restore_state: make sure argv[sh_curopt] is non-null before
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
4971 - ubsan: new target, to build with gcc/clang UBSan undefined behavior
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}
4981 lib/readline/{vi_mode.c,histfile.c,funmap.c,complete.c,display.c,bind.c,isearch.c}
4983 - final code cleanups for ANSI C and lint/ubsan/asan runs
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>
4996 - get_buffered_stream(fd): new function, return the BUFFERED_STREAM *
4997 corresponding to file descriptor FD, if it exists
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.
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>
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
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>
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
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
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
5047 - set_signal_async_ignored,signal_is_async_ignored: extern declarations
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
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
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
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
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>
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>
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>
5110 lib/readline/doc/{history.3,hstech.texi}
5111 - history_expansion: change description to note new const first arg
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
5121 lib/readline/rl_private.h
5122 - move the decision making about RL_TIMEOUT_USE_SELECT/RL_TIMEOUT_USE_SIGALRM
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
5134 - do_assignment_internal: don't allocate new memory for NAME, just
5135 modify and restore it in place
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
5148 - valid_function_name: new function, returns non-zero if the name
5149 can be used as a function name without the `function' prefix
5152 - named_function_string,print_function_def: use valid_function_name so
5153 the rules about when to use the `function' reserved word are
5157 - new option -P, which prints only the action associated with each
5158 signal spec argument
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
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
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
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
5186 - read_token: turn off PST_CMDBLTIN state as appropriate
5189 - use locale_mb_cur_max instead of MB_CUR_MAX consistently
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
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
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>
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
5233 - execute_simple_command: if in posix mode, don't perform function
5234 lookup for command names that contain a slash
5237 - dyn_load_builtins: don't allow dynamically loaded builtins to have
5238 slashes in their name
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
5251 - execute_intern_function: call valid_function_word() instead of
5252 check_identifier(); remove check for special builtin that
5253 valid_function_word performs
5256 - print_function_def,named_function_string: pass POSIXLY_CORRECT to
5257 valid_function_name as the FLAGS argument
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
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
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
5284 - bclearerror: new macro, clears the B_ERROR flag in the buffered
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
5293 - fc_builtin: in posix mode, if there are extra arguments supplied to
5294 -s (e.g. pat=rep first last), throw an error
5296 doc/{bash.1,bashref.texi}
5297 - printf: document new altform for %q/%Q and %ls/%lc
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>
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>
5317 - bind_lastarg: now a public function
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>
5332 - set_up_new_line: add some more heuristics to try and usefully
5337 lib/readline/complete.c
5338 - complete_fncmp: fix for case mapping `-' and `_' if the bytes do not
5339 form a valid multibyte character
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>
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>
5352 lib/readline/{rlprivate.h,rlmbutil.h}
5353 - extern declarations for the above functions
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>
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
5365 - search-ignore-case: new bindable variable, tied to _rl_search_case_fold
5366 Inspired by a patch from Brennan Vincent <brennan@umanwizard.com>
5369 - mbsncmp(3) replacement
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>
5376 lib/readline/histlib.h
5377 - CASEFOLD_SEARCH: new flag for history searching, means to search
5378 strings case-insensitively
5380 lib/readline/histsearch.c
5381 - history_search_internal: anchored searches honor CASEFOLD_SEARCH
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
5389 lib/readline/histlib.h
5390 - _hs_history_search: extern declaration
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
5396 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
5397 - search-ignore-case: document new bindable variable
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
5407 - reset_shopt_options: reset patsub_replacement to PATSUB_REPLACE_DEFAULT
5410 - patsub_replacement: initialize to PATSUB_REPLACE_DEFAULT
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
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
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
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>
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>
5448 - wait_for: check for window size changes during programmable completion
5452 execute_cmd.c,input.c,jobs.c,nojobs.c,parse.y,redir.c,shell.c
5453 builtins/{exec.def,read.def}
5455 - BUFFERED_INPUT: preprocessor #define is gone, this code is now
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
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
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
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
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>
5494 - assign_assoc_from_kvlist: added code, currently disabled, to perform
5495 all expansions, including word splitting, on the kv-pair word list
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>
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
5512 lib/readline/histlib.h
5513 - _hs_search_history_data: extern declaration
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)
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>
5527 - changes for size_t when computing new amount for xrealloc
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>
5538 examples/loadables/kv.c
5539 - kv: new loadable builtin, reads key-value pairs from stdin and assigns
5540 them to an associative array
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
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
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.
5569 - strip_trailing_ifs_whitespace: use ifs_whitespace(*s) instead of
5570 spctabnl(*s) like word splitting and get_word_from_string. POSIX
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
5582 - fd_berror: returns true if the file descriptor passed as an arg
5583 corresponds to a buffered stream with an error condition
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.
5593 - FATAL_READERROR: now defined to 1 by default
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>
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>
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
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.
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>
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>
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>
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>
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>
5648 - bash_spell_correct_shellword: don't bother trying to correct empty
5649 words. Fixes asan bug reported by Grisha Levit <grishalevit@gmail.com>
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>
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>
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>
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
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
5685 - path_value: extern declaration
5688 - command_word_completion_function: use path_value()
5691 - dyn_load_builtin: use path_value for BASH_LOADABLES_PATH; it's cleaner
5692 though it doesn't change the behavior
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>
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()
5713 Fixes underflow reported by Grisha Levit <grishalevit@gmail.com>
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>
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>
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>
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)
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
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>
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>
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>
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>
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>
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
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>
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>
5796 examples/loadables/stat.c
5799 examples/loadables/strftime.c
5800 - strftime_builtin: ditto
5802 lib/readline/examples/histexamp.c
5806 - getnow(): new inline function, calls gettimeofday and returns tv_sec;
5807 replacement for time(0). From Paul Eggert <eggert@cs.ucla.edu>
5810 - NOW: use a call to getnow() to standardize on gettimeofday for time
5813 lib/readline/history.c
5814 - include #posixtime.h for getnow()
5815 - hist_inittime: use getnow() instead of calling time(0)
5818 - posixtime.h: include instead of <time.h>
5819 - decode_prompt_string: use getnow() instead of calling time(0)
5824 - count_all_jobs: add extern definition if JOB_CONTROL is not defined.
5825 From Emanuele Torre <torreemanuele6@gmail.com>
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>
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>
5838 - hostnames_matching: fix size_t issue when checking whether to realloc
5839 From a report by Grisha Levit <grishalevit@gmail.com>
5842 - genseed: use uintptr_t instead of u_bits32_t to silence compiler
5843 warnings. From Paul Eggert <eggert@cs.ucla.edu>
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
5854 - some cleanups for function prototypes and other stdc requirements
5855 From Paul Eggert <eggert@cs.ucla.edu>
5857 lib/readline/doc/{rltech.texi,hstech.texi}
5858 - add prototypes and stdc requirements to the examples
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
5864 From a report by Grisha Levit <grishalevit@gmail.com>
5869 builtins/enable.def,builtins/gen-helpfiles.c,builtins/help.def,builtins/printf.def
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
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>
5884 - prototype the list functions that take GENERIC_LIST *
5885 From Paul Eggert <eggert@cs.ucla.edu>
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>
5895 aclocal.m4,configure.ac
5896 builtins/common.c,builtins/mkbuiltins.c,builtins/printf.def
5897 include/memalloc.h,include/stdc.h
5899 pcomplete.c,print_cmd.c
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>
5915 - PREFER_STDARG: remove
5917 builtins/mkbuiltins.c
5918 execute_cmd.c,unwind_prot.c
5920 - start on ANSI/ISO C changes for the unwind-protect framework
5921 - introduce new unwind-protect function pointer type to replace
5923 From Paul Eggert <eggert@cs.ucla.edu>
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>
5938 - STREQ, STREQN: now static inline functions to take advantage of arg
5942 lib/readline/histexpand.c,lib/readline/mbutil.c
5943 - fix size_t subtractions in comparisons to avoid unsigned underflow
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
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>
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>
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)
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)
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
5990 - redir_varvalue: legal_number validity check should be == 0, not < 0
5991 From a report by Grisha Levit <grishalevit@gmail.com>
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>
6002 - sigpipe_handler: clean up, set $?, and throw to top level on receipt
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
6012 - sh_mktmpfd: add support for MT_UNLINK flag, unlinks created filename
6013 before returning fd, fails if the unlink fails for some reason
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,
6029 - gen_globpat_matches: call noquote_glob_filename, let that handle
6030 all the variables and GLOB_FAILED
6033 - GLOBSORT: support for special variable, call setup_globsort on
6036 doc/bash.1,doc/bashref.texi
6037 - GLOBSORT: document variable and its effects on pathname expansion
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
6050 doc/bash.1,lib/readline/doc/rluser.texi
6051 - compgen: document new -V option
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
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>
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>
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>
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
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>
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>
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
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>
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>
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
6124 lib/readline/history.h
6125 - HIST_ENTRY_DEFINED: define sentinel if HIST_ENTRY struct defined
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
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
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
6150 From a report by minipython <599192367@qq.com>
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>
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
6169 - noninc_dosearch,rl_history_search_internal: call dispose_saved_search_line
6170 before calling make_history_line_current
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()
6181 - sh_globsort: a sort specifier of `nosort' disables sorting completely
6183 doc/bash.1,doc/bashref.texi
6184 - GLOBSORT: document `nosort' sort specifier
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>
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>
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>
6215 - top_level_cleanup,throw_to_top_level: set variable_context to 0, just
6219 - function_misc_cleanup: new function, runs make_funcname_visible and
6220 unlink_fifo_list at the end of execute_function, replaces inline
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
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
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>
6255 - fd_to_buffered_stream: make sure buffers[fd2] is non-null before
6256 turning on SHAREDBUF.
6257 From Emanuele Torre <torreemanuele6@gmail.com>
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>
6266 - parse_comsub: handle ${Ccommand; }, where C == space, tab, newline,
6268 - read_token_word: understand ${Ccommand; } and call parse_comsub to
6270 - parse_matched_pair: understand ${Ccommand; } inside another paired
6272 - new `funsub' production, like comsub but for ${Ccommand;} nofork
6273 command substitution
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
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
6287 - SX_FUNSUB: new flag, tell xparse_dolparen we are parsing the command
6288 in a ${Ccommand;} nofork command substitution
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
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
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
6318 - parse_comsub,xparse_dolparen: handle `(' as the first char of a
6319 funsub (ksh93 supports that)
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
6326 - executing_funsub: flag for the rest of the shell to know we're
6327 expanding a funsub; used by parse_and_execute
6329 builtins/evalstring.c
6330 - parse_and_execute: check executing_funsub to do the right thing with
6331 alias expansion and posix mode
6335 doc/bash.1,doc/bashref.texi
6336 - function substitution (or lambda substitution, or nofork command
6337 substitution): document
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>
6349 - i370 machines cannot use the bash malloc
6350 Patch from Igor Todorovski <itodorov@ca.ibm.com>
6353 - initialize_signames: add support for z/OS signals.
6354 Patch from Igor Todorovski <itodorov@ca.ibm.com>
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>
6362 - mark_all_jobs_as_dead: make sure to reset js.j_ndead to the right
6363 number of jobs in the array
6366 - execute_while_or_until: move call to REAP() after the action
6367 executes, like other loop functions
6369 shell.c,parse.y,lib/intl/gettextP.h
6370 - add some __MVS__ checks for z/OS systems
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>
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
6394 - quote_escapes_internal: use ifs_cmap instead of iterating through
6395 ifs_value to set skip_ctlesc and skip_ctlnul
6400 - remove `(' from FUNSUB_CHARS
6403 - parse_comsub: don't bother with `(' as one of the FUNSUB_CHARS
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
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>
6418 - skip_double_quoted: pass the SX_COMPLETE flag down to
6419 extract_dollar_brace_string in case it contains an unclosed command
6421 From a report by Grisha Levit <grishalevit@gmail.com>
6426 - make sure shell_initialized is set to 1 before running -c command
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>
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
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>
6452 lib/readline/mbutil.c
6453 - _rl_get_char_len: if SRC is "", make sure to return 0
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)
6463 - _rl_insert_char, rl_quoted_insert: minor fixes from Grisha Levit
6466 - bexpand: use the same calculation for the size of the return buffer
6468 From a report by Grisha Levit <grishalevit@gmail.com>
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
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
6487 - enable_builtin: don't call dlopen with a null pathname, it will
6488 succeed. Report from Wiley Young <wyeth2485@gmail.com>
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>
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>
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>
6508 aclocal.m4,configure.ac,findcmd.c
6509 - IBM z/OS changes from Igor Todorovski <itodorov@ca.ibm.com>
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>
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>
6534 - print_if_command: make sure to print any pending here-documents after
6536 From https://bugzilla.redhat.com/show_bug.cgi?id=2211214
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>
6544 - _evalfile: increment retain_fifos, so we don't delete any FIFOs or
6545 pipes we inherited before sourcing this file; restore original value
6547 From https://savannah.gnu.org/support/index.php?110883
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>
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
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>
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.
6580 - new inline functions to convert between assignment flags (ASS_*),
6581 array value flags (AV_*), and valid array flags (VA_*)
6584 - include arrayfunc.h after subst.h and variables.h so all the values
6585 for the new inline functions are available
6588 - bind_int_variable: use convert_assign_flags_to_validarray_flags and
6589 convert_assign_flags_to_arrayval flags instead of inline assignments
6592 - builtin_bind_variable: use convert_assign_flags_to_validarray_flags
6593 instead of inline assignments
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
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
6617 - array_expand_once: new option, replaces assoc_expand_once
6619 doc/bash.1,doc/bashref.texi
6620 - array_expand_once: document new shopt option
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
6633 lib/readline/readline.h
6634 - rl_full_quoting_desired: extern declaration
6636 lib/readline/doc/rltech.texi
6637 - rl_full_quoting_desired: document
6640 - bumped version to 5.3-devel
6643 - COPT_FULLQUOTE: new compspec option, for rl_full_quoting_desired
6646 - pcomp_set_readline_variables: set rl_full_quoting_desired according
6649 builtins/complete.def
6650 - fullquote: add new complete/compopt option value
6652 doc/bash.1,lib/readline/doc/rluser.texi
6653 - fullquote: document new complete/compopt option
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
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
6667 - timeval_to_seconds, clock_t_to_seconds: change prototypes
6670 - mkfmt,print_formatted_time: fractional seconds arguments are now
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
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
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
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
6692 From a suggestion by William Kennington <wak@google.com>
6694 doc/bash.1,doc/bashref.texi
6695 - BASH_MONOSECONDS: document
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
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
6707 doc/bash.1,doc/bashref.texi
6708 - BASH_TRAPSIG: document
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>
6718 - wait_for: make checkwinsize work in subshell commands started from
6720 New feature request by Kerin Millar <kfm@plushkava.net>
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>
6731 - arrayvar_copyval: copy an array or hash table from shell variable
6735 - arrayvar_copyval: extern declaration
6738 - ASS_NOTEMPENV: new flag for bind_variable and assignments
6741 - bind_variable: if ASS_NOTEMPENV is in FLAGS, don't bother calling
6742 bind_tempenv_variable
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
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
6763 - sh_regmatch: use builtin_find_indexed_array to allow a local copy
6765 From https://lists.gnu.org/archive/html/bug-bash/2022-05/msg00052.html
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
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
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
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
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>
6799 - anonopen: use memfd_create if it is available, fall through to
6800 traditional Unix/POSIX implementation if it fails
6805 - yy_string_unget: don't push EOF back to a string, like the other
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>
6817 lib/readline/input.c
6818 - rl_gather_tyi: make sure result is initialized
6821 - _rl_read_bracketed_paste_prefix: make sure key is initialized
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
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>
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>
6840 - bindpwd: fix seg fault from an unlikely set of circumstances
6841 From a report by Grisha Levit <grishalevit@gmail.com>
6844 - convert_validarray_flags_to_arrayval_flags: initialize avflags
6845 From a report by Grisha Levit <grishalevit@gmail.com>
6848 - anonopen: set *fn if memfd_create is used
6849 From a report by Grisha Levit <grishalevit@gmail.com>
6854 - bind_assoc_var_internal: free key to fix small leak if assign_func
6856 - quote_compound_array_word: free value to fix small leak
6858 builtins/evalstring.c
6859 - parse_and_execute: free parsed command on failed function definition
6861 - open_redir_file: free FN if we're not passing it back to the caller
6864 - param_expand: free TEMP1 in code paths that don't do it now
6867 - bash_command_name_stat_hook: if we modify *NAME, free the old value
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>
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>
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>
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
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>
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>
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
6911 From a report by Grisha Levit <grishalevit@gmail.com>
6913 lib/readline/rltypedefs.h
6914 - Function: only compile in these obsolete typedefs if
6915 WANT_OBSOLETE_TYPEDEFS is defined
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>
6926 - skip_double_quoted: make sure to call extract_function_subst with
6928 From a report by Grisha Levit <grishalevit@gmail.com>
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>
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
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
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
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
6965 - uw_restore_parser_state,uw_rl_set_signals: extern declarations
6968 - unset_readline_variables,uw_unset_readline_variables: function to
6969 unset READLINE_{LINE,POINT,MARK,ARGUMENT} and its unwind-protect
6971 - bash_execute_unix_command: add unwind-protect to free up allocated
6973 Report and patch by Grisha Levit <grishalevit@gmail.com>
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
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
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>
6995 - exppower: only report negative exponent error if noeval == 0.
6996 Fixes issue reported by Steffen Nurpmeso <steffen@sdaoden.eu>
7001 - anonopen: add support for using shm_open or shm_mkstemp to create
7002 an anonymous file using POSIX shared memory
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>
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>
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>
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
7035 From a report and patch by Grisha Levit <grishalevit@gmail.com>
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
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
7056 Inspired by a report from Emanuele Torre <torreemanuele6@gmail.com>
7059 - assign_compound_array_list: new return type
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>
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>
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>
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>
7089 - user_info: add members for saved uid and saved gid
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>
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
7108 From a report by Stephane Chazelas <stephane@chazelas.org>
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
7115 - added note recommending against the use of test with 5 or more
7116 arguments in favor of combining multiple instances of test with
7118 From a report by Stephane Chazelas <stephane@chazelas.org>
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>
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>
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
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.
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
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>
7163 - strregerror: new function to return regerror(3) error message text
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>
7171 - sh_regmatch: update extern declaration
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
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
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>
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>
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)
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>
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
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
7223 - bashline_set_filename_hooks: extern declaration
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>
7232 - bash.pdf: use groff -T pdf to create, instead of creating postscript
7233 and then using ghostscript
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
7243 Report from Earl Chew <earl_chew@yahoo.com>
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
7251 - make_simple_command,make_bare_simple_command: change prototype
7253 parse.y,builtins/command.def,builtins.jobs.def
7254 - make_simple_command,make_bare_simple_command: change callers
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
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()
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>
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
7289 lib/readline/rltypedefs.h
7290 - rl_macro_print_func_t: typedef for a function to print macro key
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)
7300 lib/readline/doc/rltech.texi
7301 - rl_macro_display_hook: add description
7304 - glob_char_p: add the characters that are special within BRE bracket
7306 Inspired by a report by Grisha Levit <grishalevit@gmail.com>
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
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
7324 - read_builtin: saw_escape is now a count of CTLESCs we added to the
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
7332 From a report by Grisha Levit <grishalevit@gmail.com>
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>
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
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>
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
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>
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
7373 lib/readline/readline.h
7374 - rl_print_keybinding: extern declaration
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
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
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>
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
7413 m4/bison.m4,m4/flexmember.m4,m4/locale_h.m4
7414 - new m4 files from gettext-0.21.1
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
7424 configure.ac,config.h.in
7425 - updated autoconf files with changes for gettext-0.21.1
7428 - updated distribution manifest with new files from gettext-0.21.1
7431 - u32cconv: prefer nl_langinfo to locale_charset like locale.c:
7435 - uw_restore_lineno: an unwind-protect fuction to restore a saved
7437 - execute_command: add an unwind-protect to restore line_number in
7438 case execute_simple_command longjmps back to top_level or a
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
7450 - execute_simple_command: don't call savestring on the_printed_command_except_trap
7452 From a report by Grisha Levit <grishalevit@gmail.com>
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
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
7469 From a suggestion by konsolebox <konsolebox@gmail.com> back in 5/2021
7472 doc/bash.1,doc/bashref.texi
7473 - read: document new -E option
7478 - BASH_CHECK_LIB_TERMCAP: add a check for bash_cv_termcap_lib ==
7479 "libcurses"; set TERMCAP_LIB=-lcurses in this case
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
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>
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>
7507 - read_builtin: make `delim' variable local, pass to edit_line to
7508 set the last character of the returned line; change edit_line
7510 From a suggestion by Grisha Levit <grishalevit@gmail.com>
7515 - comsub and funsub productions: don't reset eof_encountered to 0 in
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>
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
7529 Inspired by https://savannah.gnu.org/support/index.php?110924
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>
7539 lib/readline/colors.c
7540 - RL_COLOR_PREFIX_EXTENSION: make sure the custom suffix has a leading
7542 Report and fix from Stefan Klinger <readline-gnu.org@stefan-klinger.de>
7544 lib/readline/parse-colors.c
7545 - free_color_ext_list: new function, called on parse error, frees the
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
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>
7559 - printf_builtin: make 'C' equivalent to 'lc'; 'S' equivalent to 'ls'
7565 - parse_command: don't run pending traps if we're parsing a command
7567 From a report from Emanuele Torre <torreemanuele6@gmail.com>
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
7578 - bexpand: when parsing the string to be expanded, consume entire
7579 multibyte characters at a time, in case their encoding includes a
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
7588 - hash_builtin: if the -p option is supplied without a name to hash,
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>
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
7604 - cond_test: extern declaration
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>
7610 doc/bash.1,doc/bashref.texi
7611 - hash: add some text about the mutual exclusivity of the -t, -p, and
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]
7639 - expand_compound_array_assignment: use size_t for string indices
7642 - brace_gobbler: use size_t for string indices
7645 - xparse_dolparen: change function signature to use size_t *
7646 instead of int * for string index, use size_t for string indices
7648 general.c, general.h
7649 - bash_tilde_find_word: change function signature to use size_t *
7650 instead of int * for string index
7652 lib/readline/readline.h
7653 - rl_reparse_colors: extern declaration
7655 lib/readline/doc/rltech.texi
7656 - rl_reparse_colors: document as public function
7661 - it_init_aliases: move the free (alias_list) inside #ifdef ALIAS.
7662 Report and fix from Mike Jonkmans <bashbug@jonkmans.nl>
7665 - redirection_error: set W_NOPROCSUB in the word redirection_error
7666 creates to call redirection_expand
7669 - bind_builtin: use CASE_HELPOPT so the long doc gets printed when
7672 builtins/getopts.def
7673 - getopts_builtin: change to use no_options()
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
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).
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
7697 - break_builtin,continue_builtin: ditto with get_numeric_arg and `--'
7701 builtins/history.def
7702 - history_builtin: changed error message if the numeric argument to -d
7708 - array_length_reference: include the open bracket in the error message
7709 passed to err_badarraysub; it looks cleaner
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>
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
7728 lib/readline/readline.h
7729 - rl_completion_rewrite_hook: extern declaration
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>
7737 lib/readline/doc/rltech.texi
7738 - rl_completion_rewrite_hook: document
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
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>
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>
7766 - _rl_set_insert_mode: manage RL_STATE_OVERWRITE when modifiying
7769 doc/bash.1,doc/bashref.texi
7770 - some style and formatting changes from Bjarni Ingi Gislason
7771 <bjarniig@simnet.is>
7774 - getifs: now returns allocated memory to insulate it from changes to
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
7786 - glob_char_p: add more of the extglob pattern characters; it doesn't
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>
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).
7807 - cd_builtin: exit with EX_USAGE on too many arguments
7810 - shift_builtin: return EX_USAGE if get_numeric_arg returns 0,
7811 indicating that the argument wasn't a valid number
7813 builtins/history.def
7814 - shift_builtin: return EX_USAGE if get_numeric_arg returns 0
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
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>
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>
7838 - parse_matched_pair: don't add an extra CTLESC after reading \CTLESC,
7839 like in other parts of the parser
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>
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>
7853 - extract_dollar_brace_string: now global so brace expansion can use it
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
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
7871 - dispose_variable_value: do the right thing for att_nofree vars
7872 - makunbound: call dispose_variable_value instead of using inline code
7875 - brace_gobbler: make sure to set no_longjmp_on_fatal_error around
7876 calls to extract_dollar_brace_string
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
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
7898 - decodeprec: decode the precision into an intmax_t; clamp the return
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
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)
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
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>
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
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
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
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
7963 lib/readline/readline.h
7964 - rl_execute_named_command: new extern declaration
7966 lib/readline/rlprivate.h
7967 - new extern declarations for the readstr function framework
7969 lib/readline/funmap.c
7970 - execute-named-command: new bindable function name
7972 lib/readline/emacs_keymap.c
7973 - rl_execute_named_function: bound to M-x by default
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
7981 lib/readline/search.c
7982 - _rl_nsearch_dispatch: use ^V/^Q for rl_quoted_insert into the
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
7989 lib/readline/terminal.c
7990 - add support for new BE/BD and PS/PE bracketed-paste capabilities.
7991 Nothing uses them yet.
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).
8003 examples/loadables/fdflags.c
8004 - fdflags_builtin: only parse the setspec once, since parsing uses
8006 Report and patch from Emanuele Torre <torreemanuele6@gmail.com>
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.
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
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".
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>
8042 - zh_HK.big5hkscs -> zh_TW.big5 to work around macOS 14 issues with
8043 BSD-based locale definition
8046 - bash_execute_unix_command: check count != 1 instead of count > 1 to
8047 handle negative arguments
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
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>
8062 - solaris2: change PIC option for non-gcc Solaris 2 builds
8065 - binsize: make sure indexing into binsizes casts to size_t (unsigned)
8067 examples/loadables/getconf.c
8068 - protect more of the _SC defines with #ifdefs for different systems
8070 examples/loadables/fdflags.c
8071 - ALLFLAGS: add some more flag values from Solaris/AIX/HP-UX
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>
8082 lib/readline/display.c
8083 - rl_redisplay: make sure lpos is initialized to 0 if local_prompt is
8087 - run_startup_files: make sure ssh_reading_startup_files is set to 0
8088 in more places; still dependent on SSH_SOURCE_BASHRC
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
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.
8102 - posix_unbind_tempvar: extern declaration
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
8110 - update posix mode section with change to unset for interp 1009
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>
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
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
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>
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
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>
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
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)
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>
8177 doc/bash.1,doc/bashref.texi
8178 - bind: clarify meaning of `re-read' as being individual arguments
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>
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>
8190 execute_cmd.c,execute_cmd.h
8191 - save_lastarg: new function, returns saved value of $_ in allocated
8195 - execute_variable_command: instead of inline code, call save_lastarg
8198 - check_mail: instead of inline code, call save_lastarg
8199 - check_mail: instead of calling bind_variable, use bind_lastarg
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>
8208 lib/readline/doc/readline.3
8209 - updates to some vi-mode bindings
8210 Patch from Josh Brobst <josh@brob.st>
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
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>
8226 - execute_profile_file,execute_bashrc_file: separate the (duplicated)
8227 code that sources the various profile and bashrc files out into
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>
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>
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>
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>
8265 builtins/hash.def, builtins/ulimit.def
8266 - add some calls to sh_chkwrite where there is builtin output
8269 - sh_stat: use strcpy/strcpy when constructing pbuf instead of
8273 - sh_mktmpname,sh_mktmpfd,sh_mktmpdir: use snprintf (filename, PATH_MAX, ...)
8274 instead of sprintf (filename, ...)
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
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>
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
8295 Report from Oguz <oguzismailuysal@gmail.com>
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
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>
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
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>
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
8329 Fixes from G. Branden Robinson <g.branden.robinson@gmail.com>
8334 - binary_test: make sure all calls in posix mode use TEST_LOCALE for
8335 locale-specific string comparisons
8338 - find_bashrc_file: remove
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
8352 - reset_shopt_options: reset debugging_mode to 0
8355 - reset_shell_options: reset interactive_comments to 1
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>
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>
8377 - brace_gobbler: handle nofork command substitutions; skip over any
8378 enclosed command and any braces it contains
8381 - check_redir: return 0 if we're in a nofork comsub, so we will attempt
8382 command word completion if appropriate
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
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
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
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
8409 lib/readline/callback.c
8410 - rl_callback_sigcleanup: call _rl_readstr_sigcleanup to deallocate
8411 readstr state on a signal
8414 - rl_execute_named_command: free COMMAND before returning
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
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
8432 lib/readline/signals.c
8433 - _rl_state_sigcleanup: call _rl_nsearch_sigcleanup
8435 lib/readline/callback.c
8436 - _rl_callback_sigcleanup: call _rl_nsearch_sigcleanup
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>
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
8451 - retrieve_proc_status,delete_proc_status: extern declarations
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>
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
8469 From a report by Etienne Champetier <champetier.etienne@gmail.com>
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
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
8483 - set_bashopts: same
8484 Report by Emanuele Torre <torreemanuele6@gmail.com>
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
8496 - PF: call builtin_error if vflag is set, sh_wrerror otherwise
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>
8508 doc/bash.1,doc/bashref.texi
8509 - word expansions: make it clearer that quote removal is one of the
8510 shell word expansions
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
8517 - function_substitute: unwind-protect currently_executing_command,
8518 since parse_and_execute can overwrite it in the current shell
8520 Report from Grisha Levit <grishalevit@gmail.com>
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.
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.
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
8539 - set_ppid: use ASS_FORCE in the call to bind_variable instead of
8540 temporarily turning off att_readonly
8543 - extract_delimited_string: pass FLAGS down to skip_single_quoted and
8544 skip_double_quoted so we propagate SX_COMMAND and SX_COMPLETE
8546 Fixes bug reported by A4-Tacks <wdsjxhno1001@163.com>
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
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>
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
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
8591 - add_history: call history_list_resize as necessary
8592 Report and initial patch from Casey Johnson <strykre@hotmail.com>
8596 bashline.c,lib/readline/bind.c,lib/readline/display.c
8597 - replace some sprintf calls with snprintf to appease clang
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
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
8619 Report from Grisha Levit <grishalevit@gmail.com>
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)
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
8631 configure.ac,cross-build/msys32.cache,support/config.rpath,support/shobj-conf
8632 - MSYS-specific build options
8634 configure.ac,config.h.in,m4/unlocked-io.m4,general.h,include/unlocked-io.h
8636 - adapt Gnulib's unlocked-io module for faster stdio functions.
8637 From Grisha Levit <grishalevit@gmail.com>
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>
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
8650 From https://issues.redhat.com/browse/RHEL-22295
8653 - valid_readonly_attrs,invalid_readonly_attrs: new defines for declare
8654 to use to validate attempts to modify attributes of readonly
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>
8665 - add att_readonly to valid_readonly_attrs; it's valid to use
8666 declare -r var ; declare -r var
8668 Makefile.in,builtins/Makefile.in
8669 - add unlocked-io.h to dependencies and variable contents where
8671 - add additional include files to INSTALLED_INCFILES
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>
8678 - rename quote_rhs -> quote_nosplit
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
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>
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
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}
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
8717 - FEVAL_RETRY: if set in FLAGS, _evalfile will retry an interrupted
8719 - _evalfile: if open() returns -1, FEVAL_RETRY is set in FLAGS, and
8720 errno == EINTR, retry the open after checking for interrupts or
8722 - maybe_execute_file,force_execute_file: pass FEVAL_RETRY in flags
8725 - load_history: retry read_history if it returns EINTR after checking
8726 for interrupts or terminating signals
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>
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>
8746 - add additional character to test for broken wcwidth (0x200b)
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
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>
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
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
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
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>
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
8812 - PF: print an error message if printf returns an error or leaves
8814 From a report by Paul Eggert <eggert@cs.ucla.edu>
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
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>
8835 - PRIdMAX: move redefinition here after including inttypes.h
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>
8843 include/stdckdint.in.h,include/intprops-internal.h
8844 - new files, from gnulib
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
8852 - CREATED_HEADERS: add stdckdint.h
8854 stringlib.c,externs.h
8855 - substring: now takes size_t arguments for START and END
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>
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
8869 - autoconf check for `bool' from gnulib
8872 - include m4/c-bool.m4, call gl_C_BOOL; don't explicitly check for
8873 stdbool.h using AC_CHECK_HEADERS any more
8876 - HAVE_C_BOOL: define
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
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
8897 From a report and patch by Paul Eggert <eggert@cs.ucla.edu>
8902 - printstr,bexpand: changed size/length arguments to be size_t; changed
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
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
8929 - HAVE_C_BOOL: prefer if defined, fall back to stdbool.h if bool isn't
8933 - mkseq: simplify break condition
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
8945 - include stddef.h if we have it, otherwise define replacements for
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
8955 lib/sh/reallocarray.c,externs.h
8956 - implementation of reallocarray(), originally from OpenBSD, from
8960 - use AC_REPLACE_FUNCS for reallocarray
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
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
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
8977 All from a report and patch by Paul Eggert <eggert@cs.ucla.edu>
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 \) \)
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
8994 - CREATED_MACOS: list of dSYM directories created by building and
8996 - distclean,maintainer-clean: remove $(CREATED_HEADERS) and
8998 - maintainer-clean: remove ctags/etags files
9002 bashline.c,bashline.h
9003 - uw_restore_parser_state: moved to parse.y and declaration to shell.h
9006 - parsing_command: new flag, set to 1 when calling yyparse; saved and
9007 restored by save_parser_state/restore_parser_state
9010 - parsing_command: new element of sh_parser_state_t
9013 - throw_to_top_level: reset executing and parsing_command to 0
9016 - parse_comsub: set parsing_command to 1 before calling yyparse()
9019 - parse_command: set parsing_command to 1 before calling yyparse(),
9020 restore old value when yyparse returns
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
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>
9037 parse.y,print_cmd.c,eval.c,subst.c
9038 - decode_prompt_string: changed all callers
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
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
9052 Fixes from G. Branden Robinson <g.branden.robinson@gmail.com>
9057 - shell_execve: minor changes to code that checks the #! interpreter
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
9066 From a report by Carl Edquist <edquist@cs.wisc.edu>
9068 jobs.c,nojobs.c,jobs.h
9069 - process_exit_status: no longer static, public function with an
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
9080 - waitchld: call coproc_pidchk with a WAIT second argument (like
9084 - COPROC_STOPPED,COPROC_FOREGROUND: new flags values for coproc
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
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)
9103 - term: made change of 3/25 dependent on the compatibility level
9105 support/config.guess,support/config.sub,support/config.rpath
9106 - new versions, imported from gnulib
9111 - update compatibility, posix mode, and bourne shell sections for
9112 bash-5.3-alpha release
9115 - update copyright date to 2024
9117 [bash-5.3-alpha frozen]
9122 - cd_builtin: a null pathname argument is now an error; POSIX interp
9126 - makunbound: revert change from 7/10/2023 about preserving the export
9127 attribute when unsetting a local variable in light of POSIX interp
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
9148 - RX_EXPANDED: flag set when translating redirects to their final form;
9149 indicates the redirection should not be expanded again
9152 - do_redirection_internal: when translating a redirect into
9153 r_err_and_out, set the RX_EXPANDED flag so the filename doesn't
9155 Fixes bug reported by squeaky <q7d9y9muja@liamekaens.com>
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
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
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)
9183 - MULTIPLE_COPROCS: now enabled by default
9187 doc/bash.1,doc/bashref.texi
9188 - add text clarifying the difference between PIPESTATUS and $?
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
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
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
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
9210 From a report by Cedric Blancher <cedric.blancher@gmail.com>
9213 - new build include file, construct from buildconf.h.in; contains a
9214 subset of config.h for use by the build tools
9217 - now assumes a C90 compilation environment; includes buildconf.h for
9218 any build-time configuration variables
9221 - buildconf.h: add to CREATED_CONFIGURE
9222 - mksyntax: now depends on buildconf.h instead of config.h
9226 support/bashversion.c,version.c
9227 - now assumes a C90 compilation environment; includes buildconf.h for
9228 any build-time configuration variables
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
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
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>
9260 - anonopen: call memfd_create with MFD_NOEXEC_SEAL
9261 From a report by Kerin Millar <kfm@plushkava.net>
9266 - su_shell: now global
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
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>
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>
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)
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
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
9313 - function_substitute: freeze the jobs list with value -1 so jobs
9314 can change status and possibly inhibit printing by `jobs'
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
9327 - LONGEST_SIGNAL_DESC: update to 27 (macos SIGPROF). This changes the
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
9337 builtins/evalstring.c
9338 - parse_prologue: if SEVAL_NOTIFY is supplied, unwind-protect
9339 want_job_notifications and set it to 1
9341 jobs.c,jobs.h.nojobs.c
9342 - want_job_notifications: new global variable, initialized to 0
9345 - notify_and_cleanup: notify about dead jobs if want_job_notifications
9349 - execute_variable_command: call parse_and_execute with the SEVAL_NOTIFY
9353 - reader_loop: call notify_and_cleanup before executing $PROMPT_COMMAND
9354 if the shell is interactive and prompting
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
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>
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
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
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
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
9390 execute_cmd.c,execute_cmd.h
9391 - init_notfound_str: call gettext to initialize and translate
9393 - execute_disk_command: call init_notfound_str before forking if it
9394 hasn't been initialized
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
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
9408 - enable_builtin: don't try to turn enable f into enable -f f if the
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
9420 - make sure to note in CHANGES that configure now supports
9421 --enable-year2038 for large time_t
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>
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>
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
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>
9451 - globsort_sizecmp,globsort_blockscmp: replace subtraction with a
9452 generic transitive comparison function to avoid problems with
9454 From a report from Grisha Levit <grishalevit@gmail.com>
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>
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>
9473 - mindist: don't check best unless we set it
9474 Report and patch from Grisha Levit <grishalevit@gmail.com>
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
9480 - alloc_process,dispose_process: allocate and deallocate a PROCESS;
9484 - command_substitute: call cleanup_the_pipeline after waiting for
9485 the command substitution process, since we allocated it
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>
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>
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>
9520 - shell_execve: fix typo in code that chops \r off the end of the #!
9522 Report and fix from Collin Funk <collin.funk1@gmail.com>
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>
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>
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>
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>
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>
9560 - read_builtin: free ifs_chars in more return code paths
9561 Report and patch from Grisha Levit <grishalevit@gmail.com>
9566 - ZRESET: new macro, calls zreset() if interrupt_state is non-zero
9569 - zread: if read returns -1/EINTR, and we're executing a builtin,
9570 call zreset just in case
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
9581 - ASSIGN_DISALLOWED: macro that encapsulates when an assignment to
9582 SHELL_VAR *v with flags f will be disallowed and fail
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
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>
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>
9602 - make sure to free WORD in coproc WORD COMMAND after creating the
9604 Report and patch from Grisha Levit <grishalevit@gmail.com>
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>
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>
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
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>
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
9641 - source_builtin: add -p PATH option, searches PATH argument instead
9642 of $PATH; overrides sourcepath; does not search $PWD if path search
9645 doc/bash.1,doc/bashref.texi
9646 - source: document -p
9649 - if the size, blocks, or any of the time values compare equal, use
9650 the name for a secondary sort key
9653 - tcgetwinsize: provide definition for missing newly-standard function
9654 - get_new_window_size: use tcgetwinsize
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>
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>
9671 - SORT_NUMERIC: new "numeric" sort specifier
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
9678 Inspired by a discussion with Robert Elz <kre@munnari.oz.au>
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>
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>
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
9704 - _rl_audit_tty: make sure to close fd before returning on error
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
9712 - zwrite: use size_t and ssize_t variables
9715 - _evalfile: use size_t variable for return value from strlen()
9717 lib/readline/funmap.c
9718 - rl_funmap_names: don't bother calling qsort if result doesn't have
9721 All from a report by Siteshwar Vashisht <svashisht@redhat.com>
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>
9734 - ADJUST_LINE_NUMBER: encapsulate code that adjusts line_number in
9735 shell functions executed in interactive shells into a macro
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'
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
9749 lib/readline/rlprivate.h
9750 - _rl_maybe_replace_line: extern declaration
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
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>
9771 subst.c,subst.h,execute_cmd.c,jobs.c
9772 - reap_procsubs: rename to delete_procsubs
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>
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
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
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
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>
9816 - add help text saying that some of the units change in posix mode
9822 - remove some unused functions
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
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
9839 - process_substitute,command_substitute: call make_child with the
9840 appropriate FORK_ flag
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
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
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
9870 - RIGHT_BUCKET: don't check binsizes[nu-1] unless nu >= 1; clamp at 0
9872 - internal_realloc: don't check bucket at nunits-1 unless nunits >= 1
9873 Report and fix from Collin Funk <collin.funk1@gmail.com>
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>
9885 - bash_source_fullpath: new option, controls bash_source_fullpath and
9886 whether or not BASH_SOURCE contains full pathnames
9888 doc/bash.1,doc/bashref.texi
9889 - bash_source_fullpath: document new shell option
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
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>
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
9913 lib/readline/histfile.c
9914 - history_do_write: return 0 immediately if nelements < 0
9915 Report from ZeroIntensity Dev <zintensitydev@gmail.com>
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
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>
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
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
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
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
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
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>
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)
9982 lib/readline/search.c
9983 - noninc_search_from_pos: changed calls to _hs_history_search and
9984 _hs_history_patsearch
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
9994 - printf_builtin: fix params to call to mklong for long double formats
9995 if STRTOLD_BROKEN is defined
9998 - rearrange includes to make sure <termios.h> is included if
9999 HAVE_TCGETWINSIZE is defined
10000 Report from Grisha Levit <grishalevit@gmail.com>
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
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)
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>
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>
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
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>
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
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
10076 - case: add process substitution to the list of expansions for the
10078 Reported by shynur <one.last.kiss@outlook.com>
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
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>
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>
10102 - Bash posix mode: note the change with job notifications in command
10104 - Shell compatibility mode: note job notification changes for compat
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
10111 Report from Collin Funk <collin.funk1@gmail.com>
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
10125 - parse_dparen: set arith_lineno from word_lineno[word_top] since we
10126 now set it for FOR when we read it
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,
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
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
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>
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>
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
10183 jobs.c,parse.y,eval.c,execute_cmd.c,builtins/jobs.def,trap.c
10184 - notify_and_cleanup: changed all callers appropriately
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)
10194 - maybe_print_job_notifications: remove clause testing sourcelevel;
10195 use want_job_notifications for this
10200 [prayers for the victims of 9/11]
10205 - new version from Martin Kealey; modified for inclusion
10208 - MKDEP_ variables to be able to control various aspects of `make
10214 - relstatus: update to `beta'
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
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
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
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
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>
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)
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>
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>
10279 - bash_source_fullpath: initialize to BASH_SOURCE_FULLPATH_DEFAULT,
10283 - --enable-bash-source-default: document
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
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
10300 lib/readline/doc/history.3
10301 - update history expansion section to be consistent with hsuser.texi
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
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
10317 Makefile.in,builtins/Makefile.in
10318 - update dependencies on readline, history include files
10321 - update bash_source_fullpath reset to use new default
10324 - update to use the right option name for bash-source-fullpath-default
10325 Report and patch from Grisha Levit <grishalevit@gmail.com>
10328 - mkseq: fix loop condition to avoid integer overflow
10329 Report and patch from Grisha Levit <grishalevit@gmail.com>
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>
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
10344 Report from Thomas Oettli <thomas.oettli@sfs.com>
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>
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)
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>
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>
10370 - update .FN macro, use it consistently for filenames, like @file{}
10373 - make sure to use @dots and @file consistently
10375 doc/bash.1,lib/readline/doc/readline.3
10376 - make sure `readline' is typeset consistently
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>
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>
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
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>
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>
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>
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
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.
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 `%'
10437 - jobs_builtin: check for INVALID_JOB return from get_job_spec to
10438 avoid call to get_job_by_jid
10443 - err_invalidid: common error function for invalid identifiers;
10444 changed callers in execute_cmd.c, 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
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
10458 - print_function_def,named_function_string: don't print functions
10459 with names that are invalid identifiers with a leading `function'
10462 - POSIX_RESTRICT_FUNCNAME: placeholder, not defined by default
10465 - Posix mode: remove item about function names being valid shell
10471 - simplify the checks for the various members of struct dirent
10472 Report and patch from Grisha Levit <grishalevit@gmail.com>
10475 - simplify and remove redundant caching and cache check
10476 Report and patch from Grisha Levit <grishalevit@gmail.com>
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
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
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
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
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
10517 lib/glob/Makefile.in
10518 - ADDON_CFLAGS: initialize to empty
10520 lib/readline/Makefile.in
10521 - ADDON_CFLAGS: initialize to empty
10522 - APP_CFLAGS: remove
10525 - DEBUG: initialize from configure
10526 - ADDON_CFLAGS: initialize to empty
10527 - LIBOBJDIR: initialize to empty; configure uses it in LIBOBJS
10529 lib/tilde/Makefile.in
10530 - ADDON_CFLAGS: initialize to empty
10531 - CCFLAGS: add ADDON_CFLAGS, replacing ASAN_CFLAGS
10533 support/Makefile.in
10534 - SYSTEM_FLAGS: remove, since it's not passed from topdir Makefile
10536 Makefiles report and patch from Grisha Levit <grishalevit@gmail.com>
10539 - default_compatibility_level: int variable, initialized to
10540 DEFAULT_COMPAT_LEVEL like shell_compatibility_level
10543 - sv_shcompat: use default_compatibility_level instead of
10544 DEFAULT_COMPAT_LEVEL so variables.o doesn't have to depend on
10548 - set_compatibility_level: use default_compatibility_level instead
10549 of DEFAULT_COMPAT_LEVEL so shopt.o doesn't have to depend on
10551 - don't include version.h any more
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>
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>
10566 - LIBRARY_SOURCE: add back in to tags targets, add definition
10567 Suggestion from Mike Jonkmans <bashbug@jonkmans.nl>
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
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
10595 lib/readline/readline.c
10596 - rl_initialize: reset rl_eof_found to 0 at the same time we reset
10598 Report and fix from Andrew Burgess <aburgess@redhat.com> (GDB)
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>
10616 lib/termcap/termcap.c
10617 - tgetent: fix small memory leak on file open error
10620 - y.tab.h: move from CREATED_HEADERS to INSTALLED_HEADERS so we don't
10622 - maybe-clean: slightly change the syntax of the recipe
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>
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
10641 Makefile.in,configure.ac
10642 - STDCKDINT_H: variable for possibly-created file stdckdint.h, for
10643 dependencies; add dependencies where appropriate
10645 Makefile.in,doc/Makefile.in
10646 - add various gnu-standard install targets that do nothing
10651 - updated for bash-5.3-beta
10656 - wchars: fix small memory leak by freeing lbuf if wcrtomb fails
10657 Report from SerGoGubarev <sergeygubarev263@gmail.com>
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
10673 lib/readline/readline.h
10674 - rl_export_completions: extern declaration
10676 lib/readline/funmap.c
10677 - export-completions: new bindable command name
10679 doc/bash.1,lib/readline/doc/readline.3,lib/readline/doc/rluser.texi
10680 - export-completions: document, including output format
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
10690 - uninstall-headers: remove $(HYBRID_HEADERS); fix typo in recipe
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
10700 doc/bash.1,doc/bashref.texi
10701 - minor updates to the section on bracket expressions in pattern
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>
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>
10716 Makefile.in,doc/Makefile.in
10717 - uninstall: make sure the bash-specific directories created by
10718 `make install' are emptied and removed
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
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>
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>
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.
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.
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>
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>
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>
10773 - updated for bash-5.3-beta
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
10782 Fixes bug reported by Grisha Levit <grishalevit@gmail.com>
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>
10790 tests/printf7.sub,tests/cond-regexp2.sub
10791 - accommodate different error messages across different systems
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>
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
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>
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
10823 From a patch from Matthew Tromp <matthewktromp@gmail.com>
10827 examples/loadables/fltexpr.c
10828 - fltexpr: new loadable builtin to do floating-point arithmetic
10829 expression evaluation and optionally print the result
10833 builtins/printf.def
10834 - getarg(), advancearg(): cosmetic changes to make it easier to
10835 implement %N$ format specifiers in the future
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>
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-
10852 From https://savannah.gnu.org/patch/?10496
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
10861 From a report by Ivan Shapovalov <intelfx@intelfx.name> in 11/2024
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>
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
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
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
10896 - _rl_get_screensize: use _rl_tcgetwinsize
10898 lib/readline/rlwinsize.h
10899 - _rl_tcgetwinsize,_rl_tcsetwinsize: extern function declarations
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>
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
10915 lib/readline/rlprivate.h
10916 - _rl_handling_signal: new extern declaration
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)
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>
10935 - do_redirection_internal: keep track of whether the redirector fd
10936 was active with a new variable. Not used yet, should be optimized
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
10941 - do_redirection_internal: only call check_bash_input if we're
10942 creating an undo list and not running one
10945 - OUTPUT_REDIRECT: add r_output_force
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
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>
10960 examples/loadables/chmod.c
10961 - chmod: new loadable builtin, inspired by zhixu.liu@gmail.com in
10962 https://savannah.gnu.org/patch/?10499
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
10970 https://pubs.opengroup.org/onlinepubs/9799919799/utilities/kill.html#tag_20_64_14
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
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
10984 - brace_expand: call valid_seqterm if brace_gobbler finds a BRACE_SEQ
10986 Inspired by report from Robert Elz <kre@munnari.oz.au>
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
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)
11005 lib/sh/zmapfd.c,externs.h
11006 - zmapfd: now returns ssize_t in case of large files when size_t is
11009 builtins/evalfile.c,builtins/help.def
11010 - zmapfd: changed callers
11013 - print_redirection: the default file descriptor for <> is 0
11014 Report and fix from Emanuele Torre <torreemanuele6@gmail.com>
11019 - check for d_type member of struct dirent for future use
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
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>
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
11046 builtins/ulimit.def
11047 - pipesize: use pathconf and _PC_PIPE_BUF if available
11052 - brace_expand: make sure to call valid_seqterm with the right length
11053 so that text[tlen] == '}'
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
11063 - define HAVE_NL_LANGINFO
11066 - updates for locale-awareness
11070 lib/termcap/termcap.c,lib/termcap/tparam.c
11071 - updates for ISO C
11076 - update release to rc1, update CHANGES and NEWS
11080 lib/readline/rlmbutil.h
11081 - _rl_wcwidth: make sure wchar_t constants have an `L' prefix
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>
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
11101 lib/sh/gettimeofday.c
11102 - updated from version in gnulib
11104 [bash-5.3-rc1 frozen]
11108 examples/loadables/fltexpr.c
11109 - add support for function calls; support almost all math function
11111 - add support for pi, gamma, e mathematical constants
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>
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>
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>
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
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
11152 Report from Greg Wooledge <greg@wooledge.org>
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
11160 Report from Grisha Levit <grishalevit@gmail.com> based on a report
11161 from Александр Ушаков <aushakov@astralinux.ru>
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
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
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>
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
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
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
11220 All from a report by Siteshwar Vashisht <svashisht@redhat.com>
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>
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>
11236 - new version from coreutils-git (2024-12-03.03); renamed from install.sh
11239 - AM_PROG_INSTALL_SH, AM_PROG_INSTALL_STRIP: added from automake
11242 - call AM_PROG_INSTALL_SH, AM_PROG_INSTALL_STRIP
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>
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>
11263 - add additional defines for conservative ISO C/POSIX environment
11264 - add HAVE_C_BOOL define in case someone cross-compiles with a C23
11266 From a report by Bruce Dubbs <bdubbs@linuxfromscratch.org>
11268 builtins/mkbuiltins.c
11269 - include buildconf.h instead of having separate defines when
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
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>
11289 - read_token_word: set dollar_present if we see <( or >), backing
11290 out change from 2/4/2023