846 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 1e9f5e10b2 remove the [ and ] prompt expansions from prompt strings that are not used with readline; fix some redisplay issues when readline does not start in column 0; fix memory leak in unquoted $@ expansion; fix readline redisplay issue after SIGWINCH shrinks the terminal size; fix issue with mapfile that can cause crashes if a callback unsets the array mapfile is using 2026-06-02 10:01:54 -04:00
Chet Ramey 669b32f676 interim fix for generic list functions to avoid pointer aliasing issues; documentation updates 2026-05-08 11:36:36 -04:00
Chet Ramey 1cbe8c04bb fix a bug in word splitting that could potentially drop the first word; complete -p now prefixes the compspec for commands that begin with -' with --'; several builtins updated to use $'...' quoting for output when appropriate 2026-04-02 11:02:52 -04:00
Chet Ramey 55f721c51e update fix to save history if fatal signal arrives during $PROMPT_COMMAND execution; fix issue with extglob and empty patterns preceding pattern beginning with a `.' 2026-03-24 10:10:30 -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 d0b41c2c5f fix cosmetic error when printing if commands containing here-documents in the body; compiling -DSTRICT_POSIX now forces posix-mode shells to expand redirections before assignment statements preceding simple commands 2026-03-03 11:14:10 -05:00
Chet Ramey 044c1acc91 fix posix-mode tilde expansion so non-assignment words containing "~:" do not undergo tilde expansion; heuristic to skip case statements while performing history expansion on $() command substitutions; undo redirections before running an EXIT trap when executing a builtin in a subshell 2026-02-17 13:08:27 -05:00
Chet Ramey 979ae78392 documentation updates; fix read builtin not to set tty EOL character to NUL if the delimiter is NULL 2026-02-09 14:09:42 -05: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 8ea1a222df the `history' builtin prints error messages for certain read and write errors; implementation of new form of nofork command substitution that does not remove trailing newlines 2026-01-18 17:48:33 -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 a43e08df2d history builtin has a -H option to display history entries as they would be written to the history file; history builtin now takes a START-END range specifier for listing; fix stray semicolon when printing shell functions containing a case command; changes to stdin redirection detection in preparation for POSIX interp 1913 2026-01-05 11:57:18 -05:00
Chet Ramey 722a855459 New -D option for fc to force it to delete history entries selected for editing and re-execution; change readline edit-and-execute-command bindable command so it acts more like an accept-line followed by a command execution than an editing command that returns to readline() 2025-12-30 15:55:55 -05:00
Chet Ramey f27bf94a79 implementation of printf '%N$' numbered argument conversion specifier, compatible with coreutils 2025-12-05 15:50:38 -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 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 2fd02c8387 fix for a trap on SIGINT restoring the default disposition in an asynchronous subshell; change cd exit status if -Pe supplied and the directory can't be changed; fix for compound associative array assignment if one of the expanded words unsets the array during word expansion; fixes for rare systems that don't have various defines and system calls 2025-11-17 14:50:43 -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 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 4f536430e4 fix problem with completing filenames with user-supplied double quotes containing word expansion characters; fix problem with printf %S and precision overflow; fix issue with %P in TIMEFORMAT when timing null commands in posix mode; fix problem with SIGINT while parsing command substitutions 2025-10-01 11:14:27 -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 cf8a2518c8 fix for potential read builtin crash if bash gets a signal before read reads any input; make wait -f work if there are no pid or job arguments and update documentation; save and restore variable reflected in $BASH_COMMAND around shell function calls 2025-09-18 17:54:55 -04:00
Chet Ramey b88cd1c366 experimental change to use groff instead of man2html for HTML man pages; man page updates for reserved words; fix for pattern matching bracket expression ranges; readline changes to disallow defining some recursive keyboard macros 2025-09-18 17:26:51 -04:00
Chet Ramey a451bfc3f5 declare builtin changes to reject -i when used with -n; readline changes to make control characters visible in search strings; readline signal handling changes to avoid data corruption and UAF; documentation updates for more consistent quoting 2025-09-04 12:29:57 -04:00
Chet Ramey ff6cfb1464 allow the --with-curses configure argument to specify a library name; fix for case pattern lists containing both null and non-null strings; fix for bug with PS1 expansion containing an arithmetic syntax error 2025-08-08 12:11:17 -04:00
Chet Ramey e9053f2a3a fix for parameter expansions that contain valid and invalid expansions; avoid stale readdir() value in getcwd replacement; check libtinfow for termcap functions; fix to propagate exit status of builtins run in subshells back to calling shell 2025-08-04 10:18:32 -04:00
Chet Ramey 01070d4324 fix for wait -n' in posix mode; fix for long messages in readline; fix for short reads by source' builtin; fix for crash on RISC-V machines; fix for bad memory read when getopts is called twice with different sets of arguments 2025-07-18 11:53:01 -04:00
Chet Ramey 12ea4bfec3 update formatted documentation; fix typo in bashline.c; update system-dependent tests 2025-07-08 09:59:39 -04:00
Chet Ramey 0f0cea342e updated translations; back out change allowing quoted characters and process substitution words in function names; rework readline change for GNU Hurd and ncurses 2025-06-16 13:47:40 -04:00
Chet Ramey 727b8d3663 addition to POSIX mode documentation; new translations; update copyrights on some files; update formatted documentation; changes to cut/lcut loadable builtins when supplied -a ARRAY 2025-06-06 12:16:11 -04:00
Chet Ramey dbe4256d5e fix for namerefs referencing an unset array index with nounset enabled; addition to buildconf.h.in for C23 compilers 2025-05-30 10:11:03 -04:00
Chet Ramey 870ad4c92b some fixes for static analysis findings; fix for brace expansion being too greedy checking sequence expressions; fix for strip targets when cross-compiling 2025-05-19 09:10:57 -04:00
Chet Ramey 535a8150b6 fix for command substitution string parsing that resulted in top-level unwind-protects being run in the wrong spot; fix for delimiter byte being part of invalid multibyte character in read builtin 2025-05-04 17:21:25 -04:00
Chet Ramey 7731dc5c4d fix for read builtin and invalid multibyte characters followed by the delimiter; updated formatted documentation; new bash.pot file with updated strings; updated translations 2025-04-22 10:39:43 -04:00
Chet Ramey 42c6cbd459 add math function calls to fltexpr; HISTFILESIZE documentation updates; help text updates for exxport, history; update translations 2025-04-09 11:14:41 -04:00
Chet Ramey 2e113467f0 minor updates for 5.3-rc1 release 2025-04-04 10:50:15 -04:00
Chet Ramey e009d30dff fix for invalid brace sequence expressions; cosmetic fix to help builtin; documentation and copyright updates; bump version to bash-5.3-rc1; cosmetic locale fixes 2025-03-24 17:07:43 -04:00
Chet Ramey c3997d51f8 documentation updates for arithmetic expansion and array subscripts; update BASH_COMMAND for subshells; fix potential file descriptor leak in here document pipes 2025-03-07 10:23:58 -05:00
Chet Ramey e608233770 revert change that suppressed array subscript expansion when called by the let builtin; fix default file descriptor for <> redirection when printing command 2025-02-24 11:36:49 -05:00
Chet Ramey c3ca11424d fix issue with redirections to bash input file descriptor; new minimal chmod builtin; posix mode change for kill builtin return status; perform additional validation on brace expansion sequence expressions 2025-02-12 11:18:16 -05:00
Chet Ramey 3cfc255efe fix error return from wait builtin in a subshell when there are no children of this shell 2025-02-10 09:27:45 -05:00
Chet Ramey 0390b4354a posix change for undoing redirections after failed exec; change readline to set lines and columns after SIGTSTP/SIGCONT 2025-01-28 10:15:16 -05:00
Chet Ramey 25e213a551 taking the length of an unset variable subscripted with anything but @ or * is a fatal error; quote results of u prompt expansion; posix mode changes for exiting on -e when in a shell function; fix readline redisplay issue when bold prompt spans multiple lines 2025-01-24 11:21:16 -05:00
Chet Ramey 42c49d621d fix issue with internally quoting multibyte characters; the let builtin now suppresses additional array subscript expansion; small change to how readline export-completions displays filenames; new loadable builtin to do floating-point arithmetic 2025-01-17 11:41:49 -05:00
Chet Ramey 2ea356081d documentation updates; test suite updates to reduce extraneous diff output; don't export BASHOPTS into running tests 2025-01-09 16:13:16 -05:00
Chet Ramey 5114e17172 fix issue with failed history expansion changing the history list offset; fix some tests to avoid problems with error messages that differ between systems; fix issue with readline rl_abort not clearing any pending command to execute 2024-12-30 10:45:14 -05:00