9 - in array_insert(), make sure the value to be added is non-NULL before
10 calling savestring() on it
13 - fix description of `CDPATH'
15 lib/readline/display.c
16 - when expanding a prompt that spans multiple lines with embedded
17 newlines, set prompt_physical_chars from the portion after the
18 final newline, not the preceding portion. Bug reported by
19 "Ralf S. Engelschall" <rse@engelschall.com>
22 - explicitly declare `lineno' in function prologue for make_case_command
25 - include `trap.h' for declaration for run_return_trap
28 - fix a `return' without a value in enable_hostname_completion
31 - include test.h for extern declaration for test_eaccess
34 - add declaration for zcatfd
36 tests/{history,histexp}.tests
37 - unset HISTFILESIZE to avoid problems if a value of 0 is inherited
43 - small changes to glob_expand_word to perform tilde expansion before
47 - fix the install-help target to not cd into the `helpfiles'
48 subdirectory, so a value of $INSTALL_DATA containing a relative
49 pathname (e.g., .././support/install.sh) remains valid
54 - new function, mbstrlen(s), returns length of a multibyte character
58 - new macro, MB_STRLEN(s), calls mbstrlen or STRLEN as appropriate
61 - small change so that a first argument that's a valid signal number
62 (digits only -- no symbolic names) will be treated as a signal and
63 reverted back to the original handling disposition. Fixes debian
67 - call MB_STRLEN instead of STRLEN where appropriate in
68 parameter_brace_expand_length to handle multibyte characters properly
69 - call MB_STRLEN instead of strlen in verify_substring_values so that
70 negative substrings of strings with multibyte chars work properly
75 - describe_pid needs to write to stderr, not stdout (POSIX)
76 - start_job, since it's only used by builtins (fg/bg), needs to write
77 its output to stdout, not stderr (POSIX)
80 - add an `orig_flags' member to struct terminating_signal so the
81 original signal handling flags (SA_RESTART, etc.) can be preserved
83 - make sure to preserve the signal flags state in
84 initialize_terminating_signals and reset them for child processes
85 in reset_terminating_signals
88 - fixed an off-by-one error that caused `fc -l' to list one too many
90 - in posix mode, `fc' should not list any indication as to whether or
91 not history lines have been modified (POSIX)
92 - when in posix mode, the default editor for `fc' should be `ed' (POSIX)
95 - updated the description of `trap' behavior when given a first
96 argument that is a valid signal number
97 - noted that `fc -l' won't indicate whether a history entry has been
98 modified if the shell is in posix mode
101 - fixed bug: `command -v' is supposed to be silent if a command is not
105 - `hash' should print its `hash table empty' message to stderr
108 - back out 7/7 change to _rl_maybe_save_line; it breaks emacs-mode ^P
111 - changed base_pathname so that it will return reasonable results for
112 non-absolute pathnames -- this is what is intended by all of its
116 - fix array_variable_part to return NULL if it finds an invisible
117 variable in the hash table. Fixes seg fault caused by referring to
118 unset local variable using array notation
121 - support LC_TIME as a special locale variable so HISTTIMEFORMAT tracks
127 - fixed small memory leak in makunbound() when a local array variable
128 is unset. Fix from William Park
130 lib/readline/display.c
131 - fixed a problem when computing the number of invisible characters on
132 the first line of a prompt whose length exceeds the screen width
133 (should only happen when invisible characters occur after the
134 line wrap). Bug reported by agriffis@gentoo.org
137 - `command -V' passes a new flag, CDESC_ABSPATH, which means to convert
141 - in posix mode, `type' and `command -v/-V' should not report
142 non-executable files, even if the execution code will attempt to
143 run them. Other posix shells do this
146 - add note to POSIX Mode section describing behavior of type and command
147 when finding a non-executable file
150 - force extended_glob to 1 before calling binary_test in
151 execute_cond_node so that the right extended pattern matching gets
157 - make sure lhs[0] and rhs[0] are cast to `unsigned char' so chars
158 with values > 128 are handled correctly
161 - change bexpand() and printstr() to handle strings with a leading
162 '\0' whose length is non-zero, since that's valid input for the
163 `%b' format specifier
166 - fix a couple of instances of find_variable that didn't check the
167 result for an invisible variable
170 - BASH_ARGC, BASH_ARGV, BASH_SOURCE, BASH_LINENO no longer created as
174 - make sure COMP_WORDS is not invisible when bind_comp_words returns
175 - ditto for COMPREPLY in gen_shell_function_matches
180 - fix problem where ${ was ignored but did not increment the open
181 brace count. Bug reported by Tim Waugh <twaugh@redhat.com>
184 - if make_local_variable finds a variable in the correct context in
185 the right variable scope, make sure it's not invisible before
191 - fixed usage message to show `action' as not optional, though it
192 actually is when not in posix mode (for a single argument)
197 - kfreebsd-gnu has had its sbrk() problems fixed, and no longer needs
198 to be configured --without-gnu-malloc
200 lib/readline/vi_mode.c
201 - in rl_vi_search, free any saved history line before starting the
202 search, so failure leaves you at that line, not the last line in
203 the history (assuming the current line is not the last history line).
204 Fix from llattanzi@apple.com to replace fix of 7/7
209 - renamed `mostly-clean' target to `mostlyclean'
213 lib/readline/vi_mode.c
214 - make same change for EOL in multibyte character case of
220 - in verify_substring_values, fix off-by-one error checking bounds of
221 `offset', esp. in array values (e.g., getting the highest element
227 - change BASH_CHECK_DEV_FD to make sure that file descriptors > 2 are
228 accessible via /dev/fd, unlike FreeBSD 5.x
231 - make sure `zone' is initialized with gettimeofday before it is used
232 - work around HPUX lack of `altzone' and differing definitions of
236 - internal_memalign and memalign now take a `size_t' as their first
237 argument, which seems to be the prevailing standard
239 lib/malloc/{malloc.c,shmalloc.h}
240 - change sh_memalign to take a `size_t' as its first argument
243 - if posixly_correct and xpg_echo are both set, don't try to interpret
244 any arguments at all, as POSIX/XOPEN requires (fix inspired by Paul
248 - amend description of bash posix mode to include new echo behavior
251 - allow bg to take multiple job arguments, as posix seems to specify,
252 placing them all in the background, returning the status of the last
253 one as the status of `bg'
256 - fix _rl_vi_change_mbchar_case (multibyte-char version of `~'
257 command) to have the right behavior at EOL -- handle case where vi
258 mode backs up at the end of the line
263 - check for an empty array in array_rshift before shifting elements
264 and adjusting max_index
265 - check for null array in array_subrange
268 - fix raw_job_exit_status to not ignore exit status of the last
269 process in the pipeline when `set -o pipefail' is enabled
273 lib/readline/mbutil.c
274 - make sure _rl_find_next_mbchar_internal has a valid multibyte
275 character before it checks whether or not it's a zero-width
276 wide character and adjusts point accordingly
281 - new function, bash_directory_expansion, duplicates the expansions
282 performed on the directory name by rl_filename_completion_function
283 - call bash_directory_expansion in command_word_completion_function
284 if we decide we're doing tilde expansion (and any other
285 canonicalization) on the directory name being completed
290 - use new-style AC_CHECK_HEADER to check for sys/ptem.h (which requires
291 sys/stream.h). The correct checks are in the code, but autoconf
292 complains if sys/stream.h is not included, rather than simply
293 checking for the header's presence
298 - fix a bug that prevented `hash -d' from working right (as soon as
299 hash removed a command from the table, the bug caused it to be added
304 doc/{bash.1,bashref.texi}
305 - explicitly note that conditional primaries that operate on files
306 operate on the targets of symbolic links rather than the links
311 lib/readline/display.c
312 - fix multibyte calculation of `physchars' in prompt expansion, to
313 handle double-width multibyte characters correctly
314 - changes to rl_redisplay to handle prompts longer than the screenwidth
315 that might contain double-width multibyte characters. Fixes from
321 - change word_list_split to avoid really bad behavior caused by calling
322 list_append for each split word -- as the list gets long, you have
323 to traverse it every time. Keep a pointer to the end of the list and
324 and just tack onto it
328 lib/readline/complete.c
329 - change fnprint to calculate the displayed width of a filename in
330 the same way as fnwidth
333 - in verify_substring_values, when expanding ${array[@]:offset}, make
334 sure negative offsets count from one greater than the array's
335 maximum index so things like ${x[@}: -1} work to give the last element
336 (requires fixing array tests)
339 - new error function, sh_wrerror(), for builtins to call when a write
343 - extern declaration for sh_wrerror()
346 - change builtin_error call to use sh_wrerror()
349 - report write errors with sh_wrerror() instead of just returning
353 - change printstr to return failure (-1) or success (0) indication
355 - report write errors when printstr() fails, return failure
356 - if any of the PF/printf calls fail, report write error and return
360 - change execute_in_subshell so the subshell command inherits the
361 command timing flags from the enclosing COMMAND *
365 [prayers for the victims of 9/11/2001]
368 - new file, implementation of GNU libc extension function strnlen
370 lib/sh/Makefile.in, {config.h,configure,Makefile}.in, MANIFEST
371 - changes for strnlen
374 - version changed to 3.1-devel
376 doc/bash.1, lib/readline/doc/rluser.texi
377 - added description of `-o plusdirs' to complete/compgen (thanks,
381 - new parser_state flag, PST_ASSIGNOK, if set indicates we're parsing
382 arguments to a builtin that accepts assignment statement arguments
383 - turn on PST_ASSIGNOK in read_token_word when appropriate
384 - turn off PST_ASSIGNOK in read_token when appropriate
385 - don't attempt to parse a compound assignment specially unless we're
386 in a position where an assignment statement is acceptable, or
392 - make BASH_ARGC, BASH_ARGV, BASH_LINENO, and BASH_SOURCE
393 non-unsettable, since the shell uses those values internally
396 - make exponentiation right-associative, as is apparently correct
401 - make sure convert_var_to_array marks the environment as needing
402 recreation if the converted variable was exported
407 - mark ${ as introducing an additional level of braces only if it's
408 not in a quoted string -- quoted strings are handled before brace
412 - fixed an obscure problem in history_delimiting_chars where the `in'
413 in a case statement could have a semicolon added after it, if the
414 `case word' was on a previous line
417 - support for newest versions of tandem non-stop kernel
419 lib/readline/display.c
420 - in compute_lcd_of_matches, explicitly cast `text' to `char *' before
421 passing it to rl_filename_dequoting_function
423 lib/readline/terminal.c
424 - bind the key sequence sent by the keypad `delete' key to delete-char
425 (same as ^D in emacs mode)
428 - in print_all_limits, don't print anything if get_limit returns
429 -1/EINVAL, indicating that the kernel doesn't support that particular
431 - add -i (max number of pending signals), -q (max size of posix msg
432 queues), -x (max number of file locks) for systems (Linux) that
435 doc/{bash.1,bashref.texi}
436 - fix description of correspondence between FUNCNAME, BASH_LINENO,
437 and BASH_SOURCE indices in description of BASH_LINENO
442 - don't quote CTLESC and CTLNUL with CTLESC in sh_backslash_quote, as
443 long as the resultant string never gets sent to the word expansion
444 functions without going through the shell parser
447 - add extern declarations for strnlen and strpbkrk from lib/sh
450 - changes to handle case where IFS consists of multibyte characters.
451 Changed: string_extract_verbatim, split_at_delims,
452 string_list_dollar_star, string_list_dollar_at, list_string,
453 get_word_from_string, setifs
458 - change file_mod_date_changed to reset the cached mail file data if
459 the file size drops to zero
461 lib/readline/complete.c
462 - change append_to_match so that a non-zero value for
463 rl_completion_suppress_append will cause no `/' to be appended to a
467 - experimental change to suppress appending a slash for a completed
468 filename that is found in PATH as well as a directory in the current
469 directory under certain circumstances: a single instance found in
470 $PATH when `.' is not in $PATH, and multiple instances found in the
471 $PATH, even when `.' is in the $PATH
476 - new word flag: W_ASSIGNRHS, means word is rhs of assignment statement
477 - new word flag: W_NOTILDE, means word is not to be tilde expanded
478 - new word flag (internal): W_ITILDE, means the next character is a
479 tilde that should be expanded
482 - new set of tilde suffixes for use when parsing the RHS of an
483 assignment statement and =~ should not be subject to tilde expansion
484 - if ASSIGN_P argument to bash_tilde_expand is 2, use tilde prefixes
485 for parsing RHS of assignment statement
488 - new function bash_tilde_find_word, drop-in replacement for
492 - call bash_tilde_expand with secord argument of 2 when expanding rhs
493 of an assignment statement, so tildes after second and subsequent
494 `=' in an assignment are not expanded
495 - new function, expand_string_assignment, to expand the rhs of an
497 - add `~' to EXP_CHAR, the characters that will cause the word
498 expansion functions to be called
499 - move tilde expansion into expand_word_internal instead of many
500 different calls to bash_tilde_expand scattered across different
501 functions. NOTE: This means that double quotes surrounding a
502 {paramOPword} expansion will cause tilde expansion to NOT be
503 performed on `word'. I think this is right, what POSIX specifies,
504 and consistent with the behavior of other characters in the rhs
507 - take out calls to bash_tilde_expand before calling word expansion
513 - make sure to call UNBLOCK_CHILD before returning on a pipe creation
514 failure in execute_pipeline
519 - change get_bash_command to deal with the_printed_command_except_trap
523 - fix execute_simple_command to deal with the_printed_command being
524 NULL when assigning to the_printed_command_except_trap -- fixes
525 seg fault in savestring()
528 - change the parser so that the closing `)' in a compound variable
529 assignment delimits a token -- ksh93 does it this way
531 doc/{bash.1,bashref.texi}
532 - change description of tilde expansion to note that expansion is
533 attempted only after the first =~ in an assignment statement
536 - when assigning to an array variable with declare -a x=(...), make
537 sure the last character in the rhs of the variable assignment is
538 `)', not just that it appears somewhere
543 - add a `W_NOEXPAND' flag to inhibit all expansion except quote removal
544 - add a `W_COMPASSIGN' flag to denote a word is a compound assignment
548 - set W_COMPASSIGN on words that appear to be compound assignments
551 - pass W_NOXPAND and W_COMPASSIGN through end of expand_word_internal
554 - new function, expand_assignment_string_to_string, calls
555 expand_string_assignment and then string_list on the result
558 - assign_in_env now calls expand_assignment_string_to_string
563 - change get_job_spec so the null job `%' once again means the current
569 - do_assignment_internal now takes a WORD_DESC * as its first
570 argument, and uses its `word' member as the assignment string
571 - change expand_word_list_internal to call do_word_assignment instead
572 of do_assignment, passing it `word' instead of, e.g., `word->word'
573 - change extract_array_assignment_list to just return the passed
574 string minus a trailing `)' if the last character is a right
576 - change do_assignment_internal to call extract_array_assignment_list
579 - change do_assignment and do_assignment_no_expand to take a `char *'
580 instead of `const char *' first argument; change extern prototypes
581 - new function, do_word_assignment, takes a WORD_DESC * and calls
582 do_assignment_internal on it; add extern declaration with prototype
585 - new typedef, sh_wassign_func_t, like sh_assign_func_t but takes a
586 WORD_DESC * as its first argument
589 - assign_in_env now takes a WORD_DESC * as its first argument
594 - new word flag, W_ASSNBLTIN, denotes that the word is a builtin
595 command (in a command position) that takes assignment statements
596 as arguments, like `declare'
597 - new word flags, W_ASSIGNARG, denotes that word is an assignment
598 statement given as argument to assignment builtin
601 - set W_ASSNBLTIN flag in fix_assignment_words if necessary (if there
602 are any arguments that are assignment statements)
603 - set W_ASSIGNARG flag in fix_assignment_words if necessary
606 - new function, do_compound_assignment, encapsulates the necessary
607 code to perform a compound array assignment (including creation of
608 local variables); called from do_assignment_internal
609 - to fix the double-expansion problem with compound array assignments
610 that are arguments to builtins like `declare', changed
611 shell_expand_word_list to treat those arguments like assignment
612 statements (with proper creation of local variables inside shell
613 functions) and pass the attribute-setting portion of the statement
614 onto the builtin. This is what ksh93 appears to do, from inspection
615 of the `ksh93 -x' output
618 - fix execute_simple_command: in case of pipeline or async command,
619 when forking early, set `subshell_environment' so that it can contain
620 both SUBSHELL_PIPE and SUBSHELL_ASYNC -- the two should not be
621 mutually exclusive. Fixes bug reported by pierre.humblet@ieee.org
622 - remove references to last_pid, old_command_subst_pid; use NO_PID as
623 a sentinel value to decide whether or not a child process has been
624 created and needs to be waited for. Submitted by
625 pierre.humblet@ieee.org to fix recycling-pid problem on cygwin
627 doc/{bash.1,bashref.texi}
628 - fixed documentation of `@(pattern)' extended globbing operator --
629 it succeeds if the string matches one of the patterns, not exactly
630 one. This is what ksh93 does, too
632 lib/readline/complete.c
633 - fixed rl_menu_complete so that a negative argument cycles backwards
639 - use W_COMPASSIGN flag in do_assignment_internal instead of deciding
640 lexically which assignments are compound array assignments
645 - additions for System V.5 from Boyd Gerber <gerberb@zenez.com>
648 - in command_substitute, if subshell_environment includes
649 SUBSHELL_ASYNC, call make_child with the `async_p' argument set to
650 non-zero. This keeps command substitutions for async commands or
651 pipelines from trying to give the terminal back to the shell's
652 pgrp. make sure to save and restore last_asynchronous_pid. Fix
653 suggested by <pierre.humblet@ieee.org>
658 - add a placeholder definition for WCONTINUED_BROKEN
663 - add BASH_CHECK_WCONTINUED, checks for glibc bug where WCONTINUED is
664 defined but rejected as invalid by waitpid(2)
667 - add call to BASH_CHECK_WCONTINUED, defines WCONTINUED_BROKEN
670 - experimental change to add_undo_redirect to save manipulations to
671 file descriptors >= SHELL_FD_BASE (10) on the list of redirections
672 to be undone even if `exec' causes the list to be discarded
674 doc/{bash.1,bashref.texi}
675 - note that redirections using file descriptors > 9 should be used
676 carefully, because they might conflict with file descriptors the
677 shell uses internally
682 - fix pipeline_command production to handle case where `pipeline'
683 as `argument' of `!' or `time' is null (e.g., a syntax error not
684 handled by the grammar)
688 lib/readline/readline.c
689 - new internal variable, _rl_bind_stty_chars; if non-zero, bind the
690 terminal special characters to readline equivalents at startup
691 - change readline_default_bindings() and reset_default_bindings() to
692 understand _rl_bind_stty_chars
694 lib/readline/rlprivate.h
695 - new extern declaration for _rl_bind_stty_chars
698 - change rl_prep_terminal to add support for _rl_bind_stty_chars
703 - new bindable variable, `bind-tty-special-chars', bound to value of
706 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
707 - documented new readline variable `bind-tty-special-chars'
710 - make the first check for option `--' skip the rest of option
716 - change sh_set_lines_and_columns to prefer setenv, which has
717 predictable memory allocation behavior, to putenv, which does not
722 - change push_exported_var so that a tempenv variable has to have the
723 export attribute set (which they all do -- something to look at) and
724 the `propagate' attribute set to be propagated down to the next
728 - change execute_builtin so that if CMD_COMMAND_BUILTIN is set in the
729 passed flags argument, call pop_scope with a value that says the
730 builtin is not special, since `command' means that preceding variable
731 assignments don't persist in the environment. Fixes problem with
732 variable assignments preceding command preceding special builtin
733 keeping those variable assignments around (when in posix mode)
738 - new function, sh_mkdoublequoted, brackets a given string with
739 double quotes and returns a new string. Flags argument, if non-
740 zero, means to quote embedded double quotes with backslashes
743 - new extern declaration for sh_mkdoublequoted
746 - use sh_mkdoublequoted after calling localeexpand()
749 - change ansicstr to understand that (flags & 4) != 0 means to remove
750 backslash from unrecognized escape sequences
753 - fix logic problem in assignment() that caused non-variable-starter
754 characters to be allowed, resulting in things like `1=xxx' creating
755 a variable `1' in the hash table
760 - don't call programmable_completions with an assignment statement
766 - in prepare_terminal_settings, turn echoing on (readline_echoing_p)
767 if get_tty_settings fails because the input is not a terminal
772 - include rlmbutil.h for multibyte definitions
773 - new function, _rl_walphabetic, wide char version of rl_alphabetic
775 lib/readline/mbutil.c
776 - new function, _rl_char_value(buf, ind), returns value of (possibly
777 multibyte) character at buf[ind]
779 lib/readline/rlmbutil.h
780 - extern defines for _rl_walphabetic and _rl_char_value for when
781 multibyte chars are not being used
782 - new wrapper definitions for _rl_find_next_mbchar (MB_NEXTCHAR) and
783 _rl_find_prev_mbchar (MB_PREVCHAR) that try to avoid unneeded
787 - fix rl_foward_word to work with multibyte characters (or in a
788 multibyte locale) using above utility functions
789 - fix rl_backward_word to work with multibyte characters (or in a
790 multibyte locale) using above utility functions
795 - fix parse_matched_pair so that it doesn't swallow \<newline> when
796 parsing a $'...' construct (call shell_getc with different arg)
801 - after some (compiled-in) threshold, glob_vector will stop using
802 alloca to allocate `struct globval's and will switch to using
803 malloc, with appropriate cleanup before returning
806 - don't expand tildes after `=' in expand_word_internal, even if the
807 W_TILDEEXP flag is set, unless it's the first tilde in a word
813 - make sure rl_point doesn't go below 0 in rl_delete_horizontal_space
814 (from SUSE, but not sent in)
817 - make sure shell_is_restricted skips over a single leading `-' in
818 the shell name (from SUSE, but not sent in)
820 lib/readline/display.c
821 - disable `fast redisplay' at the end of the line if in a locale that
822 supports multibyte characters (from SUSE, but not sent in)
824 lib/readline/histexpand.c
825 - fix a problem with finding the delimiter of a `?' substring when
826 compiled for multibyte characters (from SUSE, but not sent in)
830 lib/readline/display.c
831 - correct some assignments to _rl_last_c_pos: when in a multibyte
832 locale, it's used as an absolute cursor position; when not using
833 multibyte characters, it's a buffer offset. I should have caught
834 this when the multibyte character support was donated
839 - change `assignment()' to accept `+=' assignment operator
842 - bind_array_variable and assign_array_element both take a new `flags'
844 - assign_array_var_from_string, assign_array_from_string, and
845 assign_array_var_from_word_list now all take a new `flags' argument
846 - change assign_array_var_from_word_list to understand how to append
848 - change assign_array_var_from_string to understand how to append
849 to an array variable. It does not unset the previous value if
850 appending, allowing both old values to be changed and new ones to
854 - new flag #defines to use for evaluating assignment statements
856 {subst,variables}.c, builtins/{declare,read}.def
857 - change callers of assign_array_element and bind_array_variable
858 - change do_compound_assignment to understand assignment flags
859 - change do_assignment_internal to set assignment flags and pass them
860 to underlying functions
862 pcomplete.c,builtins/{declare,read}.def
863 - fix callers of assign_array_var_from_string, assign_array_var_from_word_list
866 - make_variable_value now takes a new `flags' argument
867 - make_variable_value now understands how to append to a particular
868 variable, using the old value
869 - bind_variable_value now takes a new `flags' argument
870 - change make_variable_value to understand ASS_APPEND flag
871 - bind_variable now takes a new `flags' argument
872 - bind_variable_internal now takes a new `flags' argument
875 - change callers of make_variable_value to add flags arg
878 - change callers of bind_variable_value to add flags arg
880 {execute_cmd,mailcheck,pcomplete,shell,subst,variables}.c,parse.y
881 builtins/{cd,command,declare,getopts,read,set,setattr}.def
882 - change callers of bind_variable to add flags arg
885 - change callers of bind_variable_internal
886 - change bind_variable_internal to pass assignment flags on to
888 - change assign_in_env to treat `var+=value' like `var=value'
891 - break code that actually constructs the new value and assigns it
892 to a particular array index out into a new functions:
893 bind_array_var_internal. This fakes out make_variable_value by
894 passing a dummy SHELL_VAR * so it can do proper appending and other
896 - changes to assign_array_var_from_string to accept and process as if
897 they were `standalone' assignment statements array assignment words
898 of the form [ind]+=val
903 - added support for `declare [flags] var+=value'. `Flags' are applied
904 before the assignment is performed, which has implications for things
905 like `-i' -- if -i is supplied, arithmetic evaluation and increment
909 - add support for `+=' assignment for rest of `assignment builtins':
914 lib/readline/display.c
915 - make sure prompt_physical_chars and prompt_invis_chars_first_line
916 are reset to 0 if the prompt string passed to rl_expand_prompt is
921 {configure,config.h}.in
922 - check for `raise', define HAVE_RAISE if available
924 lib/intl/dcigettext.c
925 - make sure `raise' is defined if HAVE_RAISE is not before
926 eval-plurah.h is included
929 - put extern declaration for imalloc_fopen inside the MALLOC_TRACE
935 - make sure SHELL is defined to cpp
937 lib/intl/dcigettext.c
938 - make sure we use getcwd() even if HAVE_GETCWD is not defined after
939 including config.h; if SHELL is defined, #define HAVE_GETCWD
944 - new function, int signal_in_progress(int sig), returns TRUE if the
945 trap handler for signal SIG is currently executing
950 - slightly change do_redirection_internal to set the close-on-exec
951 flag for file descriptors > 2 used to save file descriptors < 2
952 using explicit redirections (e.g., `exec 3>&1'). This keeps file
953 descriptors pointing to pipes from being left open but doesn't
954 change the shell's file descriptor semantics
958 doc/{bash.1,bashref.texi}
959 - correct some minor typos, forwarded from doko@debian.org
963 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
964 - documented detail that yank-last-arg and yank-nth-arg use the history
965 arg expansion code (and, as a result, are subject to restrictions
966 of the history-comment character)
971 - changes so that BASH_COMMAND preserves its value into a DEBUG trap:
972 for commands, arithmetic for command expressions, select commands,
973 case commands, (( commands, [[ commands, simple commands
977 doc/{bash.1,bashref.texi}
978 - changed description of `set' builtin slightly so that it is clear
979 that only variables are displayed in posix mode and that read-only
980 variables can't be reset by simply sourcing the output of `set'
983 - don't try to redefine `inline' if it's already defined
988 - fix execute_function to check funcname_a after function execution,
989 since FUNCNAME can be changed or unset within a function
994 - make same changes as 11/26, this time to _evalfile
997 - change execute_function to run the return trap after a function
998 completes execution even if the shell is compiled without DEBUGGER
1002 - change reset_or_restore_signal_handlers so that the RETURN trap is
1003 not inherited by command substitution when DEBUGGER is not defined
1008 - fix memory leaks in _rl_free_history_entry and rl_maybe_replace_line
1009 caused by not freeing `timestamp' member of history entry
1010 - make sure timestamp is initialized to NULL in rl_maybe_save_line
1015 - fix execute_function so a function calling `return' will run the
1016 RETURN trap, if one's defined
1018 doc/{bash.1,bashref.texi}
1019 - fix description of RETURN trap in various places to indicate that it's
1020 only inherited by shell functions if function tracing is on globally
1021 or has been enabled for that function
1022 - fix documentation to indicate that the DEBUG and RETURN traps are
1023 inherited under the same conditions
1026 - a function does not inherit the RETURN trap if a DEBUG trap is
1031 lib/glob/xmbsrtowcs.c
1032 - change xmbsrtowcs to handle the one case where malloc can fail
1033 (though it should not matter) -- don't try to free a null pointer
1038 - fix get_var_and_type to handle var[@], where `var' is a scalar
1039 variable, identically to var -- all calling expansions can now
1040 handle var[@] like var. Bug reported by agriffis@gentoo.org
1045 - make new-style "\M-x" keybindings obey `convert-meta' settings
1046 (bug reported by twaugh@redhat.com)
1051 - added description of `-' option to help text
1054 - fix bug that caused `gnu_errfmt' to not be compiled in unless
1060 - fixed a typo in string_extract_verbatim in first call to MBLEN
1061 (used `slen - 1' instead of `slen - i')
1066 - avoid some calls to strlen if the value is only being used for
1067 ADVANCE_CHAR and MB_CUR_MAX == 1 (since ADVANCE_CHAR doesn't need
1068 it unless multibyte characters are possible)
1069 - change string_extract_verbatim so it takes the length of the string
1070 as a parameter, so we don't have to recompute the length of the same
1071 string over and over again when doing word splitting (that kills if
1077 - in string_list_dollar_star, make sure to null-terminate the
1078 separator if the character is longer than one byte
1082 doc/{bash.1,bashref.texi}
1083 - changed text in quoting section explaining that double quotes do
1084 not prevent history expansion from taking place, and that backslashes
1085 escaping ! are not removed
1090 - set gnu_error_format to 1 if running under emacs. This should allow
1091 the emacs `next-error' stuff to work, at least for interactive shells
1094 - change yy_stream_get to set interrupt_immediately before calling
1095 getc_with_restart when the shell is interactive. This avoids the
1096 synchronization problem caused by the call to QUIT in read_a_line,
1097 which results in the first character after a SIGINT/^C to be
1102 builtins/mkbuiltins.c
1103 - changes to write long documentation to arrays as a single string by
1104 default, rather than an array of strings -- enabled by default
1105 - new option, -S, to restore old behavior of writing multiple strings
1106 for long documentation
1107 - changes to avoid filenames written when the separate-filenames option
1108 (-H) has been supplied being run through gettext
1111 - new cofiguration option, --enable-single-help-strings (on by default),
1112 causes help text to be stored as a single string (or smaller set than
1113 one string per line)
1115 builtins/Makefile.in
1116 - pass `-S' to mkbuiltins if single-help-strings is turned off
1119 - documented new `single-help-strings' configure option
1124 - make wait_for return a non-zero status if the job or processed
1125 waited for is suspended. Returns 128 + stop signal. This fixes
1126 the problem with `echo one && sleep 5 && echo two' displaying
1127 `two' after the sleep is suspended
1132 - change indirection_level_string so the code duplicates the first
1133 character of $PS4 to indicate the indirection level, rather than
1139 - new special variable hook function for COMP_WORDBREAKS; sets
1140 rl_completer_word_break_characters back to NULL when the variable
1142 - change bind_variable_value to understand dynamic variables with
1143 assign_function set, and handle them correctly. If the variable is
1144 being appended to, use make_variable_value to create the new
1146 - change bind_variable_internal to understand dynamic variables with
1147 assign_function set, and handle them the same way
1148 - RANDOM and LINENO now get the integer attribute, so appending works
1150 - ditto for HISTCMD, MAILCHECK, OPTIND
1152 lib/readline/display.c
1153 - change _rl_make_prompt_for_search to set prompt_physical_chars
1155 - rl_save_prompt and rl_restore_prompt save and restore
1156 prompt_prefix_length
1157 - change redraw_prompt to use rl_save_prompt and rl_restore_prompt
1158 - change rl_restore_prompt to set the `save' variables back to
1159 NULL/0 so code can check whether or not the prompt has been saved
1160 - change rl_message and rl_clear_message to save and restore the
1161 prompt if the caller has not already done it (using a simple
1162 semaphore-like variable)
1163 - change rl_message to call expand_prompt, so that local_prompt and
1164 local_prompt prefix are set before calling the redisplay functions,
1165 in case the prompt is longer than a screenwidth (fixes bug
1166 reported to debian by epl@unimelb.edu.au)
1168 lib/readline/doc/rltech.texi
1169 - make sure to note that rl_save_prompt should be called before
1170 rl_message, and rl_restore_prompt before rl_clear_message
1173 - make sure to save and restore the parser state around the call to
1174 execute_shell_function in gen_shell_function_matches. Fixes bug
1175 reported by a050106.1.keeLae3x@captaincrumb.com (cute)
1177 lib/readline/readline.c
1178 - fix _rl_dispatch_subseq in the case where we're recursing back up
1179 the chain (r == -2) and we encounter a key shadowed by a keymap,
1180 but originally bound to self-insert. Calling rl_dispatch with
1181 ANYOTHERKEY as the first argument will call rl_insert, but with
1182 ANYOTHERKEY (256) as the char to insert. Use the shadow keymap
1183 and set things up to dispatch to rl_insert with the shadowed key
1184 as the argument. Fixes the bug reported by Thomas Glanzmann
1185 (sithglan@stud.uni-erlangen.de)
1190 - new word flag: W_HASQUOTEDNULL
1193 - new function to allocate a WORD_DESC * without doing anything with a
1194 containing string: alloc_word_desc
1197 - extern declaration for alloc_word_desc
1200 - new function to just free a WORD_DESC * without freeing the contained
1201 string: dispose_word_desc
1204 - extern declaration for dispose_word_desc
1207 - change some places to use alloc_word_desc
1208 - make same changes to word_list_quote_removal as were made to
1210 - set W_HASQUOTEDNULL when a word is created with w->word[0] ==
1211 CTLNUL and w->word[1] == '\0'
1214 - parameter_brace_expand_word now returns a WORD_DESC * -- changed
1215 callers to understand
1216 - parameter_brace_expand_indir now returns a WORD_DESC * -- changed
1217 callers to understand
1218 - parameter_brace_expand_rhs now returns a WORD_DESC * -- changed
1219 callers to understand
1220 - remove W_HASQUOTEDNULL from a word's flags when remove_quoted_nulls
1221 is called on the word's enclosed string
1226 - param_expand now returns a WORD_DESC * -- changed callers to
1228 - parameter_brace_expand now returns a WORD_DESC * -- changed
1229 callers to understand
1230 - in expand_word_internal, only call remove_quoted_nulls after a word
1231 is returned with W_HASQUOTEDNULL
1232 - changes to pass W_HASQUOTEDNULL flag out of expand_word_internal;
1233 changed callers to call remove_quoted_nulls only if return value has
1234 W_HASQUOTEDNULL set. This is a mostly-complete fix for the
1235 long-standing CTLNUL confusion between a quoted null expansion and
1236 the expansion of a variable with a literal '\177' in its value
1237 - change string_list_dollar_at to compute the separator character the
1238 same way as string_list_dollar_star: using the already-computed
1239 values generated in setifs()
1240 - when expanding unquoted $*, if $IFS is empty, check whether or not
1241 we're eventually going to split the results (e.g., on the rhs of an
1242 assignment statement) and concatenate the positional parameters as
1243 if the expansion were within double quotes if we're not going to
1247 - test cases based on old bug reports about the quoted-null vs. 0177
1248 problem the recent code fixes
1253 - set w->word to 0 before putting a WORD_DESC * back in the cache in
1254 dispose_word_desc; changed callers to delete those assignments
1257 - change assign_random and get_random_value so that the random number
1258 generator only gets re-seeded once in a subshell environment, and
1259 assigning a value to RANDOM counts as seeding the generator. This
1260 makes the sequences a little more predictable
1264 lib/readline/history.c
1265 - fix replace_history_entry, remove_history to return NULL if
1271 - fix isnetconn() to understand that getpeername can return ENOTCONN
1272 to indicate that an fd is not a socket
1275 - set BUILD_DIR to contain backslashes to escape any spaces in the
1276 directory name -- this is what make will accept in targets and
1277 prerequisites, so it's better than trying to use double quotes
1278 - set SIZE to the appropriate value if some cross-compiling tool
1279 chain is being used; `size' by default (can be overridden by
1280 SIZE environment variable)
1283 - use $(SIZE) instead of size; set SIZE from configure
1288 - in array_value_internal, return NULL right away if the variable's
1289 value is NULL, instead of passing a null string to add_string_to_list
1294 - new struct to hold stats and counters for child processes and jobs
1295 - change some uses of global and static variables to use members of
1296 new struct (struct jobstats)
1302 - change PRUNNING to PALIVE
1303 - new define INVALID_JOB
1304 - new macro get_job_by_jid(ind), currently expands to jobs[ind]
1305 - new define J_JOBSTATE, operates on a JOB * like JOBSTATE operates on
1307 - new function, reset_job_indices, called from delete_job if
1308 js.j_lastj or js.j_firstj are removed
1309 - change various functions to keep counters and stats in struct jobstats
1311 pcomplete.c, builtins/common.c, builtins/{exit,fg_bg,jobs,kill,wait}.def
1312 - change global variables (e.g., job_slots) to struct members
1313 (e.g., js.j_jobslots)
1314 - use INVALID_JOB define where appropriate
1315 - use get_job_by_jid and J_JOBSTATE where appropriate
1318 - change reset_or_restore_signal_handler to not free the exit trap
1319 string if the function pointer is reset_signal, which is used when
1320 the trap strings shouldn't be freed, like in command substitution
1325 - new function, realloc_jobs_list, copies jobs array to newly-allocated
1326 memory shrinking (or growing) size to have next multiple of JOB_SLOTS
1327 greater than js.j_njobs
1328 - change compact_jobs_list to just call reap_dead_jobs and then
1329 realloc_jobs_list, simplifying it considerably
1330 - discard_pipeline now returns `int': the number of processes freed
1331 - slightly changed the logic deciding whether or not to call
1332 compact_jobs_list: now non-interactive shells will compact the
1333 list if it reaches MAX_JOBS_IN_ARRAY in size
1336 - move test for backslash-newline after pop_string in shell_getc so
1347 - new structs for holding status of exited background processes, as
1349 - new job flag: J_ASYNC
1352 - new functions to manipulate struct holding status of exited
1353 background processes
1354 - new members in struct jobstats to hold pointer to last created job
1355 and last created asynchronous job
1356 - initialize js.c_childmax in initialize_job_control
1357 - if the `async' arg to stop_pipeline is non-null, set the J_ASYNC
1358 flag in the job struct
1359 - set js.j_last_made_job and js.j_last_asynchronous_job in
1361 - new function: find_last_proc, returns the PROCESS * to the last proc
1363 - changed find_last_pid to call find_last_proc
1364 - change delete_job to call bgp_add on the last proc of the job being
1366 - change delete_all_jobs and wait_for_background_pids to call bgp_clear
1371 - change wait_for_single_pid to look for pid in bgpids.list (using
1372 bgp_search()) if find_pipeline returns NULL
1377 - change the solaris-gcc stanza so that it auto-selects the appropriate
1378 options for ld depending on which `ld' gcc says it's going to run
1383 - add support for PS_RECYCLED as a process state, add PRECYCLED macro
1384 to test it. Change PALIVE and PRUNNING macros to not count processes
1385 in PS_RECYCLED state
1388 - restore use of last_pid as sentinel value; use NO_PID as sentinel
1389 only if RECYCLES_PIDS is defined
1392 - change find_job to return a pointer to the PROCESS the desired pid
1393 belongs to, analogous to find_pipeline returning pointer to JOB
1394 - change find_job callers to add extra argument
1395 - change running_only arguments to find_pipeline and find_job to
1396 alive_only, since we don't want recycled pids returned here and it
1397 better describes the result
1398 - new function find_process, calls find_pipeline and searches the
1399 returned pipeline for the PROCESS * describing the desired pid
1400 - in make_child, if fork() returns the same pid as the value of
1401 last_asynchronous_pid when RECYCLES_PIDS is defined, avoid pid
1402 aliasing by resetting last_asynchronous_pid to 1
1403 - use PRUNNING instead of child->running, since we, for the most
1404 part, don't want to consider recycled pids (e.g., in make_child())
1405 - call find_process instead of find_pipeline in waitchld()
1406 - use PEXITED(p) instead of testing p->running == PS_DONE
1407 - in make_child, call bgp_delete to remove a just-created pid from the
1408 last of saved pid statuses
1409 - in add_process, check whether or not pid being added is already in
1410 the_pipeline or the jobs list (using find_process) and mark it as
1412 - This set of fixes mostly came from Pierre Humblet
1413 <pierre.humblet@ieee.org> to fix pid aliasing and reuse problems on
1417 - set $_ from the environment if we get it there, set to $0 by
1418 default if not in env
1420 doc/{bashref.texi,bash.1}
1421 - a couple of clarifying changes to the description of $_ based on
1422 comments from Glenn Morris <gmorris+mail@ast.cam.ac.uk>
1427 - use strstr instead of strmatch when checking whether $EMACS contains
1428 `term' -- simpler and faster
1433 - implement posix requirement that `pwd -P' set $PWD to a directory
1434 name containing no symlinks
1435 - add new function, setpwd(), just sets (and changes exported value)
1439 - add note to posix mode section about pwd -P setting $PWD
1441 doc{bash.1,bashref.texi}
1442 - added note that BASH_ARGC and BASH_ARGV are only set in extended
1444 - expand description of extdebug option to include everything changed
1445 by extended debug mode
1450 - new flag macro, FNMATCH_IGNCASE, evaluates to FNM_CASEFOLD if the
1451 match_ignore_case variable is non-zero
1454 - new variable, match_ignore_case
1455 - change call to strmatch() in execute_case_command so it includes
1459 - change call to strmatch() in patcomp() so that pattern matching
1460 calls for [[ ... ]] obey the match_ignore_case variable
1463 - if match_ignore_case is set, enable REG_ICASE in the regexp match
1467 - new settable option, `nocasematch', controls the match_ignore_case
1468 variable. Currently alters pattern matching for case and [[ ... ]]
1469 commands (==, !=, and =~ operators)
1471 doc/{bashref.texi,bash.1}
1472 - updated descriptions of [[ and case to include reference to
1477 builtins/mkbuiltins.c
1478 - add `times' to the list of posix special builtins
1483 - posix mode no longer turns on effect of -P option on $PWD if a
1484 directory is chosen from CDPATH
1487 - clarified that in posix mode, reserved words are not alias expanded
1488 only in a reserved word context
1489 - removed item about cd, $CDPATH, and -P from posix mode section
1493 builtins/reserved.def
1494 - minor cleanups to the description of `if'
1499 - change list_string and get_word_from_string to explicitly treat an
1500 IFS character that is not space, tab, or newline *and any adjacent
1501 IFS white space* as a single delimiter, as SUSv3/XPG6 says
1504 - check whether or not the number of fields is exactly the same as
1505 the number of variables instead of just assigning the rest of the
1506 line (minus any trailing IFS white space) to the last variable.
1507 This parses a field and checks whether or not it consumes all of
1508 the input (including any trailing field delimiters), falling back
1509 to the previous behavior if it does not. This is what POSIX.2
1510 specifies, I believe (and the consensus of the austin-group list).
1511 This requires a few tests in read.tests to be changed: backslashes
1512 escaping IFS whitespace characters at the end of input cause the
1513 whitespace characters to be preserved in the value assigned to the
1514 variable, and the trailing non-whitespace field delimiter issue
1519 - add -D_POSIX_SOURCE to the LOCAL_CFLAGS for Interix
1524 - make bash_directory_expansion a void function, since it doesn't have
1530 - when testing for a pipe, use `fd' instead of hard-coding 0, since we
1531 can read from other file descriptors now
1534 - in zsyncfd, only set lind and lused to 0 if the lseek succeeds.
1535 If the lseek fails, we might steal input from other programs, but
1536 a failed lseek won't cause us to erroneously discard input
1540 builtins/evalstring.c
1541 - don't allow parse_and_execute to short-circuit and call exec() if
1542 the command's return value is being inverted
1547 - new macro PC to call putchar and increment number of chars printed -
1548 fixes bug in computation of value for %n format char
1549 - `tw' is now a global var so printstr can modify it using PC()
1550 - convert PF macro to use asprintf into a local buffer
1551 Preparation for printf -v var
1552 - add code to add the text printed to a `variable buffer' if -v option
1553 supplied. The buffer grows as needed
1554 - printf now takes a `-v var' option to put the output into the variable
1555 VAR rather than sending it to stdout. It does not:
1556 print partial output on error (e.g., format string error)
1557 handle NULs in the variable value, as usual
1562 - fix bug in prompt string decoding that caused a core dump when PS1
1563 contained \W and PWD was unset (null pointer deref)
1566 - changed -v var behavior so it stores partial output into the named
1567 variable upon an error
1572 - bool_to_int now takes a `const char *' argument
1574 support/{printenv,recho,zecho}.c
1576 - include "bashansi.h" for appropriate extern function declarations
1579 - on MacOS X 10.4, compensate for loader not allowing static library
1580 to override existing system dynamic library when compiling -dynamic
1581 (affects readline and history libraries); so use absolute pathname
1582 instead of -lreadline as library name
1584 lib/glob/{glob,sm_loop,smatch}.c
1585 - make sure to cast arguments to (char *) or (unsigned char *) as
1586 appropriate to avoid gcc4 warnings
1589 - collsym (single-byte version) now takes a (CHAR *) first argument to
1590 match callers; cast argument to strncmp appropriately
1593 - fix ldfallback and dfallback to handle width and precision specs in
1594 the format passed to sprintf()
1595 - fix STAR_ARGS macro to deal with negative field widths and precisions
1600 - since a negative precision in a "x.x[fFgGeE]" format specifier should
1601 be allowed but treated as if the precision were missing, let it
1605 - fix * code to deal with a negative precision by treating it as if
1606 the `.' and any digit string in the precision had not been specified
1607 - fix format parsing code to deal with a negative inline precision,
1608 e.g., "%4.-4f" by treating it as if the `'. and any digit string in
1609 the precision had not been specified
1610 - a `+' in a format specifier should only act as a flag if it comes
1611 before a `.' (otherwise it is ignored)
1613 lib/readline/vi_mode.c
1614 - new function, rl_vi_rubout, to rl_rubout as rl_vi_delete is to
1615 rl_delete; saves deleted text for possible reinsertion as with any
1616 vi-mode `text modification' command (fixes problem with `X' reported
1617 by beat.wieland@gmx.ch)
1619 lib/readline/vi_keymap.c
1620 - bind `X' in vi command mode to rl_vi_rubout
1622 lib/readline/funmap.c
1623 - add a bindable `vi-rubout' command, runs rl_vi_rubout
1626 - rewrote internals of _rl_rubout_char to make structure cleaner
1628 lib/readline/{complete,text}.c
1629 - changed code to remove #ifdef HANDLE_MULTIBYTE where possible
1633 lib/readline/examples/rl.c
1634 - include <sys/stat.h> instead of posixstat.h if READLINE_LIBRARY not
1638 - fix mbstrlen to treat invalid multibyte sequences as sequences of
1639 single-byte characters
1644 - default SIZE to `:' if cross-compiling and an appropriate size for
1645 the target is not found
1650 - change match_upattern and match_wpattern to check whether or not the
1651 supplied pattern matches anywhere in the supplied string, prefixing
1652 and appending the pattern with `*' if necessary. If it doesn't we
1653 can short-circuit immediately rather than waste time doing up to
1654 N-1 unsuccessful calls to strmatch/wcsmatch (which kills for long
1655 strings, even if the pattern is short)
1660 - make sure the special case for MacOS X 10.4 only kicks in if the
1661 `--with-installed-readline' option isn't supplied
1663 lib/readline/{callback,readline,signals}.c
1664 - make sure rl_prep_term_function and rl_deprep_term_function aren't
1665 dereferenced if NULL (as the documentation says)
1667 builtins/mkbuiltins.c
1668 - don't bother with the special HAVE_BCOPY code; just use straight
1672 - use _POSIX_PIPE_BUF in pipesize() if it's defined and PIPE_BUF is
1678 - add cm_function_def to the list of control structures for which
1679 child processes are forked when pipes come in or out
1684 - make sure the ^As added for internal quoting are not counted as
1685 characters read when -n is supplied
1690 - fix redir_open so that the repeat open on failure that AFS support
1691 adds restores the correct value of errno for any error message
1697 - make sure mksignames and mksyntax are invoked with the $(EXEEXT)
1702 lib/readline/readline.h
1703 - new state variable: RL_STATE_CALLBACK, means readline is using the
1706 lib/readline/callback.c
1707 - set RL_STATE_CALLBACK in rl_callback_handler_install, unset in
1708 rl_callback_handler_remove
1713 - DONT_REPORT_SIGPIPE is now on by default, since it apparently
1714 interferes with scripts
1717 - arrange things so PGRP_PIPE is defined on Linux-2.4+ and version 3
1718 kernels (ones that apparently schedule children to run before their
1724 - add call to no_options, so it can handle `--' option
1726 doc/{bash.1,bashref.texi}
1727 - note explicitly that test, :, true, and false don't understand --
1728 as meaning the end of options
1733 - darwin 8 needs the same LDFLAGS setting as darwin 7
1736 - in save_parser_state, make sure we cast the return value from
1737 xmalloc() to the right type
1738 - remove casts to (char *) in calls to yyerror()
1740 lib/readline/signals.c
1741 - make SIGQUIT and SIGALRM code conditional on their definition
1742 - use raise() to send a signal if we don't have kill()
1744 lib/readline/display.c
1745 - some MS-DOS and MINGW changes from the cygwin and mingw folks
1748 - add HAVE_PWD_H for <pwd.h>
1749 - add HAVE_FCNTL, HAVE_KILL for respective system calls
1750 - add HAVE_GETPW{ENT,NAM,UID} for passwd functions
1753 - add check for <pwd.h>
1754 - add checks for fcntl, kill system calls
1755 - add checks for getpw{ent,nam,uid} C library functions
1756 - pass a flag indicating we're cross compiling through to
1757 CFLAGS_FOR_BUILD in Makefile.in
1759 lib/readline/complete.c
1760 - guard inclusion of <pwd.h> with HAVE_PWD_H
1761 - don't provide a missing declaration for getpwent if we don't have it
1762 - guard calls to {get,end}pwent with HAVE_GETPWENT
1764 lib/readline/shell.c
1765 - guard inclusion of <pwd.h> with HAVE_PWD_H
1766 - guard inclusion of <fcntl.h> with HAVE_FCNTL_H
1767 - don't provide a missing declaration for getpwuid if we don't have it
1768 - guard calls to getpwuid with HAVE_GETPWUID
1769 - don't bother with body of sh_unset_nodelay_mode if we don't have
1773 - guard inclusion of <pwd.h> with HAVE_PWD_H
1774 - guard calls to getpw{nam,uid} with HAVE_GETPW{NAM,UID}
1775 - guard calls to {get,end}pwent with HAVE_GETPWENT
1777 Makefile.in,builtins/Makefile.in
1778 - @CROSS_COMPILE@ is substituted into CFLAGS_FOR_BUILD (equal to
1779 -DCROSS_COMPILING if bash is being cross-compiled)
1784 - print version as `0.0' in RL_LIB_READLINE_VERSION if the
1785 `rl_gnu_readline_p' variable isn't 1 (accept no imitations)
1789 lib/readline/rlprivate.h
1790 - definition of a readline `search context', to be use for incremental
1791 search initially and other types of search later. Original from
1792 Bob Rossi as part of work on incremental searching problems when
1793 using callback interface
1795 lib/readline/isearch.c
1796 - functions to allocate and free search contexts
1797 - function to take a search context and a character just read and
1798 `dispatch' on it: change search parameters, add to search string,
1799 search further, etc.
1800 - isearch is now completely context-driven: a search context is
1801 allocated and passed to the rest of the functions
1805 lib/readline/isearch.c
1806 - an additional `isearch cleanup' function that can be called from
1807 the callback interface functions when the search is to be terminated
1808 - an additional `isearch callback' function that can be called from
1809 rl_callback_read_char when input is available
1810 - short-circuit from rl_search_history after initialization if
1811 the callback interface is being used
1813 lib/readline/callback.c
1814 - in rl_callback_read_char(), if RL_STATE_ISEARCH is set, call
1815 _rl_isearch_callback to read the character and dispatch on it.
1816 If RL_STATE_ISEARCH is unset when that call returns, and there is
1817 input pending, call rl_callback_read_char() again so we don't
1818 have to wait for new input to pick it up
1820 support/shobj-conf,configure.in
1821 - add support for dragonfly bsd, the same as freebsd
1825 lib/readline/callback.c
1826 - support for readline functions to `register' a function that will
1827 be called when more input is available, with a generic data
1828 structure to encapsulate the arguments and parameters. Primarily
1829 intended for functions that read a single additional character,
1831 - support for callback code reading numeric arguments in a loop,
1832 using readline state and an auxiliary variable
1833 - support for callback code performing non-incremental searches using
1834 the same search context struct as the isearch code
1836 lib/readline/{callback,display}.c
1837 - if a callback function sets `_rl_redisplay_wanted', the redisplay
1838 function will be called as soon as it returns
1840 lib/readline/input.c
1841 - changes to _rl_read_mbchar to handle reading the null multibyte
1842 character and translating it into '\0'
1845 - break rl_digit_loop() into component functions that can be called
1846 individually from the callback code more easily
1847 - share some of the functions with rl_digit_loop1() in vi_mode.c
1849 lib/readline/readline.h
1850 - change the version #defines to reflect readline 5.1
1852 lib/readline/search.c
1853 - break code into smaller functions that can be composed to work with
1854 the callback code more easily
1857 - in rl_quoted_insert(), don't mess around with the tty signals if
1858 running in `callback mode'
1860 lib/readline/vi_mode.c
1861 - changed set-mark, goto-mark, change-char, and char-search to work
1862 when called by callback functions
1867 lib/readline/rlprivate.h
1868 - new struct declaration for a `reading key sequence' context
1870 lib/readline/readline.c
1871 - new variable, _rl_dispatching_keymap, keeps track of which keymap
1872 we are currently searching
1873 - functions to allocate and deallocate contexts for reading multi-char
1878 lib/readline/rlprivate.h
1879 - new struct defining a context for multiple-key key sequences (the
1880 base case is escape-prefixed commands)
1882 lib/readline/readline.c
1883 - change structure of _rl_dispatch_subseq to allow for callback code
1884 to use it - rudimentary support for supporting the existing
1885 recursion using a stack of contexts, each with a reference to the
1887 - fix so that ^G works when in callback mode
1889 lib/readline/callback.c
1890 - call the appropriate multiple-key sequence callback if the state is
1895 lib/readline/readline.c
1896 - broke code from _readline_internal_char after call to rl_dispatch
1897 out into separate function: _rl_internal_char_cleanup, callable by
1898 other parts of the code
1899 - change _rl_internal_char_cleanup to unset _rl_want_redisplay after
1900 it calls (*rl_redisplay_func)
1902 lib/readline/callback.c
1903 - call _rl_internal_char_cleanup from rl_callback_read_char when
1908 lib/readline/callback.c
1909 - use _rl_dispatch_callback and a chain of _rl_keyseq_contexts to
1910 simulate the recursion used to decode multicharacter key sequences
1911 (even things like ESC- as meta-prefix)
1912 - call setjmp in rl_callback_read_char to give things like rl_abort
1913 a place to jump, since the saved location in readline() will not
1915 - keep calling _rl_dispatch_callback from rl_callback_read_char while
1916 we are still decoding a multi-key key sequence
1917 - keep calling readline_internal_char from rl_callback_read_char while
1918 we are reading characters from a macro
1920 lib/readline/macro.c
1921 - use a slightly different strategy upon encountering the end of a macro
1922 when using the callback interface: when the last character of a
1923 macro is read, and we are reading a command, pop the macro off the
1924 stack immediately so the loop in rl_callback_read_char terminates
1927 lib/readline/readline.c
1928 - if longjmp() is called and we end up at the saved location while
1929 using the callback interface, just return -- don't go back into a
1931 - new function to dispose a chain of rl_keyseq_cxts
1932 - only read new input in _rl_dispatch_callback if the KSEQ_DISPATCHED
1933 flag is not set in the current keyseq context -- if it is, we are
1934 traversing the chain back up and should use what we already saved
1935 - use -3 as a magic value from _rl_dispatch_subseq to indicate that
1936 we're allocating a new context and moving downward in the chain
1937 (a special return value for the benefit of _rl_dispatch_callback)
1939 lib/readline/rlprivate.h
1940 - new extern declaration for _rl_keyseq_chain_dispose
1945 - fixed a bug that occurred when reading a set number of chars and
1946 the nth char is a backslash (read one too many). Bug reported by
1947 Chris Morgan <chmorgan@gmail.com>
1950 - fix execute_builtin so the `unset' builtin also operates on the
1951 temporary environment in POSIX mode (as well as source and eval),
1952 so that unsetting variables in the temporary environment doesn't
1953 leave them set when unset completes. Report by Eric Blake
1957 - fix from William Park for array_rshift when shifting right on an
1958 empty array -- corrects calculation of array->max_index
1961 - if an exec fails and the execfail option is set, don't call
1962 restart_job_control unless the shell is interactive or job_control
1966 - add a run-time check for WCONTINUED being defined in header files
1967 but rejected with EINVAL by waitpid(). Fix from Maciej Rozycki
1968 <macro@linux-mips.org>
1973 - make sure calls to sv_histchars are protected by #ifdef BANG_HISTORY
1974 - ditto for calls to history_expand_line_internal
1979 - remove extra blank lines in @menu constructs
1982 - assign export_env to environ (extern char **) every time it changes
1983 (mostly in add_to_export_env define), so maybe getenv will work on
1984 systems that don't allow it to be replaced
1989 - in bash_directory_completion_hook, be careful about not turning `/'
1990 into `//' and `//' into `///' for benefit of those systems that treat
1991 `//' as some sort of `network root'. Fix from Eric Blake
1994 lib/readline/complete.c
1995 - in to_print, do the right thing after stripping the trailing slash
1996 from full_pathname: // doesn't turn into /, and /// doesn't become
1997 //. Fix from Eric Blake <ebb9@byu.net>
2002 - include <unistd.h> if it's available for a definition of size_t
2005 - in wait_for, if a child process is marked as running but waitpid()
2006 returns -1/ECHILD (e.g., when the bash process is being traced by
2007 strace), make sure to increment c_reaped when marking the child as
2009 - in without_job_control, make sure to close the pgrp pipe after
2010 calling start_pipeline
2015 - only remove pathnames.h when the other files created by running
2016 configure are removed (e.g., Makefile). Fix from William Park
2019 - since backslash-newline disappears when within double quotes, don't
2020 add a backslash in front of a newline in sh_double_quote. Problem
2021 reported by William Park
2024 - in notify_of_job_status, don't print status messages about
2025 terminated background processes unless job control is active
2028 - new variable, hist_last_line_pushed, set to 0 in really_add_history
2029 (used by `history -s' code)
2032 - new extern declaration for history -s
2034 builtins/history.def
2035 - don't remove last history entry in push_history if it was added by
2036 a call to push_history -- use hist_last_line_pushed as a sentinel
2037 and set it after adding history entry. This allows multiple
2038 calls to history -s to work right: adding all lines to the history
2039 rather than deleting all but the last. Bug reported by Matthias
2040 Schniedermeyer <ms@citd.de>
2041 - pay attention to hist_last_line_pushed in expand_and_print_history()
2042 so we don't delete an entry pushed by history -s
2047 - fix print_arith_for_command to not print so many blanks between
2048 expressions in ((...))
2051 - new word flag: W_DQUOTE. Means word should be treated as if double
2055 - add W_DQUOTE to word flags in make_arith_for_expr
2058 - add W_DQUOTE to word flags for (( ... )) arithmetic commands
2061 - don't perform tilde expansion on a word with W_DQUOTE flag set
2062 - don't perform process substitution on a word with W_DQUOTE flag set
2065 - expand an array index within [...] the same way as an arithmetic
2066 expansion between (( ... ))
2068 lib/readline/input.c
2069 - use getch() instead of read() on mingw
2071 lib/readline/readline.c
2072 - add a few key bindings for the arrow keys on mingw
2074 lib/readline/rldefs.h
2075 - if on mingw, define NO_TTY_DRIVER
2077 lib/readline/rltty.c
2078 - compile in the stub functions for _rl_{disable,restore}_tty_signals
2080 - compile in stub function for rl_restart_output on mingw
2081 - make sure enough functions and macros are defined to compile if
2082 NO_TTY_DRIVER is defined (lightly tested - builds on MacOS X, at
2088 - add a `flags' member to the PATTERN_LIST structure
2091 - intialize the `flags' member of a PATTERN_LIST when it's created
2094 - protect extern declaration of errno with usual #ifdef errno
2096 configure.in, variables.c
2097 - changes for QNX 6.x
2102 - fix parse_matched_pair to handle single and double quoted strings
2103 inside old-style command substitution (``) since they can each
2104 quote the ` and embedded $-expansions. Report by Eric Blake
2107 {configure,Makefile}.in
2108 - TILDE_LIB is now substituted into Makefile by configure
2111 - if configuring --with-installed-readline on cygwin, set TILDE_LIB
2112 to the empty string to avoid multiply-defined symbols. Cygwin
2113 doesn't allow undefined symbols in dynamic libraries. Report by
2114 Eric Blake <ebb9@byu.net>
2119 - in duplicate_buffered_stream, don't call free_buffered_stream if the
2120 two buffered streams share the same b_buffer object (e.g., if they
2121 had already been duplicated with a previous call). Fixes Debian bug
2122 reported by eero17@bigfoot.com
2127 - make set_shell_name more resistant to a NULL argument
2128 - in bind_args, use < instead of != when counting the arguments and
2130 - in main(), make sure arg_index is not initialized to a value greater
2135 lib/readline/display.c
2136 - in expand_prompt, don't set the location of the last invisible
2137 char if the sequence is zero length (\[\])
2141 doc/{bash.1,bashref.texi}
2142 - document that the shell uses $TMPDIR when creating temporary files
2146 [bash-3.1-alpha1 frozen]
2150 builtins/evalstring.c
2151 - make sure that parse_and_execute saves and restores the value of
2152 loop_level, so loops in sourced scripts and eval'd strings don't
2153 mess up the shell's parser state
2156 - change command_subst_completion_function to suppress appending
2157 any character to a unique completion, instead of a space, unless
2158 the last word in the quoted command substitution completes to a
2159 directory name. In that case we append the expected slash
2164 - make sure variables are initialized if their values are tested later
2166 [bash-3.1-alpha1 updated and re-frozen]
2171 - make sure to call stifle_history with an `int' instead of an intmax_t.
2172 Sometimes it makes a difference
2176 [bash-3.1-alpha1 released]
2178 support/mksignames.c
2179 - add `SIGSTKFLT' (RHE3)
2180 - add `SIGXRES' (Solaris 9)
2185 - fix typo to make `x' the right option for locks
2186 - add new options to short help synopsis
2189 - use get_variable_value instead of direct reference to value_cell
2190 in make_variable_value when appending to the current value, so
2191 references to array variables without subscripts will be equivalent
2195 - rewrote rl_change_case to correctly change the case of multibyte
2196 characters where appropriate
2201 - remove call to obsolete macro AC_ACVERSION
2202 - remove special calls to AC_CYGWIN and AC_MINGW32; AC_CANONICAL_HOST
2203 takes care of those cases
2206 - include `chartypes.h' for definition of ISALPHA
2207 - fix definitions of ABSPATH and RELPATH for cygwin
2208 - fix definition of ISDIRSEP for cygwin to allow backslash as a
2209 directory name separator
2213 builtins/setattr.def
2214 - when setting a variable from the temporary environment in
2215 set_var_attribute (e.g., `LC_ALL=C export LC_ALL'), make sure to
2216 call stupidly_hack_special_variables after binding the variable in
2220 - make sure to call stupidly_hack_special_variables if using `printf -v'
2221 to put formatted output in a shell variable
2226 - new variable: SHLIB_LIBPREF, prefix for shared library name (defaults
2228 - new variable: SHLIB_DLLVERSION, used on Cygwin to set the library
2230 - new variable: SHLIB_DOT, separator character between library name and
2231 suffix and version information (defaults to `.')
2232 - new stanza for cygwin to generate windows-compatible dll
2237 - new special variable function for Cygwin, so the export environment
2238 is remade when HOME is changed. The environment is the only way to
2239 get information from the shell to cygwin dlls, for instanace, when
2240 bash is compiled to use an already-installed libreadline
2243 - new extern declaration for sv_home
2247 lib/readline/display.c
2248 - call init_line_structures from rl_redisplay if vis_lbreaks == 0
2249 to avoid consequences of a poorly-timed SIGWINCH
2254 - fix logic for performing tilde expansion when in posix mode (don't
2255 rely on W_TILDEEXP flag always being set, because it won't be when
2256 expanding the RHS of assignment statement). Use W_TILDEEXP only
2257 when deciding to expand a word marked as W_ASSIGNMENT that doesn't
2258 precede a command name
2263 - in execute_function, when subshell == 1, don't short-cut by using
2264 the command contained in the group command -- if you do, any
2265 redirections attached to the group command (function) don't get
2269 - new #define, FS_READABLE, indicates file is readable by current
2273 - rewrote file_status to use S_xxx POSIX file mode bits and to add
2274 support for FS_READABLE (affects ./source and searching $PATH for
2275 scripts whose names are supplied as arguments on the command line)
2276 - change find_path_file to look for readable files -- source requires
2278 - change find_in_path_element to do the right thing when FS_READABLE
2279 is supplied as a flag
2282 - remove note about posix non-compliance in `.': we now require and
2283 look for readable files when searching $PATH
2288 - fix setifs to handle case where passed variable is non-zero but
2289 v->value == 0 (as in an unset local variable); treat IFS as unset
2293 - in kill_pid, if asked to killpg a process or pgrp whose pgrp is
2294 recorded as the same as the shell's, just call killpg and let the
2295 chips fall where they may -- there may be other processes in that
2296 pgrp that are not children of the shell, so killing each process
2297 in the pipeline will not do a complete job, and killpg'ing each
2298 such process will send too many signals in the majority of cases
2301 - in posix mode, pwd needs to check that the value it prints and `.'
2305 - if reading input from stdin in a non-interactive shell and calling
2306 `read', call sync_buffered_stream to seek backward in the input
2307 stream if necessary (XXX - should we do this for all shell builtins?)
2312 - in posix mode, if canonicalization of the absolute pathname fails
2313 because the path length exceeds PATH_MAX, but the length of the passed
2314 (non-absolute) pathname does not, attempt the chdir, just as when
2318 - don't have describe_command call sh_makepath if the full path found
2319 is already an absolute pathname (sh_makepath will stick $PWD onto the
2326 - in posix mode, don't have start_job print out and indication of
2327 whether the job started by `bg' is the current or previous job
2328 - change start_job to return success if a job to be resumed in the
2329 background is already running. This means that bg won't fail when
2330 asked to bg a background job, as SUSv3/XPG6 requires
2331 - new function, init_job_stats, to zero out the global jobstats struct
2334 - change kill_pid to handle pids < -1 by killing process groups
2337 - extern declaration for init_job_stats
2339 lib/readline/history.c
2340 - check whether or not the history list is null in remove_history
2342 builtins/history.def
2343 - delete_last_history is no longer static so fc builtin can use it
2346 - use free_history_entry in fc_replhist instead of freeing struct
2347 members individually
2348 - call delete_last_history from fc_replhist instead of using inline
2350 - if editing (-l not specified), make sure the fc command that caused
2351 the editing is removed from the history list, as POSIX specifies
2354 - just call kill_pid with any pid argument and let it handle pids < -1
2355 This is the only way to let kill_pid know whether a negative pid or
2356 a job spec was supplied as an argument to kill
2359 - force fg_bg to return EXECUTION_SUCCESS explicitly if called by bg
2360 and start_job returns successfully
2361 - bg now returns success only if all the specified jobs were resumed
2365 - call init_job_stats from initialize_subshell to zero out the global
2371 - change vi_edit_and_execute_command to just call vi when in posix
2372 mode, instead of checking $FCEDIT and $EDITOR
2374 lib/readline/search.c
2375 - if in vi_mode, call rl_free_undo_list in make_history_line_current
2376 to dispose of undo list accumulated while reading the search string
2377 (if this isn't done, since vi mode leaves the current history
2378 position at the entry which matched the search, the call to
2379 rl_revert_line in rl_internal_teardown will mangle the matched
2380 history entry using a bogus rl_undo_list)
2381 - call rl_free_undo_list after reading a non-incremental search string
2382 into rl_line_buffer -- that undo list should be discarded
2384 lib/readline/rlprivate.h
2385 - add UNDO_LIST * member to search context struct
2387 lib/readline/isearch.c
2388 - initialize UNDO_LIST *save_undo_list member of search context struct
2393 - change rl_parse_and_bind to strip whitespace from the end of a
2394 variable value assignment before calling rl_variable_bind
2396 doc/bash.1,lib/readline/doc/{rluser.texi,readline.3}
2397 - clarified the language concerning parsing values for boolean
2398 variables in assignment statements
2403 - fix small memory leak in sh_realpath reported by Eric Blake
2408 - add additional notes to posix mode section
2413 - if $'...' occurs within a ${...} parameter expansion within
2414 double quotes, don't single-quote the expanded result -- the double
2415 quotes will cause it to be expanded incorrectly
2420 - if STRICT_POSIX is defined, the posix mode default for the editor to
2421 use is $FCEDIT, then ed
2424 - if STRICT_POSIX is defined, initialize `posixly_correct' to 1
2427 - add #undef STRICT_POSIX
2432 - add new option argument, --enable-strict-posix-default, configures
2433 bash to be posix-conformant (including defaulting echo to posix
2434 conformance) by default
2437 - if STRICT_POSIX is defined, default echo to xpg-style
2440 - describe the --enable-strict-posix-default option to configure
2444 builtins/mkbuiltins.c
2445 - change to not generate N_(""), because the translated empty string is
2446 special to GNU gettext
2450 lib/readline/complete.c
2451 - a negative value for rl_completion_query_items means to not ask
2453 lib/readline/doc/{{rltech,rluser}.texi,readline.3}
2454 - documented new semantics for rl_completion_query_items/
2455 completion-query-items
2460 - bind M-TAB in emacs mode to dynamic-complete-history even if the
2461 current binding is `tab-insert' (which is what it is by default),
2462 not just if it's unbound
2467 - call QUIT before calling dispose_command on current_command after
2468 the `exec_done' label. If we dispose current_command first, the
2469 longjmp might restore the value of current_command after we've
2470 disposed it, and the subsequent call to dispose_command from the
2471 DISCARD case will free memory twice
2475 lib/sh/strto[iu]max.c
2476 - make sure the function being declared is not a cpp define before
2477 defining it -- should fix problems on HP-UX
2482 - make sure the binaries for the tests are at the front of $PATH
2487 - new flag for parse_matched_pair: P_COMMAND, indicating that the
2488 text being parsed is a command (`...`, $(...))
2489 - change calls to parse_matched_pair to include P_COMMAND where
2491 - if P_COMMAND flag is set and the text is unquoted, check for comments
2492 and don't try to parse embedded quoted strings if in a comment (still
2493 not exactly right yet)
2497 builtins/history.def
2498 - if running history -n, don't count these new lines as history lines
2499 for the current session if the `histappend' shell option is set.
2500 If we're just appending to the history file, the issue that caused
2501 history_lines_this_session to be recalculated doesn't apply -- the
2502 history file won't be missing any entries
2504 lib/readline/isearch.c
2505 - fix C-w handler for isearch string reader to handle multibyte chars
2507 lib/readline/rlmbutil.h
2508 - new defines for _rl_to_wupper and _rl_to_wlower
2511 - use _rl_to_wupper and _rl_to_wlower as appropriate
2516 - in shell_execve, if the exec fails due to E2BIG or ENOMEM, just print
2517 the appropriate error message instead of checking out any interpreter
2523 - make $HISTCMD available anytime remember_on_history is non-zero,
2524 which indicates that we're saving commands to the history, and
2525 let it evaluate to 1 if we're not
2530 - in floating(), make sure d != 0 before calling chkinfnan -- gcc on the
2531 version of Solaris 9 I have translates 0 to -inf on the call
2533 [bash-3.1-beta1 frozen]
2538 - set the_pipeline to NULL right away in cleanup_the_pipeline, and
2539 dispose a copy of the pointer so we don't mess with the_pipeline
2540 while we're in the process of destroying it
2541 - block and unblock SIGCHLD around manipulating the_pipeline in
2542 cleanup_the_pipeline
2546 [bash-3.1-beta1 released]
2548 lib/readline/isearch.c
2549 - when switching directions, make sure we turn off the SF_REVERSE
2550 flag in the search context's flags word if we're going from reverse
2554 - new function, rl_variable_value, returns a string representing a
2555 bindable readline variable's value
2556 - new auxiliary function, _rl_get_string_variable_value, encapsulates
2557 everything needed to get a bindable string variable's value
2558 - rewrote rl_variable_dumper to use _rl_get_string_variable_value
2560 lib/readline/readline.h
2561 - new extern declaration for rl_variable_value
2563 lib/readline/doc/rltech.texi
2564 - documented rl_variable_value
2567 - in command_word_completion_function, if readline sets
2568 rl_completion_found_quote, but doesn't set rl_completion_quote_character,
2569 we have an embedded quoted string or backslash-escaped character in
2570 the passed text. We need to dequote that before calling
2571 filename_completion_function. So far, this is in place only for
2572 absolute program names (those containing a `/')
2573 - in command_word_completion_function, use rl_variable_value to decide
2574 whether or not we should ignore case, and use strncasecmp instead of
2575 strncmp where appropriate
2580 - fixed a typo when using POSIX_FC_EDIT_COMMAND
2583 - new flag values for redirections: RX_INTERNAL and RX_USER (currently
2587 - add_undo_redirect and add_undo_close_redirect now set RX_INTERNAL
2588 flag when making new redirects
2589 - in do_redirection_internal, only set file descriptors > 2 to CLEXEC
2590 if they're marked as RX_INTERNAL
2595 - in wait_for_single_pid, if in posix mode, remove the waited-for pid
2596 from the list of background pids, forgetting it entirely. POSIX
2597 conformance tests test for this.
2599 lib/readline/{readline.h,vi_mode.c}
2600 - new state flag, RL_STATE_VICMDONCE, set after entering vi command
2601 mode the first time; reset on each call to readline()
2606 - in rl_revert_line, make sure that revert-line in vi mode leaves
2607 rl_point set to 0 no matter the state of the line buffer
2609 lib/readline/vi_mode.c
2610 - when entering vi_command mode for the first time, free any existing
2611 undo list so the previous insertions won't be undone by the `U'
2612 command. This is how POSIX.2 says `U' should work (and the test
2616 - change rl_parse_and_bind so only `set' commands involving boolean
2617 readline variables have trailing whitespace stripped from the value
2623 - fix patscan() to correctly scan backslash-escaped characters
2627 lib/sh/{winsize.c,Makefile.in},{jobs,nojobs}.c,Makefile.in,externs.h
2628 - moved get_new_window_size from jobs.c/nojobs.c to new file,
2629 lib/sh/winsize.c, made function global
2631 {jobs,nojobs,sig}.c,{jobs,sig}.h
2632 - moved SIGWINCH handling code to sig.c rather than duplicate it in
2634 - call set_sigwinch_handler from sig.c code rather than job control
2635 signal initialization
2638 - new variable, sigwinch_received, acts like interrupt_state for
2639 SIGWINCH, set by sigwinch_sighandler. sigwinch_sighandler no longer
2640 calls get_new_window_size
2643 - add call to get_new_window_size if sigwinch_received at top of
2649 - to avoid orphaning memory on free if the right bucket is busy, use a
2650 new function xplit(mem, bucket) to split the block into two or more
2651 smaller ones and add those to the right bucket (appropriately marking
2653 - audit bsplit(), bcoalesce(), and xsplit() for proper use of busy[],
2654 since they're dealing with two separate buckets
2659 - new flag for string_extract: EX_REQMATCH, means to return an error
2660 if a matching/closing character is not found before EOS
2661 - new static flag variables: extract_string_error and extract_string_fatal
2662 - change expand_word_internal to check for new error returns from
2663 string_extract and return errors if appropriate
2668 - make sure we free TDIR in change_to_directory after calling
2669 set_working_directory (which allocates new memory) and other places
2670 we short-circuit and return
2675 - modified fix from 10/22 to allow bare ` to pass through (for
2676 some backwards compatibility and more correctness)
2681 - make MacOS X use the RHAPSODY code that gets HOSTTYPE, et al.
2682 at build rather than configure time, to support universal binaries
2683 (fix from llattanzi@apple.com)
2687 builtins/evalstring.c
2688 - make sure we don't turn on CMD_NO_FORK in parse_and_execute if
2689 we're running a trap command on signal receipt or exit
2692 - in shell_execve, improve the error message a little bit if the
2693 interpreter name in a #! exec header ends with a ^M (as in a DOS-
2698 lib/readline/vi_mode.c
2699 - fix vi-mode `r' command to leave the cursor in the right place
2701 [bash-3.1-rc1 frozen]
2706 - make sure a DEBUG trap doesn't overwrite a command string passed to
2707 make_child in execute_simple_command
2710 - rearrange some code in bash_quote_filename so filenames with leading
2711 tildes containing spaces aren't tilde-expanded before being
2712 returned to the caller
2716 lib/readline/display.c
2717 - when deciding where to move the cursor in rl_redisplay and needing
2718 to move the cursor back after moving it vertically and compensate
2719 for invisible characters in the prompt string, make sure that
2720 _rl_last_c_pos is treated as an absolute cursor position in a
2721 multibyte locale and the wrap offset (number of invisible characters)
2722 is added explicitly when deciding how many characters to backspace
2726 lib/readline/terminal.c
2727 - _rl_set_screen_size now interprets a lines or columns argument < 0
2728 as an indication not to change the current value
2733 lib/readline/terminal.c
2734 - new function, rl_reset_screen_size, calls _rl_get_screen_size to
2735 reset readline's idea of the terminal size
2736 - don't call _rl_get_screen_size in _rl_init_terminal_io if both
2737 _rl_screenheight and _rl_screenwidth are > 0
2738 - don't initialize _rl_screenheight and _rl_screenwidth to 0 in
2739 _rl_init_terminal_io; let caller take care of it
2740 - set _rl_screenheight and _rl_screenwidth to 0 before calling
2741 _rl_init_terminal_io
2743 lib/readline/readline.h
2744 - new extern declaration for rl_reset_screen_size
2746 lib/readline/doc/rltech.texi
2747 - documented rl_reset_screen_size
2750 - if readline is being used, compile in a special var function for
2751 assignments to LINES and COLUMNS that calls rl_set_screen_size or
2752 rl_reset_screen_size as appropriate. Only do this in posix mode
2753 and only when STRICT_POSIX is defined at compile time
2754 - new semaphore variable, winsize_assignment, set while doing an
2755 assignment to LINES or COLUMNS
2756 - new variable, winsize_assigned, says LINES or COLUMNS was assigned
2757 to or found in the environment
2758 - if in the middle of an assignment to LINES or COLUMNS, make
2759 sh_set_lines_and_columns a no-op
2762 - get_new_window_size now takes two int * arguments, to return the
2766 - change extern declaration for get_new_window_size
2768 {jobs,nojobs}.c, parse.y
2769 - change callers of get_new_window_size
2773 lib/readline/terminal.c
2774 - new variable, rl_prefer_env_winsize, gives LINES and COLUMNS
2775 precedence over values from the kernel when computing window size
2777 lib/readline/readline.h
2778 - extern declaration for rl_prefer_env_winsize
2780 lib/readline/doc/rltech.texi
2781 - document rl_prefer_env_winsize
2785 lib/readline/rltty.c
2786 - change rl_prep_terminal to make sure we set and reset the tty
2787 special characters in the vi insertion keymap if in vi mode. This
2788 matters if we get accept-line for the previous line while in vi
2794 - make sure any call to cd_builtin includes a leading `--' from the
2795 argument list (or constructs one)
2800 - fix small memory leak in gen_wordlist_matches
2802 [bash-3.1-rc2 frozen]
2806 [bash-3.1-rc2 released]
2810 lib/readline/display.c
2811 - changes to rl_redisplay to compensate for update_line updating
2812 _rl_last_c_pos without taking invisible characters in the line into
2813 account. Important in multibyte locales where _rl_last_c_pos is an
2814 absolute cursor position
2815 - changes to _rl_move_cursor_relative to account for _rl_last_c_pos
2816 being an absolute cursor position in a multibyte character locale
2817 - rewrote _rl_move_cursor_relative to make it a little simpler
2821 lib/readline/display.c
2822 - changes to rl_redisplay and update_line for update_line to communicate
2823 upward that it took the number of invisible characters on the current
2824 line into account when modifying _rl_last_c_pos
2825 - in update_line, adjust _rl_last_c_pos by wrap_offset before calling
2826 _rl_move_cursor_relative, so we pass correct information about the
2827 true cursor position
2832 - changed release status to `release'
2842 doc/{bash.1,version.texi},lib/readline/doc/version.texi
2843 - remove `beta1' from man page footer and texinfo documents
2846 - make sure winsize_assignment is protected by #ifdef READLINE, so
2847 minimal shell will compile
2850 - make sure error cases free memory and run any unwind-protects to
2856 - change execute_command_internal to set $PIPESTATUS for ((...)) and
2859 doc/{bash.1,bashref.texi,version.texi}
2860 - add documentation for ulimit -[iqx] and bump revision date
2865 - make sure parse_compound_assignment saves and restores the
2866 PST_ASSIGNOK parser state flag around its calls to read_token.
2867 Fixes bug reported by Mike Frysinger
2872 - change parse_compound_assignment to save and restore the value of
2873 last_read_token. Not sure why it was set unconditionally in the
2874 first place after parsing the complete compound assignment
2879 - don't use return value of rl_kill_text (which always succeeds and
2880 returns the number of characters killed) in rl_delete as an indication
2881 of success or failure
2882 - ditto for return value of rl_delete_text
2884 lib/readline/readline.c
2885 - don't return the value of the called readline function as the return
2886 value from _rl_dispatch_subseq; -1 means something different to the
2887 callers (return 0 all the time to indicate that a readline function
2888 was found and dispatched). Fix from Andreas Schwab for <DEL><DEL>
2889 bug in callback interface first reported by Mike Frysinger
2892 - fixed a typo in execute_case_command
2897 - add check for wctype() to BASH_CHECK_MULTIBYTE, define HAVE_WCTYPE
2900 - add HAVE_WCTYPE #define
2903 - add HAVE_WCTYPE to the set of checks for HANDLE_MULTIBYTE. This
2904 should catch the deficient NetBSD multibyte support
2909 - use CTLESC instead of literal '\001' when decode_prompt_string
2910 prefixes RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE
2914 lib/readline/display.c
2915 - don't treat RL_PROMPT_START_IGNORE specially inside a sequence of
2917 - keep track of the start of the current sequence of ignored
2918 characters; make sure that an empty sequence of such characters
2919 really is an empty sequence, not one that happens to end with '\001'
2920 (RL_PROMPT_START_IGNORE)
2925 - change expand_word_internal to process rest of `tilde-word' as a
2926 regular part of the word if tilde expansion leaves the tilde-word
2927 unchanged. This means that ~$USER expands to ~chet, which seems
2928 more intuitive, and is effectively what bash-3.0 did
2933 - when making a local array variable in do_compound_assignment, make
2934 sure that we don't use a variable of the same name from a previous
2938 - documented expansions for word and patterns in case statement
2940 builtins/ulimit.def,doc/{bashref.texi,bash.1}
2941 - added new -e and -r (nice and rtprio) options to ulimit; documented
2947 - use `hmax' instead of `num' in sv_histsize to avoid integer overflow
2948 problems with intmax_t
2951 - add unwind-protect to restore rl_attempted_completion_function in
2954 {bashline,variables}.c
2955 - move initialization of HISTSIZE from initialization path to
2956 load_history, so it can be overridden by a value assigned in a
2960 - add a missing `return r' so that rl_digit_loop returns a meaningful
2963 lib/readline/{bind,callback,display,isearch,rltty,search,text,vi_mode}.c
2964 - minor cleanups to satisfy compiler warnings, mostly removing unused
2970 - add LIBS_FOR_BUILD support; defaults to ${LIBS}
2973 - add LIBS_FOR_BUILD with no default value; use when linking programs
2974 using CC_FOR_BUILD (e.g., bashversion)
2979 - fix rl_translate_keyseq bad translation of \M-\C-x sequences
2982 - in execute_arith_command, if the expression expands to more than one
2983 word, make sure we join the words into a single string and pass the
2984 entire thing to evalexp()
2987 - new functions: _is_arithop(c), returns true if C is a valid single-
2988 character arithmetic operator; _is_multiop(c), returns true if C is
2989 a token corresponding to a valid multi-character arithmetic operator
2990 - if we encounter a character that isn't a valid arithmetic
2991 operator, throw an error. Try to be intelligent about what type of
2992 error message to print
2995 - new function, expand_arith_string, calls expand_string_if_necessary;
2996 used where an arithmetic expression needs to be expanded
2999 - new extern declaration for expand_arith_string
3002 - in array_expand_index, call expand_arith_string to expand the
3003 subscript in a fashion consistent with other arithmetic expressions
3006 - fix parameter_brace_patsub so that we don't try to anchor the pattern
3007 at the beginning or end of the string if we're doing global
3008 replacement -- that combination doesn't doesn't make sense, and
3009 the changed behavior is compatible with ksh93
3011 doc/{bash.1,bashref.texi}
3012 - changed description of pattern substitution to match the new
3016 - change tests to remove all ${pat//#rep} and ${pat//%rep}
3017 expansions, since they don't mean the same thing anymore
3022 - new file, initialize_signames() function from old mksignames.c. This
3023 file builds the signal_names array
3025 support/mksignames.c
3026 - strip out initialize_signames(), move to signames.c. This file only
3028 - set up to only write a stub signames.h if CROSS_COMPILING is defined,
3029 with extern declaration for initialize_signames
3030 - if not cross compiling, #define initialize_signames to nothing
3033 - mksignames is now linked from mksignames.o and buildsignames.o
3034 - add rules to build signames.o, assuming we're building it as part
3035 of the shell (cross-compiling)
3038 - call initialize_signames from initialize_traps
3041 - set SIGNAMES_O to nothing (normal) or signames.o (cross-compiling),
3042 substitute into Makefile
3043 - don't set SIGNAMES_H if cross-compiling any more
3048 - new word flag: W_NOPROCSUB, inhibits process substitution on a word
3051 - change expand_word_internal to suppress process substitution if the
3052 word has the W_NOPROCSUB flag
3055 - --wordexp turns on W_NOPROCSUB in addition to W_NOCOMSUB
3058 - change string_list_dollar_at and string_list_dollar_star so that
3059 MB_CUR_MAX is used to size an array only when using gcc, since gcc
3060 can handle non-constant array sizes using a mechanism like alloca.
3061 Other compilers, e.g. Sun's compiler, do not implement that
3066 builtins/mkbuiltins.c
3067 - when cross-compiling, don't include <config.h>, since it's for the
3068 target rather than the host system. Instead, choose a reasonable
3069 set of default #defines based on a minimal POSIX system
3072 - change find_process to handle a NULL return value from find_pipeline
3073 - return immediately from delete_job if jobs[index] is already NULL or
3074 if it has a null pipeline associated with it
3075 - in delete_job, if find_last_proc returns NULL, don't try to call
3081 - patch from Tim Waugh to replace some literal single quotes with
3082 \(aq, the groff special character for it
3085 - in realloc_jobs_list, make sure to zero out slots after j_lastj
3090 support/mksignames.c
3091 - make sure to include <signal.h> to get right value of NSIG from
3092 (usually) <sys/signal.h>
3097 - when calling parse_matched_pair on a $(...) command substitution,
3098 don't pass the P_DQUOTE flag so that single quotes don't get
3099 stripped from $'...' inside the command substitution. Bug report
3100 and fix from Mike Stroyan <mike.stroyan@hp.com>
3103 - start maintaining true count of living children in js.c_living
3104 - call reset_current in realloc_jobs_list, since old values for current
3105 and previous job are most likely incorrect
3106 - don't allocate a new list in realloc_jobs_list if the old size and
3107 new size are the same; just compact the existing list
3108 - make sure realloc_jobs_list updates value of js.j_njobs
3109 - add some more itrace messages about non-null jobs after j_lastj in
3115 - new value for second argument to longjmp: SIGEXIT. Reserved for
3121 - add logic to make_child to figure out when pids wrap around
3122 - turn second argument to delete_job into flags word, added flag to
3123 prevent adding proc to bgpids list
3127 lib/readline/vi_mode.c
3128 - move code that moves forward a character out of rl_vi_append_mode
3129 into a separate function, _rl_vi_append_forward
3130 - change _rl_vi_append_mode to save `a' as the last command, so it
3131 can be redone properly
3132 - new function _rl_vi_backup, moves point back a character taking
3133 multibyte locales into account
3134 - change rl_vi_redo to handle redoing an `a' command specially --
3135 it should be redone like `i' but after moving forward a character
3136 - change rl_vi_redo to use _rl_vi_backup to move point backward
3137 after redoing `i' or `a'
3140 - new function, delete_old_job (pid), checks whether or not PID is in
3141 a job in the jobs list. If so, and the job is dead, it just removes
3142 the job from the list. If so, and the job is not dead, it zeros
3143 the pid in the appropriate PROCESS so pid aliasing doesn't occur
3144 - make_child calls delete_old_job to potentially remove an already-used
3145 instance of the pid just forked from the jobs list if pids have
3146 wrapped around. Finally fixes the bug reported by Tim Waugh
3150 - new define, GETORIGSIG(sig), gets the original handling for SIG and
3151 sets SIG_HARD_IGNORE if that handler is SIG_IGN
3152 - call GETORIGSIG from initialize_traps, get_original_signal, and
3156 - in wait_for, if the original SIGINT handler is SIG_IGN, don't set
3157 the handler to wait_sigint_handler. This keeps scripts started in
3158 the background (and ignoring SIGINT) from dying due to SIGINT while
3159 they're waiting for a child to exit. Bug reported by Ingemar
3160 Nilsson <init@kth.se>
3162 lib/readline/vi_mode.c
3163 - don't save text to buffer unless undo pointer points to a record of
3164 type UNDO_INSERT; zero it out instead. This fixes bug reported by
3165 Craig Turner <craig@synect.com> with redoing `ctd[ESC]' (empty
3166 insert after change to)
3169 - change set_shell_name so invocations like "-/bin/bash" are marked as
3173 - add note about destroying functions with `unset -f' to the section
3176 lib/readline/terminal.c
3177 - if readline hasn't been initialized (_rl_term_autowrap == -1, the
3178 value it's now initialized with), call _rl_init_terminal_io from
3179 _rl_set_screen_size before deciding whether or not to decrement
3180 _rl_screenwidth. Fixes bug from Mike Frysinger <vapier@gentoo.org>
3184 lib/readline/input.c
3185 - allow rl_set_keyboard_input_timeout to set the timeout to 0, for
3186 applications that want to use select() like a poll without any
3189 lib/readline/doc/rltech.texi
3190 - documented valid values for timeout in rl_set_keyboard_input_timeout
3193 - in stop_pipeline, don't have the parent shell call give_terminal_to
3194 if subshell_environment contains SUBSHELL_ASYNC (no background
3195 process should ever give the terminal to anything other than
3197 - in make_child, don't give the terminal away if subshell_environment
3198 contains SUBSHELL_ASYNC
3203 - in parameter_brace_expand, if extracting ${#varname}, only allow
3204 `}' to end the expansion, since none of the other expansions are
3205 valid. Fixes Debian bug reported by Jan Nordhorlz <jckn@gmx.net>
3210 - in parse_matched_pair, protect all character tests with the MBTEST
3212 - in parse_dparen, take out extra make_word after call to alloc_word_desc
3218 - in parse_matched_pair, add P_ALLOWESC to flags passed to recursive
3219 parse_matched_pair call when encountering a single or double quote
3220 inside a ``-style command substitution
3223 - add call to QUIT at beginning of execute_command_internal; better
3224 responsiveness to SIGINT
3229 - change rl_invoking_keyseqs_in_map to honor the setting of
3230 convert-meta when listing key bindings, since if convert-meta is off,
3231 using '\M-' as the prefix for bindings in, for instance,
3232 emacs-escape-keymap, is wrong. This affects `bind -p' output
3233 - change rl_untranslate_keyseq to add '\e' instead of '\C-[' for
3237 - add call to QUIT at end of execute_command
3241 lib/readline/display.c
3242 - changed two places in update_line where a check of whether the cursor
3243 is before the last invisible character in the prompt string to
3244 differentiate between the multibyte character case (where
3245 _rl_last_c_pos is a physical cursor position) and the single-byte
3246 case (where it is a buffer index). This prevents many unnecessary
3247 \r-redraw the line sequences. Reported by Dan Jacobson.
3252 - wrap QUIT macro in do...while(0) like other compound statement
3254 - CHECK_TERMSIG define (placeholder for now); future use will be to
3255 handle any received signals that should cause the shell to
3256 terminate (e.g., SIGHUP)
3258 {input,jobs,nojobs}.c
3259 - add calls to CHECK_TERMSIG where appropriate (reading input and
3260 waiting for children)
3261 - include quit.h if necessary
3266 - undo change that makes `)' in a compound assignment delimit a token.
3267 It messes up arithmetic expressions in assignments to `let', among
3270 sig.h,{jobs,nojobs,sig,trap}.c,builtins/trap.def
3271 - rename termination_unwind_protect to termsig_sighandler
3274 - split termsig_sighandler into two functions: termsig_sighandler, which
3275 runs as a signal handler and sets a flag noting that a terminating
3276 signal was received, and termsig_handler, which runs when it is `safe'
3277 to handle the signal and exit
3278 - new terminate_immediately variable, similar to interrupt_immediately
3279 - termsig_sighandler calls termsig_handler immediately if
3280 terminate_immediately is non-zero
3283 - change CHECK_TERMSIG macro to check terminating_signal and call
3284 termsig_handler if it's non-zero
3285 - add same check of terminating_signal and call to termsig_handler to
3289 - change call to termsig_sighandler to call termsig_handler directly,
3292 parse.y,builtins/read.def
3293 - set terminate_immediately to non-zero value when reading interactive
3294 input, as is done with interrupt_immediately
3298 doc/{bash.1,bashref.texi}
3299 - reworded the POSIX standard references to remove mention of POSIX.2
3300 or 1003.2 -- it's all the 1003.1 standard now. Recommended by
3305 lib/readline/complete.c
3306 - move call to filename dequoting function into
3307 rl_filename_completion_function; call only if directory completion
3308 hook isn't set. This means that directory-completion-hook now needs
3309 to dequote the directory name. We don't want to dequote the directory
3310 name before calling the directory-completion-hook. Bug reported by
3311 Andrew Parker <andrewparker@bigfoot.com>
3314 - add necessary directory name dequoting to bash_directory_expansion
3315 and bash_directory_completion_hook
3317 lib/readline/doc/rltech.texi
3318 - add note to description of rl_directory_completion_hook that it
3319 needs to dequote the directory name even if no other expansions are
3325 - make sure that we skip over braces that don't start a valid matched
3326 brace expansion construct in brace_expand -- there might be a valid
3327 brace expansion after the unmatched `{' later in the string
3328 - brace_gobbler now checks that when looking for a `}' to end a brace
3329 expansion word, there is an unquoted `,' or `..' that's not inside
3330 another pair of braces. Fixes the a{b{c,d}e}f problem reported by
3333 builtins/declare.def
3334 - when not in posix mode, and operating on shell functions, typeset
3335 and declare do not require their variable operands to be valid
3336 shell identifiers. The other `attribute' builtins work this way.
3337 Fixes inconsistency reported by Mike Frysinger <vapier@gentoo.org>
3339 {configure,config.h}.in
3340 - add test for setregid, define HAVE_SETREGID and HAVE_DECL_SETREGID
3342 - add test for eaccess, define HAVE_EACCESS if found
3345 - new file, with sh_stat and sh_eaccess functions, moved from test.c
3346 - renamed old sh_eaccess as sh_stataccess, since it uses the stat(2)
3347 information to determine file accessibility
3348 - new function, sh_euidaccess, to call when uid != euid or gid != egid;
3349 temporarily swaps uid/euid and gid/egid around call to access
3350 - rewrote sh_eaccess to call eaccess, access, sh_euidaccess or
3351 sh_stataccess as appropriate. access(2) will take into account
3352 things like ACLs, read-only file systems, file flags, and so on.
3354 lib/sh/Makefile.in,Makefile.in
3355 - add necessary entries for eaccess.[co]
3358 - change calls to test_stat to call sh_stat
3361 - change calls to test_eaccess to call sh_eaccess
3364 - new extern declaration for sh_eaccess
3367 - remove test_stat and test_eaccess
3372 - make change from 1/28 dependant on CSH_BRACE_COMPAT not being
3373 defined (since old bash behavior is what csh does, defining
3374 CSH_BRACE_COMPAT will produce old bash behavior)
3379 - last argument of bash_default_completion is now a flags word:
3380 DEFCOMP_CMDPOS (in command position) is only current value
3381 - attempt_shell_completion now computes flags before calling
3382 bash_default_completion
3383 - if no_empty_command_completion is set, bash does not attempt command
3384 word completion even if not at the beginning of the line, as long
3385 as the word to be completed is empty and start == end (catches
3386 beginning of line and all whitespace preceding point)
3390 lib/readline/display.c
3391 - change _rl_make_prompt_for_search to use rl_prompt and append the
3392 search character to it, so the call to expand_prompt in rl_message
3393 will process the non-printing characters correctly. Bug reported
3394 by Mike Stroyan <mike.stroyan@hp.com>
3398 lib/readline/display.c
3399 - fix off-by-one error when comparing against PROMPT_ENDING_INDEX,
3400 which caused a prompt with invisible characters to be redrawn one
3401 extra time in a multibyte locale. Change from <= to < fixes
3402 multibyte locale, but I added 1 to single-byte definition of
3403 PROMPT_ENDING_INDEX (worth checking) to compensate. Bug reported
3404 by Egmont Koblinger <egmont@uhulinux.hu>
3408 lib/readline/terminal.c
3409 - call _emx_get_screensize with wr, wc like ioctl code for consistency
3410 - new function, _win_get_screensize, gets screen dimensions using
3411 standard Windows API for mingw32 (code from Denis Pilat)
3412 - call _win_get_screensize from _rl_get_screen_size on mingw32
3414 lib/readline/rlconf.h
3415 - define SYS_INPUTRC (/etc/inputrc) as system-wide default inputrc
3419 - changes to make loadable builtins work on MacOS X 10.[34]
3422 - changes to make it work as a loadable builtin compiled with gcc4
3427 - add SYS_INPUTRC as last-ditch default (if DEFAULT_INPUTRC does not
3428 exist or can't be read) in rl_read_init_file
3430 lib/readline/doc/rluser.texi
3431 - add description of /etc/inputrc as ultimate default startup file
3436 - fix problem with rl_function_of_keyseq that returns a non-keymap
3437 bound to a portion of the passed key sequence without processing
3438 the entire thing. We can bind maps with existing non-map
3439 functions using the ANYOTHERKEY binding code.
3442 - shells running in posix mode do not set $HOME, as POSIX apparently
3448 - mkseq() now takes the increment as an argument; changed callers
3453 - print `hash table empty' message to stdout instead of stderr
3457 lib/readline/readline.c
3458 - when resetting rl_prompt in rl_set_prompt, make sure rl_display_prompt
3459 is set when the function returns
3463 lib/readline/display.c
3464 - further fixes to _rl_make_prompt_for_search from Eric Blake to deal
3465 with multiple calls to expand_prompt
3470 - don't print `hash table empty' message in posix mode
3475 - change extmatch() to turn off FNM_PERIOD in flags passed to recursive
3476 calls to gmatch() when calling it with a substring after the start
3477 of the string it receives. Changed `+', `*', `?, `@', and `!' cases
3478 to do the right thing. Fixes bug reported by Benoit Vila
3482 - add QUIT; statements to mkseq to make large sequence generation
3488 - initialize nalloca in glob_vector
3493 - in glob_vector, when freeing up the linked list after some error,
3494 make sure to set `tmplink' to 0 if `firstlink' is set to 0, else we
3495 get multiple-free errors
3500 - inheritance of the DEBUG, RETURN, and ERR traps is now dependent
3501 only on the `functrace' and `errtrace' shell options, as the
3502 documentation says, rather than on whether or not the shell is in
3503 debugging mode. Reported by Philip Susi <psusi@cfl.rr.com>
3506 - in parse_matched_pair, don't recursively parse ${...} or other
3507 ${...} constructs inside ``
3508 - in parse_matched_pair, remove special code that recursively parses
3509 quoted strings inside `` constructs. For Bourne shell compatibility
3514 - let get_directory_stack take take an `int flags' argument and convert
3515 $HOME to ~ if flags&1 is non-zero
3518 - change extern declaration for get_directory_stack
3521 - call get_directory_stack with an arg of 0 to inhibit converting
3522 $HOME to ~ in the result. Fixes cd ${DIRSTACK[1]} problem
3523 reported by Len Lattanzi <llattanzi@apple.com> (cd fails because
3524 the tildes won't be expanded after variable expansion)
3527 - changed hangup_all_jobs slightly so stopped jobs marked J_NOHUP
3531 - changed check_binary_file() to check for a NUL byte instead of a
3532 non-printable character. Might at some point want to check
3533 entire (possibly multibyte) characters instead of just bytes. Hint
3534 from ksh via David Korn
3538 builtins/reserved.def
3539 - changed runs of spaces to tabs in variables help text to make
3540 indentation better when displayed
3542 builtins/mkbuiltins.c
3543 - changes to avoid the annoying extra space that keeps gettext from
3544 being passed an empty string
3549 - make sure globbing is interrupted if the shell receives a terminating
3554 lib/readline/search.c
3555 - call rl_message with format argument of "%" in _rl_nsearch_init
3556 to avoid `%' characters in the prompt string from being interpreted
3557 as format specifiers to vsnprintf/vsprintf
3561 parse.y, eval.c, input.h
3562 - change execute_prompt_command to execute_variable_command; takes the
3563 variable name as a new second argument
3568 - command_word_completion_function keeps track of when it's searching
3569 $PATH and doesn't return directory names as matches in that case.
3570 Problem reported by Pascal Terjan <pterjan@mandriva.com>
3571 - command_word_completion_function returns what it's passed as a
3572 possible match if it's the name of a directory in the current
3573 directory (only non-absolute pathnames are so tested).
3578 - expand_arith_string takes a new argument: quoted. Either 0 (outside
3579 subst.c) or Q_DOUBLE_QUOTES (substitution functions); changed callers
3582 - changed extern declaration for expand_arith_string
3585 - changed call to expand_arith_string in array_expand_index
3589 lib/readline/histfile.c
3590 - change read_history_range to allow windows-like \r\n line endings
3593 - add new variable, line_number_for_err_trap, currently set but not
3599 - add code to echo -e and echo with xpg_echo enabled to require
3600 a leading 0 to specify octal constants
3605 - slight change to wcsdup() replacement: use memcpy instead of wcscpy
3608 - before turning on W_COMPASSIGN, make sure the final character in the
3609 token is a `(' (avoids problems with things like a=(4*3)/2)
3614 - in number() and lnumber(), turn off PF_ZEROPAD if explicit precision
3616 - change number() and lnumber() to correctly implement zero-padding
3617 specified by a non-zero `.precision' part of the format
3620 - new flag for extract_delimited_string: EX_COMMAND. For $(...), so
3621 we can do things like skip over delimiters in comments. Added to
3623 - changes to extract_delimited_string to skip over shell comments when
3624 extracting a command for $(...) (EX_COMMAND is contained in the
3630 - first argument to skip_single_quoted is now a const char *
3631 - new function, chk_arithsub, checks for valid arithmetic expressions
3632 by balancing parentheses. Fix based on a patch from Len Lattanzi
3636 {configure,config.h}.in
3637 - add separate test for isnan in libc, instead of piggybacking on
3641 - separate the isnan replacement function so it's guarded by its own
3642 HAVE_ISNAN_IN_LIBC define
3645 - new file, contains replacement wcsdup library function from subst.c
3646 with change back to using wcscpy
3648 Makefile.in,lib/sh/Makefile.in
3649 - make sure wcsdup.c is compiled and linked in
3652 - wcsdup now found in libsh; removed static definition
3656 lib/readline/callback.c
3657 - loop over body of rl_callback_read_char as long as there is additional
3658 input rather than just calling readline_internal_char, which does
3659 not handle multi-character key sequences or escape-prefixed chars
3661 lib/readline/macro.c
3662 - make sure we turn off RL_STATE_MACROINPUT when the macro stack is
3663 empty if we are reading additional input with RL_STATE_MOREINPUT
3666 - Mac OS X no longer likes the `-bundle' option to gcc when creating a
3667 dynamic shared library
3672 - don't try to dereference user_entry if HAVE_GETPWENT isn't defined
3674 lib/readline/input.c
3675 - make sure chars_avail is not used without being assigned a value in
3677 - use _kbhit() to check for available input on Windows consoles, in
3678 rl_gather_tyi and _rl_input_available
3682 lib/readline/display.c
3683 - calculate (in expand_prompt) and keep track of length of local_prompt
3684 in local_prompt_len; use where appropriate
3685 - when using o_pos to check whether or not we need to adjust
3686 _rl_last_c_pos after calling update_line, assume that it's correct
3687 (a buffer index in non-multibyte locales and a cursor position in
3688 multibyte locales) and adjust with wrap_offset as appropriate
3689 - in update_line, set cpos_adjusted to 1 after calling
3690 _rl_move_cursor_relative to move to the end of the displayed prompt
3692 - in _rl_move_cursor_relative, check that the multibyte display
3693 position is after the last invisible character in the prompt string
3694 before offsetting it by the number of invisible characters in the
3699 lib/readline/doc/{rluser.texi,readline.3}
3700 - make sure to note that key bindings don't allow any whitespace
3701 between the key name or sequence to be bound and the colon
3705 lib/readline/display.c
3706 - in update_line, make sure we compare _rl_last_c_pos as strictly less
3707 than PROMPT_ENDING_INDEX, since it's 0-based, to avoid multiple
3713 - in decode_prompt_string, only prefix the expansion of \[ or \]
3714 with CTLESC if the corresponding readline escape character is
3715 CTLESC (coincidentally the same as \[) or CTLNUL. Bug report sent
3716 by Mike Frysinger <vapier@gentoo.org> prompted the discovery
3719 - slight change to test for /dev/fd to compensate for a linux
3720 failing; suggested by Mike Frysinger <vapier@gentoo.org>
3725 - broke assign_array_var_from_string into two functions:
3726 expand_compound_array_assignment and assign_compound_array_list;
3727 assign_array_var_from_string just calls those functions now
3730 - new extern declarations for expand_compound_array_assignment and
3731 assign_compound_array_list
3734 - in do_compound_assignment, call expand_compound_array_assignment
3735 before creating the local variable so a previous inherited
3736 value can be used when expanding the rhs of the compound assignment
3741 doc/{bash.1,bashref.texi}
3742 - clarifed `trap' description to make it clear that trapped signals
3743 that are not set to SIG_IGN are reset when a subshell is created
3748 - change reset_locale_vars to call setlocale (LC_ALL, "") if LANG
3750 - if LANG is unset or NULL, reset the export environment before
3751 calling setlocale in reset_locale_vars, and trust that it will
3752 change the environment setlocale() inspects
3756 lib/readline/history.c
3757 - new function, HIST_ENTRY *alloc_history_entry (char *string, char *ts);
3758 creates a new history entry with text STRING and timestamp TS (both
3759 of which may be NULL)
3760 - new function, HIST_ENTRY *copy_history_entry (HIST_ENTRY *hist),
3761 which copies the line and timestamp entries to new memory but just
3762 copies the data member, since that's an opaque pointer
3763 - new function, void replace_history_data (int which, histdata_t *old, histdata_t *new)
3764 which replaces the `data' member of specified history entries with
3765 NEW, as long as it is OLD. WHICH says which history entries to
3767 - add calls to replace_history_data in rl_free_undo_list and
3771 - new function, alloc_undo_entry (enum undo_code what, int start, int end, char *text)
3772 takes care of allocating and populating a struct for an individual
3774 - new function: _rl_copy_undo_entry(UNDO_LIST *entry)
3775 - new function: _rl_copy_undo_list(UNDO_LIST *head)
3777 lib/readline/rlprivate.h
3778 - new extern declarations for _rl_copy_undo_{entry,list}
3781 - change execute_cond_node so that quoting the rhs of the =~
3782 operator forces string matching, like the == and != operators
3787 - add_undo_redirect now takes as an additional argument the type of
3788 redirection we're trying to undo
3789 - don't add a "preservation" redirection for fds > SHELL_FD_BASE if
3790 the redirection is closing the fd
3795 - make sure that parameter_brace_substring leaves this_command_name
3796 set to either NULL or its previous value after setting it so that
3797 arithmetic evaluation errors while expanding substring values
3798 contain meaningful information
3803 - make sure that SUBSHELL_ASYNC and SUBSHELL_PIPE are set as flag bits
3804 in subshell_environment, rather than setting only a single value
3805 - change execute_subshell_builtin_or_function to give the `return'
3806 builtin a place to longjmp to when executed in a subshell or pipeline
3807 (mostly as the last command in a pipeline). Bug reported by
3808 Oleg Verych <olecom@gmail.com>
3809 - in execute_simple_command, make sure to call execute_disk_command
3810 with the_printed_command_except_trap to keep DEBUG trap command
3811 strings from overwriting the command strings associated with jobs
3812 and printed in job control messages. Bug reported by Daniel Kahn
3813 Gillmor <dkg-debian.org@fifthhorseman.net>
3815 [bash-3.2-alpha frozen]
3820 - add new CBLANK (for [:blank:] class) flag value for syntax table and
3821 shellblank(c) character test macro
3824 - add support for setting CBLANK flag in the syntax table depending on
3825 whether or not isblank(x) returns true for character x
3828 - change locale_setblanks to set or unset CBLANK flag for each
3829 character when locale changes
3832 - change call to whitespace(c) in lexical analyzer (read_token()) to
3833 call shellblank(c) instead, so locale-specific blank characters are
3834 treated as white space. Fixes bug reported by Serge van deb Boom
3835 <svdb+bug-bash@stack.nl>
3838 - when printing redirections, add a space between <, >, and <> and the
3839 following word, to avoid conflicts with process substitution. Bug
3840 reported by Ittay Dror <ittyad@qlusters.com>
3845 - set CROSS_COMPILE to the empty string by default, so we don't inherit
3846 a random value from the environment. Bug reported by
3847 Lee Revell <rlrevell@joe-job.com>
3851 lib/glob/xmbsrtowcs.c
3852 - make sure destp is non-null before assigning a 0 to *destp in
3853 xdupmbstowcs. Fix from Louiwa Salem <loulwas@us.ibm.com>
3856 - fix execute_in_subshell to make sure asynchronous isn't set to 0
3857 before subshell_environment is set appropriately and
3858 setup_async_signals is run. Based on report by Louiwa Salem
3859 <loulwas@us.ibm.com>
3862 - in rl_generic_bind(), make sure that the keys array is freed before
3863 an error return. Fix from Louiwa Salem <loulwas@us.ibm.com>
3868 - make sure all editing code is protected with #ifdef READLINE, esp.
3869 unwind-protect that restores the default completion function
3871 lib/readline/display.c
3872 - make sure to set local_prompt_len in rl_message() [in bash-3.2-alpha]
3877 - add more of echo's write error handling to printf. Suggested by
3878 martin.wilck@fujitsu-siemens.com
3882 lib/readline/display.c
3883 - save and restore local_prompt_len in rl_{save,restore}_prompt
3888 [bash-3.2-alpha released]
3892 lib/readline/display.c
3893 - make sure that _rl_move_cursor_relative sets cpos_adjusted when it
3894 offsets `dpos' by wrap_offset in a multi-byte locale. Bug reported
3895 by Andreas Schwab and Egmont Koblinger
3898 - make sure that the call to mbstowcs in string_extract_verbatim is
3899 passed a string with enough space for the closing NUL. Reported
3904 lib/readline/{display,terminal}.c
3905 - remove #ifdefs for HACK_TERMCAP_MOTION so we can use
3906 _rl_term_forward_char in the redisplay code unconditionally
3908 lib/readline/rlprivate.h
3909 - new extern declaration for _rl_term_forward_char
3911 lib/readline/display.c
3912 - in _rl_move_cursor_relative, use `dpos' instead of `new' when
3913 deciding whether or not a CR is faster than moving the cursor from
3914 its current position
3915 - in _rl_move_cursor_relative, we can use _rl_term_forward_char to
3916 move the cursor forward in a multibyte locale, if it's available.
3917 Since that function doesn't have a handle on where the cursor is in
3918 the display buffer, it has to output a cr and print all the data.
3919 Fixes rest of problem reported by Egmont Koblinger
3920 - change variable denoting the position of the cursor in the line buffer
3921 from c_pos (variable local to rl_redisplay) to cpos_buffer_position
3922 (variable local to file) for future use by other functions
3926 lib/malloc/{stats,table}.h
3927 - include <string.h> for prototypes for memset, strlen
3929 lib/termcap/{termcap,tparam}.c
3930 - include <string.h> and provide macro replacement for bcopy if
3935 lib/readline/histexpand.c
3936 - add support for `<<<' here-string redirection operator to
3937 history_tokenize_word. Bug reported by agriffis@gentoo.org
3940 - don't add prototype for strerror() if HAVE_STRERROR defined
3945 - in list_string, use `string' instead of `s' -- s is not initialized
3950 - fix parameter_brace_expand to set W_HASQUOTEDNULL in the WORD_DESC it
3951 returns if the result of parameter_brace_substring is a quoted null
3952 ("\177"). Fixes bug reported by Igor Peshansky <pechtcha@cs.nyu.edu>
3956 lib/readline/readline.h
3957 - new #define, READERR, intended to be used to denote read/input errors
3959 lib/readline/input.c
3960 - in rl_getc, if read() returns an error other than EINTR (after the
3961 EWOULDBLOCK/EAGAIN cases are handled), return READERR rather than
3962 converting return value to EOF if readline is reading a top-level
3963 command (RL_STATE_READCMD)
3965 lib/readline/readline.c
3966 - if rl_read_key returns READERR to readline_internal_char[loop],
3967 abort as if it had read EOF on an empty line, without any conversion
3968 to newline, which would cause a partial line to be executed. This
3969 fixes the bug reported by Mathieu Bonnet <mathieu.bonnet@nalkym.org>
3972 - when testing for validity of /dev/fd/3, use /dev/null instead of
3973 standard input, since the standard input fails with linux and `su'.
3974 Bug reported by Greg Shafer <gschafer@zip.com.au>
3979 - switch the TAGS and tags targets so TAGS is the output of `etags' and
3980 tags is the output of `ctags'. Suggested by Masatake YAMATO
3985 - change code to match documentation: set BASH_COMMAND (which takes its
3986 value from the_printed_command_except_trap) only when not running a
3987 trap. Rocky says the debugger is ok with this, and this is what his
3993 - change set_if_not to create shell_variables if it is NULL, since
3994 -o invocation options can cause variables to be set before the
3995 environment is scanned
3997 [bash-3.2-beta frozen]
4001 [bash-3.2-beta released]
4006 - change dispose_used_env_vars to call maybe_make_export_env
4007 immediately if we're disposing a temporary environment, since
4008 `environ' points to the export environment and getenv() will use
4009 that on systems that don't allow getenv() to be replaced. This
4010 could cause the temporary environment to affect the shell. Bug
4011 reported by Vasco Pedro <vp@di.uevora.pt>
4013 builtins/echo.def,doc/{bash.1,bashref.texi}
4014 - clarify that `echo -e' and echo when the `xpg_echo' shell option is
4015 enabled require the \0 to precede any octal constant to be expanded.
4016 Reported by Vasco Pedro <vp@di.uevora.pt>
4021 - make sure `%q' format specifier outputs '' for empty string arguments
4022 Bug reported by Egmont Koblinger <egmont@uhulinux.hu>
4025 - change make_here_document to echo lines in here-doc if set -v has
4026 been executed. Reported by Eduardo Ochs <eduardoochs@gmail.com>
4029 - change BASH_CHECK_MULTIBYTE:
4030 o replace check for wctomb with check for wcrtomb
4031 o add checks for wcscoll, iswctype, iswupper, iswlower,
4033 o add call to AC_FUNC_MBRTOWC to check for mbrtowc and mbstate_t
4034 define HAVE_MBSTATE_T manually
4035 o add checks for wchar_t, wctype_t, wint_t
4038 - add defines for wcscoll, iswctype, iswupper, iswlower, towupper,
4040 - replace define for wctomb with one for wcrtomb
4041 - add defines for wchar_t, wint_t, wctype_t types
4043 config-bot.h, lib/readline/rlmbutil.h
4044 - add check for HAVE_LOCALE_H before defining HANDLE_MULTIBYTE
4045 - add checks for: ISWCTYPE, ISWLOWER, ISWUPPER, TOWLOWER, TOWUPPER
4046 - add checks for: WCTYPE_T, WCHAR_T, WCTYPE_T
4050 lib/readline/display.c
4051 - when displaying prompts longer than the screenwidth in rl_redisplay,
4052 and looking for the index of the last character whose buffer index
4053 is <= the screen width to set up the inv_lbreaks array, make sure to
4054 catch the case where the index == the screen width (an off-by-one
4055 error occurs otherwise with prompts one character longer than the
4056 screen width). Bug reported by Alexey Toptygin <alexeyt@freeshell.org>
4059 - change DEBUGGER_START_FILE to start with ${ac_default_prefix}/share,
4060 like bashdb installs itself. Reported by Nick Brown
4061 <nickbroon@blueyonder.co.uk>
4065 lib/readline/display.c
4066 - make multibyte code that computes the buffer indices of line breaks
4067 for a multi-line prompt dependent on MB_CUR_MAX, so we don't take
4068 the function call hit unless we're in a locale that can have
4069 multibyte characters
4074 - make dequote_list extern so other parts of the shell can use it
4077 - extern declaration for dequote_list
4080 - call dequote_list before assigning words read to array variable if
4081 we saw an escape character. Old code left spurious CTLESCs in the
4082 string after processing backslashes. Bug reported by Daniel Dawson
4083 <ddawson@icehouse.net>
4092 - change -fpic to -fPIC for FreeBSD systems (needed for SPARC at least)
4101 - change parse_matched_pair to make sure `` command substitution does
4102 not check for shell comments while parsing. Bug reported against
4103 bash-3.2 by Greg Schaefer <gschafer@zip.com.au>
4108 - add new parser_state flag: PST_REGEXP; means we are parsing a
4109 regular expression following the =~ conditional operator
4110 - cond_node sets PST_REGEXP after reading the `=~' operator
4111 - change read_token to call read_token_word immediately if the
4112 PST_REGEXP bit is set in parser_state
4113 - change read_token_word to skip over `(' and `|' if PST_REGEXP is
4114 set, since those characters are legitimate regexp chars (but still
4115 parse matched pairs of parens)
4120 - add -e and -r to $SHORT_DOC usage string
4123 - fix encoding; Russian text in the file is actually encoded in KOI8-R
4128 - make sure that the call to move_to_high_fd in open_shell_script
4129 passes 1 for the `check_new' parameter so open high file descriptors
4130 don't get closed and reused. Bug reported by Mike Stroyan
4131 <mike.stroyan@hp.com>
4134 - fixes for typos and misspellings sent in by Brian Gough
4139 - make netbsd shared library creation like openbsd's until I hear
4140 differently (called using `gcc -shared')
4145 - fix bug in parameter_brace_patsub so if the first character of the
4146 expanded pattern is a `/', it is not taken as a global replacement
4147 specifier. Bug reported on forums.nekochan.net
4152 - if we need an extern declaration for asprintf, make sure we include
4153 stdarg.h or varargs.h, whichever is appropriate
4154 - if we do not have asprintf, add an extern declaration using
4155 stdarg format. This fixes the bugs with %G on IRIX reported by
4156 Matthew Woehlke <mwoehlke@tibco.com> and Stuart Shelton
4157 <srcshelton@gmail.com>
4161 - add note to not call log_10 with 0 argument -- we don't want to do
4162 what real log10 does (-infinity/raise divide-by-zero exception)
4163 - make sure numtoa (used by dtoa) takes the precision into account
4164 when computing the fractional part with an argument of `0.0'
4165 - make sure `g' and `G' formats don't print radix char if there are
4166 no characters to be printed after it (change to floating())
4167 - change callers of log_10 (exponent, 'g' and 'G' cases in
4168 vsnprintf_internal) to not call it with 0 for argument. This fixes
4169 the hang reported on IRIX by Matthew Woehlke <mwoehlke@tibco.com>
4170 and Stuart Shelton <mwoehlke@tibco.com>
4174 builtins/{caller,pushd}.def
4175 - changed longdoc strings in loadable builtin section to be single
4176 strings, as put in the build directory builtins.c file, to aid
4182 - reset subshell_environment to 0 after make_child() call in
4183 execute_null_command. Fix provided by Roy Marples
4184 <uberlord@gentoo.org>
4189 lib/readline/{util,undo,callback,input,isearch,kill}.c
4190 - make sure that memory allocated with xmalloc is freed with xfree
4194 lib/readline/display.c
4195 - make sure that _rl_redisplay_after_sigwinch clears the last displayed
4196 line instead of the current line (instead of assuming that the
4197 cursor is on the last line). Fixes bug reported by Egmont
4198 Koblinger <egmont@uhulinux.hu>
4202 lib/readline/display.c
4203 - make sure that _rl_col_width is never called with MB_CUR_MAX == 1,
4204 since it doesn't count invisible characters and they are not
4205 compensated for. Added a warning in _rl_col_width if called when
4206 MB_CUR_MAX == 1. Bug reported and solution suggested by Eric
4207 Blake <ebb9@byu.net>
4211 lib/readline/display.c
4212 - make sure _rl_wrapped_line is initialized to inv_lbsize int chars.
4213 inv_lbsize and vis_lbsize are the same at that point, but it makes
4214 the intent clearer. Fix from jan.kratochvil@redhat.com.
4215 - in rl_redisplay, make sure we call memset on _rl_wrapped_line with
4216 its full initialized size: inv_lbsize*sizeof(int). Fix from
4217 jan.kratochvil@redhat.com.
4218 - wrap the invisible and visible line variables and _rl_wrapped_line
4219 into line_state structures, which can be swapped more efficiently.
4220 Have to watch the wrapped_line field, since there's now one for
4221 each struct. Changes from jan.kratochvil@redhat.com.
4223 lib/readline/complete.c
4224 - in stat_char, check for `//server' on cygwin and return `/', since
4225 it will always behave as a directory. Fix from Eric Blake
4227 lib/readline/histfile.c
4228 - Cygwin's mmap() works in recent versions, so don't #undef HAVE_MMAP.
4229 Recommendation from Eric Blake
4231 lib/readline/rlwinsize.h
4232 - make sure tcflow() is defined on SCO Unix. Fix from William Bader
4235 - add check for localeconv to AM_INTL_SUBDIR macro
4238 - add HAVE_LOCALECONV
4241 - add check for HAVE_LOCALECONV for GETLOCALEDATA macro
4244 - first argument to legal_number is now `const char *'
4248 lib/readline/{readline,rlprivate}.h
4249 - move rl_display_prompt declaration from rlprivate.h to readline.h
4252 - new function: rl_free(void *mem), for use by users of readline dlls
4255 lib/readline/readline.h
4256 - new extern declaration for rl_free
4258 lib/readline/doc/rltech.texi
4259 - document rl_free and rl_display_prompt for use by application writers
4264 - change tests for /dev/fd and /dev/stdin to use constructs of the form
4265 (exec test ... ) instead of test ... to avoid bash's /dev/fd and
4266 /dev/stdin emulation
4271 - in delete_job, reset_current was being called before the job slot
4272 was cleared -- moved after job_slots[job] was set to NULL. Fixes
4273 bug reported by Dan Jacobson <jidanni@jidanni.org>
4278 - when the checkhash option is set, fix the check for the hashed
4279 pathname being an existing executable file. Old code required a
4280 hash table deletion and re-addition. Bug reported by Linda
4281 Walsh <bash@tlinx.org>
4286 - in pos_params, handle case of `start' == 0 by making the list of
4287 positional parameters begin with $0
4288 - in parameter_brace_substring, increment `len' if start == 0, sicne
4289 we will be adding $0 to the beginning of the list when we process it
4291 doc/{bash.1,bashref.texi}
4292 - document new behavior of `0' offset when using substring expansion
4293 with the positional parameters
4296 - changes to shared object creation for loadable builtins on Mac OS X
4297 10.4 to use libtool instead of ld by specifying -dynamiclib
4298 argument and changing options to be appropriate for libtool. This
4299 winds up creating a dynamic shared library instead of an executable
4304 - don't set last_asynchronous_pid to the child's pid in the child
4305 for asynchronous jobs (for compatibility -- all other posix shells
4306 seem to do it this way). This means that (echo $! )& echo $! should
4307 display two different pids. Fix from discussion on the
4310 builtins/mkbuiltins.c
4311 - change builtins.c file generation so short doc strings are marked for
4312 gettext and available for subsequent translation. Suggestion by
4313 Benno Schulenberg <bensberg@justemail.net>
4315 builtins/{bind,cd,hash,inlib,printf,pushd,test,times,ulimit}.def
4318 - fix a few strings that were not marked as translatable. Fix from
4319 Benno Schulenberg <bensberg@justemail.net>
4322 - new function, _rl_revert_all_lines(void). Goes through history,
4323 reverting all entries to their initial state by undoing any undo
4326 lib/readline/rlprivate.h
4327 - extern declaration for _rl_revert_all_lines
4330 - add #undef HAVE_STRCOLL if STRCOLL_BROKEN is defined, prep to move
4331 from config.h.in. Problem reported by Valerly Ushakov
4336 lib/readline/readline.c
4337 - call _rl_revert_all_lines from readline_internal_teardown if the
4338 variable _rl_revert_all_at_newline is non-zero
4339 - declare _rl_revert_all_lines initially 0
4343 doc/{bash.1,bashref.texi}
4344 - make sure to be explicit that `typeset +r' cannot remove the readonly
4345 attribute from a variable
4350 - new file, implements zmapfd(), which takes a file and returns its
4351 contents in a string
4354 - extern declaration for zmapfd
4359 - in _evalfile, use zmapfd to read the contents of the file into a
4360 string, rather than using the size reported by stat and reading that
4361 many characters, if the file is not a regular file (for things like
4362 named pipes, stat reports the size as 0)
4367 - make sure number() sets the FL_UNSIGNED flag for %x and %X, so
4368 fmtulong treats them as unsigned numbers. Fixes bug reported by
4369 James Botte <James.M.Botte@lowes.com>
4374 - new function, _rl_ttymsg, for internal warning messages -- does
4375 redisplay after printing message
4376 - new function, _rl_errmsg, for internal warning/error messages --
4377 does not do redisplay after printing message
4379 lib/readline/rlprivate.h
4380 - new extern declaration for _rl_ttymsg, _rl_errmsg
4382 lib/readline/{bind,callback,complete,display,rltty}.c
4383 - use _rl_ttymsg/_rl_errmsg instead of direct writes to stderr
4386 - in get_tmpdir(), make sure that $TMPDIR names a writable directory;
4387 otherwise skip it. This catches names longer than PATH_MAX, but in
4388 case it doesn't test that the length does not exceed PATH_MAX. Fixes
4389 heap overrun bug reported by Eric Blake <ebb9@byu.net>
4393 builtin/{set,declare,shopt,trap,wait,bind,complete,enable,fc,history,read,setattr}.def
4394 doc/{bash.1,bashref.texi}
4395 - improvements and clarifications to the help text associated with
4396 several builtins, in some cases bringing them into line with the
4397 man page text. From Benno Schulenberg <bensberg@justemail.net>
4399 doc/{bash.1,bashref.texi}
4400 - add `E' and `T' to the synopsis of the set builtin.
4401 From Benno Schulenberg <bensberg@justemail.net>
4403 builtins/{break,exit,fg_bg,hash,jobs,type,ulimit}.def
4404 builtins/{common,evalfile}.c
4405 {error,expr,jobs,mksyntax,nojobs,shell,subst,version,siglist}.c
4406 - add gettextizing marks to untranslated strings
4407 From Benno Schulenberg <bensberg@justemail.net>
4412 - change display_signal_list (used by `trap -l' and `kill -l') to use
4413 five columns instead of 4 to display signal names
4416 - use the true terminal width instead of assuming 80 when displaying
4417 help topics, leaving two characters of whitespace between horizontal
4418 descriptions instead of 1
4419 - change to print in columns with entries sorted down rather than across
4420 (that is, like `ls' rather than `ls -x'). Change inspired by Benno
4421 Schulenberg <bensberg@justemail.net>
4424 - give values to the JOB_STATE enumerations so they can be used as
4429 doc/{bash.1,bashref.texi}
4430 - change description of `set' to make it clearer that you can use
4431 `+' to turn off options
4432 - clarify in the description of word splitting that sequences of
4433 IFS whitespace at the beginning or end of the string are ignored
4438 - move `shopt' builtin to its own section; change internal references
4439 from `Bash Builtins' to the new shopt builtin
4440 - new section for builtins that modify shell behavior in `Shell
4441 Builtin Commands'; move set and shopt to new section. Changes
4442 inspired by Benno Schulenberg <bensberg@justemail.net>
4445 - add MT_USETMPDIR flag to calls to sh_mktmpfd and sh_mktmpname. Bug
4446 reported by Eric Blake <ebb9@byu.net>
4448 {configure,Makefile}.in
4449 - changes so that the pathname for DEBUGGER_START_FILE is substituted
4450 into pathnames.h at make time (allowing more flexibility in setting
4451 `prefix' or `datadir') instead of at configure time. Suggested by
4452 Nick Brown <nickbroon@blueyonder.co.uk>
4455 - declaration for have_devfd; initialized from HAVE_DEV_FD
4456 - declaration for check_jobs_at_exit; initialized to 0
4457 - declaration for autocd; initialized to 0
4460 - new dynamic variable, BASHPID, always set from return value from
4461 getpid() (changes even when $$ doesn't change). Idea from Bruce
4462 Korb <bruce.corb@3pardata.com>
4465 - if check_jobs_at_exit is non-zero, list jobs if there are any stopped
4466 or running background jobs; don't exit shell if any running jobs
4469 - in execute_simple_command, if the first word of a simple command is
4470 a directory name (after looking for builtins, so `.' isn't caught)
4471 that isn't found in $PATH, and `autocd' is non-zero, prefix a "cd"
4472 to the command words
4475 - new `checkjobs' option, changes value of check_jobs_at_exit
4476 - new `autocd' option, changes value of autocd
4479 - add COMP_TYPE, set to rl_completion_type, to list of variables set
4480 by bind_compfunc_variables and unset by unbind_compfunc_variables
4482 doc/{bash.1,bashref.texi}
4484 - document new shopt `checkjobs' option
4485 - document new shopt `autocd' option
4486 - document COMP_TYPE completion variable
4491 - in BASH_SYS_SIGLIST, check HAVE_DECL_SYS_SIGLIST instead of the
4492 obsolete and no-longer-supported SYS_SIGLIST_DECLARED
4496 lib/readline/vi_mode.c
4497 - add ` (backquote) to the list of vi motion characters
4498 - in rl_vi_delete_to, rl_vi_change_to, and rl_vi_yank_to, don't delete
4499 character under the cursor if the motion command moves the cursor
4500 backward, so add F and T to the commands that don't cause the
4502 - add ` to the characters that don't cause the mark to be adjusted
4503 when used as a motion command, since it's defined to behave that way
4504 - when a motion character that may adjust the mark moves point
4505 backward, don't adjust the mark so the character under the cursor
4508 lib/readline/complete.c
4509 - add variable rl_sort_completion_matches; allows application to
4510 inhibit match list sorting
4511 - add variable rl_completion_invoking_key; allows applications to
4512 discover the key that invoked rl_complete or rl_menu_complete
4514 lib/readline/readline.h
4515 - extern declarations for rl_completion_invoking_key and
4516 rl_sort_completion_matches
4518 lib/readline/doc/rltech.texi
4519 - documented rl_completion_invoking_key and rl_sort_completion_matches
4522 - export variable COMP_KEY to completion functions; initialized from
4523 rl_completion_invoking_key; unset along with rest of completion
4526 doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi
4530 - changes to make variables and function parameters `const' for better
4531 text sharing. Changes originally from Andreas Mohr
4532 <andi@rhlx01.fht-esslingen.de>
4536 lib/intl/Makefile.in
4537 - use cmp before copying libgnuintl.h to libintl.h -- maybe save a few
4540 lib/builtins/Makefile
4541 - fixes to build LIBINTL_H if necessary, dependency on this for
4542 mkbuiltins.o prevented `make -j 6' from working correctly
4547 - new function, fifos_pending(), returns the count of FIFOs in
4548 fifo_list (process substitution)
4551 - extern declaration for fifos_pending()
4554 - in execute_simple_command, if CMD_NO_FORK is set before we call
4555 execute_disk_command, make sure there are no FIFOs in the expanded
4556 words (from process substitution) and turn off CMD_NO_FORK if there
4557 are, so they can get unlinked when the command finishes
4562 - read_comsub now takes a flags parameter and returns appropriate W_*
4564 - command_substitute now returns a WORD_DESC *, with the string it used
4565 to return as the `word' and `flags' filled in appropriately
4568 - changed extern declaration for command_substitute
4571 - changed callers of command_substitute appropriately
4574 - string_extract_verbatim now takes an additional int flags argument;
4580 - fix problem that caused index links to not be generated if the first
4581 index node had a name different than the node name
4584 - encapsulated all indexes into a single `Indexes' appendix; works
4585 around bug fixed in texi2html
4590 - add call to sv_histtimefmt in initialize_variables so HISTTIMEFORMAT
4591 from the environment is honored. Fix from Ark Submedes (heh)
4592 <archimerged@gmail.com>
4594 lib/readline/histfile.c
4595 - make sure that the first character following the history comment
4596 character at the beginning of a line is a digit before interpreting
4597 it as a timestamp for the previous line
4599 doc/{bash.1,bashref.texi},lib/readline/doc/hsuser.texi
4600 - added detail to make it clear exactly how history timestamps are
4601 saved to and read from the history file
4604 - change quote_escapes to add CTLESC before spaces if IFS is null,
4605 just in case we have to split on literal spaces later on (e.g., in
4606 case of unquoted $@). Corresponding changes to dequote_escapes.
4607 Fixes a couple of problems reported by Brett Stahlman
4608 <brettstahlman@comcast.net>
4613 - make same change to read_comsub to add CTLESC before ' ' if $IFS is
4614 null, since we will split on literal spaces later
4619 - new function, array_quote_escapes (ARRAY *a), calls quote_escapes
4620 on each element of the array in the same way array_quote calls
4622 - call array_quote_escapes if match is not quoted in array_patsub
4623 - array_slice is now used, so remove the #ifdef INCLUDE_UNUSED define
4624 - change structure of array_subrange to call array_slice to create a
4625 new array with the desired subset of elements, then call array_quote
4626 or array_quote_escapes as necessary, like array_patsub. Convert to
4627 a string by calling array_to_string on the sliced-out array
4630 - new extern declaration for array_quote_escapes
4633 - since array_patsub now calls quote_escapes as necessary, callers
4634 don't need to call it after array_patsub returns. Fixes first bug
4635 reported by Brett Stahlman <brettstahlman@comcast.net>
4636 - since array_subrange now calls quote_escapes as necessary, callers
4637 don't need to call it after array_patsub returns. Same fix as
4643 - add -DSOLARIS to LOCAL_CFLAGS for solaris x
4646 - don't #undef HAVE_GETCWD if GETCWD_BROKEN and SOLARIS are both
4647 defined. Solaris's loopback mount implementation breaks some of the
4648 file system assumptions the replacement getcwd uses.
4651 - if GETCWD_BROKEN is defined, call getcwd with PATH_MAX for the size
4652 argument, so it will allocate a buffer for the current working dir
4653 with that size, instead of one that's `big enough'
4656 - add #undef PRI_MACROS_BROKEN for AIX 4.3.3
4659 - new flag value for quote_string_for_globbing: QGLOB_REGEXP (quoting
4660 an ERE for matching as a string)
4663 - change quote_string_for_globbing to understand QGLOB_REGEXP
4666 - change execute_cond_node to pass 2 (regexp match), 1 (shell pattern
4667 match), or 0 (no matching) to cond_expand_word
4670 - change cond_expand_word to translate SPECIAL==2 into passing
4671 QGLOB_REGEXP to quote_string_for_globbing
4674 - by default, if all else fails, set shell's idea of locale to ""
4675 instead of its idea of `default_locale' -- the library functions
4676 behave better with that value
4681 - if PRI_MACROS_BROKEN is defined, #undef PRIdMAX (AIX 4.3.3 broken)
4685 Makefile.in,{builtins,doc}/Makefile.in,lib/*/Makefile.in
4686 - add assignment for datarootdir as per GNU coding standards
4688 Makefile.in,builtins/Makefile.in,lib/intl/Makefile.in,po/Makefile.in.in
4689 - use @localedir@ instead of $(datadir)/locale in assignment
4694 - fix compact_jobs_list to not return js.j_lastj, since that is in use
4695 and should not be overwritten. Fix from Len Lattanzi
4696 <llattanzi@apple.com>
4701 - change rl_forward_char to allow moving to the end of the line when
4702 using the arrow keys in vi insertion mode, rather than having the
4703 behavior identical between vi command and insertion modes. Change
4704 suggested by Hugh Sasse <hgs@dmu.ac.uk>
4709 - patch from Steve Grubb of RedHat <sgrubb@redhat.com> to make bash
4710 audit root's behavior by logging commands using his audit
4711 framework. Enabled if the shell's name is `aubash'.
4716 - use WSTATUS (p->status) instead of bare p->status. Fix from
4717 Jim Brown <jim.brown@rsmas.miami.edu>
4721 lib/readline/{complete,input,isearch,misc,readline,text,vi_mode}.c
4722 - make sure cases where rl_read_key returns -1 (usually due to EIO
4723 because the controlling tty has gone away) are handled correctly.
4724 Prompted by report from Thomas Loeber <ifp@loeber1.de>
4729 - new function, top_level_cleanup, callable from contexts where some
4730 cleanup needs to be performed before a non-fatal call to
4734 - new extern declaration for top_level_cleanup
4737 - add calls to top_level_cleanup before calls to jump_to_top_level
4738 in a builtin command context (no_args(), get_numeric_arg()). Fixes
4739 bug reported by Ian Watson
4741 lib/readline/display.c
4742 - in _rl_move_cursor_relative, use `new' when comparing against
4743 the last invisible character in the prompt, since they both denote
4744 buffer indices when in a multibyte locale, whereas `dpos' is a
4749 lib/readline/complete.c
4750 - set rl_completion_append_character to the default (' ') in
4751 set_completion_defaults(). Fixes bug reported by David Emerson
4752 <demerson3x@angelbase.com>
4757 - make sure read() returns a value >= 0 before using it as an index
4759 - use a variable of type `ssize_t' for return value from read()
4760 - only try to read the entire contents of a regular file in one shot
4761 if the file size is less than SSIZE_MAX. These fix problems
4762 reported by hooanon05@yahoo.co.jp.
4765 - define SSIZE_MAX as 32767 if it's not defined
4767 lib/readline/display.c
4768 - in rl_redisplay() and update_line(), if redrawing the prompt because
4769 it contains invisible characters, make sure we redraw the character
4770 indicating a modified history line and take it into account when
4771 computing _rl_last_c_pos
4772 - in update_line, if deleting characters and redrawing the new text,
4773 make sure we adjust _rl_last_c_pos by wrap_offset in a multibyte
4774 locale if the text we're drawing starts before or at the last
4775 invisible character in the prompt string. Fixes bug reported on
4776 bug-readline by J Pelkey <pelkeyj@gmail.com>
4779 - when adding at CTLESC character to the current token, do not
4780 escape it with CTLESC if pass_next_character indicates that the
4781 CTLESC was escaped by a backslash. Fixes bug reported by
4782 Paul Bagshaw <paul.bagshaw@orange-ftgroup.com>.
4787 - in rl_forward_char, short-circuit the loop if in emacs mode and
4788 rl_point == rl_end. Fixes problem with multibyte locales
4789 reported by Len Lattanzi <llattanzi@apple.com>
4794 - new flag for subshell_environment: SUBSHELL_PROCSUB, for process
4798 - add SUBSHELL_PROCSUB to subshell_environment in process_substitute
4803 - fix installation of bash.info to understand that it is in the build
4804 directory, not the source directory
4807 - new function, init_mail_dates, calls remember_mail_dates only if
4808 there are no mailboxes in `mailfiles'
4809 - new function, init_mail_file, initializes a FILEINFO, using the
4810 last time mail was checked as the mtime and atime (or the time the
4811 shell was started if last_time_mail_checked is uninitialized)
4812 - call init_mail_file instead of update_mail_file in add_mail_file,
4813 called from remember_mail_dates (which is supposed to initialize
4814 the list of mail files)
4815 - new convenience functions, alloc_mail_file and dispose_mail_file to
4816 allocate and free FILEINFO structs
4819 - extern declaration for init_mail_dates
4822 - call init_mail_dates instead of remember_mail_dates
4827 - changes to print $PS2 when a line is continued with a backslash in
4828 an interactive shell. This is as POSIX requires
4833 - make sure quote_escapes is only ever called when the word to be
4834 escaped is not marked as double-quoted -- cleaner, and allows us
4835 to make certain assumptions
4840 - change all EX_* defines to begin with SX_
4841 - new flag, SX_NOCTLESC, obeyed by string_extract_verbatim, tells it
4842 to not obey CTLESC quoting
4843 - change quote_escapes to not quote CTLESC with CTLESC if one of the
4844 chars in $IFS is CTLESC, since the return value from quote_string
4845 will be passed to word splitting and filename generation
4846 - change read_comsub to do the same thing for unquoted command
4848 - change list_string to pass SX_NOCTLESC if CTLESC is one of the
4849 chars in $IFS, so it will split on CTLESC instead of using it as a
4855 - slight change to string_extract_verbatim to allow CTLESC to quote
4856 CTLNUL even if SX_NOCTLESC is set in the flags passed, to protect
4857 the CTLNULs from future calls to remove_quoted_nulls. Only
4858 matters when $IFS contains CTLESC
4859 - changes to cope with $IFS containing CTLNUL in the same way as the
4863 - changes to cope with $IFS containing CTLNUL in the same way as the
4869 - a couple of fixes to the `%z' code
4872 - add an fflush after printing the auto-logout message
4877 - add call to top_level_cleanup in exp_jump_to_top_level to get things
4878 like unwind-protects and the loop levels cleaned up
4880 {arrayfunc,expr,variables}.c
4881 - add calls to top_level_cleanup before jump_to_top_level()
4885 builtins/complete.def
4886 - make sure the `command' argument to the -C option is printed with
4887 single quotes, since multi-word commands will require them. Bug
4888 reported by martin@snowplow.org
4891 - change execute_builtin_or_function and execute_subshell_builtin_or_function
4892 to call fflush(stdout) after the builtin or function returns, to
4893 make sure that all output is flushed before the call returns. It
4894 matters on cygwin. Fix suggested by Eric Blake <ebb9@byu.net>
4897 - in do_redirection_internal, if the file descriptor being acted upon
4898 is the same one used by the stdout stream, call fflush(stdout) to
4899 make sure all output is flushed before changing the underlying fd
4900 out from underneath stdio. Fix suggested by Eric Blake <ebb9@byu.net>
4907 - new function, sh_chkwrite(int), fflushes stdout and checks for error;
4908 printing an error message and returning a new exit status if there's
4909 an error on stdout. Takes exit status as argument; returns new exit
4910 status (EXECUTION_FAILURE if write error)
4913 - new extern declaration for sh_chkwrite
4915 builtins/{alias,cd,complete,echo,fc,history,pushd,shopt,times,trap,type,ulimit,umask}.def
4916 - change to use sh_chkwrite to report write errors
4919 - if an error occurs while writing commands from the history to a file
4920 to be executed, report a write error and return failure without
4921 attempting to execute any commands
4925 builtins/{bind,declare,set,setattr}.def
4926 - change to use sh_chkwrite to report write errors
4930 lib/readline/input.c
4931 - fix off-by-one errors in _rl_get_char (pop_index) and rl_stuff_char
4932 (push_index) that caused the 511th character in the buffer to be
4933 discarded. Fixes bug reported by Tom Bjorkholm <tom.bjorkholm@ericsson.com>
4938 - fix parameter_brace_remove_pattern to pass getpattern() newly-allocated
4939 memory. If word expansions (particularly brace expansions) are
4940 required, the expansion code will free the string passed to
4941 expand_word_internal, and we don't want to free unallocated memory
4942 (patstr++) or have duplicate frees (patstr). Fixes bug reported on
4947 lib/readline/signals.c
4948 - fix bug in rl_set_signals that caught SIGINT twice and didn't catch
4949 SIGTERM. Bug reported by Ed Kwan <ed.kwan@onstor.com>
4954 - change compact_jobs_list to return 1 if js.j_lastj == 0 and there is
4955 a job in jobs[0]; compact_jobs_list should never return an index
4957 - change reset_job_indices to avoid infinite looping when js.j_firstj
4958 == 0 or js.j_firstj == js.j_jobslots upon function entry. Fixes
4959 bug reported by osicka@post.cz
4965 - new variable, executing_builtin, keeps track of number of "levels"
4966 of builtins being executed; incremented by execute_builtin; saved
4967 and restored by execute_simple_command
4970 - new variable, assigning_in_environment, set and unset around calls
4971 to assign_in_env by the expansion code
4974 - use executing_builtin and assigning_in_environment to decide whether
4975 or not to look into temporary_env when calling find_variable_internal.
4976 Fixes problem reported by Kevin Quinn <kevquinn@gentoo.org>
4981 - change add_undo_redirect to differentiate between file descriptors
4982 greater than SHELL_FD_BASE (currently 10) used internally to save
4983 others and then being the targets of user redirection and fds that
4984 are just the target of user redirections. The former need to have
4985 an `exec undo' redirect added to undo it in case exec throws away
4986 redirections; the latter does not. We use the close-on-exec flag
4987 for this: if it's set, we assume that the file descriptor is being
4988 used internally to save another. Fixes problem reported by Ian
4989 Jackson <ian@davenant.greenend.org.uk>
4992 - new function, init_interactive_script(), does interactive initialization
4993 for a script run with `bash -i script' -- does everything the same
4994 as init_interactive except set `interactive == 1', which causes the
4995 shell to read from the standard input, after calling
4997 - call init_interactive_script if a script is run as `bash -i script'.
4998 Fixes problem reported by Joseph Michaud <jmichaud@sgi.com>
5003 - change vbadd to only call FASTCOPY if the passed buffer length is
5005 - if the `-v' option is supplied and `vbuf' is already non-null from a
5006 previous `printf -v var' call, set vbuf[0]=0 explicitly instead of
5007 relying on vbadd to do it -- vbadd may not be called.
5008 - fix PRETURN macro to set vbuf[0] == 0 if vbuf is not freed. These
5009 should fix problem reported by Elmar Stellnberger <estellnb@yahoo.de>
5011 lib/readline/display.c
5012 - fix update_line to deal with the case where col_lendiff > 0 (meaning
5013 the new string takes up more screen real estate than the old) but
5014 lendiff < 0 (meaning that it takes fewer bytes to do so). This can
5015 happen when a multibyte prompt string is replaced with a longer one
5016 containing only single-byte characters (e.g., when doing a reverse
5017 i-search). Fixes gentoo bug reported by Peter Volkov
5018 <torre_cremata@mail.ru>
5021 - make sure we only print $PS2 if the standard input is a terminal
5022 - new function, read_mbchar, to read a multibyte character so we
5023 can make sure we read entire multibyte chars when `read -n' is
5024 used, rather than bytes. Only called when -n is supplied.
5025 Fixes problem reported by Stanislav Brabec <sbrabec@suse.cz>
5030 - new #defines for third argument to named_function_string:
5031 FUNC_MULTILINE (don't suppress newlines) and FUNC_EXTERNAL (convert
5032 to external display form)
5035 - new extern declaration for remove_quoted_escapes
5038 - remove_quoted_escapes is now global
5041 - in named_function_string, if FUNC_EXTERNAL is in the flags argument,
5042 call remove_quoted_escapes to convert from internal to external form.
5043 Fixes bug reported by Bo Andresen <bo.andresen@zlin.dk>
5045 variables.c,builtins/{declare,setattr,type}.def
5046 - use FUNC_MULTILINE in calls to named_function_string as appropriate
5047 - add FUNC_EXTERNAL to calls to named_function_string as appropriate
5051 {make_cmd,variables}.c
5052 - changes to enable the shell to compile when debugger support is
5053 configured out (function_def hash table and access functions). Fixes
5054 bug reported by Horst Wente <horst.wente@acm.org>
5057 - fix bug in `help' two-column printing to avoid referencing
5058 shell_builtins[num_shell_builtins]
5061 - in get_name_for_error, use dollar_vars[0] if the name returned from
5062 looking in $BASH_SOURCE[0] is the empty string as well as if it's
5068 - change array_value_internal to set *RTYPE to 1 if the reference is
5069 array[*] and 2 if the reference is array[@]
5072 - in parameter_brace_expand_word, set the flags returned by the word
5073 desc to include W_HASQUOTEDNULL if array_value returns QUOTED_NULL
5074 for an array reference like x[*] and the word is quoted. Fixes bug
5075 reported by Christophe Martin <schplurtz@free.fr>
5080 - several changes to preserve errno if tcgetpgrp/tcgetattr/tcsetattr
5081 fail, for subsequent error messages
5082 - change initialize_job_control to turn off job control if the terminal
5083 pgrp == -1 or is not equal to shell_pgrp (with an error message)
5084 - in initialize_job_control, if the shell has been forced interactive
5085 with -i, make sure stderr is hooked to a tty before using it as
5086 the controlling terminal. If it's not, try to open /dev/tty and
5087 assign it to shell_tty. Fixes problems reported by Derek Fawcus
5093 - changes to support shared object and shared library creation on AIX
5094 5.x and later versions. From Niklas Edmundsson <nikke@acc.umu.se>
5098 builtins/mkbuiltins.c
5099 - new array of builtins, posix_builtins, containing builtins listed
5100 as special to the command search order by POSIX
5101 - add POSIX_BUILTIN to the builtin flags if the builtin name is one
5102 that's special to the posix command search order
5105 - new define, POSIX_BUILTIN, means that a builtin is special to the
5106 posix command search order
5110 lib/readline/display.c
5111 - new macro, WRAP_OFFSET, intended to replace W_OFFSET. Takes prompt
5112 strings longer than one physical line with invisible characters on
5113 the second line into account when calculating the number of
5114 invisible characters on the current screen line
5115 - use WRAP_OFFSET where appropriate (update_line, _rl_move_cursor_relative)
5116 - change update_line to deal with adjusting _rl_last_c_pos in a
5117 multibyte environment when the prompt has invisible chars on the
5118 second line and redisplay has output the invisible characters
5119 - change _rl_move_cursor_relative to adjust _rl_last_c_pos in a
5120 multibyte environment when the prompt has invisible chars on the
5121 second line and the redisplay draws the invisible character. Fixes
5122 redisplay bug reported by Andreas Schwab <schwab@suse.de>
5128 lib/readline/rltty.c
5129 - enable flush-output code for systems other than AIX 4.1. Problem
5130 reported by Jan Kratochvil <jan.kratochvil@redhat.com>
5134 lib/readline/display.c
5135 - set prompt_invis_chars_first_line from the portion of the prompt
5136 following the final newline, instead of from the prefix. Fixes
5137 bug reported on the Ubuntu bug list by dAniel hAhler
5143 - use native __QNX__ and __QNXNTO__ cpp defines instead of qnx and
5144 qnx6, respectively. Patch from Sean Boudreau <seanb@qnx.com>
5147 - #undef HAVE_LSTAT on qnx, so it uses stat instead. Patch from
5148 Sean Boudreau <seanb@qnx.com>
5153 - change sh_invalidnum to be a little smarter about octal and hex
5154 numbers and change the message appropriately. Bug originally
5155 reported on coreutils list by Jürgen Niinre <Jyrgen.Niinre@emt.ee>
5160 - make sure the string passed to test_unop has only a single character
5161 following the `-'. Fixes bug reported by Michael A. Smith
5162 <michael@smith-li.com>
5165 - better input validation: make sure a word looks like a conditional
5166 unary operator (-X) before calling test_unop
5171 - in trap_handler, if it's called directly from the signal handler
5172 (e.g., SIGINT sighandler, set by set_sigint_handler), but the
5173 trap disposition has been reset to the default between the
5174 assignment and receipt of the signal, check that the signal is
5175 trapped and issue a warning if the shell was compiled with
5176 debugging enabled. Fixes bug reported by Fergus Henderson
5181 lib/readline/{util,histexpand}.c
5182 - fixes for small memory leaks from Michael Snyder <msnyder@sonic.net>
5187 - add dependency on builtins/builtext.h to nojobs.o list. Fixes
5188 `make -j 5' issue reported by Chris MacGregor <chris@bouncingdog.com>
5190 examples/loadables/Makefile.in
5191 - add @LDFLAGS@ to SHOBJ_LDFLAGS assignment -- experimental. Suggested
5192 by Mike Frysinger <vapier@gentoo.org>
5194 examples/loadables/{basename,cut,dirname,finfo,head,ln,logname,mkdir,pathchk,print,printenv,push,realpath,rmdir,sleep,tee,truefalse,tty,uname,unlink,whoami}.c
5195 - fix up some includes. Fix from Mike Frysinger <vapier@gentoo.org>
5200 - fix another memory leak in history_find_word. Bug report originally
5201 from Michael Snyder <msnyder@sonic.net>; test case suggested by Jim
5202 Blandy <jimb@codesourcery.com>
5207 - change to do_assignment_internal to make an assignment to a variable
5208 with the `noassign' internal attribute not a variable assignment
5210 - fix do_assignment_internal so assignment to a `noassign' variable
5211 does not cause it to suddenly become visible if it's currently
5217 - change strsub to check whether or not temp is non-null before
5218 trying to null-terminate it. Also make sure temp is allocated
5219 even if the pattern and replacement strings are empty, and set
5220 to a copy of string (like ${foo//})
5221 Bug report from Timo Lindfors <timo.lindfors@iki.fi>
5225 {config.h,Makefile,configure}.in,aclocal.m4
5226 - new tests for fpurge and __fpurge
5228 lib/sh/fpurge.c, externs.h
5229 - new file, fpurge(3) implementation with external decl in externs.h
5232 - add call to fpurge(stdout) to sh_chkwrite
5234 {redir,execute_cmd}.c
5235 - add call to fpurge(stdout) after fflush(stdout) before changing
5236 stdout file descriptor and after a builtin or function executes
5241 - make sure noeval is set to 0 when a longjmp occurs, since it will
5242 not be reset otherwise, and it can be set to 1 while processing
5243 a {pre,post}-increment or {pre,post}-decrement token
5244 - set noeval to 0 at the beginning of evalexp, since it's never
5250 - new builder-modifiable define: DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS
5251 Turning it on will cause errors from EPIPE to not be reported by
5252 the normal shell write error message mechanism
5255 - if DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS is defined, don't print an
5256 error message from sh_wrerror if errno == EPIPE. Suggestion from
5257 Petr Sumbera <petr.sumbera@sun.com>
5261 {jobs,nojobs}.c,jobs.h
5262 - add code to retry fork() after EAGAIN, with a progressively longer
5263 sleep between attempts, up to FORKSLEEP_MAX (16) seconds. Suggested
5264 by Martin Koeppe <mkoeppe@gmx.de>
5269 - change copyright year to 2007
5274 - change quote_string_for_globbing to add a backslash in front of a
5275 backslash appearing in the pathname string, since the globbing
5276 code will interpret backslashes as quoting characters internally.
5277 Bug reported by <herbert@gondor.apana.org.au> on the debian list
5282 lib/readline/display.c
5283 - in update_line, make sure _rl_last_c_pos is > 0 before setting
5284 cpos_adjusted (or we actually moved the cursor to column 0 in
5285 _rl_move_cursor_relative). Fixes redisplay bug with prompt with
5286 only invisible characters reported by dAniel hAhler
5291 lib/readline/display.c
5292 - in rl_redisplay, when calculating the new physical cursor position
5293 in a multibyte locale (`tx'), do not call rl_backspace if tx ends
5294 up < 0. Rest of fix for bug reported by dAniel hAhler
5300 - fix memory overwrite problem that's possible if buf is NULL and
5301 passed size is greater than the pathname length. Reported by
5302 Ian Campbell <ian.campbell@xensource.com>
5305 - change the multiplier for the -c and -f options (`blocks') to 512,
5306 the traditional value (and the one POSIX specifies). Bug reported
5307 by Pete Graner <pgraner@redhat.com>
5310 - pass process substitution through unchanged the same as command
5311 substitution. Prompted by suggestion from Stephane Chazelas
5312 <stephane_chazelas@yahoo.fr>
5314 lib/readline/input.c
5315 - in rl_unget_char, fix off-by-one error when resetting pop_index if
5316 it's < 0. Bug reported by Uwe Doering <gemini@geminix.org>
5319 - change exit status of `type' to not successful if any of the
5320 requested commands are not found. Reported by Stephane Chazleas
5321 <stephane_chazelas@yahoo.fr>
5324 - change command_line_to_word_list to use rl_completer_word_break_characters
5325 instead of the shell metacharacters to split words, so programmable
5326 completion does the same thing readline does internally. Reported
5327 by Vasily Tarasov <vtaras@sw.ru>
5332 - When completing a command name beginning with a tilde and containing
5333 escaped specical characters, dequote the filename before prefixing
5334 it to the matches, so the escapes are not quoted again. Reported
5340 - in readtok(), don't reset lasttp if we've consumed the whitespace
5341 at the end of the expression string. Fixes error message problem
5342 reported by <anmaster@tele2.se>
5347 - change asciicode() to return intmax_t; add multibyte character
5348 support instead of assuming ASCII (depending on behavior of system
5349 multibyte support functions). Fixes bug reported by Rich
5350 Felker <dalias@aerifal.cx>
5355 - if redirections attached to a compound command fail, make sure to
5356 set last_command_exit_value when returning EXECUTION_FAILURE.
5357 Fixes bug reported separately by Andreas Schwab <schwab@suse.de>
5358 and Paul Eggert <eggert@cs.ucla.edu>
5363 - make sure the return value from get_word_from_string is freed if
5364 non-null. Fixes memory leak bug reported by Lars Ellenberg
5365 <lars.ellenberg@linbit.com>
5370 - use getpid() as value of seeded_subshell to avoid problems with
5371 random number generator not getting re-seeded correctly when
5372 subshells are created. Fix from Tomas Janousek <tjanouse@redhat.com>
5374 lib/readline/display.c
5375 - in update_line(), when outputting characters at the end of the line,
5376 e.g., when displaying the prompt string, adjust _rl_last_c_pos by
5377 wrap_offset if the text we're drawing begins before the last
5378 invisible character in the line. Similar to fix from 5/24. Fixes
5379 bug reported by Miroslav Lichvar <mlichvar@redhat.com>
5384 - fix $[ expansion case to deal with extract_arithmetic_subst
5385 returning NULL (if the `]' is missing) and return the construct
5386 unchanged in that case. Fixes tab completion bug reported by
5387 Heikki Hokkanen <hoxu@users.sf.net> (debian bug 451263)
5389 lib/readline/mbutil.c
5390 - fix _rl_find_next_mbchar_internal to deal with invalid multibyte
5391 character sequences when finding non-zero-length chars. Fixes
5392 bug reported by Morita Sho <morita-pub-en-debian@inz.sakura.ne.jp>
5397 - add new function `seedrand' to seed the bash random number
5398 generator from more random data. Suggestion from Steve Grubb
5400 - replace the rng in brand() with a slightly better one from FreeBSD
5401 (filtered through Mac OS X 10.5). Replacement suggested by
5402 Steve Grubb <sgrubb@redhat.com>
5407 - darwin 9 also requires linking against libreadline.a and
5408 libhistory.a because of Apple's questionable decision to ship a
5409 libreadline "replacement" that doesn't provide all functions
5411 doc/{bash.1,bashref.texi}
5412 - slight change to the text describing the effect of set -e when
5418 - fix raw_job_exit_status to correct mixing of int/WAIT values (need
5420 - arrange so that children run as part of command substitutions also
5421 set the SIGINT handler to wait_sigint_handler, since they effectively
5422 don't do job control
5423 - in wait_for, if a child run as part of a command substitution exits
5424 due to SIGINT, resend the SIGINT to the waiting shell with kill(2).
5425 This makes sure the exit status propagates
5427 doc/{bash.1,bashref.texi}
5428 - tighten up the language describing when bash tries to see if its
5429 stdin is a socket, so it can run the startup files. Suggested by
5430 Vincent Lefevre <vincent@vinc17.org>
5433 - in the DISCARD case of a longjmp to top_level, make sure
5434 last_command_exit_value is set to EXECUTION_FAILURE if it's 0,
5435 but leave existing non-zero values alone
5438 - in command_substitute, don't reset pipeline_pgrp in the child
5439 process -- this means that second and subsequent children spawned by
5440 this comsub shell get put into the wrong process group, not the
5441 shell's. Fix for bug reported by Ingo Molnar <mingo@elte.hu>
5446 - make sure the cases for darwin8.x (Mac OS X 10.4.x) are extended to
5447 darwin9.x (Mac OS X 10.5.x). Fixes problem originally reported
5448 against readline-5.2 by schneecrash@gmail.com
5453 - make sure to add the results of (successful) tilde expansion as a
5454 quoted string, to inhibit pathname expansion and word splitting.
5455 From recent Austin Group interpretation.
5457 include/shtty.h, lib/sh/shtty.c
5458 - add ttfd_onechar, ttfd_noecho, ttfd_eightbit, ttfd_nocanon, and
5459 ttfd_cbreak to set tty attributes associated with a particular
5460 file descriptor (which is presumed to point to a terminal). Support
5461 for fix for bug reported by b_bashbug@thebellsplace.com
5463 lib/readline/display.c
5464 - make sure we only use rl_invis_chars_first_line when the number of
5465 physical characters exceeds the screen width, since that's the
5466 only time expand_prompt sets it to a valid value
5471 - change set_minus_o_option to return EX_USAGE if an invalid option
5472 name is supplied. All callers can handle it.
5473 - change set_builtin to return what set_minus_o_option returns if it's
5474 not EXECUTION_SUCCESS. This allows EX_USAGE errors to abort a
5475 shell running in posix mode
5480 - generalize the calls to the tty attribute functions to maintain a
5481 local copy of the terminal attributes and use the fd supplied as
5482 the argument to the -u option (default 0). Fix for bug reported
5483 by b_bashbug@thebellsplace.com
5485 doc/bashref.texi, lib/readline/doc/{history,rlman,rluser,rluserman}.texi
5486 - Slight changes to conform to the latest FSF documentation standards.
5487 Patch from Karl Berry <karl@freefriends.org>
5492 - after calling clear_unwind_protect_list, make sure we reset
5493 parse_and_execute_level to 0, since there's nothing left to
5494 restore it if top_level_cleanup tests it. Fixes bug reported
5495 by Len Lattanzi <llattanzi@apple.com>
5500 - new function, _path_checkino, checks whether the inode corresponding
5501 to the path constructed from the first two arguments is the same as
5502 the inode number passed as the third argument
5503 - if BROKEN_DIRENT_D_INO is defined, meaning the d_ino/d_fileno
5504 member of struct dirent doesn't contain valid values, use
5505 _path_checkino instead of directly comparing against d_fileno.
5506 Fixes Interix problem reported by Michael Haubenwallner
5512 - fix array_subrange to separate elements in returned string with
5513 first char of $IFS if QUOTED is non-zero, since this indicates
5514 the caller used ${array[@]:foo}. Fixes bug reported by Lea
5515 Wiemann <lewiemann@gmail.com>
5520 - new function returning a string containing the first character of
5521 $IFS: char *ifs_firstchar(int *)
5524 - extern declaration for ifs_firstchar()
5527 - call ifs_firstchar() to get first character of $IFS when needed
5528 (array_subrange() and array_patsub())
5532 lib/readline/display.c
5533 - use sentinel variable set at end of init_line_structures to decide
5534 whether to call it from rl_redisplay, since early SIGWINCH on
5535 Mac OS X that hits during this function can cause _rl_wrapped_line
5536 to be referenced before initialization. Fix for bug reported by
5537 Len Lattanzi <llattanzi@apple.com>
5540 - skip_to_delim is now compiled into the shell all the time, not just
5541 when readline is linked in
5544 - use skip_to_delim to find the `/' denoting the end of a pattern
5545 in pattern substitution, since it knows more shell syntax than
5546 quoted_strchr and understands multibyte characters. Fixes bug
5547 reported by Dmitry V Golovashkin <Dmitry.Golovashkin@sas.com>
5552 - add `flags' argument to skip_to_delim telling it whether or not to
5553 set no_longjmp_on_fatal_error; set this flag when calling from the
5554 readline completion code
5557 - update extern declaration for skip_to_delim
5562 - expand_prompt_string takes a third argument: the initial flags for
5566 - change extern declaration for expand_prompt_string to add third arg
5569 - pass W_NOCOMSUB as third argment to expand_prompt_string when
5570 calling from bash_directory_completion_hook, since we don't want
5571 to do command substitution from the completion code
5574 - change call to expand_prompt_string
5579 - added an `install_builtins' rule to install the builtins.1 man page,
5580 preprocessing it with sed to force `.so man1/bash.1', which some
5581 versions of man require. Suggestion from Peter Breitenlohner
5583 - new target `install_everything' that will install normal documentation
5584 and builtins man page
5585 - changed uninstall target to remove bash_builtins page from man
5588 lib/readline/vi_mode.c
5589 - new function, rl_vi_insert_mode, which calls rl_vi_start_inserting
5590 to make sure the value of `last command to repeat' is set correctly.
5591 Fix from Thomas Janousek <tjanouse@redhat.com>
5592 - add support for redoing inserts made with the `I' command. Fix
5593 from Thomas Janousek <tjanouse@redhat.com>
5594 - add support for redoing inserts made with the `A' command
5596 lib/readline/readline.h
5597 - new extern declaration for rl_vi_insert_mode
5599 lib/readline/{misc,readline,vi_mode,vi_keymap}.c
5600 - change calls to rl_vi_insertion_mode to rl_vi_insert_mode
5605 - change timeout behavior when not reading from a tty device to save
5606 any partial input in the variable list, but still return failure.
5607 This also causes variables specified as arguments to read to be
5608 set to null when there is no input available. Fix inspired by
5609 Brian Craft <bcboy@thecraftstudio.com>
5614 - change computation of last_hist to use remember_on_history instead
5615 of a hard-coded `1'. This keeps fc -l -1 in PROMPT_COMMAND from
5616 looking too far back
5620 lib/readline/complete.c
5621 - fix fnwidth to use string[pos] instead of *string when testing the
5622 current character for a control character or rubout
5627 - change posix_initialize to turn off source/. searching $PWD when
5628 the file sourced is not found in $PATH. Fixes bug reported by
5629 Paolo Bonzini <bonzini@gnu.org> and Eric Blake <ebb9@byu.net>
5634 - changes to text and formatting suggested by Jan Schampera
5635 <jan.schampera@web.de>
5640 - change command_word_completion_function to use the word completion
5641 found by readline, which matters only when ignoring case is on
5642 and the completion found in the file system differs in case from
5643 the text the user typed (this is what readline does for normal
5644 filename completion). Fixes issue reported by Jian Wang
5645 <jwang@a10networks.com.cn>.
5650 - if the filename passed as an argument contains a `/', don't search
5651 $PATH. Not sure why it wasn't like this before
5655 lib/readline/terminal.c
5656 - change rl_crlf so that the MINT system on ATARI systems adds a
5657 carriage return before the \n
5661 doc/{bash.1,bashref.texi}
5662 - added text to the EXIT STATUS section noting that exit statuses
5663 fall between 0 and 255, inclusive
5665 support/mkversion.sh
5666 - output a #define for DEFAULT_COMPAT_LEVEL (${major}${minor}; e.g. 32)
5670 - int variable, shell_compatibility_level, set to DEFAULT_COMPAT_LEVEL
5674 - new shopt variable, compat31, sets shell_compatibility_level to 31
5675 (or back to default if unset)
5678 - in execute_cond_node, restore bash-3.1 behavior of quoted rhs of
5679 regexp matches if shell_compatibility_level == 31
5683 lib/readline/rltty.c
5684 - set readline_echoing_p = 1 if tcgetattr fails and sets errno to
5685 EINVAL, as Linux does when the fd is a pipe. Reported by Mike
5686 Frysinger <vapier@gentoo.org>
5690 {MANIFEST,Makefile.in},lib/sh/{casemod,uconvert,ufuncs}.c
5691 - new library sources from bash-4.0-devel tree
5694 - moved cdspell() here from builtins/cd.def, renamed dirspell()
5697 - new declarations for extern functions from new library files
5698 - new extern declaration for lib/sh/spell.c:dirspell()
5701 - call extern library function dirspell(); remove static cdspell()
5704 - when read times out, make sure input_string is null-terminated before
5705 assigning any partial input read to the named variables
5709 lib/glob/xmbsrtowcs.c
5710 - cut the number of memory allocations in xdupmbstowcs by not keeping
5711 track of the indices if the caller hasn't asked for it
5716 - make sure the adjustment to i in fc_gethnum uses the same formula
5717 fc_builtin uses to calculate last_hist
5718 - make sure that every time fc_gethnum is called, the fc command last
5719 in the history list has not yet been deleted, since fc_gethnum
5720 assumes that it has not. Fix from John Haxby <john.haxby@oracle.com>
5722 lib/readline/complete.c
5723 - new private library function, _rl_reset_completion_state(), used to
5724 reset any completion state internal to the library when a signal
5726 - call _rl_reset_completion_state() before returning from
5727 rl_complete_internal
5729 lib/readline/rlprivate.h
5730 - new extern declaration for _rl_reset_completion_state
5732 lib/readline/signals.c
5733 - call _rl_reset_completion_state from rl_signal_handler on SIGINT.
5734 This fixes one of the problems identified by Mika Fischer
5735 <mf+ubuntu@zoopnet.de>
5738 - programmable_completions now saves pointer to the compspec it's
5739 working with in new global variable CURCS
5740 - new function, pcomp_set_readline_variables, that sets or unsets
5741 readline variables based on a passed flags value (COPT_FILENAMES,
5743 - new function, pcomp_set_compspec_options, to set or unset bits in
5744 the options word of a passed compspec (default CURCS)
5745 - only call bash_dequote_filename (via rl_filename_dequoting_function)
5746 from pcomp_filename_completion_function if the readline state
5747 word indicates word completion is in progress
5750 - new extern declaration for curcs
5751 - new extern declaration for pcomp_set_readline_variables
5752 - new extern declaration for pcomp_set_compspec_options
5755 - fix bash_dequote_filename to implement shell quoting conventions:
5756 1. Inhibit backslash stripping within single quotes
5757 2. Inhibit backslash stripping within double quotes only if
5758 the following character is one of the special ones
5759 - call pcomp_set_readline_variables from attempt_shell_completion
5760 instead of doing the equivalent inline
5765 - make sure we sort array of matches in byte order (using strcmp). so
5766 the brace calculations work correctly even when the locale orders
5767 characters like aAbBcC...zZ. Fixes bug reported by Torsten Nahm
5768 <torstennahm@torstennahm.de>
5772 lib/readline/{rltty,signals}.c
5773 - move block_sigint and release_sigint from rltty.c to signals.c; add
5774 _rl_ prefix to make them public to the library; change callers.
5775 From Jan Kratochvil <jan.kratochvil@redhat.com>
5777 lib/readline/rlprivate.h
5778 - new extern declarations for _rl_block_sigint and _rl_release_sigint
5780 lib/readline/display.c
5781 - add calls to _rl_block_sigint and _rl_release_sigint to rl_redisplay,
5782 since it maniupluates global data structures. Fix from Jan
5783 Kratochvil <jan.kratochvil@redhat.com>
5786 - change calls to asprintf and manually adding to vbuf to use calls
5787 to vsnprintf against vbuf directly -- if the number of characters
5788 to be written overflows the buffer, realloc the buffer and use
5789 vsnprintf again. This should reduce the memory used by printf.
5790 Idea from Yuya Katayama <yuya999@gmail.com>
5792 lib/readline/doc/rltech.texi
5793 - documented rest of readline's state flags, including RL_STATE_CALLBACK
5794 - documented rl_save_state and rl_restore_state
5798 lib/readline/{rlprivate.h,{display,readline,rltty,terminal,text}.c}
5799 - rename readline_echoing_p to _rl_echoing_p for namespace consistency
5801 lib/readline/{rlprivate.h,{callback,readline,util}.c}
5802 - rename readline_top_level to _rl_top_level for namespace consistency
5805 - new -b (socket buffer size) and -T (number of threads) options
5808 - fix bug in calculation of the array element assignment string length:
5809 use length of `is' instead of `indstr'. Reported as ubuntu bug
5810 #202885 by John McCabe-Dansted
5812 builtins/setattr.def
5813 - new function, show_all_var_attributes, displays attributes and
5814 values for all shell variables (or shell functions) in a reusable
5818 - new extern declaration for show_all_var_attributes
5820 builtins/declare.def
5821 - change `declare -p' to print out all variable attributes and values,
5822 and `declare -fp' to print out all function attributes and
5823 definitions. Inspired by request from John Love-Jensen
5826 doc/{bash.1,bashref.texi}
5827 - document new -b and -T options to ulimit
5828 - tighten up language describing AND and OR lists
5829 - add description of new behavior of `declare -p'
5834 - rename curcs -> pcomp_curcs
5835 - new global completion variable, pcomp_curcmd, the current command
5836 name being completed
5838 builtins/complete.def
5839 - new builtin, compopt, allows completion options for command names
5840 supplied as arguments or the current completion being executed to
5841 be modified. Suggested by Mika Fischer <mf+ubuntu@zoopnet.de>
5845 doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi
5846 - document new compopt builtin
5851 - change solaris10 stanza to use -fPIC to fix 64-bit sparc_v9/solaris10
5852 compilations. Fix from Fabian Groffen <grobian@gentoo.org>
5855 - added `-i text' option, inserts `text' into line if using readline.
5856 Suggested by many, used some ideas from Kevin Pulo <kevin@pulo.com.au>
5858 doc/{bash.1,bashref.texi}
5859 - document new `-i text' option to read builtin
5864 - new settable variable, `history-size', sets the max number of
5865 entries in the history list
5867 doc/bash.1,lib/readline/doc/{rluser.texi,readline.3}
5868 - document new `history-size' settable readline variable
5872 builtins/complete.def
5873 - change build_actions calling sequence to take a struct with `other'
5874 (non-action) flag arguments (-p, -r)
5875 - add support for `-E' option to build_actions and complete builtin --
5876 modifies or displays (internal) `_EmptycmD_' completion spec
5879 - change attempt_shell_completion to try programmable completion on an
5880 `empty' command line and return the results
5882 doc/bash.1,lib/readline/doc/rluser.texi
5883 - documented new `-E' option to `complete'
5888 - new variable, `enable_history_list', used to reflect setting of
5890 - change bash_history_{enable,disable,reinit} to set enable_history_list
5891 as well as remember_on_history
5894 - use `enable_history_list' instead of `remember_on_history' to keep
5895 value of `-o history' option
5897 builtins/evalstring.c
5898 - instead of unwind-protecting remember_on_history, use a function to
5899 restore it to the value of `enable_history_list' after
5900 parse_and_execute runs the commands in the string. This allows
5901 history to be turned off in a startup file, for instance. Problem
5902 reported by Dan Jacobson <jidanni@jidanni.org>
5907 - limited support for completing command words with globbing characters
5908 (only a single match completed on TAB, absolute or relative
5909 pathnames supported, no $PATH searching, some support for displaying
5910 possible matches, can be used with menu completion).
5911 Suggested by Harald Koenig <h.koenig@science-computing.de>
5914 - change redirection printing to output r_err_and_out as `&>file',
5915 since the man page says that's the preferred form
5920 - change long doc so the first line is a short description
5921 - add `Exit Status:' section to each longdoc describing exit values
5924 - new `-d' option to print short description of each utility
5925 - new `-m' option to print description of each builtin in a
5926 pseudo-manpage format (inspired by ksh93)
5928 doc/{bash.1,bashref.texi}
5929 - document new `-d' and `-m' options to `help'
5931 builtins/mapfile.def
5932 - new builtin, `mapfile', imported from bash-4.0-devel branch
5934 tests/{mapfile.{data,right,tests},run-mapfile}
5935 - tests for `mapfile' builtin
5937 doc/{bash.1,bashref.texi}
5938 - added description of `mapfile' builtin
5940 MANIFEST,Makefile.in,builtins/Makefile.in
5941 - added entries for mapfile source files
5944 - new function, bind_array_element, to support mapfile builtin
5949 - fix operator precendence in expcond(): term after the `:' is
5950 a conditional-expression, not a logical-OR-expression (using C
5951 terminology). Bug reported by <archimerged@gmail.com>
5956 - new P_ define for using ngettext to decide on plural forms
5962 - in execute_disk_command, if the command is not found, search for
5963 a shell function named `command_not_found_handle' and call it
5964 with the words in the command as arguments. Inspired by Debian
5967 doc/{bash.1,bashref.texi}
5968 - document new command_not_found_handle behavior in COMMAND EXECUTION
5972 - change default version to bash-4.0-devel
5977 - change push_func_var and push_exported_var to call
5978 stupidly_hack_special_variables if the temporary variable is going
5979 to be disposed. This undoes any internal changes caused by a local
5980 variable assignment in the environment or in a shell function. Bug
5981 reported by Morita Sho <morita-pub-en-debian@inz.sakura.ne.jp> in
5982 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478096
5987 - fixed a problem caused by change of 1/21 to use remember_on_history,
5988 since it's turned off by parse_and_execute(), but can cause the
5989 last command in history to be deleted and leave last_hist pointing
5990 beyond the end of the history list. edit_and_execute_command can
5994 - new define, RL_BOOLEAN_VAR_VALUE, to take a readline boolean variable
5995 and get its value as 0 or 1 (consider making readline global)
5996 - put tty back into canonical mode before calling parse_and_execute in
5997 edit_and_execute_command and then back into raw mode after it
5998 returns. Fixes problem identified by <koersen@gmail.com>.
6003 - code to support `globstar' option: GX_GLOBSTAR and two internal
6004 flags. Changes to skipname, glob_vector, mbskipname, glob_filename.
6005 New function finddirs().
6008 - new defines to support globstar code
6011 - new shell option, `globstar', enables special handling of `**' in
6012 glob patterns -- matches all directories recursively
6015 - extern declaration for glob_star
6018 - break inline code out of quote_globbing_chars into a separate
6019 function to decide whether a character is a globbing char:
6021 - change shell_glob_filename to call glob_filename with the
6022 GX_GLOBSTAR flag if glob_star is set
6024 doc/{bash.1,bashref.texi}
6025 - document new `globstar' shell option
6028 - new function, broken out of quote_array_assignment_chars:
6029 quote_assign; extended from old code to make sure that globbing
6030 chars and chars in $IFS are quoted when displaying assignment
6031 statements, especially in compound array assignments
6036 - new variable, dircomplete_spelling, controls spelling correction
6037 of directory names when doing filename completion
6038 - change bash_directory_completion_hook to incorporate spelling
6039 correction if initial canonicalization of directory name fails
6042 - new shell option, `dirspell', enables and disables spelling
6043 correction of directory names during word completion
6046 - support for fractional timeout values (ival.uval); uses uconvert
6047 and falarm/setitimer
6050 - new `HAVE_SETITIMER' define
6053 - look for setitimer(2), define HAVE_SETITIMER if found
6055 doc/{bash.1,bashref.texi}
6056 - document new `dirspell' shopt option
6057 - document new fractional values to `read -t timeout'
6062 - new files, basic support for associative array implementation
6065 - new extern declarations for sh_openpipe, sh_closepipe, trim_pathname
6068 - new functions: sh_openpipe to create a pipe and move the file
6069 descriptors to a high range; sh_closepipe, to close pipe fds and
6070 clean up, and trim_pathname, to replace portions of a pathname
6071 with `...' (for prompting)
6074 - don't set last_asynchronous_pid in child shell (messes up $!, among
6078 - moved definitions of parser flags to parser.h
6081 - imported array_modcase (case-changing operations on arrays) from
6085 - new extern declaration for array_modcase
6087 lib/readline/complete.c
6088 - new variable, rl_menu_completion_entry_function, generator for
6090 - new menu completion `browsing' implementation, with several
6091 improvements over the old code. Inspired by Sami Pietila
6092 <sami.pietila@gmail.com>
6094 lib/readline/readline.h
6095 - extern declaration for rl_menu_completion_entry_function
6099 lib/readline/complete.c
6100 - add support for a third argument to fnprint and print_filename,
6101 which supports replacing a specified portion of the pathnames
6102 printed when displaying possible completions with a `...' (or
6103 `___', if the prefix would be confused with a portion of the
6105 - new variable, _rl_completion_prefix_display_length, sets the
6106 number of characters in a common prefix to be replaced with an
6107 ellipsis when displaying possible completions
6108 - add support to _rl_display_match_list to find the length of the
6109 common prefix of all items being displayed, and passing that
6110 value to print_filename for possible replacement with an ellipsis
6111 if that length is longer than _rl_completion_prefix_display_length
6114 - add support for retrieving value of history-size variable to
6115 _rl_get_string_variable_value
6116 - new bindable variable, completion-prefix-display-length. When
6117 displaying possible completions, matches with a common prefix
6118 longer than this value have the common prefix replaced with an
6120 - support for retrieving value of completion-prefix-display-length
6121 variable to _rl_get_string_variable_value
6122 - new bindable variable, revert-all-at-newline: if enabled, causes
6123 all changes in history lines to be undone before readline returns
6124 after processing a newline
6126 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
6127 - document new `completion-prefix-display-length' variable
6128 - document new `revert-all-at-newline' variable
6131 - change execute_builtin to not inherit the `-e' flag into commands
6132 executed by the `command' or `source/.' builtins if we are supposed
6133 to be ignoring the return value. This is like `eval'. Fixes bug
6134 reported by Hiroshi Fujishima <hirobo@tonteki.org>
6139 - when reading the initial environment, don't create variables with
6140 names that are not valid shell identifiers. Fixes bug reported by
6141 Stephane Chazleas <stephane_chazelas@yahoo.fr>
6146 - fix string_quote_removal to gracefully handle the case where a
6147 backslash is the final character in the string (leaves the backslash
6148 in place). Fixes bug reported by Ian Robertson
6149 <iroberts@u.washington.edu>
6153 support/checkbashisms
6154 - Perl script that purports to check for bash-specific features in a
6155 shell script. Lifted from Debian via ubuntu
6159 lib/readline/display.c
6160 - in update_line, when deciding whether or not to adjust _rl_last_c_pos
6161 in a multibyte environment after printing the last line of a multiline
6162 prompt with invisible characters on the first and last lines, use
6163 the number of inivisible chars on the first line in the calculation
6164 deciding whether or not we're past the last invisible character and
6165 need to adjust the cursor position. Old code used the number of
6166 invisible chars on the last prompt line. Fixes bug reported by
6168 - in update_line, when fixing _rl_last_c_pos after drawing the first
6169 line of the prompt, use the number of invisible chars on the first
6170 line as the offset, instead of the total number of invisible chars
6171 - use prompt_multibyte_characters, the number of multibyte chars in
6172 the prompt string, to short-circuit some relatively expensive
6173 multibyte text processing in rl_redisplay
6178 - new function, reinit_special_variables(), a hook for special
6179 vars that need their hook functions called when they're unset as
6180 a result of the shell reinitializing itself to run a script
6183 - shell_reinitialize now calls reinit_special_variables
6184 - shell_reinitialize now calls bashline_reset
6187 - new extern declaration for reinit_special_variables
6190 - new function, bashline_reset(), called when the shell reinitializes
6191 in shell_reinitialize. Right now, just resets
6192 bash_readline_initialized to 0.
6195 - new extern declaration for bashline_reset()
6200 - new function, bash_clear_history, clears the history and resets any
6201 associated internal bash state
6204 - extern declaration for bash_clear_history
6206 builtins/history.def
6207 - call bash_clear_history instead of clear_history for `history -c'.
6208 Fixes part of problem reported by Scott McDermott
6209 <scott.m.mcdermott@gmail.com>
6210 - decrement history_lines_this_session in delete_histent, called for
6213 builtins/history.def,bashhist.[ch]
6214 - move delete_histent() to bashhist.c; rename to bash_delete_histent
6215 - move delete_last_history() to bashhist.c; rename to
6216 bash_delete_last_history()
6221 - add another parameter to mkseq(), the number of digits to put into
6222 each member of a numeric sequence (width), changes to determine
6223 any zero-padding go into expand_seqterm
6224 - changes to expand_seqterm to allow user-specified increments
6226 bashline.[ch],shell.c,sig.c
6227 - switched names of bashline_reinitialize and bashline_reset to better
6228 reflect their functions
6229 - when searching $PATH for directories to use for command completion,
6230 make sure to free `current_path' before going out of scope
6231 - new bindable function `dabbrev-expand', which is more or less
6232 menu completion using dynamic history completion as the generator
6233 - changes to bash_execute_unix_command to set variables for the
6234 executed command like programmable completion: READLINE_LINE
6235 (rl_line_buffer) and READLINE_POINT (rl_point)
6236 - change to bash_execute_unix_command to allow the executed command
6237 to change the readline line buffer by modifying the value of
6238 READLINE_LINE and to change rl_point by modifying the value of
6242 - new SEVAL_ defines for later parse_string changes from 4.0-devel
6246 - new defines for new &>> r_append_err_and_out redirection
6248 builtins/evalstring.c
6249 - new function, parse_string, parses a command from a passed string
6250 and returns the number of characters consumed. For satisfying
6251 Posix rules when parsing command substitutions, from bash-4.0-devel
6253 - split out common prolog code from parse_string and
6254 parse_and_execute into a separate function called from both
6257 - small changes to add symbols needed for parse_string
6258 - parser change to add `|&' as synonym for `2>&1 |'; translation is
6259 performed at parse time so |& never shows up in output of
6260 print_command, for instance. Picked up from zsh, merged in from
6261 bash-4.0-devel branch
6263 parse.y,{redir,copy_cmd,dispose_cmd,make_cmd,print_cmd}.c
6264 - implement new &>> r_append_err_and_out (like >>foo 2>&1); merged
6265 in from bash-4.0-devel branch
6267 doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi
6268 - document new optional increment in brace expansion
6269 - document new zero-padded fixed-width integer brace expansion
6270 - document new `dabbrev-expand' bindable readline command
6271 - document new effects of `bind -x' setting and reading the values of
6272 READLINE_LINE and READLINE_POINT
6273 - document new |& synonym for `2>&1 |' pipeline operator
6277 parse.y - recognize new ;& and ;;& case action list terminator tokens and
6278 implement them in the grammar, setting CASEPAT_FALLTHROUGH and
6279 CASEPAT_TESTNEXT flags as appropriate
6282 - print new ;& and ;;& case clause action list terminators as
6286 - implement new case clause action list terminators:
6287 ;& - fall through to actions associated with next pattern list
6288 ;;& - fall through to tests in next pattern list
6290 doc/{bash.1,bashref.texi}
6291 - document new ;& and ;;& case clause action list terminators
6296 - change waitchld so it treats SIGCHLD like SIGINT if `wait' is being
6297 executed, and allows wait to jump out before running any trap set
6298 on SIGCHLD. Fixes debian bug #483016 reported by Miroslav Rudisin
6299 <miero@atrey.karlin.mff.cuni.cz>
6300 - run_sigchld_trap is no longer static, so the trap code in trap.c
6302 - change run_sigchld_trap to call set_impossible_sigchld_trap instead
6303 of just using a call to restore_default_signal
6306 - new extern declaration for run_sigchld_trap
6309 - fix run_pending_traps to run a SIGCHLD trap if the trap handler isn't
6310 set to IMPOSSIBLE_TRAP_HANDLER
6311 - in trap_handler, don't reset the SIGCHLD trap handler to trap_handler
6312 if MUST_REINSTALL_SIGHANDLERS is defined
6313 - new function, set_impossible_sigchld_handler, sets the trap string
6314 associated with SIGCHLD to IMPOSSIBLE_TRAP_HANDLER; used as a sentinel
6315 by run_sigchld_trap and maybe_set_sigchld_handler
6316 - change maybe_set_sigchld_handler to set the SIGCHLD trap string only
6317 if the current value is IMPOSSIBLE_TRAP_HANDLER. This ensures that
6318 any traps on SIGCHLD set in a SIGCHLD handler will persist. Fixes
6319 debian bug #483016 reported by Miroslav Rudisin
6320 <miero@atrey.karlin.mff.cuni.cz>
6323 - new extern declaration for set_impossible_sigchld_trap
6328 - new function: parse_comsub(), parses $(...) by parsing command
6329 between parens and making sure the next token is `)'. From
6330 the bash-4.0-devel branch
6331 - new function: xparse_dolparen, helper function for parsing
6332 command substitutions in $(...). Called from subst.c to extract
6333 a command substitution during word expansion. From bash-4.0-devel
6335 - new function: rewind_input_stream(). Rewinds bash_input.location.string
6336 back to where it was before the shell parsed a $() command
6337 substitution. From bash-4.0-devel branch
6338 - changes to parse_matched_pair to combine most of the flag variables
6339 (was_dollar, in_comment, and so on) into a local flags word
6344 - call trim_pathname, which retains only the last $PROMPT_DIRTRIM
6345 directories and replaces the intervening characters with `...',
6346 when expanding \w and \W
6348 doc/{bash.1,bashref.texi}
6349 - document the effect of setting PROMPT_DIRTRIM
6354 - make the multiplier (block size) for -c and -f 512 bytes only if in
6355 Posix mode and 1024 bytes otherwise (as in previous versions). Uses
6356 POSIXBLK and BLOCK_SIZE defines to parameterize size based on value
6360 - document this addition to posix mode
6363 - change get_numeric_arg to have a calling sequence and return value
6364 more closely mimicking general.c:legal_number(), with the addition
6366 - add extra value for `fatal' argument to get_numeric_arg to force it
6367 to return failure to the caller rather than longjmping
6370 - change prototype declaration for get_numeric_arg
6372 builtins/{break,shift}.def
6373 - change calls to get_numeric_arg to deal with new semantics and calling
6376 builtins/history.def
6377 - display_history now returns an int
6378 - change calling sequence for get_numeric_arg in display_history
6379 - display_history now returns failure to the caller if get_numeric_arg
6380 detects an invalid number, rather than jumping back to the top level
6381 - use value returned by display_history as return status of history
6382 builtin, filtered through sh_chkwrite
6383 - history no longer aborts compound commands on invalid arguments.
6384 fixes problem reported by Chu Li <chul@cn.fujitsu.com>
6387 - extract_command_subst now takes a third flags argument; passed flags
6388 are ORd into flags passed to other functions; changed callers
6391 - move SX_* defines here from subst.c so parse.y:xparse_dolparen can
6392 see them and behave appropriately
6393 - extract_command_subst now takes a third flags argument; change
6397 - change extract_command_subst to call xparse_dolparen when extracting
6399 - change calls to extract_delimited_string to extract_command_subst
6401 - if command_substitute returns a NULL word desc, don't call
6402 dispose_word_desc on it
6405 - change xparse_dolparen to use the SX_* flags now in subst.h
6410 - in quote_list, set W_HASQUOTEDNULL flag in the word if quote_string
6411 turns "" into CTLNUL
6412 - in dequote_list, turn off W_HASQUOTEDNULL flag in the word if
6413 dequote_string turns CTLNUL into ""
6414 - new function, string_list_pos_params, encapsulates everything
6415 needed to turn the positional parameters or an array indexed with
6416 '@' or '*' into a string, including taking care of quoting and
6417 using the first char of $IFS, when used in another expansion like
6418 pattern removal or pattern substitution
6419 - change list_remove_pattern, pos_params, pos_params_pat_subst to
6420 call string_list_pos_params. Fixes problems reported by
6421 Stephane Chazelas <stephane_chazelas@yahoo.fr>
6426 - include assoc.h for associative arrays
6427 - defines for case-modifying expansions and associative array variables
6428 - sh_var_assign_func_t functions now take an extra char * parameter
6433 - change declarations and definitions of sh_var_assign_func_t functions
6434 to add the extra char * parameter: null_assign, null_array_assign,
6435 assign_seconds, assign_random, assign_lineno, assign_subshell,
6437 - change calls to var->assign_func to add extra char * argument
6438 - broke part of body of dispose_variable out into a new function,
6439 dispose_variable_value, which knows how to free all kinds of shell
6441 - changes to deal with variables with the internal `nofree' attribute
6444 - change calls to var->assign_func to add extra char * argument
6445 - bind_array_var_internal now takes an extra `char *key' argument
6446 - additions for associative array implementation; from bash-4.0-devel
6449 arrayfunc.[ch],subst.c
6450 - expand_compound_array_assignment now takes the variable as the first
6451 argument (SHELL_VAR *); changed function definition and callers
6454 - changes to handle associative arrays in `unset'
6456 {execute_cmd,command}.h
6457 - definitions for coproc implementation; from bash-4.0-devel tree
6460 - new functions for associative arrays: make_new_assoc_variable,
6461 make_local_assoc_variable
6466 - more infrastructure for associative arrays; from bash-4.0-devel tree
6467 - infrastructure for handling assignments to variables with
6468 case-modifying attributes; from bash-4.0-devel tree
6471 - add #defines controlling case-modifying variable attributes and word
6475 - add enable options for case-modifying variable attributes and word
6476 expansions (--enable-casemod-attributes and --enable-casemod-expansions,
6477 respectively); from bash-4.0-devel tree
6480 - add code to fix_assignment_words to handle assignment statements to
6481 "assignment builtins" that seem to be associative arrays. Imperfect
6484 - array_remove_pattern now takes a SHELL_VAR * as its first argument
6485 instead of an ARRAY *; from the bash-4.0-devel tree
6486 - changes to array_length_reference for associative arrays; from the
6488 - changes to get_var_and_type for associative arrays; from the
6490 - changes to parameter_brace_substring for associative arrays; from the
6492 - changes to param_expand for associative arrays; from the
6495 builtins/declare.def
6496 - changes for associative arrays: new `-A' option, changes to make
6497 local and global associative array variables; from the bash-4.0-devel
6503 - in execute_command_internal, when short-circuiting execution
6504 because `breaking' or `continuing' is non-zero, preserve the exit
6505 status by returning `last_command_exit_value' instead of an
6506 unconditional EXECUTION_SUCCESS. Fixes bug reported by Roman
6507 Rakus <rrakus@redhat.com>
6512 - fix get_var_and_type to appropriately handle references like
6513 ${varname[0]}, where `varname' is a scalar variable
6515 make_cmd.[ch],parse.y
6516 - make_here_document now takes a second argument: the current line
6517 number; changed caller (gather_here_documents)
6519 builtins/setattr.def
6520 - added support for associative arrays and the `-A' variable attribute
6521 option; from the bash-4.0-devel tree
6524 - change code that transforms `declare -A xxx=(yyy)' to perform the
6525 internal `declare -A xxx' before doing the variable assignment,
6526 because associative arrays have to be declared before being assigned
6527 to as such; uses new function make_internal_declare
6532 - dequote_escapes is now external; add declaration in subst.h
6533 - remove_quoted_nulls is now external; add declaration in subst.h
6536 - new functions for completeness: array_dequote, array_dequote_escapes,
6537 array_remove_quoted_nulls
6538 - array_subrange now calls array_remove_quoted_nulls for "${array[*]}".
6539 Fixes bug reported by Vitor De Araujo <ux386@yahoo.com.br>
6540 - array_patsub now calls array_remove_quoted_nulls for "${array[*]}"
6541 - array_modcase now calls array_remove_quoted_nulls for "${array[*]}"
6542 - array_patsub now handles the mflags&MATCH_QUOTED case appropriately
6543 (that implies "${array[@]}")
6546 - new functions for case-modifying word expansion suppport:
6547 pos_params_casemod, parameter_brace_casemod; from bash-4.0-devel branch
6550 - new functions for completeness: assoc_remove_quoted_nulls
6551 - assoc_patsub now calls assoc_remove_quoted_nulls for "${assoc[*]}"
6552 - assoc_modcase now calls assoc_remove_quoted_nulls for "${array[*]}"
6553 - assoc_patsub now handles the mflags&MATCH_QUOTED case appropriately
6554 (that implies "${assoc[@]}")
6559 - new function, assoc_subrange: takes a hash table, converts it to a
6560 word list, and performs the subrange and indexing on that list
6561 - new functions for completeness: assoc_dequote, assoc_dequote_escapes
6564 - verify_substring_values now takes the variable SHELL_VAR * as its
6565 new first argument; changed callers
6566 - change verify_substring_values to handle associative arrays using the
6567 number of elements as the upper bound
6568 - brought in code to do case-modifying word expansions from
6569 bash-4.0-devel branch, conditional on CASEMOD_EXPANSIONS
6572 - if the read(2) in getc_with_restart returns -1/EAGAIN, turn off
6573 non-blocking mode on the file descriptor and try again. Fixes
6574 problem reported by Glynn Clements <glynn@clements.plus.com>
6578 doc/{bash.1,bashref.texi}
6579 - documented new case-modifying word expansions
6582 - change make_here_document to display a warning message including the
6583 start line of a here document if it ends up delimited by EOF.
6584 Addresses issue raised by Richard Neill <rn214@hermes.cam.ac.uk>
6587 - in do_assignment_internal, make sure the `invisible' attribute is
6588 unset before returning success
6593 - add `CASEMOD_CAPCASE' define to include or exclude the ~[~] word
6594 expansion and the `capcase' variable attribute (declare -c)
6596 builtins/declare.def
6597 - add support for manipulating the case-modifying attributes (new
6598 declare -clu); from bash-4.0-devel branch
6600 builtins/setattr.def
6601 - add support for reporting case-modifying attributes (-clu attributes);
6602 from bash-4.0-devel branch
6604 doc/{bash.1,bashref.texi}
6605 - specify that the read builtin timing out results in a return value
6607 - document new `-l' and `-u' options to declare/typeset/local. Leave
6608 `-c' undocumented for now
6613 - make_coproc_command: construct a coproc; from bash-4.0-devel tree
6616 - dispose coproc command; from bash-4.0-devel tree
6619 - copy a coproc command; from bash-4.0-devel tree
6622 - print a coproc command; from bash-4.0-devel tree
6625 - dispoe the current coproc on shell exit; from bash-4.0-devel tree
6628 - when closing redirects as part of user redirections, check whether
6629 or not active coprocess fds are being closed and close the coproc
6630 if so; from bash-4.0-devel tree
6633 - add define for COPROCESS_SUPPORT to include coprocesses
6636 - add support for configuring coprocesses into and out of the build
6639 - in waitchld, check whether or not a coproc processs has exited;
6640 from the bash-4.0-devel tree
6645 - document new --enable-coprocesses option that includes coprocess
6649 - add functions for coprocess support, including execute_coproc and
6650 code to call it when command->type == cm_coproc; from
6654 - new library function fdprintf(int fd, const char *format, ...);
6655 printf to a file descriptor
6657 {configure,config.h}.in
6658 - support for detecting fdprintf and compiling in replacement
6660 Makefile.in,lib/sh/Makefile.in
6661 - add rules to include fdprintf.o
6663 doc/{bash.1,bashref.texi}
6664 - documented coprocesses and `coproc' reserved word
6669 - fix array_length_reference to use MB_STRLEN instead of STRLEN, so
6670 multibyte characters in array values are computed correctly. Fixes
6671 bug reported by Wang Xin <wxinee@gmail.com>
6676 - new function, maybe_give_terminal_to (old, new, flags), sets the
6677 terminal pgrp to NEW if and only if it's currently set to OLD
6678 - call maybe_give_terminal_to when the parent sets the terminal pgrp
6679 to the pipeline pgrp in stop_pipeline, so we don't give the
6680 terminal to the new job's pgrp unless it's currently owned by the
6681 shell. Fixes race condition described by Joe Peterson
6682 <joe@skyrush.com>, where parent bash may change tty pgrp after a
6683 grandchild (interactive bash child of su) has changed it to
6684 something else. The call to maybe_give_terminal_to makes explicit
6685 a previously-implicit assumption
6688 - remove dependency on writable /tmp by creating directories in
6692 - make changes to how bash sets no_line_editing and running_under_emacs
6693 to deal with various emacs terminal emulators; use better check
6694 for `eterm', since bash sends $PWD to eterm with control sequences
6695 that confuse other programs. Problem reported by Micah Cowan
6702 - break code that prints here-documents into two functions:
6703 print_heredoc_header, which prints the operator and delimiter, and
6704 print_heredoc_body, which prints the body text and closing delimiter
6705 - change print_redirection to call print_heredoc_{header,body}
6706 - sentinel variable, printing_connection, used when printing a command
6707 of type `connection' (|, &&, ||, etc.)
6708 - change print_redirection_list to save any here documents it finds
6709 while printing a connection and save them in `deferred_heredocs'
6710 - new function, print_deferred_heredocs, called from print_redirection
6711 in the cm_connection case, calls print_heredoc_header for all the
6712 here documents, then prints the operator (|, &&, ||, etc.), then
6713 the here-document body. This preserves syntactic correctness; the
6714 old code printed the control operator after the body of the here
6715 document. Fixes bug reported by <buport@figpost.com>
6720 - in set_locale_var, print a warning message if setlocale() fails any
6721 time it's called -- required some code restructuring
6726 - support for mingw32, contributed by Carlo Bramix
6727 <carlo.bramix@libero.it>
6732 - added support (currently unused) to manage a list of coprocs
6737 - add extern declarations for literal_history and force_append_history
6740 - include "bashhist.h" instead of having extern declarations for the
6741 appropriate history variables
6744 - new parser_state value: PST_HEREDOC, set when reading body of here-
6745 document in parse.y:read_secondary_line
6748 - set PST_HEREDOC bit in parser_state when reading a secondary line
6749 for the body of a here-document
6750 - change read_secondary_line to save lines in the body of a here-
6751 document in the shell history list if remember_on_history is
6752 set. Fixes bug reported by Gene Golub <gene_golub@hotmail.com>
6757 - changed to 4.0-alpha
6759 lib/readline/readline.h
6760 - changed constants to reflect readline-6.0 version
6764 lib/readline/signals.c
6765 - make sure we don't use SIGWINCH without checking whether or not it's
6766 defined. Fix from Pedro Alves <pedro@codesourcery.com>
6772 - updated to GPLv3; edits in every file with a copyright or license
6773 declaration to update to gpl3
6776 - update extended version info to latest gnu standard
6781 - change exp_jump_to_top_level to only call top_level_cleanup if
6782 parse_and_execute_level is 0. If it's not, the longjmp to
6783 parse_and_execute will run the unwind-protect stack. Fixes bug
6784 most recently reported by Roman Rakus <rrakus@redhat.com>
6788 support/config.{guess,sub}
6789 - updated to newer versions from autoconf-2.62 distribution
6794 - fixed parameter_brace_substring to differentiate between indexed and
6795 associative arrays when computing second offset, instead of
6796 assuming indexed array
6801 - simple program to convert input from lower to uppercase and vice
6802 versa. Now used by coproc test suite, since `tr -u' is not
6808 - fixed description of the bindable edit-and-execute commands to note
6809 they check $VISUAL first, instead of $FCEDIT. Fixed bug reported
6812 [bash-4.0-alpha frozen]
6816 [bash-4.0-alpha released]
6820 builtins/evalstring.c
6821 - fixed typo in parse_string (ostring used uninitialized). Bug
6822 reported by Andreas Schwab <schwab@suse.de>
6825 - fix return value of parameter_brace_expand to set the
6826 W_HASQUOTEDNULL flag in the returned WORD_DESC * if the return value
6827 from parameter_brace_remove_pattern is a quoted null string. Fixes
6828 bug reported by Andreas Schwab <schwab@suse.de>
6829 - set the W_HASQUOTEDNULL flag in the return value from
6830 parameter_brace_expand if the return value from parameter_brace_patsub
6831 is a quoted null string
6836 - change read -t 0 to return success if there is input available to be
6837 read -- allows scripts to poll for input. Uses input_avail libsh
6843 - fix extern fpurge declaration -- use HAVE_DECL_FPURGE instead of
6844 NEED_FPURGE_DECL, since the former is set by `configure'
6847 - add extern declaration for close_pgrp_pipe
6848 - add a new job state JNONE (-1) to the enum
6851 - include execute_cmd.h for extern declarations for coproc functions
6854 - include builtins/builtext.h for extern declarations for functions
6855 implementing builtins (e.g., declare_builtin)
6858 - include "pathexp.h" for extern declaration for glob_char_p
6861 - add extern declaration for `asprintf'
6863 lib/readline/rlprivate.h
6864 - add extern declarations for _rl_trace, _rl_tropen
6867 - add extern declarations for zread, zreadc
6870 - include "bashansi.h" for string function declarations
6873 - add extern declaration for parse_string
6876 - include jobs.h for extern declaration for run_sigchld_trap
6879 - fix call to strtoimax in legal_number; if ep == string when function
6880 returns, the number was not converted, even if errno is not set.
6881 Fix from Paul Jarc <prj@case.edu>
6885 [prayers for the victims of 9/11/2001]
6888 - call no_options, as Posix requires. This also has the effect of
6889 disallowing negative return values unless they're prefixed by `--'
6894 - add an error message when bind is used without line editing active,
6895 instead of just returning an error status
6898 - make sure make_local_variable never creates visible variables with
6899 a value, whether or not a variable with the same name existed in a
6900 previous context. This is consistent with ksh93. Fix from
6906 - add call to CHECK_TERMSIG in shell_execve after the call to execve
6907 returns. Recommended by Roman Rakus <rrakus@redhat.com>
6908 - add QUIT check in execute_connection after executing first command
6914 - new semaphore variable, executing_list, incremented every time a
6915 list (command1;command2 or command1 || command2 or command1 &&
6916 command2) is executed; used as sentinel for rest of shell
6918 sig.c,builtins/evalstring.c
6919 - set executing_list to 0 when throwing execution back to top level;
6920 make sure to unwind-protect it in appropriate places
6923 - if a pipeline is killed by SIGINT while executing a list (when
6924 executing_list is non-zero), make sure the shell acts as if an
6925 interrupt occurred. The behavior is dependent on the shell
6926 compatibility level being > 32 (bash-4.0 and above)
6931 - don't bother reporting an error with a file descriptor, even if
6932 the errno is EBADF, if the redirection error (e.g., NOCLOBBER)
6933 can't have anything to do with the fd. Fixes bug reported by
6934 "David A. Harding" <dave@dtrt.org>, debian bug #499633.
6938 builtins/declare.def
6939 - make `declare [option] var' (and the `typeset' equivalent) create
6940 invisible variables, instead of assigning the null string to a
6941 visible variable. Fixes bug reported by Bernd Eggink <monoped@sudrala.de>
6945 builtins/common.[ch]
6946 - new function, builtin_warning(), like builtin_error but for warning
6950 - experimental: print a warning, but go on, if line editing not active
6951 when bind is invoked. Suggested by Rocky Bernstein
6952 <rocky.bernstein@gmail.com>
6957 - use same_file instead of directly comparing st_dev and st_ino when
6958 comparing files in filecomp(). From mingw32 patches submitted
6959 by Hector Chu <hkcc2@cantab.net>
6965 - in redirection_error(), use `error' instead of errno when comparing
6966 against EBADF. From mingw32 patches submitted by Hector Chu
6970 - in unset_bash_input(), reset bash_input.type to st_none after
6971 closing the default buffered fd. From mingw32 patches submitted
6972 by Hector Chu <hkcc2@cantab.net>
6975 - ignore CDPATH when in privileged mode. Suggested by Paul Jarc
6979 - change sv_globignore to only act if privileged mode is not enabled.
6980 Suggested by Paul Jarc <prj@po.cwru.edu>
6982 doc/bash.1,bashref.texi
6983 - document new treatment of CDPATH and GLOBIGNORE when privileged
6987 - change prompt printing to occur after terminal is set to no-echo
6988 mode. Based on suggestion from Stephane Chazelas
6989 <stephane_chazelas@yahoo.fr>
6991 lib/readline/signals.c
6992 - new variables to keep track of special characters corresponding to
6993 SIGINT, SIGQUIT, and SIGTSTP
6994 - new variable to keep track of whether tty is echoing control
6995 characters corresponding to SIGINT, SIGQUIT, and SIGTSTP
6996 - new function, _rl_echo_signal_char(int sig) to display the tty
6997 special char generating SIGINT, SIGQUIT, or SIGTSTP. Based on
6998 idea and code from Joe Peterson <joe@skyrush.com>
6999 - call rl_echo_signal_char in rl_signal_handler: if the terminal
7000 settings indicate it, readline will echo characters that generate
7003 lib/readline/rltty.c
7004 - set _rl_intr_char, _rl_quit_char, and _rl_susp_char to special
7005 characters that generate signals from keyboard
7006 - set _rl_echoctl if ECHOCTL tty flag is set
7008 lib/readline/rlprivate.h
7009 - extern declarations for _rl_intr_char, _rl_quit_char, and
7011 - extern declaration for _rl_echoctl
7013 lib/readline/readline.h
7014 - extern declaration for rl_echo_signal_char()
7016 lib/readline/doc/rltech.texi
7017 - document rl_echo_signal_handler(): available for applications
7018 that install their own signal handlers
7023 - fix errexit logic to not cause the shell to exit when a command in
7024 a pipeline fails. Fixes bug reported by Marcin Owsiany
7029 builtins/evalstring.c
7030 - don't short-circuit execution in parse_and_execute if we want to
7031 run an exit trap. Fixes bug reported by Steffen Kiess
7037 - fix error production to only call YYACCEPT if the shell is currently
7038 interactive and not in parse_and_execute (so parser errors in
7039 things like eval will correctly set $?). Fixes bug reported by
7043 - make sure variable name errors in execute_for_command and non-
7044 identifier function names in execute_intern_function set the
7045 return status to EX_BADUSAGE (2), not EX_USAGE (258)
7048 - new parser state, PST_REPARSE
7051 - turn PST_REPARSE on in parse_string_to_word_list
7052 - in parse_matched_pair, if parsing a single-quoted string and
7053 PST_REPARSE is set, don't requote CTLESC or CTLNUL. Fixes bug with
7054 compound array assignment using $'\x7f' reported by Antonio Macchi
7055 <antonio_macchi@alice.it>
7060 - define LOCAL_LDFLAGS as `-z interpose' on Solaris 8, 9, and 10 to
7061 allow the bash malloc to interpose the libc malloc when called by
7062 library functions pre-bound to the libc malloc. Suggested by
7063 Serge Dussud <Serge.Dussud@Sun.COM>
7068 - add single-sentence descriptions to rest of parameter expansions.
7069 Suggested by Ken Irving <fnkci@uaf.edu>
7074 - rearrange code in skip_to_delims to allow quote characters and other
7075 shell expansion characters to be delimiters
7076 - add new flags value for inverting search: skip to the next character
7077 NOT in the set of delimiters passed as an argument
7080 - define for new SD_INVERT flag value for skip_to_delims
7085 - new bindable functions: shell-forward-word and shell-backward-word.
7086 Like forward-word and backward-word, but understand shell quoting
7087 and use shell metacharacters and whitespace as delimiters.
7088 Suggested by Andre Majorel <amajorel@teaser.fr>
7089 - new bindable functions: shell-kill-word and shell-backward-kill-word.
7090 Like kill-word and backward-kill-word, but understand shell quoting
7091 and use shell metacharacters and whitespace as delimiters.
7092 Suggested by Andre Majorel <amajorel@teaser.fr>
7094 doc/bash.1,lib/readline/doc/rluser.texi
7095 - documented shell-forward-word and shell-backward-word
7096 - documented shell-kill-word and shell-backward-kill-word
7101 - add extra argument to add_undo_redirect: fdbase. FD used to save
7102 a file descriptor must be > fdbase if fdbase >= SHELL_FD_BASE. A
7103 value of -1 for fdbase means to just use SHELL_FD_BASE. Fixes bug
7104 with 0<&10 reported by Clark Jian Wang <dearvoid@gmail.com>
7109 - new function: have_unwind_protects(); returns 1 if unwind_protect_list
7113 - extern declaration for have_unwind_protects
7115 builtins/evalstring.c
7116 - in parse_and_execute_cleanup, make sure that we don't call
7117 run_unwind_frame and expect it to decrement parse_and_execute_level
7118 if there's no unwind_protect_list, since there's a while loop in
7119 throw_to_top_level that calls parse_and_execute_cleanup as long as
7120 parse_and_execute_level is non-zero
7125 - fix the assign function for COMP_WORDBREAKS to allocate new memory
7126 to store as the variable's value, to avoid freeing memory twice
7127 if the variable is unset after rl_completer_word_break_characters
7128 is freed and reallocated. Fix from Mike Stroyan <mike@stroyan.net
7133 - new function to reset the value of rl_completer_word_break_characters
7134 while honoring setting of `hostcomplete': reset_completer_word_break_chars.
7137 - new extern declaration for reset_completer_word_break_chars.
7140 - call reset_completer_word_break_chars in sv_comp_wordbreaks when the
7143 [bash-4.0-beta frozen]
7148 - call set_pipestatus_from_exit in exp_jump_to_top_level so that
7149 failed expansions that set $? will set $PIPESTATUS. Fixes bug
7150 reported by Eric Blake <ebb9@byu.net>
7155 - new 'file_exists(fn)' primitive; just calls stat(2)
7158 - new extern declaration for file_exists
7161 - add `~' to rl_filename_quote_characters so make_quoted_replacement
7162 will call bash_quote_filename for words containing `~'. Then
7163 bash_quote_filename can make choices based on that
7164 - change quote_word_break_chars to backslash-quote the tilde in a
7165 filename with a leading tilde that exists in the current directory,
7166 since we want to inhibit tilde expansion in this case
7169 - call file_isdir from shell_execve instead of stat(2) directly
7172 - use file_exists and file_isdir primitives instead of calling stat
7177 - When undoing saving of non-standard file descriptors (>=3) using
7178 file descriptors >= SHELL_FD_BASE, we set the saving fd to be
7179 close-on-exec and use a flag (RX_SAVCLEXEC) to decide how to set
7180 close-on-exec when the fd is restored. Set flag in add_undo_redirect,
7181 check in do_redirection_internal. Fixes problem reported by Andreas
7182 Schwab <schwab@suse.de>
7187 - fix param_expand to have expansions of $@ and $* exit the shell if
7188 there are no positional parameters and `set -u' is enabled. Fixes
7189 bug reported by Dan Jacobson <jidanni@jidanni.org>
7193 lib/readline/display.c
7194 - fix update_line to not call space_to_eol if current cursor position
7195 (_rl_last_c_pos) indicates that we're already at end of line.
7196 Partial fix for bug reported by Mike Frysinger <vapier@gentoo.org>
7197 - in update_line, don't call insert_some_chars if that will start
7198 before the last invisible character in the prompt string and not
7199 draw the entire prompt string. More of the partial fix for bug
7200 reported by Mike Frysinger <vapier@gentoo.org>
7201 - fix update_line to adjust _rl_last_c_pos by wrap_offset when adding
7202 characters beginning before the last invisible character in the
7203 prompt. New code is same as previously existed in a different code
7204 path. Rest of fix for bug from Mike Frysinger <vapier@gentoo.org>
7205 - fix assignment of newline breaks (inv_lbreaks) to correctly account
7206 for prompts longer than two screen lines containing invisible
7207 characters. The assumption is that part of the invisible characters
7208 are on the first line (prompt_invis_chars_first_line) and the
7209 remainder are on the last (wrap_offset - prompt_invis_chars_first_line).
7210 Fix is in rl_redisplay. part of fix for bug reported by
7211 "Wesley J. Landaker" <wjl@icecavern.net> in
7212 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=265182
7214 - fix _rl_move_cursor_relative to correctly offset `dpos' by `woff'
7215 when there are invisible characters on lines after the second by
7216 using (_rl_screenwidth*_rl_last_v_pos) when seeing whether or not
7217 we just wrote some invisible characters. Rest of fix for bug
7218 reported in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=265182
7224 - reset the execution context before running the exit trap in
7228 - set and unset terminate_immediately like interrupt_immediately in
7232 - change terminate_immediately to a counter instead of a flag, as
7233 interrupt_immediately is used
7235 lib/readline/display.c
7236 - slight change to fix from 11/27 to deal with prompts longer than a
7237 screen line where the invisible characters all appear after the
7238 line wrap. Fixes bug reported by Andreas Schwab <schwab@suse.de>
7240 builtins/{echo,printf}.def
7241 - increment terminate_immediately at entry; decrement before returning.
7242 Fix for bug reported by Ralf.Wildenhues@gmx.de
7247 - fix off-by-one error in /dev/fd version of add_fifo_list; make
7248 sure we add to totfds when it is == fd, not just when fd > totfds.
7249 Fixes bug reported by marciso@gmail.com
7251 [bash-4.0-beta2 frozen]
7255 doc/{bash.1,bashref.texi}
7256 - document more clearly that when not in Posix mode, command
7257 substitution does not inherit the -e option. From bug report from
7258 Freddy Vulto <fvulto@gmail.com>
7260 {execute_cmd,sig,builtins/evalstring}.c
7261 - sentinel variable to keep track of whether or not we're supposed to
7262 ignore the failure status of a command executed in a command
7263 substitution even if the `-e' option is set: comsub_ignore_return
7264 - increment and decrement comsub_ignore_return in execute_simple_command
7265 before calling expand_words
7266 - in parse_and_execute, if comsub_ignore_return is non-zero and the
7267 SUBSHELL_COMSUB bit is set in subshell_environment, enable the
7268 CMD_IGNORE_RETURN flag in every command executed from the passed
7269 string. Fixes problem reported by Freddy Vulto <fvulto@gmail.com>
7270 - make sure to reset comsub_ignore_return every time we throw to the
7271 top level, like executing_list flag
7276 - fix to rewind_input_stream to handle case of $(...) command
7277 substitution followed by a quoted literal newline. Report and fix
7278 from Andreas Schwab <schwab@suse.de>
7284 - fix match_wpattern and match_upattern to prefix a `*' to the
7285 pattern even if it starts with a `*(' (if extglob is enabled)
7286 before checking whether or not it can match anywhere in the
7287 string. Fixes bug reported by os@sernet.de.
7289 [bash-4.0-rc1 frozen]
7294 - since setlocale() doesn't set errno to anything meaningful,
7295 don't include the strerror() result in the error message if
7297 - make sure the error messages printed when setlocale fails are
7302 lib/readline/histexpand.c
7303 - make sure that every time history_no_expand_chars is tested, we
7304 also call the history_inhibit_expansion_function if it's set.
7305 Fixes bug reported by Yang Zhang <yanghatespam@gmail.com>
7310 - make sure to call parse_and_execute with the SEVAL_RESETLINE bit
7311 set in the flags so it will reset the line number when running
7312 the trap commands. Partial fix for bug reported by
7313 peter360@fastmail.us
7317 builtins/reserved.def
7318 - document `coproc' so it can be used with `help' builtin. Pointed
7319 out by Pierre Gaston <pgas@freeshell.org>
7322 - added two new flags: CASE_UPFIRST and CASE_LOWFIRST to casemod
7323 the first character of the passed string and pass the rest
7324 through unchanged. Fixes bug reported by Jan Schampera
7325 <jan.schampera@web.de>
7328 - new defines for CASE_UPFIRST and CASE_LOWFIRST
7331 - use CASE_UPFIRST for ^ and CASE_LOWFIRST for , casemod operators
7333 builtins/mapfile.def
7334 - call zreset() before calling first zgetline(), to clean out any
7335 remaining data in local buffer used by zreadc. Fixes bug
7336 reported by Pierre Gaston <pierre.gaston@gmail.com>
7341 - renamed zreadintr to zreadretry -- not perfect, but better
7342 - new functions: zreadintr, which just calls read so it can be
7343 interruptible, and zreadcintr, which is like zreadc but uses
7344 zreadintr to fill the buffer
7347 - in zgetline, when zread/zreadc return <= 0, make sure line is
7348 non-null before assigning to line[nr]
7350 builtins/mapfile.def
7351 - return an error right away if the supplied array variable name
7352 refers to a readonly or noassign array
7353 - set interrupt_immediately so calls to zgetline can be
7354 interrupted. Fixes bug reported by Pierre Gaston
7355 <pierre.gaston@gmail.com>
7356 - if interactive, pass the SEVAL_INTERACT and SEVAL_NOHIST flags
7357 to parse_and_execute when calling callbacks. Fixes bug reported
7358 by Pierre Gaston <pierre.gaston@gmail.com>
7359 - add `readarray' as a synonym for mapfile
7361 doc/{bash.1,bashref.texi}
7362 - document behavior of mapfile builtin adding index of array element
7363 to be assigned as additional argument to callback string. Reported
7364 by Pierre Gaston <pierre.gaston@gmail.com>
7365 - document readarray as synonym for mapfile
7368 - new error function, sh_ttyerror(set), prints an error message having
7369 to do with setting or getting terminal attributes
7372 - print error message if read fails to set terminal attributes
7377 - new function, coproc_reap, calls coproc_dispose if sh_coproc is
7378 marked as COPROC_DEAD
7379 - new function, cpl_reap, disposes coprocs marked as COPROC_DEAD
7381 - change coproc_pidchk to just mark the coproc as dead instead of
7382 calling coproc_dispose, so we don't call unsafe functions from
7383 a signal handler. Fixes bug reported by Andreas Schwab
7387 - new extern declaration for coproc_reap
7390 - new flags for c_flags member of a struct coproc
7393 - add call to coproc_reap in cleanup_dead_jobs, which will do the
7394 right queueing or blocking of SIGCHLD
7397 - modify change from 1/12 to not reset the line number when running
7398 the DEBUG and RETURN traps
7403 - change default operations to work on entire passed string instead
7404 of breaking into words at non-alpha-numerics. Use new
7405 CASE_USEWORDS flag to enable by-word behavior. Fixes bug reported
7406 by Jan Schampera <jan.schampera@web.de>
7409 - in vbprintf, bracket each call to vsnprintf (which uses the args
7410 passed to vbprintf) with SH_VA_START and va_end, so we can
7411 reninitialize the argument list for each call. This is actually
7412 what the C standard requires. Fixes bug that caused printf -b
7413 to `ignore' first % format specifier if it came first in the
7414 string. Reported by David Leverton <levertond@googlemail.com>
7416 builtins/mapfile.def
7417 - start the line count at 1, since it doesn't get incremented before
7418 (or after) reading the first line, so things like
7419 `mapfile -n 5 -c 1 -C 'echo foo' array < file' work right and call
7420 the callback after the first line is read. Fixes bug reported by
7421 Pierre Gaston <pierre.gaston@gmail.com>
7425 lib/readline/complete.c
7426 - set _rl_interrupt_immediately non-zero before reading from the file
7427 system or calling an application-defined completion function
7429 lib/readline/signals.c
7430 - renamed rl_signal_handler to _rl_handle_signal; new version of
7431 rl_signal_handler that just calls _rl_handle_signal (for now)
7432 - new function _rl_signal_handler that calls _rl_handle_signal without
7435 lib/readline/rlprivate.h
7436 - new extern declaration for _rl_signal_handler
7437 - new define, RL_CHECK_SIGNALS, checks whether or not _rl_caught_signal
7438 is set and calls _rl_signal_handler if so
7440 lib/readline/{bind,input,readline}.c
7441 - add RL_CHECK_SIGNALS in appropriate places
7443 lib/readline/signals.c
7444 - change rl_signal_handler to set a flag and return rather than
7445 run through the entire signal handling process. If
7446 _rl_interrupt_immediately is set, call the signal handling code
7447 right away instead of setting the flag. Initial fix for crash
7448 bug reported by Roman Rakus <rrakus@redhat.com>
7451 - new macro, BASH_TYPE_SIG_ATOMIC_T, tests for sig_atomic_t in
7452 <signal.h>, defines as int if not defined
7455 - call BASH_TYPE_SIG_ATOMIC_T
7456 - call AC_C_VOLATILE
7459 - empty define for sig_atomic_t
7460 - empty define for volatile
7465 - audit calls to add_character and change to add_ifs_character (which
7466 quotes characters in $IFS). Affects primarily `:', `=', and `~'.
7467 Fixes bug reported by Jan Schampera <jan.schampera@web.de>; fix
7468 suggested by Stephane Chazelas <stephane_chazelas@yahoo.fr>
7473 - call AC_C_RESTRICT
7476 - add empty defintion for `restrict'
7479 - use unwind_protects around call to execute_shell_function in
7480 gen_shell_function_matches to prevent data corruption if
7481 throw_to_top_level is called. Bug report and fix from
7485 - don't clamp CPU usage at 100% in print_formatted_time. Bug reported
7486 by Linda Walsh <bash@tlinx.org>
7491 - in set_locale_var, set errno to 0 before calling setlocale(), and
7492 print strerror (errno) if setlocale fails and errno ends up non-zero
7497 - backed out of solaris change from 10/23/2008 (adding `-z interpose'
7498 to LDFLAGS) due to solaris updates to fix a linker problem.
7499 Updatted by Serge Dussud <Serge.Dussud@Sun.COM>
7504 - change execute_connection so failure of a pipeline will cause the
7505 shell to exit if -e is on. From discussion on austin-group
7507 - change execute_command_internal so failure of a user-specified
7508 subshell will cause the shell to exit if -e is on. From discussion
7509 on austin-group mailing list
7513 doc/{bash.1,bashref.texi}
7514 - clarified description of set -e option to accurately reflect current
7520 - fix print_deferred_heredocs to not print a space if the separator
7522 - change print_deferred_heredocs to set `was_heredoc' after printing
7524 - change connection printing code to only print the `;' separator
7525 if we haven't just printed a here-document
7526 - change connection printing code to print any deferred here
7527 documents after the rhs of the connection. Fixes bug reported by
7528 Bo Andresen <bo.andresen@zlin.dk>
7541 - fix parse_comsub to not test a character for being a possible shell
7542 metacharacter if LEX_PASSNEXT flag is set. Fixes bug reported by
7543 Mike Frysinger <vapier@gentoo.org>
7546 - add call to save_parser_state (accidentally dropped from patch) to
7547 gen_shell_function_matches. Fixes bug with bash_completion and
7548 file/directory completion reported by phil@Arcturus.universe
7551 - fix assignment to LDFLAGS_FOR_BUILD to match those in subdir
7552 Makefiles. Fixes bug reported by Mike Frysinger <vapier@gentoo.org>
7554 builtins/mapfile.def
7555 - make sure the callback quantum (-c option argument) is > 0. Fixes
7556 bug reported by Stephane Chazleas <stephane_chazelas@yahoo.fr>
7561 - fix save_token_state and restore_token_state to save and restore
7562 current_token. Fixes bug reported by Bernd Eggink
7563 <monoped@sudrala.de>
7566 - check jobs[i] before checking whether or not it's running when
7567 the checkjobs option is set and we're looking for running jobs
7568 at exit. Fixes bug reported by Mike Frysinger <vapier@gentoo.org>
7573 - include bashintl.h for definition of _. Fixes bug reported by
7574 Greg Wooledge <wooledg@eeg.ccf.org>
7579 - new function, skip_matched_pair. Similar to skip_to_delim and
7580 the extract_XXX family
7581 - move skipsubscript here from arrayfunc.c; re-implement in terms of
7582 skip_matched_pair. Fixes bugs reported by <anmaster@tele2.se>
7585 - remove skipsubscript; moved to subst.c
7588 - change reset_parser to set current_token to '\n'. Rest of fix for
7589 bug reported by Bernd Eggink <monoped@sudrala.de>; earlier fix on
7594 builtins/declare.def
7595 - when given something like array[x]=y (which sets making_array_special
7596 to 1), don't convert an associative array to an indexed array (line
7597 493). Part of fix for bug reported by Pierre Gaston
7598 <pierre.gaston@gmail.com>
7599 - if offset == 0, indicating that we do not have a valid assignment,
7600 make sure any `name' containing a `[' is a valid array reference
7601 before trying to go on. Not doing this leads to creating crazy
7602 variables like `name[foo[bar]=bax'. Rest of fix for bug reported
7603 by Pierre Gaston <pierre.gaston@gmail.com>
7606 - change assoc_to_assign to single-quote the array keys if `quoted' is
7607 non-zero. Makes things easier to read with weird characters in the
7611 - fix parse_comsub to not set LEX_HEREDELIM when it sees "<<<". Fixes
7612 bug reported by Mike Frysinger <vapier@gentoo.org>
7617 - fix report_syntax_error to set last_command_exit_value to
7618 EX_BADUSAGE (2) instead of EX_USAGE (258), since there's nothing
7619 that will translate that to something < 128 before reading the
7620 next command. Partial fix for bug reported by Mike Frysinger
7624 - fix sigint_sighandler to set last_command_exit_value to sig+128
7625 before calling throw_to_top_level. Rest of fix for bug reported
7626 by Mike Frysinger <vapier@gentoo.org>
7629 - if fork() fails, set last_command_exit_value to 126 before calling
7633 - defer calling unlink_fifo_list in parent branch of
7634 execute_disk_command if we're executing in a shell function
7635 - change execute_function to call unlink_fifo_list before returning
7636 if it's the top-level function
7641 - if read times out, make sure we remove the top element from the
7642 unwind-protect stack (the free of input_string) and run the rest,
7643 to reset the tty and readline and alarm states. Then we jump to
7644 assigning the variables to any partial input. Fixes bug reported
7645 by Christopher F. A. Johnson <cfajohnson@gmail.com>
7650 - break comment checking code into a common COMMENT_BEGIN define so
7651 we can use it in multiple places in parse_comsub
7652 - in parse_comsub, don't alter the LEX_RESWDOK flag if we read a
7653 `#' and we're checking comments, even though `#' isn't a `shell break'
7654 character. Fixes bug reported by Mike Frysinger <vapier@gentoo.org>
7657 - in expand_seqterm, decrease the total length of the rhs by the length
7658 of any (optional) increment, so we don't end up with unwanted zero
7659 padding because the rhs length is wrong. Fixes bug reported by
7660 Carl Albing <albing@comcast.net>
7664 doc/{bash.1,bashref.texi}
7665 - changes to clean up some of the language describing the effects of
7666 terminal process groups on the ability to read from and write to
7672 - add host_vendor to string tested in switch to handle things like
7674 - beginning with version 7, FreeBSD no longer has /usr/bin/objformat
7675 or a.out binaries and libraries. It's always ELF. Fix from
7676 Timothy Redaelli <drizzt@gentoo.org>
7679 - in parse_comsub, allow comments if we are ready to read a
7680 reserved word (tflags & LEX_RESWDOK), haven't read anything from
7681 one yet (lex_rwlen == 0) and the current character is a '#'
7686 - new lex flag for parse_comsub: LEX_INWORD. Turn it off when
7687 we see a shell break character; turn it on or keep it on when
7688 not a break character. Keep track of word length (reset to 0
7689 when we turn on LEX_INWORD when it was off).
7690 - don't use COMMENT_BEGIN in parse_comsub any more; test
7691 whether or not LEX_INWORD is set and lex_wlen == 0 in addition
7692 to tests for LEX_RESWDOK and lex_rwlen. Comments are valid
7693 when at the start of a word
7694 - move LEX_PASSNEXT code to the top of parse_comsub, so the rest
7695 of the function doesn't have to check for the flag at different
7701 - in parse_comsub, when looking for a reserved word (LEX_RESWDOK
7702 non-zero), and in a case statement, we can see either an esac
7703 or a pattern list. We handle an esac separately. We should
7704 turn off LEX_RESWDOK if we see anything but a newline, since
7705 we'll be reading a pattern list. Other part of fix for bug
7706 reported by Mike Frysinger <vapier@gentoo.org> (rest of fix
7711 {.,lib/readline}/doc/fdl.texi
7712 - updated to FDL version 1.3
7717 - when using the |& construct with a simple command preceding it, add
7718 the implicit redirection to the simple command's redirection list,
7719 since the redirections associated with the command struct are never
7720 executed. Fixes bug reported by Matt Zyzik <Matt@ice.filescope.com>
7725 - in execute_case_command, if ;& is used with no following pattern
7726 list, make sure we don't reference a NULL pointer. Bug report and
7727 fix from Clark Jian Wang <dearvoid@gmail.com>
7730 - make parser_state global, so other files can use it
7731 - command_word_acceptable now returns non-zero if PST_REDIRLIST bit
7732 set in parser_state, so we accept assignment statements and
7733 perform alias expansion. Fix for bug reported by Vincent
7734 Lefevre <vincent@vinc17.org> (2/24/2009)
7737 - add PST_REDIRLIST flag, notes that parser is currently parsing a
7738 redirection list preceding a simple command
7741 - make_simple_command now turns on PST_REDIRLIST in parser_state when
7742 creating a new simple command
7743 - make_simple_command turns off PST_REDIRLIST in parser_state if it
7744 adds a non-redirection to the command it's building
7745 - clean_simple_command turns off PST_REDIRLIST to make sure it's off
7748 - new flag for param_expand: PF_IGNUNBOUND, means to not exit if the
7749 variable is unbound even if `set -u' is enabled
7750 - change param_expand to not call err_unboundvar if the `pflags'
7751 argument has the PF_IGNUNBOUND bit set
7752 - parameter_brace_expand_word now takes an extra `pflags' argument to
7753 pass down to param_expand; changed callers
7754 - changed call to parameter_brace_expand_word in parameter_brace_expand
7755 to add PF_IGNUNBOUND flag so ${@:-foo} doesn't cause the shell to
7756 exit (but ${@} does) when there are no positional parameters. Fixes
7757 Debian bug 519165 from Dan Jacobson <jidanni@jidanni.org>
7760 - add code to parse_comsub to allow here-documents within command
7761 substitutions to be delimited by the closing right paren, with the
7762 usual warning about here documents delimited by EOF on execution.
7763 Fixes regression from bash-3.2 noted in Red Hat bugzilla 485664 by
7769 - string_list_dollar_at now checks for Q_PATQUOTE, which getpattern()
7770 uses to denote Q_DOUBLE_QUOTES (?). Fixes a=abcd echo "${a#$*}"
7771 when IFS= and args are `a b' as noted by Stephane Chazleas
7772 <stephane_chazelas@yahoo.fr>
7773 - param_expand now checks for Q_PATQUOTE and treats it identically
7774 to Q_DOUBLE_QUOTES when expanding $*
7775 - expand_word_unsplit now sets W_NOSPLIT in the flags of the word it
7776 passes to expand_word_internal if $IFS is NULL
7777 - expand_word_leave_quoted now sets expand_no_split_dollar_star and
7778 the W_NOSPLIT bit in the word flags before calling
7779 expand_word_internal if $IFS is NULL, just like expand_word_unsplit.
7780 It is now virtually identical to expand_word_unsplit. Rest of fix for
7781 problems reported by Stephane Chazleas <stephane_chazelas@yahoo.fr>
7786 - in _run_trap_internal, don't pass SEVAL_RESETLINE as flag to
7787 parse_and_execute if running the ERR trap (further modification
7788 of change from 1/12)
7791 - in execute_simple_command, set line_number to line_number_for_err_trap
7792 before calling run_error_trap. Part of fix for bug reported by
7793 Brian J. Murrell <brian@interlinx.bc.ca>
7794 - change other places calling run_error_trap() to set and use
7795 line_number_for_err_trap
7800 - Even though command substitution through parse_and_execute turns
7801 off remember_on_history, command substitution in a shell when
7802 set -o history has been enabled (interactive or not) should use it
7803 in the last_hist calculation as if it were on. Same calculation
7804 in fc_gethnum and fc_builtin. Fixes bug reported by
7805 Ian Kelling <smallnow@gmail.com>
7808 - change termsig_sighandler to terminate immediately if it gets called
7809 twice with the same signal before termsig_handler gets called. This
7810 fixes the `looping on SIGSEGV' phenomenon reported by Linux users.
7813 - in read_secondary_line, don't try to add NULL lines to the history
7814 list. Report and patch from Lubomir Rintel <lkundrak@v3.sk>
7819 - Augment change from 3/21 with explicit check for signals we *don't*
7820 want this to happen for. Patch from Lubomir Rintel <lkundrak@v3.sk>
7825 - in array_reference, return NULL immediately if the desired index
7826 is larger than the maximum
7827 - add cache of last array referenced and last array element referenced;
7828 use in array_reference to optimize case of sequential access;
7829 invalidated where necessary in other functions
7830 - array_rshift needs to set max_index to 0 if the array was empty
7831 before shifting in the new element 0
7832 - array_shift needs to use element_index(a->head->prev) to set the
7833 max_index, not a simple decrement, to deal with sparse arrays
7838 - in bash_dequote_filename, return right away after copying the
7839 backslash if the last character in the string to be expanded
7840 is a backslash. The old code copied an extra NUL and overwrote
7841 the bounds checking. Fixes bug reported by Shawn Starr
7842 https://bugzilla.redhat.com/show_bug.cgi?id=488649
7847 - in pat_subst.c, make sure to copy one character from the input
7848 string in the case of a null pattern match, since we substitute
7849 on the null match and then increment past the current character.
7850 Not doing this means that each character of the original string
7851 is replaced because of the null matches. Fixes debian bug
7852 reported bhy Louis-David Mitterrand <ldm@apartia.fr>
7853 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522160
7856 - incorporate contents of readline/rlwinsize.h to get all the various
7857 system dependencies right when trying to find TIOCGWINSZ. Fixes
7858 bug reported by Dan Price <dp@eng.sun.com>
7862 doc/{bash.1,bashref.texi}
7863 - fix description of conditional `>' and `<' to remove statement that
7864 the comparison pays attention to the current locale -- it has
7868 - fixed a bug in glob_filename that caused glob_dir_to_array to be
7869 called to prepend a (globbed) directory name onto the results from
7870 glob_vector, which, if we were globbing `**', glob_vector has
7871 already done. Effect is to have the directory name(s) on there
7872 twice. Fixes "dir*/**" bug reported by Matt Zyzik
7873 <Matt@ice.filescope.com>
7877 doc/{bash.1,bashref.texi}
7878 - fix short syntax summary of for command to reflect full bash
7879 syntax (which is a superset of Posix syntax). Fixes bug reported
7880 by Reuben Thomas <rrt@sc3d.org>
7885 - make sure last_command_exit_value is set to EXECUTION_FAILURE
7886 before calling err_unboundvar, in case set -e is enabled and
7887 the shell exits from there. Fixes bug reported by Freddy
7888 Vulto <fvulto@gmail.com> and Piotr Zielinski
7889 <piotr.zielinski@gmail.com>
7894 - in restore_pipeline, don't call discard_pipeline with a NULL
7898 - in run_debug_trap, make sure to save and restore the pipeline,
7899 pipeline_pgrp, and state of the pipeline around running the debug
7900 trap, then remove any job created by running the debug trap from
7901 the jobs table when it completes. Fixes for two bugs reported
7906 lib/readline/signals.c
7907 - new functions to block and release SIGWINCH like the SIGINT blocking
7908 and releasing functions
7910 lib/readline/rlprivate.h
7911 - new extern declarations for _rl_block_sigwinch and _rl_release_sigwinch
7913 lib/readline/display.c
7914 - block SIGWINCH during redisplay like SIGINT. Should fix bug reported
7915 by Nicolai Lissner <nlissne@linux01.org>
7919 lib/readline/readline.h
7920 - new readline state variable: RL_STATE_REDISPLAYING
7922 lib/readline/display.c
7923 - in rl_redisplay, don't block SIGWINCH during redisplay; just set
7924 the REDISPLAYING state
7926 lib/readline/terminal.c
7927 - in rl_resize_terminal, don't call rl_redisplay_after_sigwinch() if
7928 we're already in the middle of redisplay (RL_STATE_REDISPLAYING).
7929 Fix for bug reported by Nicolai Lissner <nlissne@linux01.org>
7934 - fix parse_comsub to add check for \n when seeing whether the current
7935 character can change to a state where a reserved word is legal,
7936 since it is not a shell meta character. Fixes bug reported by
7937 Bernd Eggink <monoped@sudrala.de>.
7942 - new functions to save and restore the pgrp_pipe (since there's only
7943 one): save_pgrp_pipe and restore_pgrp_pipe
7946 - run_debug_trap now saves and restores the pgrp_pipe before and
7947 after calling the debug trap
7948 - run_debug_trap now makes sure the terminal is owned by the pipeline
7949 pgrp after the debug trap runs. Rest of fix for bug reported by
7950 Oleksly Melnyk <o.melnyk@upc.ua> (lex@upc.ca)
7954 include/posixselect.h
7955 - new include file, encapsulates select(2) includes and defines for
7956 bash and readline. Inspired by patch from Mike Frysinger
7959 lib/sh/input_avail.c
7960 - include "posixselect.h"
7962 lib/readline/{input,parens}.c
7963 - include "posixselect.h" instead of using inline includes
7964 - use new USEC_TO_TIMEVAL define to make sure that values for timeouts
7965 greater than one second are handled properly
7968 - updated implementation, taken from gnulib
7973 - in finddirs, don't try to free a return value of glob_error_return
7974 from glob_vector. Bug and fix from werner@suse.de
7976 lib/readline/signals.c
7977 - in rl_echo_signal_char, check that SIGQUIT and SIGTSTP are defined
7978 before trying to use them. Bug report and fix from Volker Grabsch
7979 <vog@notjusthosting.com>
7984 - add conditional inclusion of <stdint.h> to BASH_CHECK_TYPE
7986 bashtypes.h,lib/sh/strto[iu]max.c
7987 - include <stdint.h> if present for any existing declaration of
7988 intmax_t and uintmax_t. Fixes Interix problem reported by
7989 Markus Duft <mduft@gentoo.org>
7991 lib/sh/strindex.c,externs.h,builtins/common.h
7992 - renamed strindex to strcasestr to agree with other implementations
7993 (e.g., BSD, MacOS X, gnulib); changed callers
7995 lib/sh/{strindex.c,Makefile.in},Makefile.in
7996 - renamed strindex.c to strcasestr.c
7999 - add strcasestr to call to AC_REPLACE_FUNCS, take advantage of
8000 existing libc implementations
8003 - add define for HAVE_STRCASESTR
8006 - fix mbscmp to return correct values when the strings do not contain
8007 valid multibyte characters. Ideas from gnulib
8010 - only compare current character against C if mblength == 1
8013 - changed some xstrchr calls back to strchr when the arguments cannot
8014 contain multibyte characters
8016 lib/sh/{xstrchr.c,Makefile.in},Makefile.in
8017 - renamed xstrchr to mbschr; renamed file to mbschr.c
8020 - change BASH_CHECK_MULTIBYTE to use AC_REPLACE_FUNCS(mbschr)
8023 - extern declarations for mbscmp and mbschr, conditional on the usual
8024 HAVE_MBSCMP and HAVE_MBSCHR defines
8026 general.h,{alias,arrayfunc,bashline,general,execute_cmd,subst}.c
8027 - changed calls to xstrchr to mbschr
8030 - use `pathname expansion' consistently, not `filename expansion' or
8031 `filename generation'
8034 - use the phrase `filename expansion' consistently (since this is
8035 what the Gnu people prefer) instead of `pathname expansion' or
8036 `filename generation'
8038 aclocal.m4,config.h.in
8039 - check for mbscasecmp in BASH_CHECK_MULTIBYTE, define HAVE_MBSCASECMP
8042 lib/sh/{mbscasecmp.c,Makefile.in}
8043 - new file, case-insensitive multibyte string comparison
8046 - extern declaration for mbscasecmp
8050 lib/readline/display.c
8051 - in _rl_move_cursor_relative, don't adjust dpos by woff if it's
8052 already less than woff (don't want it less than 0)
8053 - in _rl_move_cursor_relative, short-circuit right away if the cursor
8054 is at columns 0 and `new' is 0 (doesn't matter if it's a multibyte
8055 locale or not, or whether there are invisible chars in the prompt)
8056 - in _rl_move_cursor_relative, go ahead and adjust dpos if
8057 prompt_physical_chars >= _rl_screenwidth (previous check was just > )
8058 Fixes bug reported by Andreas Schwab <schwab@linux-m68k.org>
8063 - in glob_vector, don't add an empty pathname ("") if we're adding the
8064 currect directory to the dirlist and GX_NULLDIR is set -- we can just
8065 ignore it, since the passed directory name (".") was created by
8066 the caller. Fixes bug reported by Matt Zyzik <matt.zyzik@nyu.edu>
8071 - make expansion of $@ and $* when set -u is in effect and there are
8072 no positional parameters be a non-fatal error. This is the
8073 consensus of the austin group, though it is not historical practice.
8074 Message from Geoff Clare <20090505091501.GA10097@squonk.masqnet> of
8075 5 May 2009 and http://austingroupbugs.net/view.php?id=155
8081 - tentative fix to glob_filename to compensate for glob_vector putting
8082 null pathname at front of result vector when dflags&GX_NULLDIR.
8083 Current fix manually removes empty string element from front of
8084 result vector; a better fix would be to use a flag so glob_vector
8085 doesn't add it at all. Augments patch from 4/28, which appears to
8086 have broken some things. Fixes bug reported by Matt Zyzik
8087 <matt.zyzik@nyu.edu>
8093 - better fix for glob_filename; supersedes patch of 5/20. Now the
8094 code does not set GX_ADDCURDIR if directory_len == 0 and the
8095 function has not been called recursively ((flags & GX_ALLDIRS) == 0).
8096 Better fix for bug reported by Matt Zyzik <matt.zyzik@nyu.edu>
8099 - fix build race condition that occurs in some makes caused by
8100 libreadline.a and libhistory.a containing some of the same files
8101 (e.g., xmalloc.o) and conflicting when trying to build both at
8102 the same time. Reported by Mike Frysinger <vapier@gentoo.org>
8106 lib/readline/vi_mode.c
8107 - fix _rl_vi_initialize_line so that the loop counter is not
8108 unsigned (it doesn't matter, but it eliminates a compiler warning).
8109 Bug reported by Dave Caroline <dave.thearchivist@gmail.com>
8113 doc/{bash.1,bashref.texi}
8114 - add text to the description of array variables making it clear
8115 that an array variable is not considered set until a subscript
8116 has been assigned a value
8121 - fix rl_change_case to handle case where mbrtowc doesn't find a
8122 valid multibyte character
8124 lib/readline/vi_mode.c
8125 - fix _rl_vi_change_mbchar_case to handle case where mbrtowc doesn't
8126 find a valid multibyte character
8129 - fix sh_modcase to handle case where mbrtowc doesn't find a valid
8132 lib/readline/mbutil.c
8133 - fix _rl_find_next_mbchar_internal to not call mbrtowc at the end of
8134 the string, since implementations return different values -- just
8135 break the loop immediately
8137 lib/readline/display.c
8138 - fix rl_redisplay to make same sort of cursor position adjustments
8139 based on multibyte locale and _rl_last_c_pos when performing
8140 horizontal scrolling rather than line wrapping. Probably still
8141 more to do. Fixes bug reported by jim@jim.sh
8145 doc/{bash.1,bashref.texi}
8146 - added some more explanation of the inheritance of the ERR trap at
8147 the suggestion of Thomas Pospisek <tpo@sourcepole.ch>
8150 - use eaccess(2) if available in file_status to take other file
8151 access mechanisms such as ACLs into account. Patch supplied
8157 - also calculate lowest brk() value the first time xmalloc/xrealloc
8158 (and their sh_ counterparts) are called
8159 - error messages consolidated into a single function (allocerr/
8160 sh_allocerr) to avoid string duplication
8165 - changes to allow variables.c to be compiled if ALIAS is not defined.
8166 Bug and fix from John Gatewood Ham <uraphalinuxserver@gmail.com>
8169 - fix so systems defining BROKEN_DIRENT_D_INO have the necessary
8170 defines. Fix from Jay Krell <jay.krell@cornell.edu>
8173 - add -D_ALL_SOURCE to interix CFLAGS for struct timezone definition.
8174 Bug and fix from John Gatewood Ham <uraphalinuxserver@gmail.com>
8179 - change initialize_shell_variables to add environment variables with
8180 invalid names to the variables hash table, but marking them as
8181 invisible and imported
8182 - new function, export_environment_candidate. Used when creating the
8183 export environment for commands to include variables with invalid
8184 names inherited from the initial environment. Apparently this
8185 behavior is widespread
8186 - change make_var_export_array to use export_environment_candidate
8187 rather than visible_and_exported to test variables for inclusion
8188 in the export environment
8193 - fix a memory leak where the number of fields is not the same as
8194 the number of variables passed to `read'. Bug report from
8197 builtins/command.def
8198 - move section of code that sets PATH from -p option before the
8199 verbose-handling section, so command -v and command -V honor
8200 the PATH set by command -p. Bug report and fix from
8201 ohki@gssm.otsuka.tsukuba.ac.jp
8206 - change brace_expand_word_list to defer brace expansion on compound
8207 array assignments that are arguments to builtins like `declare',
8208 deferring the expansion until the assignment statement is processed.
8209 Fixes inconsistency reported by agriffis@n01se.net
8214 - fix bash_execute_unix_command to set rl_point correctly based on
8215 READLINE_POINT. The old method of using save_point will not
8216 work because maybe_make_readline_line will change rl_point. Bug
8217 reported by Henning Bekel <h.bekel@googlemail.com>
8220 - fix _run_trap_internal and run_pending_traps to save and restore
8221 value of subst_assign_varlist so the dispose_words on it doesn't
8222 leave dangling pointers after the trap handler runs. Fixes bug
8223 reported by Marc Herbert <marc.herbert@gmail.com>
8228 - fix off-by-one error in pos_params when computing positional
8229 parameters beginning with index 0. Bug and fix from Isaac Good
8230 <isaacgood@gmail.com>
8234 lib/readline/display.c
8235 - add code to _rl_move_cursor_relative and _rl_col_width to short-
8236 circuit a few special cases: prompt string and prompt string plus
8237 line contents, both starting from 0. Saves a bunch of calls to
8238 multibyte character functions using already-computed information.
8239 As a side effect, fixes bug reported by Lasse Karkkainen
8240 <tronic+8qug@trn.iki.fi>
8243 - fixed a problem in split_at_delims that could leave *cwp set to -1
8244 if the line ends in IFS whitespace and SENTINEL is one of those
8245 whitespace characters. Fixes problem with setting COMP_CWORD for
8246 programmable completion reported by Ville Skytta <ville.skytta@iki.fi>
8249 - change bash_execute_unix_command to clear the current line (if the
8250 terminal supplies the "ce" attribute) instead of moving to a new
8251 line. Inspired by report from Henning Bekel <h.bekel@googlemail.com>
8254 - changes to allow printf -v var to assign to array indices, the way
8255 the read builtin can. Suggested by Christopher F. A. Johnson
8256 <cfajohnson@gmail.com>
8258 lib/readline/complete.c
8259 - fix rl_old_menu_complete and rl_menu_complete to appropriately set
8260 and unset RL_STATE_COMPLETING while generating the list of matches.
8261 Fixes debian bug #538013 reported by Jerome Reybert
8262 <jreybert@gmail.com>
8267 - change execute_builtin to temporarily turn off and restore the ERR
8268 trap for the eval/source/command builtins in the same way as we
8269 temporarily disable and restore the setting of the -e option.
8270 Fixes bug reported by Henning Garus <henning.garus@googlemail.com>
8275 - add fflush(stdout) and fflush(stderr) to exit_shell before closing
8276 any file descriptors at exit time (e.g., coproc pipes)
8280 lib/readline/complete.c
8281 - new function rl_backward_menu_complete, just passes negative count
8282 argument to rl_menu_complete
8283 - change rl_menu_complete to act appropriately if rl_last_command is
8284 rl_backward_menu_complete, so we can cycle forward and backward
8285 through the list of completions
8287 lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
8288 - document new "menu-complete-backward" bindable readline function.
8289 Suggested by Jason Spiro <jasonspiro04@gmail.com>
8291 lib/readline/vi_keymap.c
8292 - add binding of C-n to menu-complete and C-p to menu-complete-backward
8293 in vi-insert keymap, as suggested by Jason Spiro
8294 <jasonspiro04@gmail.com>
8297 - fixed a bug in programmable_completions: the options it returned from
8298 the compspec it found were set before generating the completions,
8299 which meant that any changes made by "compopt" were overridden and
8300 only in effect for the duration of the executing shell function
8301 rather than the entire completion. Fixes bug reported by Ville
8302 Skytta <ville.skytta@iki.fi>
8306 lib/readline/keymaps.c
8307 - fixed memory leak in rl_discard_keymap by freeing storage associated
8308 with hierarchical keymaps
8309 - new convenience function, rl_free_keymap, that calls rl_discard_keymap
8310 and frees the keymap passed as an argument
8313 - new bindable keymap function, _rl_null_function, to be used internally
8315 lib/readline/rlprivate.h
8316 - extern declaration for _rl_null_function
8319 - fix rl_generic_bind in the case where we are trying to override a
8320 keymap with a null function (e.g., when trying to unbind it). We
8321 can't use a NULL function pointer in ANYOTHERKEY since that's
8322 indistinguishable from the keymap not having been overridden at all.
8323 We use _rl_null_function instead, which simply does nothing. We
8324 could add an rl_ding to it later. Fixes problem with hitting ESC
8325 repeatedly while in vi command mode reported by James Rowell
8326 <jrjimmy801-misc1@yahoo.com>
8329 - call rl_bind_keyseq instead of rl_set_key for -r option
8331 lib/readline/readline.c
8332 - Set vi_movement_keymap[ESC] to _rl_null_function after binding the
8333 arrow keys in bind_arrow_keys() to allow vi-mode users to hit ESC
8334 multiple times in vi command mode while still allowing the arrow
8340 - fix clear_hostname_list by setting hostname_list_initialized to 0
8341 after freeing all list members. Fixes bug reported by Freddy
8342 Vulto <fvulto@gmail.com>
8344 lib/readline/display.c
8345 - in update_line, if we copy data from one line to another because we
8346 are wrapping a multibyte character from, say, the first line to the
8347 second, we need to update OMAX and the line indices to account for
8348 the moved data. Bug report and fix from Martin Hamrle
8349 <martin.hamrle@gmail.com>
8354 - defines for EMPTYCMD ("_EmptycmD_") and DEFAULTCMD ("_DefaultCmD_")
8356 builtins/complete.def
8357 - change compopt_builtin to make -E work on the "empty" command
8359 - fix print_compitem and print_compopts to replace EMPTYCMD with -E
8360 - added -D (default) option to complete/compgen/compopt. No supporting
8363 doc/bash.1,lib/readline/doc/rluser.texi
8364 - document new -D, -E options to compopt
8365 - document new -D option to complete/compgen
8368 - new define, EX_WEXPCOMSUB, value of 125
8369 - new define, EX_RETRYFAIL, value of 124 (for programmable completion)
8372 - use EX_WEXPCOMSUB instead of literal 125 as exit status when a shell
8373 invoked to run wordexp(3) with the -n option supplied attempts a
8374 command substitution
8377 - new define, PCOMP_RETRYFAIL, used to indicate a "failure, retry with
8378 next completion" status to the programmable completion code
8383 - changed gen_shell_function_matches to take an extra parameter
8384 indicating whether the specified shell function was not found or
8385 returned the special "fail/retry" status, and, if it was either,
8386 to not bother returning any matches list
8387 - changed gen_compspec_completions to take an extra parameter to pass
8388 through the "found" status from gen_shell_function_completions
8389 - new function gen_progcomp_completions to take care of searching for
8390 and evaluating a compspec for a particular word, saving its status,
8391 and returning to its caller (programmable_completions) whether or
8392 not to retry completion. This function also checks whether a
8393 retry changed the compspec associated with a command and short-
8394 circuits the retry if it has not
8395 - changed programmable_completions to try default completion (if set)
8396 if a specific completion was not found for a command
8397 - changed programmable_completions to implement "fail/retry" semantics
8398 for a shell function that returns 124 and changes the compspec
8399 associated with the command. All based on proposal and changes from
8400 Behdad Esfahbod (Red Hat bugzilla 475229)
8402 doc/bash.1,lib/readline/doc/rluser.texi
8403 - documented new dynamic programmable completion functionality
8408 - first argument to substring() is now `const char *'
8411 - changed extern declaration for substring()
8414 - skipsubscript now takes a third FLAGS argument, passes to
8416 - skip_matched_pair now interprets flags&1 to mean not to parse
8417 matched pairs of quotes, backquotes, or shell word expansion
8420 {subst,general,expr}.c
8421 - changed skipsubscript() callers
8424 - changed assoc_to_assign to double-quote the key if it contains any
8425 shell metacharacters
8428 - use skipsubscript in quote_assign rather than quote any glob
8429 characters in the subscript of an array assignment
8430 - in assign_compound_array_list, call skipsubscript with a flags
8431 argument of 1 if assigning an associative array to avoid trying
8432 to re-parse quoted strings
8435 - set expanding_redir before expanding body of here documents and
8436 here strings to avoid looking for variables in temporary env
8440 lib/readline/readline.c
8441 - in _rl_dispatch_callback, return value of -3 means that we have
8442 added to a key sequence, but there are previous matches in the
8443 sequence. Don't call _rl_subseq_result if we get a -3 from a
8444 previous context in the chain; just go back up the chain. Report
8445 and fix from <freehaha@gmail.com>
8448 - fixes to history_completion_generator and bash_dabbrev_expand to
8449 make dabbrev-expand inhibit suppressing of appending space char
8450 to matches. Have to do it with the generator too because
8451 rl_menu_complete turns off suppressing the appended space in
8452 set_completion_defaults(). Suggestion from Dan Nicolaescu
8454 - suppress completion match sorting in bash_dabbrev_expand by
8455 setting rl_sort_completion_matches = 0. Suggestion from Dan
8456 Nicolaescu <dann@ics.uci.edu>
8457 - don't qsort history match list in build_history_completion_array
8458 if dabbrev_expand_active == 1
8459 - start the loop in build_history_completion_array that gathers words
8460 from history for possible completions from the end of the list
8461 rather than the beginning. It doesn't matter where you start if
8462 the results are sorted, and dabbrev-expand is supposed to offer
8463 the most recent completions first
8468 - change to execute_command_internal to make [[ ... ]] conditional
8469 command subject to settings of `set -e' and the ERR trap
8474 - change to execute_command_internal to make (( ... )) arithmetic
8475 command subject to settings of `set -e' and the ERR trap
8478 - new bindable function, rl_skip_csi_sequence, reads the characters
8479 that make up a control sequence as defined by ECMA-48. Sequences
8480 are introduced by the Control Sequence Indicator (CSI) and
8481 contain a defined set of characters. Insert, End, Page Up and so
8482 on are CSI sequences. Report and code from Andy Koppe
8483 <andy.koppe@gmail.com>
8485 lib/readline/readline.h
8486 - extern declaration for rl_skip_csi_sequence
8488 lib/readline/funmap.c
8489 - new bindable command "skip-csi-sequence", runs rl_skip_csi_sequence
8491 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
8492 - documented new bindable command "skip-csi-sequence", unbound by
8496 - fix _evalfile to remove embedded null bytes from the file read
8497 into the string. Report and proposed fix from Roman Rakus
8500 {configure,config.h}.in
8501 - check for syslog(3), define HAVE_SYSLOG
8502 - check for syslog.h, define HAVE_SYSLOG_H
8505 - new define SYSLOG_HISTORY, disabled by default
8508 - if HAVE_SYSLOG or HAVE_SYSLOG_H are not defined, undef SYSLOG_HISTORY
8511 - if SYSLOG_HISTORY is defined, call bash_syslog_history with the
8512 line added to the history in bash_add_history.
8513 - new function, bash_syslog_history(line), sends line to syslog at
8514 user.info. The line is truncated to send no more than 600
8515 (SYSLOG_MAXLEN) bytes to syslog. Feature requested by many, and
8516 required by some national laws
8519 - in termsig_handler, resend SIGHUP to children if subshell_environment
8520 indicates we're a shell performing command or process substitution
8523 - add CHECK_TERMSIG calls to wait_for in addition to the ones in
8527 - new functions set_bashopts, parse_bashopts, and initialize_bashopts
8528 to manage new environment variable $BASHOPTS, like $SHELLOPTS but
8530 - change toggle_shopts to call set_bashopts after setting options, so
8531 $BASHOPTS reflects new values
8534 - call initialize_bashopts after calling initialize_shell_options at
8538 - new configure `enable' option --enable-exended-glob-default, to
8539 set the initial default value of the `extglob' shell option
8542 - new define, EXTGLOB_DEFAULT, controlled by the `extended-glob-default'
8546 - initialize extended_glob variable to EXTGLOB_DEFAULT
8548 doc/{bash.1,bashref.texi}
8549 - document new $BASHOPTS variable and its behavior
8552 - document new --enable-extended-glob-default configure option
8557 - new variables: xtrace_fd and xtrace_fp, the file descriptor and
8558 FILE * to which we send `set -x' tracing output. If fd == -1
8559 then fp == STDERR, the default mode
8560 - new function xtrace_init, sets xtrace_fd == -1 and xtrace_fp = stderr
8561 - new function xtrace_set (fd, fp), sets xtrace_fd and xtrace_fp
8563 - new function xtrace_reset, handles closing old xtrace fd/fp and
8564 moving them back to -1/stderr
8565 - new function xtrace_fdchck, calls xtrace_reset if the fd passed as
8566 an argument is xtrace_fd
8567 - change xtrace functions to fprintf to xtrace_fp instead of stderr
8570 - call xtrace_init() very early in main()
8573 - new special variable, BASH_XTRACEFD, holds file descriptor used for
8574 set -x trace output. Inspired by suggestion from Bruce Korb
8575 <bruce.korb@gmail.com>
8577 doc/{bash.1,bashref.texi}
8578 - added description of new BASH_XTRACEFD variable
8581 - add calls to xtrace_fdchk to the redirections that close file
8582 descriptors, so we notice if we close BASH_XTRACEFD and compensate
8583 accordingly (same places that call coproc_fdchk())
8588 - change to _rl_replace_text to add error checks: start must be <=
8589 end, and we don't call rl_insert_text if passed the empty string
8592 - add define for HAVE_ICONV, already found by intl autoconf macros
8593 - add define for HAVE_LOCALE_CHARSET
8596 - add check for locale_charset() to BASH_CHECK_MULTIBYTE
8599 - new file with two public function: fnx_tofs and fnx_fromfs.
8600 Primarily intended for use on MacOS X, they use iconv to convert
8601 between whatever the current locale encoding is and "UTF-8-MAC",
8602 a special encoding on OS X in which all characters are
8603 decomposed unicode, as the HFS+ filesystem stores them. These
8604 functions return a pointer to a local buffer, allocated once and
8605 resized as necessary, to avoid too many allocations; callers
8606 should not free the return value, since it may be the string
8610 - make sure LIBICONV is set by autoconf (@LIBICONV@) and added to
8611 list of link libraries
8614 - new extern declarations for fnx_fromfs and fnx_tofs
8617 - convert the filename read using readdir() in glob_vector() using
8618 fnx_fromfs and use that value in the call to strmatch. This
8619 ensures that we're using the precomposed Unicode value of the
8620 filename rather than the native decomposed form. Original bug
8621 report from Len Lattanzi <llatanzi@apple.com>; fix inspired by
8622 Guillaume Outters <guillaume.outters@free.fr>
8626 lib/readline/complete.c
8627 - new completion hook: rl_filename_rewrite_hook, can rewrite or modify
8628 filenames read from the filesystem before they are compared to the
8629 word to be completed
8631 lib/readline/readline.h
8632 - extern declaration for rl_filename_rewrite_hook
8634 lib/readline/doc/rltech.texi
8635 - document rl_filename_rewrite_hook
8638 - new function, bash_filename_rewrite_hook, assigned to
8639 rl_filename_rewrite_hook. Calls fnx_fromfs to convert from
8640 filesystem format to "input" format. This makes completing
8641 filenames with accented characters work on Mac OS X
8646 - new bindable variable "skip-completed-text", bound to
8647 _rl_skip_completed_text. If enabled, it means to note when
8648 completing before the end of a word and skipping over characters
8649 after rl_point that match in both the completion to be inserted
8650 and the word being completed. It means that completing
8651 `Makefile' with the cursor after the `e' results in `Makefile'
8652 instead of `Makefilefile'. Inspired by an idea from Jared
8653 Yanovich <phierunner@comcast.net> from back in 2004
8655 lib/readline/rlprivate.h
8656 - extern declaration for _rl_skip_completed_text
8658 lib/readline/complete.c
8659 - implement semantics of _rl_skip_completed_text in insert_match:
8660 skip characters in `replacement' that match chars in rl_line_buffer
8661 from the start of the word to be completed
8666 - change parser_error to set last_command_exit_value to 2 before
8667 calling exit_shell (if set -e is enabled), so any exit or ERR
8668 trap gets the right value of $?. Suggestion from Stefano
8669 Lattarini <stefano.lattarini@gmail.com>
8672 - fix expand_seqterm so that a non-zero-prefixed term that's longer
8673 than a zero-prefixed term determines the length of each term
8674 in the brace-expanded sequence. This means that things like
8675 {01..100} will have three digits in all the elements of the
8676 expanded list. Fixes bug reported by Jeff Haemer
8677 <jeffrey.haemer@gmail.com>
8681 {arrayfunc,variables}.c
8682 - when inserting a value into an associative array using syntax like
8683 T=v where T is an already-declared associative array using key "0",
8684 make sure the key is in newly-allocated memory so it can be freed
8685 when the variable is unset. Fixes bug reported as redhat 518644
8690 lib/readline/funmap.c
8691 - add "old-menu-complete" binding for rl_old_menu_complete
8693 lib/readline/readline.h
8694 - add extern declaration for rl_old_menu_complete
8697 - fix memory leak when processing ${!prefix@}. Need to dispose all
8698 words in the word list created from all matching variable. Fixes
8699 bug reported by muszi@muszi.kite.hu.
8704 - add fflush(stdout) and fflush(stderr) to child coproc code before
8705 calling exit after execute_in_subshell
8709 lib/readline/{{bind,readline}.c,rlprivate.h}
8710 - new bindable variable, "echo-control-characters", enabled by default.
8711 This controls whether or not readline honors the tty ECHOCTL bit
8712 and displays characters corresponding to keyboard-generated signals.
8713 Controlled by _rl_echo_control_chars variable, declared in readline.c
8715 lib/readline/signals.c
8716 - if _rl_echo_control_chars == 0, don't go through _rl_echo_signal_char
8719 lib/readline/doc/{readline.3,rluser.texi}
8720 - document "echo-control-characters" bindable variable
8724 lib/readline/histexpand.c
8725 - hist_string_extract_single_quoted now takes an additional argument:
8726 a flags word. The only defined value (flags & 1) allows backslash
8727 to quote the single quote. This is to inhibit history expansion
8728 inside $'...' containing an escaped single quote.
8729 - change history_expand to call hist_string_extract_single_quoted
8730 with flags == 1 if it sees $'. Fixes bug reported by Sean
8731 Donner <sean.donner@gmail.com>
8736 - add a call to sh_wrerror if ferror() succeeds in the PRETURN macro,
8737 to print an error message in the case that the final fflush fails
8738 (for instance, because it attempts to write data that didn't have a
8739 trailing newline). Fixes bug reported by Stefano Lattarini
8740 <stefano.lattarini@gmail.com>
8745 - some fixes to assign_compound_array_list to avoid null pointer
8746 dereferences pointed out by clang/scan-build
8749 - fixes to udequote_pathname and wdequote_pathname to avoid possible
8750 null pointer dereferences pointed out by clang/scan-build
8753 - fix to _rl_copy_undo_list (function unused) to avoid deref of
8754 uninitialized pointer pointed out by clang/scan-build
8757 - fix string_to_rlimtype so it works if passed a null pointer (though
8760 builtins/mapfile.def
8761 - fix to mapfile() to avoid possible null pointer dereference pointed
8762 out by clang/scan-build
8765 - fix to valid_exportstr to avoid possible null pointer dereferences
8766 pointed out by clang/scan-build
8769 - fix to bash_execute_unix_command to avoid possible null pointer
8770 dereference if READLINE_LINE or READLINE_POINT is not bound
8774 [Prayers for the victimes of 9/11/2001]
8777 - add `rflags' member to struct redirect to hold private flags and
8779 - change redirector to a REDIRECTEE instead of int to prepare for
8780 possible future changes
8782 {copy_cmd,dispose_cmd,make_cmd,print_cmd,redir}.c
8783 - changes resulting from type change of `redirector' member of struct
8784 redirect: change x->redirector to x->redirector.dest and add code
8785 where appropriate to deal with x->redirector.filename
8788 - change extern declaration for make_redirection
8791 - first argument of make_redirection is now a `REDIRECTEE' to prepare
8792 for possible future changes. First arg is now assigned directly to
8793 redirector member instead of assigning int to redirector.dest
8795 {make_cmd,redir}.c,parse.y
8796 - changes resulting from type change of first argument to
8797 make_redirection from int to REDIRECTEE. In general, changes are
8798 using REDIRECTEE sd and assigning old argument to sd.dest, then
8799 passing sd to make_redirection
8801 make_cmd.[ch],parse.y
8802 - add fourth argument to make_redirection: flags. Sets initial value
8803 of `rflags' member of struct redirect
8804 - changed all callers of make_redirection to add fourth argument of 0
8809 - change read_token_word to return REDIR_WORD for tokens of the form
8810 {var} where `var' is a valid shell identifier and the character
8811 following the } is a `<' or `>'
8812 - add REDIR_WORD versions of all input and output file redirections
8816 - change input and output file redirection direction and here
8817 document cases of print_redirection to print a varname
8818 specification of the form {var} when appropriate. Still need
8819 to fix rest of cases
8822 - implement REDIR_VARASSIGN semantics for file input and output
8823 redirections and here documents
8828 - added REDIR_WORD versions of remaining redirection constructs except
8829 for err_and_out ones
8832 - handle REDIR_VARASSIGN semantics for rest of redirection constructs
8833 - accommodate REDIR_VARASSIGN when translating redirections
8834 - new function, redir_varvalue, does variable lookup for {v} when
8835 redirection needs the value (e.g., r_close_this)
8838 - fix rest of cases to print {varname} when REDIR_VARASSIGN is set in
8841 doc/{bash.1,bashref.texi}
8842 - document new {varname} REDIR_VARASSIGN form of redirections
8844 tests/vredir.{right,tests},vredir[1-5].sub
8845 - tests for new {varname} REDIR_VARASSIGN form of redirections
8850 - new flags argument to split_at_delims: these flags are ORd with
8851 SD_NOJMP and passed to skip_to_delim
8852 - change skip_to_delim to honor new SD_NOQUOTEDELIM flag by not
8853 checking whether or not single and double quotes are delimiters
8854 if it's set in passed flags until after skipping quoted strings.
8857 - change extern declaration for split_at_delims
8858 - new define for SD_NOQUOTEDELIM flag
8861 - pass SD_NOQUOTEDELIM in flags argument to split_at_delims so single
8862 and double quotes, even though they're in
8863 rl_completer_word_break_characters, don't act as word delimiters
8864 for programmable completion. Fixes bug reported by Freddy
8865 Vulto <fvulto@gmail.com>
8868 - in glob_filename, after recursively scanning a directory specified
8869 with `**', turn off GX_ALLDIRS|GX_ADDCURDIR before calling
8870 glob_vector on the rest of the pathname, since it may not apply to
8871 the rest of the pattern. Turned back on if the filename makes it
8872 appropriate. Fixes bug reported by Anders Kaseorg <andersk@mit.edu>
8875 - change execute_null_command to fork a child to execute if any of
8876 the commands redirections have the REDIR_VARASSIGN flag set, since
8877 those commands are not supposed to have side effects
8880 - < and > binary operators will obey the locale by using strcoll if
8881 the TEST_LOCALE flag is passed to binary_test
8884 - new define for TEST_LOCALE
8887 - execute_cond_node sets TEST_LOCALE so [[ str1 < str2 ]] (and >)
8888 obey the locale. Fixes bug/incompatibility reported by Greg
8889 Wooledge <wooledg@eeg.ccf.org>
8891 doc/{bash.1,bashref.texi}
8892 - documented [[ command new locale-sensitive treatment of < and >
8897 - add "darwin10" cases like darwin8 and darwin9 to handle linking with
8898 included readline and history libraries
8902 lib/readline/display.c
8903 - modify change of 7/24 to use prompt_physical_chars instead of
8904 prompt_visible_length to account for visible multibyte characters in
8905 the line (usually in the prompt). Fixes debian bug #547264
8906 reported by Pietro Battiston <toobaz@email.it>
8907 - add flags argument to _rl_col_width; changed callers. flags > 0
8908 means that it's ok to use the already-computed prompt information;
8909 flags == 0 means that we're expanding the prompt and we should not
8913 - in decode_prompt_string, when expanding \w and \W on Mac OS X,
8914 use fnx_fromfs to convert from "filesystem" form to "input" form.
8915 This makes $PWD with multibyte characters work in the prompt
8919 - in fnx_fromfs and fnx_tofs, use templen instead of outlen as last
8920 argument in calls to iconv, since outlen is used to keep track of
8921 the size of the buffer, and iconv potentially modifies its
8922 `outbytesleft' argument
8927 - make skip_to_delim understand how to skip over process substitution
8928 constructs the way it skips $(...) command substitution
8932 lib/readline/terminal.c
8933 - don't set the `terminal has meta key' flag if the `MT' capability is
8934 available; that means something completely different
8939 - make sure width is at least 7, since we pass `width/2 - 3' to strncpy
8940 as the length argument. Terminal widths <= 6 are converted to 80.
8941 Fixes bug reported by Chris Hall <c@pobox.co.uk>
8944 - changed version to 4.1-alpha
8947 - new flag for skip_to_delim: SD_NOSKIPCMD, which means to not skip
8948 over embedded command and process substitutions, but rather to look
8949 for delimiters within them
8952 - implement semantics of SD_NOSKIPCMD in skip_to_delim
8955 - call skip_to_delim with SD_NOSKIPCMD from find_cmd_start, so
8956 programmable completion can use the completion defined for `b' for
8957 command lines like "a $(b c". Fixes inconsistency/bug reported by
8958 Freddy Vulto <fvulto@gmail.com>
8961 - replace unused PST_CMDTOKEN parser state value with PST_EXTPAT,
8962 means currently parsing an extended glob pattern (extglob)
8965 - fix cond_node() so that extended_glob is set before parsing the
8966 rhs of the `==' or `!=' operators. For ksh93 compatibility.
8967 - reset extended_glob to global value (saved in parse_cond_command())
8973 - change waitchld() to only interrupt the wait builtin when the shell
8974 receives SIGCHLD in Posix mode. It's a posix requirement, but
8975 makes easy things hard to do, like run a SIGCHLD trap for every
8976 exiting child. Change prompted by question from Alex Efros
8977 <powerman@powerman.name>
8980 - document new posix mode behavior about SIGCHLD arriving while the
8981 wait builtin is executing when a trap on SIGCHLD has been set
8985 lib/readline/histexpand.c
8986 - fix hist_expand to keep from stopping history expansion after the
8987 first multibyte character (a `break' instead of a `continue').
8988 Fixes debian bug (#549933) reported by Nikolaus Schulz
8989 <microschulz@web.de>
8994 - implement new `-N nchars' option: read exactly NCHARS characters,
8995 ignoring any delimiter, and don't split the result on $IFS.
8996 Feature requested by Richard Stallman <rms@gnu.org>
8998 doc/{bash.1,bashref.texi}
8999 - document new `read -N' option
9004 - new bindable variable, "enable-meta-key", controls whether or not
9005 readline enables any meta modifier key the terminal claims to
9006 support. Suggested by Werner Fink <werner@suse.de>
9008 lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
9009 - document new readline "enable-meta-key" bindable variable
9014 - new function, free_trap_string(), does what it says and turns off
9015 SIG_TRAPPED flag without changing signal disposition
9017 [bash-4.1-alpha frozen]
9021 builtins/mapfile.def
9022 - return an error if the variable passed is not an indexed array.
9023 Fixes bug reported by Nick Hobson <nick.hobson@yahoo.com>
9024 - change help text to make it clear that an indexed array is required
9026 doc/{bash.1,bashref.texi}
9027 - changed description of mapfile to note that the array variable
9028 argument must be an indexed array, and mapfile will return an
9032 - change expand_string_unsplit and expand_string_leave_quoted to
9033 add the (previously unused) W_NOSPLIT2 flag to the created word
9034 - change expand_word_internal to understand W_NOSPLIT2 to mean that
9035 we're not going to split on $IFS, so we should not quote any
9036 characters in IFS that we add to the result string. Fixes bug
9037 reported by Enrique Perez-Terron <enrio@online.no>
9038 - change cond_expand_word similarly. Fixes rest of bug reported by
9039 Enrique Perez-Terron <enrio@online.no>
9042 - save and restore value of last_command_subst_pid around call to
9043 expand_prompt_string in decode_prompt_string. Fixes bug that causes
9044 $? to be set wrong when using a construct like false || A=3 when
9045 set -x is enabled and $PS4 contains a command substitution. Reported
9046 by Jeff Haemer <jeffrey.haemer@gmail.com>
9051 - in execute_in_subshell, make sure we set setjmp(return_catch) before
9052 running the command, in case the command or its word expansion
9053 calls jump_to_top_level. Fixes bug reported by Nils Bernhard
9054 <nils.bernhard@yahoo.de>
9057 - new PF_NOSPLIT2 flag for param_expand
9058 - parameter_brace_expand takes a new `pflags' argument, before the
9059 `output' parameters; passes to param_expand as necessary
9060 - change parameter_brace_expand to call parameter_brace_expand_word
9061 with the PF_NOSPLIT2 flag if the pflags argument to
9062 parameter_brace_expand has it set
9065 - change report_syntax_error to set last_command_exit_value to
9066 EX_BADSYNTAX if parse_and_execute_level is > 0, indicating a
9067 syntax error while we're executing a dot script, eval string,
9070 builtins/evalstring.c
9071 - in parse_and_execute, if parse_command() returns non-zero,
9072 indicating a parse error, print a warning message if the conditions
9073 would require a posix-mode shell to abort (parse error in a `.'
9074 script or eval string)
9079 - even if the `check binary' flag is not passed to _evalfile, return an
9080 error after reading 128 null characters if called by `source', on
9081 the assumption that it's probably a binary file. [This will be in
9086 [bash-4.1-alpha released]
9089 - don't call command_substitution_completion_function if we're
9090 completing a substring delimited by a single quote. Fixes bug
9091 reported by bash-bugs@atu.cjb.net
9093 lib/readline/complete.c
9094 - make sure _rl_skip_completed_text defaults to 0, as the
9095 documentation states (incorrect in bash-4.1-alpha)
9096 - in insert_match, skip over a close quote in the replacement text if
9097 the character at point when completion is invoked is a single
9098 quote. Fixes complaint from bash-bugs@atu.cjb.net
9103 - in main, make sure "$EMACS" is non-null before calling strstr on its
9104 value. Fixes Red Hat bug 530911 submitted by Mitchell Berger
9106 builtins/mapfile.def
9107 - don't save callback commands in shell history. Suggested by
9108 Jan Schampera <jan.schampera@web.de>
9111 - in file_mod_date_changed, make sure the modification time is later
9112 than the saved modification date, not just that it's not equal.
9113 Fix from Evgeniy Dushistov <dushistov@mail.ru>
9114 - in file_access_date_changed, make sure the access time is later
9115 than the saved access time, not just that it's not equal
9120 - added new `compat40' compatibility variable, with associated changes
9121 to shell_compatibility_level(), since the default compatibility level
9125 - make the < and > operators to [[ use strcoll() only if the shell
9126 compatibility level is greater than 40 (it is 41 by default in
9132 - decrease the default version of FreeBSD that creates shared libraries
9133 to 4.x. Advice from Peter Jeremy <peterjeremy@acm.org>
9138 - change parse_comsub to free `heredelim' and set it to 0 whenever the
9139 comsub scanner finds the end of a here document. Really need to
9140 implement a stack of here doc delimiters like in the parser (can we
9141 use redir_stack here, too?)
9142 - fix parse_comsub to not attempt to read another here doc delimiter
9143 after seeing a shell break character (that is not newline) if we
9144 already have one. Fixes Debian bash bug #553485, submitted by
9145 Samuel Hym <samuel.hym@gmail.com>
9150 - fix bind_variable_internal to call a variable's dynamic 'set function'
9151 with the right arguments depending on whether its an associative
9152 array, an indexed array, or a scalar. Fixes Ubuntu bug #471504
9153 https://bugs.launchpad.net/ubuntu/+source/bash/+bug/471504 reported
9154 by AJ Slater <aj.slater@gmail.com>
9156 [bash-4.1-beta frozen]
9161 - in getintmax(), in the case of a conversion error, return the partial
9162 value accumulated so far, which is suppose to be what
9163 strtoimax/strtoll/strtol returns
9167 [bash-4.1-beta released]
9171 builtins/{common.h,shopt.def},shell.c
9172 - changed shopt variable "set functions" to take the option name as
9173 the first argument; changed function prototypes and callers
9176 - change set_compatibility_level() to turn off other compatNN options
9177 when one is set -- enforce mutual exclusivity. Fixes problem noted
9178 by Jan Schampera <jan.schampera@web.de>
9182 lib/readline/rltty.c
9183 - make sure prepare_terminal_settings() tests for the presence of
9184 ECHOCTL before using it. Fixes bug reported by Joachim Schmitz
9188 - new WORDEXP_OPTION define (off by default)
9191 - don't include the --wordexp option or the supporting function
9192 (run_wordexp) if WORDEXP_OPTION is not defined. Suggested by
9193 Aharon Robbins <arnold@skeeve.com>
9196 - in execute_cond_node, turn on comsub_ignore_return if the flags
9197 indicate we're ignoring the return value before calling
9198 cond_expand_word. Fixes bug reported by Anirban Sinha
9199 <asinha@zeugmasystems.com>
9203 lib/sh/snprintf.c,builtins/printf.def
9204 - change check for HAVE_ASPRINTF and HAVE_SNPRINTF to check if value
9205 is 1 or 0 rather than whether they are defined or not. This allows
9206 a value of 0 to enable function replacement
9208 configure.in,aclocal.m4
9209 - new autoconf macro, BASH_FUNC_SNPRINTF, checks for snprintf present
9210 and working as C99 specifies with a zero length argument. Idea
9211 from Greg Wooledge <wooledg@eeg.ccf.org>
9212 - new macro BASH_FUNC_VSNPRINTF, does same thing for vsnprintf
9217 - in command_substitute, only tell parse_and_execute to reset the line
9218 number in an interactive shell if sourcelevel == 0 -- we'll use the
9219 line numbers from the sourced file
9222 - in execute_simple_command, only subtract function_line_number from
9223 line_number if sourcelevel == 0. If sourcing, we'll use the line
9224 numbers from the sourced file. Fixes bug reported by Hugo
9225 Mildenberger <Hugo.Mildenberger@namir.de>
9227 builtins/declare.def
9228 - in declare_internal, call bind_assoc_variable instead of
9229 bind_array_variable in the case of declare -A foo=bar. Fixes bug
9230 reported by Bernd Eggink <monoped@sudrala.de>.
9235 - change declaration for _rl_walphabetic to use prototype, assuming
9236 that any system with multibyte characters has a compiler that can
9237 handle prototypes. Fix for AIX compilation problem reported by
9238 Nick Hillman <nick_hillman@neverbox.com>
9243 - make funcnest file-scope static and unwind-protect its value in
9244 execute_function, so it can be used as a real measure of function
9248 - fix off-by-one error in trim_pathname that caused it to short-circuit
9249 when PROMPT_DIRTRIM == number of directories - 1. Fixes bug
9250 reported by Dennis Williamson <dennistwilliamson@gmail.com>
9255 - when fork() returns -1/EAGAIN, call waitchld(-1, 0) so the shell can
9256 reap any dead jobs before trying fork again. Currently disabled
9257 until bash-4.2 development starts
9259 lib/readline/complete.c
9260 - when incrementing _rl_interrupt_immediately, make sure it's greater
9261 than 0 before decrementing it. In practice, not a problem, but
9262 the right way to do it. Suggested by Jan Kratochvil
9263 <jan.kratochvil@redhat.com>
9265 lib/readline/signals.c
9266 - make sure rl_signal_handler doesn't set rl_caught_signal if
9267 _rl_interrupt_immediately is set, so RL_CHECK_SIGNALS doesn't
9268 cause it to be processed twice. Suggested by Jan Kratochvil
9269 <jan.kratochvil@redhat.com>
9270 - if the callback interface is being used, use the code path that
9271 immediately handles signals. This restores the readline-5.2
9272 behavior. Fixes GDB readline bug reported by Jan Kratochvil
9273 <jan.kratochvil@redhat.com>
9277 [bash-4.1-rc1 released]
9282 - don't have SYSLOG_HISTORY enabled by default
9285 - add explicit dependency on pathnames.h for parallel make support
9288 - add extern declaration for xtrace_fdchk
9291 - add local prototype declarations for isinf, isnan if we are providing
9295 - add extern declaration for get_locale_var if HAVE_LOCALE_CHARSET not
9299 - define NEED_FPURGE_DECL so we pick up any extern declaration for
9300 fpurge (e.g., if the system doesn't provide it)
9303 - correct prototype and declaration for set_shellopts_after_change so
9304 it's the correct type for shopt_set_func_t
9305 - add new function shopt_enable_hostname_completion that is the correct
9306 type for shopt_set_func_t; just calls enable_hostname_completion and
9311 doc/{bash.1,bashref.texi}
9312 - add \E and \" escape sequences to ANSI-C quoting description.
9313 Suggested by Aharon Robbins <arnold@skeeve.com>
9318 - make sure shell and environment variable names are always in
9319 `small caps' bold. Suggested by Aharon Robbins <arnold@skeeve.com>
9323 {execute_cmd.c,parse.y,Makefile}
9324 - changes for building minimal configuration from Matthias Klose
9336 - document compat32 and compat40 shopt options. Omission pointed out
9337 by Dilyan Palauzov <Dilyan.Palauzov@aegee.org>
9341 lib/readline/complete.c
9342 - use `convfn' (converted filename) instead of entry->d_name (filename
9343 read from file system) when adding partial or full completions to
9344 the command line. Bug and fix from Guillaume Outters
9345 <guillaume.outters@free.fr>
9350 - fix prototype in extern declaration for vsnprintf. Fix for bug
9351 reported by Yann Rouillard <yann@pleiades.fr.eu.org>
9356 - fix shell_getc to handle alias expansions containing quoted
9357 newlines. Problems in bash-4.1 with aliases containing quoted
9358 newlines in the middle of and at the end of their expansion.
9359 Fix for bug reported by Jonathan Claggett
9360 <jonathan@claggett.org>
9361 - change mk_alexpansion to not append a space to an alias
9362 expansion ending with a newline. Works with shell_getc
9366 lib/glob/Makefile.in
9367 - add dependencies on shell.h and pathnames.h. From Mike Frysinger
9372 doc/{bash.1,{bashref,version}.texi},lib/readine/doc/rluser.texi
9373 - some typo fixes from Aharon Robbins <arnold@skeeve.com>
9374 - added descriptions of ENV, COPROC, and MAPFILE variables
9375 - added descriptions of READLINE_LINE and READLINE_POINT
9380 - free `akey', the word-expanded index into the assoc array to avoid
9381 mem leak in array_value_internal
9382 - free index into assoc array in unbind_array_element
9383 - change array_value_internal to take an additional argument: an
9384 arrayind_t *. If not null, an index to an indexed array is
9385 returned there. If not an indexed array or subscript is @ or
9386 *, the value is unchanged
9391 - include <ulimit.h> if we found it during configure and we don't
9392 have resources. Fixes omission reported by Joachim Schmitz
9393 <jojo@schmitz-digital.de>
9395 {configure,config.h}.in
9396 - check for <ulimit.h>, define HAVE_ULIMIT_H if found
9399 - include <signal.h> for extern declaration for kill(2) if
9400 HAVE_KILLPG not defined
9403 - if HAVE_KILLPG is not defined, add an extern prototype decl for
9409 - when printing here-string redirections, don't quote the string. The
9410 original quotes, if any, are still in place and don't need to be
9411 requoted. Fixes bug reported by Arfrever Frehtes Taifersar Arahesis
9412 <arfrever.fta@gmail.com>
9415 - fix array_length_reference to return 0 for variables that have not
9416 been assigned a value. Fixes bug reported by Mart Frauenlab
9417 <mart.frauenlob@chello.at>, but is not backwards compatible
9420 - change array_value to take a new arrayind_t *indp parameter like
9421 get_array_value; changed extern prototype declaration
9424 - changed callers of array_value to add extra parameter
9427 - change expr_streval to set a new `lvalue' parameter with information
9428 about the string being evaluated: string, value, array index (if
9429 any), variable evaluated (if set).
9430 - saving and restoring current context now saves and restores the
9432 - new function expr_bind_array_element, binds an array element with an
9433 already-computed index to a specified value
9434 - anywhere we set the current token to a string (STR), save and set
9436 - change calls to expr_bind_variable to check whether or not the
9437 current lvalue indicates an indexed array was evaluated, and, if so,
9438 call expr_bind_array_element using the already-computed index
9439 (curlval.ind). Fixes problems with dynamic variables (e.g., RANDOM)
9440 in array indices with {pre,post}-{inc,dec}rement and op=
9441 operators reported by <dennis@netstrata.com>
9446 - fix subexpr() to initialize curlval and lastlval when resetting all
9447 of the rest of the expression-parsing variables
9451 builtins/setattr.def
9452 - in show_var_attributes, if the variable is not set (value == 0),
9453 don't print `name=""', just print `name'. Pointed out by
9454 Mart Frauenlab <mart.frauenlob@chello.at>
9457 - fix array_keys to return NULL if the variable is not set or
9458 invisible. Pointed out by Mart Frauenlab <mart.frauenlob@chello.at>
9459 - change array_value_internal to return NULL for variable which has
9465 - in command_word_completion_function, don't call glob_pattern_p
9466 on hint -- use the already-computed `globpat'. At this point,
9467 hint might contain an already-dequoted globbing character, but
9468 glob_matches will be NULL. Fixes bug reported by
9469 coyote@wariat.org.pl
9474 - set extern variable "exec_argv0" to the argument to -a
9477 - if exec_argv0 is set, set dollar_vars[0] to it and set it to NULL,
9478 assuming it was set by `exec -a'. `exec -a foo' now sets $0 to
9479 foo in an executable shell script without a leading `#!' (fixes
9485 - in push_func_var, if a variable is in a special builtin's temporary
9486 environment and needs to be propagated because we're in Posix mode,
9487 or we just need to propagate a variable, and we are executing in a
9488 function without any local variables (so the function-local variable
9489 context has no variable hash table), make sure we create a hash
9490 table so we have a place to save the variable to be propagated.
9491 Fixes bug reported by Crestez Dan Leonard <cdleonard@gmail.com>.
9496 - change add_hashed_command to remove the command being looked up from
9497 the hash table before trying to add it. That way, if it's not found,
9498 there won't be anything remaining in the hash table
9503 - move IMPOSSIBLE_TRAP_HANDLER define to trap.h so other parts of the
9507 - change yy_readline_get to use IMPOSSIBLE_TRAP_HANDER instead of NULL
9508 as a sentinel value for the SIGINT signal handler
9509 - make sure yy_readline_get resets interrupt_immediately to 0 after
9510 calling readline() using the same criteria it used to set it to 1
9511 before the call -- make the code symmetric. Suggested by Werner
9512 Fink <werner@suse.de>
9515 - move assignment to `retval' before decrement of interrupt_immediately
9516 and terminate_immediately and call to discard_unwind_frame
9517 - move assign_vars label before decrement of interrupt_immediately and
9518 terminate_immediately so those variables get reset appropriately
9519 if read -t times out
9522 - new define for Q_DOLBRACE, indicates double-quoted ${...}
9525 - in parameter_brace_expand, before calling parameter_brace_expand_rhs,
9526 add Q_DOLBRACE to `quoted' if we're within double quotes.
9527 - in expand_word_internal, if the Q_DOLBRACE flag is set, remove a
9528 backslash escaping a }. Result of a Posix discussion on the
9534 - new functions to save and restore the PIPESTATUS variable's internal
9535 array: save_pipestatus_array and restore_pipestatus_array
9538 - new extern declarations for save_pipestatus_array and
9539 restore_pipestatus_array
9542 - in run_pending_traps, _run_trap_internal, and run_exit_trap, save
9543 and restore $PIPESTATUS while traps are running. Fixes bug
9544 reported by Florian Bruhin <me@the-compiler.org>
9547 - use save_pipestatus_array and restore_pipestatus_array in
9548 save_parser_state and restore_parser_state, respectively, replacing
9551 lib/readline/histfile.c
9552 - fix callers of history_filename to be prepared to cope with it
9554 - change history_filename to return NULL if $HOME is not set, rather
9555 than trying to write the history file in the current directory.
9556 This is the default directory, used only if the application does
9557 not specify a history filename. Changed due to long-ago (unsent)
9558 bug report from OpenBSD
9560 {Makefile,config.h,configure}.in,externs.h,lib/sh/{dprintf.c,Makefile.in}
9561 - change fdprintf to dprintf, which is the Posix standard interface,
9562 look for it with configure, replace it if not available
9567 - add new subshell flag, SUBSHELL_RESETTRAP. Indicates to the trap
9568 builtin that the shell is executing a command substitution and
9569 should free the trap strings we left unfreed by reset_signal_handlers()
9572 - free_trap_string() and free_trap_strings() are now compiled in
9575 - if changing a signal disposition and the SUBSHELL_RESETTRAP flag is
9576 set in subshell_environment, free the trap strings left unfreed by
9577 reset_signal_handlers
9580 - in command_substitute, set the SUBSHELL_RESETTRAP flag. This change
9581 is for Austin Group Posix interpretation 53
9582 (http://austingroupbugs.net/view.php?id=53)
9586 lib/sh/{Makefile.in,strchrnul.c},Makefile.in
9587 - implementation of strchrnul, from gnulib
9589 configure.in,config.h.in
9590 - look for strchrnul and compile in version in lib/sh/strchrnul.c if
9592 - look for mbsnrtowcs and define HAVE_MBSNRTOWCS if available
9595 - new function, xdupmbstowcs2, fast version of xdupmbstowcs used when
9596 mbsnrtowcs is available and the indices are not required. Called
9597 from xdupmbstowcs as required. Initial patch from
9598 <0xe2.0x9a.0x9b@gmail.com>
9603 - call print_deferred_heredocs virtually every time a recursive call
9604 to make_command_string_internal is made so here documents get
9605 printed correctly when they are attached to commands inside compound
9606 commands such as for and while. Fixes bug reported by Mike
9607 Frysinger <vapier@gentoo.org>
9612 - fix have_precision case in PF macro to call printf with precision
9613 instead of fieldwidth argument. Fixes bug reported by Rob Robason
9619 - new function, signal_is_hard_ignored, returns true if the shell
9620 inherited SIG_IGN as a signal's disposition
9621 - new function, set_original_signal (sig, handler), provides interface
9622 for rest of shell to set original_signals[sig] = handler
9625 - execute_disk_command needs to call reset_terminating_signals in the
9626 child process before resetting traps with restore_original_signals
9629 - call initialize_terminating_signals before calling display_traps for
9630 trap -p or trap without any other arguments. Possible future use
9632 lib/readline/complete.c
9633 - rl_filename_completion_function needs to call
9634 rl_filename_dequoting_function with `dirname' (which has already
9635 been tilde-expanded) instead of `users_dirname', because it calls
9636 opendir with `dirname'. Fixes bug reported by Stefan H. Holek
9642 - experimental change to set_signal_handler: when setting the SIGCHLD
9643 handler, set the SA_RESTART flag so that interruptible system calls
9644 get restarted after a child dies. Fixes bug reported by Tomas
9645 Trnka <tomastrnka@gmx.com>, but needs further evaluation
9648 - eaccess(2) apparently does only half the job: it does not check that
9649 the permission bits on a file actually allow, for instance, execution.
9650 Need to augment with a call to sh_stataccess if eaccess returns
9651 success on FreeBSD. Fixes FreeBSD problem reported by Jonan Hattne
9652 <johan.hattne@utsouthwestern.edu>
9656 parse.y,bashline.c,externs.h
9657 - history_delimiting_chars now takes a const char * as an argument:
9658 the line being added to the history. Changed callers
9661 - bash_add_history should not add a semicolon separator if the current
9662 history entry already ends in a newline. It can introduce syntax
9663 errors (e.g., when it results in a null command before a close brace).
9664 Fixes bug reported by Andreas Schwab <schwab@linux-m68k.org>
9667 - history_delimiting_chars needs to return a newline instead of a
9668 semicolon if it thinks the current line starts a here document
9669 (if it contains `<<'). Also keeps track of the fact with a new
9670 static variable, LAST_WAS_HEREDOC, so it can return the right
9671 sequence of newlines later for the here-document body. Fixes bug
9672 reported by Andreas Schwab <schwab@linux-m68k.org>
9677 - if the system has faccessat, sh_eaccess will now use it in
9678 preference to all other options
9683 - new string_extract and extract_dollar_brace_string flag value:
9684 SX_POSIXEXP, set if the shell is expanding one of the new Posix
9685 pattern removal word expansions
9688 - new definitions for "word expansion state", shared between parse.y
9696 builtins/declare.def
9697 - make sure declare_internal calls bind_assoc_variable with newly-
9698 allocated memory for the key argument when using an implicit key
9699 of "0". Bug report and fix from Andreas Schwab
9700 <schwab@linux-m68k.org>
9704 lib/readline/input.c
9705 - restructure the rl_event_hook loop in rl_read_key to call the
9706 event hook after rl_gather_tyi() returns and rl_get_char has
9707 a chance to collect the input. Previous behavior was to call
9708 the event hook before attempting to read input. Problem
9709 reported by Anant Shankar <anantshankar17@gmail.com>
9714 - fc_builtin needs to check whether the calculation of last_hist
9715 leaves hlist[last_hist] == 0, and keep decrementing it until it
9716 leaves a non-null history entry or goes < 0. Currently only
9717 does this if saved_command_line_count > 0, indicating we're
9718 trying to edit a multi-line command. Fixes bug reported by
9719 Roman Rakus <rrakus@redhat.com>
9724 - new process substitution helper functions:
9725 unlink_fifo - closes a single FD or FIFO
9726 num_fifos - returns number of open FDs or active FIFOs
9727 copy_fifo_list - returns a bitmap of open FDs or active FIFOs
9728 by index into appropriate list (dev_fd_list or fifo_list)
9729 close_new_fifos - take a bitmap saved by copy_fifo_list and
9730 call unlink_fifo on any FD or FIFO open at the time of the
9731 call that is not marked as active in list
9734 - execute_builtin_or_function: use new framework to close process
9735 substitution FDs or FIFOs created by a shell builtin or shell
9736 function. Fixes bug reported by Charles Duffy <charles@dyfis.net>
9738 doc/{bash.1,bashref.texi}
9739 - document 'C and "C constants for printf builtin
9743 lib/readline/complete.c
9744 - new function to return screenwidth for use when displaying possible
9745 matches: complete_get_screenwidth; changed uses of _rl_screenwidth
9746 to use complete_get_screenwidth().
9747 - change complete_get_screenwidth to query (readline-private)
9748 _rl_completion_colums, $COLUMNS, then _rl_screenwidth in that order
9749 - change rl_display_match_list to deal with limit < 0 (which implies
9750 that cols == 0) when _rl_screenwidth > 0
9753 - new bindable variable: completion-display-width, controls the
9754 number of columns used when displaying completions with new
9755 sv_compwidth function to call when value is set or unset
9757 lib/readline/doc/{readline.3,rltech.texi}
9758 - documented completion-display-width variable
9763 - change execute_in_subshell to reset trap handlers without freeing
9764 the trap strings and set SUBSHELL_RESETTRAP. In line with Austin
9765 Group interp #53 (trap in a subshell).
9766 - ditto for execute_simple_command where it can be determined that
9767 the shell is going to run a builtin or function in a subshell
9770 - new function, get_all_original_signals, retrieves the original
9771 signal disposition for all signals
9774 - extern declaration for get_all_original_signals
9777 - change showtrap to display signals that are "hard ignored" as
9778 trap commands to ignore them, even though that trap command would
9779 be a no-op. Partial fix for feature request from Siddhesh
9780 Poyarekar <siddhesh.poyarekar@gmail.com>
9781 - change trap_builtin to call get_all_original_signals before displaying
9782 traps. This will show inherited ignored signals. Rest of feature
9783 request from Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
9785 lib/readline/histexpand.c
9786 - fix history_tokenize_word so that it understands $(...) and the
9787 <(...) and >(...) expansions as a single word
9788 - change history_tokenize_word so that it understands extended shell
9789 globbing patterns as a single word. Code is very similar to
9790 $(...) code above. Bug reported by Rajeev V. Pillai
9791 <rajeevvp@gmail.com>
9795 lib/readline/vi_mode.c
9796 - add checks to rl_vi_char_search to make sure we've already done a
9797 search if the command is `;' or `,', and return immediately if we
9798 have not. Fixes bug reported by Eric Ho <ericmho@shaw.ca>
9801 - make sure `dir' is in the valid range before searching in
9802 _rl_char_search_internal. Range checks in the code depend on it
9807 lib/readline/complete.c
9808 - in rl_complete_internal, if show-all-if-ambiguous or
9809 show-all-if-unmodified are set (what_to_do == '!' or '@',
9810 respectively), and the common match prefix is shorter than the
9811 text being completed, inhibit inserting the match.
9812 The guess is that replacing text with a shorter match will not
9818 - new file, with unicode character conversion-related code. Will be
9819 used to implement \u and \U escapes where appropriate, and for
9820 other unicode-related functions in the future
9825 - add code to handle \u and \U escapes in format strings and arguments
9826 processed by the %b format specifier
9829 - add code to handle \u and \U escapes as unicode characters, works for
9830 both `echo -e' and $'...'
9832 doc/{bash.1,bashref.texi}
9833 - document new \u and \U escape sequences for $'...' and echo (printf
9834 defers to the system's man page or Posix)
9839 - change execute_disk_command to return a status, instead of just
9840 leaving it in `last_command_exit_value', since the parent's return
9841 value is sometimes used (e.g., when a restricted shell refuses to
9842 run a command with a `/'). Fixes bug reported by David Pitt
9843 <David.Pitt@anz.com>
9848 - change bash completion functions to save and restore the value of
9849 rl_ignore_some_completions_function, and set it to the bash default
9850 of filename_completion_ignore where appropriate. Fixes bug
9851 reported by Henning Bekel <h.bekel@googlemail.com>
9854 - new convenience function: find_global_variable (name). Looks for
9855 NAME in the global variables table, skipping any local and
9856 temporary environment variables
9858 builtins/declare.def
9859 - add new -g option to declare/typeset/local, forces variables to be
9860 created or modified at the global scope when executing inside a
9861 shell function. Requested by many, most recently by
9862 konsolebox@gmail.com
9867 - added new `-v var' unary test operator; returns TRUE if var is set
9868 (i.e., has been assigned a value). Works in both test builtin and
9869 [[ conditional command
9871 doc/{bash.1,bashref.texi}
9872 - documented new `-v var' unary conditional operator
9875 - added tests for new -v var operator
9878 - change kill builtin so -PID (pgrp specification) following a
9879 -s sig or -n sig option is not interpreted as a signal specification.
9880 Fixes bug reported by Roman Rakus <rrakus@redhat.com>
9882 builtins/evalstring.c
9883 - in parse_and_execute, if parse_command() returns non-zero,
9884 indicating a parse error, exit the shell if the conditions require
9885 a posix-mode non-interactive shell to abort (parse error in a `.'
9886 script or eval string). Bash-4.1 only printed a warning. This is
9887 from Austin Group interp 114
9890 - add note to the posix mode section of the texinfo manual noting
9891 the changed behavior for `.' and `eval'
9894 - change time_command_acceptable to allow TIME token to appear after
9895 BANG token (to allow `! time foo', which is supposed to be valid)
9896 - change pipeline_command production to allow multiple instances of
9897 `!' (which toggle inverting the return status) and `time' (which
9901 - In posix mode, `time' without a following pipeline prints the
9902 elapsed user, system, and real time for the shell and its
9903 children since the shell was invoked.
9904 It's like `times' but obeys the setting of TIMEFORMAT. A future
9905 revision of Posix will require this
9907 doc/{bashref.texi,bash.1}
9908 - document new posix mode use of `time'
9911 - add production to pipeline_command that permits `!' by itself to
9912 be equivalent to `false' (and, with the changes above, permits
9913 `! !' to be roughly equivalent to `true'). A future revision of
9914 Posix will require this
9919 - fix \W prompt expansion to use memmove instead of strcpy, since the
9920 source and target strings overlap (though you think it wouldn't
9921 matter, since the overlapping regions are never touched at the same
9922 time). Fixes bug reported by Stéphane Jourdoi
9923 <sjourdois@gmail.com>
9926 - Posix interp 217 states that $(( must be parsed first as an
9927 arithmetic expansion, so avoid attempting to parse it as a nested
9928 command substitution. Fixes bug reported by several, most recently
9932 - change extract_delimited_string to process nested $( as a possible
9933 command substitution, but only if already parsing an arithmetic
9934 expansion. Rest of fix for Posix interp 217
9935 - change parameter_brace_expand_rhs to make the := expansion operator
9936 perform quote removal and both assign the result to the variable and
9937 return it as the result of the expansion, rather than assign the
9938 value after quote removal but return the value before quote removal.
9940 - introduce new internal quoting flag: Q_DOLBRACE. Denotes a double-
9941 quoted ${...} expansion. In this case, Posix interp 221 requires
9942 that a backslash quoting an embedded `}' be removed, even though it's
9943 not one of the characters marked as special inside double quotes.
9944 Set in parameter_brace_expand, used by expand_word_internal.
9947 - introduce new parsing state, P_DOLBRACE, set when parsing a ${...}
9949 - set a "dolbrace operator state" in parse_matched_pair to decide
9950 whether the lexer is reading the param, op, or word in
9951 ${paramOPword}. Will be used to decide whether or not to treat
9952 single quotes specially in a double-quoted "${...}
9957 - change parse_matched_pair so that a single quote appearing in a
9958 double-quoted ${...} expansion is not special unless the expansion
9959 operator is `#[#]' or `%[%]'. Posix interp 221
9962 - change string_extract_double_quoted so that a single quote appearing
9963 in a double-quoted ${...} expansion is not special unless the
9964 expansion operator is `#[#]' or `%[%]'. Posix interp 221
9967 - document posix-mode effects of Posix interp 221
9968 - add section describing GNU parallel as requested by Stallman
9970 lib/readline/complete.c
9971 - broke code that compares filenames read from the file system (and
9972 possibly converted) to words being completed out into a separate
9973 function: complete_fncmp
9974 - augment complete_fncmp to treat hyphen and underscore as equivalent
9975 when comparing filenames if _rl_completion_case_map is set
9977 lib/readline/rlprivate.h
9978 - new extern declaration for _rl_completion_case_map
9981 - change _rl_strnicmp to return the difference between the characters,
9982 like strcasecmp, and not modify the pointers it is passed
9983 - change _rl_stricmp to not modify the pointers it is passed
9986 - new bindable variable, "completion-case-map", toggles value of
9987 _rl_completion_case_map
9989 lib/readline/doc/{rluser.texi,readline.3}
9990 - document new bindable readline variable "completion-case-map"
9993 - change execute_function to reset funcnest and jump back to top level
9994 if funcnest exceeds funcnest_max
9995 - use funcnest_max as a max function nesting level, if set to numeric
9996 value greater than 0 (defaults to 0, so inactive)
9999 - new variable FUNCNEST, controls funcnest_max value if set to numeric
10002 - reset funcnest to 0 when throw_to_top_level occurs
10004 doc/{bash.1,bashref.texi}
10005 - document FUNCNEST variable and its effect on function execution
10007 lib/readline/funmap.c
10008 - add new bindable command names to avoid case-insensitive matching
10009 problems between, for instance, vi-fword and vi-fWord:
10014 vi-backward-bigword
10018 Suggested in a different form in 2006 (!) by Servatius Brandt
10019 <servatius.brandt@arcor.de>
10021 builtins/mapfile.def
10022 - run_callback now takes a new third argument: curline, the line
10023 currently being read and about to be assigned
10024 - the callback function/command now takes an additional argument:
10025 the line to be assigned to the array index. Feature suggested by
10026 Dennis Williamson <dennistwilliamson@gmail.com>
10028 doc/{bash.1,bashref.texi}
10029 - document new additional `line' argument to mapfile callback
10033 builtins/printf.def
10034 - add new %(fmt)T format specifier, where FMT is a strftime format.
10035 Argument is number of seconds since the epoch, with -1 meaning
10036 current time (roughly date +%s) and -2 meaning shell start time
10037 (roughly $SECONDS, unless it's been assigned a value or unset).
10038 Fieldwidth and precision are preserved, strftime result is printed
10039 as with %[-][[fieldwidth][.[precision]]]s
10041 doc/{bash.1,bashref.texi}
10042 - document new %(datefmt)T printf format specifier and special
10046 - don't permit programs with slashes to be entered into the hash table
10047 at all, even with the -p option. Inconsistency pointed out by
10048 Jan Schampera <jan.schampera@web.de>
10051 - add `compat41' option in preparation for bash-4.2
10055 lib/readline/vi_mode.c
10056 - finish restructuring rl_vi_domove and the functions that call it so
10057 it works in callback mode, including numeric arguments. Requested
10058 a long time ago by Bob Rossi
10060 lib/readline/callback.c
10061 - arrange to call appropriate callback when readline state indicates
10062 RL_STATE_VIMOTION, so vi motion commands like `cw' and `d2w' are
10063 handled in callback mode
10066 - replacement wcswidth implementation
10069 - add REPLACE_FUNCS(wcswidth) to BASH_CHECK_MULTIBYTE
10072 - fix select_query and print_index_and_element to compute correct
10073 display width of select list elements in presence of multibyte
10074 characters. Bug reported by Bernd Eggink <monoped@sudrala.de>
10077 - add posix-mandated -e option; currently ignored in most circumstances
10079 doc/{bash.1,bashref.texi}
10080 - document new `cd -e' option
10085 - change array_value_internal to treat negative subscripts to indexed
10086 arrays, offset from array_max_index(x) + 1, so foo[-1] is the last
10090 - Change verify_substring_values to allow negative length specifications
10091 when using string variables or array members. Negative lengths
10092 mean to return characters from OFFSET until (${#var} - N) for
10093 {var:offset:-N}. Feature requested by Richard Neill
10094 <rn214@hermes.cam.ac.uk>
10096 doc/{bash.1,bashref.texi}
10097 - document new behavior of negative subscripts to indexed arrays
10098 - document new behavior of negative LENGTH in substring expansion
10101 - change version to bash-4.2-devel
10104 - make sure initialize_shell_variables calls sv_xtracefd if
10105 BASH_XTRACEFD is inherited in the shell environment. Fixes but
10106 reported by <jsunx1@bellsouth.net>
10110 lib/readline/complete.c
10111 - change get_y_or_n to always return 1 when in callback mode, so we
10112 don't do a blocking read. Have to wait until readline-7.0 to add
10113 a state so we can use callbacks, since that will change public
10119 - fix memory leak in parameter_brace_expand: when performing pattern
10120 removal with parameter_brace_remove_pattern, make sure `name' is
10121 freed. Fixes bug reported by oyvindh@dhampir.no
10126 - make the ${param//pat/rep}, ${param^pat}, and ${param,pat} expansions
10127 require single quotes and double quotes to match when within double
10128 quotes. This way every expansion except the Posix ones behaves as
10129 bash has always behaved
10132 - change remove_upattern and remove_wpattern to return their first
10133 argument if nothing matches, change callers to allocate memory
10135 - change remove_pattern to short-circuit and return copy of PARAM
10136 if remove_wpattern returns its first argument (indicating no match)
10137 rather than convert back to multibyte string, allocating new memory
10138 twice and calling wcsrtombs
10143 - add missing initializers for sh_coproc to eliminate a compiler
10144 warning. Patch from Werner Fink <werner@suse.de>
10149 - add `TIMEIGN' token to handle `time -p -- ...'. Pointed out by
10150 Laszlo Ersek <lacos@caesar.elte.hu> on austin-group list
10155 - treat a shell with (subshell_environment&SUBSHELL_PIPE) != 0 like
10156 a command substitution in wait_for and act like we received a
10157 SIGINT if a job we're waiting for dies of SIGINT. Fixes bug
10158 reported by Ilya Basin <basinilya@gmail.com>
10163 - if fork() fails in make_child, try to reap some dead children before
10167 - change execute_pipeline to run the last command of a non-asynchronous
10168 pipeline in the current shell environment if the `lastpipe' shell
10169 option is enabled and job control is not active. Code from
10170 Werner Fink <werner@suse.de>
10173 - Posix says (issue 267) that time is not recognized as a keyword
10174 if the next token begins with a `-'
10176 doc/{bash.1,bashref.texi}
10177 - changed the descriptions of BASH_SOURCE, BASH_LINENO, and FUNCNAME
10178 as proposed in Ubuntu bug 591677.
10179 - document new `lastpipe' shell option that runs last command of a
10180 pipeline in the current shell environment
10181 - document new posix-mode behavior with `time -p'
10186 - new autoconf test WEXITSTATUS_OFFSET, bit offset in status word
10187 returned by wait() of the process's exit status
10190 - change stop_pipeline to return the actual index of the job just
10191 created and added to the jobs table, instead of the current job
10192 - job_exit_status and job_exit_signal are now global functions, with
10193 extern declarations in jobs.h
10194 - append_process: new utility function for use by the lastpipe code,
10195 takes info, creates a PROCESS from them, and adds it to the end of
10196 the passed job id's pipeline. lastpipe code uses it to add a dummy
10197 process for the last command in the pipeline
10198 - freeze_jobs_list: new utility function so rest of shell can freeze
10199 the jobs list. Used by the lastpipe code
10202 - changes to lastpipe code to make `pipefail' option, $PIPESTATUS, and
10203 $? work correctly. Uses append_process and job_exit_status
10208 - when performing pattern substitution word expansions, a `&' in the
10209 replacement string is replaced by the text matched by the pattern.
10210 The `&' can be quoted with a backslash to inhibit the expansion.
10216 - new member for struct compspec: lcommand. for future use
10221 - fix problem in parse_comsub where extra space was added to here-doc
10222 delimiter if the first word in the comsub contained a `/'. Fixes
10223 bug reported by Alex Khesin <alexk@google.com>
10228 - change reserved_word_acceptable to return success if the last two
10229 tokens read were `function WORD'. Allows function definitions like
10230 function good [[ -x foo ]];. Fixes bug reported by Linda Walsh
10233 doc/{bash.1,bashref.texi}
10234 - change function definition meta-syntax to make it clearer, rather
10235 than let the text note the optional portions
10240 - change bash_history_inhibit_expansion() to suppress history expansion
10241 for $! parameter expansion. Fixes debian bug #589745 submitted by
10242 Frank Heckenbach <f.heckenbach@fh-soft.de>
10244 lib/readline/terminal.c
10245 - change rl_resize_terminal to always fetch the new terminal size and
10246 only force the redisplay if _rl_echoing_p is non-zero. Fixes bug
10247 reported by Balazs Kezes <rlblaster@gmail.com>
10251 lib/readline/xfree.c
10252 - new file, contains definition of xfree moved from xmalloc.c
10257 - check suspect return values from bind_variable before trying to use
10258 the returned SHELL_VAR *. Changes to: initialize_shell_variables,
10259 bind_int_variable, FIND_OR_MAKE_VARIABLE. Fixes bug reported by
10260 Roman Rakus <rrakus@redhat.com>
10264 lib/readline/rltty.c
10265 - fix rl_prep_terminal and rl_deprep_terminal to use fileno(stdout)
10266 if rl_instream is NULL. Fixes bug reported by Otto Allmendinger
10267 otto.allmendinger@googlemail.com
10272 - if the passed string is NULL or empty, return it immediately. Fixes
10273 bug reported by Dennis Williamson <dennistwilliamson@gmail.com>
10276 - fix pat_subst to cope with the passed string being NULL
10279 - added flag values for array_value_internal and its callers; converted
10280 array_value_internal `allow_all' parameter into a general flags word
10281 - get_array_value now takes a flags value
10282 - changed array_value internal to use *indp as an index to use if the
10283 AV_USEIND flag is set, rather than recomputing it
10286 - get_var_and_type takes two new parameters: a flags word and an index
10287 that represents an already-computed index for an array reference
10288 (just indexed arrays so far). Index is used and passed to array_value
10289 if flags includes AV_USEIND
10290 - parameter_brace_expand_word takes a new argument: the already-
10291 computed index; returns W_ARRAYIND if word expanded is being used
10293 - changed parameter_brace_casemod, parameter_brace_patsub,
10294 parameter_brace_substring, parameter_brace_remove_pattern to take new
10295 flags and index arguments from parameter_brace_expand_word. They
10296 pass the new parameters along to get_var_and_type to use an
10297 already-computed array index if necessary. Fixes bug where array
10298 indexes are computed twice reported by Andrew Benton
10301 doc/bash.1,lib/readline/doc/{history.3,hsuser.texi}
10302 - modified description of history event designators to clarify that
10303 all non-absolute event designators are relative to the current
10304 position in the history list. Question raised by Frank
10305 Heckenbach <f.heckenbach@fh-soft.de> as debian bash bug 590012
10310 - remove code that does not add a quoted null when the input string
10311 is partially quoted; subsequent word splitting may require it.
10312 Fixes bug reported by Eric Blake <eblake@redhat.com>
10317 - move match_pattern_wchar and match_pattern_char to new file in
10319 - new functions: wmatchlen(pat, max) and umatchlen(pat, max), computes
10320 number of characters PAT will match. Returns the number of chars
10321 that will be matched or -1 if the match length is indeterminate
10322 (i.e., contains a `*')
10325 - use umatchlen/wmatchlen in match_upattern/match_wpattern to bound
10326 the number of match attempts in large strings to (usually) one,
10327 depending on match length. Fixes performance problems with
10328 pattern substitution in large strings noted by Yi Yan
10329 <yiyan97@hotmail.com>. Can be applied to remove_[uw]pattern also
10334 - in maybe_append_history, change check for history_lines_this_session
10335 so that we append the lines to the file if it's equal to the value
10336 returned by where_history(). This means that without this change,
10337 the history won't be appended if all the lines in the history list
10338 were added in the current session since the last time the history
10339 file was read or written. Fixes bug reported by Bruce Korb
10340 <bruce.korb@gmail.com>
10343 - add prompt_string_pointer to the parser_state struct saved and
10344 restored by {save,restore}_parser_state. Fixes both bugs exposed
10345 by bash_completion and completion of open backquotes reported by
10346 Egmont Koblinger <egmont@gmail.com>
10349 - new flag for skip_to_delim: SD_EXTGLOB. Skip extended globbing
10350 patterns while looking for ending delimiter
10353 - when passed the SD_EXTGLOB flag, skip_to_delim skips over extended
10354 globbing patterns (when extended_glob is set) while looking for a
10355 character in the delimiter set
10358 - split_ignorespec: new function to replace calls to extract_colon_unit
10359 in setup_ignore_patterns. uses skip_to_delim with the SD_EXTGLOB
10360 flag to skip over extended globbing patterns in variables like
10361 HISTIGNORE and GLOBIGNORE. Fixes bug reported by Dimitar DIMITROV
10362 <mitkofr@yahoo.fr> and Greg Wooledge <wooledg@eeg.ccf.org>
10366 lib/readline/rlprivate.h
10367 - add members to search_cxt to save _rl_keymap
10368 - new flag for isearch context: SF_CHGKMAP, set if we changed the
10369 keymap while reading a character for the search string that
10370 translated to a command
10372 lib/readline/isearch.c
10373 - save current readline keymap in cxt->keymap and cxt->okeymap
10375 - in _rl_isearch_dispatch, only check for cxt->lastc as a member of
10376 cxt->search_terminators if it's > 0 (i.e., not an isearch opcode)
10381 - add Solaris SIGJVM1 and SIGJVM2. Update from Stefan Teleman
10382 <stefan.teleman@oracle.com>
10385 - instead of closing all fds 3-20 at shell startup, just set them to
10386 be close-on-exec. Report from Rainer Müller<raimue@macports.org>
10388 lib/readline/isearch.c
10389 - in _rl_isearch_dispatch, if the current character maps to ISKMAP,
10390 move to the indicated keymap (using cxt->keymap) and go on to
10391 read another character. Fixes problem reported by Davor
10392 Cubranic <cubranic@stat.ubc.ca>
10393 - in _rl_isearch_dispatch, after translating key to possible opcode,
10394 restore _rl_keymap from cxt->okeymap if necessary
10395 - in _rl_isearch_dispatch, use key sequences that map to default
10396 functions that ^G, ^W, and ^Y map to as equivalent to those chars
10398 lib/readline/complete.c
10399 - new variable, _rl_menu_complete_prefix_first, zero by default
10400 - change menu_complete to display common prefix (matches[0]) first
10401 before cycling through rest of match list if
10402 _rl_menu_complete_prefix_first is non-zero. Suggested by Sami
10403 Pietila <sami.pietila@gmail.com>
10405 lib/readline/bind.c
10406 - new bindable readline variable, "menu-complete-display-prefix",
10407 controls setting of _rl_menu_complete_prefix_first
10409 doc/{bash.1,bashref.texi},lib/readline/doc/{readline.3,rluser.texi}
10410 - added description of menu-complete-display-prefix bindable
10416 - remove AM_PATH_LISPDIR call since we don't use that bash debugger
10417 any more. Suggested by Mike Frysinger <vapier@gentoo.org>
10422 - change executable_file to set errno to EISDIR if the passed name
10426 - change exec_builtin to report appropriate error message if the
10427 file argument is a directory. Noted by Eric Blake <eblake@redhat.com>
10428 in a message to austin-group
10430 builtins/source.def
10431 - change source_builtin to make sure the shell exits if the file is
10432 not found when in a non-interactive shell running in posix mode
10433 and source_searches_cwd == 0 (as posix mode makes it by default).
10434 Pointed out in http://thread.gmane.org/gmane.comp.shells.dash/291/focus=392
10435 by Jilles Tjoelker <jilles@stack.nl>
10438 - set executing_command_builtin in execute_builtin if the builtin is
10439 command_builtin. Unwind-protected in execute_function_or_builtin
10440 (like executing_builtin variable). Available for rest of shell
10442 builtins/{source.def,evalfile.c}
10443 - make sure that non-interactive posix mode shells exit if the file
10444 argument to `.' is not found only if they are not being executed
10445 by the command builtin (executing_command_builtin == 0). This is
10446 how `command' can cancel effects of special builtin exit properties
10447 in the case of `dot file not found'
10452 - pass \c through unchanged if not escaping for `echo -e' and they are
10453 the final two characters in the string
10458 - extract_dollar_brace_string: fix problem with single quotes
10459 in unquoted ${...} for Posix compliance
10464 - catch return value from shell_execve; don't print duplicate error
10465 message if return value is EX_NOTFOUND. Make sure exit status
10466 from exec is 127 if command is not found
10469 - fix typo (`saved_redirects' should be `saved redirects') in
10470 execute_function_or_builtin `command exec' case. Typo caused
10471 too much of the unwind-protect stack to be discarded
10472 - in same execute_function_or_builtin case, don't discard the
10473 `saved redirects' frame unconditionally; only discard it if
10474 saved_redirects is non-null in the `command exec' case. Fixes
10475 sh -c 'command exec; exit 1' hanging bug uncovered by FreeBSD
10481 - when in posix mode, shell should not exit if a variable assignment
10482 error (e.g., assigning to readonly variable) occurs preceding a
10483 command that is not a special builtin. Fixes bug uncovered by
10484 FreeBSD sh test cases
10485 - when in posix mode, the ${!?} and ${!#} expansions are not indirect
10486 expansions, but posix word expansions involving the `!' variable
10489 - fix parse_comsub so that it does not skip backslash-newline when
10495 - fix parameter_brace_expand so that an attempt to use the % or #
10496 expansions on an unset variable with -u set will cause a non-
10497 interactive shell to abort. Posix change
10498 - fix parameter_brace_expand so that an attempt to use pattern
10499 substitution or case modification expansions on an unset variable
10500 with -u set will cause and unbound variable error and make a
10501 non-interactive shell abort
10502 - change parameter_brace_expand_length to return INTMAX_MIN if a
10503 positional parameter is unset and -u is set
10504 - if parameter_brace_expand_length returns INTMAX_MIN when -u is set,
10505 treat it as an unbound variable error and make a non-interactive
10506 shell abort. Posix change
10507 - change parameter_brace_expand_length to return INTMAX_MIN if an
10508 implicit reference to array[0] is made ${#array} and array[0] is
10509 not set when -u is set
10514 - Posix 2008 says that if no matching directories are found in $CDPATH,
10515 use the directory name passed as an operand and go on. Posix change
10518 - change Posix mode section with latest additions and removals
10522 lib/readline/complete.c
10523 - fix rl_menu_complete and rl_old_menu_complete to keep incrementing
10524 match_list_index by match_list_size as long as it's < 0. Fixes
10525 bug reported by jeenuv@gmail.com
10528 - make mkseq() take intmax_t arguments for sequence start and end
10529 and make sure it's passed intmax_t values. Fixes bug reported by
10530 Pete Gregory <pg@bushlitt.org>
10533 - if termsig_handler is called when terminate_immediately == 1,
10534 assume we're being called as a signal handler and set
10535 history_lines_this_session to 0 to inhibit history file being
10536 written on shell exit. Fixes long-standing bug most recently
10537 observed by Andreas Schwab <schwab@linux-m68k.org>
10542 - add_undo_close_redirect now returns int, 0 on success, non-zero on
10543 failure. Currently always succeeds
10544 - new macro REDIRECTION_ERROR to make do_redirection_internal return
10546 - change do_redirection_internal to call REDIRECTION_ERROR after
10547 saving file descriptor and make do_redirection_internal return error
10548 if add_undo_redirect or add_undo_close redirect fails. This makes
10549 failure to save a file descriptor a redirection error and the shell
10550 behaves appropriately. Fixes bug reported by Eric Blake
10551 <eblake@redhat.com>
10554 - modify bash_forward_shellword to correctly handle quoted strings,
10555 especially if point is in a quoted string when function is invoked.
10556 Fixes bug reported by Daniel Colascione <dan.colascione@gmail.com>
10559 - change version to 4.2-alpha
10563 lib/readline/text.c
10564 - in rl_insert, if we're not in the multibyte code path, don't try to
10565 optimize and insert all of the available typeahead input if we're
10566 reading input from a macro. Fixes bug reported by Andre Majorel
10567 <aym-ung@teaser.fr>
10569 lib/readline/text.c
10570 - break out multibyte guts of rl_forward_char into a separate function
10571 _rl_forward_char_internal that does nothing but calculate the new
10573 - change rl_forward_char to call _rl_forward_char_internal instead of
10574 having equivalent code inline
10576 lib/readline/rlprivate.h
10577 - new extern declaration for _rl_forward_char_internal
10579 lib/readline/vi_mode.c
10580 - change _rl_vi_append_forward to call _rl_forward_char_internal to
10581 set rl_point, instead of calling rl_forward_char. When at the end
10582 of the line, rl_forward_char will ring the bell. Fixes debian
10583 bash bug 601042, reported by Alan J. Greenberger <alanjg@ptd.net>
10588 - fix match_upattern to use correct test to immediately break out of
10589 loop (when potential match length is greater than number of chars
10590 remaining in the string) in MATCH_ANY case
10595 - include "typemax.h" to make sure we have a definition of INTMAX_MIN
10600 - make sure `localconv' isn't declared on machines without iconv
10601 - add stub_charset for systems that don't have locale_charset: looks
10602 up LC_CTYPE, returns everything after last `.', "UTF-8" if the
10603 value is exactly "UTF-8", and "ASCII" otherwise
10607 lib/readline/vi_mode.c
10608 - in rl_domove_motion_callback, make sure to use m->key instead of
10609 key, which is not initialized and should not be used. Bug report
10610 from Andreas Schwab <schwab@linux-m68k.org>
10611 - in rl_vi_domove, make assignment to `m' explicit instead of
10612 relying on evaluation order semantics, since the C standard leaves
10613 them unspecified. Bug report from Andreas Schwab
10614 <schwab@linux-m68k.org>
10619 - sh_single_quote and sh_double_quote now take a const char *
10620 argument. Fixes problem pointed out by Joachim Schmitz
10621 <jojo@schmitz-digital.de>
10624 - change extern declarations for sh_single_quote and sh_double_quote
10627 - make sure that return value is cast to (char *) if we're using a
10628 part of the passed (const char *) argument. Fixes problem pointed
10629 out by Joachim Schmitz <jojo@schmitz-digital.de>
10632 - fix a typo that mixed up defines for LPAREN and RPAREN. Bug and
10633 fix from Andreas Schwab <schwab@linux-m68k.org>
10634 - use WLPAREN and WRPAREN in multibyte character environments
10635 - fixed typos using L'cc' in a non-wide-char environment
10637 lib/readline/complete.c
10638 - fix rl_filename_completion_function to dequote users_dirname if
10639 there is a filename dequoting function (as well as dirname), since
10640 users_dirname gets tacked back onto the beginning of the possible
10641 completions and then requoted. Bug reported by Andreas Schwab
10642 <schwab@linux-m68k.org>
10646 lib/readline/parens.c
10647 - the `blink-matching-paren' variable should default to off
10652 - add extern declaration for close_new_fifos()
10655 - fix curencoding to return the character past the `.', not a string
10659 - fix stub_charset to do the same cut-off at `@' as curencoding().
10660 These two functions should be combined
10662 builtins/printf.def
10663 - document new %(datefmt)T modifier in help text
10668 - fix `W' case in decode_prompt_string: memmove was copying one too
10669 few bytes and missed the closing NUL. Bug report from Tim Mooney
10670 <Tim.Mooney@ndsu.edu>
10675 - in expand_word_internal, don't add quoted nulls to partially-
10676 quoted strings if the word will not be subjected to word splitting
10677 later (which will remove the quoted null). Fixes bug reported by
10678 Rocky Bernstein <rocky.bernstein@gmail.com>
10683 - change multibyte case of match_pattern to revert to match_upattern
10684 if neither the pattern nor the string has any multibyte characters
10687 - fix tests of backslash-escaped characters in skipquotes, skipws,
10688 rd_token to check for backslash at EOS and not go past the end.
10689 Fixes debian bug 603696 reported by Tim Small <tim@buttersideup.com>
10692 - new file, mbchar.h from gnulib minus the <stdbool.h> include
10695 - new file, mbchar.c from gnulib with additions
10696 - moved mbstrlen from subst.c to here, changed initialization of mbs
10697 - change mbstrlen to use is_basic to avoid calls to mbrlen for ASCII
10698 chars; code hints from gnulib
10699 - don't copy mbs and mbsbak if we're not calling mbrlen
10704 - change xstrmatch to use internal_strmatch() if the pattern and
10705 string don't have any multibyte characters
10710 - change ADVANCE_CHAR and ADVANCE_CHAR_P macros to use is_basic and
10711 only call mbrlen and copy state and state_bak if is_basic returns
10712 false (non-ASCII). Called all over the place.
10713 - change rest of macros except BACKUP_CHAR and BACKUP_CHAR_P in the
10719 - audit all calls to string_list and make sure caller can handle a
10720 NULL return value. Fixes bug reported by David Rochberg
10721 <rochberg@google.com>
10724 - change sh_wassign_func_t to take an additional argument: an int
10728 - change do_word_assignment to take an additional argument to match
10729 wassign_func_t; change callers
10730 - change call to (*assign_func) in expand_word_list_internal to match
10731 new wassign_func_t prototype
10732 - (*assign_func) passes 1 as additional arg if the simple command is
10733 a builtin or function, in which case the assignment to the
10734 temporary env should take effect
10737 - change assign_in_env to take an additional argument to match
10738 wassign_func_t; change callers
10739 - move call to sv_ifs from dispose_temporary_env to
10740 dispose_used_env_vars; we don't need to do it if called from
10741 merge_temporary_env
10746 - change dispose_temporary_env to maintain a list (tempvar_list) of
10747 variables that need to be handled specially. If a variable that
10748 gets freed by push_temp_var or propagate_temp_var is one of the
10749 variables that the shell handles specially (IFS, LANG, etc.), it's
10750 stored on the list. For each variable in this list,
10751 dispose_temp_var calls stupidly_hack_special_variables.
10752 - assign_in_env calls stupidly_hack_special_variables if flags arg
10753 is non-zero, so variable assignments affect current shell
10754 execution environment if a builtin or function is being executed.
10755 Fixes bug reported by Bruno Haible <bruno@clisp.org>
10760 - use mbsmbchar on both string and pattern in match_pattern instead
10761 of strlen and mbstrlen; only go through the strings once
10765 lib/readline/kill.c
10766 - in rl_yank_last_arg, only switch directions if the `count'
10767 argument is < 0, not < 1. This makes explicit count arguments of
10768 0 work as expected. Fixes bug reported by Dennis Williamson
10769 <dennistwilliamson@gmail.com>
10771 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
10772 - fix documentation for yank-last-arg to make it clear how the count
10773 argument is set and how second and subsequent calls treat any
10776 doc/{bash.1,bashref.texi}
10777 - slight changes to the description of test
10778 - change \(bv to `|'; it seems that many `internationalized' versions
10779 of groff don't render that as a vertical bar. Fixes Debian bug
10785 - changed release status to 4.2-beta
10787 [bash-4.2-beta frozen]
10792 - change REDIRECTION_ERROR macro to accept a third argument: an
10793 additional file descriptor to close before returning and error (pass
10795 - change calls to REDIRECTION_ERROR to close appropriate file
10796 descriptors. Fixes bug reported by Andreas Schwab
10797 <schwab@linux-m68k.org>
10798 - make sure to close any file descriptors opened for REDIR_VARASSIGN
10799 before returning an error
10804 - move processing of unary `-' and `+' to exp1 from exp0 to avoid
10805 precedence problems. Fixes bug reported by <12bric@gmail.com>
10810 - fixed reversed arguments to wctomb. Reported by Andreas Schwab
10811 <schwab@linux-m68k.org>