summaryrefslogtreecommitdiff
path: root/shells/bash
AgeCommit message (Collapse)AuthorFilesLines
2017-01-28Update to 4.4.012ryoon2-4/+8
Changelog: When -N is used, the input is not supposed to be split using $IFS, but leading and trailing IFS whitespace was still removed.
2017-01-22bash: update to patchlevel 11.maya2-5/+29
changes: patch 06: Out-of-range negative offsets to popd can cause the shell to crash attempting to free an invalid memory block. patch 07: When performing filename completion, bash dequotes the directory name being completed, which can result in match failures and potential unwanted expansion. patch 08: Under certain circumstances, bash will evaluate arithmetic expressions as part of reading an expression token even when evaluation is suppressed. This happens while evaluating a conditional expression and skipping over the failed branch of the expression. patch 09: Depending on compiler optimizations and behavior, the `read' builtin may not save partial input when a timeout occurs. patch 10: Depending on compiler optimizations and behavior, the `read' builtin may not save partial input when a timeout occurs. patch 11: Subshells begun to run command and process substitutions may attempt to set the terminal's process group to an incorrect value if they receive a fatal signal. This depends on the behavior of the process that starts the shell.
2017-01-19Convert all occurrences (353 by my count) ofagc1-3/+3
MASTER_SITES= site1 \ site2 style continuation lines to be simple repeated MASTER_SITES+= site1 MASTER_SITES+= site2 lines. As previewed on tech-pkg. With thanks to rillig for fixing pkglint accordingly.
2016-11-20Update to 4.4.005wen2-6/+26
2016-09-19Updated bash to 4.4.wiz5-187/+119
This is a terse description of the new features added to bash-4.4 since the release of bash-4.3. As always, the manual page (doc/bash.1) is the place to look for complete descriptions. 1. New Features in Bash a. There is now a settable configuration #define that will cause the shell to exit if the shell is running setuid without the -p option and setuid to the real uid fails. b. Command and process substitutions now turn off the `-v' option when executing, as other shells seem to do. c. The default value for the `checkhash' shell option may now be set at compile time with a #define. d. The `mapfile' builtin now has a -d option to use an arbitrary character as the record delimiter, and a -t option to strip the delimiter as supplied with -d. e. The maximum number of nested recursive calls to `eval' is now settable in config-top.h; the default is no limit. f. The `-p' option to declare and similar builtins will display attributes for named variables even when those variables have not been assigned values (which are technically unset). g. The maximum number of nested recursive calls to `source' is now settable in config-top.h; the default is no limit. h. All builtin commands recognize the `--help' option and print a usage summary. i. Bash does not allow function names containing `/' and `=' to be exported. j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options. k. The shell now allows `time ; othercommand' to time null commands. l. There is a new `--enable-function-import' configuration option to allow importing shell functions from the environment; import is enabled by default. m. `printf -v var ""' will now set `var' to the empty string, as if `var=""' had been executed. n. GLOBIGNORE, the pattern substitution word expansion, and programmable completion match filtering now honor the value of the `nocasematch' option. o. There is a new ${parameter@spec} family of operators to transform the value of `parameter'. p. Bash no longer attempts to perform compound assignment if a variable on the rhs of an assignment statement argument to `declare' has the form of a compound assignment (e.g., w='(word)' ; declare foo=$w); compound assignments are accepted if the variable was already declared as an array, but with a warning. q. The declare builtin no longer displays array variables using the compound assignment syntax with quotes; that will generate warnings when re-used as input, and isn't necessary. r. Executing the rhs of && and || will no longer cause the shell to fork if it's not necessary. s. The `local' builtin takes a new argument: `-', which will cause it to save and the single-letter shell options and restore their previous values at function return. t. `complete' and `compgen' have a new `-o nosort' option, which forces readline to not sort the completion matches. u. Bash now allows waiting for the most recent process substitution, since it appears as $!. v. The `unset' builtin now unsets a scalar variable if it is subscripted with a `0', analogous to the ${var[0]} expansion. w. `set -i' is no longer valid, as in other shells. x. BASH_SUBSHELL is now updated for process substitution and group commands in pipelines, and is available with the same value when running any exit trap. y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or not bash is being run in a GNU Emacs shell window. z. Bash now treats SIGINT received when running a non-builtin command in a loop the way it has traditionally treated running a builtin command: running any trap handler and breaking out of the loop. aa. New variable: EXECIGNORE; a colon-separate list of patterns that will cause matching filenames to be ignored when searching for commands. bb. Aliases whose value ends in a shell metacharacter now expand in a way to allow them to be `pasted' to the next token, which can potentially change the meaning of a command (e.g., turning `&' into `&&'). cc. `make install' now installs the example loadable builtins and a set of bash headers to use when developing new loadable builtins. dd. `enable -f' now attempts to call functions named BUILTIN_builtin_load when loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows loadable builtins to run initialization and cleanup code. ee. There is a new BASH_LOADABLES_PATH variable containing a list of directories where the `enable -f' command looks for shared objects containing loadable builtins. ff. The `complete_fullquote' option to `shopt' changes filename completion to quote all shell metacharacters in filenames and directory names. gg. The `kill' builtin now has a `-L' option, equivalent to `-l', for compatibility with Linux standalone versions of kill. hh. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial environment. ii. inherit_errexit: a new `shopt' option that, when set, causes command substitutions to inherit the -e option. By default, those subshells disable -e. It's enabled as part of turning on posix mode. jj. New prompt string: PS0. Expanded and displayed by interactive shells after reading a complete command but before executing it. kk. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to SIG_DFL when the shell is started, so they are set to SIG_DFL in child processes. ll. Posix-mode shells now allow double quotes to quote the history expansion character. mm. OLDPWD can be inherited from the environment if it names a directory. nn. Shells running as root no longer inherit PS4 from the environment, closing a security hole involving PS4 expansion performing command substitution. oo. If executing an implicit `cd' when the `autocd' option is set, bash will now invoke a function named `cd' if one exists before executing the `cd' builtin. pp. Value conversions (arithmetic expansions, case modification, etc.) now happen when assigning elements of an array using compound assignment. qq. There is a new option settable in config-top.h that makes multiple directory arguments to `cd' a fatal error. rr. Bash now uses mktemp() when creating internal temporary files; it produces a warning at build time on many Linux systems. 2. New Features in Readline a. The history truncation code now uses the same error recovery mechansim as the history writing code, and restores the old version of the history file on error. The error recovery mechanism handles symlinked history files. b. There is a new bindable variable, `enable-bracketed-paste', which enables support for a terminal's bracketed paste mode. c. The editing mode indicators can now be strings and are user-settable (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' variables). Mode strings can contain invisible character sequences. Setting mode strings to null strings restores the defaults. d. Prompt expansion adds the mode string to the last line of a multi-line prompt (one with embedded newlines). e. There is a new bindable variable, `colored-completion-prefix', which, if set, causes the common prefix of a set of possible completions to be displayed in color. f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs- mode yank-pop. g. The redisplay code underwent several efficiency improvements for multibyte locales. h. The insert-char function attempts to batch-insert all pending typeahead that maps to self-insert, as long as it is coming from the terminal. i. rl_callback_sigcleanup: a new application function that can clean up and unset any state set by readline's callback mode. Intended to be used after a signal. j. If an incremental search string has its last character removed with DEL, the resulting empty search string no longer matches the previous line. k. If readline reads a history file that begins with `#' (or the value of the history comment character) and has enabled history timestamps, the history entries are assumed to be delimited by timestamps. This allows multi-line history entries. l. Readline now throws an error if it parses a key binding without a terminating `:' or whitespace. m. The default binding for ^W in vi mode now uses word boundaries specified by Posix (vi-unix-word-rubout is bindable command name). n. rl_clear_visible_line: new application-callable function; clears all screen lines occupied by the current visible readline line. o. rl_tty_set_echoing: application-callable function that controls whether or not readline thinks it is echoing terminal output. p. Handle >| and strings of digits preceding and following redirection specifications as single tokens when tokenizing the line for history expansion. q. Fixed a bug with displaying completions when the prefix display length is greater than the length of the completions to be displayed. r. The :p history modifier now applies to the entire line, so any expansion specifying :p causes the line to be printed instead of expanded. s. New application-callable function: rl_pending_signal(): returns the signal number of any signal readline has caught but not yet handled. t. New application-settable variable: rl_persistent_signal_handlers: if set to a non-zero value, readline will enable the readline-6.2 signal handler behavior in callback mode: handlers are installed when rl_callback_handler_install is called and removed removed when a complete line has been read.
2016-06-11Fixed pkglint warnings.rillig5-9/+14
2015-11-02Add SHA512 digests for distfiles for shells categoryagc1-1/+41
Existing SHA1 digests verified, all found to be the same on the machine holding the existing distfiles (morden). Existing SHA1 digests retained for now as an audit trail.
2015-06-07Update to 4.3.039ryoon2-3/+32
Changelog: * Bugfixes (031-039)
2015-03-08MAKE_JOBS works nowtnn1-2/+1
2015-03-07Apply patch to patch in PR 49375. Defuzz patches.rodent8-32/+41
2014-11-23Use -Wl,-R instead of just -R to avoid breaking the build on FreeBSD.dholland2-1/+18
From Dennis Lindroos in PR 49375.
2014-10-09Remove pkgviews: don't set PKG_INSTALLATION_TYPES in Makefiles.wiz1-3/+1
2014-10-07Another day, another bash patch. Welcome to 4.3.030.wiz2-4/+7
Fixes CVE-2014-6278: A combination of nested command substitutions and function importing from the environment can cause bash to execute code appearing in the environment variable value following the function definition.
2014-10-03Add another patch, welcome to 4.3.29. Not sure if this is hardening orwiz2-4/+7
a vulnerability.
2014-10-01Another day, another security fix: bash-4.3.028.wiz2-4/+7
2014-09-29Add another upstream security fix patch. Welcome to 4.3.027.wiz3-16/+18
2014-09-27use the official version of the parse.y patch.christos3-22/+8
2014-09-25bump pkgrevision for previousjmcneill1-3/+2
2014-09-25Disable function import by default, enabled only with -import-functions.christos4-2/+50
2014-09-25Add fix for CVE-2014-7169.tron3-2/+24
2014-09-24Add all current upstream bash patches including 025, which fixeswiz2-5/+85
a security issue. Version number bumped in the usual way.
2014-07-18Remove CFLAGS+=-g. Accidentally added.ryoon1-3/+1
2014-07-17Fix SCO OpenServer 5.0.7/3.2 build.ryoon3-2/+22
It has no S_ISSOCK.
2014-03-12Update to 4.3:wiz8-189/+24
This is a terse description of the new features added to bash-4.3 since the release of bash-4.2. As always, the manual page (doc/bash.1) is the place to look for complete descriptions. 1. New Features in Bash a. The `helptopic' completion action now maps to all the help topics, not just the shell builtins. b. The `help' builtin no longer does prefix substring matching first, so `help read' does not match `readonly', but will do it if exact string matching fails. c. The shell can be compiled to not display a message about processes that terminate due to SIGTERM. d. Non-interactive shells now react to the setting of checkwinsize and set LINES and COLUMNS after a foreground job exits. e. There is a new shell option, `globasciiranges', which, when set to on, forces globbing range comparisons to use character ordering as if they were run in the C locale. f. There is a new shell option, `direxpand', which makes filename completion expand variables in directory names in the way bash-4.1 did. g. In Posix mode, the `command' builtin does not change whether or not a builtin it shadows is treated as an assignment builtin. h. The `return' and `exit' builtins accept negative exit status arguments. i. The word completion code checks whether or not a filename containing a shell variable expands to a directory name and appends `/' to the word as appropriate. The same code expands shell variables in command names when performing command completion. j. In Posix mode, it is now an error to attempt to define a shell function with the same name as a Posix special builtin. k. When compiled for strict Posix conformance, history expansion is disabled by default. l. The history expansion character (!) does not cause history expansion when followed by the closing quote in a double-quoted string. m. `complete' and its siblings compgen/compopt now takes a new `-o noquote' option to inhibit quoting of the completions. n. Setting HISTSIZE to a value less than zero causes the history list to be unlimited (setting it 0 zero disables the history list). o. Setting HISTFILESIZE to a value less than zero causes the history file size to be unlimited (setting it to 0 causes the history file to be truncated to zero size). p. The `read' builtin now skips NUL bytes in the input. q. There is a new `bind -X' option to print all key sequences bound to Unix commands. r. When in Posix mode, `read' is interruptible by a trapped signal. After running the trap handler, read returns 128+signal and throws away any partially-read input. s. The command completion code skips whitespace and assignment statements before looking for the command name word to be completed. t. The build process has a new mechanism for constructing separate help files that better reflects the current set of compilation options. u. The -nt and -ot options to test now work with files with nanosecond timestamp resolution. v. The shell saves the command history in any shell for which history is enabled and HISTFILE is set, not just interactive shells. w. The shell has `nameref' variables and new -n(/+n) options to declare and unset to use them, and a `test -R' option to test for them. x. The shell now allows assigning, referencing, and unsetting elements of indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which count back from the last element of the array. y. The {x}<word redirection feature now allows words like {array[ind]} and can use variables with special meanings to the shell (e.g., BASH_XTRACEFD). z. There is a new CHILD_MAX special shell variable; its value controls the number of exited child statues the shell remembers. aa. There is a new configuration option (--enable-direxpand-default) that causes the `direxpand' shell option to be enabled by default. bb. Bash does not do anything special to ensure that the file descriptor assigned to X in {x}<foo remains open after the block containing it completes. cc. The `wait' builtin has a new `-n' option to wait for the next child to change status. dd. The `printf' %(...)T format specifier now uses the current time if no argument is supplied. ee. There is a new variable, BASH_COMPAT, that controls the current shell compatibility level. ff. The `popd' builtin now treats additional arguments as errors. gg. The brace expansion code now treats a failed sequence expansion as a simple string and will continue to expand brace terms in the remainder of the word. hh. Shells started to run process substitutions now run any trap set on EXIT. ii. The fc builtin now interprets -0 as the current command line. jj. Completing directory names containing shell variables now adds a trailing slash if the expanded result is a directory. kk. `cd' has a new `-@' option to browse a file's extended attributes on systems that support O_XATTR. ll. The test/[/[[ `-v variable' binary operator now understands array references. 2. New Features in Readline a. Readline is now more responsive to SIGHUP and other fatal signals when reading input from the terminal or performing word completion but no longer attempts to run any not-allowable functions from a signal handler context. b. There are new bindable commands to search the history for the string of characters between the beginning of the line and the point (history-substring-search-forward, history-substring-search-backward) c. Readline allows quoted strings as the values of variables when setting them with `set'. As a side effect, trailing spaces and tabs are ignored when setting a string variable's value. d. The history library creates a backup of the history file when writing it and restores the backup on a write error. e. New application-settable variable: rl_filename_stat_hook: a function called with a filename before using it in a call to stat(2). Bash uses it to expand shell variables so things like $HOME/Downloads have a slash appended. f. New bindable function `print-last-kbd-macro', prints the most-recently- defined keyboard macro in a reusable format. g. New user-settable variable `colored-stats', enables use of colored text to denote file types when displaying possible completions (colored analog of visible-stats). h. New user-settable variable `keyseq-timout', acts as an inter-character timeout when reading input or incremental search strings. i. New application-callable function: rl_clear_history. Clears the history list and frees all readline-associated private data. j. New user-settable variable, show-mode-in-prompt, adds a characters to the beginning of the prompt indicating the current editing mode. k. New application-settable variable: rl_input_available_hook; function to be called when readline detects there is data available on its input file descriptor. l. Readline calls an application-set event hook (rl_event_hook) after it gets a signal while reading input (read returns -1/EINTR but readline does not handle the signal immediately) to allow the application to handle or otherwise note it. m. If the user-settable variable `history-size' is set to a value less than 0, the history list size is unlimited. n. New application-settable variable: rl_signal_event_hook; function that is called when readline is reading terminal input and read(2) is interrupted by a signal. Currently not called for SIGHUP or SIGTERM. o. rl_change_environment: new application-settable variable that controls whether or not Readline modifies the environment (currently readline modifies only LINES and COLUMNS).
2014-01-11increment the pkgrevision as we've fixed a bugchopps1-2/+2
2014-01-11Patch in fix from readline git repo for upcoming readline 6.3. This fixeschopps2-1/+81
the vi-mode cc, dd, yy commands so that they actually cut/yank the text from the input text.
2013-07-15* .include "../../devel/readline/buildlink3.mk" with USE_GNU_READLINE=yesryoon1-3/+1
are replaced with .include "../../devel/readline/buildlink3.mk", and USE_GNU_READLINE are removed, * .include "../../devel/readline/buildlink3.mk" without USE_GNU_READLINE are replaced with .include "../../mk/readline.buildlink3.mk".
2013-06-09Add support for RLIMIT_NTHR (number of threads) that appears in NetBSDbsiegert3-3/+21
6.99.x. This uses "ulimit -T" as in Linux, not "-r" as in the other shells on NetBSD. Bump pkgrevision.
2013-05-10Fix bash cross-build on NetBSD by pre-answering autoconf run-tests.riastradh1-1/+16
ok agc
2013-02-12shells/bash: disable job control on Minixtcort3-3/+43
OK by wiz
2012-09-11"user-destdir" is default these daysasau1-2/+1
2012-08-20Drop maintainership.wiz1-2/+2
2012-07-18add patch from the Bash project fixing CVE-2012-3410spz3-3/+41
2011-04-22recursive bump from gettext-lib shlib bump.obache1-1/+2
2011-03-22remove patch-aa for DragonFly.obache2-34/+1
Upstream take care it whth different way in 4.2 and this patch broke it.
2011-03-12Add two new entries.wiz1-1/+3
2011-03-12Update to 4.2.wiz4-33/+23
1. New Features in Bash a. `exec -a foo' now sets $0 to `foo' in an executable shell script without a leading #!. b. Subshells begun to execute command substitutions or run shell functions or builtins in subshells do not reset trap strings until a new trap is specified. This allows $(trap) to display the caller's traps and the trap strings to persist until a new trap is set. c. `trap -p' will now show signals ignored at shell startup, though their disposition still cannot be modified. d. $'...', echo, and printf understand \uXXXX and \UXXXXXXXX escape sequences. e. declare/typeset has a new `-g' option, which creates variables in the global scope even when run in a shell function. f. test/[/[[ have a new -v variable unary operator, which returns success if `variable' has been set. g. Posix parsing changes to allow `! time command' and multiple consecutive instances of `!' (which toggle) and `time' (which have no cumulative effect). h. Posix change to allow `time' as a command by itself to print the elapsed user, system, and real times for the shell and its children. j. $((...)) is always parsed as an arithmetic expansion first, instead of as a potential nested command substitution, as Posix requires. k. A new FUNCNEST variable to allow the user to control the maximum shell function nesting (recursive execution) level. l. The mapfile builtin now supplies a third argument to the callback command: the line about to be assigned to the supplied array index. m. The printf builtin has a new %(fmt)T specifier, which allows time values to use strftime-like formatting. n. There is a new `compat41' shell option. o. The cd builtin has a new Posix-mandated `-e' option. p. Negative subscripts to indexed arrays, previously errors, now are treated as offsets from the maximum assigned index + 1. q. Negative length specifications in the ${var:offset:length} expansion, previously errors, are now treated as offsets from the end of the variable. r. Parsing change to allow `time -p --'. s. Posix-mode parsing change to not recognize `time' as a keyword if the following token begins with a `-'. This means no more Posix-mode `time -p'. Posix interpretation 267. t. There is a new `lastpipe' shell option that runs the last command of a pipeline in the current shell context. The lastpipe option has no effect if job control is enabled. u. History expansion no longer expands the `$!' variable expansion. v. Posix mode shells no longer exit if a variable assignment error occurs with an assignment preceding a command that is not a special builtin. w. Non-interactive mode shells exit if -u is enabled and an attempt is made to use an unset variable with the % or # expansions, the `//', `^', or `,' expansions, or the parameter length expansion. x. Posix-mode shells use the argument passed to `.' as-is if a $PATH search fails, effectively searching the current directory. Posix-2008 change. 2. New Features in Readline a. The history library does not try to write the history filename in the current directory if $HOME is unset. This closes a potential security problem if the application does not specify a history filename. b. New bindable variable `completion-display-width' to set the number of columns used when displaying completions. c. New bindable variable `completion-case-map' to cause case-insensitive completion to treat `-' and `_' as identical. d. There are new bindable vi-mode command names to avoid readline's case- insensitive matching not allowing them to be bound separately. e. New bindable variable `menu-complete-display-prefix' causes the menu completion code to display the common prefix of the possible completions before cycling through the list, instead of after.
2011-02-20MirBSD support from Benny Siegert in PR 44606.wiz4-1/+58
2010-05-07Bump PKGREVISION to reflect the recent change in pkginstall/shells to usejmmv1-1/+2
etcutils to update /etc/shells.
2010-04-15Allow building on systems without vsnprintf.joerg2-8/+17
2010-02-09Add patch fixing build on DragonFly provided by Steve O'Hara-Smithwiz2-1/+34
in PR 42666.
2010-01-16Update to 4.1:wiz4-120/+12
This document details the changes between this version, bash-4.1-rc, and the previous version, bash-4.1-beta. 1. Changes to Bash a. Fixed a bug that caused printf to not return a partial value when it encountered an error while converting an integer argument. b. Fixed a bug that caused setting one of the compatNN options to not turn off the others. c. The (undocumented) --wordexp option is no longer included by default. d. Fixed a bug in conditional command execution that caused it to not correctly ignore the exit status under certain circumstances. e. Added a configure-time check for correctly-working asprintf/snprintf. f. Fixed some problems with line number calculation and display when sourcing a file in an interactive shell. g. Fixed a bug that caused the shell to crash when using `declare -A foo=bar'. h. Fixed a bug that caused an off-by-one error when calculating the directories to display with the PROMPT_DIRTRIM option. 2. Changes to Readline a. Fixed a bug that caused applications using the callback interface to not react to SIGINT (or other signals) until another character arrived. ------------------------------------------------------------------------------ This document details the changes between this version, bash-4.1-beta, and the previous version, bash-4.1-alpha. 1. Changes to Bash a. Fixed a bug in mapfile that caused the shell to crash if it was passed the name of an associative array. b. Fixed a bug that caused the shell to incorrectly split case patterns if they contained characters in $IFS. c. Fixed a bug that caused the shell to set $? to the wrong value when using a construct ending with a variable assignment with set -x enabled and PS4 containing a command substitution. d. Fixed a bug that caused the shell to read commands incorrectly if an expansion error occurred under certain conditions in a user-specified subshell. e. Fixed a bug that caused the shell to set $? incorrectly if a parse error occurred in an evaluation context ("eval", trap command, dot script, etc.) f. Fixed a bug that caused the shell to attempt command substitution completion within a single-quoted string. g. Fixed a bug that caused the shell to insert an extra single quote during word completion. h. Fixed a bug that caused the shell to crash if invoked with the environment variable EMACS having a null value. i. Fixed a bug that caused bash to incorrectly report the presence of new mail in a `maildir' environment. j. Fixed a bug that caused the shell to not recognize a here-document ending delimiter inside a command substitution. k. Fixed a bug that caused the shell to crash when a a dynamic array variable was assigned a scalar value. 2. Changes to Readline 3. New Features in Bash a. The mapfile/readarray builtin no longer stores the commands it invokes via callbacks in the history list. b. There is a new `compat40' shopt option. c. The < and > operators to [[ do string comparisons using the current locale only if the compatibility level is greater than 40 (set to 41 by default). 4. New Features in Readline ------------------------------------------------------------------------------ This document details the changes between this version, bash-4.1-alpha, and the previous version, bash-4.0-release. 1. Changes to Bash a. Fixed bugs in the parser involving new parsing of the commands contained in command substitution when the substitution is read. b. Fixed a bug that caused the shell to dump core when performing programmable completion using a shell function. c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong time. d. Fixed a bug that caused the shell to dump core when listing jobs in the `exit' builtin. e. Fixed several bugs encountered when reading subscripts in associative array assignments and expansions. f. Fixed a bug that under some circumstances caused an associative array to be converted to an indexed array. g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set $? to a value > 128. h. Fixed a bug that caused the shell to remove FIFOs associated with process substitution inside shell functions. i. Fixed a bug that caused terminal attributes to not be reset when the `read' builtin timed out. j. Fixed a bug in brace expansion that caused unwanted zero padding of the expanded terms. k. Fixed a bug that prevented the |& construct from working as intended when used with a simple command with additional redirections. l. Fixed a bug with the case statment ;& terminator that caused the shell to dereference a NULL pointer. m. Fixed a bug that caused assignment statements or redirections preceding a simple command name to inhibit alias expansion. n. Fixed the behavior of `set -u' to conform to the latest Posix interpretation: every expansion of an unset variable except $@ and $* will cause the shell to exit. o. Fixed a bug that caused double-quoted expansions of $* inside word expansions like ${x#$*} to not expand properly when $IFS is empty. p. Fixed a bug that caused traps to set $LINENO to the wrong value when they execute. q. Fixed a bug that caused off-by-one errors when computing history lines in the `fc' builtin. r. Fixed a bug that caused some terminating signals to not exit the shell quickly enough, forcing the kernel to send the signal (e.g., SIGSEGV) multiple times. s. Fixed a bug that caused the shell to attempt to add empty lines to the history list when reading here documents. t. Made some internal changes that dramatically speeds up sequential indexed array access. u. Fixed a bug that caused the shell to write past the end of a string when completing a double-quoted string ending in a backslash. v. Fixed a bug that caused the shell to replace too many characters when a pattern match was null in a ${foo//bar} expansion. w. Fixed bugs in the expansion of ** that caused duplicate directory names and the contents of the current directory to be omitted. x. Fixed a bug that caused $? to not be set correctly when referencing an unset variable with set -u and set -e enabled. y. Fixed a bug caused by executing an external program from the DEBUG trap while a pipeline was running. The effect was to disturb the pipeline state, occasionally causing it to hang. z. Fixed a bug that caused the ** glob expansion to dump core if it encountered an unsearchable directory. aa. Fixed a bug that caused `command -v' and `command -V' to not honor the path set by the -p option. bb. Fixed a bug that caused brace expansion to take place too soon in some compound array assignments. cc. Fixed a bug that caused programmable completion functions' changes to READLINE_POINT to not be reflected back to readline. dd. Fixed a bug that caused the shell to dump core if a trap was executed during a shell assignment statement. ee. Fixed an off-by-one error when computing the number of positional parameters for the ${@:0:n} expansion. ff. Fixed a problem with setting COMP_CWORD for programmable completion functions that could leave it set to -1. gg. Fixed a bug that caused the ERR trap to be triggered in some cases where `set -e' would not have caused the shell to exit. hh. Fixed a bug that caused changes made by `compopt' to not persist past the completion function in which compopt was executed. ii. Fixed a bug that caused the list of hostname completions to not be cleared when HOSTNAME was unset. jj. Fixed a bug that caused variable expansion in here documents to look in any temporary environment. kk. Bash and readline can now convert file names between precomposed and decomposed Unicode on Mac OS X ("keyboard" and file system forms, respectively). This affects filename completion (using new rl_filename_rewrite_hook), globbing, and readline redisplay. ll. The ERR and EXIT traps now see a non-zero value for $? when a parser error after set -e has been enabled causes the shell to exit. mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to not contain the correct number of digits. nn. Fixed a bug that caused the shell to free non-allocated memory when unsetting an associative array which had had a value implicitly assigned to index "0". oo. Fixed a memory leak in the ${!prefix@} expansion. pp. Fixed a bug that caused printf to not correctly report all write errors. qq. Fixed a bug that caused single and double quotes to act as delimiters when splitting a command line into words for programmable completion. rr. Fixed a bug that caused ** globbing that caused **/path/* to match every directory, not just those matching `path'. ss. Fixed a bug that caused the shell to dump core when running `help' without arguments if the terminal width was fewer than 7 characters. 2. Changes to Readline a. The SIGWINCH signal handler now avoids calling the redisplay code if one arrives while in the middle of redisplay. b. Changes to the timeout code to make sure that timeout values greater than one second are handled better. c. Fixed a bug in the redisplay code that was triggered by a prompt containing invisible characters exactly the width of the screen. d. Fixed a bug in the redisplay code encountered when running in horizontal scroll mode. e. Fixed a bug that prevented menu completion from properly completing filenames. f. Fixed a redisplay bug caused by a multibyte character causing a line to wrap. g. Fixed a bug that caused key sequences of two characters to not be recognized when a longer sequence identical in the first two characters was bound. h. Fixed a bug that caused history expansion to be attempted on $'...' single-quoted strings. i. Fixed a bug that caused incorrect redisplay when the prompt contained multibyte characters in an `invisible' sequence bracketed by \[ and \]. j. Fixed a bug that caused history expansion to short-circuit after encountering a multibyte character. 3. New Features in Bash a. Here-documents within $(...) command substitutions may once more be delimited by the closing right paren, instead of requiring a newline. b. Bash's file status checks (executable, readable, etc.) now take file system ACLs into account on file systems that support them. c. Bash now passes environment variables with names that are not valid shell variable names through into the environment passed to child processes. d. The `execute-unix-command' readline function now attempts to clear and reuse the current line rather than move to a new one after the command executes. e. `printf -v' can now assign values to array indices. f. New `complete -E' and `compopt -E' options that work on the "empty" completion: completion attempted on an empty command line. g. New complete/compgen/compopt -D option to define a `default' completion: a completion to be invoked on command for which no completion has been defined. If this function returns 124, programmable completion is attempted again, allowing a user to dynamically build a set of completions as completion is attempted by having the default completion function install individual completion functions each time it is invoked. h. When displaying associative arrays, subscripts are now quoted. i. Changes to dabbrev-expand to make it more `emacs-like': no space appended after matches, completions are not sorted, and most recent history entries are presented first. j. The [[ and (( commands are now subject to the setting of `set -e' and the ERR trap. k. The source/. builtin now removes NUL bytes from the file before attempting to parse commands. l. There is a new configuration option (in config-top.h) that forces bash to forward all history entries to syslog. m. A new variable $BASHOPTS to export shell options settable using `shopt' to child processes. n. There is a new confgure option that forces the extglob option to be enabled by default. o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace output to that file descriptor. p. If the optional left-hand-side of a redirection is of the form {var}, the shell assigns the file descriptor used to $var or uses $var as the file descriptor to move or close, depending on the redirection operator. q. The < and > operators to the [[ conditional command now do string comparison according to the current locale. r. Programmable completion now uses the completion for `b' instead of `a' when completion is attempted on a line like: a $(b c. s. Force extglob on temporarily when parsing the pattern argument to the == and != operators to the [[ command, for compatibility. t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is received and a trap on SIGCHLD is set to be Posix-mode only. u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS characters, ignoring delimiters like newline. 4. New Features in Readline a. New bindable function: menu-complete-backward. b. In the vi insertion keymap, C-n is now bound to menu-complete by default, and C-p to menu-complete-backward. c. When in vi command mode, repeatedly hitting ESC now does nothing, even when ESC introduces a bound key sequence. This is closer to how historical vi behaves. d. New bindable function: skip-csi-sequence. Can be used as a default to consume key sequences generated by keys like Home and End without having to bind all keys. e. New application-settable function: rl_filename_rewrite_hook. Can be used to rewite or modify filenames read from the file system before they are compared to the word to be completed. f. New bindable variable: skip-completed-text, active when completing in the middle of a word. If enabled, it means that characters in the completion that match characters in the remainder of the word are "skipped" rather than inserted into the line. g. The pre-readline-6.0 version of menu completion is available as "old-menu-complete" for users who do not like the readline-6.0 version. h. New bindable variable: echo-control-characters. If enabled, and the tty ECHOCTL bit is set, controls the echoing of characters corresponding to keyboard-generated signals. i. New bindable variable: enable-meta-key. Controls whether or not readline sends the smm/rmm sequences if the terminal indicates it has a meta key that enables eight-bit characters.
2009-09-04Remove code that triggers parsing bugs in older gccs (e.g. onwiz2-1/+21
NetBSD-3.1/amd64). Reported by Michael Lambert and David A. Holland.
2009-09-04Set LICENSE.wiz1-1/+2
2009-08-06Update to 4.0.28. Bugfixes.hasso2-4/+17
2009-07-19needs termcap (uses tputs(3))tnn1-1/+2
2009-06-05Update to 4.0.24. Following bugs were fixed since 4.0.10:hasso2-4/+48
When using the ** globbing operator, bash will incorrectly add an extra directory name when the preceding directory name ends with `*' or an empty string when there is no preceding directory name. If the prompt length exactly matches the screen width, and the prompt ends with invisible characters, readline positions the cursor incorrectly. When parsing case statements in command substitutions, the shell did not note that a newline is a shell metacharacter and can legally be followed by a reserved word (e.g., `esac'). When not in a locale supporting multibyte characters, readline will occasionally not erase characters between the cursor position and the end of the line when killing text backwards. If a SIGWINCH arrives while bash is performing redisplay, multi-line prompts are displayed incorrectly due to the display code being called recursively. Using an external command as part of the DEBUG trap when job control is enabled causes pipelines to misbehave. The problem has to do with process groups assigned to the pipeline and terminal. A missing include file results in an empty function definition and a no-op when checking whether or not the window size has changed. Adding a null line to a here-document (e.g., by hitting EOF) causes the shell to dump core attempting to dereference the NULL pointer. There are several problems with the handling of $LINENO in an ERR trap. Deferring handling of signals which should cause the shell to terminate until it is "safe" to run the handler functions does not work for some terminating signals. When the fc builtin is run in a command substitution from a shell with history enabled, it does not correctly calculate the command on which to operate. Though references to $@ when there are no positional parameters will now cause the shell to exit if the `errexit' option has been enabled, constructs such as ${@:-foo} should not cause an exit. A case statement using the ;& pattern terminator followed immediately by "esac" caused a core dump due to a null pointer dereference. When using the new |& operator following a simple command with a redirection, the redirection of stderr through the pipe was not performed under certain circumstances.
2009-05-20Recursive ABI depends update and PKGREVISION bump for readline-6.0 shlibwiz1-1/+2
major change. Reported by Robert Elz in PR 41345.
2009-03-31Remove conditional to use bison in case of IRIX, it's used anyway now.hasso1-6/+1
2009-03-31* Update to the latest patchversion 4.0.10, it fixes several segfaults inhasso2-6/+41
routine usage. * Switch from yacc to bison. Yacc is known to cause problems: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00115.html