288 Commits

Author SHA1 Message Date
Chet Ramey 8085ee1396 fix the expansion of $@ on the rhs of an assignment statement to be more consistent; fix mapfile to only look up the variable again if a callback is invoked; fix memory leak when converting a variable to an array 2026-06-08 10:31:31 -04:00
Chet Ramey 2d4ba0c618 fixed a bug with expanding unquoted $* when the separator is not whitespace and one or more of the positional parameters ends with the separator, resulting in an extra blank field being generated; fixed an issue with adjusting SHLVL in subshells that caused the environment to be rebuilt too many times; fix to make sure function substitution doesn't leave the -v option unset 2026-05-20 10:18:32 -04:00
Chet Ramey 1f292e433e fix for heuristic to detect case statements when parsing $() command substitutions to find history expansion; fix for history not being saved if a SIGHUP arrives during $PROMPT_COMMAND execution; workaround for Cygwin bug that results in bash incorrectly calculating the system pipe size 2026-03-09 14:54:45 -04:00
Chet Ramey 468e98e574 change `read -d' on a tty when the delimiter is not a newline to set the terminal EOL character instead of putting the terminal into character-at-a-time mode; change some calls to atoi to use strol instead 2026-01-30 16:43:46 -05:00
Chet Ramey a6421d8419 modify way bash avoids running traps in subshells that haven't reset the trap strings yet; new readline bindable command 'shell-expand-and-requote-line' 2026-01-14 11:08:22 -05:00
Chet Ramey e7c3acf108 change posix-mode implicit redirection from /dev/null for asynchronous commands so that 0<&0 does not count as an explicit redirection for austin-group interp 1913; fix spurious debug message about job notification for -c command; fix error handling for wait builtin if there are no children in a subshell 2026-01-06 10:46:14 -05:00
Chet Ramey 5a104e96d8 fix longjmp error when timing null command in posix mode; unset exit trap in subshells before checking for pending fatal signal; changes for gcc sometimes-uninitialized warning 2025-12-02 17:15:44 -05:00
Chet Ramey 4e705ed53a fix expansion of $* and $@ in contexts where word splitting is not performed to be more consistent across different word expansions; fix pathname canonicalization when setting $BASH 2025-11-24 09:51:15 -05:00
Chet Ramey bcac47f08a fix export environment if a local variable inherits the export attribute from a variable with the same name at a previous scope; changes to help builtin and glob pattern arguments; fix for fpurge declaration in a source file; man page typesetting updates 2025-11-19 10:18:54 -05:00
Chet Ramey 81d8584268 minor test suite updates; fix for export string when a variable from a function temporary environment is converted to an array variable; use fpurge to discard builtin output after a SIGINT in an interactive shell; fix for words containing quoted strings and {forward,backward}-shellword; experimental fix to discard a bgpid when a child with the same pid is created only if the new child is also an asynchronous pid; change read builtin to return >1 on read error, since 1 is reserved for EOF 2025-11-11 11:36:53 -05:00
Chet Ramey c299f535be speedups for character processing in a multibyte locale when expanding $'...'; cosmetic fix for select command when read returns EOF; fix for a forced interactive shell running under emacs with a pipe for stdin; fix for local nameref variables with the same name as variables in a function's temporary environment; fix for x=y local -n x' not making x' visible as a local variable; turn off nameref attribute for local nameref variables converted to arrays 2025-10-27 10:42:10 -04:00
Chet Ramey 403b32faf6 round seconds in command timing information if precision is >= 0; fix for readline word boundaries when quoted command substitutions appear; remove nameref attribute when converting nameref variable into an array; change how help strings are written to builtins.c; change read builtin to update unwind-protect if the input string is reallocated; fix crash when an expansion on the rhs of an assignment statement unsets the variable on the lhs 2025-10-23 16:35:55 -04:00
Chet Ramey 6a48b39bba read builtin fixes for CHERI environment; use CLOCK_GETTIME in gettimeofday replacement; readline fix to not optimize typeahead while defining a keyboard macro; fix for crash with unset nameref variable; make sure to save currently executing command around running DEBUG trap 2025-10-14 14:21:00 -04:00
Chet Ramey 25c6aa5b23 fix issue with making local variables from the temporary environment arrays; documentation updates; fix read builtin to check that the delimiter is not a newline before changing the terminal settings with a zero-length timeout 2025-10-06 17:20:10 -04:00
Chet Ramey f2f545ad7b fix for %P in TIMEFORMAT; make updating variables that aren't subject to allexport smoother; fix spurious compiler warning about realloc; efficiency improvement for command timing; fix issue with read builtin and failure to set terminal attributes 2025-10-06 15:29:41 -04:00
Chet Ramey fbd078be0a builtins now return success if supplied --help; use groff to build HTML man pages; reset mbstate if $'...' strings read an invalid multibyte sequence; read -t 0 now looks at other options (-n/-N/-d) and sets the terminal state appropriately 2025-10-01 10:44:10 -04:00
Chet Ramey b35866a289 updated translations; documentation updates; update copyright dates 2025-06-27 14:07:28 -04:00
Chet Ramey a6767763de fix for multiple assignment statements containing nofork comsubs preceding a command; fix for possible issue with invalid bash input fd 2025-03-31 09:58:59 -04:00
Chet Ramey fffa5d0e7c fix some exec builtin duplicate error messages; add LIBRARY_SOURCE back to tags and TAGS make targets 2024-11-01 14:12:16 -04:00
Chet Ramey 4917f2859c fixes for a couple of autoconf macros; update exit builtin for POSIX interp 1602; include more info in EOF error message when parsing compound command; update Makefiles by removing some variables, initializing others; update dependencies on version.h 2024-10-28 15:05:35 -04:00
Chet Ramey 254081c097 fix for set -e and compound commands inverting return status; tty fix for fg' from a key binding; posix mode wait -n' can return notified jobs; off-by-one error in history word tokenization; new configure option to set bash_source_fullpath 2024-09-27 12:00:46 -04:00
Chet Ramey e45ec6f76b new bash_source_fullpath shell option; documentation updates for wait builtin 2024-07-30 11:18:17 -04:00
Chet Ramey d5ef283cbd fix issue with invalidating pointer to last procsub; fix boundary issues with small reallocs 2024-07-26 09:30:30 -04:00
Chet Ramey dbb48b9786 avoid storing extra copy of function bodies; fix some minor memory leaks 2024-06-04 12:23:18 -04:00
Chet Ramey f65ed506d4 fix issue with interupting timed functions; fix for parsing comsubs inside arith for commands; allow break and continue inside arith for expressions; fix for case-insensitive completion with multibyte chars; fix some minor memory leaks; reset read buffer if it returns partial results on EINTR; fix for undo in execute-named-command 2024-06-03 09:09:11 -04:00
Chet Ramey 1f42d15864 fix for internal redirection flags colliding with open/fcntl flags; call memfd_create with MFD_NOEXEC_SEAL; fix for setting $BASH in su-started login shell; fix for unsetting $REPLY after nofork comsubs 2024-05-01 11:39:51 -04:00
Chet Ramey 136cdf8108 posix change for cd; fix for command word completion where the command names contain spaces; fix for error-and-output redirection with quoted filename 2024-04-10 21:17:29 -04:00
Chet Ramey 167a9248f9 add more overflow handling for printf builtin; start incorporating C23 stdckdint ; rework PRIdMAX replacements 2024-03-15 12:55:39 -04:00
Chet Ramey e1dd98a1db additional error checking for declare; changes for MSYS32; add support for unlocked-io stdio functions; several C23 changes 2024-02-16 10:55:13 -05:00
Chet Ramey 6bd75b8d63 performance improvements for large history lists; fix problem with not unwind-protecting current command and name while executing 2024-02-14 09:43:03 -05:00
Chet Ramey dc97ded434 fix nofork comsub overwriting currently executing command; free readline undo list on signal in callback mode; avoid disabling readonly when assigning variables from the environment; fix bug with shell-expand-line and $'...' quoting inside command substitutions; add `bash-vi-complete' as bindable command name 2024-02-09 10:30:02 -05:00
Chet Ramey d5ab50bc02 fix for ssh infinite loop when SSH_SOURCE_BASHRC is defined and bash is run in a comsub in .bashrc; implement posix interp 1009 in posix mode 2023-12-04 16:40:00 -05:00
Chet Ramey b30389070a renamed several functions beginning with legal_; changed all callers 2023-11-06 09:26:02 -05:00
Chet Ramey b348b871b4 small change to brace expansion to inhibit some error messages; changes to printf builtin for precision and field widths 2023-10-23 09:50:02 -04:00
Chet Ramey dc91b3f509 fixes for read builtin with backslash escapes; change history builtin behavior when HISTFILE is unset or null; change to compopt to make it use the name from the actual compspec it uses; fix for executing coproc in functions; fix for array variables and declare -g 2023-08-04 11:06:57 -04:00
Chet Ramey 7f7ee0e9c6 fix for leak when completing command word with glob pattern that matches multiple files; preserve export attribute when unsetting local variable in case it is reset; fix for using nl_langinfo when performing charset conversions 2023-07-17 17:35:59 -04:00
Chet Ramey 6a9e77e881 fix up semantics of assigning to noassign variables; fix error message in arithmetic noeval mode; add shared memory option to anonymous files; fix static linking config in configure 2023-07-03 10:26:23 -04:00
Chet Ramey 4e4cebb6dc fix for nofork comsub command printing; fix for crash caused by tempvar assignment converted to an array in a function 2023-06-20 11:10:39 -04:00
Chet Ramey fc29a02404 new BASH_MONOSECONDS, BASH_TRAPSIG variables; make checkwinsize work in subshells of interactive shells; fix for declare -f and function names containing `=' 2023-06-20 10:10:11 -04:00
Chet Ramey 76112093ec extend assoc_expand_once to indexed arrays; rename to array_expand_once, keeping old name as a synonym; udpate shopt documentation 2023-06-13 11:44:33 -04:00
Chet Ramey d06fefb2ba new GLOBSORT variable 2023-04-16 16:13:14 -04:00
Chet Ramey 877ff72675 rest of work to convert unwind-protects to ANSI/ISO C; size_t updates; function prototype changes for ANSI/ISO C 2023-04-03 12:07:25 -04:00
Chet Ramey 64b2b7c08d fixes for glibc time/gettimeofday issue; fix issue with history file containing one line too few if saving timestamps; fix for signal arriving while displaying readline completions 2023-03-27 09:28:12 -04:00
Chet Ramey 349e21043e local variables no longer modify external variables if the variable is supplied as a variable assignment preceding a function call; assignments in compound assignment statements don't undergo brace expansion 2023-02-27 10:55:06 -05:00
Chet Ramey 2e725f7346 final set of ANSI C changes 2023-01-05 15:09:06 -05:00
Chet Ramey 5b512e1121 fourth set of ANSI C changes: size_t; rest globskipdots to enabled default in subshells 2023-01-04 09:18:59 -05:00
Chet Ramey b2613ad1c0 third set of ANSI C changes: const function parameters 2023-01-03 11:59:43 -05:00
Chet Ramey a61ffa78ed second set of ANSI C changes: C89-style function declarations, more inline functions, remove register keyword 2023-01-03 10:23:11 -05:00
Chet Ramey e8652353ae fixes for HAVE_SELECT/HAVE_PSELECT; change some warning messages for nameref loops; run unwind-protects if max function nesting level is exceeded 2022-11-29 09:32:40 -05:00
Chet Ramey 055a4552c9 change to readline callback signal handling; fix message when popping shell function context; handle new terminating signals inside terminating signal handler; fix to pattern substitution with null replacement and null string; fix to alias expansion when we get a SIGINT while entering a command substitution in an interactive shell 2022-10-15 13:34:51 -04:00