]> git.ipfire.org Git - thirdparty/bash.git/blob - CWRU/changelog
Bash-4.4 patch 4
[thirdparty/bash.git] / CWRU / changelog
1 2/14/2011
2 ---------
3 [bash-4.2 released]
4
5 2/15
6 ----
7 lib/glob/gmisc.c
8 - fix wmatchlen and umatchlen to avoid going past the end of the
9 string on an incomplete bracket expression that ends with a
10 NUL. Partial fix for bug reported by Clark Wang <dearvoid@gmail.com>
11
12 2/16
13 ----
14 subst.h
15 - new string extract flag value: SX_WORD. Used when calling
16 extract_dollar_brace_string to skip over the word in
17 ${param op word} from parameter_brace_expand
18
19 subst.c
20 - change parameter_brace_expand to add SX_WORD to flags passed to
21 extract_dollar_brace_string
22 - change parameter_brace_expand to use SX_POSIXEXP for all non-posix
23 word expansion operators that treat single quotes as special, not
24 just % and #
25 - change extract_dollar_brace_string to initialize dolbrace_state to
26 DOLBRACE_WORD if SX_WORD flag supplied and we shouldn't use
27 DOLBRACE_QUOTE. Fixes bug reported by Juergen Daubert <jue@jue.li>
28
29 doc/{bash.1,bashref.texi}
30 - document the exact expansions here strings undergo
31
32 2/17
33 ----
34 lib/readline/vi_mode.c
35 - make sure that `dd', `cc', and `yy' call vidomove_dispatch from
36 rl_domove_read_callback. Fixes bug reported by Clark Wang
37 <dearvoid@gmail.com>
38
39 lib/readline/callback.c
40 - make sure _rl_internal_char_cleanup is called after the
41 vi-motion callbacks (rl_vi_domove_callback) in rl_callback_read_char.
42 Companion to above fix
43
44 doc/{bash.1,bashref.texi}
45 - make sure that the text describing the rhs of the == and =~
46 operators to [[ states that only the quoted portion of the pattern
47 is matched as a string
48
49 2/18
50 ----
51 lib/glob/gmisc.c
52 - better fix for umatchlen/wmatchlen: keep track of the number of
53 characters in a bracket expression as the value to increase
54 matchlen by if the bracket expression is not well-formed. Fixes
55 bug reported by Clark Wang <dearvoid@gmail.com>
56
57 subst.c
58 - change expand_string_for_rhs so that it sets the W_NOSPLIT2 flag
59 in the word flags. We will not perform word splitting or quote
60 removal on the result, so we do not want to add quoted nulls if
61 we see "" or ''. Fixes bug reported by Mike Frysinger
62 <vapier@gentoo.org>
63
64 2/19
65 ----
66 variables.c
67 - new function, int chkexport(name), checks whether variable NAME is
68 exported and remakes the export environment if necessary. Returns
69 1 if NAME is exported and 0 if not
70 - call chkexport(name) to get tzset to look at the right variable in
71 the environment when modifying TZ in sv_tz. Don't call tzset if
72 chkexport doesn't indicate that the variable is exported
73
74 variables.h
75 - new extern declaration for chkexport
76
77
78 {parse.y,builtins/printf.def}
79 - call sv_tz before calling localtime() when formatting time strings
80 in prompt strings or using printf. Fixes bug reported by
81 Dennis Williamson <dennistwilliamson@gmail.com>
82
83 execute_cmd.c
84 - modify fix of 2/9 to add casts when those variables are passed to
85 functions; some compilers throw errors instead of warnings. Report
86 and fix from Joachim Schmitz <jojo@schmitz-digital.de>
87
88 support/shobj-conf
89 - add a stanza for nsk on the Tandem from Joachim Schmitz
90 <jojo@schmitz-digital.de>
91
92 {shell,lib/readline/shell}.c
93 - Tandem systems should use getpwnam (getlogin()); for some reason
94 they don't do well with using getuid(). Fix from Joachim Schmitz
95 <jojo@schmitz-digital.de>
96
97 3/1
98 ---
99 variables.c
100 - make sure that the return value from find_variable is non-null
101 before trying to use it in chkexport. Fixes bug reported by
102 Evangelos Foutras <foutrelis@gmail.com>
103
104 3/3
105 ---
106 parse.y
107 - when adding $$ to the current token buffer in read_token_word(),
108 don't xmalloc a buffer for two characters and then strcpy it, just
109 copy the characters directly into the token buffer. Fix from
110 Michael Whitten <mfwitten@gmail.com>
111
112 execute_cmd.c
113 - fix expand_word_unsplit to add the W_NOSPLIT2 flag to the word to
114 be expanded, so "" doesn't add CTLNUL. Similar to fix of 2/18 to
115 expand_string_for_rhs. Fixes bug reported by Nathanael D. Noblet
116 <nathanael@gnat.ca> and Matthias Klose <doko@debian.org>
117
118 parse.y
119 - fix extended_glob case of read_token_word to allocate an extra
120 space in the buffer for the next character read after the extended
121 glob specification if it's a CTLESC or CTLNUL. Report and fix from
122 Michael Witten <mfwitten@gmail.com>
123 - fix shell expansions case of read_token_word to allocate an extra
124 space in the buffer for the next character read after the shell
125 expansion if it's a CTLESC or CTLNUL. Report and fix from
126 Michael Witten <mfwitten@gmail.com>
127 - TENTATIVE: fix read_token_word to reduce the amount of buffer space
128 required to hold the translated and double-quoted value of $"..."
129 strings. Report and fix from Michael Witten <mfwitten@gmail.com>
130 - change code around got_character and got_escaped_character labels to
131 make sure that we call RESIZE_MALLOCED_BUFFER before adding the
132 CTLESC before a CTLESC or CTLNUL, and before adding the character if
133 we're not adding a CTLESC. Report and fix from
134 Michael Witten <mfwitten@gmail.com>
135
136 subst.c
137 - new param flags value, PF_ASSIGNRHS, mirrors W_ASSIGNRHS, noting that
138 parameter expansion is on rhs of assignment statement. That inhibits
139 word splitting
140 - change param_expand to call string_list_dollar_at with quoted == 1
141 if PF_ASSIGNRHS is set, so it will quote IFS characters in the
142 positional parameter before separating them with the first char of
143 $IFS. This keeps the rhs from being split inappropriately. Fixes
144 bug reported by Andres Perera <andres.p@zoho.com>
145
146 3/4
147 ---
148 lib/readline/bind.c
149 - add a missing free of `names' in rl_function_dumper. Bug report
150 and fix from Michael Snyder <msnyder@vmware.com>
151
152 3/5
153 ---
154 lib/readline/rltty.c
155 - change rl_deprep_terminal so it uses fileno (stdin) for the tty fd
156 if rl_instream is not set, like rl_prep_terminal
157
158 3/6
159 ---
160 lib/readline/display.c
161 - fix rl_message to use a dynamically-allocated buffer instead of a
162 fixed-size buffer of 128 chars for the `local message prompt'. Bug
163 report and fix from Micah Cowan <micah@cowan.name>
164
165 3/7
166 ---
167 jobs.c
168 - add sentinel to wait_sigint_handler so it only sets wait_sigint_received
169 if waiting_for_child is non-zero; otherwise, it restores the old
170 SIGINT handler and sends itself the SIGINT
171 - set waiting_for_child around the calls to waitchld that use it to
172 synchronously wait for a process
173 - change logic that decides whether or not the child process blocked
174 or handled SIGINT based on whether or not waitpid returns -1/EINTR
175 and the shell receives a SIGINT and the child does not exit. If
176 the child later exits due to SIGINT, cancel the assumoption that it
177 was handled
178 - instead of testing whether or not the child exited due to SIGINT
179 when deciding whether the shell should act on a SIGINT it received
180 while waiting, test whether or not we think the child caught
181 SIGINT. If it did, we let it go (unless the shell has it trapped);
182 if it did not catch it, the shell acts on the SIGINT. Fix from
183 Linus Torvalds <torvalds@linux-foundation.org>, bug report originally
184 from Oleg Nesterov <oleg@redhat.com>
185
186 3/8
187 ---
188 shell.c
189 - initialize no_line_editing to 1 if READLINE is not defined -- we
190 can't have line editing without readline
191
192 3/12
193 ----
194 lib/readline/signals.c
195 - add SIGHUP to the set of signals readline handles
196
197 lib/readline/doc/rltech.texi
198 - document that SIGHUP is now part of the set of signals readline
199 handles
200
201 lib/readline/input.c
202 - if _rl_caught_signal indicates that read() was interrupted by a
203 SIGHUP or SIGTERM, return READERR or EOF as appropriate
204 - call rl_event_hook, if it's set, if call to read in rl_getc
205 returns -1/EINTR. If rl_event_hook doesn't do anything, this
206 continues the loop as before. This handles the other fatal
207 signals
208
209 execute_cmd.c
210 - add a couple of QUIT; calls to execute_disk_command and
211 execute_simple_command to improve responsiveness to interrupts
212 and fatal signals
213
214 input.c
215 - rearrange getc_with_restart so that the return values from read()
216 are handled right
217
218 parse.y
219 - don't need to set terminate_immediately in yy_stream_get, since
220 getc_with_restart checks for terminating signals itself
221 - since readline returns READERR on SIGHUP or SIGTERM, don't need
222 to set terminate_immediately. Still doesn't handle other
223 signals well -- will have to check that some more
224
225 bashline.c
226 - new function, bash_event_hook, for rl_event_hook. Just checks for
227 terminating signals and acts on them using CHECK_TERMSIG.
228 - set rl_event_hook to bash_event_hook
229
230 builtins/read.def
231 - take out setting terminate_immediately; add calls to CHECK_TERMSIG
232 after read calls
233
234 doc/{bash.1,bashref.texi}
235 - move the text describing the effect of negative subscripts used to
236 reference indexed array elements to the paragraphs describing
237 ${parameter[subscript]}, since that's where they are implemented.
238 Pointed out by Christopher F. A. Johnson <cfajohnson@gmail.com>
239
240 arrayfunc.[ch],subst.c
241 - array_expand_index now takes a new first argument: a SHELL_VAR *
242 of the array variable being subscripted. Can be used later to fully
243 implement negative subscripts
244
245 3/14
246 ----
247 lib/glob/glob.c
248 - fix mbskipname to not turn the directory entry name into a wide char
249 string if the conversion of the pattern to a wide char string fails
250 - fix mbskipname to call skipname if either the pattern or the filename
251 can't be converted into a wide-char string
252
253 lib/glob/xmbsrtowcs.c
254 - fix xdupmbstowcs2 to handle return value of 0 from mbsnrtowcs and
255 short-circuit with failure in that case. Fixes bug reported by
256 Roman Rakus <rrakus@redhat.com>
257
258 3/15
259 ----
260 bashline.c
261 - new variable, bash_filename_quote_characters to store the value
262 assigned to rl_filename_quote_characters so it can be restored
263 if changed.
264 - change bashline_reset and attempt_shell_completion to restore
265 rl_filename_quote_characters if not set to default
266
267 3/22
268 ----
269 lib/glob/glob.c
270 - wdequote_pathname falls back to udequote_pathname if xdupmbstowcs
271 fails to convert the pathname to a wide-character string
272
273 lib/glob/xmbsrtowcs.c
274 - xdupmbstowcs2: change to fix problem with leading '\\' (results in
275 nms == 0, which causes it to short-circuit with failure right
276 away). Fixes bug pointed out by Werner Fink <werner@suse.de>
277 - xdupmbstowcs2: compensate for mbsnrtowcs returning 0 by taking the
278 next single-byte character and going on
279 - xdupmbstowcs2: change memory allocation to increase by WSBUF_INC
280 bytes; try to avoid calls to realloc (even if they don't actually
281 result in more memory being allocated)
282
283 3/24
284 ----
285 doc/{bash.1,bashref.texi}
286 - slightly modify BASH_SUBSHELL description based on complaint from
287 Sam Liddicott <sam@liddicott.com>
288
289 3/25
290 ----
291 trap.c
292 - change free_trap_strings to not call free_trap_string for signals
293 that are being ignored, like reset_or_restore_signal_handlers.
294 Fixes bug reported by Satoshi Takahashi <blue3waters@gmail.com>
295
296 3/26
297 ----
298 lib/readline/rltypedefs.h
299 - remove old Function/VFunction/CPFunction/CPPFunction typedefs as
300 suggested by Tom Tromey <tromey@redhat.com>
301
302 lib/readline/rlstdc.h
303 - move defines for USE_VARARGS/PREFER_STDARG/PREFER_VARARGS from
304 config.h.in to here because declaration of rl_message in
305 readline.h uses the defines. This makes it hard for another packages
306 to use after the header files are installed, since config.h is not
307 one of the installed files. Suggested by Tom Tromey
308 <tromey@redhat.com>
309
310 3/27
311 ----
312 print_cmd.c
313 - change indirection_string from a static buffer to a dynamic one
314 managed by indirection_level_string(), so we don't end up truncating
315 PS4. Suggested by Dennis Williamson <dennistwilliamson@gmail.com>
316
317 lib/readline/shell.c
318 - change sh_set_lines_and_columns to use static buffers instead of
319 allocating the buffers to pass to setenv/putenv
320
321 lib/readline/terminal.c
322 - change _rl_get_screen_size to not call sh_set_lines_and_columns if
323 ignore_env == 0
324 - _rl_sigwinch_resize_terminal: new function to just retrieve terminal
325 size, ignoring environment
326
327 lib/readline/rlprivate.h
328 - new external declaration for _rl_sigwinch_resize_terminal() (currently
329 unused)
330
331 lib/readline/signals.c
332 - rl_sigwinch_handler: set _rl_caught_signal to SIGWINCH
333 - rl_sigwinch_handler: don't immediately call rl_resize_terminal; just
334 leave _rl_caught_signal set for RL_CHECK_SIGNALS to handle
335 - _rl_signal_handler: call rl_resize_terminal if sig == SIGWINCH.
336 Should fix hang when sending multiple repeated SIGWINCH reported by
337 Henning Bekel <h.bekel@googlemail.com>
338
339 3/29
340 ----
341 lib/sh/snprintf.c
342 - include math.h for any defines for isinf/isnan
343 - use code from gnulib documentation to implement isinf/isnan if they
344 are not defined
345
346 configure.in
347 - don't check for isinf or isnan; c99 says they're macros anyway
348
349 config.h.in
350 - remove defines for ISINF_IN_LIBC and ISNAN_IN_LIBC, no longer used
351 by snprintf.c
352
353 4/2
354 ---
355 braces.c
356 - brace_gobbler: fix to understand double-quoted command substitution,
357 since the shell understands unquoted comsubs. Fixes bug reported
358 by Michael Whitten <mfwitten@gmail.com>
359
360 lib/readline/display.c
361 - include <pc.h> on MDOS
362 - get and set screen size using DJGPP-specific calls on MSDOS
363 - move cursor up clear screen using DJGPP-specific calls
364 - don't call tputs on DJGPP; there is no good terminfo support
365
366 lib/readline/terminal.c
367 - include <pc.h> on MDOS
368 - get and set screen size using DJGPP-specific calls on MSDOS
369 - use DJGPP-specific initialization on MSDOS, zeroing all the
370 _rl_term_* variables
371 - don't call tputs on DJGPP; there is no good terminfo support
372 DJGPP support from Eli Zaretskii <eliz@gnu.org>
373
374 4/6
375 ---
376
377 config-top.h
378 - change DEFAULT_PATH_VALUE to something more useful and modern
379
380 4/8
381 ---
382 tests/printf2.sub
383 - make sure LC_ALL and LC_CTYPE are set so LANG assignment takes effect.
384 Reported by Cedric Arbogast <arbogast.cedric@gmail.com>
385
386 4/11
387 ----
388 include/chartypes.h
389 - fix a couple of dicey defines (though ones that don't cause any
390 compiler warnings) in IN_CTYPE_DOMAIN
391
392 doc/{bashref.texi,bash.1}
393 - add note referring to duplicating file descriptors in sections
394 describing redirecting stdout and stderr and appending to stdout
395 and stderr. Suggested by Matthew Dinger <mdinger.bugzilla@gmail.com>
396
397 pcomplete.c
398 - it_init_helptopics: new function to support completing on help topics,
399 not just builtins
400 - it_helptopics: new programmable completion list of help topics
401 - build list of helptopic completions in gen_action_completions on
402 demand
403
404 pcomplete.h
405 - new extern declaration for it_helptopics
406
407 builtins/complete.def
408 - the `helptopic' action now maps to CA_HELPTOPIC intead of CA_BUILTIN,
409 since there are more help topics than just builtins. Suggested by
410 Clark Wang <dearvoid@gmail.com>
411
412 4/12
413 ----
414 print_cmd.c
415 - fix print_arith_for_command to add a call to PRINT_DEFERRED_HEREDOCS
416 before ending the body of the command, so heredocs get attached to
417 the right command instead of to the loop. From gentoo bug 363371
418 http://bugs.gentoo.org/show_bug.cgi?id=363371
419
420 execute_cmd.c
421 - change coproc_pidchk to unset the appropriate shell variables when
422 the (currently single) known coproc pid terminates
423 - cleanup and new functions to fully support multiple coprocesses when
424 and if I decide to go there
425
426 4/13
427 ----
428 print_cmd.c
429 - fix print_group_command to add a call to PRINT_DEFERRED_HEREDOCS
430 after call to make_command_string_internal before printing closing
431 `}'
432 - fix make_command_string_internal to add a call to
433 PRINT_DEFERRED_HEREDOCS after recursive call to
434 make_command_string_internal in case cm_subshell before printing
435 closing `)'
436
437 4/14
438 ----
439 print_cmd.c
440 - change overlapping strcpy in named_function_string to memmove
441
442 sig.h
443 - UNBLOCK_SIGNAL: convenience define, same as UNBLOCK_CHILD, just
444 restores an old signal mask
445
446 trap.c
447 - set_signal: instead of setting the signal handler to SIG_IGN while
448 installing the new trap handler, block the signal and unblock it
449 after the new handler is installed. Fixes bug reported by Roman
450 Rakus <rrakus@redhat.com>
451
452 4/15
453 ----
454 doc/{bash.1,bashref.texi}
455 - make it clear that enabling monitor mode means that all jobs run in
456 separate process groups
457
458 4/18
459 ----
460 builtins/fc.def
461 - update fix of 4/15/2010 to not take saved_command_line_count into
462 account when stepping down the history list to make sure that
463 last_hist indexes something that is valid. Fixes bug reported by
464 <piuma@piumalab.org>
465
466 4/19
467 ----
468 builtins/fc.def
469 - fc_gethnum: make sure the calculation to decide the last history
470 entry is exactly the same as fc_builtin. Fixes bug uncovered by
471 fix of 4/18 to stop seg fault
472
473 4/22
474 ----
475 lib/readline/terminal.c
476 - change _rl_enable_meta_key to set a flag indicating that it sent the
477 enable-meta sequence
478 - _rl_disable_meta_key: new function to turn off meta mode after we
479 turned it on with _rl_enable_meta_key
480
481 lib/readline/rlprivate.h
482 - extern declaration for _rl_disable_meta_key
483
484 configure.in
485 - if not cross-compiling, set CFLAGS_FOR_BUILD from any CFLAGS inherited
486 from the environment. Fixes HP/UX build problem reported by
487 "Daniel Richard G." <skunk@iSKUNK.ORG>
488
489 4/26
490 ----
491 config-top.h
492 - define MULTIPLE_COPROCS to 0 so the code is still disabled but easy
493 to enable via configure option or editing this file
494
495 4/29
496 ----
497 lib/sh/eaccess.c
498 - freebsd provides faccessat, with the same misfeature as their eaccess
499 and access implementations (X_OK returns true for uid==0 regardless
500 of the actual file permissions), so reorganize code to check the
501 file permissions as with eaccess. Report and fix from Johan Hattne
502 <johan.hattne@utsouthwestern.edu>
503
504 5/2
505 ---
506 doc/{bash.1,bashref.texi}
507 - add forward reference to `Pattern Matching' from `Pathname
508 Expansion', suggested by Greg Wooledge <wooledg@eeg.ccf.org>
509
510 5/5
511 ---
512 pcomplib.c
513 - the bash_completion project now distributes over 200 completions
514 for various programs, with no end in sight, so increase the value
515 of COMPLETE_HASH_BUCKETS from 32 to 128
516
517 pathexp.c
518 - quote_string_for_globbing: make sure CTLESC quoting CTLESC is
519 translated into \<CTLESC> even if the flags include QGLOB_REGEXP.
520 We don't want to process the second CTLESC as a quote character.
521 Fixes bug reported by Shawn Bohrer <sbohrer@rgmadvisors.com>
522
523 5/6
524 ---
525 builtins/printf.def
526 - change PRETURN to not call fflush if ferror(stdout) is true
527 - if a call to one of the stdio functions or printstr leaves
528 ferror(stdout) true, and PRETURN is going to be called, let PRETURN
529 print the error message rather than doubling up the messages. Fixes
530 problem reported by Roman Rakus <rrakus@redhat.com>
531
532 5/9
533 ---
534 doc/{bash.1,bashref.texi}
535 - add note to the effect that lists inside compound command can be
536 terminated by newlines as well as semicolons. Suggested by
537 Roman Byshko <rbyshko@gmail.com>
538
539 5/10
540 ----
541 subst.c
542 - remove_quoted_nulls: fix problem that caused it to skip over the
543 character after a CTLNUL, which had the effect of skipping every
544 other of a series of CTLNULs. Fixes bug reported by
545 Marten Wikstrom <marten.wikstrom@keystream.se>
546
547 5/11
548 ----
549 subst.c
550 - extract_process_subst: add SX_COMMAND flag to call to
551 extract_delimited_string, since we're expanding the same sort of
552 command as command substitution. Fixes bug reported in Ubuntu
553 bug 779848
554
555 5/12
556 ----
557 configure.in
558 - set the prefer_shared and prefer_static variables appropriately
559 depending on the value of $opt_static_link
560
561 aclocal.m4
562 - AC_LIB_LINKFLAGS_BODY: change to not prefer shared versions of the
563 libraries it's searching for if the prefer_shared variable is "no".
564 Fixes problem reported by Cedric Arbogast <arbogast.cedric@gmail.com>
565
566 5/13
567 ----
568 lib/readline/readline.c
569 - _rl_internal_teardown: add call to _rl_disable_meta_key to make the
570 meta key active only for the duration of the call to readline()
571 - _rl_internal_setup: move call to _rl_enable_meta_key here from
572 readline_initialize_everything so the meta key is active only for
573 the duration of the call to readline(). Suggestion from Miroslav
574 Lichvar <mlichvar@redhat.com>
575
576 builtins/help.def
577 - help_builtin: change strncmp to strcmp so that `help read' no longer
578 matches `readonly'. Suggested by Clark Wang <dearvoid@gmail.com>
579
580 config.h.in
581 - add define for GLIBC21, checked using jm_GLIBC21 as part of the tests
582 for libintl
583
584 lib/malloc/malloc.c
585 - internal_free: don't use the cached value of memtop when deciding
586 whether or not to adjust the break and give memory back to the kernel
587 when using the GNU C library, since glibc uses sbrk for its own
588 internal purposes. From Debian bug 614815, reported by Samuel
589 Thibault <samuel.thibault@gnu.org>
590
591 aclocal.m4
592 - BASH_STRUCT_WEXITSTATUS_OFFSET: change AC_RUN_IFELSE to AC_TRY_RUN
593 to avoid warning about not using AC_LANG_SOURCE
594
595 5/14
596 ----
597 bashline.[ch]
598 - two new functions, bashline_set_event_hook and bashline_reset_event_hook,
599 to set rl_event_hook to bash_event_hook and back to NULL, respectively
600 - don't set rl_event_hook unconditionally
601
602 sig.c
603 - termsig_sighandler: if the shell is currently interactive and
604 readline is active, call bashline_set_event_hook to cause
605 termsig_handler to be called via bash_event_hook when the shell
606 returns from the signal handler
607
608 5/15
609 ----
610 lib/readline/display.c
611 - _rl_col_width: Mac OS X has a bug in wcwidth: it does not return 0
612 for UTF-8 combining characters. Added workaround dependent on
613 MACOSX. Fixes problem pointed out by Thomas De Contes
614 <d.l.tDecontes@free.fr>
615
616 5/16
617 ----
618 lib/readline/rlmbutil.h
619 - WCWIDTH: wrapper for wcwidth that returns 0 for Unicode combining
620 characters on systems where wcwidth is broken (e.g., Mac OS X).
621
622 lib/readline/{complete,display,mbutil}.c
623 - use WCWIDTH instead of wcwidth
624
625 5/17
626 ----
627 lib/readline/display.c
628 - update_line: after computing ofd and nfd, see whether the next
629 character in ofd is a zero-width combining character. If it is,
630 back ofd and nfd up one, so the base characters no longer compare
631 as equivalent. Fixes problem reported by Keith Winstein
632 <keithw@mit.edu>
633
634 lib/readline/nls.c
635 - _rl_utf8locale: new flag variable, set to non-zero if the current
636 locale is UTF-8
637 - utf8locale(): new function, returns 1 if the passed lspec (or the
638 current locale) indicates that the locale is UTF-8. Called from
639 _rl_init_eightbit
640
641 lib/readline/rlprivate.h
642 - extern declaration for _rl_utf8locale
643
644 locale.c
645 - locale_utf8locale: new flag variable, set to non-zero if the current
646 locale is UTF-8 (currently unused)
647 - locale_isutf8(): new function, returns 1 if the passed lspec (or the
648 current locale) indicates that the locale is UTF-8. Should be called
649 whenever the locale or LC_CTYPE value is modified
650
651 aclocal.m4
652 - BASH_WCWIDTH_BROKEN: new test for whether or not wcwidth returns
653 zero-width characters like unicode combining characters as having
654 display length 1; define WCWIDTH_BROKEN in this case
655
656 config.h.in
657 - WCWIDTH_BROKEN: new define
658
659 lib/readline/rlmbutil.h
660 - change WCWIDTH macro to use _rl_utf8locale and the full range of
661 Unicode combining characters (U+0300-U+036F)
662
663 5/19
664 ----
665 lib/readline/rlprivate.h
666 - _rl_search_context: new member, prevc, will hold character read
667 prior to lastc
668
669 lib/readline/isearch.c
670 - _rl_isearch_dispatch: if the character causes us to index into
671 another keymap, save that character in cxt->prevc
672 - _rl_isearch_dispatch: if we index into another keymap, but don't
673 find a function that's special to i-search, and the character that
674 caused us to index into that keymap would have terminated the
675 search, push back cxt->prevc and cxt->lastc to make it appear as
676 if `prevc' terminated the search, and execute lastc as a command.
677 We have to push prevc back so we index into the same keymap before
678 we read lastc. Fixes bug report from Davor Cubranic
679 <cubranic@stat.ubc.ca>
680
681 5/20
682 ----
683 expr.c
684 - expr_bind_variable: pay attention to the return value from
685 bind_variable and check whether or not we should error out due to
686 a readonly or noassign variable. Fixes bug reported by Eric
687 Blake <eblake@redhat.com>
688
689 5/26
690 ----
691
692 lib/readline/search.c
693 - include histlib.h for ANCHORED_SEARCH defines
694 - rl_history_search_flags: new variable, holds ANCHORED_SEARCH flag for
695 the duration of a history search
696 - rl_history_search_reinit: takes a new flags variable, defines whether
697 or not the search is anchored; assigned to rl_history_search_flags
698 - rl_history_serarch_reinit: if ANCHORED_SEARCH flag passed, add ^ to
699 beginning of search string; otherwise search string is unmodified
700 - rl_history_search_internal: set rl_point appropriately based on
701 whether or not rl_history_search_flags includes ANCHORED_SEARCH
702 - rl_history_substr_search_forward: new function, for non-anchored
703 substring search forward through history for string of characters
704 preceding rl_point
705 - rl_history_substr_search_backward: new function, for non-anchored
706 substring search backward through history for string of characters
707 preceding rl_point. Original code from Niraj Kulkarni
708 <kulkarniniraj14@gmail.com>
709
710 lib/readline/readline.h
711 - extern declarations for rl_history_substr_search_{for,back}ward
712
713 lib/readline/funmap.c
714 - history-substring-search-forward: new bindable command, invokes
715 rl_history_substr_search_forward
716 - history-substring-search-backward: new bindable command, invokes
717 rl_history_substr_search_backward
718
719 lib/readline/doc/{rluser.texi,readline.3}
720 - document history-substring-search-forward and
721 history-substring-search-backward
722
723 5/27
724 ----
725 {nojobs,jobs}.c
726 - add support for DONT_REPORT_SIGTERM so that the shell doesn't print
727 a message when a job exits due to SIGTERM since that's the default
728 signal sent by the kill builtin. Suggested by Marc Herbert
729 <mark.herbert@gmail.com>
730
731 config-top.h
732 - DONT_REPORT_SIGTERM: new user-modifiable setting. Commented out
733 by default
734
735 5/28
736 ----
737 lib/readline/bind.c
738 - _rl_skip_to_delim: skip to a closing double quote or other delimiter,
739 allowing backslash to quote any character, including the delimiter
740 - rl_parse_and_bind: call _rl_skip_to_delim instead of using inline
741 code
742 - rl_parse_and_bind: allow quoted strings as the values of string
743 variables. Variable values without double quotes have trailing
744 whitespace removed (which still allows embedded whitespace, for
745 better or worse). Fixes problem with string variables not matching
746 in `set' command if values happen to have trailing spaces or tabs
747 (debian bash bug #602762), but introduces slight incompatibility.
748
749 5/29
750 ----
751 doc/{bash.1,bashref.texi}
752 - clarify unset description to specify that without options, a
753 variable, then a shell function if there is no variable by that
754 name, is unset. Fixes discrepancy reported by Mu Qiao
755 <qiaomuf@gentoo.org>
756
757 6/4
758 ----
759 doc/{bash.1,bashref.texi}
760 - clarify description of LINES and COLUMNS (and checkwinsize shopt
761 option) to make it clear that only interactive shells set a
762 handler for SIGWINCH and update LINES and COLUMNS. Original
763 report submitted by Jonathan Nieder <jrnieder@gmail.com>
764
765 arrayfunc.c
766 - expand_compound_array_assignment: defer expansion of words between
767 parens when performing compound assignmnt to an associative array
768 variable
769 - assign_compound_array_list: perform the same expansions when doing
770 a compound array assignment to an associative array variable as
771 when doing a straight array index assignment. The idea is that
772 foo=( [ind1]=bar [ind2]=quux)
773 is the same as
774 foo[ind1]=bar ; foo[ind2]=quux
775
776 This fixes problems with double-expansion and quote removal being
777 performed on the array indices
778
779 6/13
780 ----
781 doc/{bash.1,bashref.texi}
782 - Add a little text to make it clear that the locale determines how
783 range expressions in glob patterns are handled.
784
785
786 6/21
787 ----
788 builtins/read.def
789 - display a message and return error status if -a is used with an
790 existing associative array. Fixes bug reported by Curtis Doty
791 <curtis@greenkey.net>
792
793 6/24
794 ----
795 {jobs,nojobs}.c
796 - non-interactive shells now react to the setting of checkwinsize
797 and set LINES and COLUMNS after a foreground job exits. From a
798 suggestion by Leslie Rhorer <lrhorer@satx.rr.com>
799
800 doc/{bash.1,bashref.texi}
801 - checkwinsize: remove language saying that only interactive shells
802 check the window size after each command
803
804 lib/readline/histfile.c
805 - history_backupfile: new file, creates a backup history file name
806 given a filename (appending `-')
807 - history_do_write: when overwriting the history file, back it up
808 before writing. Restore backup file on a write error. Suggested
809 by chkno@chkno.net
810
811 bashline.c
812 - find_cmd_name: two new arguments, return the start and end of the
813 actual text string used to find the command name, without taking
814 whitespace into account
815 - attempt_shell_completion: small changes to make sure that completion
816 attempted at the beginning of a non-empty line does not find a
817 programmable completion, even if the command name starts at point
818 - attempt_shell_completion: small change to make sure that completion
819 does not find a progcomp when in whitespace before the command
820 name
821 - attempt_shell_completion: small change to make sure that completion
822 does not find a progcomp when point is at the first character of a
823 command name, even when there is leading whitespace (similar to
824 above). Fixes problems noted by Ville Skytta <ville.skytta@iki.fi>
825
826 subst.c
827 - brace_expand_word_list: since the individual strings in the strvec
828 returned by brace_expand are already allocated, don't copy them to
829 newly-allocated memory when building the WORD_LIST, just use them
830 intact
831
832 locale.c
833 - locale_mb_cur_max: cache value of MB_CUR_MAX when we set or change
834 the locale to avoid a function call every time we need to read it
835
836 shell.h
837 - new struct to save shell_input_line and associated variables:
838 shell_input_line_state_t
839 - add members of sh_parser_state_t to save and restore token and the
840 size of the token buffer
841
842 parse.y
843 - {save,restore}_input_line_state: new functions to save and restore
844 shell_input_line and associated variables
845 - {save,restore}_parser_state: add code to save and restore the token
846 and token buffer size
847 - xparse_dolparen: call save_ and restore_input_line_state to avoid
848 problems with overwriting shell_input_line when we recursively
849 call the parser to parse a command substitution. Fixes bug
850 reported by Rui Santos <rsantos@grupopie.com>
851
852 include/shmbutil.h
853 - use locale_mb_cur_max instead of MB_CUR_MAX in ADVANCE_CHAR and
854 similar macros
855
856 lib/glob/smatch.c
857 - rangecmp,rangecmp_wc: change to take an additional argument, which
858 forces the use of strcoll/wscoll when non-zero. If it's 0, a new
859 variable `glob_asciirange' controls whether or not we use strcoll/
860 wscoll. If glob_asciirange is non-zero, we use straight
861 C-locale-like ordering. Suggested by Aharon Robbins
862 <arnold@skeeve.com>
863
864 6/30
865 ----
866 execute_cmd.c
867 - execute_pipeline: make sure the lastpipe code is protected by
868 #ifdef JOB_CONTROL. Fixes problem reported by Thomas Cort
869 <tcort@minix3.org>
870
871 7/2
872 ---
873 lib/readline/complete.c
874 - EXPERIMENTAL: remove setting of _rl_interrupt_immediately around
875 completion functions that touch the file system. Idea from Jan
876 Kratochvil <jan.ktratochvil@redhat.com> and the GDB development
877 team
878
879 lib/readline/signals.c
880 - rl_signal_handler: if we're in callback mode, don't interrupt
881 immediately on a SIGWINCH
882
883 7/3
884 ---
885 bashline.c
886 - set_directory_hook: and its siblings are a new set of functions to
887 set, save, and restore the appropriate directory completion hook
888 - change callers to use {set,save,restore}_directory_hook instead of
889 manipulating rl_directory_rewrite_hook directly
890 - dircomplete_expand: new variable, defaults to 0, if non-zero causes
891 directory names to be word-expanded during word and filename
892 completion
893 - change {set,save,restore}_directory_hook to look at dircomplete_expand
894 and change rl_directory_completion_hook or rl_directory_rewrite_hook
895 appropriately
896
897 bashline.h
898 - extern declaration for set_directory_hook so shopt code can use it
899
900 7/6
901 ---
902 builtins/shopt.def
903 - globasciiranges: new settable shopt option, makes glob ranges act
904 as if in the C locale (so b no longer comes between A and B).
905 Suggested by Aharon Robbins <arnold@skeeve.com>
906
907 7/7
908 ---
909 doc/{bash.1,bashref.texi}
910 - document new `globasciiranges' shopt option
911
912 7/8
913 ---
914 builtins/shopt.def
915 - direxpand: new settable option, makes filename completion expand
916 variables in directory names like bash-4.1 did.
917 - shopt_set_complete_direxpand: new function, does the work for the
918 above by calling set_directory_hook
919
920 doc/{bash.1,bashref.texi}
921 - document new `direxpand' shopt option
922
923 7/15
924 ----
925 lib/readline/isearch.c
926 - _rl_isearch_dispatch: when adding character to search string, use
927 cxt->lastc (which we use in the switch statement) instead of c,
928 since lastc can be modified earlier in the function
929
930 7/18
931 ----
932 lib/readline/rlprivate.h
933 - _rl_search_context: add another member to save previous value of
934 (multibyte) lastc: pmb is to mb as prevc is to lastc
935
936 lib/readline/isearch.c:
937 - _rl_isearch_dispatch: if a key sequence indexes into a new keymap,
938 but doesn't find any bound function (k[ind].function == 0) or is
939 bound to self-insert (k[ind].function == rl_insert), back up and
940 insert the previous character (the one that caused the index into a
941 new keymap) and arrange things so the current character is the next
942 one read, so both of them end up in the search string. Fixes bug
943 reported by Clark Wang <dearvoid@gmail.com>
944 - _rl_isearch_dispatch: a couple of efficiency improvements when adding
945 characters to the isearch string
946
947 7/24
948 ----
949 lib/readline/isearch.c
950 - _rl_isearch_dispatch: save and restore cxt->mb and cxt->pmb
951 appropriately when in a multibyte locale
952
953 doc/{bash.1,bashref.texi}
954 - correct description of {x}>file (and other redirection operators
955 that allocate a file descriptor) to note the the fd range is
956 greater than or equal to 10. Fixes problem reported by
957 Christian Ullrich
958
959 lib/readline/signals.c
960 - rl_signal_handler: don't interrupt immediately if in callback mode
961
962 lib/readline/callback.c
963 - rl_callback_read_char: install signal handlers only when readline
964 has control in callback mode, so readline's signal handlers aren't
965 called when the application is active (e.g., between the calls to
966 rl_callback_handler_install and rl_callback_read_char). If the
967 readline signal handlers only set a flag, which the application
968 doesn't know about, the signals will effectively be ignored until
969 the next time the application calls into the readline callback
970 interface. Fixes problem of calling unsafe functions from signal
971 handlers when in callback mode reported by Jan Kratochvil
972 <jan.kratochvil@redhat.com>
973
974 execute_cmd.c
975 - fix_assignment_words: when in Posix mode, the `command' builtin
976 doesn't change whether or not the command name it protects is an
977 assignment builtin. One or more instances of `command'
978 preceding `export', for instance, doesn't make `export' treat its
979 assignment statement arguments differently. Posix interpretation
980 #351
981
982 doc/{bash.1,bashref.texi}
983 - document new Posix-mode behavior of `command' when preceding builtins
984 that take assignment statements as arguments
985
986 builtins/printf.def
987 - printstr: if fieldwidth or precision are < 0 or > INT_MAX when
988 supplied explicitly (since we take care of the `-' separately),
989 clamp at INT_MAX like when using getint(). Fixes issue reported
990 by Ralph Coredroy <ralph@inputplus.co.uk>
991
992 7/25
993 ----
994 lib/readline/chardefs.h
995 - isxdigit: don't define if compiling with c++; declared as a c++
996 template function. Fixes bug reported by Miroslav Lichvar
997 <mlichvar@redhat.com>
998
999 builtins/printf.def
1000 - getint: if garglist == 0, return whatever getintmax returns (0).
1001 Fixes bug reported by Ralph Coredroy <ralph@inputplus.co.uk>
1002
1003 7/28
1004 ----
1005 doc/{bash.1,bashref.texi}
1006 - minor changes to the descriptions of the cd and pushd builtins
1007
1008 lib/sh/zread.c
1009 - zsyncfd: change variable holding return value from lseek to
1010 off_t. Bug report and fix from Gregory Margo <gmargo@pacbell.net>
1011
1012 8/1
1013 ---
1014 expr.c
1015 - don't check for division by 0 when in a context where no evaluation
1016 is taking place. Fixes bug reported by dnade.ext@orange-ftgroup.com
1017
1018 8/6
1019 ---
1020 execute_cmd.c
1021 - execute_command_internal: the parent branch of the subshell code
1022 (where the child calls execute_in_subshell) should not close all
1023 open FIFOs with unlink_fifo_list if it's part of a shell function
1024 that's still executing. Fixes bug reported by Maarten Billemont
1025 <lhunath@lyndir.com>
1026
1027 8/9
1028 ---
1029 builtins/common.c
1030 - get_exitstat: return EX_BADUSAGE (2) on a non-numeric argument
1031
1032 builtins/return.def
1033 - return_builtin: just call get_exitstat to get the return status,
1034 let it handle proper parsing and handling of arguments. Fixes
1035 issue most recently raised by Linda Walsh <bash@tlinx.org>.
1036 Reverses change from 9/11/2008 (see above)
1037
1038 8/16
1039 ----
1040 doc/{bash.1,bashref.texi}
1041 - clean up `set -e' language to make it clearer that any failure of
1042 a compound command will cause the shell to exit, not just subshells
1043 and brace commands
1044
1045 8/17
1046 ----
1047 configure.in
1048 - make the various XXX_FOR_BUILD variables `precious' to autoconf to
1049 avoid stale data
1050 - change how CC_FOR_BUILD is initialized when cross-compiling and not,
1051 but do not change behavior
1052 - initialize CFLAGS_FOR_BUILD to -g when cross-compiling
1053 - initialize LIBS_FOR_BUILD to $(LIBS) when not cross-compiling, empty
1054 when cross-compiling
1055 - create AUTO_CFLAGS variable to hold basic CFLAGS defaults; used when
1056 CFLAGS not inherited from environment (like effect of old
1057 auto_cflags variable)
1058 - substitute LIBS_FOR_BUILD into output Makefiles
1059 [changes inspired by bug report from Nathan Phillip Brink
1060 <ohnobinki@ohnopublishing.net> -- gentoo bug 378941]
1061
1062 builtins/Makefile.in
1063 - substitute LIBS_FOR_BUILD from configure, not strictly initialized
1064 to $(LIBS)
1065
1066 8/27
1067 ----
1068 doc/{bash.1,bashref.texi}
1069 - minor changes to the here string description to clarify the
1070 expansions performed on the word
1071
1072 support/shobj-conf
1073 - handle compilation on Lion (Mac OS X 10.7/darwin11) with changes
1074 to darwin stanzas. Fixes readline bug reported by Vincent
1075 Sheffer <vince.sheffer@apisphere.com>
1076
1077 lib/sh/strtrans.c
1078 - ansic_wshouldquote: check a string with multi-byte characters for
1079 characters that needs to be backslash-octal escaped for $'...'
1080 - ansic_shouldquote: if is_basic fails for one character, let
1081 ansic_wshouldquote examine the rest of the string and return what
1082 it returns. From a patch sent by Roman Rakus <rrakus@redhat.com>
1083
1084 8/30
1085 ----
1086 lib/sh/strtrans.c
1087 - ansic_quote: changes to quote (or not) multibyte characters. New
1088 code converts them to wide characters and uses iswprint to check
1089 valid wide chars. From a patch sent by Roman Rakus
1090 <rrakus@redhat.com>
1091
1092 9/7
1093 ---
1094 lib/sh/shquote.c
1095 - sh_backslash_quote: change to be table-driven so we can use a
1096 different table if we want to
1097 - sh_backslash_quote: takes a second char table[256] argument;
1098
1099 externs.h
1100 - sh_backslash_quote: add second argument to function prototype
1101
1102 bashline.c,braces.c,parse.y,builtins/printf.def
1103 - change callers of sh_backslash_quote to add second argument
1104
1105 bashline.c
1106 - filename_bstab: table of characters to pass to sh_backslash_quote;
1107 characters with value 1 will be backslash-quoted
1108 - set_filename_bstab: turn on characters in filename backslash-quote
1109 table according to passed string argument
1110 - call set_filename_bstab every time rl_filename_quote_characters is
1111 assigned a value
1112 - bash_quote_filename: call sh_backslash_quote with filename_bstab
1113 as second argument. This allows other characters in filenames to
1114 be quoted without quoting, for instance, a dollar sign in a shell
1115 variable reference
1116
1117 9/8
1118 ---
1119 bashline.c
1120 - complete_fullquote: new variable, controls table passed to
1121 sh_backslash_quote. If non-zero (the default), the standard set
1122 of shell metacharacters -- as in bash versions up to and including
1123 bash-4.2 -- gets backslash-quoted by the completion code. If zero,
1124 sh_backslash_quote gets the table with the characters in the
1125 variable reference removed, which means they are removed from the
1126 set of characters to be quoted in filenames
1127
1128 9/10
1129 ----
1130 bashline.c
1131 - bash_filename_stat_hook: new function, designed to expand variable
1132 references in filenames before readline passes them to stat(2)
1133 to determine whether or not they are a directory
1134
1135 9/15
1136 ----
1137 builtins/declare.def
1138 - if assign_array_element fails due to a bad (or empty) subscript, mark
1139 it as an assignment error and don't attempt any further processing
1140 of that declaration. Fixes segfault bug reported by Diego Augusto
1141 Molina <diegoaugustomolina@gmail.com>
1142
1143 9/19
1144 ----
1145 expr.c
1146 - exppower: replace the simple exponentiation algorithm with an
1147 implementation of exponentiation by squaring. Inspired by report
1148 from Nicolas ARGYROU <nargy@yahoo.com>
1149
1150 bashline.c
1151 - bash_quote_filename: check for rtext being non-null before
1152 dereferencing it
1153 - set_saved_history: operate_and_get_next assumes that the previous
1154 line was added to the history, even when the history is stifled and
1155 at the max number of entries. If it wasn't, make sure the history
1156 number is incremented properly. Partial fix for bug reported by
1157 gregrwm <backuppc-users@whitleymott.net>
1158
1159 doc/{bash.1,bashref.texi},lib/readline/doc/{hsuser,rluser}.texi
1160 - minor editorial changes inspired by suggestions from
1161 Roger Zauner <rogerx.oss@gmail.com>
1162
1163 9/20
1164 ----
1165 lib/intl/localealias.c
1166 - read_alias_file: close resource leak (fp) when returning on error
1167
1168 9/22
1169 ----
1170 execute_command.c
1171 - execute_intern_function: implement Posix interpretation 383 by making
1172 it an error to define a function with the same name as a special
1173 builtin when in Posix mode.
1174 http://austingroupbugs.net/view.php?id=383#c692
1175
1176 9/25
1177 ----
1178 doc/{bash.1,bashref.texi}
1179 - formatting and some content changes from Benno Schulenberg
1180 <bensberg@justemail.net>
1181 - document new posix-mode behavior from interp 383 change of 9/22
1182
1183 9/30
1184 ----
1185 execute_cmd.c
1186 - shell_execve: add strerror to error message about executable file
1187 that shell can't execute as a shell script. From suggestion by
1188 daysleeper <daysleeper@centrum.cz>
1189
1190 10/1
1191 ----
1192 bashhist.c
1193 - maybe_add_history: act as if literal_history is set when parser_state
1194 includes PST_HEREDOC, so we save the bodies of here-documents just
1195 as they were entered. Fixes bug reported by Jonathan Wakely
1196 <bugs@kayari.org>
1197 - bash_add_history: make sure that the second and subsequent lines of
1198 a here document don't have extra newlines or other delimiting
1199 chars added, since they have the trailing newline preserved, when
1200 `lithist' is set and history_delimiting_chars isn't called
1201
1202 execute_cmd.c
1203 - execute_command_internal: avoid fd exhaustion caused by using
1204 process substitution in loops inside shell functions by using
1205 copy_fifo_list and close_new_fifos (). Fixes debian bash bug
1206 642504
1207
1208 lib/readline/complete.c
1209 - new variable, rl_filename_stat_hook, used by append_to_match. If
1210 filename completion is desired, and rl_filename_stat_hook points
1211 to a function, call that function to expand the filename in an
1212 application-specific way before calling stat.
1213
1214 bashline.c
1215 - bash_default_completion: if variable completion returns a single
1216 match, use bash_filename_stat_hook and file_isdir to determine
1217 whether or not the variable name expands to a directory. If it
1218 does, set the filename_append_character to `/'. This is not
1219 perfect, so we will see how it works out. Adds functionality
1220 requested by Peter Toft <pto@linuxbog.dk> and Patrick Pfeifer
1221 <patrick@pfeifer.de>
1222 - rl_filename_stat_hook: assigned bash_filename_stat_hook, so things
1223 like $HOME/Downloads (after completion) have a slash appended.
1224 In general, this causes the stat hook to be called whenever
1225 filename completion is appended. Adds functionality requested by
1226 Patrick Pfeifer <patrick@pfeifer.de>
1227
1228 lib/readline/readline.h
1229 - new extern declaration for rl_filename_stat_hook
1230
1231 lib/readline/doc/rltech.texi
1232 - rl_directory_rewrite_hook: now documented
1233 - rl_filename_stat_hook: document
1234
1235 pcomplete.c
1236 - gen_action_completions: in the CA_DIRECTORY case, turn off
1237 rl_filename_completion_desired if it was off before we called
1238 rl_filename_completion_function and we didn't get any matches.
1239 Having it on causes readline to quote the matches as if they
1240 were filenames. Adds functionality requested by many,
1241 including Clark Wang <dearvoid@gmail.com>
1242
1243 assoc.[ch]
1244 - assoc_replace: new function, takes the same arguments as
1245 assoc_insert, but returns the old data instead of freeing it
1246 - assoc_insert: if the object returned by hash_insert doesn't have
1247 the same value for its key as the key passed as an argument, we
1248 are overwriting an existing value. In this case, we can free the
1249 key. Fixes bug reported by David Parks <davidparks21@yahoo.com>
1250
1251 10/5
1252 ----
1253 print_cmd.c
1254 - indirection_level_string: small change to only re-enable `x'
1255 option after calling decode_prompt_string if it was on before. In
1256 normal mode, it will be, but John Reiser <jreiser@bitwagon.com>
1257 has a novel use for that code in conjunction with a pre-loaded
1258 shared library that traces system call usage in shell scripts
1259
1260 10/10
1261 -----
1262 Makefile.in
1263 - Fix from Mike Frysinger <vapier@gentoo.org> to avoid trying to
1264 build y.tab.c and y.tab.h with two separate runs of yacc if
1265 parse.y changes. Problem with parallel makes
1266 - Fix from Mike Frysinger <vapier@gentoo.org> to avoid subdirectory
1267 builds each trying to make version.h (and all its dependencies)
1268
1269 lib/sh/Makefile.in
1270 - remove some dependencies on version.h where it doesn't make sense
1271
1272 variables.c
1273 - initialize_shell_variables: while reading the environment, a shell
1274 running in posix mode now checks for SHELLOPTS being readonly (it
1275 gets set early on in main()) before trying to assign to it. It
1276 saves an error message and the variable gets parsed as it should.
1277 Fixes bug reported by Len Giambrone <Len.Giambrone@intersystems.com>
1278
1279 10/14
1280 -----
1281 doc/{bash.1,bashref.texi}
1282 - add to the "duplicating file descriptors" description that >&word
1283 doesn't redirect stdout and stderr if word expands to `-'
1284 - add to the "appending standard output and standard error"
1285 description a note that >&word, where word is a number or `-',
1286 causes other redirection operators to apply for sh and Posix
1287 compatibility reasons. Suggested by Greg Wooledge
1288 <wooledg@eeg.ccf.org>
1289
1290 10/15
1291 -----
1292 pcomplete.c
1293 - change pcomp_filename_completion_function to only run the filename
1294 dequoting function in the cases (as best as it can figure) where
1295 readline won't do it via rl_filename_completion_function. Based
1296 on reports from <lolilolicon@gmail.com>
1297
1298 10/19
1299 -----
1300 bashline.c
1301 - attempt_shell_completion: add call to set_directory_hook() to make
1302 sure the rewrite functions are correct. It's cheap and doesn't
1303 hurt
1304 - command_word_completion_function: if completing a command name that
1305 starts with `.' or `..', temporarily suppress the effects of the
1306 `direxpand' option and restore the correct value after calling
1307 rl_filename_completion_function. If it's enabled, the directory
1308 name will be rewritten and no longer match `./' or `../'. Fixes
1309 problem reported by Michael Kalisz <michael@kalisz.homelinux.net>
1310
1311 10/22
1312 -----
1313 builtins/history.def
1314 - push_history: make sure remember_on_history is enabled before we
1315 try to delete the last history entry -- the `history -s' command
1316 might not have been saved. Fixes bug reported by
1317 lester@vmw-les.eng.vmware.com
1318
1319 lib/readline/complete.c
1320 - rl_callback_read_char: add calls to a macro CALLBACK_READ_RETURN
1321 instead of straight return; add same call at end of function.
1322 Placeholder for future work in deinstalling signal handlers when
1323 readline is not active
1324
1325 10/25
1326 -----
1327 expr.c
1328 - exp2: catch arithmetic overflow when val1 == INTMAX_MIN and val2 == -1
1329 for DIV and MOD and avoid SIGFPE. Bug report and pointer to fix
1330 from Jaak Ristioja <jaak.ristioja@cyber.ee>
1331 - expassign: same changes for arithmetic overflow for DIV and MOD
1332
1333 10/28
1334 -----
1335 subst.c
1336 - parameter_brace_expand: allow pattern substitution when there is an
1337 expansion of the form ${var/} as a no-op: replacing nothing with
1338 nothing
1339 - parameter_brace_patsub: don't need to check for PATSUB being NULL;
1340 it never is
1341
1342 flags.c
1343 - if STRICT_POSIX is defined, initialize history_expansion to 0, since
1344 history expansion (and its treatment of ! within double quotes) is
1345 not a conforming posix environment. From austin-group issue 500
1346
1347 lib/readline/histexpand.c
1348 - history_expand: when processing a string within double quotes
1349 (DQUOTE == 1), make the closing double quote inhibit history
1350 expansion, as if the word were outside double quotes. In effect,
1351 we assume that the double quote is followed by a character in
1352 history_no_expand_chars. tcsh and csh seem to do this. This
1353 answers a persistent complaint about history expansion
1354
1355 10/29
1356 -----
1357 make_cmd.c
1358 - make_arith_for_command: use skip_to_delim to find the next `;'
1359 when breaking the string between the double parens into three
1360 separate components instead of a simple character loop. Fixes
1361 bug reported by Dan Douglas <ormaaj@gmail.com>
1362
1363 11/2
1364 ----
1365 Makefile.in
1366 - make libbuiltins.a depend on builtext.h to serialize its creation
1367 and avoid conflict between multiple invocations of mkbuiltins.
1368 Fix from Mike Frysinger <vapier@gentoo.org>
1369
1370 11/5
1371 ----
1372 findcmd.c
1373 - user_command_matches: if stat(".", ...) returns -1, set st_dev
1374 and st_ino fields in dotinfo to 0 to avoid same_file matches
1375 - find_user_command_in_path: check stat(2) return the same way
1376
1377 lib/glob/glob.c
1378 - glob_vector: don't call strlen(pat) without checking pat == 0
1379 - glob_dir_to_array: make sure to free `result' and all allocated
1380 members before returning error due to malloc failure
1381 - glob_vector: make sure to free `nextname' and `npat' on errors
1382 (mostly when setting lose = 1)
1383 - glob_vector: if flags & GX_MATCHDIRS but not GX_ALLDIRS, make
1384 sure we free `subdir'
1385 - glob_filename: when expanding ** (GX_ALLDIRS), make sure we
1386 free temp_results (return value from glob_vector)
1387
1388 lib/glob/xmbsrtowcs.c
1389 - xdupmbstowcs: fix call to realloc to use sizeof (char *) instead
1390 of sizeof (char **) when assigning idxtmp
1391
1392 execute_cmd.c
1393 - print_index_and_element: return 0 right away if L == 0
1394 - is_dirname: fix memory leak by freeing `temp'
1395 - time_command: don't try to deref NULL `command' when assigning
1396 to `posix_time'
1397 - shell_execve: null-terminate `sample' after READ_SAMPLE_BUF so it's
1398 terminated for functions that expect that
1399
1400 builtins/read.def
1401 - read_builtin: don't call bind_read_variable with a potentially-null
1402 string
1403
1404 pcomplete.c
1405 - gen_command_matches: don't call dispose_word_desc with a NULL arg
1406 - gen_compspec_completions: fix memory leak by freeing `ret' before
1407 calling gen_action_completions (tcs, ...). happens when
1408 performing directory completion as default and no completions
1409 have been generated
1410 - gen_progcomp_completions: make sure to set foundp to 0 whenever
1411 returning NULL
1412 - it_init_aliases: fix memory leak by freeing alias_list before
1413 returning
1414
1415 bashline.c
1416 - command_word_completion_function: don't call restore_tilde with a
1417 NULL directory_part argument
1418 - bash_directory_expansion: bugfix: don't throw away results of
1419 rl_directory_rewrite_hook if it's set and returns non-zero
1420 - bind_keyseq_to_unix_command: free `kseq' before returning error
1421
1422 arrayfunc.c
1423 - assign_array_element_internal: make sure `akey' is freed if non-null
1424 before returning error
1425 - assign_compound_array_list: free `akey' before returning error
1426 - array_value_internal: free `akey' before returning error
1427 - unbind_array_element: free `akey' before returning error
1428
1429 subst.c
1430 - array_length_reference: free `akey' before returning error in case
1431 of expand_assignment_string_to_string error
1432 - array_length_reference: free `akey' after call to assoc_reference
1433 - skip_to_delim: if skipping process and command substitution, free
1434 return value from extract_process_subst
1435 - parameter_brace_substring: free `val' (vtype == VT_VARIABLE) before
1436 returning if verify_substring_values fails
1437 - parameter_brace_expand: remove two duplicate lines that allocate
1438 ret in parameter_brace_substring case
1439 - parameter_brace_expand: convert `free (name); name = xmalloc (...)'
1440 to use `xrealloc (name, ...)'
1441 - parameter_brace_expand: free `name' before returning when handling
1442 ${!PREFIX*} expansion
1443 - split_at_delims: fix memory leak by freeing `d2' before returning
1444
1445 redir.c
1446 - redirection_error: free `filename' if the redirection operator is
1447 REDIR_VARASSIGN by assigning allocname
1448
1449 eval.c
1450 - send_pwd_to_eterm: fix memory leak by freeing value returned by
1451 get_working_directory()
1452
1453 builtins/cd.def
1454 - change_to_directory: fix memory leak by freeing return value from
1455 resetpwd()
1456 - cd_builtin: fix memory leak by freeing value returned by dirspell()
1457 - cd_builtin: fix memory leak by freeing `directory' if appropriate
1458 before overwriting with return value from resetpwd()
1459
1460 builtins/type.def
1461 - describe_command: free `full_path' before overwriting it with return
1462 value from sh_makepath
1463
1464 builtins/complete.def
1465 - compgen_builtin: fix memory leak by calling strlist_dispose (sl)
1466 before overwriting sl with return value from completions_to_stringlist
1467
1468 builtins/hash.def
1469 - list_hashed_filename_targets: fix memory leak by freeing `target'
1470
1471 make_cmd.c
1472 - make_arith_for_command: free `init', `test', and `step' before
1473 returning error on parse error
1474
1475 jobs.c
1476 - initialize_job_control: don't call move_to_high_fd if shell_tty == -1
1477
1478 general.c
1479 - check_dev_tty: don't call close with an fd < 0
1480 - legal_number: deal with NULL `string' argument, return invalid
1481
1482 lib/sh/fmtulong.c
1483 - fmtulong: if the `base' argument is invalid, make sure we index
1484 buf by `len-1' at maximum
1485
1486 print_cmd.c
1487 - print_deferred_heredocs: don't try to dereference a NULL `cstring'
1488 - cprintf: make sure to call va_end (args)
1489
1490 variables.c
1491 - push_dollar_vars: fix call to xrealloc to use sizeof (WORD_LIST *)
1492 instead of sizeof (WORD_LIST **)
1493
1494 lib/sh/zmapfd.c
1495 - zmapfd: if read returns error, free result and return -1 immediately
1496 instead of trying to reallocate it
1497
1498 11/6
1499 ----
1500 execute_cmd.c
1501 - cpl_reap: rewrote to avoid using pointer after freeing it; now builds
1502 new coproc list on the fly while traversing the old one and sets the
1503 right values for coproc_list when done
1504
1505 11/12
1506 -----
1507 builtins/set.def
1508 - if neither -f nor -v supplied, don't allow a readonly function to
1509 be implicitly unset. Fixes bug reported by Jens Schmidt
1510 <jens.schmidt35@arcor.de>
1511
1512 lib/readline/callback.c
1513 - change CALLBACK_READ_RETURN to clear signal handlers before returning
1514 from rl_callback_read_char so readline's signal handlers aren't
1515 installed when readline doesn't have control. Idea from Jan
1516 Kratochvil <jan.ktratochvil@redhat.com> and the GDB development
1517 team
1518
1519 pcomplete.h
1520 - COPT_NOQUOTE: new complete/compgen option value
1521
1522 builtins/complete.def
1523 - noquote: new complete/compgen option; will be used to disable
1524 filename completion quoting
1525
1526 pcomplete.c
1527 - pcomp_set_readline_variables: pay attention to COPT_NOQUOTE; turns
1528 of rl_filename_quoting_desired if set; turns it on if unset (value
1529 is inverted, since default is on)
1530
1531 doc/bash.1,lib/readline/doc/rluser.texi
1532 - document new -o noquote option to complete/compgen/compopt
1533
1534 pathexp.c
1535 - quote_string_for_globbing: if QGLOB_REGEXP, make sure characters
1536 between brackets in an ERE bracket expression are not inappropriately
1537 quoted with backslashes. This is a pretty substantial change,
1538 should be stressed when opening bash up for alpha and beta tests.
1539 Fixes bug pointed out by Stephane Chazleas
1540 <stephane_chazelas@yahoo.fr>
1541
1542 doc/{bash.1,bashref.texi}
1543 - document that regexp matches can be inconsistent when quoting
1544 characters in bracket expressions, since usual quoting characters
1545 lose their meaning within brackets
1546 - note that regular expression matching when the pattern is stored
1547 in a shell variable which is quoted for expansion causes string
1548 matching
1549
1550 redir.h
1551 - RX_SAVEFD: new flag value; notes that a redirection denotes an
1552 fd used to save another even if it's not >= SHELL_FD_BASE
1553
1554 redir.c
1555 - do_redirection_internal: when deciding whether or not to reset the
1556 close-on-exec flag on a restored file descriptor, trust the value
1557 of redirect->flags & RX_SAVCLEXEC even if the fd is < SHELL_FD_BASE
1558 if the RX_SAVEFD flag is set
1559 - add_undo_redirect: set the RX_SAVEFD flag if the file descriptor
1560 limit is such that the shell can't duplicate to a file descriptor
1561 >= 10. Fixes a limitation that tripped a coreutils test reported
1562 by Paul Eggert <eggert@cs.ucla.edu>
1563
1564 11/19
1565 -----
1566 doc/{bash.1,bashref.texi},lib/readline/doc/hsuser.texi
1567 - make it clear that bash runs HISTFILESIZE=$HISTSIZE after reading
1568 the startup files
1569 - make it clear that bash runs HISTSIZE=500 after reading the
1570 startup files
1571 - make it clear that setting HISTSIZE=0 causes commands to not be
1572 saved in the history list
1573 - make it clear that setting HISTFILESIZE=0 causes the history file
1574 to be truncated to zero size
1575
1576 variables.c
1577 - sv_histsize: change so setting HISTSIZE to a value less than 0
1578 causes the history to be `unstifled'
1579 - sv_histsize: change so setting HISTFILESIZE to a value less than 0
1580 results in no file truncation
1581 - make it clear that numeric values less than 0 for HISTFILESIZE or
1582 HISTSIZE inhibit the usual functions
1583
1584 11/23
1585 -----
1586 parse.y
1587 - save_input_line_state: add missing `return ls' at the end, since the
1588 function is supposed to return its argument. Pointed out by
1589 Andreas Schwab <schwab@linux-m68k.org>
1590
1591 builtins/read.def
1592 - skip over NUL bytes in input, as most modern shells seem to. Bug
1593 report by Matthew Story <matt@tablethotels.com>
1594
1595 lib/readline/vi_mode.c
1596 - rl_vi_replace: set _rl_vi_last_key_before_insert to invoking key
1597
1598 11/25
1599 -----
1600 builtins/read.def
1601 - read_builtin: if xrealloc returns same pointer as first argument,
1602 don't bother with the remove_unwind_protect/add_unwind_protect pair
1603 - read_builtin: set a flag (`reading') around calls to zread/zreadc
1604 and readline()
1605 - sigalrm: change to set flag (`sigalrm_seen') and only longjmp if
1606 currently in read(2) (reading != 0)
1607 - CHECK_ALRM: new macro, checks sigalrm_seen and longjmps if non-zero,
1608 behavior of old SIGALRM catching function
1609 - read_builtin: call CHECK_ALRM in appropriate places while reading
1610 line of input. Fixes bug reported by Pierre Gaston
1611 <pierre.gaston@gmail.com>
1612
1613 lib/readline/vi_mode.c
1614 - rl_vi_replace: initialize characters before printing characters in
1615 vi_replace_keymap to their default values in vi_insertion_keymap,
1616 since we're supposed to be in insert mode replacing characters
1617 - rl_vi_replace: call rl_vi_start_inserting to set last command to
1618 `R' for undo
1619 - rl_vi_replace: set _rl_vi_last_key_before_insert to `R' for future
1620 use by _rl_vi_done_inserting
1621 - vi_save_insert_buffer: new function, broke out code that copies text
1622 into vi_insert_buffer from _rl_vi_save_insert
1623 - _rl_vi_save_replace: new function, saves text modified by
1624 rl_vi_replace (using current point and vi_replace_count to figure
1625 it out) to vi_replace_buffer
1626 - _rl_vi_save_insert: call vi_save_insert_buffer
1627 - _rl_vi_done_inserting: if _rl_vi_last_key_before_insert == 'R', call
1628 _rl_vi_save_replace to save text modified in replace mode (uses
1629 vi_save_insert_buffer)
1630 - _rl_vi_replace_insert: new function, replaces the number of chars
1631 in vi_insert_buffer after rl_point with contents ov vi_insert_buffer
1632 - rl_vi_redo: call _rl_vi_replace_insert if last command == 'R' and
1633 there's something in vi_insert_buffer. Fixes bug with `.' not
1634 redoing the most recent `R' command, reported by Geoff Clare
1635 <g.clare@opengroup.org> in readline area on savannah
1636
1637 11/26
1638 -----
1639 lib/readline/rlprivate.h
1640 - RL_SIG_RECEIVED(): evaluate to non-zero if there is a pending signal
1641 to be handled
1642 - RL_SIGINT_RECEIVED(): evaluate to non-zero if there is a pending
1643 SIGINT to be handled
1644
1645 lib/readline/complete.c
1646 - remove all mention of _rl_interrupt_immediately
1647 - rl_completion_matches: check RL_SIG_RECEIVED after each call to
1648 the entry function, call RL_CHECK_SIGNALS if true to handle the
1649 signal
1650 - rl_completion_matches: if RL_SIG_RECEIVED evaluates to true, free
1651 and zero out the match_list this function allocated
1652 - rl_completion_matches: if the completion entry function is
1653 rl_filename_completion_function, free the contents of match_list,
1654 because that function does not keep state and will not free the
1655 entries; avoids possible memory leak pointed out by
1656 Garrett Cooper <yanegomi@gmail.com>
1657 - gen_completion_matches: if RL_SIG_RECEIVED evalutes to true after
1658 calling rl_attempted_completion_function, free the returned match
1659 list and handle the signal with RL_CHECK_SIGNALS; avoids
1660 possible memory leak pointed out by Garrett Cooper
1661 <yanegomi@gmail.com>
1662 - gen_completion_matches: if RL_SIG_RECEIVED evaluates to true after
1663 calling rl_completion_matches, free the returned match list and
1664 handle the signal with RL_CHECK_SIGNALS
1665
1666 lib/readline/util.c
1667 - rl_settracefp: new utility function to set the tracing FILE *
1668
1669 lib/readline/signals.c
1670 - _rl_sigcleanup: pointer to a function that will be called with the
1671 signal and a void * argument from _rl_handle_signal
1672 - _rl_sigcleanarg: void * that the rest of the code can set to have
1673 passed to the signal cleanup function
1674 - _rl_handle_signal: if _rl_sigcleanup set, call as
1675 (*_rl_sigcleanup) (sig, _rl_sigcleanarg)
1676
1677 lib/readline/rlprivate.h
1678 - extern declarations for _rl_sigcleanup and _rl_sigcleanarg
1679
1680 lib/readline/complete.c
1681 - _rl_complete_sigcleanup: signal cleanup function for completion code;
1682 calls _rl_free_match_list on _rl_sigcleanarg if signal == SIGINT
1683 - rl_complete_internal: before calling display_matches if what_to_do
1684 == `?', set _rl_sigcleanup to _rl_complete_sigcleanup so the match
1685 list gets freed on SIGINT; avoids possible memory leak pointed out
1686 by Garrett Cooper <yanegomi@gmail.com>
1687 - rl_complete_internal: in default switch case, call _rl_free_match_list
1688 before returning to avoid memory leak
1689
1690 doc/bashref.texi
1691 - start at a set of examples for the =~ regular expression matching
1692 operator, touching on keeping the pattern in a shell variable and
1693 quoting portions of the pattern to remove their special meaning
1694
1695 12/1
1696 ----
1697 lib/glob/gmisc.c
1698 - extglob_pattern: new function, returns 1 if pattern passed as an
1699 argument looks like an extended globbing pattern
1700
1701 lib/glob/glob.c
1702 - skipname: return 0 immediately if extglob_pattern returns non-zero,
1703 let the extended globbing code do the right thing with skipping
1704 names beginning with a `.'
1705 - mbskipname: return 0 immediately if extglob_pattern returns non-zero,
1706 let the extended globbing code do the right thing with skipping
1707 names beginning with a `.'. Fixes bug reported by Yongzhi Pan
1708 <panyongzhi@gmail.com>
1709
1710 12/2
1711 ----
1712 lib/glob/smatch.c
1713 - patscan, patscan_wc: no longer static so other parts of the glob
1714 library can use them, renamed to glob_patscan, glob_patscan_wc
1715
1716 lib/glob/glob.c
1717 - extern declarations for glob_patscan, glob_patscan_wc
1718 - wchkname: new function, does skipname on wchar_t pattern and dname,
1719 old body of mbskipname after converting to wide chars
1720 - extglob_skipname: new function, checks all subpatterns in an extglob
1721 pattern to determine whether or not a filename should be skipped.
1722 Calls skipname for each subpattern. Dname is only skipped if all
1723 subpatterns indicate it should be. Better fix for bug reported by
1724 Yongzhi Pan <panyongzhi@gmail.com>
1725 - wextglob_skipname: wide-char version of extglob_skipname, calls
1726 wchkname instead of calling back into mbskipname for each
1727 subpattern to avoid problems with char/wchar_t mismatch
1728 - skipname: call extglob_skipname if extglob_pattern returns non-zero
1729 - mbskipname: call wextglob_skipname if extglob_pattern returns non-zero
1730 - mbskipname: short-circuit immediately if no multibyte chars in
1731 pattern or filename
1732
1733 execute_cmd.c
1734 - execute_cond_node: added parens to patmatch assignment statement to
1735 make intent clearer
1736
1737 12/3
1738 ----
1739 configure.in,config.h.in
1740 - check for imaxdiv, define HAVE_IMAXDIV if present
1741
1742 expr.c
1743 - expassign, exp2: use imaxdiv if available. Doesn't help with checks
1744 for overflow from 10/25
1745
1746 12/6
1747 ----
1748 lib/readline/complete.c
1749 - compute_lcd_of_matches: if we're ignoring case in the matches, only
1750 use what the user typed as the lcd if it matches the first match
1751 (after sorting) up to the length of what was typed (if what the
1752 user typed is longer than the shortest of the possible matches, use
1753 the shortest common length of the matches instead). If it doesn't
1754 match, use the first of the list of matches, as if case were not
1755 being ignored. Fixes bug reported by Clark Wang
1756 <dearvoid@gmail.com>
1757
1758 12/7
1759 ----
1760 builtins/cd.def
1761 - cd_builtin: add code to return error in case cd has more than one
1762 non-option argument, conditional on CD_COMPLAINS define (which is
1763 not defined anywhere)
1764
1765 doc/{bash.1,bashref.texi}
1766 - note that additional arguments to cd following the directory name
1767 are ignored. Suggested by Vaclav Hanzl <hanzl@noel.feld.cvut.cz>
1768
1769 12/10
1770 -----
1771 lib/readline/input.c
1772 - rl_read_key: don't need to increment key sequence length here; doing
1773 it leads to an off-by-one error
1774
1775 lib/readline/macro.c
1776 - rl_end_kbd_macro: after off-by-one error with rl_key_sequence_length
1777 fixed, can decrement current_macro_index by rl_key_sequence_length
1778 (length of key sequence that closes keyboard macro)
1779
1780 lib/readline/readline.c
1781 - _rl_dispatch_subseq: fix extra increment of rl_key_sequence_length
1782 when ESC maps to a new keymap and we're converting meta characters
1783 to ESC+key
1784 - _rl_dispatch_subseq: better increment of rl_key_sequence_length
1785 before we dispatch to a function in the ISFUNC case (where the
1786 second increment above should have happened)
1787 - rl_executing_keyseq: the full key sequence that ended up executing
1788 a readline command. Available to the calling application, maintained
1789 by _rl_dispatch_subseq, indexed by rl_key_sequence_length
1790 - rl_executing_key: the key that was bound to the currently-executing
1791 readline command. Same as the `key' argument to the function
1792
1793 lib/readline/readline.h
1794 - rl_executing_keyseq: extern declaration
1795 - rl_executing_key: extern declaration
1796 - rl_key_sequence_length: declaration moved here from rlprivate.h,
1797 now part of public interface
1798
1799 lib/readline/rlprivate.h
1800 - new extern declaration for _rl_executing_keyseq_size, buffer size
1801 for rl_executing_keyseq
1802
1803 lib/readline/doc/rltech.texi
1804 - documented new variables: rl_executing_key, rl_executing_keyseq,
1805 rl_key_sequence_length
1806
1807 12/13
1808 -----
1809 bashline.c
1810 - bash_execute_unix_command: replace ad-hoc code that searches
1811 cmd_xmap for correct command with call to rl_function_of_keyseq
1812 using rl_executing_keyseq; now supports key sequences longer
1813 than two characters. Fixes bug reported by Michael Kazior
1814 <kazikcz@gmail.com>
1815
1816 12/15
1817 -----
1818 make_cmd.c
1819 - make_function_def: don't null out source_file before calling
1820 make_command so it can be used later on when the function definition
1821 is executed
1822
1823 execute_cmd.c
1824 - execute_intern_function: second argument is now FUNCTION_DEF *
1825 instead of COMMAND *
1826 - execute_command_internal: call execute_intern_function with the
1827 new second argument (the entire FUNCTION_DEF instead of just the
1828 command member)
1829 - execute_intern_function: if DEBUGGER is defined, call
1830 bind_function_def before calling bind_function, just like
1831 make_function_def does (might be able to take out the call in
1832 make_function_def depending on what the debugger does with it).
1833 Fixes bug reported by <dethrophes@motd005>
1834
1835 expr.c
1836 - more minor changes to cases of INTMAX_MIN % -1 and INTMAX_MIN / 1;
1837 fix typos and logic errors
1838
1839 12/16
1840 -----
1841 bashline.c
1842 - find_cmd_start: change flags to remove SD_NOSKIPCMD so it skips over
1843 command substitutions and doesn't treat them as command separators
1844 - attempt_shell_completion: instead of taking first return from
1845 find_cmd_name as command name to use for programmable completion,
1846 use loop to skip over assignment statements. Fixes problem reported
1847 by Raphael Droz <raphael.droz+floss@gmail.com>
1848 - attempt_shell_completion: if we don't find a command name but the
1849 command line is non-empty, assume the other words are all assignment
1850 statements and flag that point is in a command position so we can
1851 do command name completion
1852 - attempt_shell_completion: if the word being completed is the first
1853 word following a series of assignment statements, and the
1854 command line is non-empty, flag that point is in a command position
1855 so we can do command name completion
1856
1857 lib/readline/history.c
1858 - history_get_time: atol -> strtol
1859
1860 12/18
1861 -----
1862 parse.y
1863 - parser_in_command_position: external interface to the
1864 command_token_position macro for use by other parts of the shell,
1865 like the completion mechanism
1866
1867 externs.h
1868 - extern declaration for parser_in_command_position
1869
1870 12/19
1871 -----
1872
1873 builtins/read.def
1874 - read_builtin: make sure all calls to bind_read_variable are passed
1875 a non-null string. Fixes bug reported by Dan Douglas
1876 <ormaaj@gmail.com>
1877
1878 bashline.c
1879 - attempt_shell_completion: mark that we're in a command position if
1880 we're at the start of the line and the parser is ready to accept
1881 a reserved word or command name. Feature most recently suggested
1882 by Peng Yu <pengyu.ut@gmail.com>
1883
1884 12/21
1885 -----
1886 lib/readline/bind.c
1887 - _rl_escchar: return the character that would be backslash-escaped
1888 to denote the control character passed as an argument ('\n' -> 'n')
1889 - _rl_isescape: return 1 if character passed is one that has a
1890 backslash escape
1891 - _rl_untranslate_macro_value: new second argument: use_escapes, if
1892 non-zero translate to backslash escapes where possible instead of
1893 using straight \C-x for control character `x'. Change callers
1894 - _rl_untranslate_macro_value: now global
1895
1896 lib/readline/rlprivate.h
1897 - _rl_untranslate_macro_value: extern declaration
1898
1899 lib/readline/{macro.c,readline.h}
1900 - rl_print_last_kbd_macro: new bindable function, inspired by patch
1901 from Mitchel Humpherys
1902
1903 lib/readline/funmap.c
1904 - print-last-kbd-macro: new bindable command, bound to
1905 rl_print_last_kbd_macro
1906
1907 lib/readline/doc/{rluser.texi,readline.3},doc/bash.1
1908 - print-last-kbd-macro: document.
1909
1910 lib/readline/text.c
1911 - _rl_insert_next: if we're defining a macro, make sure the key gets
1912 added to the macro text (should really audit calls to rl_read_key()
1913 and make sure the right thing is happening for all of them)
1914
1915 bashline.[ch]
1916 - print_unix_command_map: new function, prints all bound commands in
1917 cmd_xmap using rl_macro_dumper in a reusable format
1918
1919 builtins/bind.def
1920 - new -X option: print all keysequences bound to Unix commands using
1921 print_unix_command_map. Feature suggested by Dennis Williamson
1922 (2/2011)
1923
1924 doc/{bash.1,bashref.texi}
1925 - document new `bind -X' option
1926
1927 12/24
1928 -----
1929
1930 doc/{bash.1,bashref.texi}
1931 - add a couple of sentences to the description of the case modification
1932 operators making it clearer that each character of parameter is
1933 tested against the pattern, and that the pattern should only attempt
1934 to match a single character. Suggested by Bill Gradwohl
1935 <bill@ycc.com>
1936
1937 12/28
1938 -----
1939 shell.c
1940 - init_noninteractive: instead of calling set_job_control(0) to
1941 unconditionally turn off job control, turn on job control if
1942 forced_interactive or jobs_m_flag is set
1943 - shell_initialize: call initialize_job_control with jobs_m_flag as
1944 argument so `bash -m script' enables job control while running the
1945 script
1946
1947 jobs.c
1948 - initialize_job_control: if the `force' argument is non-zero, turn on
1949 job control even if the shell is not currently interactive
1950 (interactive == 0)
1951
1952 12/29
1953 -----
1954
1955 flags.h
1956 - new extern declaration for jobs_m_flag
1957
1958 builtins/{cd,set}.def,doc/{bash.1,bashref.texi}
1959 - added text clarifying the descriptions of cd -L and -P, suggested by
1960 Padraig Brady <p@draigbrady.com>
1961 - slight change to the description of `set -P' about resolving symbolic
1962 links
1963
1964 lib/readline/doc/rluser.texi
1965 - Added an example to the programmable completion section: _comp_cd,
1966 a completion function for cd, with additional verbiage. Text
1967 includes a reference to the bash_completion project
1968
1969 1/1/2012
1970 --------
1971 jobs.c
1972 - set_job_status_and_cleanup: note that a job is stopped due to
1973 SIGTSTP (any_tstped) if job_control is set; there's no need to
1974 test interactive
1975
1976 1/5
1977 ---
1978 quit.h
1979 - LASTSIG(): new macro, expands to signal number of last terminating
1980 signal received (terminating_signal or SIGINT)
1981
1982 trap.c
1983 - first_pending_trap: returns lowest signal number with a trap pending
1984 - trapped_signal_received: set to the last trapped signal the shell
1985 received in trap_handler(); reset to 0 in run_pending_traps
1986
1987 builtins/read.def
1988 - read_builtin: changes to posix-mode (posixly_correct != 0) to make
1989 `read' interruptible by a trapped signal. After the trap runs,
1990 read returns 128+sig and does not assign the partially-read line
1991 to the named variable(s). From an austin-group discussion started
1992 by David Korn
1993
1994 1/11
1995 ----
1996 doc/{bash.1,bashref.texi}
1997 - slight changes to the descriptions of the compat32 and compat40 shell
1998 options to clarify their meaning
1999
2000 1/12
2001 ----
2002 lib/readline/{colors.[ch],parse-colors.[ch]}
2003 - new files, part of color infrastructure support
2004
2005 Makefile.in,lib/readline/Makefile.in
2006 - arrange to have colors.o and parse-colors.o added to readline
2007 library
2008
2009 {configure,config.h}.in
2010 - check for stdbool.h, define HAVE_STDBOOL_H if found
2011
2012 1/14
2013 ----
2014 lib/readline/bind.c
2015 - colored_stats: new bindable variable, enables using colors to
2016 indicate file type when listing completions
2017
2018 lib/readline/complete.c
2019 - _rl_colored_stats: new variable, controlled by colored-stats bindable
2020 variable
2021 - colored_stat_start, colored_stat_end: new functions to set and reset
2022 the terminal color appropriately depending on the type of the
2023 filename to be printed
2024 - print_filename: changes to print colors if `colored-stats' variable
2025 set. Changes contributed by Raphael Droz
2026 <raphael.droz+floss@gmail.com>
2027
2028 lib/readline/readline.c
2029 - rl_initialize_everything: add call to _rl_parse_colors to parse
2030 color values out of $LS_COLORS. May have to add to rl_initialize
2031 to make more dynamic if LS_COLORS changes (which doesn't happen
2032 very often, if at all)
2033
2034 lib/readline/rlprivate.h
2035 - _rl_colored_stats: new extern declaration
2036
2037 lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
2038 - colored-stats: document new bindable readline variable
2039
2040 lib/readline/colors.c
2041 - _rl_print_color_indicator: call rl_filename_stat_hook before calling
2042 lstat/stat so we can get color indicators for stuff like
2043 $HOME/Applications
2044
2045 lib/readline/complete.c
2046 - stat_char: call rl_filename_stat_hook before calling lstat/stat
2047
2048 findcmd.[ch],execute_cmd.c
2049 - search_for_command: now takes a second `flags' argument; changed
2050 header function prototype and callers
2051 - search_for_command: if (flags & 1), put the command found in $PATH
2052 into the command hash table (previous default behavior)
2053
2054 execute_cmd.c
2055 - is_dirname: call search_for_command with flags argument of 0 so it
2056 doesn't try to put something in the command hash table
2057
2058 bashline.c
2059 - bash_command_name_stat_hook: a hook function for readline's
2060 filename_stat_hook that does $PATH searching the same way that
2061 execute_cmd.c:execute_disk_command() does it, and rewrites the
2062 passed filename if found. Does not put names into command hash
2063 table. This allows command name completion to take advantage
2064 of `visible-stats' and `colored-stats' settings.
2065 - executable_completion: new function, calls the directory completion
2066 hook to expand the filename before calling executable_file or
2067 executable_or_directory; change command_word_completion_function to
2068 call executable_completion. This allows $HOME/bin/[TAB] to do
2069 command completion and display alternatives
2070
2071 1/17
2072 ----
2073 pcomplete.c
2074 - gen_command_matches: now takes a new second argument: the command
2075 name as deciphered by the programmable completion code and used
2076 to look up the compspec; changed callers (gen_compspec_completions)
2077 - gen_shell_function_matches: now takes a new second argument: the
2078 command that originally caused the completion function to be
2079 invoked; changed callers (gen_compspec_completions))
2080 - build_arg_list: now takes a new second argument: the command name
2081 corresponding to the current compspec; changed callers
2082 (gen_command_matches, gen_shell_function_matches)
2083 - build_arg_list: now uses `cmd' argument to create $1 passed to
2084 invoked command or shell function
2085 - gen_compspec_completions: if we skipped a null command at the
2086 beginning of the line (e.g., for completing `>'), add a new word for
2087 it at the beginning of the word list and increment nw and cw
2088 appropriately. This is all a partial fix for the shortcoming
2089 pointed out by Sung Pae <sungpae@gmail.com>
2090
2091 1/18
2092 ----
2093
2094 {configure,config.h}.in
2095 - new check: check for AUDIT_USER_TTY defined in <linux/audit.h>,
2096 define HAVE_DECL_AUDIT_USER_TTY if both are found
2097
2098 lib/readline/rlconf.h
2099 - ENABLE_TTY_AUDIT_SUPPORT: new define, allows use of the Linux kernel
2100 tty auditing system if it's available and enabled
2101
2102 lib/readline/util.c
2103 - _rl_audit_tty: new function, send a string to the kernel tty audit
2104 system
2105
2106 lib/readline/rlprivate.h
2107 - _rl_audit_tty: new extern declaration
2108
2109 lib/readline/readline.c
2110 - readline: call _rl_audit_tty with line to be returned before returning
2111 it if the Linux tty audit system is available and it's been enabled
2112 in rlconf.h Original patch from Miroslav Trmac; recent request
2113 from Miroslav Lichvar <mlichvar@redhat.com>
2114
2115 1/21
2116 ----
2117
2118 lib/readline/readline.c:
2119 - _rl_dispatch_subseq: add an inter-character timeout for multi-char
2120 key sequences. Suggested by <rogerx.oss@gmail.com>. Still needs
2121 work to make a user-settable variable
2122
2123 parse.y
2124 - shell_getc: make code that uses the pop_alias dependent on ALIAS
2125 define
2126
2127 variables.h
2128 - sv_tz: extern define should only depend on HAVE_TZSET
2129
2130 expr.c
2131 - expr_streval: if ARRAY_VARS is not defined, set lvalue->ind to -1;
2132 move assignment to `ind' inside define
2133 - expr_bind_array_element: declaration and uses need to be #ifdef
2134 ARRAY_VARS
2135
2136 arrayfunc.h
2137 - AV_ALLOWALL, AV_QUOTED, AV_USEIND: define to 0 if ARRAY_VARS not
2138 defined; used in subst.c unconditionally
2139
2140 sig.h
2141 - make the signal blocking functions not dependent on JOB_CONTROL
2142
2143 sig.c
2144 - sigprocmask: make the replacement definition not dependent on
2145 JOB_CONTROL
2146
2147 trap.c
2148 - use BLOCK_SIGNAL/UNBLOCK_SIGNAL instead of code dependent on
2149 HAVE_POSIX_SIGNALS and BSD signals
2150
2151 1/24
2152 ----
2153
2154 print_cmd.c
2155 - print_redirection_list: change the conditions under which
2156 r_duplicating_output_word is mapped to r_err_and_out to more or
2157 less match those used in redir.c. Fixes bug pointed out by
2158 Dan Douglas <ormaaj@gmail.com>
2159
2160
2161 1/29
2162 ----
2163 lib/readline/signals.c
2164 - _rl_block_sigwinch,_rl_release_sigwinch: don't compile in bodies
2165 unless SIGWINCH is defined. Fixes bug reported by Pierre Muller
2166 <pierre.muller@ics-cnrs.unistra.fr>
2167
2168 doc/{bash.1,bashref.texi}
2169 - small modifications to the introduction to the REDIRECTION section
2170 to describe how redirections can modify file handles
2171 - small modification to the section describing base#n to make it
2172 clearer that n can be denoted using non-numerics. From a posting
2173 by Linda Walsh <bash@tlinx.org>
2174
2175 2/2
2176 ---
2177 builtins/printf.def
2178 - printf_builtin: make sure vbuf is intialized and non-null when -v
2179 is supplied, since other parts of the code assume that it's not
2180 null (e.g., bind_printf_variable()). Fixes bug reported by Jim
2181 Avera <james_avera@yahoo.com>
2182
2183 2/4
2184 ---
2185 lib/readline/undo.c
2186 - _rl_free_undo_list: new function, old body of rl_free_undo_list,
2187 frees undo entries in UNDO_LIST * passed as argument
2188 - rl_free_undo_list: call _rl_free_undo_list
2189
2190 lib/readline/rlprivate.h
2191 - _rl_free_undo_list: new extern declaration
2192 - _rl_keyseq_timeout: new extern declaration (see below)
2193
2194 lib/readline/misc.c
2195 - rl_clear_history: new function. Clears the history list and frees
2196 all associated data similar to history.c:clear_history(), but
2197 takes rl_undo_list into account and frees and UNDO_LISTs saved as
2198 `data' members of a history list entry
2199
2200 lib/readline/doc/rltech.texi
2201 - rl_clear_history: documented
2202
2203 lib/readline/readline.c
2204 - _rl_keyseq_timeout: new variable to hold intra-key timeout value
2205 from 1/21 fix; specified in milliseconds. Default value is 500
2206 - _rl_dispatch_subseq: change to use _rl_keyseq_timeout as intra-key
2207 timeout if it's greater than 0; no timeout if <= 0
2208 - _rl_dispatch_subseq: don't check for queued keyboard input if we have
2209 pushed or pending input, or if we're reading input from a macro
2210
2211 lib/readline/bind.c
2212 - keyseq-timeout: new bindable variable, shadows _rl_keyseq_timeout
2213 - string_varlist: add keyseq-timeout
2214 - sv_seqtimeout: new function to modify value of _rl_keyseq_timeout;
2215 clamps negative values at 0 for now
2216 - _rl_get_string_variable_value: return value for keyseq-timeout
2217
2218 doc/bash.1,lib/readline/doc/{rluser.texi,readline.3}
2219 - keyseq-timeout: documented
2220
2221 lib/readline/isearch.c
2222 - _rl_isearch_dispatch: modification to fix from 7/18 to not use
2223 cxt->keymap and cxt->okeymap, since by the time this code is
2224 executed, they are equal. Use `f' to check for rl_insert or
2225 unbound func
2226 - _rl_isearch_dispatch: if we're switching keymaps, not in
2227 callback mode, and don't have pending or pushed input, use
2228 _rl_input_queued to resolve a potentially ambiguous key sequence.
2229 Suggested by Roger Zauner <rogerx.oss@gmail.com>
2230 - _rl_isearch_dispatch: if we have changed keymaps and resolved to
2231 an editing function (not self-insert), make sure we stuff the
2232 right characters back onto the input after changing the keymap
2233 back so the right editing function is executed after the search
2234 is terminated. Rest of fix for bug reported by Roger Zauner
2235 <rogerx.oss@gmail.com>
2236
2237 2/5
2238 ---
2239 builtins/gen-helpfiles.c
2240 - new file: reads struct builtin and writes the long docs to files
2241 in the `helpdirs' subdirectory. The filename is given in the
2242 previously-unused `handle' member of the struct builtin. Links
2243 with `tmpbuiltins.o', which is created by Makefile to have the
2244 right long documentation. When not cross-compiling, gets the
2245 right #defines based on configuration options from config.h instead
2246 of trying to parse conditional parts of def files. Fixes
2247 shortcoming pointed out by Andreas Schwab <schwab@linux-m68k.org>
2248
2249 builtins/Makefile.in
2250 - tmpbuiltins.c: new generated file, created to enable creation of
2251 separate helpfiles based on correct #defines instead of trying to
2252 parse conditional parts of def files
2253 - gen-helpfiles: new program to generate helpfiles, links with
2254 tmpbuiltins.o
2255 - HELPFILES_TARGET: new target, substituted by configure to `helpdoc'
2256 if separate helpfiles requested
2257 - targets: new target, libbuiltins.a and $(HELPFILES_TARGET)
2258 - CREATED_OBJECTS: new variable, holds created object files for
2259 make clean; changed make clean to remove created objects
2260 - helpdoc: changed to call gen-helpfiles instead of mkbuiltins
2261
2262 Makefile.in
2263 - when building libbuiltins.a, recursively call make with `targets'
2264 argument to make sure separate helpfiles get built
2265
2266 configure.in
2267 - substitute `helpdoc' as value of HELPFILES_TARGET if
2268 --enable-separate-helpfiles supplied as configure argument
2269
2270 builtins/mkbuiltins.c
2271 - `-nofunctions': new argument, causes mkbuiltins to not write value
2272 for function implementing a particular builtin to struct builtin
2273 and to write document file name to `handle' member of struct builtin
2274 - no longer writes separate helpfiles; that is left to gen-helpfiles
2275
2276 2/8
2277 ---
2278 subst.c
2279 - make sure last_command_exit_value is set to a non-zero value before
2280 any calls to report_error, since `-e' set will short-circuit
2281 report_error. Fixes bug reported by Ewan Mellor
2282 <Ewan.Mellor@eu.citrix.com>
2283
2284 variables.c
2285 - make_local_array_variable: added second argument; if non-zero,
2286 function will return an existing local associative array variable
2287 instead of insisting on an indexed array
2288
2289 variable.h,subst.c
2290 - make_local_array_variable: changed prototype and caller
2291
2292 builtins/declare.def
2293 - declare_internal: add second arg to call to make_local_array_variable;
2294 making_array_special, which indicates we're processing an
2295 assignment like declare a[b]=c. Fixes seg fault resulting from
2296 a being an already-declared local associative array variable in a
2297 function. Ubuntu bash bug 928900.
2298
2299 2/14
2300 ----
2301
2302 execute_cmd.c
2303 - execute_command_internal: if redirections into or out of a loop fail,
2304 don't try to free ofifo_list unless saved_fifo is non-zero. It's
2305 only valid if saved_fifo is set
2306
2307 2/15
2308 ----
2309 {arrayfunc,braces,variables}.c
2310 - last_command_exit_value: make sure it's set before any calls to
2311 report_error, since -e will cause that to exit the shell
2312
2313 builtins/common.c
2314 - get_job_by_name: call internal_error instead of report_error so this
2315 doesn't exit the shell
2316
2317 2/18
2318 ----
2319 builtins/evalstring.c
2320 - parse_and_execute: make sure the file descriptor to be redirected to
2321 is 1 before calling cat_file. One fix for bug reported by Dan Douglas
2322 <ormaaj@gmail.com>
2323
2324 parse.y
2325 - read_token_word: don't return NUMBER if a string of all digits
2326 resolves to a number that overflows the bounds of an intmax_t.
2327 Other fix for bug reported by Dan Douglas <ormaaj@gmail.com>
2328
2329 2/19
2330 ----
2331 lib/sh/strtrans.c
2332 - ansicstr: use 0x7f as the boundary for characters that translate
2333 directly from ASCII to unicode (\u and \U escapes) instead of
2334 UCHAR_MAX, since everything >= 0x80 requires more than one byte.
2335 Bug and fix from John Kearney <dethrophes@web.de>
2336
2337 builtins/printf.def
2338 - tescape: ditto for printf \u and \U escape sequences
2339
2340 2/20
2341 ----
2342 lib/sh/unicode.c
2343 - u32toutf8: fix to handle encodings up to six bytes long correctly
2344 (though technically UTF-8 only has characters up to 4 bytes long).
2345 Report and fix from John Kearney <dethrophes@web.de>
2346 - u32toutf8: first argument is now an unsigned 32-bit quantity,
2347 changed callers (u32cconv) to pass c instead of wc
2348 - u32reset: new function, resets local static state to uninitialized
2349 (locale information, currently)
2350
2351 locale.c
2352 - call u32reset whenever LC_CTYPE/LC_ALL/LANG is changed to reset the
2353 cached locale information used by u32cconv. From a report from
2354 John Kearney <dethrophes@web.de>
2355
2356 2/21
2357 ----
2358 doc/{bash,builtins}.1
2359 - minor changes from Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2360
2361 lib/sh/unicode.c
2362 - u32cconv: only assume you can directly call wctomb on the passed
2363 value if __STDC_ISO_10646__ is defined and the value is <=
2364 0x7fffffff
2365 - stub_charset: return locale as default instead of "ASCII", let
2366 rest of code decide what to do with it
2367
2368 lib/readline/parens.c
2369 - _rl_enable_paren_matching: make paren matching work in vi insert
2370 mode. Bug report from <derflob@derflob.de>
2371
2372 2/22
2373 ----
2374 lib/sh/shquote.c
2375 - sh_backslash_quote: quote tilde in places where it would be
2376 expanded. From a report from John Kearney <dethrophes@web.de>
2377
2378 2/23
2379 ----
2380 execute_cmd.c
2381 - execute_pipeline: wrap the discard_unwind_frame call in #ifdef
2382 JOB_CONTROL, since the frame is only created if JOB_CONTROL is
2383 defined. Bug and fix from Doug Kehn <rdkehn@yahoo.com>
2384
2385 2/25
2386 ----
2387 error.c
2388 - report_error: make sure last_command_exit_value is non-zero before
2389 we call exit_shell, since the exit trap may reference it. Call
2390 exit_shell with last_command_exit_value to allow exit statuses
2391 other than 1
2392
2393 unicode.c
2394 - stub_charset: use local static buffer to hold charset, don't change
2395 value returned by get_locale_var. Based on idea and code from
2396 John Kearney <dethrophes@web.de>
2397 - u32toutf16: function to convert unsigned 32-bit value (unicode) to
2398 UTF-16. From John Kearney <dethrophes@web.de>
2399 - u32cconv: call u32toutf16 if __STDC_ISO_10646__ defined and wchar_t
2400 is two bytes, send result to wcstombs, return if not encoding error.
2401 From John Kearney <dethrophes@web.de>
2402 - u32cconv: return UTF-8 conversion if iconv conversion to local
2403 charset is unsupported
2404
2405 3/2
2406 ---
2407 lib/readline/complete.c
2408 - print_filename: if there is no directory hook, but there is a stat
2409 hook, and we want to append a slash to directories, call the stat
2410 hook before calling path_isdir on the expanded directory name.
2411 Report and pointer to fix from Steve Rago <sar@nec-labs.com>
2412
2413 3/3
2414 ---
2415 builtins/evalstring.c
2416 - parse_and_execute: fix to change of 2/18: make sure the file
2417 descriptor being redirected to is 0 before calling cat_file when
2418 we see something like $(< file). Real fix for bug reported by
2419 Dan Douglas <ormaaj@gmail.com>
2420
2421 subst.c
2422 - parameter_brace_patsub: run the replacement string through quote
2423 removal even if the expansion is within double quotes, because
2424 the parser and string extract functions treat the quotes and
2425 backslashes as special. If they're treated as special, quote
2426 removal should remove them (this is the Posix position and
2427 compatible with ksh93). THIS IS NOT BACKWARDS COMPATIBLE.
2428
2429 3/4
2430 ---
2431 lib/readline/complete.c
2432 - rl_menu_complete: fix to make show-all-if-ambiguous and
2433 menu-complete-display-prefix work together if both are set. Fix
2434 from Sami Pietila <sami.pietila@gmail.com>
2435
2436 3/5
2437 ---
2438 bashline.c
2439 - dircomplete_expand_relpath: new variable, if non-zero, means that
2440 `shopt -s direxpand' should expand relative pathnames. Zero by
2441 default, not user-settable yet
2442 - bash_directory_completion_hook: if we have a relative pathname that
2443 isn't changed by canonicalization or spell checking after being
2444 appended to $PWD, then don't change what the user typed. Controlled
2445 by dircomplete_expand_relpath
2446
2447 3/7
2448 ---
2449 m4/timespec.m4
2450 - new macros, cribbed from gnulib and coreutils: find out whether we
2451 have `struct timespec' and what file includes it
2452
2453 m4/stat-time.m4
2454 - new macros, cribbed from gnulib and coreutils: find out whether the
2455 mtime/atime/ctime/etctime fields of struct stat are of type
2456 struct timespec, and what the name is
2457
2458 include/stat-time.h
2459 - new file, cribbed from gnulib, with additions from coreutils: include
2460 the right file to get the struct timespec define, or provide our own
2461 replacement. Provides a bunch of inline functions to turn the
2462 appropriate members of struct stat into `struct timespec' values,
2463 zeroing out the tv_nsec field if necessary
2464
2465 test.c
2466 - include "stat-time.h" for the nanosecond timestamp resolution stuff
2467 - stat_mtime: new function, returns struct stat and the mod time
2468 normalized into a `struct timespec' for the filename passed as the
2469 first argument
2470 - filecomp: call stat_mtime instead of sh_stat for each filename
2471 argument to get the mtime as a struct timespec
2472 - filecomp: call timespec_cmp instead of using a straight arithmetic
2473 comparison for the -nt and -ot operators, using timespec returned by
2474 stat_mtime. Added functionality requested by by Werner Fink
2475 <werner@suse.de> for systems that can support it
2476
2477 3/10
2478 ----
2479 include/posixdir.h
2480 - REAL_DIR_ENTRY: remove dependency on _POSIX_SOURCE, only use feature
2481 test macros to decide whether dirent.d_ino is present and usable;
2482 define D_INO_AVAILABLE. Report and fix from Fabrizion Gennari
2483 <fabrizio.ge@tiscali.it>
2484 - D_FILENO_AVAILABLE: define if we can use dirent.d_fileno
2485
2486 lib/sh/getcwd.c
2487 - use D_FILENO_AVAILABLE to decide whether or not to compile in
2488 _path_checkino and whether or not to call it. Report and initial
2489 fix from Fabrizion Gennari <fabrizio.ge@tiscali.it>
2490
2491 lib/readline/signals.c
2492 - make sure all occurrences of SIGWINCH are protected by #ifdef
2493
2494 sig.c
2495 - make sure all occurrences of SIGCHLD are protected by #ifdef
2496
2497 nojobs.c
2498 - make sure SA_RESTART is defined to 0 if the OS doesn't define it
2499
2500 version.c
2501 - show_shell_version: don't use string literals in printf, use %s.
2502 Has added benefit of removing newline from string to be translated
2503
2504 trap.c
2505 - queue_sigchld_trap: new function, increments the number of pending
2506 SIGCHLD signals by the argument, which is by convention the number
2507 of children reaped in a call to waitchld()
2508
2509 trap.h
2510 - queue_sigchld_trap: new extern declaration
2511
2512 jobs.c
2513 - waitchld: if called from the SIGCHLD signal handler (sigchld > 0),
2514 then call queue_sigchld_trap to avoid running the trap in a signal
2515 handler context. Report and original fix from Siddhesh Poyarekar
2516 <siddhesh@redhat.com>
2517
2518 lib/sh/unicode.c
2519 - u32tocesc: take an unsigned 32-bit quantity and encode it using
2520 ISO C99 string notation (\u/\U)
2521 - u32cconv: call u32tocesc as a fallback instead of u32cchar
2522 - u32cconv: call u32tocesc if iconv cannot convert the character.
2523 Maybe do the same thing if iconv_open fails
2524 - u32reset: call iconv_close on localconv if u32init == 1
2525
2526 3/11
2527 ----
2528 config-top.h
2529 - CHECKWINSIZE_DEFAULT: new define, set to initial value of
2530 check_window_size (shopt checkwinsize): 0 for off, 1 for on.
2531 Default is 0
2532
2533 {jobs,nojobs}.c
2534 - check_window_size: default initial value to CHECKWINSIZE_DEFAULT
2535
2536 3/13
2537 ----
2538 doc/bashref.texi
2539 - change text referring to the copying restrictions to that
2540 recommended by the FSF (no Front-Cover Texts and no Back-Cover
2541 Texts)
2542
2543 lib/readline/doc/{history,rlman,rluserman}.texi
2544 - change text referring to the copying restrictions to that
2545 recommended by the FSF (no Front-Cover Texts and no Back-Cover
2546 Texts)
2547
2548 3/15
2549 ----
2550 array.c
2551 - LASTREF_START: new macro to set the starting position for an array
2552 traversal to `lastref' if that's valid, and to the start of the array
2553 if not. Used in array_reference, array_insert, array_remove
2554 - array_remove: try to be a little smarter with lastref instead of
2555 unconditionally invalidating it
2556
2557 3/16
2558 ----
2559 array.c
2560 - array_insert: fix memory leak by deleting element to be added in the
2561 case of an error
2562
2563 3/18
2564 ----
2565 lib/sh/mbschr.c
2566 - mbschr: don't call mbrlen unless is_basic is false; devolves to a
2567 straight character-by-character run through the string
2568
2569 3/19
2570 ----
2571 stringlib.c
2572 - substring: use memcpy instead of strncpy, since we know the length
2573 and are going to add our own NUL terminator
2574
2575 3/20
2576 ----
2577 subst.c
2578 - parameter_brace_expand_rhs: if expand_string_for_rhs returns a quoted
2579 null string (a list with one element for which
2580 QUOTED_NULL(list->word->word) returns true), return the quoted null
2581 and set the flags in the returned word to indicate it. Fixes bug
2582 reported by Mark Edgar <medgar123@gmail.com>
2583
2584 lib/sh/tmpfile.c
2585 - use random(3) instead of get_random_number to avoid perturbing the
2586 random sequence you get using $RANDOM. Bug report and fix from
2587 Jurij Mihelic <jurij.mihelic@fri.uni-lj.si>
2588
2589 3/21
2590 ----
2591 config-top.h
2592 - OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT: define to 1 to optimize
2593 sequential indexed array assignment patterns. Defined to 1 by
2594 default
2595
2596 array.c
2597 - array_insert: if OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT is defined,
2598 start the search at lastref (see change from 3/15)
2599
2600 3/27
2601 ----
2602 print_cmd.c
2603 - debug_print_word_list: new debugging function, prints a word list
2604 preceded by an optional string and using a caller-specified
2605 separator
2606
2607 4/1
2608 ---
2609 command.h
2610 - W_ASSNGLOBAL: new flag, set to indicate declare -g
2611
2612 execute_cmd.c
2613 - fix_assignment_words: note that we have a -g argument to an assignment
2614 builtin and set the W_ASSNGLOBAL flag in the variable word
2615
2616 subst.c
2617 - dump_word_flags: print out W_ASSNGLOBAL if present
2618 - do_assignment_internal: only set ASS_MKLOCAL if W_ASSIGNARG is set
2619 and W_ASSNGLOBAL is not. Don't want to create a local variable even
2620 if variable_context is non-zero if ASSNGLOBAL is set. Fixes bug
2621 reported by Bill Gradwohl <bill@ycc.com>
2622
2623 4/7
2624 ---
2625 lib/readline/readline.c
2626 - _rl_dispatch_subseq: make the `keyseq-timeout' variable apply to
2627 ESC processing when in vi mode. After hitting ESC, readline will
2628 wait up to _rl_keyseq_timeout*1000 microseconds (if set) for
2629 additional input before dispatching on the ESC and switching to
2630 command/movement mode. Completes timeout work suggested by
2631 <rogerx.oss@gmail.com>; this prompted by report from Barry Downes
2632 <barry.downes@gmail.com>
2633
2634 lib/sh/shmbchar.c
2635 - sh_mbsnlen: new function, returns the number of (possibly multibyte)
2636 characters in a passed string with a passed length, examining at most
2637 maxlen (third argument) bytes
2638
2639 externs.h
2640 - sh_mbsnlen: extern declaration for new function
2641
2642 shell.c
2643 - exit_shell: call maybe_save_shell_history if remember_on_history is
2644 set, not just in interactive shells. That means the history is
2645 saved if history is enabled, regardless of whether or not the shell
2646 is interactive
2647
2648 doc/{bash.1,bashref.texi}
2649 - TMOUT: fix description to make it explicit that TMOUT is the timeout
2650 period for a complete line of input, not just any input. Fixes
2651 problem reported in Ubuntu bug 957303:
2652 https://bugs.launchpad.net/ubuntu/+source/bash/+bug/957303
2653 - HISTFILE: document change to write history list to history file in
2654 any shell with history enabled, not just interactive shells. This
2655 seems to be more logical behavior. Suggested by Greg Wooledge
2656 <wooledg@eeg.ccf.org>
2657
2658 4/12
2659 ----
2660 lib/readline/colors.h
2661 - only include stdbool.h if HAVE_STDBOOL_H is defined
2662 - if HAVE_STDBOOL_H is not defined, provide enough definition for the
2663 library to use `bool', `true', and `false'
2664
2665 lib/readline/parse-colors.[ch]
2666 - don't try to include <stdbool.h> at all; rely on colors.h to do it
2667
2668 lib/sh/snprintf.c
2669 - vsnprintf_internal: only treat '0' as a flag to indicate zero padding
2670 if `.' hasn't been encountered ((flags&PF_DOT) == 0); otherwise treat
2671 it as the first digit of a precision specifier. Fixes bug reported
2672 by Petr Sumbera <petr.sumbera@sun.com>
2673
2674 4/15
2675 ----
2676 lib/sh/snprintf.c
2677 - vsnprintf_internal: if the '0' and '-' flags both occur, the '0'
2678 flag is ignored -- Posix. Start of a series of fixes based on
2679 tests and patches from Petr Sumbera <petr.sumbera@sun.com>
2680 - PUT_PLUS: make sure PF_PLUS flag is specified before putting the `+'
2681 - vsnprintf_internal: when '+' is read as a flag, don't set right-
2682 justify flag if the LADJUST (`-') flag has already been supplied
2683 - floating: make sure to output space padding before the `+', zero
2684 padding after
2685 - exponent: make sure to output space padding before the `+', zero
2686 padding after
2687 - exponent: only subtract one from the width for the decimal point
2688 if we're really going to print one
2689 - floating: use presence of PF_PLUS flag to decide whether to account
2690 for the `+' in the padded field width. Ditto for exponent()
2691
2692 4/16
2693 ----
2694 lib/sh/snprintf.c
2695 - vsnprint_internal: only reduce precision by 1 when processing the `g'
2696 format if it's > 0. A precision of 0 should stay 0; otherwise it
2697 gets set to -1 (NOT_FOUND) and converted to the default
2698 - number, lnumber: if an explicit precision is supplied, turn off the
2699 zero-padding flag and set the pad character back to space
2700 - number, lnumber: only account for a `+' when performing the field
2701 width calculation if the coversion is base 10; we don't add a `+'
2702 for other bases
2703
2704 4/18
2705 ----
2706 tests/printf3.sub
2707 - try using "perl -e 'print time'" to get the current time in seconds
2708 since the epoch if "date +%s" is not available (solaris 8-10)
2709
2710 4/19
2711 ----
2712 tests/run-printf
2713 - use cat -v instead of relying on diff -a being available to convert
2714 control characters to ascii and avoid the dreaded "Binary files
2715 /tmp/xx and printf.right differ"
2716
2717 4/20
2718 ----
2719 lib/sh/strftime.c
2720 - incoporated new version from Aharon Robbins <arnold@skeeve.com>
2721
2722 4/22
2723 ----
2724 doc/{bash.1,bashref.texi}
2725 - slight change to the description of /dev/tcp and /dev/udp
2726
2727 subst.c
2728 - match_wpattern: logic fix to the calculation of `simple' (was |=,
2729 needs to be &=). Bug report from Mike Frysinger <vapier@gentoo.org>,
2730 fix from Andreas Schwab <schwab@linux-m68k.org>
2731
2732 bashline.c
2733 - bash_filename_stat_hook: add code from bash_directory_completion_hook
2734 that performs pathname canonicalization in the same way that cd and
2735 other builtins will do
2736
2737 4/25
2738 ----
2739 execute_cmd.c
2740 - execute_pipeline: change the call to move_to_high_fd to make it use
2741 getdtablesize() and to not stomp on existing open file descriptors,
2742 like the fd the shell is using to read a script. Bug report from
2743 Greg Wooledge <wooledg@eeg.ccf.org>
2744
2745 5/6
2746 ---
2747 subst.c
2748 - expand_word_internal: case '$': after calling param_expand and
2749 setting had_quoted_null, set TEMP to null. The code that builds the
2750 returned string at the end of the function will take care of making
2751 and returning a quoted null string if there's nothing else in
2752 ISTRING. If there is, the quoted null should just go away. Part of
2753 fix for bug reported by Ruediger Kuhlmann <RKuhlmann@orga-systems.com>
2754 - expand_word_internal: when processing ISTRING to build return value,
2755 only set W_HASQUOTEDNULL in the returned word flags if the word is
2756 a quoted null string AND had_quoted_null is set. Rest of fix
2757
2758 5/9
2759 ---
2760 variables.c
2761 - bind_variable_internal: if we get an array variable here (implicit
2762 assignment to index 0), call make_array_variable_value, which
2763 dummies up a fake SHELL_VAR * from array[0]. This matters when
2764 we're appending and have to use the current value
2765 - bind_variable_internal: after computing the new value, treat assoc
2766 variables with higher precedence than simple array variables; it
2767 might be that a variable has both attributes set
2768
2769 arrayfunc.c
2770 - bind_array_var_internal: break code out that handles creating the
2771 new value to be assigned to an array variable index into a new
2772 function, make_array_variable_value. This handles creating a
2773 dummy SHELL_VAR * for implicit array[0] assignment. Fixes bug
2774 reported by Dan Douglas <ormaaj@gmail.com>
2775
2776 arrayfunc.h
2777 - make_array_variable_value: new extern declaration
2778
2779 5/19
2780 ----
2781 variables.c
2782 - bind_int_variable: if an assignment statement like x=y comes in
2783 from the expression evaluator, and x is an array, handle it like
2784 x[0]=y. Fixes bug reported by Dan Douglas <ormaaj@gmail.com>
2785
2786 5/24
2787 ----
2788
2789 braces.c
2790 - mkseq: handle possible overflow and break the sequence generating
2791 loop if it occurs. Fixes OpenSUSE bug 763591:
2792 https://bugzilla.novell.com/show_bug.cgi?id=763591
2793
2794 5/25
2795 ----
2796 Makefile.in
2797 - LDFLAGS_FOR_BUILD: add to compilation recipes for build tools
2798 buildversion, mksignames, mksyntax
2799 - LDFLAGS_FOR_BUILD: add to compilation recipes for test tools
2800 recho, zecho, printenv, xcase
2801
2802 builtins/Makefile.in
2803 - LDFLAGS_FOR_BUILD: add to compilation recipes for build tools
2804 gen-helpfiles, psize.aux
2805
2806 variables.c
2807 - bind_int_variable: if LHS is a simple variable name without an array
2808 reference, but resolves to an array variable, call
2809 bind_array_variable with index 0 to make x=1 equivalent to x[0]=1.
2810 Fixes bug reported by Dan Douglas <ormaaj@gmail.com>
2811
2812 5/27
2813 ----
2814 subst.c
2815 - expand_word_internal: make sure has_dollar_at doesn't get reset before
2816 recursive calls to param_expand or expand_word_internal, since it has
2817 to save state of what came before. Use temp variable and make sure
2818 has_dollar_at is incremented if recursive call processes "$@".
2819 Fixes bug reported by gregrwm <backuppc-users@whitleymott.net> and
2820 supplemented by Dan Douglas <ormaaj@gmail.com>
2821
2822 doc/{bash.1,bashref.texi}
2823 - changes to the description of substring expansion inspired by
2824 suggestions from Bill Gradwohl <bill@ycc.com>
2825
2826 doc/bashref.texi
2827 - added substring expansion examples inspired by suggestions from
2828 Bill Gradwohl <bill@ycc.com>
2829
2830 variables.c
2831 - find_shell_variable: search for a variable in the list of shell
2832 contexts, ignore the temporary environment
2833 - find_variable_tempenv: search for a variable in the list of shell
2834 contexts, force search of the temporary environment
2835 - find_variable_notempenv: search for a variable in the list of shell
2836 contexts, don't force search of the temporary environment
2837
2838 variables.h
2839 - find_shell_variable: extern declaration
2840 - find_variable_tempenv: extern declaration
2841 - find_variable_notempenv: extern declaration
2842
2843 arrayfunc.c
2844 - bind_array_variable: call find_shell_variable instead of calling
2845 var_lookup directly
2846
2847 findcmd.c
2848 - search_for_command: call find_variable_tempenv instead of
2849 find_variable_internal directly
2850 - _find_user_command_internal: call find_variable_tempenv instead of
2851 find_variable_internal directly
2852
2853 builtins/setattr.def
2854 - set_var_attribute: call find_variable_notempenv instead of
2855 find_variable_internal directly
2856 - show_name_attributes: call find_variable_tempenv instead of
2857 find_variable_internal directly
2858
2859 6/1
2860 ---
2861 sig.c
2862 - termsig_handler: don't try to save the shell history on a terminating
2863 signal any more, since it just causes too many problems on Linux
2864 systems using glibc and glibc malloc
2865
2866 lib/readline/vi_mode.c
2867 - rl_vi_change_to: change to correctly redo `cc', since `c' is not a vi
2868 motion character. From Red Hat bug 813289
2869 - rl_vi_delete_to: change to correctly redo `dd', since `d' is not a vi
2870 motion character
2871 - rl_vi_yank_to: change to correctly redo `yy', since `y' is not a vi
2872 motion character
2873
2874 6/4
2875 ---
2876 lib/sh/mktime.c
2877 - current versions of VMS do not need to include <stddef.h>. Fix from
2878 John E. Malmberg <wb8tyw@qsl.net>
2879
2880 6/5
2881 ---
2882 lib/sh/eaccess.c
2883 - sh_stat: instead of using a static buffer to do the DEV_FD_PREFIX
2884 translation, use a dynamically-allocated buffer that we keep
2885 resizing. Fixes potential security hole reported by David Leverton
2886 <levertond@googlemail.com>
2887
2888 6/5
2889 ---
2890 braces.c
2891 - expand_seqterm: check errno == ERANGE after calling strtoimax for
2892 rhs and incr. Part of a set of fixes from Scott McMillan
2893 <scotty.mcmillan@gmail.com>
2894 - expand_seqterm: incr now of type `intmax_t', which changes
2895 arguments to mkseq
2896 - mkseq: a better fix for detecting overflow and underflow since it's
2897 undefined in C and compilers `optimize' out overflow checks. Uses
2898 ADDOVERFLOW and SUBOVERFLOW macros
2899 - mkseq: use sh_imaxabs (new macro) instead of abs() for intmax_t
2900 variables
2901 - mkseq: don't allow incr to be converted to -INTMAX_MIN
2902 - mkseq: make sure that strvec_create isn't called with a size argument
2903 greater than INT_MAX, since it only takes an int
2904
2905 6/6
2906 ---
2907 braces.c
2908 - mkseq: try and be smarter about not overallocating elements in
2909 the return array if the increment is not 1 or -1
2910
2911 6/7
2912 ---
2913 parse.y
2914 - history_delimiting_chars: if the parser says we're in the middle of
2915 a compound assignment (PST_COMPASSIGN), just return a space to avoid
2916 adding a stray semicolon to the history entry. Fixes bug reported
2917 by "Davide Brini" <dave_br@gmx.com>
2918
2919 6/8
2920 ---
2921 bashline.c
2922 - bash_directory_completion_hook: don't attempt spelling correction
2923 on the directory name unless the direxpand option is set and we are
2924 going to replace the directory name with the corrected one in the
2925 readline line. Suggested by Linda Walsh <bash@tlinx.org>
2926
2927 lib/sh/shquote.c
2928 - sh_backslash_quote: now takes a third argument: flags. If non-zero,
2929 tildes are not backslash-escaped. Have to handle both printf %q,
2930 where they should be escaped, and filename completion, where they
2931 should not when used as usernames
2932
2933 externs.h
2934 - sh_backslash_quote: declaration now takes a third argument
2935
2936 builtins/printf.def
2937 - printf_builtin: call sh_backslash_quote with 1 as third argument
2938 so tildes get escaped
2939
2940 {bashline,bracecomp}.c
2941 - call sh_backslash_quote with 0 as third argument so tildes are not
2942 escaped in completed words
2943
2944 doc/bash.1
2945 - add `coproc' to the list of reserved words. From a report by
2946 Jens Schweikhardt <schweikh@schweikhardt.net>
2947
2948 6/10
2949 ----
2950 execute_cmd.c
2951 - line_number_for_err_trap: now global, so parse_and_execute can save
2952 and restore it with unwind-protect
2953
2954 builtins/evalstring.c
2955 - parse_prologue: save and restore line_number_for_err_trap along
2956 with line_number
2957 - restore_lastcom: new function, unwind-protect to restore
2958 the_printed_command_except_trap
2959 - parse_prologue: use restore_lastcom to save and restore the value
2960 of the_printed_command_except_trap around calls to parse_and_execute
2961 (eval/source/.)
2962
2963 6/15
2964 ----
2965 lib/readline/complete.c
2966 - complete_fncmp: change filename comparison code to understand
2967 multibyte characters, even when doing case-sensitive or case-mapping
2968 comparisons. Fixes problem reported by Nikolay Shirokovskiy
2969 <nshyrokovskiy@gmail.com>
2970
2971 6/20
2972 ----
2973 builtins/mapfile.def
2974 - mapfile: move the line count increment and check for having read
2975 the specified number of lines to the end of the loop to avoid
2976 reading an additional line with zgetline. Fixes bug reported by
2977 Dan Douglas <ormaaj@gmail.com>
2978
2979 6/21
2980 ----
2981
2982 execute_cmd.c
2983 - execute_pipeline: make sure `lastpipe_flag' is initialized to 0 on
2984 all systems, since it's tested later in the function. Fixes bug
2985 reported by John E. Malmberg <wb8tyw@qsl.net>
2986
2987 6/22
2988 ----
2989 mailcheck.c
2990 - file_mod_date_changed: return 0 right away if mailstat() does not
2991 return success. Fixes bug with using uninitialized values reported
2992 by szymon.kalasz@uj.edu.pl
2993
2994 builtins/set.def
2995 - the `monitor' option is not available when the shell is compiled
2996 without job control, since the underlying `m' flag is not available
2997
2998 nojobs.c
2999 - job_control: now declared as int variable, initialized to 0, never
3000 modified
3001
3002 jobs.h
3003 - job_control: extern declaration no longer dependent on JOB_CONTROL
3004
3005 execute_cmd.c
3006 - execute_pipeline: made necessary changes so `lastpipe' shell option
3007 is now available in all shells, even those compiled without
3008 JOB_CONTROL defined
3009
3010 6/23
3011 ----
3012 lib/glob/glob.c
3013 - glob_filename: check for interrupts before returning if glob_vector
3014 returns NULL or an error. Bug reported by Serge van den Boom
3015 <svdb@stack.nl>, fix from Andreas Schwab <schwab@linux-m68k.org>
3016 - call run_pending_traps after each call to QUIT or test of
3017 interrupt_state, like we do in mainline shell code
3018 - glob_vector: don't call QUIT; in `if (lose)' code block; just free
3019 memory, return NULL, and let callers deal with interrupt_state or
3020 other signals and traps
3021
3022 6/25
3023 ----
3024 lib/readline/input.c
3025 - rl_read_key: restructure the loop that calls the event hook a little,
3026 so that the hook is called only after rl_gather_tyi returns no input,
3027 and any pending input is returned first. This results in better
3028 efficiency for processing pending input without calling the hook
3029 on every input character as bash-4.1 did. From a report from
3030 Max Horn <max@quendi.de>
3031
3032 6/26
3033 ----
3034 trap.c
3035 - signal_is_pending: return TRUE if SIG argument has been received and
3036 a trap is waiting to execute
3037
3038 trap.h
3039 - signal_is_pending: extern declaration
3040
3041 lib/glob/glob.c
3042 - glob_vector: check for pending SIGINT trap each time through the loop,
3043 just like we check for interrupt_state or terminating_signal, and
3044 set `lose = 1' so we clean up after ourselves and interrupt the
3045 operation before running the trap. This may require a change later,
3046 maybe call run_pending_traps and do that if run_pending_traps returns?
3047
3048 variables.c
3049 - sv_histtimefmt: set history_comment_character to default (`#') if
3050 it's 0 when we're turning on history timestamps. The history code
3051 uses the history comment character to prefix timestamps, and
3052 leaving it at 0 effectively removes them from the history. From a
3053 report to help-bash by Dennis Williamson <dennistwilliamson@gmail.com>
3054
3055 6/27
3056 ----
3057 lib/readline/signals.c
3058 - rl_maybe_restore_sighandler: new function, sets handler for SIG to
3059 HANDLER->sa_handler only if it's not SIG_IGN. Needs to be called
3060 on same signals set using rl_maybe_set_sighandler, which does not
3061 override an existing SIG_IGN handler (SIGALRM is ok since it does
3062 the check inline; doesn't mess with SIGWINCH)
3063
3064 6/30
3065 ----
3066 variables.h
3067 - additional defines for the new `nameref' variable attribute
3068 (att_nameref): nameref_p, nameref_cell, var_setref
3069
3070 variables.c
3071 - find_variable_nameref: resolve SHELL_VAR V through chain of namerefs
3072 - find_variable_last_nameref: resolve variable NAME until last in a
3073 chain of possibly more than one nameref starting at shell_variables
3074 - find_global_variable_last_nameref: resolve variable NAME until last
3075 in a chain of possibly more than one nameref starting at
3076 global_variables
3077 - find_nameref_at_context: resolve SHELL_VAR V through chain of namerefs
3078 in a specific variable context (usually a local variable hash table)
3079 - find_variable_nameref_context: resolve SHELL_VAR V through chain of
3080 namerefs following a chain of varible contexts
3081 - find_variable_last_nameref_context: resolve SHELL_VAR V as in
3082 find_variable_last_context, but return the final nameref instead of
3083 what the final nameref resolves to
3084 - find_variable_tempenv, find_variable_notempenv, find_global_variable,
3085 find_shell_variable, find_variable: modified to follow namerefs
3086 - find_global_variable_noref: look up a global variable without following
3087 any namerefs
3088 - find_variable_noref: look up a shell variable without following any
3089 namerefs
3090 - bind_variable_internal: modify to follow a chain of namerefs in the
3091 global variables table; change to handle assignments to a nameref by
3092 following nameref chain
3093 - bind_variable: modify to follow chain of namerefs when binding to a
3094 local variable
3095 - unbind_variable: changes to unset nameref variables (unsets both
3096 nameref and variable it resolves to)
3097
3098 subst.c
3099 - parameter_brace_expand_word: change to handle expanding nameref whose
3100 value is x[n]
3101 - parameter_brace_expand_indir: change to expand in ksh93-compatible
3102 way if variable to be indirected is nameref and a simple (non-array)
3103 expansion
3104 - param_expand: change to expand $foo where foo is a nameref whose value
3105 is x[n]
3106
3107 execute_cmd.c
3108 - execute_for_command: changes to implement ksh93 semantics when index
3109 variable is a nameref
3110
3111 builtins/setattr.def
3112 - show_var_attributes: change to add `n' to flags list if att_nameref
3113 is set
3114
3115 builtins/set.def
3116 - unset_builtin: changes to error messages to follow nameref variables
3117
3118 builtins/declare.def
3119 - document new -n option
3120 - declare_internal: new `-n' and `+n' options
3121 - declare_internal: handle declare -n var[=value] and
3122 declare +n var[=value] for existing and non-existant variables.
3123 Enforce restriction that nameref variables cannot be arrays.
3124 Implement semi-peculiar ksh93 semantics for typeset +n ref=value
3125
3126 7/5
3127 ---
3128 variables.c
3129 - unbind_variable: unset whatever a nameref resolves to, leaving the
3130 nameref variable itself alone
3131 - unbind_nameref: new function, unsets a nameref variable, not the
3132 variable it references
3133
3134 variables.h
3135 - unbind_nameref: extern declaration
3136
3137 builtins/set.def
3138 - unset_builtin: modify to add -n option, which calls unbind_nameref
3139 leaving unbind_variable for the usual case. This required slight
3140 changes and additions to the test suite
3141
3142 doc/{bash.1,bashref.texi}
3143 - document namerefs and typeset/declare/local/unset -n
3144
3145 7/13
3146 ----
3147 lib/sh/casemod.c
3148 - include shmbchar.h for is_basic and supporting pieces
3149 - sh_casemod: use _to_wupper and _to_wlower to convert wide character
3150 case instead of TOUPPER and TOLOWER. Fixes bug reported by
3151 Dennis Williamson <dennistwilliamson@gmail.com>, fix from
3152 Andreas Schwab <schwab@linux-m68k.org>
3153 - cval: short-circuit and return ascii value if is_basic tests true
3154 - sh_casemod: short-circuit and use non-multibyte case modification
3155 and toggling code if is_basic tests true
3156
3157 lib/readline/signals.c
3158 - _rl_{block,release}_sigint: remove the code that actually blocks and
3159 releases the signals, since we defer signal handling until calls to
3160 RL_CHECK_SIGNALS()
3161
3162 lib/readline/{callback,readline,util}.c
3163 - if HAVE_POSIX_SIGSETJMP is defined, use sigsetjmp/siglongjmp without
3164 saving and restoring the signal mask instead of setjmp/longjmp
3165
3166 lib/readline/rltty.c
3167 - prepare_terminal_settings: don't mess with IXOFF setting if
3168 USE_XON_XOFF defined
3169
3170 doc/{bash.1,bashref.texi}
3171 - add some text to the description of set -e clarifying its effect
3172 on shell functions and shell function execution. Suggested by
3173 Rainer Blome <rainer.blome@gmx.de>
3174
3175 bashline.c
3176 - edit_and_execute_command: increment current_command_line_count before
3177 adding partial line to command history (for command-oriented-history
3178 because of rl_newline at beginning of function), then reset it to 0
3179 before adding the dummy history entry to make sure the dummy entry
3180 doesn't get added to previous incomplete command. Partial fix for
3181 problem reported by Peng Yu <pengyu.ut@gmail.com>
3182
3183 7/24
3184 ----
3185 configure.in
3186 - interix: define RECYCLES_PIDS. Based on a report from Michael
3187 Haubenwallner <michael.haubenwallner@salomon.at>
3188
3189 7/26
3190 ----
3191 jobs.c
3192 - make_child: call bgp_delete on the newly-created pid unconditionally.
3193 Some systems reuse pids before cycling through an entire set of
3194 CHILD_MAX/_SC_CHILD_MAX unique pids. This is no longer dependent
3195 on RECYCLES_PIDS. Based on a report from Michael Haubenwallner
3196 <michael.haubenwallner@salomon.at>
3197
3198 support/shobj-conf
3199 - Mac OS X: drop MACOSX_DEPLOYMENT_TARGET=10.3 from the LDFLAGS. We
3200 can finally kill Panther
3201
3202 7/28
3203 ----
3204 subst.c
3205 - command_substitute: make sure last_made_pid gets reset if make_child
3206 fails
3207
3208 execute_cmd.c
3209 - execute_command_internal: case cm_simple: decide whether or not to
3210 wait_for a child if already_making_children is non-zero, indicates
3211 that there is an unwaited-for child. More of fix for bug report
3212 from Michael Haubenwallner <michael.haubenwallner@salomon.at>
3213
3214 jobs.c
3215 - make_child: call delete_old_job (new_pid) unconditionally, don't
3216 bother to check whether or not pid wrap occurred. Rest of fix for
3217 bug report from Michael Haubenwallner
3218 <michael.haubenwallner@salomon.at>
3219
3220 7/29
3221 ----
3222 shell.c
3223 - subshell_exit: new function, exits the shell (via call to sh_exit())
3224 after calling any defined exit trap
3225
3226 externs.h
3227 - subshell_exit: new extern declaration
3228
3229 execute_cmd.c
3230 - execute_command_internal: make sure to call subshell_exit for
3231 {} group commands executed asynchronously (&). Part of fix for
3232 EXIT trap bug reported by Maarten Billemont <lhunath@lyndir.com>
3233
3234 sig.c
3235 - reset_terminating_signals: make sure to set termsigs_initialized back
3236 to 0, so a subsequent call to initialize_terminating_signals works
3237 right. Rest of fix for bug reported by Maarten Billemont
3238 <lhunath@lyndir.com>
3239
3240 {execute_cmd,general,jobs,mailcheck,mksyntax,test}.c
3241 builtins/{cd,fc,pushd,ulimit}.def
3242 lib/malloc/getpagesize.h
3243 lib/sh/{clktck,fpurge,inet_aton,mailstat,oslib,pathcanon,pathphys,spell,strerror}.c
3244 - make inclusion of <sys/param.h> dependent on HAVE_SYS_PARAM_H
3245 consistently
3246
3247 8/6
3248 ---
3249 lib/readline/histexpand.c
3250 - history_expand_internal: now takes an additional argument saying
3251 whether the history expansion occurs within a quoted string, set to
3252 the open quote character
3253 - history_expand_internal: use new argument instead of checking prev
3254 char and initializing quoted_search_delimiter, pass qc directly to
3255 get_history_event, where it allows a matching quote to terminate a
3256 string defining an event
3257 - history_expand: change single-quote handling code so that if
3258 history_quotes_inhibit_expansion is 0, single quotes are treated
3259 like double quotes
3260 - history_expand: change call to history_expand_internal to pass new
3261 argument of `"' if double-quoted string, `'' if single-quoted string;
3262 this lets history_expand decide what is a quoted string and what
3263 is not
3264
3265 8/7
3266 ---
3267 configure.in
3268 - AC_CANONICAL_BUILD: invoke for later use
3269
3270 lib/readline/macro.c
3271 - _rl_prev_macro_key: new function, inverse of _rl_next_macro_key:
3272 backs up the index into the current macro by 1
3273
3274 lib/readline/rlprivate.h
3275 - _rl_prev_macro_key: extern declaration
3276
3277
3278 lib/readline/readline.c
3279 - _rl_dispatch_subseq, _rl_subseq_result: don't call _rl_unget_char
3280 if we're currently reading from a macro; call _rl_prev_macro_key
3281 instead. Fixes bug reported by Clark Wang <clark.wang@oracle.com>
3282
3283 8/13
3284 ----
3285 builtins/evalstring.c
3286 - evalstring(): new function, wrapper around parse_and_execute.
3287 make sure we handle cases where parse_and_execute can call `return'
3288 and short-circuit without cleaning up properly. We call
3289 parse_and_execute_cleanup() then jump to the previous-saved return
3290 location
3291
3292 builtins/common.h
3293 - extern declaration for evalstring()
3294
3295 builtins/eval.def
3296 - eval_builtin: make sure we handle `eval " ... return"' in contexts
3297 where `return' is valid by calling evalstring(). Fixes bug with
3298 `eval return' in sourced files reported by Clark Wang
3299 <dearvoid@gmail.com>
3300
3301 trap.c
3302 - run_pending_traps: call evalstring instead of parse_and_execute.
3303 XXX - still needs to handle saving and restoring token state in the
3304 presence of `return'; could use unwind_protects for that
3305
3306 builtins/mapfile.def
3307 - run_callback: call evalstring instead of parse_and_execute
3308
3309 8/15
3310 ----
3311 bashline.c
3312 - bash_filename_stat_hook: make sure we don't free local_dirname
3313 before using it to canonicalize any expanded filename. Make sure
3314 it always points to *dirname and only free it if we're replacing
3315 it.
3316
3317 lib/readline/complete.c
3318 - append_to_match: make sure we call rl_filename_stat_hook with
3319 newly-allocated memory to avoid problems with freeing it twice
3320
3321 8/17
3322 ----
3323 variables.c,config-top.h
3324 - if ARRAY_EXPORT is defined to 1 when variables.c is compiled, the
3325 code that allows indexed arrays to be exported is enabled and
3326 included
3327
3328 8/19
3329 ----
3330 shell.c
3331 - call start_debugger from main() only if dollar_vars[1] != 0 (close
3332 enough to a non-interactive shell, since we can be interactive with
3333 -i while running a shell script). Fixes oddity reported by
3334 Techlive Zheng <techlivezheng@gmail.com>
3335
3336 8/20
3337 ----
3338 arrayfunc.c
3339 - quote_array_assignment_chars: don't bother quoting if the word has
3340 not been marked as an assignment (W_ASSIGNMENT)
3341 - quote_array_assignment_chars: turn on W_NOGLOB in the word flags
3342 so assignment statements don't undergo globbing. Partial fix for
3343 problems reported by Dan Douglas <ormaaj@gmail.com>
3344
3345 8/21
3346 ----
3347 command.h
3348 - W_NOBRACE: new word flag that means to inhibit brace expansion
3349
3350 subst.c
3351 - brace_expand_word_list: suppress brace expansion for words with
3352 W_NOBRACE flag
3353
3354 8/22
3355 ----
3356 builtins/read.def
3357 - read_builtin: don't call dequote_string on what we've read, even if
3358 we saw an escape character, unless (input_string && *input_string).
3359 We may have escaped an IFS whitespace character. Fixes seg fault
3360 reported by <armandsl@gmail.com>
3361
3362 execute_cmd.c
3363 - execute_command_internal: set the_printed_command_except trap when
3364 about to execute a ( ... ) user subshell. For now, set it only if
3365 ERR is trapped; can relax that later. Fixes bug reported by
3366 Mike Frysinger <vapier@gentoo.org>
3367
3368 8/23
3369 ----
3370 jobs.c
3371 - remove references to first_pid and pid_wrap, since we're not using
3372 them for anything anymore
3373
3374 8/24
3375 ----
3376 subst.c
3377 - changes for W_NOBRACE everywhere appropriate: so it can be displayed
3378 for debugging, and passed out of expand_word_internal
3379
3380 doc/{bash.1,bashref.texi}
3381 - small changes to make it clearer that the = and == operators are
3382 equivalent, and will cause pattern matching when used with [[.
3383 From a question from Michal Soltys <soltys@ziu.info>
3384
3385 doc/bashref.texi
3386 - some small formatting changes from Karl Berry <karl@freefriends.org>
3387
3388 8/27
3389 ----
3390 lib/readline/doc/{history,rlman,rluserman}.texi
3391 - some small formatting changes from Karl Berry <karl@freefriends.org>
3392
3393 arrayfunc.c
3394 - assign_array_element_internal, assign_compound_array_list,
3395 unbind_array_element, array_value_internal: changes to make
3396 assignment statements to negative indices (a[-1]=2) and unsetting
3397 array elements using negative indices (unset 'a[-1]') work.
3398 From suggestions by Dennis Williamson <dennistwilliamson@gmail.com>
3399 and Chris F. A. Johnson <chris@cfajohnson.com>
3400
3401 subst.c
3402 - array_length_reference: changes to make length references to array
3403 elements using negative indices (${#a[-1]}) work
3404
3405 8/28
3406 ----
3407 doc/{bash.1,bashref.texi}
3408 - document new treatment of negative indices to indexed arrays when
3409 assigning, referencing, calculating length, and unsetting
3410
3411 8/29
3412 ----
3413 shell.c
3414 - show_shell_usage: add -l to list of shell invocation options (short
3415 for --login). From Red Hat bug 852469
3416
3417 configure.ac
3418 - renamed from configure.in, as latest autoconf versions want. Patches
3419 Stefano Lattarini <stefano.lattarini@gmail.com>
3420
3421 MANIFEST,Makefile.in,doc/bashref.texi,support/mkconffiles
3422 - configure.in -> configure.ac
3423
3424 9/1
3425 ---
3426
3427 parse.y
3428 - read_token_word: allow words like {array[ind]} to be valid redirection
3429 words for constructs like {x}<file
3430
3431 redir.c
3432 - redir_varassign: bind_var_to_int already handles array assignments,
3433 so don't need to do anything more for things like {a[i]}<file
3434 - redir_varvalue: changes to allow references to {a[i]} when
3435 performing redirections using valid_array_reference and
3436 get_array_value. Adds functionality requested most recently by
3437 <unknown@vmw-les.eng.vmware.com>
3438
3439 lib/readline/display.c
3440 - update_line: if the first difference between the old and new lines
3441 is completely before any invisible characters in the prompt, we
3442 should not adjust _rl_last_c_pos, since it's before any invisible
3443 characters. Fixed in two places
3444 - prompt_modechar: return a character indicating the editing mode:
3445 emacs (@), vi command (:), or vi insert (+)
3446 - _rl_reset_prompt: new function, just calls rl_expand_prompt. Will be
3447 inlined, placeholder for more changes
3448 - expand_prompt: if show-mode-in-prompt is enabled, add a character to
3449 the front of the prompt indicating the editing mode, adjusting the
3450 various variables as appropriate to keep track of the number of
3451 visible characters and number of screen positions
3452
3453 lib/readline/bind.c
3454 - show-mode-in-prompt: new bindable boolean variable, shadowed by
3455 _rl_show_mode_in_prompt variable
3456 - hack_special_boolean_var: call _rl_reset_prompt when toggling or
3457 setting show-mode-in-prompt
3458
3459 lib/readline/readline.c
3460 - readline_internal_setup: make sure the correct vi mode keymap is set
3461 before expanding the prompt string for the first time
3462
3463 lib/readline/misc.c
3464 - rl_emacs_editing_mode: make sure to call _rl_reset_prompt if we're
3465 showing the editing mode in the prompt
3466
3467 lib/readline/rlprivate.h
3468 - _rl_reset_prompt, _rl_show_mode_in_prompt: extern declarations
3469
3470 lib/readline/vi_mode.c
3471 - rl_vi_insertion_mode: call _rl_reset_prompt
3472 - rl_vi_movement_mode: call _rl_reset_prompt. Finishes changes for
3473 showing mode in prompt string, originally requested by Miroslav
3474 Koskar <mkoskar@gmail.com> and most recently by Jordan Michael
3475 Ziegler <jziegler@bnl.gov>
3476
3477 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
3478 - document new show-mode-in-prompt variable, off by default
3479
3480 9/3
3481 ---
3482
3483 jobs.c
3484 - set_childmax: new function, external mechanism for other parts of
3485 the shell to set js.c_childmax, the number of saved exited child
3486 statuses to remember
3487 jobs.h
3488 - set_childmax: extern declaration
3489
3490 variables.c
3491 - CHILD_MAX: new special variable, with sv_childmax function to
3492 run when it changes. Setting CHILD_MAX to a value greater than
3493 zero but less than some maximum (currently 8192) sets the number of
3494 exited child statuses to remember. set_childmax (jobs.c) ensures
3495 that the number does not drop below the posix-mandated minimum
3496 (CHILD_MAX)
3497
3498 doc/{bash.1,bashref.texi}
3499 - CHILD_MAX: document new meaning and action when variable is set
3500
3501 9/5
3502 ---
3503 redir.c
3504 - redir_varassign: call stupidly_hack_special_variables after
3505 assigning fd number to specified variable, so we can use constructs
3506 like {BASH_XTRACEFD}>foo. Suggested by Pierre Gaston
3507 <pierre.gaston@gmail.com>
3508
3509 9/8
3510 ---
3511 expr.c
3512 - readtok: invalidate previous contents of `curlval' before freeing
3513 and reallocating tokstr (which, chances are, will get the same
3514 pointer as before and render curlval inconsistent). Fixes other
3515 bug reported by Dan Douglas <ormaaj@gmail.com>
3516
3517 9/9
3518 ---
3519 lib/readline/complete.c
3520 - rl_username_completion_function: protect call to setpwent() with
3521 #ifdef (HAVE_GETPWENT)/#endif. Fixes bug reported by
3522 Gerd Hofmann <gerd.hofmann.nbg@googlemail.com>
3523
3524 lib/readline/display.c
3525 - rl_message: second and subsequent calls to rl_message can result in
3526 local_prompt being overwritten with new values (e.g., from the
3527 successive calls displaying the incremental search string). Need
3528 to free before overwriting if it's not the same as the value saved
3529 in saved_local_prompt. Fixes memory leak reported by
3530 Wouter Vermaelen <vermaelen.wouter@gmail.com>
3531
3532 lib/readline/{terminal.c,rlprivate.h}
3533 - move CUSTOM_REDISPLAY_FUNC and CUSTOM_INPUT_FUNC defines from
3534 terminal.c to rlprivate.h so other files can use them
3535
3536 expr.c
3537 - expr_streval: if noeval is non-zero, just return 0 right away,
3538 short-circuiting evaluation completely. readtok will leave curtok
3539 set correctly without re-entering the evaluator at all. Rest of
3540 fix for bug reported by Dan Douglas <ormaaj@gmail.com>
3541
3542 9/11
3543 ----
3544
3545 parse.y
3546 - parse_comsub: make sure the `reserved word ok in this context' flag
3547 is preserved after we read `do' followed by whitespace. Fixes bug
3548 reported by Benoit Vaugon <benoit.vaugon@gmail.com>
3549
3550 9/13
3551 ----
3552 configure.ac,config.h.in
3553 - enable-direxpand-default: new configure option, turns the `direxpand'
3554 shell option on by default
3555
3556 bashline.c
3557 - dircomplete_expand, dircomplete_expand_relpath: initialize to 1 if
3558 DIRCOMPLETE_EXPAND_DEFAULT is defined and non-zero
3559
3560 doc/bashref.texi
3561 - enable-direxpand-default: document new configure option
3562
3563 9/14
3564 ----
3565 shell.c
3566 - --protected: make option valid only when wordexp is compiled into
3567 the shell. Fix from Roman Rakus <rrakus@redhat.com>
3568
3569 configure.ac
3570 - HP NonStop (*-nsk*): compile --without-bash-malloc. Change from
3571 Joachim Schmitz <jojo@schmitz-digital.de>
3572
3573 9/16
3574 ----
3575 subst.c,execute_cmd.c,lib/glob/sm_loop.c,lib/sh/shquote.c
3576 - minor code cleanups from Joachim Schmitz <jojo@schmitz-digital.de>
3577
3578 lib/readline/colors.h
3579 - workaround for HP NonStop compiler issue with <stdbool.h> from
3580 Joachim Schmitz <jojo@schmitz-digital.de>
3581
3582 9/17
3583 ----
3584 builtins/printf.def
3585 - printf_builtin: handle localtime returning NULL, as can happen when
3586 encountering overflow. Bug report and initial fix from
3587 Eduardo A. Bustamante López <dualbus@gmail.com>
3588
3589 doc/{bash.1,bashref.texi}
3590 - emphasize that brace expansion using character ranges ({a..c}) acts
3591 as if the C locale were in use. Prompted by message from
3592 Marcel Giannelia <info@skeena.net>
3593
3594 9/20
3595 ----
3596 lib/sh/wcsnwidth.c
3597 - wcsnwidth: new function, variant of wcwidth, returns the number of
3598 wide characters from a string that will be displayed to not exceed
3599 a specified max column position
3600
3601 9/21
3602 ----
3603 builtins/help.def
3604 - show_builtin_command_help: break code that displays the short-doc
3605 for each builtin in two columns into a new function: dispcolumn
3606 - wdispcolumn: multibyte-char version of dispcolumn; uses wide
3607 chars and printf "%ls" format. Fixes problem reported by
3608 Nguyá»n Thái Ngá»c Duy <pclouds@gmail.com>
3609
3610 9/22
3611 ----
3612 execute_cmd.c
3613 - execute_disk_command: before running the command-not-found hook,
3614 call kill_current_pipeline() to make sure we don't add processes
3615 to an existing pipeline or wait for processes erroneously
3616
3617 9/23
3618 ----
3619 lib/readline/input.c
3620 - rl_input_available_hook: new hook function, called from
3621 _rl_input_available (or _rl_input_queued) to return whether or not
3622 input is available wherever the input source is
3623
3624 lib/readline/doc/rltech.texi
3625 - rl_input_available_hook: document
3626
3627 9/27
3628 ----
3629 lib/glob/sm_loop.c:
3630 - GMATCH: after one or more `*', an instance of ?(x) can match zero or
3631 1 times (unlike ?, which has to match one character). The old code
3632 failed if it didn't match at least once. Fixes `a*?(x)' bug.
3633 - GMATCH: if we hit the end of the search string, but not the end of
3634 the pattern, and the rest of the pattern is something that can
3635 match the NUL at the end of the search string, we should successfully
3636 match. Fixes `a*!(x)' bug reported by <hans1worst@gmail.com>
3637
3638 10/2
3639 ----
3640 command.h
3641 - add c_lock member to coproc structure for future use to tell who is
3642 manipulating it
3643
3644 execute_cmd.c
3645 - execute_coproc: block SIGCHLD while parent is forking coproc
3646 process and adding pid to sh_coproc struct to avoid race condition
3647 where child is reaped before the pid is assigned and the coproc is
3648 never marked as having died. Fixes race condition identified by
3649 Davide Baldini <baldiniebaldini@gmail.com>
3650 - add assignments to c_lock member of struct coproc in various
3651 functions that manipulate it; was used to identify race condition
3652 - coproc_pidchk: don't call coproc_dispose to avoid using malloc and
3653 other functions in a signal handler context
3654 - coproc_dispose: call BLOCK_SIGNAL/UNBLOCK_SIGNAL for SIGCHLD while
3655 manipulating the sh_coproc struct
3656
3657 10/6
3658 ----
3659 lib/readline/complete.c
3660 - rl_display_match_list: if printing completions horizontally, don't
3661 bother with spacing calculations if limit == 1, which means we are
3662 printing one completion per line no matter what. Fixes bug
3663 reported by David Kaasen <kaasen@nvg.ntnu.no>
3664
3665 10/7
3666 ----
3667 builtins/declare.def
3668 - declare_internal: add error checking for nameref attribute and
3669 variable assignments: self-references, attempts to make an array
3670 variable a nameref
3671
3672 subst.c
3673 - parameter_brace_expand: handle parameter_brace_expand_word returning
3674 &expand_param_fatal or &expand_param_error and return the appropriate
3675 error value
3676 - parameter_brace_expand_word: if a nameref variable's value is not a
3677 valid identifier, return an error
3678 - param_expand: if a nameref variable's value is not a valid identifier,
3679 return an error
3680
3681 test.c
3682 - unary_operator: add new -R variable, returns true if variable is set
3683 and has the nameref attribute. From ksh93
3684
3685 builtins/test.def
3686 - add -R to description of conditional commands for help test
3687
3688 doc/{bash.1,bashref.texi}
3689 - document new -R unary conditional operator
3690
3691 10/13
3692 -----
3693 trap.c
3694 - check_signals_and_traps: new function, convenience function for the
3695 rest of the shell to check for pending terminating and interrupt
3696 signals, and to check for and process any pending traps
3697 - any_signals_trapped: new function, returns non-zero if any signals
3698 are trapped and -1 if not
3699
3700 trap.h
3701 - extern declaration for check_signals_and_traps
3702
3703 bashline.c
3704 - bashline_reset: make sure we reset the event hook
3705 - bash_event_hook: call check_signals_and_traps instead of just
3706 checking for terminating signals so we can run pending traps and
3707 react to interrupts, and reset the event hook when we're done
3708
3709
3710 10/14
3711 -----
3712 trap.c
3713 - trap_handler: if executing in a readline signal handler context,
3714 call bashline_set_event_hook to install bash_event_hook to process
3715 the signal (if bash cares about it)
3716
3717 sig.c
3718 - sigint_sighandler: call bashline_set_event_hook to set the event
3719 hook if we're executing in a readline signal handler context
3720
3721 lib/readline/input.c
3722 - rl_getc: call RL_CHECK_SIGNALS if read returns -1/EINTR and the caught
3723 signal is SIGINT or SIGQUIT rather than waiting until the next time
3724 around the loop
3725 - rl_getc: call rl_event_hook after calling RL_CHECK_SIGNALS to allow
3726 an application signal handler to set the event hook in its own
3727 signal handler (e.g., like bash trap_handler or sigint_sighandler)
3728
3729
3730 parse.y
3731 - yy_readline_get: don't set interrupt_immediately before we call
3732 readline(). Inspired by report from lanshun zhou
3733 <zls.sogou@gmail.com>
3734
3735 input.c
3736 - getc_with_restart: add call to run_pending_traps after call to
3737 CHECK_TERMSIG
3738
3739 lib/sh/zread.c
3740 - zread: call check_signals_and_traps if read() returns -1/EINTR
3741 instead of just ignoring the EINTR and deferring handling any
3742 signal that generated it
3743
3744 builtins/mapfile.def
3745 - mapfile: don't set interrupt_immediately before calling zgetline()
3746 (which uses zread internally)
3747
3748 builtins/read.def
3749 - read_builtin: don't set interrupt_immediately before calling zread
3750 (moved code around so that it was only being set right around calls
3751 to zread to avoid signal handler conflicts). Inspired by report
3752 from lanshun zhou <zls.sogou@gmail.com>
3753 - edit_line: don't set interrupt_immediately around call to readline()
3754 - include shmbutil.h
3755 - read_builtin: don't call read_mbchar unless is_basic(c) returns
3756 false for the character we just read
3757
3758 10/15
3759 -----
3760 sig.c
3761 - throw_to_top_level: if interrupt_state is non-zero, make sure that
3762 last_command_exit_value reflects 128+SIGINT if it's not already
3763 greater than 128
3764
3765 10/20
3766 -----
3767 builtins/wait.def
3768 - WAIT_RETURN: set wait_signal_received back to 0 for the potential
3769 next call to wait
3770
3771 quit.h
3772 - CHECK_WAIT_INTR: macro to check whether trap_handler handled a
3773 signal and set wait_signal_received; longjmp to wait_intr_buf in
3774 that case
3775
3776 jobs.c
3777 - wait_for, waitchld: call CHECK_WAIT_INTR at the same places we call
3778 CHECK_TERMSIG to check for terminating signals
3779 - wait_sigint_handler: don't longjmp out of the wait builtin unless
3780 interrupt_immediately is set; otherwise just SIGRETURN from the
3781 handler
3782 - wait_sigint_handler: if interrupt_immediately not set, but we are
3783 executing in the wait builtin and SIGINT is not trapped, treat it
3784 as a `normally received' SIGINT: restore the signal handler and
3785 send SIGINT to ourselves
3786 - waitchld: when in posix mode and running SIGCHLD traps, don't longjmp
3787 to wait_intr_buf (and let wait be interrupted) if we're running from
3788 a signal handler. Wait for CHECK_WAIT_INTR to do the longjmp.
3789 run_pending_traps will run the SIGCHLD trap later
3790
3791 nojobs.c
3792 - reap_zombie_children, wait_for_single_pid, wait_for: call
3793 CHECK_WAIT_INTR where we call CHECK_TERMSIG
3794 - wait_sigint_handler: don't longjmp out of the wait builtin unless
3795 interrupt_immediately is set; otherwise just SIGRETURN from the
3796 handler
3797
3798 trap.c
3799 - trap_handler: make sure wait_signal_received is set if the wait
3800 builtin is executing, and only longjmp if interrupt_immediately is
3801 set. This whole set of fixes was prompted by report from
3802 lanshun zhou <zls.sogou@gmail.com>
3803
3804 10/24
3805 -----
3806 lib/glob/glob.c
3807 - glob_filename: only check directory_name for globbing chars if
3808 it's of non-zero length
3809
3810 lib/sh/strchrnul.c
3811 - new simpler implementation
3812
3813 subst.c
3814 - command_substitute: call set_shellopts after turning off errexit
3815 in subshells so it's reflected in $SHELLOPTS
3816
3817 11/7
3818 ----
3819 builtins/evalstring.c
3820 - parse_and_execute: treat ERREXIT case like reader_loop does: set
3821 variable_context to 0 before longjmping back to top_level. Don't
3822 run the unwind-protect context to avoid side effects from popping
3823 function contexts. Part of fix for problem reported by Nikolai
3824 Kondrashov <nikolai.kondrashov@redhat.com>
3825
3826 execute_cmd.c
3827 - execute_simple_command: call unlink_fifo_list only if this is the
3828 last element of a pipeline (or not in a pipeline), rather than for
3829 every child. Fixes difference in behavior between /dev/fd and
3830 FIFOs reported by Zev Weiss <zev@bewilderbeest.net>
3831 - execute_null_command: do the same thing in the parent branch after
3832 make_child
3833
3834 11/14
3835 -----
3836 subst.c
3837 - parameter_brace_expand: a variable is null if it's special ($@, $*),
3838 the expansion occurs within double quotes, and the expansion turns
3839 into a quoted null. Fixes debian bug 692447 reported by
3840 Matrosov Dmitriy <sgf.dma@gmail.com>
3841
3842 jobs.c
3843 - run_sigchld_trap: make sure `running_trap' sentinel is set
3844 appropriately
3845 - waitchld: only run the sigchld trap if we're not in a signal
3846 handler, not running a trap, and executing the wait builtin.
3847 Otherwise, queue for later handling. We still run one instance
3848 of the trap handler per exited child. Bulk of fix for bug
3849 reported by Elliott Forney <idfah@cs.colostate.edu>
3850
3851 trap.c
3852 - queue_sigchld_trap: set catch_flag so run_pending_traps notices,
3853 and set trapped_signal_received for completeness. Rest of fix
3854 for bug reported by Elliott Forney <idfah@cs.colostate.edu>
3855
3856 lib/malloc/malloc.c
3857 - block_signals: renamed to _malloc_block_signals, made public
3858 - unblock_signals: renamed to _malloc_unblock_signals, made public
3859
3860 lib/malloc/imalloc.h
3861 - extern declarations for _malloc_{un,}block_signals
3862
3863 lib/malloc/table.c
3864 - mregister_alloc, mregister_free: block signals around table
3865 manipulation
3866
3867 11/15
3868 -----
3869 trap.c
3870 - run_pending_traps: set SIG_INPROGRESS flag around calls to
3871 run_sigchld_handler so other parts of the shell know that the
3872 SIGCHLD trap handler is executing
3873 - run_pending_traps: if we get a situation where we are looking at
3874 running a SIGCHLD trap but the trap string is IMPOSSIBLE_TRAP_HANDLER
3875 and the SIG_INPROGRESS flag is set, just skip it. This is possible
3876 if run_pending_traps is called from a SIGCHLD trap handler run by
3877 run_sigchld_trap
3878
3879 doc/bash.1,lib/readline/doc/{rluser.texi,readline.3}
3880 - corrected description of the effect of `set history-size 0'. Report
3881 from Vesa-Matti J Kari <vmkari@cc.helsinki.fi>
3882
3883 include/stdc.h
3884 - CPP_STRING: new define, replaces __STRING
3885
3886 lib/malloc/{malloc.c,imalloc.h}
3887 - replace __STRING with CPP_STRING
3888
3889 11/16
3890 -----
3891 lib/readline/bind.c
3892 - sv_histsize: if argument evaluates to a value < 0, unstifle the
3893 history
3894
3895 11/22
3896 -----
3897 redir.c
3898 - do_redirection_internal: if we have REDIR_VARASSIGN set in the
3899 redirection flags and we set up `redirector' using fcntl or dup2,
3900 don't add a redirect to make sure it stays open. Let the
3901 script programmer manage the file handle. Fixes bug reported by
3902 Sam Liddicott <sam@liddicott.com>
3903
3904 11/24
3905 -----
3906 jobs.c
3907 - wait_for_any_job: new function, waits for an unspecified background
3908 job to exit and returns its exit status. Returns -1 on no background
3909 jobs or no children or other errors. Calls wait_for with new
3910 sentinel value ANY_PID
3911 - wait_for: changes to handle argument of ANY_PID: don't look up or
3912 try to modify the child struct, only go through the wait loop once.
3913 Return -1 if waitpid returns no children
3914
3915 jobs.h
3916 - ANY_PID: new define
3917
3918 builtins/wait.def
3919 - new option: -n. Means to wait for the next job and return its exit
3920 status. Returns 127 if there are no background jobs (or no
3921 children). Feature most recently requested by Elliott Forney
3922 <idfah@cs.colostate.edu>
3923
3924 doc/{bash.1,bashref.texi}
3925 - document new `wait -n' option
3926
3927 execute_cmd.c
3928 - execute_command_internal: save make_command_string () result in a
3929 temp variable before calling savestring() on it; avoids evaluating
3930 make_command_string() result twice. Fix from John E. Malmberg
3931 <wb8tyw@qsl.net>
3932
3933 11/28
3934 -----
3935
3936 builtins/declare.def
3937 - declare_internal: if an array variable is declared using `declare -a'
3938 or `declare -A', but not assigned a value, set the `invisible'
3939 attribute so the variable does not show up as set. Fix for bug
3940 about variable initialization reported by Tim Friske <me@timfriske.com>
3941
3942 builtins/{mapfile,read}.def
3943 - after calling find_or_make_array_variable, make sure the invisible
3944 flag is turned off, in case the variable was declared previously
3945 using `declare -a' or `declare -A'. Side effect of above change to
3946 declare_internal
3947
3948 subst.c
3949 - shell_expand_word_list: handle the W_ASSNGLOBAL flag and put -g into
3950 the list of options passed to make_internal_declare as appropriate.
3951 Fix for bug reported by Tim Friske <me@timfriske.com>
3952
3953 11/30
3954 -----
3955 test.c
3956 - unary_op: make sure -v and -n check that the variable is not marked
3957 as invisible before calling var_isset. Fix for bug reported by Tim
3958 Friske <me@timfriske.com>
3959
3960 12/2
3961 ----
3962 subst.c
3963 - process_substitute: turn off the `expanding_redir' flag, which
3964 controls whether or not variables.c:find_variable_internal uses the
3965 temporary environment to find variables. We want to use the
3966 temp environment, since we don't have to worry about order of
3967 evaluation in a subshell. Fixes bug reported by Andrey Borzenkov
3968 <arvidjaar@gmail.com>
3969
3970 12/4
3971 ----
3972 lib/glob/glob.c
3973 - glob_filename: changes to avoid null filenames and multiple entries
3974 returned for patterns like **/** (globstar enabled). Fixes bug
3975 reported by Ulf Magnusson <ulfalizer@gmail.com>
3976
3977 12/10
3978 -----
3979 lib/glob/glob.c
3980 - glob_filename: finish up a series of changes to make globstar-style
3981 globbing more efficient, avoid more duplicate filenames, and be more
3982 compatible with other shells that implement it
3983 o collapse a sequence of **/**/** to one **
3984 o note when the directory name is all ** or ends in ** so we
3985 can treat it specially when the filename is **
3986 All inspired by report from Andrey Borzenkov <arvidjaar@gmail.com>
3987
3988 lib/sh/zread.c
3989 - zreadn: new function, like zread, but takes an additional argument
3990 saying how many bytes to read into the local buffer. Can be used to
3991 implement `read -N' without so many one-byte calls to zreadc. Code
3992 from Mike Frysinger <vapier@gentoo.org>
3993
3994 12/12
3995 -----
3996 lib/glob/sm_loop.c
3997 - PATSCAN (glob_patscan): if passed string already points to end of
3998 pattern, return NULL immediately. Fixes problem with
3999 extglob_skipname reported by Raphaël Droz <raphael.droz@gmail.com>
4000
4001 12/13
4002 -----
4003 execute_cmd.c
4004 - execute_coproc: handle the command's exit status being inverted
4005 (an oversight). Fixes bug reported by DJ Mills
4006 <danielmills1@gmail.com> and Andreas Schwab <schwab@linux-m68k.org>
4007
4008 12/14
4009 -----
4010 lib/readline/readline.c
4011 - bind_arrow_keys_internal: add MINGW key bindings for Home, End,
4012 Delete, and Insert keys. Fix from Pierre Muller
4013 <pierre.muller@ics-cnrs.unistra.fr>
4014
4015 builtins/printf.def
4016 - printf_builtin: '%()T' conversion: if there is no argument supplied,
4017 behave as if -1 had been supplied (current time). ksh93-like feature
4018 suggested by Clark Wang <dearvoid@gmail.com>
4019
4020 doc/{bash.1,bashref.texi}
4021 - document new printf %()T default argument behavior
4022
4023 12/15
4024 -----
4025 lib/readline/display.c
4026 - displaying_prompt_first_line: new variable, indicates whether or
4027 not the first line of output is displaying the prompt. Always true
4028 in normal mode, sometimes false in horizontal scrolling mode
4029 - rl_redisplay: set displaying_prompt_first_line to true unless we
4030 are in horizontal mode; set to false in horizontal mode if the left
4031 margin of the displayed line is greater than the end of the prompt
4032 string
4033 - rl_redisplay: when in horizontal scroll mode, don't adjust
4034 _rl_last_c_pos by the wrap offset unless the line is displaying
4035 a prompt containing invisible chars
4036 - update line: don't adjust _rl_last_c_pos by the wrap offset unless
4037 the line is displaying a prompt containing invisible chars
4038 - update_line: if shrinking the line by reducing the number of
4039 displayed characters, but we have already moved the cursor to the
4040 beginning of the line where the first difference starts, don't
4041 try to delete characters
4042
4043 builtins/read.def
4044 - unbuffered_read: set to 2 if invoked as `read -N'
4045 - if unbuffered_read is set to 2, compute the number of chars we
4046 need to read and read that many with zreadn. Posix mode still
4047 uses zreadintr. Code from Mike Frysinger <vapier@gentoo.org>
4048
4049 doc/{bash.1,bashref.texi}
4050 - read: make it clear that if read times out, it saves any input
4051 read to that point into the variable arguments. Report from
4052 Fiedler Roman <Roman.Fiedler@ait.ac.at>
4053
4054 subst.c
4055 - command_substitute: change direct assignment of exit_immediately_on_error
4056 to use change_flag ('e', FLAG_OFF) instead
4057
4058 flags.c
4059 - use errexit_flag as the variable modified by changes to the -e
4060 option, reflect those changes to exit_immediately_on_error
4061
4062 execute_cmd.c
4063 - execute_builtin: new global variable, builtin_ignoring_errexit, set
4064 to 0 by default and set to 1 if eval/source/command executing in a
4065 context where -e should be ignored
4066 - execute_builtin: set exit_immediately_on_error to errextit_flag
4067 after executing eval/source/command in a context where -e should
4068 be ignored
4069
4070 flags.c
4071 - if builtin_ignoring_errexit is set, changes to errexit_flag are
4072 not reflected in the setting of exit_immediately_on_error. Fixes
4073 bug reported by Robert Schiele <rschiele@gmail.com>
4074
4075 12/23
4076 -----
4077 include/posixjmp.h
4078 - setjmp_nosigs: new define, call setjmp in such a way that it will
4079 not manipulate the signal mask
4080
4081 {expr,test,trap}.c
4082 - setjmp_nosigs: call instead of setjmp; don't need to manipulate
4083 signal mask
4084
4085 builtins/read.def
4086 - read_builtin: setjmp_nosigs: call instead of setjmp; don't need
4087 to manipulate signal mask
4088
4089 builtins/evalstring.c:
4090 - parse_and_execute: setjmp_nosigs: call instead of setjmp; don't need
4091 to manipulate signal mask
4092 - parse_string: setjmp_nosigs: call instead of setjmp; don't need
4093 to manipulate signal mask
4094 - parse_and_execute: save and restore the signal mask if we get a
4095 longjmp that doesn't cause us to return or exit (case DISCARD)
4096
4097 12/24
4098 -----
4099 general.c
4100 - bash_tilde_expand: only set interrupt_immediately if there are no
4101 signals trapped; we want to jump to top level if interrupted but
4102 not run any trap commands
4103
4104 12/25
4105 -----
4106 jobs.c
4107 - run_sigchld_trap: no longer set interrupt_immediately before calling
4108 parse_and_execute, even if this is no longer run in a signal handler
4109 context
4110
4111 input.c
4112 - getc_with_restart: add call to QUIT instead of CHECK_TERMSIG
4113
4114 parse.y
4115 - yy_stream_get: now that getc_with_restart calls QUIT, don't need to
4116 set interrupt_immediately (already had call to run_pending_traps)
4117
4118 execute_cmd.c
4119 - execute_subshell_builtin_or_function,execute_function,execute_in_subshell:
4120 setjmp_nosigs: call instead of setjmp when saving return_catch; don't
4121 need to manipulate signal mask
4122 - execute_subshell_builtin_or_function,execute_in_subshell:
4123 setjmp_nosigs: call instead of setjmp where appropriate when saving
4124 top_level; don't need to manipulate signal mask if we're going to
4125 exit right away
4126
4127 subst.c
4128 - command_substitute: setjmp_nosigs: call instead of setjmp when saving
4129 return_catch; don't need to manipulate signal mask
4130 - command_substitute: setjmp_nosigs: call instead of setjmp where
4131 appropriate when saving top_level; don't need to manipulate signal
4132 mask if we're going to exit right away
4133
4134 trap.c
4135 - run_exit_trap: setjmp_nosigs: call instead of setjmp when saving
4136 return_catch; don't need to manipulate signal mask
4137 - run_exit_trap: setjmp_nosigs: call instead of setjmp where
4138 appropriate when saving top_level; don't need to manipulate signal
4139 mask if we're going to exit right away
4140 - _run_trap_internal: setjmp_nosigs: call instead of setjmp when saving
4141 return_catch; don't need to manipulate signal mask
4142
4143 builtins/evalfile.c
4144 - _evalfile: setjmp_nosigs: call instead of setjmp when saving
4145 return_catch; don't need to manipulate signal mask
4146
4147 builtins/evalstring.c
4148 - evalstring: setjmp_nosigs: call instead of setjmp when saving
4149 return_catch; don't need to manipulate signal mask
4150
4151 shell.c
4152 - main: setjmp_nosigs: call instead of setjmp where appropriate when
4153 saving top_level; don't need to manipulate signal mask if we're
4154 going to exit right away
4155 - run_one_command: setjmp_nosigs: call instead of setjmp where
4156 appropriate when saving top_level; don't need to manipulate signal
4157 mask if we're going to exit right away
4158 - run_wordexp: setjmp_nosigs: call instead of setjmp where
4159 appropriate when saving top_level; don't need to manipulate signal
4160 mask if we're going to exit right away
4161
4162 eval.c
4163 - reader_loop: save and restore the signal mask if we get a longjmp
4164 that doesn't cause us to return or exit (case DISCARD)
4165
4166 12/26
4167 -----
4168 parse.y
4169 - shell_input_line_{index,size,len}: now of type size_t; in some cases
4170 the unsigned property makes a difference
4171 - STRING_SAVER: saved_line_{size,index} now of type size_t
4172 - shell_getc: don't allow shell_input_line to grow larger than SIZE_MAX;
4173 lines longer than that are truncated until read sees a newline;
4174 addresses theoretical buffer overflow described by Paul Eggert
4175 <eggert@cs.ucla.edu>
4176 - set_line_mbstate: size_t changes like shell_getc
4177 - shell_getc: if shell_input_line is larger than 32K, free it and
4178 start over to avoid large memory allocations sticking around
4179
4180 variables.c
4181 - bind_global_variable: new function, binds value to a variable in
4182 the global shell_variables table
4183
4184 variables.h
4185 - bind_global_variable: new extern declaration
4186
4187 builtins/declare.def
4188 - declare_internal: if -g given with name=value, but variable is not
4189 found in the global variable table, make sure to call
4190 bind_global_variable so the variable is created and modified at
4191 global scope. Fixes a bug where declare -g x=y could modify `x'
4192 at a previous function scope
4193
4194 command.h
4195 - W_ASSIGNARRAY: new word flag, compound indexed array assignment
4196
4197 subst.h
4198 - ASS_MKGLOBAL: new assignment flag, forcing global assignment even in
4199 a function context, used by declare -g
4200
4201 execute_cmd.c
4202 - fix_assignment_words: set W_ASSIGNARRAY flag if -a option given to
4203 declaration builtin
4204
4205 subst.c
4206 - do_assignment_internal: explicitly handle case where we are
4207 executing in a function and we want to create a global array or
4208 assoc variable
4209 - shell_expand_word_list: call make_internal_declare if -a option
4210 given to declaration builtin (W_ASSIGNARRAY); handle -g option with
4211 it (W_ASSNGLOBAL). Fixes inconsistency noticed by Vicente Couce
4212 Diaz <vituko@gmail.com>, where declare -ag foo=(bar) could modify
4213 array variable foo at previous function scope, not global scope
4214
4215 12/27
4216 -----
4217 bashline.c
4218 - Minix needs the third argument to tputs to be a void funtion taking
4219 an int argument, not an int-returning function. Fix from
4220 John E. Malmberg <wb8tyw@qsl.net> as part of VMS bash port
4221
4222 12/29
4223 -----
4224 configure.ac,version.c,patchlevel.h
4225 - bash-4.3-devel: new version, new shell compatibility level (43)
4226
4227 subst.c
4228 - parameter_brace_patsub: put the bash-4.2 code back in from the
4229 change of 3/3 that runs the replacement string through quote
4230 removal, make it dependent on shell_compatibility_level <= 42
4231
4232 builtins/shopt.def
4233 - compat42: new shopt option
4234 - set_compatibility_level: change logic to set and unset various
4235 compat variables and shell_compatibility_level
4236
4237 COMPAT
4238 - new documentation for bash-4.3 compatibility changes
4239
4240 doc/{bash.1,bashref.texi}
4241 - compat42: document new shopt option
4242
4243 builtins/shopt.def
4244 - set_compatibility_opts: new function, sets the various shopt
4245 compat variables based on the value of shell_compatibility_level
4246
4247 builtins/common.h
4248 - set_compatibility_opts: new extern declaration
4249
4250 variables.c
4251 - BASH_COMPAT: new special variable; sets the shell compatibility
4252 level. Accepts values in decimal (4.2) or integer (42) form;
4253 Unsetting variable, setting it to empty string, or setting it to
4254 out-of-range value sets the shell's compatibility level to the
4255 default for the current version. Valid values are 3.1/31 through
4256 the current version
4257 - sv_shcompat: new function implementing logic for BASH_COMPAT
4258
4259 variables.h
4260 - sv_shcompat: new extern declaration
4261
4262 doc/{bash.1,bashref.texi}
4263 - BASH_COMPAT: description of new variable
4264
4265 lib/readline/complete.c
4266 - _rl_colored_stats: default back to 0 for 4.3 release branch
4267
4268 1/5/2013
4269 --------
4270 quit.h
4271 - remove spurious call to itrace in CHECK_WAIT_INTR
4272
4273 bashline.c
4274 - bash_event_hook: if we're going to jump to top_level, make sure we
4275 clean up after readline() by calling rl_cleanup_after_signal().
4276 Fixes bug reported against devel branch by Raphaël Droz
4277 <raphael.droz@gmail.com>
4278 - bash_event_hook: reset the event hook before checking for signals
4279 or traps in case we longjmp
4280
4281 doc/{bash.1,bashref.texi}
4282 - small additions to the set -e section to make it more clear that
4283 contexts where -e is ignored extend to compound commands as well
4284 as shell functions
4285
4286 lib/readline/readline.h
4287 - rl_signal_event_hook: new extern declaration
4288
4289 lib/readline/input.c
4290 - rl_signal_event_hook: new variable, hook function to call when a
4291 function (currently just read(2)) is interrupted by a signal and
4292 not restarted
4293 - rl_getc: call rl_signal_event_hook instead of rl_event_hook
4294
4295 lib/readline/doc/rltech.texi
4296 - rl_signal_event_hook: document new function
4297
4298 bashline.c
4299 - changes to set rl_signal_event_hook instead of rl_event_hook
4300
4301 lib/readline/readline.h
4302 - change readline version numbers to 6.3
4303
4304 1/6
4305 ---
4306 doc/{bash.1,bashref.texi}
4307 - a couple of changes to the descriptions of the ERR trap and its
4308 effects based on a message from Rob Nagler <nagler@bivio.biz>
4309
4310 1/9
4311 ---
4312 expr.c
4313 - expassign: invalidate curlval before freeing and NULLing tokstr to
4314 avoid aliasing issues. Fixes bug reported by Eduardo A. Bustamante
4315 López<dualbus@gmail.com> and Dan Douglas <ormaaj@gmail.com>
4316
4317 braces.c
4318 - array_concat: don't be so aggressive in trying to short-circuit. We
4319 can only short-circuit if we have a single-element array where the
4320 element is an empty string (array[0] == "" array[1] = 0x0). Existing
4321 practice requires us to replicate arrays and prefix or append empty
4322 strings. Fixes bug reported by Eduardo A. Bustamante López
4323 <dualbus@gmail.com>
4324
4325 1/11
4326 ----
4327 execute_cmd.c
4328 - execute_builtin: since mapfile uses evalstring() to run its callbacks
4329 internally, just like eval, so it needs to handle the case where the
4330 temp environment given to mapfile persists throughout the entire
4331 set of callback commands. This might be a problem with trap also, but
4332 trap isn't run in the same way. Fixes bug reported by Dan Douglas
4333 <ormaaj@gmail.com>
4334
4335 1/13
4336 ----
4337 redir.c
4338 - redirection_error: before expanding the redirection word (if
4339 expandable_redirection_filename returns true), disable command
4340 substitution during expansion. Fixes bug reported by Dan Douglas
4341 <ormaaj@gmail.com>
4342
4343 subst.c
4344 - expand_word_internal: case '\\': if the next character is an IFS
4345 character, and the expansion occurs within double quotes, and the
4346 character is not one for which backslash retains its meaning, add
4347 the (escaped) '\' and the (escaped) character. Fixes bug reported
4348 by Dan Douglas <ormaaj@gmail.com>
4349
4350 1/15
4351 ----
4352 builtins/cd.def
4353 - cd_builtin: make sure call to internal_getopt handles -e option.
4354 Fixes bug reported by <mashimiao.fnst@cn.fujitsu.com>
4355
4356 1/17
4357 ----
4358 subst.c
4359 - expand_word_list_internal: make sure tempenv_assign_error is
4360 initialized to 0
4361
4362 execute_cmd.c
4363 - execute_simple_command: make sure tempenv_assign_error is reset to 0
4364 after it's tested to see if an error should force the shell to exit.
4365 Fixes problem where a the failure of a tempenv assignment preceding
4366 a non-special builtin `sticks' and causes the next special builtin
4367 to exit the shell. From a discussion on bug-bash started by
4368 douxin <wq-doux@cn.fujitsu.com>
4369
4370 1/20
4371 ----
4372 subst.c
4373 - parameter_brace_expand_rhs: call stupidly_hack_special_variables
4374 after assigning with ${param[:]=word} even if IFS is changing.
4375 Suggested by Dan Douglas <ormaaj@gmail.com> [TENTATIVE, needs work
4376 on IFS side effects]
4377
4378 command.h
4379 - W_GLOBEXP (which was unused) is now W_SPLITSPACE (which isn't used
4380 yet)
4381
4382 {execute_cmd,subst,variables}.c
4383 - removed all code that mentioned W_GLOBEXP
4384 - removed mention of gnu_argv_flags and code that set it
4385
4386 1/22
4387 ----
4388 subst.c
4389 - param_expand: set W_SPLITSPACE if we expand (unquoted) $* and
4390 IFS is unset or null so we can be sure to split this on spaces
4391 no matter what happens with IFS later
4392 - expand_word_internal: note that param_expand returns W_SPLITSPACE
4393 in the returned word flags and keep track of that state with
4394 `split_on_spaces'
4395
4396 1/23
4397 ----
4398 subst.c
4399 - expand_word_internal: if split_on_spaces is non-zero, make sure
4400 we split `istring' on spaces and return the resultant word. The
4401 previous expansions should have quoted spaces in the positional
4402 parameters where necessary. Suggested by Dan Douglas
4403 <ormaaj@gmail.com>
4404
4405 execute_cmd.c
4406 - execute_command_internal: make sure any subshell forked to run a
4407 group command or user subshell at the end of a pipeline runs any
4408 EXIT trap it sets. Fixes debian bash bug 698411
4409 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698411
4410
4411 subst.c
4412 - shell_expand_word_list: fix code that creates args for and calls
4413 make_internal_declare to avoid calling it twice (missing `else'
4414 in 12/26 change)
4415 - do_assignment_internal: fix code from 12/26 change to fix problem
4416 where an existing assoc variable could be converted to an array
4417 without checking `mkassoc'
4418
4419 1/24
4420 ----
4421 builtins/evalfile.c
4422 - _evalfile: add missing `close (fd)' calls before returning to
4423 avoid fd leaks. Bug and fix from Roman Rakus <rrakus@redhat.com>
4424
4425 1/25
4426 ----
4427 builtins/read.def
4428 - read_builtin: don't try to play tricks with the top of the unwind-
4429 protect stack after read gets a SIGALRM; save input_string to new
4430 memory, run the stack, then restore input_string and assign the
4431 variables. Part of fix for bug reported by konsolebox
4432 <konsolebox@gmail.com>; the rest of the fix is with the changes in
4433 trap and signal handling and doing away with interrupt_immediately
4434
4435 1/26
4436 ----
4437 redir.c
4438 - redirection_expand, write_here_string, write_here_document: before
4439 calling any of the word expansion functions, after setting
4440 expanding_redir to 1 (which bypasses the temp environment in the
4441 variable lookup functions), call sv_ifs to reset the cached IFS-
4442 related variables set by subst.c:setifs(). This ensures that
4443 redirections will not get any IFS values that are set in the
4444 temporary environment, as Posix specifies. Then, after the word
4445 expansions, after resetting expanding_redir to 0, call sv_ifs
4446 again to make sure the cached IFS values are set from any
4447 assignments in the temporary environment. We force executing_builtin
4448 to 1 to `fool' the variable lookup functions into using any temp
4449 environment, then reset it to its old value after sv_ifs returns.
4450 This is what allows read() to use the (cached) IFS variables set
4451 in the temp environment. Fixes inconsistency reported by Dan Douglas
4452 <ormaaj@gmail.com>
4453
4454 1/29
4455 ----
4456 lib/readline/display.c
4457 - update_line: fix off-by-one error when updating vis_lbreaks array
4458 in a multibyte locale that occurs when moving multibyte chars from
4459 one line down to another. Bug report and fix from Egmont
4460 Koblinger <egmont@gmail.com>
4461
4462 1/30
4463 ----
4464 configure.ac
4465 - changed version to 4.3-alpha
4466
4467 redir.c
4468 - redir_open: handle open returning -1/EINTR, which seems to happen
4469 a lot with FIFOs and SIGCHLD, and call QUIT to handle other
4470 signals that can interrupt open(2). Bug report and initial fix
4471 from Mike Frysinger <vapier@gentoo.org>
4472
4473 1/31
4474 ----
4475 subst.c
4476 - parameter_brace_expand: make sure to propagate the PF_ASSIGNRHS flag
4477 to parameter_brace_expand_word
4478 - parameter_brace_expand_word: make sure that if the PF_ASSIGNRHS flag
4479 is set and we are expanding ${a[@]} or ${a[*]} we set quoted to
4480 include Q_DOUBLE_QUOTES before calling array_value_internal, mirroring
4481 what we do for $@ and $*. Fixes inconsistency reported by Dan
4482 Douglas <ormaaj@gmail.com>
4483
4484 configure.ac
4485 - use AC_CHECK_TOOL instead of AC_CHECK_PROG to check for ar, since it
4486 will find $host-prefixed versions of utilities. Report and fix from
4487 Mike Frysinger <vapier@gentoo.org>
4488
4489 builtins/setattr.def
4490 - set_var_attribute: check whether bind_variable (called when the
4491 variable whose attributes are being modified is found in the temp
4492 environment) just modified a read-only global variable, and don't
4493 bother marking the temporary variable for propagation if so. The
4494 propagation is superfluous and will result in a strange error
4495 message
4496
4497 2/2
4498 ---
4499 variables.c
4500 - initialize_shell_variables: don't try to import function definitions
4501 with invalid names from the environment if already in posix mode,
4502 but create them as (invisible) exported variables so they pass
4503 through the environment. Print an error message so user knows
4504 what's wrong. Fixes bug reported by Tomas Trnka <ttrnka@mail.muni.cz>
4505
4506 2/9
4507 ---
4508
4509 builtins/read.def
4510 - sigalrm_seen, alrmbuf: now global so the rest of the shell (trap.c)
4511 can use them
4512 - sigalrm: just sets flag, no longer longjmps to alrmbuf; problem was
4513 longjmp without manipulating signal mask, leaving SIGALRM blocked
4514
4515 quit.h
4516 - move CHECK_ALRM macro here from builtins/read.def so trap.c:
4517 check_signals() can call it
4518
4519 trap.c
4520 - check_signals: add call to CHECK_ALRM before QUIT
4521 - check_signals_and_traps: call check_signals() instead of including
4522 CHECK_ALRM and QUIT inline. Integrating check for read builtin's
4523 SIGALRM (where zread call to check_signals_and_traps can see it)
4524 fixes problem reported by Mike Frysinger <vapier@gentoo.org>
4525
4526 2/12
4527 ----
4528 lib/glob/xmbsrtowcs.c
4529 - xdupmbstowcs2: fixed but where end of string was not handled
4530 correctly, causing loop to go past end of string in a bunch of cases.
4531 Fixes bug reported by "Dashing" <dashing@hushmail.com>
4532
4533
4534 2/13
4535 ----
4536 builtins/pushd.def
4537 - popd_builtin: treat any argument that isn't -n or of the form
4538 [-+][[:digit:]]* as an error. Fixes problem reported by Bruce
4539 Korb <bruce.korb@gmail.com>
4540
4541 2/14
4542 ----
4543 configure.ac
4544 - add check for sig_atomic_t; already a placeholder for it in
4545 config.h.in
4546
4547 2/15
4548 ----
4549 subst.c
4550 - do_compound_assignment: don't call assign_compound_array_list with
4551 a NULL variable in case make_local_xxx_variable returns NULL
4552 (it will if you try to shadow a readonly or noassign variable).
4553 Fixes bug reported by Richard Tollerton <rich.tollerton@ni.com>
4554
4555 2/16
4556 ----
4557 variables.c
4558 - make_local_variable: print error messager if an attempt is made to
4559 create a local variable shadowing a `noassign' variable. Previously
4560 we just silently refused to do it
4561
4562 trap.[ch]
4563 - get_original_signal: now global so rest of the shell can use it
4564
4565 sig.c
4566 - initialize_shell_signals: install a signal handler for SIGTERM
4567 that does nothing except set a sigterm_received flag instead of
4568 ignoring it with SIG_IGN, as long as SIGTERM is not ignored when
4569 the shell is started. Use get_original_signal early to get the
4570 original handler, since we will do that later anyway
4571 - set_signal_handler: if installing sigterm_sighandler as the SIGTERM
4572 handler, make sure to add SA_RESTART flag to make it as close to
4573 SIG_IGN as possible
4574
4575 sig.h
4576 - sigterm_sighandler: new extern declaration
4577
4578 quit.h
4579 - RESET_SIGTERM: set sigterm_receved to 0
4580 - CHECK_SIGTERM: check sigterm_received; if it's non-zero, treat it
4581 as a fatal signal and call termsig_handler to exit the shell
4582
4583 jobs.c
4584 - make_child: call RESET_SIGTERM just before fork() so we can detect
4585 if the child process received a SIGTERM before it's able to change
4586 the signal handler back to what it was when the shell started
4587 (presumably SIG_DFL). Only has effect if the shell installed
4588 sigterm_sighandler for SIGTERM, interactive shells that were not
4589 started with SIG_IGN as the SIGTERM handler
4590 - make_child: call RESET_SIGTERM in the parent after fork() so the
4591 rest of the shell won't react to it
4592
4593 execute_cmd.c
4594 - execute_simple_command: call CHECK_SIGTERM after make_child in child
4595 to catch SIGTERM received after fork() and before restoring old
4596 signal handlers
4597 - execute_disk_command: call CHECK_SIGTERM after make_child in child
4598 process after restoring old signal handlers and again just before
4599 calling shell_execve. Fixes race condition observed by
4600 Padraig Brady <p@draigbrady.com> when testing with his `timeout'
4601 program
4602
4603 lib/readline/display.c
4604 - open_some_spaces: new function, subset of insert_some_chars that just
4605 opens up a specified number of spaces to be overwritten
4606 - insert_some_spaces: now just calls to open_some_spaces followed by
4607 _rl_output_some_chars
4608 - update_line: use col_temp instead of recalculating it using
4609 _rl_col_width in the case where we use more columns with fewer bytes
4610 - update_line: use open_some_spaces and then output the right number
4611 of chars instead of trying to print new characters then overwrite
4612 existing characters in two separate calls. This includes removing
4613 some dodgy code and making things simpler. Fix from Egmont
4614 Koblinger <egmont@gmail.com>
4615 - use new variable `bytes_to_insert' instead of overloading temp in
4616 some code blocks (nls - nfd, bytes that comprise the characters
4617 different in the new line from the old)
4618
4619 2/18
4620 ----
4621 redir.c
4622 - do_redirection_internal: add undoable redirection for the implicit
4623 close performed by the <&n- and >&n- redirections. Fixes bug
4624 reported by Stephane Chazelas <stephane.chazelas@gmail.com>
4625
4626 2/19
4627 ----
4628 sig.c
4629 - termsig_handler: an interactive shell killed by SIGHUP and keeping
4630 command history will try to save the shell history before exiting.
4631 This is an attempt to preserve the save-history-when-the-terminal-
4632 window-is-closed behavior
4633
4634 2/21
4635 ----
4636 braces.c
4637 - brace_expand: if a sequence expansion fails (e.g. because the
4638 integers overflow), treat that expansion as a simple string, including
4639 the braces, and try to process any remainder of the string. The
4640 remainder may include brace expansions. Derived from SuSE bug
4641 804551 example (https://bugzilla.novell.com/show_bug.cgi?id=804551)
4642
4643 2/23
4644 ----
4645 {quit,sig}.h,sig.c
4646 - sigterm_received declaration now in sig.h; type is sig_atomic_t
4647 - sigwinch_received type now sig_atomic_t
4648 - sig.h includes bashtypes.h and <signal.h> if SIG_DFL not defined
4649 (same logic as trap.h) to pick up sig_atomic_t
4650
4651 unwind_prot.c
4652 - include sig.h before quit.h (reverse order)
4653
4654 2/27
4655 ----
4656 builtins/shopt.def
4657 - reset_shopt_options: make sure check_window_size is reset to the
4658 default from config.h, not unconditionally to 0
4659
4660 jobs.[ch]
4661 - last_made_pid, last_asynchronous_pid: now volatile. Change from SuSE
4662
4663 jobs.c
4664 - wait_for: if we're using sigaction to install a handler for SIGCHLD,
4665 make sure we specify SA_RESTART
4666
4667 lib/{tilde,readline}/shell.c
4668 - get_home_dir: instead of looking in the password file every time,
4669 look once and cache the result
4670
4671 sig.[ch]
4672 - sigwinch_received, sigterm_received: now `volatile' qualified
4673
4674 sig.c,quit.h
4675 - interrupt_state,terminating_signal: now sig_atomic_t
4676
4677 3/1
4678 ---
4679 MANIFEST,examples/*
4680 - removed around 120 files without FSF copyrights; requested by
4681 Karl Berry in early January
4682
4683 3/2
4684 ---
4685 lib/malloc/malloc.c
4686 - morecore: only check whether SIGCHLD is trapped if SIGCHLD is defined
4687
4688 doc/bashref.texi
4689 - Fixed most of the examples in the GNU Parallel section to use better
4690 shell idioms following complaints on bug-bash; added a couple of
4691 examples and smoothed out the text
4692
4693 quit.h
4694 - include "sig.h" for sig_atomic_t
4695
4696 lib/readline/display.c
4697 - update_line: when inserting one or more characters at the end of
4698 the display line in a non-multibyte environment, just write from the
4699 first difference to the end of the line and return. We don't have
4700 to adjust _rl_last_c_pos. This is needed to adjust from the old
4701 two-part copy to a single call to _rl_output_some_chars (change of
4702 2/16)
4703
4704 3/4
4705 ---
4706 Makefile.in,doc/Makefile.in
4707 - PACKAGE_TARNAME, docdir: new variables substituted by autoconf
4708 - OTHER_DOCS,OTHER_INSTALLED_DOCS: new variables with auxiliary
4709 documentation files to be installed into $(docdir)
4710 - install: add new rule to install $(OTHER_DOCS)
4711 - uninstall: add new rule to uninstall $(docdir)/$(OTHER_INSTALLED_DOCS)
4712
4713 doc/bash.1
4714 - add URL to `POSIX' file in `SEE ALSO' section; put pointer to that
4715 section in --posix and set -o posix descriptions
4716
4717 examples/
4718 - removed around 110 examples at the request of the FSF due to copyright
4719 issues
4720
4721 3/5
4722 ---
4723 builtins/setattr.def
4724 - readonly: modified help text slightly to make it clearer that
4725 functions aren't changed or displayed unless the -f option is given.
4726 Report from <gotmynick@gmail.com>
4727
4728 3/9
4729 ---
4730 include/typemax.h
4731 - SIZE_MAX: define to 65535 (Posix minimum maximum) if not defined
4732
4733 parse.y
4734 - include "typemax.h" for possible SIZE_MAX definition, make sure we
4735 include it after shell.h
4736
4737 {braces,expr}.c
4738 - include "typemax.h" for possible INTMAX_MIN and INTMAX_MAX definitions
4739
4740 3/10
4741 ----
4742 bashline.c
4743 - bash_default_completion: make sure completion type of `!' (same as
4744 TAB but with show-all-if-ambiguous set) and glob-word-completion
4745 sets rl_filename_completion_desired to 0 so extra backslashes don't
4746 get inserted by `quoting' the completion. We can't kill all the
4747 matches because show-all-if-ambiguous needs them. Bug report from
4748 Marcel (Felix) Giannelia <info@skeena.net>
4749
4750 [bash-4.3-alpha frozen]
4751
4752 3/14
4753 ----
4754 general.c
4755 - trim_pathname: use memmove instead of memcpy since the source and
4756 destination pathnames may overlap. Report and fix from Matthew
4757 Riley <mattdr@google.com>
4758
4759 3/18
4760 ----
4761 configure.ac
4762 - socklen_t is defined as `unsigned int' if configure can't find it
4763
4764 3/20
4765 ----
4766 lib/readline/complete.c
4767 - S_ISVTX: since it's not defined on all platforms (Minix), make sure
4768 its use is protected with #ifdef
4769
4770 3/21
4771 ----
4772 doc/{bash.1,bashref.texi}
4773 - Added mention of ${!name[@]} and ${!name[*]} expansions to get all
4774 indices of an array. Suggested by Jonathan Leffler
4775 <jonathan.leffler@gmail.com>
4776
4777 3/24
4778 ----
4779 subst.h
4780 - SD_IGNOREQUOTE: new define for skip_to_delim; if set, means that
4781 single quotes (for now) will be treated as ordinary characters
4782
4783 subst.c
4784 - skip_to_delim: handle SD_IGNOREQUOTE. no callers use it for now
4785
4786 3/25
4787 ----
4788 support/config.{guess,sub}
4789 - updated to versions from autoconf-2.69
4790
4791 3/31
4792 ----
4793 lib/sh/shquote.c
4794 - sh_single_quote: short-circuit quoting a single "'" instead of
4795 creating a long string with empty single-quoted strings
4796
4797 parser.h
4798 - DOLBRACE_QUOTE2: new define, like DOLBRACE_QUOTE, but need to single-
4799 quote results of $'...' expansion because quote removal will be
4800 done later. Right now this is only done for ${word/pat/rep}
4801
4802 parse.y
4803 - parse_matched_pair: set state to DOLBRACE_QUOTE2 for pattern
4804 substitution word expansion so we don't treat single quote specially
4805 in the pattern or replacement string
4806 - parse_matched_pair: if we're parsing a dollar-brace word expansion
4807 (${...}) and we're not treating single quote specially within
4808 double quotes, single-quote the translation of $'...' ansi-c
4809 escaped strings. Original report and fix from Eduardo A.
4810 Bustamante López <dualbus@gmail.com>
4811
4812 subst.c
4813 - extract_dollar_brace_string: ${word/pat/rep} scanning now sets the
4814 DOLBRACE_QUOTE2 flag instead of DOLBRACE_QUOTE so we don't treat
4815 single quotes specially within a double-quoted string
4816
4817 execute_cmd.c
4818 - fix_assignment_words: skip over assignment statements preceding a
4819 command word before trying to figure out whether or not assignment
4820 statements following a possible declaration command should be
4821 treated specially. Fixes bug reported by Dan Douglas
4822 <ormaaj@gmail.com>
4823
4824 4/4
4825 ---
4826 lib/readline/readline.c
4827 - _rl_dispatch_subseq: only call _rl_vi_set_last (and check whether
4828 the key is a text modification command) if the key sequence length
4829 is 1. That keeps the arrow keys from setting the last command
4830 when called in vi command mode. Fixes bug reported by Ian A.
4831 Watson <watson_ian_a@lilly.com>
4832
4833 4/6
4834 ---
4835 lib/readline/bind.c
4836 - rl_parse_and_bind: when parsing a double-quoted string as the value
4837 of a variable, make sure we skip past the leading double quote.
4838 Fix from Andreas Schwab <schwab@linux-m68k.org>
4839
4840 variables.c
4841 - hash_lookup: set new local variable last_table_searched to the table
4842 a successful lookup appears in; tested in make_local_variable to
4843 solve the problem below
4844 - make_local_variable: if we find a variable with the tempenv flag
4845 set at the same `level' as variable_context', but not found in the
4846 temporary_env (temp environment preceding the builtin), return it.
4847 The temp environment preceding the function call has already been
4848 merged (in execute_function) into the list of variable contexts the
4849 function sees as shell_variables by the time this is called. Fixes
4850 inconsistency pointed out by Dan Douglas <ormaaj@gmail.com>
4851
4852 subst.c
4853 - expand_arith_string: expanded out contents of expand_string,
4854 expand_string_internal, expand_string_if_necessary to create a
4855 WORD_DESC and call call_expand_word_internal() on it directly.
4856 We don't want process substitution to be performed ( 1<(2) ) should
4857 mean something different in an arithmetic expression context.
4858 It doesn't work to just turn on the DQUOTE flag, since that means
4859 that things like ${x["expression"]} are not expanded correctly.
4860 Fixes problem pointed out by Dan Douglas <ormaaj@gmail.com>
4861
4862 4/13
4863 ----
4864 subst.c
4865 - process_substitute: run the EXIT trap before exiting, as other
4866 shells seem to. Fixes problem pointed out by Dan Douglas
4867 <ormaaj@gmail.com>
4868
4869 lib/readline/readline.c
4870 - readline_internal_setup: call rl_vi_insertion_mode to enter vi
4871 mode instead of rl_vi_insert_mode to avoid resetting the saved last
4872 command information. Posix says that `.' can repeat a command
4873 that was entered on a previous line so we need to save the info.
4874 Fixes bug reported by Ian A. Watson <watson_ian_a@lilly.com>
4875
4876 4/14
4877 ----
4878 lib/readline/complete.c
4879 - rl_completion_matches: make sure xrealloc returns something non-null
4880 (can happen when interrupted by a signal) before trying to add
4881 matches to match_list
4882
4883 subst.c
4884 - array_remove_pattern: return NULL right away if array_variable_part
4885 returns an invisible variable
4886 - array_length_reference: handle array_variable_part returning an
4887 invisible variable
4888 - get_var_and_type: handle array_variable_part returning an invisible
4889 variable
4890
4891 4/15
4892 ----
4893 execute_cmd.c
4894 - execute_command_internal: make sure to run the EXIT trap for group
4895 commands anywhere in pipelines, not just at the end. From a point
4896 raised by Andreas Schwab <schwab@linux-m68k.org>
4897
4898 variables.c
4899 - bind_int_variable: make sure invisible flag is unset. Fixes problems
4900 like "declare -ai a; : $(( a[4]=4 ));"
4901
4902 arrayfunc.c
4903 - array_variable_part: return variable even if invisible flag set,
4904 callers must handle invisible vars
4905
4906 4/18
4907 ----
4908 builtins/set.def
4909 - unset_builtin: if -n flag given, call unset_nameref instead of
4910 unset_variable
4911
4912 variables.c
4913 - find_variable_nameref: print warning message if nameref circular
4914 reference detected, return NULL and let caller deal with it
4915
4916 builtins/declare.def
4917 - declare_builtin: only disallow global references at this point if
4918 we are at the global scope
4919
4920 5/16
4921 ----
4922 configure.ac
4923 - update release status to beta
4924
4925 5/23
4926 ----
4927 trap.c
4928 - run_pending_traps: save and restore pipeline around calls to
4929 evalstring() in case we get a trap while running a trap. Have to
4930 figure out the recursive running traps issue elsewhere. Fixes
4931 bug reported by Roman Rakus <rrakus@redhat.com>
4932 - run_pending_traps: make sure to set running_trap to the appropriate
4933 signal value when running a trap command
4934 - run_pending_traps: short-circuit immediately if running_trap set
4935 when invoked. Could change this later to only skip if it would
4936 run the same trap as currently being run (running_trap == sig + 1)
4937
4938 configure.ac
4939 - add warning if bison not found
4940
4941 lib/readline/doc/rltech.texi
4942 - new section with an example program illustrating the callback
4943 interface. Suggested by Peng Yu <pengyu.ut@gmail.com>
4944
4945 examples/loadables/Makefile.in
4946 - remove references to `cut' and `getconf', which were removed in
4947 early March
4948
4949 5/28
4950 ----
4951 lib/sh/pathphys.c
4952 - sh_realpath: correct inverted two arguments to call to sh_makepath.
4953 Report and fix from Julien Thomas <jthomas@exosec.fr>
4954
4955 6/7
4956 ---
4957 execute_cmd.c
4958 - executing_line_number: the else clauses that are conditional on
4959 various options being defined can simply be if clauses -- they are
4960 mutually exclusive and all have `return' in the body. Fixes bug
4961 reported by Flavio Medeiros <flaviomotamedeiros@gmail.com>
4962
4963 6/25
4964 ----
4965 lib/readline/readline.c
4966 - readline_internal_setup: only sent the meta-key enable string to the
4967 terminal if we've been told to use one and the terminal has been
4968 successfully initialized (RL_ISSTATE (RL_STATE_TERMPREPPED) != 0).
4969 Suggested by Dan Mick <dan.mick@inktank.com>
4970
4971 lib/readline/signals.c
4972 - _rl_signal_handler: call any defined signal hook after calling
4973 rl_resize_terminal when handling a SIGWINCH. We already have called
4974 the original SIGWINCH handler but will not be resending the signal
4975 to ourselves
4976
4977 6/27
4978 ----
4979 lib/readline/doc/history.3, doc/bash.1
4980 - fix description of the `$' modifier to note that it expands to the
4981 last *word*, which is not always the last argument. Report from
4982 ariyetz@gmail.com via gnu.org RT
4983
4984 6/29
4985 ----
4986 lib/glob/smatch.c
4987 - glob_asciiranges: initialize to value of GLOBASCII_DEFAULT instead
4988 of 0 (0 if not defined)
4989
4990 configure.ac,config.h.in
4991 - --enable-glob-asciiranges-default: new option, controls the value of
4992 GLOBASCII_DEFAULT; use it to turn globasciiranges shopt option on
4993 by default
4994
4995 doc/bashref.texi
4996 - document new --enable-glob-asciiranges-default configure option
4997
4998 variables.c
4999 - assign_in_env: implement += value appending semantics for assignments
5000 preceding command names
5001
5002 7/4
5003 ---
5004 expr.c
5005 - set lasttok = NUM in all of the functions that result in a number,
5006 even if it's a boolean, to avoid errors with constructs like
5007 1 * x = 1, which should be an asignment error. Fixes problem
5008 pointed out by Dan Douglas <ormaaj@gmail.com>
5009
5010 parse.y
5011 - decode_prompt_string: don't bother to call strcpy if
5012 polite_directory_format returns its argument unchanged. It's not
5013 necessary and Mac OS X 10.9 aborts because of a supposed overlapping
5014 string copy. Bug and fix from simon@hitzemann.org
5015
5016 subst.c
5017 - parameter_brace_find_indir: new function, code from
5018 parameter_brace_expand_indir that looks up the indirectly-referenced
5019 variable, but does not expand it
5020 - parameter_brace_expand_indir: call parameter_brace_find_indir to
5021 look up indirected variable reference
5022 - get_var_and_type: call parameter_brace_find_indir if it looks like we
5023 are trying to manipulate an indirect variable reference like
5024 ${!b%%foo}. This makes a difference if !b references an array
5025 variable. Bug report from Dan Douglas <ormaaj@gmail.com>
5026
5027 7/6
5028 ---
5029 lib/sh/casemod.c
5030 - sh_modcase: make sure argument passed to is_basic is <= UCHAR_MAX,
5031 since cval can convert something to a wchar_t greater than UCHAR_MAX.
5032 Fixes bug reported by Tomasz Tomasik <scx.mail@gmail.com>
5033
5034 7/8
5035 ---
5036 lib/readline/history.c
5037 - add_history_time: if history_length == 0, referencing history_length
5038 - 1 will result in an array bounds error, so make history_length be
5039 at least 1 before going on. Fixes bug reported by Geng Sheng Liu
5040 <gsliu.tju@gmail.com>
5041
5042 builtins/setattr.def
5043 - show_func_attributes: display definition (if NODEFS argument is 0) and
5044 attributes for a particular function; used by `declare -fp name'
5045
5046 builtins/declare.def
5047 - declare_internal: call show_func_attributes if -f supplied with -p.
5048 Fixes inconsistency observed by Linda Walsh <bash@tlinx.org>
5049
5050 builtins/common.h
5051 - new extern declaration for show_func_attributes
5052
5053 builtins/read.def
5054 - read_builtin: check the first supplied variable name for validity
5055 before attempting to read any input, since we know we will have to
5056 at least use that one. Don't check any other names yet. Suggested
5057 by jidanni@jidanni.org
5058
5059 7/10
5060 ----
5061 redir.c
5062 - do_redirection_internal: when closing a file descriptor with
5063 r_close_this ([n]<&-) count close errors as redirection errors if
5064 errno ends up as EIO or ENOSPC. Originally reported back in April
5065 2012 by Andrey Zaitsev <jstcdr@gmail.com>
5066
5067 7/11
5068 ----
5069 redir.c
5070 - do_redirection_internal: before calling check_bash_input, make sure
5071 that we don't call check_bash_input for an asynchronous process that
5072 is replacing stdin with something else. The seek backwards affects
5073 the parent process as well, since parents and children share the
5074 file pointer. Fixes problem originally reported in March 2013 by
5075 Martin Jackson <mjackson220.list@gmail.com>
5076
5077 7/13
5078 ----
5079 doc/{bash.1,bashref.texi}
5080 - slight change to add a description of `shopt -o' suggested by Bruce
5081 Korb <bruce.korb@gmail.com>
5082
5083 7/19
5084 ----
5085 lib/readline/histfile.c
5086 - history_do_write: if close returns < 0, make sure we restore the
5087 backup history file and return a non-zero value
5088 - history_truncate_file: if write or close return < 0, make sure we
5089 return a non-zero value
5090
5091 [bash-4.3-beta frozen]
5092
5093 7/21
5094 ----
5095 lib/readline/isearch.c
5096 - rl_display_search: now takes an entire search context flags word as
5097 the second argument, instead of just reverse flag; changed callers
5098 - rl_display_search: if the search has failed, add `failed ' to the
5099 beginning of the search prompt
5100 - _rl_isearch_dispatch: if the search has failed, display the entire
5101 search string with an indication that the search failed but with the
5102 last matching line. Suggested by jidanni@jidanni.org
5103
5104 command.h
5105 - W_ASSIGNINT: new word flag; used internally for make_internal_declare
5106 and set by fix_assignment_words
5107
5108 execute_cmd.c
5109 - fix_assignment_words: set W_ASSIGNINT if compound assignment and -i
5110 given as option. We don't do anything with the value yet
5111
5112 subst.c
5113 - shell_expand_word_list: rework the way the option list that is
5114 passed to make_internal_declare is created
5115
5116 8/1
5117 ---
5118 doc/{bash.1,bashref.texi}
5119 - minor changes to description of $! based on a report from Chris
5120 Down <chris@chrisdown.name>
5121
5122 arrayfunc.c
5123 - assign_array_element_internal: before trying to get an array's max
5124 index to process a negative subscript, make sure the array exists.
5125 Bug report from Geir Hauge <geir.hauge@gmail.com>
5126
5127 8/2
5128 ---
5129 arrayfunc.c
5130 - assign_array_element_internal: before using array_max_index() when
5131 processing a negative subscript, make sure the variable is an array.
5132 if it's not, use 0 as array_max_index assuming it's a string.
5133 Fixes bug report from Geir Hauge <geir.hauge@gmail.com>
5134
5135 8/3
5136 ---
5137 Makefile.in
5138 - pcomplete.o: add dependency on $(DEFDIR)/builtext.h. Suggested by
5139 Curtis Doty <curtis@greenkey.net>
5140
5141 8/5
5142 ---
5143 lib/glob/sm_loop.c
5144 - strcompare: short-circuit and return FNM_NOMATCH if the lengths of the
5145 pattern and string (pe - p and se - s, respectively) are not equal
5146 - strcompare: don't bother trying to set *pe or *se to '\0' if that's
5147 what they already are. Fixes bug reported by Geir Hauge
5148 <geir.hauge@gmail.com>
5149
5150 8/6
5151 ---
5152 doc/{bash.1,bashref.texi},builtins/hash.def,lib/readline/doc/rluser.texi
5153 - minor typo changes from Geir Hauge <geir.hauge@gmail.com>
5154
5155 bultins/help.def
5156 - show_longdoc: avoid trying to translate the empty string because it
5157 often translates to some boilerplate about the project and
5158 translation. Report and fix from Geir Hauge <geir.hauge@gmail.com>
5159
5160 8/8
5161 ---
5162 builtins/help.def
5163 - help_builtin: try two passes through the list of help topics for each
5164 argument: one doing exact string matching and one, if the first pass
5165 fails to find a match, doing string prefix matching like previous
5166 versions. This prevents `help read' from matching both `read' and
5167 `readonly', but allows `help r' to match everything beginning with
5168 `r'. Inspired by report from Geir Hauge <geir.hauge@gmail.com>
5169
5170 8/13
5171 ----
5172 builtins/fc.def
5173 - fc_builtin,fc_gethnum: calculate `real' end of the history list and
5174 use it if -0 is specified as the beginning or end of the history
5175 range to list. Doesn't work for fc -e or fc -s by design. Feature
5176 requested by Mike Fied <micfied@gmail.com>
5177
5178 8/16
5179 ----
5180 trap.c
5181 - _run_trap_internal: use {save,restore}_parser_state instead of
5182 {save,restore}_token_state. It's more comprehensive
5183
5184 8/23
5185 ----
5186 doc/bash.1
5187 - disown: remove repeated text. Report and fix from Thomas Hood
5188 <jdthood@gmail.com>
5189
5190 8/25
5191 ----
5192 lib/readline/rltty.c
5193 - set_special_char: fix prototype (last arg is rl_command_func_t *)
5194
5195 sig.c
5196 - set_signal_handler: return oact.sa_handler only if sigaction
5197 succeeds; if it doesn't, return SIG_DFL (reasonable default). From
5198 https://bugzilla.redhat.com/show_bug.cgi?id=911404
5199
5200 bashline.c
5201 - attempt_shell_completion: fix to skip assignment statements preceding
5202 command name even if there are no programmable completions defined.
5203 From https://bugzilla.redhat.com/show_bug.cgi?id=994659
5204 - attempt_shell_completion: if still completing command word following
5205 assignment statements, do command completion even if programmable
5206 completion defined for partial command name entered so far
5207
5208 8/26
5209 ----
5210 pcomplete.c
5211 - pcomp_filename_completion_function: make sure rl_filename_dequoting_function
5212 is non-NULL before trying to call it. Bug and fix from
5213 Andreas Schwab <schwab@linux-m68k.org>
5214
5215 bashline.c
5216 - bash_command_name_stat_hook: if *name is not something we're going
5217 to look up in $PATH (absolute_program(*name) != 0), just call the
5218 usual bash_filename_stat_hook and return those results. This makes
5219 completions like $PWD/exam[TAB] add a trailing slash
5220
5221 9/2
5222 ---
5223 builtins/read.def
5224 - read_builtin: before comparing what we read to the delim, make sure
5225 we are not supposed to be ignoring the delimiter (read -N). We
5226 set the delim to -1, but it's possible to read a character whose
5227 int value ends up being between -1 and -128. Fixes bug
5228 reported by Stephane Chazelas <stephane.chazelas@gmail.com>
5229
5230 doc/{bash.1,bashref.texi}
5231 - word splitting: crib some language from Posix to make it clear that
5232 characters in IFS are treated as field *terminators*, not field
5233 *separators*. Addresses issue raised by DJ Mills
5234 <danielmills1@gmail.com>
5235
5236 lib/readline/{util.c,rldefs.h}
5237 - _rl_stricmp,_rl_strnicmp: now take const char * string arguments;
5238 changed prototype declarations
5239
5240 9/5
5241 ---
5242 doc/{bash.1,bashref.texi}
5243 - [[: modify description of pattern matching to make it clear that the
5244 match is performed as if the extglob option were enabled. From Red
5245 Hat bug https://bugzilla.redhat.com/show_bug.cgi?id=1002078
5246
5247 9/12
5248 ----
5249 lib/readline/isearch.c
5250 - _rl_isearch_dispatch: if we read an ESC and it's supposed to
5251 terminate the search, make sure we check for typeahead with
5252 _rl_pushed_input_available, since installing a hook function causes
5253 typeahead to be collected in `ibuffer' (input.c). If there is any,
5254 make sure we still use the ESC as a prefix character. Bug and fix
5255 from Mike Miller <mtmiller@ieee.org>
5256
5257 9/16
5258 ----
5259 builtins/{caller,cd,kill,pushd,wait}.def
5260 - builtin_usage(): make sure call to this sets return status to
5261 EX_USAGE
5262
5263 9/18
5264 ----
5265 terminal.c
5266 - rl_change_environment: new application-settable variable; if non-
5267 zero (the default), readline will modify LINES and COLUMNS in the
5268 environment when it handles SIGWINCH
5269 - _rl_get_screen_size: if rl_change_environment is non-zero, use setenv
5270 to modify LINES and COLUMNS environment variables
5271
5272 readline.h
5273 - rl_change_environment: new extern declaration for applications
5274
5275 9/22
5276 ----
5277 configure.ac
5278 - relstatus: bumped version to bash-4.3-beta2
5279
5280 9/24
5281 ----
5282
5283 lib/readline/readline.c
5284 - bind_arrow_keys_internal: added more key bindings for the numeric key
5285 pad arrow keys on mingw32. Patch from Pierre Muller
5286 <pierre.muller@ics-cnrs.unistra.fr>
5287
5288 10/19
5289 -----
5290
5291 bashline.c
5292 - maybe_restore_tilde: version of restore_tilde that honors `direxpand';
5293 calls restore_tilde after saving directory expansion hook if
5294 necessary. Report from Andreas Schwab <schwab@linux-m68k.org>
5295
5296 builtins/cd.def
5297 - -@: new option, allows cd to use `extended attributes' present in
5298 NFSv4, ZFS; idea taken from ksh93. Attributes associated with a
5299 file are presented as a directory containing the attributes as
5300 individual files. Original patch contributed by Cedric Blancher
5301 <cedric.blancher@gmail.com>
5302
5303 10/20
5304 -----
5305 aclocal.m4
5306 - BASH_CHECK_MULTIBYTE: check for wcwidth being broken with unicode
5307 combining characters needs a value to use when cross-compiling.
5308 Bug report from Bert Sutherland <bertsutherland@gmail.com>
5309
5310 doc/{bash.1,bashref.texi}
5311 - document new -@ option to cd builtin
5312
5313 10/28
5314 -----
5315 lib/glob/{{gmisc,glob}.c,glob.h}
5316 - extglob_pattern renamed to extglob_pattern_p, declared in glob.h
5317
5318 subst.c
5319 - expand_word_internal: typo fix: case to fix " $@\ " bug in bash-4.2
5320 had a typo (& isexp instead of &&)
5321
5322 10/29
5323 -----
5324 input.c
5325 - getc_with_restart: make sure local_index and local_bufused are
5326 reset to 0 before returning EOF, in case we are running an interactive
5327 shell without line editing and ignoreeof is set. Report and fix
5328 from Yong Zhang <yong.zhang@windriver.com>
5329
5330 lib/readline/search.c
5331 - _rl_nsearch_init: take out extra third argument to rl_message; it
5332 only matches prototype (and maybe format) in cases where
5333 PREFER_STDARG and USE_VARARGS are both undefined, which is rare
5334
5335 10/31
5336 -----
5337 subst.c
5338 - process_substitute: when opening the named pipe in the child, open
5339 without O_NONBLOCK to avoid race conditions. Happens often on AIX.
5340 Bug report and fix from Michael Haubenwallner
5341 <michael.haubenwallner@salomon.at>
5342
5343 builtins/ulimit.def
5344 - RLIMIT_NTHR: if RLIMIT_PTHREAD is not defined, but RLIMIT_NTHR is,
5345 use RLIMIT_NTHR (NetBSD)
5346
5347 11/5
5348 ----
5349 locale.c
5350 - set_default_locale_vars,set_locale_var: if TEXTDOMAINDIR has been
5351 set, and default_dir has a non-null value, call bindtextdomain(3)
5352 when TEXTDOMAIN is assigned a value. Fixes problem reported by
5353 Michael Arlt <qwertologe@googlemail.com>
5354
5355 11/6
5356 ----
5357 builtins/cd.def
5358 - cdxattr: only create synthetic pathname in `buf' if NDIRP argument
5359 is non-null
5360 - change_to_directory: if we have specified -@ and cdxattr returns
5361 failure, fail immediately. Fixes bug reported by Joshuah Hurst
5362 <joshhurst@gmail.com>
5363
5364 11/12
5365 -----
5366 redir.c
5367 - print_redirection: change r_err_and_out (&>) and its append form,
5368 r_append_err_and_out (&>>) cases to separate redirection operator
5369 from filename by a space, in case we have a process substitution.
5370 Fixes bug reported by admn ombres <admn.ombres@gmail.com>
5371
5372 11/15
5373 -----
5374 execute_cmd.c
5375 - execute_simple_command: don't close process substitution fds until
5376 we are finished executing any current shell function. Partial fix
5377 for bug reported by John Dawson <john.dawson@gmail.com>
5378
5379 support/shobj-conf
5380 - add support for Darwin 13 (Mac OS X 10.9, Mavericks). Based on a
5381 report by Ludwig Schwardt <ludwig.schwardt@gmail.com>
5382
5383 11/20
5384 -----
5385 [bash-4.3-rc1 frozen]
5386
5387 11/24
5388 -----
5389 builtins/printf.def
5390 - bind_printf_variable: make sure that the variable assigned to is
5391 no longer marked as invisible. Fixes bug reported by NBaH
5392 <nbah@sfr.fr>
5393
5394 11/28
5395 -----
5396 jobs.c
5397 - delete_old_job: fix off-by-one error in job index in call to
5398 internal_warning. Bug report from Peter Cordes <peter@cordes.ca>
5399
5400 11/30
5401 -----
5402 doc/bashref.texi
5403 - add string to description of special parameters with name of
5404 special parameter prefixed by a $, so you can search for $#,
5405 for instance
5406
5407 12/2
5408 ----
5409 lib/readline/{histexpand.c
5410 - get_history_event: account for current_history() possibly returning
5411 NULL. Report and fix from Pankaj Sharma <pankaj.s01@samsung.com>
5412
5413
5414 12/11
5415 -----
5416
5417 lib/readline/parse-colors.c
5418 - get_funky_string: don't call abort if we see something we can't
5419 parse; just return an error
5420 - _rl_parse_colors: if we encounter an error while parsing $LS_COLORS
5421 we need to leave _rl_color_ext_list as NULL after freeing its
5422 elements, then turn off _rl_colored_stats. Report and fix from Martin
5423 Wesdorp <mwesdorp@casema.nl>
5424
5425 12/13
5426 -----
5427
5428 lib/readline/parse-colors.c
5429 - _rl_parse_colors: if we encounter an unrecognized prefix, throw an
5430 error but try to recover and go on to the next specification
5431
5432 variables.c
5433 - make_local_variable: for new variables this function creates, set
5434 the att_invisible attribute. All callers from declare_internal.
5435 Indirectly, this is a fix for bug with `declare -n var; var=foo;'
5436 reported by Pierre Gaston <pierre.gaston@gmail.com>
5437 - bind_variable: if assigning to nameref variable that doesn't have
5438 a value yet (e.g., with `declare -n var; var=foo'), don't try to
5439 use the unset name. Fixes a segfault reported by Pierre Gaston
5440 <pierre.gaston@gmail.com>
5441
5442 execute_cmd.c
5443 - execute_command_internal: make sure last_command_exit_value is set
5444 to 0 after any command executed in the background. Fixes bug
5445 reported by Martin Kealey <martin@kurahaupo.gen.nz>
5446
5447 12/17
5448 -----
5449 support/config.{guess,sub}
5450 - updated to latest versions from git
5451
5452 12/19
5453 -----
5454 parse.y
5455 - struct STRING_SAVER: now has a new `flags' element, to identify the
5456 caller: alias expansion, double-paren parsing, or parse_and_execute
5457 - push_string: now sets flags to PSH_ALIAS if `ap' argument is non-NULL
5458 - push_string: now doesn't attempt to call strlen on a NULL string to
5459 set shell_input_line_size
5460 - parser_expanding_alias, parser_save_alias, parser_restore_alias: new
5461 functions to provide an external interface to push_string and
5462 pop_string; parser_save_alias sets flags element to PSH_SOURCE (could
5463 be renamed PSH_EXTERN someday)
5464 - shell_getc: when yy_getc returns '\0', instead of just testing
5465 whether the pushed_string_list is not-empty before popping it, don't
5466 pop if if the saved string has flags PSH_SOURCE, indicating that
5467 parse_and_execute set it before setting bash_input to the string.
5468 We should continue reading to the end of that string before popping
5469 back to a potential alias. Partial solution for the problem of aliases
5470 with embedded newlines containing `.' commands being executed out of
5471 order reported by Andrew Martin <andrew.martin@gmail.com>
5472 - shell_getc: when yy_getc returns '\0' and there is a saved string of
5473 type PSH_SOURCE, restart the read without popping the string stack
5474 if we have not read to the end of bash_input.location.string. Rest
5475 of fix for out-of-order execution problem
5476
5477 externs.h
5478 - parser_expanding_alias, parser_save_alias, parser_restore_alias: new
5479 extern function declarations
5480
5481 builtins/evalstring.c
5482 - pe_prologue: if the parser is expanding an alias, make sure to add
5483 an unwind-protect to restore the alias; undoes the work that will be
5484 performed by parse_and_execute/parse_string
5485 - parse_and_execute,parse_string: after calling push_stream to save
5486 bash_input, check whether or not the parser is currently expanding
5487 an alias (parser_expanding_alias() != 0). If it is, we want to save
5488 that string in the pushed_string_list, which we do with
5489 parser_save_alias.
5490
5491 12/23
5492 -----
5493 execute_cmd.c
5494 - execute_for_command: make sure to set line_number before expanding
5495 the word list, so expansion errors have the right line number.
5496 From a report from Ben Okopnik <ben@okopnik.com>
5497
5498 expr.c
5499 - exp2: save token pointer before calling readtok(), arrange to use
5500 saved token pointer when printing error token on a division by 0
5501 error
5502
5503 12/27
5504 -----
5505 lib/readline/display.c
5506 - rl_redisplay: when calculating effects of invisible characters in a
5507 prompt that is split across physical screen lines to set the indices
5508 of linebreaks, don't bother testing local_prompt_prefix (line 751).
5509 That prefix doesn't matter when calculating prompt visible and
5510 invisible characters. Fixes problem reported by Jinesh Choksi
5511 <jinesh@onelittlehope.com>
5512
5513 Makefile.in
5514 - install: make sure to use $(DESTDIR) when installing OTHER_DOCS.
5515 Report and fix from Matthias Klose <doko@debian.org>
5516
5517 doc/texinfo.tex
5518 - updated to version of 2013-09-11
5519
5520 12/28
5521 -----
5522 lib/readline/undo.c
5523 - rl_do_undo: if we are undoing from a history entry (rl_undo_list ==
5524 current_history()->data), make sure the change to rl_line_buffer is
5525 reflected in the history entry. We use the guts of
5526 rl_maybe_replace_line to do the work. Fixes problem reported by
5527 gregrwm <backuppc-users@whitleymott.net>
5528
5529 12/30
5530 -----
5531 sig.c
5532 - sigint_sighandler: if we get a SIGINT (and this signal handler is
5533 installed) while the wait builtin is running, note that we received
5534 it in the same way as jobs.c:wait_sigint_handler and return. The
5535 various wait_for functions will look for that with CHECK_WAIT_INTR.
5536 This fixes the wait builtin not being interruptible in an interactive
5537 job control shell
5538
5539 12/31
5540 -----
5541 trap.c
5542 - set_signal_hard_ignored: rename set_signal_ignored to this, since it
5543 both sets original_signals[sig] and sets the HARD_IGNORE flag
5544 - set_signal_ignored: new function, now just sets original_signals[sig]
5545
5546 trap.h
5547 - set_signal_hard_ignored: new external declaration
5548
5549 sig.c
5550 - initialize_terminating_signals: call set_signal_hard_ignored instead
5551 of set_signal_ignored for signals with disposition SIG_IGN when the
5552 shell starts
5553
5554 execute_cmd.c
5555 - setup_async_signals: make sure we get the original dispositions for
5556 SIGINT and SIGQUIT before starting the subshell, and don't call
5557 set_signal_ignored because that sets original_signals[sig]. If we
5558 don't, subsequent attempts to reset handling using trap will fail
5559 because it thinks the original dispositions were SIG_IGN. Posix
5560 interpretation 751 (http://austingroupbugs.net/view.php?id=751)
5561
5562 1/2/2014
5563 --------
5564 lib/sh/stringvec.c
5565 - strvec_mcreate, strvec_mresize: versions of create and resize that
5566 use malloc and realloc, respectively, instead of xmalloc/xrealloc
5567
5568 braces.c
5569 - expand_amble,mkseq: use strvec_mcreate/strvec_mresize so we can
5570 catch and handle memory allocation failures instead of aborting
5571 with the xmalloc/xrealloc interface
5572
5573 lib/sh/strdup.c
5574 - strdup replacement function for ancient systems that don't have it
5575
5576 lib/sh/itos.c
5577 - mitos: new function, itos that uses strdup instead of savestring
5578
5579 externs.h
5580 - strvec_mcreate/strvec_mresize: new extern declarations
5581 - mitos: new extern declaration
5582
5583 configure.ac
5584 - bash version moved to 4.3-rc2
5585
5586 1/6
5587 ---
5588 doc/bash.1,lib/readline/doc/{rluser.texi,readline.3}
5589 - separate the description of what happens when readline reads the
5590 tty EOF character from the description of delete-char, leaving a
5591 note in the delete-char description about common binding for ^D.
5592 From suggestion by Parke <parke.nexus@gmail.com>
5593
5594 lib/readline/doc/{version.texi,history.3,*.texi}
5595 - updated email addresses and copyright dates
5596
5597 1/7
5598 ---
5599 variables.c
5600 - delete_var: new function, just removes a variable from a hash table
5601 and frees it, without doing anything else
5602 - make_variable_value: if we are trying to assign to a nameref variable,
5603 return NULL if the value is null or the empty string or not a valid
5604 identifier
5605
5606 variables.h
5607 - delete_var: new extern declaration
5608
5609 subst.h
5610 - ASS_NAMEREF: new define for assignments, means assigning to a nameref
5611 variable
5612
5613 builtins/declare.def
5614 - declare_internal: if we are creating and assigning to a nameref
5615 variable, make sure the value is a valid variable name (checks done
5616 by make_variable_value via bind_variable_value) and display an
5617 error message, deleting the variable we just created, if it is not.
5618 Fixes bug reported by Peggy Russell <prusselltechgroup@gmail.com>
5619
5620 1/9
5621 ---
5622 builtins/declare.def
5623 - declare_internal: turning on nameref attribute for an existing
5624 variable turns off -i/-l/-u/-c attributes (essentially the ones
5625 that cause evaluation at assignment time) for ksh93 compat
5626
5627 builtins/setattr.def
5628 - show_name_attributes: if asked to display attributes and values for
5629 a nameref variable, don't follow the nameref chain to the end. More
5630 ksh93 compat
5631
5632 1/10
5633 ----
5634 trap.c
5635 - _run_trap_internal: use {save,restore}_parser_state instead of
5636 {save,restore}_token_state, like in run_pending_traps(); don't
5637 need to save and restore last_command_exit_value as a result
5638 - _run_trap_internal: call {save,restore}_pipeline like in
5639 run_pending_traps()
5640 - run_pending_traps: since we no longer run traps in a signal handler
5641 context, do not block and unblock the trapped signal while the
5642 trap is executing
5643 - run_pending_traps: allow recursive invocations (basically, running
5644 traps from a trap handler) with only a warning if the shell is
5645 compiled in debug mode. If a caller doesn't want this to happen,
5646 it should test running_trap > 0. signal_in_progress (sig) only works
5647 for the signals the shell handles specially
5648
5649 bashline.c
5650 - bash_event_hook: make sure we clean up readline if interrupt_state
5651 is set, not only when SIGINT is not trapped. check_signals_and_traps
5652 will call check_signals, which calls QUIT, which will longjmp back
5653 to top_level, running the interrupt trap along the way. Fixes the
5654 problem of signal handlers being reset out from under readline, and
5655 not being set properly the next time readline is called, because
5656 signals_set_flag is still set to 1. XXX - might need to do this
5657 for other signals too?
5658
5659 1/11
5660 ----
5661 subst.h
5662 - SD_GLOB: new define for skip_to_delim; means we are scanning a
5663 glob pattern.
5664
5665 subst.c
5666 - skip_to_delim: if flags include SD_GLOB, assume we are scanning a
5667 glob pattern. Currently only used to skip bracket expressions
5668 which may contain one of the delimiters
5669
5670 1/12
5671 ----
5672 subst.c
5673 - parameter_brace_expand: when expanding $@ as part of substring
5674 expansion, pattern substitution, or case modification, don't turn
5675 on the QUOTED_NULL flag. The code that constructs the word to be
5676 returned from expand_word_internal expects a different code path
5677 when $@ is being expanded. Fixes bug reported by Theodoros
5678 V. Kalamatianos <thkala@gmail.com>
5679
5680 1/19
5681 ----
5682 subst.c
5683 - list_dequote_escapes: new function; analogue of list_quote_escapes
5684
5685 pathexp.c
5686 - quote_string_for_globbing: fix case where unescaped ^A is last char
5687 in string; need to pass it through unaltered instead of turning it
5688 into a bare backslash
5689 - quote_string_for_globbing: when quoting for regexp matching in [[,
5690 don't treat backslash as a quote character; quote the backslash as
5691 any other character. Part of investigation into reports from
5692 Eduardo A. Bustamante López <dualbus@gmail.com>
5693
5694 1/25
5695 ----
5696 builtins/gen-helpfiles.c
5697 - write_helpfiles: add prototype
5698 - make sure to #undef xmalloc/xfree/xrealloc/free if USING_BASH_MALLOC
5699 is defined. the code does not use them, and we don't link against
5700 xmalloc.o. Report from Linda Walsh <bash@tlinx.org>
5701
5702 Makefile.in
5703 - variables.o: add dependency on builtins/builtext.h; helps with
5704 parallel builds. Report from Linda Walsh <bash@tlinx.org>
5705
5706 support/shobj-conf
5707 - darwin: combine the stanzas into one that will not require them to
5708 be updated on each Mac OS X release. Report and fix from Max Horn
5709 <max@quendi.de>
5710
5711 1/27
5712 ----
5713 support/shobj-conf
5714 - darwin: changed the install_name embedded into the shared library
5715 to contain only the major version number, not the minor one. The
5716 idea is that the minor versions should all be API/ABI compatible,
5717 and it is better to link automatically with the latest one. Idea
5718 from Max Horn <max@quendi.de>
5719
5720 1/29
5721 ----
5722 [bash-4.3-rc2 released]
5723
5724 1/30
5725 ----
5726 lib/readline/readline.h
5727 - rl_clear_history, rl_free_keymap: add extern declarations. Report
5728 from Hiroo Hayashi <hiroo.hayashi@computer.org>
5729
5730 general.c
5731 - include trap.h for any_signals_trapped() prototype
5732
5733 lib/sh/unicode.c
5734 - include <stdio.h> for sprintf prototype
5735
5736 1/31
5737 ----
5738 execute_cmd.c
5739 - execute_simple_command: only posix-mode shells should exit on an
5740 assignment failure in the temporary environment preceding a special
5741 builtin. This is what the documentation and code comments have
5742 always said
5743 - execute_simple_command: make sure redirection errors, word expansion
5744 errors, and assignment errors to Posix special builtins cause a
5745 non-interactive posix mode shell to exit. Previously the shell
5746 would not exit if the failed special builtin was on the LHS of ||
5747 or &&
5748
5749 pathexp.c
5750 - quote_string_for_globbing: when quoting a regular expression
5751 (QGLOB_REGEXP), allow an unquoted backslash to pass through
5752 unaltered. Don't use it as a quote character or quote it. More
5753 investigation from 1/24 and report by Mike Frysinger
5754 <vapier@gentoo.org>
5755 - quote_string_for_globbing: when quoting a regular expression
5756 (QGLOB_REGEXP), turn CTLESC CTLESC into CTLESC without adding a
5757 backslash to quote it. We should not have to quote it because it is
5758 not a character special to EREs. More investigation from 1/24
5759
5760 lib/glob/glob.c
5761 - glob_testdir: now takes a second flags argument (currently unused);
5762 changed prototype and callers
5763
5764 2/1
5765 ---
5766 lib/glob/glob.c
5767 - glob_testdir: if flags argument includes GX_ALLDIRS (globstar), use
5768 lstat so we skip symlinks when traversing the directory tree.
5769 Originally reported by Chris Down <chris@chrisdown.name>
5770
5771 2/2
5772 ---
5773 lib/readline/undo.c
5774 - rl_do_undo: make sure CUR is non-zero before dereferencing it to
5775 check cur->data against rl_undo_list. Report and fix from
5776 Andreas Schwab <schwab@linux-m68k.org>
5777
5778 doc/{bash.1,bashref.texi}
5779 - added slight clarifying language to the description of $*,
5780 describing what happens when the expansion is not within double
5781 quotes
5782
5783 2/4
5784 ---
5785 test.c
5786 - unary_test: add code to -v case so that it interprets `bare' array
5787 references (foo[1]) and returns true if that index has a value
5788
5789 2/5
5790 ---
5791 trap.c
5792 - restore_default_signal: fix SIGCHLD special case for SIG_TRAPPED flag
5793 off but SIG_INPROGRESS mode set and handler IMPOSSIBLE_TRAP_HANDLER;
5794 continue with resetting handler in this case. maybe_set_sigchld_trap
5795 will check these things before resetting sigchld trap from
5796 run_sigchld_trap. Fixes (apparently long-standing?) problem reported
5797 by Alexandru Damian <alexandru.damian@intel.com>
5798
5799 2/6
5800 ---
5801 lib/sh/strtrans.c
5802 - ansic_quote: fixed a bug when copying a printable character that
5803 consumes more than one byte; byte counter was not being incremented.
5804 Bug report from jidanni@jidanni.org
5805
5806 2/7
5807 ---
5808 input.c
5809 - getc_with_restart: if read(2) returns -1/EINTR and interrupt_state or
5810 terminating_signal is set (which means QUIT; will longjmp out of this
5811 function), make sure the local buffer variables are zeroed out to
5812 avoid reading past the end of the buffer on the next call. Bug report
5813 from Dan Jacobson <jidanni@jidanni.org>
5814
5815 2/9
5816 ---
5817 bashline.c
5818 - command_word_completion_function: if a directory in $PATH contains
5819 quote characters, we need to quote them before passing the candidate
5820 path to rl_filename_completion_function, which performs dequoting on
5821 the pathname it's passed. Fixes bug reported by Ilyushkin Nikita
5822 <ilyushkeane@gmail.com>
5823
5824 2/11
5825 ----
5826 parse.y
5827 - xparse_dolparen: save and restore shell_eof_token around call to
5828 parse_string, intead of just leaving it set to ')'
5829 - shell_getc: when -v is set, only print the command line when
5830 shell_eof_token is 0, so we don't print it multiple times when
5831 recursively entering the parser to parse $(...) commands. Fixes
5832 bug reported by Greg Wooledge <wooledg@eeg.ccf.org>
5833
5834 [changed release status to 4.3-release]
5835
5836 2/13
5837 ----
5838 lib/sh/strtrans.c
5839 - ansic_quote: handle case where mbrtowc reports that the multibyte
5840 sequence is incomplete or invalid. Fixes bug reported by
5841 Eduardo A. Bustamante López <dualbus@gmail.com>
5842
5843 2/14
5844 ----
5845 variables.c
5846 - find_variable_nameref_context: fix a problem that caused the loop
5847 to go one context too close to the global context. In some cases,
5848 simple variable assignment would set a variable in the global
5849 context instead of a local context. Bug report from
5850 Geir Hauge <geir.hauge@gmail.com>
5851
5852 2/26
5853 ----
5854 [bash-4.3 released]
5855
5856 2/27
5857 ----
5858 aclocal.m4
5859 - broken wcwidth check: fix typo reported by David Michael
5860 <fedora.dm0@gmail.com>
5861
5862 2/28
5863 ----
5864 support/bashbug.sh
5865 - add ${BUGADDR} to error message printed if sending mail fails
5866
5867 trap.c
5868 - _run_trap_internal: don't call {save,restore}_pipeline if running
5869 DEBUG trap; run_debug_trap calls them itself. Fixes bug reported
5870 by Moe Tunes <moetunes42@gmail.com>
5871
5872 test.c
5873 - unary_test: fix 'R' case by using find_variable_noref instead of
5874 find_variable
5875 - test_unop: add back missing 'R' case. Fixes bug reported by
5876 NBaH <nbah@sfr.fr>
5877
5878 3/2
5879 ---
5880 jobs.c
5881 - end_job_control: if job control is active, we changed the terminal's
5882 process group, so make sure we restore it. Fixes bug reported by
5883 Eduardo A. Bustamante López <dualbus@gmail.com>
5884
5885 3/7
5886 ---
5887 pcomplete.c
5888 - pcomp_curtxt: new variable, holds the original text to be completed
5889 as passed to the programmable completion code
5890 - pcomp_filename_completion_function: if we are running compgen
5891 (presumably in a shell function completion) and performing readline
5892 completion, check the word being completed. If it's not empty, but
5893 the original word passed to the programmable completion code is an
5894 empty string (""), call a dequoting function if one is available.
5895 This compensates for an assumption in bash-completion. Reported by
5896 Albert Shih <Albert.Shih@obspm.fr>
5897
5898 lib/readline/readline.c
5899 - _rl_dispatch_subseq: when deciding whether or not to set vi mode's
5900 idea of the last command, use whether or not the dispatching keymap
5901 is vi_movement_keymap instead of the key sequence length. The `c',
5902 `d', and `y' commands all take motion commands as `arguments' and
5903 will produce key sequences longer than 1 character. The arrow keys
5904 will end up dispatching out of a different keymap, so the test will
5905 prevent arrow keys from setting the last command (the problem in
5906 bash-4.2). Bug report from Daan van Rossum <daan@flash.uchicago.edu>
5907
5908 lib/readline/vi_mode.c
5909 - _rl_vi_motion_command: convenience function to test whether a key is
5910 a vi-mode motion command
5911
5912 lib/readline/rlprivate.h
5913 - _rl_vi_motion_command: extern declaration
5914
5915 parse.y
5916 - parse_matched_pair: we should not skip processing single quotes in
5917 posix mode if dolbrace_state == DOLBRACE_QUOTE2 (pattern
5918 substitution). Fixes bug reported by David Sines
5919 <dave.gma@googlemail.com>
5920
5921 3/10
5922 ----
5923 lib/readline/readline.c
5924 - _rl_dispatch_callback: treat a return value of -1 as the end of
5925 a command dispatch sequence if the current context doesn't
5926 indicate that we're reading a multi-key sequence
5927 ((cxt->flags & KSEQ_SUBSEQ) == 0). Turn off the multikey flag
5928 and free the context chain in this case. Fixes one bug reported
5929 by Felix Yan <felixonmars@gmail.com> to bug-readline list
5930 - _rl_dispatch_callback: treat a return value of > 0 the same as 0
5931 and return from the function, since only values < 0 cause us to
5932 simulate recursion. Rest of fix for bug tracked down by
5933 Anatol Pomozov <anatol.pomozov@gmail.com>
5934
5935 3/11
5936 ----
5937
5938 execute_cmd.c
5939 - execute_in_subshell: if a longjmp occurs, set result to
5940 EXECUTION_FAILURE only if last_command_exit_value == EXECUTION_SUCCESS;
5941 use value of last_command_exit_value otherwise. Fixes cosmetic
5942 issue reported by Dennis Lambe Jr. <malsyned@malsyned.net>
5943
5944 doc/bash.1
5945 - shell-kill-word and shell-backward-kill-word should be documented
5946 as unbound by default. Report from Oliver Hartley
5947 <ohartley@talktalk.net>
5948
5949 trap.c
5950 - run_pending_traps: save value of $? before running trap commands in
5951 trap_saved_exit_value, like run_exit_trap
5952 - _run_trap_internal: save value of $? before running trap commands in
5953 trap_saved_exit_value, like run_exit_trap
5954
5955 builtins/common.c
5956 - get_exitstat: when running `return' in a trap action, and it is not
5957 supplied an argument, use the saved exit status in
5958 trap_saved_exit_value. Fixes Posix problem reported by
5959 Eduardo A. Bustamante López <dualbus@gmail.com>
5960
5961 3/13
5962 ----
5963 lib/sh/shquote.c
5964 - sh_contains_quotes: new function, returns true if a given string
5965 contains any of the shell quote characters (single quote, double
5966 quote, or backslash)
5967
5968 externs.h
5969 - sh_contains_quotes: new extern declaration
5970
5971 pcomplete.c
5972 - pcomp_filename_completion_function: more changes for the benefit of
5973 bash-completion: if the argument is not the same as the original
5974 argument passed to the programmable completion code (pcomp_curtxt),
5975 and we are being run by compgen as part of a completion, dequote the
5976 argument as bash-completion expects. Fix for the complete-word-
5977 with-quoted-special-chars problem with bash-completion
5978
5979 3/17
5980 ----
5981 execute_cmd.c
5982 - execute_intern_function: when in posix mode, make defining a function
5983 with the same name as a special builtin a fatal error only when the
5984 shell is not interactive. Interactive shells display an error
5985 message and go on. From a discussion with Doug McIlroy
5986 <doug@cs.dartmouth.edu>
5987
5988 3/18
5989 ----
5990 arrayfunc.c
5991 - assign_compound_array_list: when using expand_assignment_string_to_string
5992 to expand the value in a ( [x]=y ) compound assignment, make sure
5993 that we convert 0x0 to "" when expanding [x]= so it doesn't appear as
5994 if the index is unset. Fixes bug reported by Geir Hauge
5995 <geir.hauge@gmail.com>
5996
5997 builtins/common.c
5998 - get_exitstat: update fix of 3/11 to allow the DEBUG trap to use the
5999 current value of $? instead of the value it had before the trap
6000 action was run. This is one reason the DEBUG trap exists, and
6001 extended debug mode uses it. Might want to do this only in Posix
6002 mode
6003
6004 doc/{bash.1,bashref.texi}
6005 - return: add language cribbed from Posix saying what happens when
6006 return is run without an argument from a trap, including the DEBUG
6007 trap exception
6008
6009 3/19
6010 ----
6011 lib/glob/gmisc.c
6012 - extglob_pattern_p: make sure ?(patlist) is flagged as an extglob
6013 pattern
6014
6015 lib/glob/glob.c
6016 - extglob_skipname: rewrite to handle patterns that begin but do not
6017 end with an extglob pattern; change test for easy case and loop
6018 through patterns accordingly. Fixes problem with matching filenames
6019 with a leading dot reported by Stephane Chazelas
6020 <stephane.chazelas@gmail.com>
6021 - wextglob_skipname: make analogous changes
6022
6023 3/20
6024 ----
6025 Makefile.in
6026 - pass -DDEBUG down to builds in readline and history directories
6027
6028 lib/readline/util.c
6029 - _rl_trace and related functions are now only compiled in if DEBUG
6030 is defined
6031
6032 lib/readline/Makefile.in
6033 - substitute @DEBUG@ and pass -DDEBUG, if necessary, to compilation
6034 in LOCAL_CFLAGS
6035
6036 3/21
6037 ----
6038 parse.y
6039 - shell_getc: when checking whether or not to reallocate
6040 shell_input_line to add trailing newline, don't try to subtract from
6041 shell_input_line_size. size_t is unsigned, so if its value is less
6042 than 3 (like, say, 2), size-3 is a very large number and the string
6043 will not be reallocated. Use len+3 > size instead of len > size-3.
6044 Fixes bug reported in
6045 https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1295467
6046
6047 3/27
6048 ----
6049 lib/readline/display.c
6050 - _rl_clean_up_for_exit: don't bother to call _rl_move_vert to whatever
6051 readline thinks the last displayed line is if it's 0. Two reasons: a
6052 minor optimization, and it protects against unwanted moving if this
6053 function is called twice, as it is when ^C is pressed. Fixes bug
6054 reported by Egmont Koblinger <egmont@gmail.com>
6055
6056 3/28
6057 ----
6058 bashline.c
6059 - invalid_completion: new function, used to identify attempts to
6060 complete words that are syntax errors
6061 - attempt_shell_completion: if invalid_completion returns true for a
6062 word in a command position, punt on all completions. Fixes cosmetic
6063 issue reported by Uwe Storbeck <uwe@ibr.ch>
6064 - attempt_shell_completion: add clause so that in_command_position
6065 remains set to 1 for an empty word following a command separator like
6066 (, &, or |
6067
6068 lib/readline/kill.c
6069 - rl_yank, rl_yank_nth_arg_internal: don't return -1 from bindable
6070 functions, return 1 instead
6071
6072 lib/readline/text.c
6073 - rl_rubout, _rl_rubout_char, rl_delete, rl_change_case,
6074 rl_transpose_chars, rl_transpose_words, _rl_set_mark_at_pos,
6075 rl_exchange_point_and_mark, _rl_insert_next, _rl_char_search,
6076 _rl_char_search_internal:
6077 don't return -1 from bindable functions, return 1 instead
6078
6079 lib/readline/vi_mode.c
6080 - rl_vi_end_word, rl_vi_rubout, rl_vi_delete, rl_vi_char_search,
6081 rl_vi_match, _rl_vi_set_mark, _rl_vi_goto_mark:
6082 don't return -1 from bindable functions, return 1 instead
6083
6084 lib/readline/macro.c
6085 - rl_start_kbd_macro, rl_end_kbd_macro:
6086 don't return -1 from bindable functions, return 1 instead
6087
6088 builtins/setattr.def
6089 - set_var_attribute: honor setting of no_invisible_vars when setting
6090 att_invisible on a variable
6091 - include "../flags.h" for no_invisible_vars
6092
6093 builtins/declare.def
6094 - declare_internal: honor setting of no_invisible_vars when setting
6095 att_invisible on a variable
6096 - include "../flags.h" for no_invisible_vars
6097
6098 Makefile.in,builtins/Makefile.in
6099 - make sure declare.o and setattr.o depend on flags.h
6100
6101 execute_cmd.c
6102 - decpoint: new function, returns locale's decimal point or `.' default
6103 - mkfmt: use decpoint() to get decimal point instead of unconditionally
6104 using `.'. Fixes bug reported by Andrey Tataranovich
6105 <tataranovich@gmail.com> in debian bug 741669
6106
6107 4/10
6108 ----
6109 lib/readline/rltypedefs.h
6110 - add back old Function/VFunction/etc typedefs, since other packages
6111 (python, samba) use them. Mark as deprecated using gcc and clang
6112 attributes. Report and fix from Max Horn <max@quendi.de>
6113
6114 4/14
6115 ----
6116 jobs.c
6117 - run_sigchld_trap: unwind-protect value of this_shell_builtin, since
6118 it matters in some cases whether or not we are running `wait' or
6119 `eval'. Fixes bug reported by Eduardo A. Bustamante López
6120 <dualbus@gmail.com>
6121
6122 4/18
6123 ----
6124 shell.h
6125 - sh_parser_state_t: add `need_here_doc' flags member, since
6126 xparse_dolparen (via parse_command) sets it to 0
6127
6128 parse.y
6129 - gather_here_documents: make sure need_here_doc is > 0, since we
6130 don't want to just decrement it forever if it ends up < 0. Partial
6131 fix for bug reported by Jared Yanovich <slovichon@gmail.com>
6132 - {save,restore}_parser_state: save and restore need_here_doc flag.
6133 Rest of fix for bug reported by Jared Yanovich <slovichon@gmail.com>
6134
6135 4/19
6136 ----
6137 subst.c
6138 - cond_expand_word: since we are not supposed to be performing word
6139 splitting here, set expand_no_split_dollar_star to 1 in addition to
6140 setting W_NOSPLIT2
6141 - expand_word_internal: if we have a case where we have an unquoted
6142 $@ but we are in a case where we don't want to split (W_NOSPLIT2),
6143 make sure we return a list consisting of a single word with the
6144 arguments separated by spaces and don't do word splitting. Fixes
6145 bug reported by Greg Wooledge <wooledg@eeg.ccf.org> from an IRC
6146 discussion
6147
6148 builtins/hash.def
6149 - print_portable_hash_info: single-quote pathnames and hashed filenames
6150 that contain shell metacharacters. Fixes bug reported by
6151 <g1pi@libero.it> in debian bash bug #739853
6152
6153 4/20
6154 ----
6155 lib/readline/display.c
6156 - When using horizontal scrolling, the redisplay code erases too much
6157 of the line containing successful results, so make sure we only
6158 erase to the end of the line after making sure we move the cursor
6159 to the end. Fixes bug reported by <Trond.Endrestol@ximalas.info>
6160
6161 4/23
6162 ----
6163 {bashhist,bashline}.c
6164 builtins{bind,help,type}.def
6165 lib/glob/glob.c, lib/intl/{loadmsgcat,localealias}.c,lib/sh/mktime.c
6166 - fixes to memory leaks uncovered by coverity scan
6167
6168 4/24
6169 ----
6170 {bashhist,subst,redir,assoc,jobs,array,trap}.c
6171 lib/intl/l10flist.c
6172 builtins/complete.def
6173 - fixes to memory leaks and other resource usage problems uncovered by
6174 coverity scan
6175
6176 redir.c
6177 - do_redirection_internal: if dup2 fails (presumably because of a
6178 resource limit), close the file descriptor we opened before returning
6179 error
6180
6181 4/25
6182 ----
6183 config-top.h
6184 - DEFAULT_BASHRC: new define with the name of the default shell
6185 startup file
6186
6187 bashline.c
6188 - bash_directory_completion_matches: don't dequote the directory name.
6189 If rl_completion_found_quote is non-zero, readline will dequote the
6190 filename itself. Fixes bug reported by Clark Wang
6191 <dearvoid@gmail.com>
6192
6193 4/27
6194 ----
6195 subst.c
6196 - parameter_brace_expand_rhs: if parameter_brace_find_indir returns
6197 NULL or "", or if it returns something that is not a valid identifier,
6198 report an error and return &expand_wdesc_error so the error can
6199 propagate up. Fixes bug reported by Andre Holzhey
6200 <andre.holzhey@gmx.de>
6201
6202 4/29
6203 ----
6204 subst.c
6205 - parameter_brace_substring: don't short-circuit right away if the
6206 value is NULL but we are looking at the positional parameters. Part
6207 of fix for bug reported by Pierre Gaston <pierre.gaston@gmail.com>
6208 - pos_params: if there are no positional parameters, only short-circuit
6209 if we are looking for $1 and above. Rest of fix for bug reported
6210 by Pierre Gaston <pierre.gaston@gmail.com>
6211
6212 subst.h
6213 - SD_NOPROCSUB: new flag for skip_to_delim, means to not allow any
6214 process subsitutions (should not have overloaded SD_NOSKIPCMD)
6215
6216 subst.c
6217 - skip_to_delim: honor SD_NOPROCSUB flag
6218
6219 make_cmd.c
6220 - make_arith_for_expr: set W_NOPROCSUB flag in the created word
6221 - make_arith_for_command: set SD_NOPROCSUB in the flags argument to
6222 skip_to_delim so we don't treat <( or >( as a process substitution
6223 (we won't evaluate them in eval_arith_for_expr anyway). Fixes
6224 bug reported by Pierre Gaston <pierre.gaston@gmail.com>
6225
6226 5/1
6227 ---
6228 lib/glob/gmisc.c
6229 - glob_dirscan: new function, takes a pattern and a directory separator
6230 argument and advances the pattern to the last occurrence of the
6231 separator. Like strrchr, but understands extended glob patterns and
6232 uses glob_patscan to skip over them
6233
6234 lib/glob/glob.c
6235 - extglob_skipname: if the extended globbing pattern is invalid, don't
6236 skip the name
6237 - glob_filename: if there is a slash in the pattern to be matched, and
6238 extglob is enabled, use glob_dirscan to find the real last occurrence
6239 of `/' to avoid being confused by slashes in extglob patterns. Fix
6240 for bug reported by Pierre Gaston <pierre.gaston@gmail.com>
6241
6242 5/6
6243 ---
6244 variables.c
6245 - make_local_variable: only set the att_invisible attribute if
6246 no_invisible_vars isn't set
6247 - find_variable_for_assignment: new function, intended to be called by
6248 code that eventually wants to assign a value to the variable; will not
6249 skip invisible variables; currently identical to find_variable
6250 - find_variable_no_invisible: new function, finds the first visible
6251 instance of variable with a given name in the variable context chain;
6252 eventually will be used to replace find_variable; separate right now
6253 for testing
6254
6255 variables.h
6256 - find_variable_for_assignment: extern declaration
6257 - find_variable_no_invisible: extern declaration
6258
6259 5/7
6260 ---
6261 variables.c
6262 - make_local_variable: don't clear `invisible' attribute if we are
6263 returning an existing local variable at the right context. Let the
6264 upper layers do that. Fixes bug reported by Dan Douglas
6265 <ormaaj@gmail.com>
6266
6267 5/8
6268 ---
6269 lib/readline/input.c
6270 - rl_getc: call RL_CHECK_SIGNALS if a read(2) is interrupted (-1/EINTR)
6271 by SIGALRM or SIGVTALRM (placeholder for non-keyboard-generated
6272 signals of interest)
6273
6274 builtins/read.def
6275 - edit_line: call bashline_set_event_hook and
6276 bashline_reset_event_hook around call to readline(), so the right
6277 signal handling happens
6278 - read_builtin: make sure we add an unwind_protect call to
6279 bashline_reset_event_hook. These changes fix bug reported in
6280 https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1317476
6281
6282 bashline.c
6283 - bash_event_hook: make sure we clean up the readline state by calling
6284 rl_cleanup_after_signal if sigalrm_seen is non-zero. The read builtin
6285 sets this when it times out
6286
6287 5/12
6288 ----
6289 doc/{bash.1,bashref.texi}
6290 - clarify language to make it clear that changing attributes of a
6291 nameref variable (e.g., export), actually changes the attributes of
6292 the referenced variable. Fixes omission noted by Jeff Haemer
6293 <jeffrey.haemer@gmail.com>
6294
6295 arrayfunc.c
6296 - bind_array_var_internal: make sure ENTRY no longer has invisible
6297 attribute before returning. Fixes bug reported by Geir Hauge
6298 <geir.hauge@gmail.com>
6299
6300 5/22
6301 ----
6302 execute_cmd.c
6303 - shell_execve: if execve fails and we return 127 or 126, make sure to
6304 set last_command_exit_value if a call to file_error or report_error
6305 causes the shell to exit. This ensures that the shell exits with
6306 the right value.
6307
6308 6/6
6309 ---
6310 shell.c
6311 - drop_priv_mode: print an error message on setuid() failure, optionally
6312 exit if errno == EAGAIN, as it can be on Linux when RLIMIT_NPROC for
6313 the target user is exceeded.
6314
6315 config-top.h
6316 - EXIT_ON_SETUID_FAILURE: new settable define, will cause the shell to
6317 exit if setuid fails with errno == EAGAIN
6318
6319 6/10
6320 ----
6321 parse.y
6322 - time_command_acceptable: fix so time is accepted everywhere the
6323 grammar is looking for a `compound_list'. Fixes bug reported by
6324 Dale Worley <worley@alum.mit.edu>
6325
6326 6/12
6327 ----
6328 subst.c
6329 - clear_fifo_list: new function, clears FDs associated with open pipes
6330 in current FIFO list without closing the file descriptors. Can
6331 possibly be used when shell_execve fails and the shell jumps back
6332 to top_level and we don't want the shell to close the open FIFOs
6333 each time through the read-execute loop. Bug reported by Harald
6334 Koenig <koenig@tat.physik.uni-tuebingen.de>
6335
6336
6337 6/16
6338 ----
6339 builtins/shopt.def
6340 - compat42: make sure the `compat42' option sets the correct variable
6341 for compatibility level. Fixes bug reported by Ondrej Oprala
6342 <ooprala@redhat.com>
6343
6344 support/bashbug.sh
6345 - fix typo when echoing $USAGE. Report from Shantanu Kulkarni
6346 <djbware@shantanukulkarni.org>
6347
6348 execute_cmd.c
6349 - shell_execve: before longjmp back to subshell_top_level, clear out the
6350 FIFO fd list by calling clear_fifo_list so the FDs (which we inherited
6351 from our parent) aren't closed every time through the read-eval loop.
6352 Fix for bug reported by Harald Koenig <koenig@tat.physik.uni-tuebingen.de>
6353
6354 6/18
6355 ----
6356 subst.c
6357 - extract_process_subst: add additional argument: xflags, allow callers to
6358 pass flags like extract_command_subst
6359 - extract_process_subst: call xparse_dolparen like command substitution
6360 to avoid problems when parsing commands constructs with embedded open
6361 parens. Fixes bug reported by Tim Friske <me@timfriske.com>
6362
6363 subst.h
6364 - extract_process_subst: modified prototype for extern declaration
6365
6366 6/19
6367 ----
6368 execute_cmd.c
6369 - execute_pipeline: if running with lastpipe enabled, make sure that we
6370 check whether or not the job id is valid using INVALID_JOB before
6371 calling job_exit_status. the jobs list can get frozen and unfrozen in
6372 the presence of nested pipelines and loops and wait_for can clear a
6373 job table entry. Fixes bug reported by <scorp.dev.null@gmail.com>
6374
6375 jobs.c
6376 - freeze_jobs_list: now returns old value of jobs_list_frozen; unused at
6377 current time
6378
6379 jobs.h
6380 - freeze_jobs_list: change return value
6381
6382 6/20
6383 ----
6384 lib/glob/smatch.c
6385 - MEMCHR: single-byte and wide character defines (memchr/wmemchr)
6386
6387 lib/glob/sm_loop.c
6388 - GMATCH: when the wildcards are the last element of the pattern, make
6389 sure they do not match a string containing a `/' if FNM_PATHNAME is
6390 set in FLAGS
6391 - GMATCH: when recursively calling GMATCH after we see a `*', don't
6392 try to consume the rest of the pattern with `*' if FNM_PATHNAME is
6393 set in FLAGS, just consume up to the next slash and then see whether
6394 or not the rest of the pattern matches. Fixes bug reported by Ian
6395 Kelling <ian@iankelling.org>
6396 - GMATCH: when processing `*' in the pattern, after skipping consecutive
6397 wildcards, if we hit a literal `/' in the pattern and we're looking
6398 for a pathname, skip characters in the string until we find a `/'
6399 (no slash means the match fails), and try to match the rest of the
6400 pattern against the portion of the string after the next `/'. Picked
6401 up from gnulib/glibc
6402
6403 pathexp.c
6404 - split_ignorespec: since split_ignorespec gets globbing patterns,
6405 make sure we call skip_to_delim with the SD_GLOB flag so delimiters
6406 that occur within bracket expressions don't delimit the pattern.
6407 Fixes problem with [[:digit:]] in GLOBIGNORE reported by Ian Kelling
6408 <ian@iankelling.org>
6409
6410 unwind_prot.c
6411 - unwind_protect_tag_on_stack: new function, returns 1 if unwind-protect
6412 frame corresponding to `tag' argument is on unwind-protect stack
6413
6414 unwind_prot.h
6415 - unwind_protect_tag_on_stack: extern declaration
6416
6417 6/30
6418 ----
6419 lib/readline/misc.c
6420 - _rl_revert_all_lines: set entry->data to 0 after assigning it to
6421 rl_undo_list to avoid pointer aliasing problems that would result
6422 in entry->line being freed by an undo. The subsequent free would
6423 be a double free. Report and fix from Jared Yanovich
6424 <slovichon@gmail.com>
6425
6426 subst.c
6427 - command_substitute: other shells do not appear to inherit the -v
6428 option when reading and executing command substitutions. Reported
6429 by Ondrej Oprala <ooprala@redhat.com>
6430
6431 7/1
6432 ---
6433 config-top.h
6434 - CHECKHASH_DEFAULT: new define that supplies the default value for
6435 check_hashed_filenames (`checkhash' shopt option); still 0 by default
6436
6437 findcmd.c
6438 - check_hashed_filenames: initialize using CHECKHASH_DEFAULT
6439
6440 lib/readline/histexpand.c
6441 - history_expand: double quotes can inhibit recognition of the history
6442 comment character if history_quotes_inhibit_expansion is non-zero
6443
6444 lib/readline/doc/{history.3,hstech.texi}
6445 - history_quotes_inhibit_expansion: expand definition to note that it
6446 inhibits scanning for the history comment character as well; correct
6447 typo to make it clear that it only works on double-quoted strings
6448
6449 lib/sh/zgetline.c
6450 - add new fourth argument: DELIM, allows delimiter to be something
6451 other than newline (if DELIM != '\n', UNBUFFERED_READ should be
6452 non-zero)
6453 - UNBUFFERED_READ is now fifth argument
6454 - check character against DELIM rather than strictly newline
6455
6456 externs.h
6457 - zgetline: change function prototype for extern declaration
6458
6459 builtins/mapfile.def
6460 - mapfile: change calling sequence for zgetline calls
6461 - mapfile_builtin: new -d option: DELIM, like in read builtin
6462 - mapfile_builtin: pass `delim' to mapfile() as new argument; default
6463 to '\n' unless -d option supplied
6464 - mapfile: take new DELIM argument, pass to zgetline
6465 - mapfile: if DELIM != '\n', set unbuffered_read to 1
6466
6467 doc/{bash.1,bashref.texi}
6468 - mapfile: document new `-d DELIM' option
6469
6470 7/5
6471 ---
6472 lib/readline/histfile.c
6473 - history_truncate_file: if there is an error writing the truncated
6474 history list back to the history file, use the same strategy as
6475 history_do_write: create a backup file, rename the history file to
6476 the backup file, and restore the original history file from the
6477 backup file name if the write or the close fails. Suggestion from
6478 Chen Gang <gang.chen.5i5j@gmail.com> to bug-readline
6479
6480 execute_cmd.c
6481 - evalnest, evalnest_max: new variables establishing maximum number of
6482 recursive `eval' calls; current max is 4096
6483 - execute_builtin: unwind-protect value of evalnest around calls to
6484 eval builtin. Suggested by Oliver Morais <oliver.morais@gmail.com>
6485 - {initialize_subshell,execute_subshell_builtin_or_function}: reset
6486 evalnest to 0 in a subshell
6487
6488 builtins/setattr.def
6489 - show_name_attributes: show a variable's attributes even if it's
6490 invisible (don't show any value since it has none). This means that
6491 declare -p var will display VAR's attributes even when var marked
6492 as invisible. Feature request from Peggy Russell
6493 <prusselltechgroup@gmail.com>
6494 - show_var_attributes: don't print assignment if array or assoc
6495 attribute is set but variable marked as invisible
6496
6497 tests/array.right
6498 - special note: changed all declare -a output tests because the shell
6499 will no longer print out values for invisible array variables. This
6500 is a change, but one for correctness:
6501
6502 declare -a foo='()'
6503 and
6504 declare -a foo
6505 are not equivalent
6506
6507 7/22
6508 ----
6509 subst.c
6510 - parameter_brace_expand: after calling parameter_brace_expand_indir,
6511 turn off the W_ARRAYIND flag in the word it returns, because there
6512 is no way for it to return the index that should be used, and the
6513 rest of the function assumes that IND is valid if W_ARRAYIND is set.
6514 Fixes bug reported by Corentin Peuvrel <cpeuvrel@pom-monitoring.com>
6515
6516 8/2
6517 ---
6518 parse.y
6519 - read_token_word: if we read a character that will end a command
6520 substitution, don't skip over quoted newlines when we read an
6521 additional character to figure out whether it's a two-character
6522 token. This lets the higher layers deal with quoted newlines after
6523 the command substitution. Fixes bug reported by EmanueL Czirai
6524 <amanual@riseup.net>
6525
6526 8/11
6527 ----
6528 execute_cmd.c
6529 - execute_pipeline: check whether lastpipe_jid corresponds to a valid
6530 job before calling append_process, for the same reason as fix from
6531 6/19. Fixes bug reported by <lolilolicon@gmail.com>
6532
6533 8/12
6534 ----
6535 lib/sh/unicode.c
6536 - stub_charset: use strncpy instead of strcpy because we are copying
6537 into a local fixed-length buffer. Fixes vulnerability reported by
6538 <romerox.adrian@gmail.com>
6539
6540 execute_cmd.c
6541 - execute_pipeline: if we don't call append_process, call
6542 wait_for_single_pid to get the status of `lastpid', since that will
6543 check the status of already-reaped processes. Fixes spurious error
6544 message about non-existent process from fix of 8/11
6545
6546 8/15
6547 ----
6548 jobs.c
6549 - running_in_background: new variable, keeps track of whether or not we
6550 are running in the background (not perfect yet)
6551 - initialize_job_control: even if we are not turning on job control,
6552 get the terminal pgrp so we can use it later
6553 - {set_job_control,initialize_job_control}: set running_in_background
6554 to 1 if terminal pgrp != shell pgrp
6555 - {stop_pipeline,make_child,wait_for}: if we are running in the
6556 background, don't mess with the terminal's process group; assume that
6557 the parent shell will do that. Fixes bug reported by Greg Wooledge
6558 <wooledg@eeg.ccf.org>
6559
6560 shell.c
6561 - shell_reinitialize: reset running_in_background back to 0
6562
6563 8/24
6564 ----
6565 execute_cmd.c
6566 - {execute_connection,execute_command_internal}: make sure that
6567 asynchronous commands always set $? to 0 and are not affected by the
6568 command's exit status being inverted using `!'. Fixes bug reported
6569 by Vincent Lefevre <vincent@vinc17.net>
6570
6571 lib/readline/display.c
6572 - rl_message: call vsnprintf with full msg_bufsiz, since it counts
6573 one fewer than the buffer length passed as an argument. Bug report
6574 and fix from Dylan Cali <calid1984@gmail.com>
6575
6576 8/26
6577 ----
6578 builtins/evalstring.c
6579 - evalstring: if CURRENT_TOKEN == yacc_EOF, reset it to newline. This
6580 is instead of calling reset_parser(); that might still be needed.
6581 Fixes bug with eval and a subsequent statement ending with EOF
6582 reported by <jim.avera@gmail.org>
6583
6584 pcomplete.c
6585 - filter_stringlist: when extglob is on, a leading ! in the filter
6586 pattern should be left alone when it introduces a !(pat) pattern;
6587 otherwise it messes up the pattern. Fixes bug reported by David
6588 Korn <dgkorn@gmail.com>
6589
6590 8/27
6591 ----
6592 doc/{bash.1,bashref.texi}
6593 - clarify the behavior of bash when given the -c option, since $0 is
6594 technically not a positional parameter. Bug reported by Stephane
6595 Chazelas <stephane.chazelas@gmail.com>
6596
6597 8/28
6598 ----
6599 lib/readline/history.c
6600 - add_history: use history_max_entries (if history is stifled) or
6601 DEFAULT_HISTORY_INITIAL_SIZE if not (new define, defaults to 502)
6602 to size the initial allocation of the history array. Assumption
6603 is that this will reduce the number of allocations
6604
6605 8/29
6606 ----
6607 execute_command.c:
6608 - sourcenest, sourcenest_max: new variables used to track level of
6609 sourced files and (maybe) one day catch infinite source recursion
6610 - execute_builtin: if current source level exceeds sourcenest_max,
6611 trigger an error and jump back to the top level
6612 - {initialize_subshell,execute_subshell_builtin_or_function}: reset
6613 sourcenest to 0 in a subshell
6614
6615 9/2
6616 ---
6617 variables.c
6618 - bind_variable: if a nameref expands to an array reference, make
6619 sure that assign_array_element gets called (maybe even
6620 recursively) instead of bind_variable_internal, so invalid variable
6621 names (like arr[0]) don't get created. Fixes bug reported by
6622 <lolilolicon@gmail.com>
6623
6624 9/3
6625 ---
6626 execute_cmd.c
6627 - evalnest_max,sourcenest_max: initialize from EVALNEST_MAX and
6628 SOURCENEST_MAX, respectively. Feature suggested by
6629 <bogun.dmitriy@gmail.com>
6630
6631 config-top.h
6632 - define EVALNEST_MAX and SOURCENEST_MAX to 0
6633
6634 9/6
6635 ---
6636 bashline.c
6637 - find_cmd_start: fix to (crudely) deal with >| token; even though
6638 skip_to_delim finds `|' as a delimiter, we call it again and use
6639 what the second call finds. Fixes bug reported by Dan Jacobson
6640 <jidanni@jidanni.org>
6641
6642 findcmd.c
6643 - find_in_path_element: if in posix mode, do not expand a literal
6644 tilde in a $PATH element
6645
6646 doc/bashref.texi
6647 - add change to tilde expansion in $PATH elements to posix mode
6648 description
6649
6650 builtins/common.h
6651 - ISHELP: new define for builtins that do their own option parsing
6652 and don't use internal_getopt(); checks whether argument is --help
6653 - CHECK_HELPOPT: convenience define to help builtins that do their
6654 own option parsing to check for --help with one line of code
6655 - CASE_HELPOPT: convenience define to help builtins that use
6656 internal_getopt() check for --help with one line of code
6657
6658 builtins/help.def
6659 - builtin_help: new function, prints out --help output for current
6660 builtin
6661
6662 builtins/{kill,let,pushd}.def
6663 - add CHECK_HELPOPT to builtins that use ISOPTION; call builtin_help
6664 and return EX_USAGE (kill/let/pushd/popd/dirs)
6665
6666 builtins/{caller,fg_bg}.def
6667 - use CHECK_HELPOPT to recognize --help, since these builtins perform
6668 checks that can cause them to return before calling no_options
6669 (caller/fg/bg)
6670
6671 builtins/{exit,return}.def
6672 - use CHECK_HELPOPT to recognize --help before calling get_exitstat()
6673 (return/exit/logout)
6674
6675 builtins/{break,shift}.def
6676 - use CHECK_HELPOPT to recognize --help before any other checks
6677 (break/continue/shift)
6678
6679 builtins/bashgetopt.h
6680 - GETOPT_EOF: convenience define
6681 - GETOPT_HELP: new define, to indicate internal_getopt saw --help
6682
6683 builtins/bashgetopt.c
6684 - internal_getopt: return GETOPT_HELP for --help
6685
6686 builtins/common.c
6687 - no_options: recognize --help, call builtin_help and return 2
6688 (builtin/eval/source/./times)
6689
6690 builtins/command.def
6691 - use CASE_HELPOPT() to handle --help after calling internal_getopt()
6692 (command)
6693
6694 builtins/{colon,echo,test}.def
6695 - do not recognize --help (:/true/false/echo/test)
6696
6697 9/8
6698 ---
6699 sig.c
6700 - termsig_sighandler: if readline is active now, set the bashline event
6701 hook. Old code just set it for interactive shells. Part of fix for
6702 bug reported by <mickael9@gmail.com>
6703
6704 bashline.c
6705 - bash_event_hook: call rl_cleanup_after_signal if terminating_signal
6706 is non-zero, since check_signals_and_traps() will cause the shell to
6707 exit if it is and we want to clean up the readline state first. Rest
6708 of fix for bug reported by <mickael9@gmail.com>
6709
6710 9/9
6711 ---
6712 jobs.c
6713 - waitchld: when running the wait builtin in posix mode, with a trap set
6714 on SIGCHLD, use queue_sigchld_trap instead of trap_handler (SIGCHLD),
6715 otherwise you will lose SIGCHLDs when children_exited > 1. Fixes bug
6716 reported by <crispusfairbairn@gmail.com>
6717
6718 builtins/read.def
6719 - read_builtin: if we are changing the tty settings, call
6720 initialize_terminating_signals so we have a chance to catch all
6721 terminating signals and potentially clean up the terminal before
6722 exiting
6723 - read_builtin: tty_modified: new variable, set to 1 if we change the
6724 terminal attributes and have to call ttyrestore() to restore them
6725 - if one of the `reads' returns -1/EINTR due to a terminating signal,
6726 and we have modified the terminal, call ttyrestore before calling
6727 CHECK_TERMSIG
6728 - ttyrestore: set tty_modified to 0 when called
6729
6730 9/10
6731 ----
6732 builtins/read.def
6733 - termsave: now global to file so other functions can use it
6734 - read_tty_cleanup: if tty_modified is non-zero, call ttycleanup to
6735 restore old terminal settings and turn off tty_modified
6736
6737 sig.c
6738 - termsig_handler: call read_tty_cleanup if currently executing read
6739 builtin; it does the right thing. Final piece of fix for bug reported
6740 by Jan Rome <jan.rome@gmail.com>
6741
6742 9/11
6743 ----
6744 general.c
6745 - printable_filename: general function to return a printable
6746 representation of a string (presumed to be a filename)
6747
6748 general.h
6749 - extern declaration for printable_filename
6750
6751 execute_cmd.c
6752 - execute_disk_command: use printable_filename
6753
6754 builtins/{bind,cd,enable,hash,source}.def
6755 - use printable_filename as appropriate when printing error messages.
6756 From a suggestion by Vincent Lefevre <vincent@vinc17.net>
6757
6758 builtins/bind.def
6759 - use CASE_HELPOPT() to handle --help after calling internal_getopt()
6760 (bind)
6761
6762 9/12
6763 ----
6764 builtins/common.h
6765 - SEVAL_FUNCDEF: new flag for parse_and_execute; it means that we only
6766 accept a single function definition command, as when we are importing
6767 functions from the environment
6768 - SEVAL_ONECMD: new flag for parse_and_execute; for future use
6769
6770 builtins/evalstring.c
6771 - parse_and_execute: if the SEVAL_FUNCDEF flag is set, disallow anything
6772 but a function definition command
6773
6774 variables.c
6775 - initialize_shell_variables: don't allow functions with invalid names
6776 to be imported from the environment, even though we still allow them
6777 to be defined
6778 - initialize_shell_variables: when importing function definitions from
6779 the environment, call parse_and_execute with the SEVAL_FUNCDEF flag
6780 to force the command to be just a function definition
6781
6782 subst.c
6783 - param_expand: when expanding a $name variable expansion, make sure that
6784 the variable is visible and set before following the nameref chain
6785 - param_expand: when expanding a $name variable expansion and following the
6786 nameref chain, make sure the resulting variable is visible and set
6787 before using it
6788
6789 9/13
6790 ----
6791 variables.c
6792 - initialize_shell_variables: when importing function definitions from
6793 environment, use SEVAL_ONECMD flag for parse_and_execute. Part of
6794 CVE-2014-6271
6795
6796 builtins/evalstring.c
6797 - parse_and_execute: if SEVAL_ONECMD flag set, return immediately after
6798 calling execute_command_internal. Final piece for fix for bug
6799 reported by Stephane Chazelas <stephane.chazelas@gmail.com>. Part of
6800 CVE-2014-6271
6801
6802 9/24
6803 ----
6804 parse.y
6805 - reset_parser: reset eol_ungetc_lookahead to 0 here, since we don't want
6806 shell_getc returning it on the next call. Fixes problem reported by
6807 Tavis Ormandy <taviso@cmpxchg8b.com> and Michal Zalewski
6808 <lcamtuf@coredump.cx>. Potentially part of CVE-2014-6271; fix for
6809 CVE-2014-7169
6810
6811 9/25
6812 ----
6813 parse.y
6814 - push_heredoc: new function, pushes a here-doc redirection onto
6815 redir_stack handling overflow of redir_stack. Exits on overflow.
6816 Original fix from Florian Weimer <fweimer@redhat.com>. Fix for
6817 CVE-2014-7186
6818 - change straight assignments to redir_stack to call push_redir
6819 - add one to size of word_lineno stack to avoid off-by-one error
6820 below in read_token_word. Overflow just results in line numbers
6821 being wrong. Fix for CVE-2014-7187
6822
6823 9/27
6824 ----
6825 {execute_cmd,trap}.c
6826 - changes to make minimal-config builds work again, mostly missing
6827 #ifdefs for optional features
6828
6829 builtins/common.c
6830 - builtin_help: dummy version to be included if HELP_BUILTIN not
6831 defined, for minimal-config builds
6832
6833 variables.c
6834 - initialize_shell_variables: incorporated patches from Florian
6835 Weimer <fweimer@redhat.com> to change the strings bash looks
6836 for when importing shell functions from the environment. It
6837 adds a prefix (BASH_FUNC_) and a suffix (%%) to the name to
6838 mark it as having been created by bash as an exported function.
6839 Fix for remote attacks part of CVE-2014-6271 and CVE-2014-7169
6840 - mk_env_string: takes new argument, indicating whether we are
6841 constructing a function
6842 - mk_env_string: encodes function names as described above, so
6843 initialize_shell_variables can find them
6844
6845 9/28
6846 ----
6847 copy_cmd.c
6848 - copy_redirects: before calling savestring on here_doc_eof, make
6849 sure it's not NULL (it could have been the result of a here
6850 document delimited by EOF or EOS). Fixes bug reported by
6851 Michal Zalewski <lcamtuf@coredump.cx>. Fix for CVE-2014-6277
6852
6853 make_cmd.c
6854 - make_redirection: initialize here_doc_eof member to NULL. Rest of
6855 fix for CVE-2014-6277
6856
6857 9/29
6858 ----
6859 parse.y
6860 - current_input_line_state: return a sh_input_line_state_t containing
6861 the current shell_input_line and its index and size variables
6862
6863 shell.h
6864 - current_input_line_state: extern declaration
6865
6866 builtins/evalstring.c
6867 - parse_and_execute: call reset_parser() before returning if
6868 SEVAL_ONECMD set. Fixes bug reported by Michal Zalewski
6869 <lcamtuf@coredump.cx> and designated CVE-2014-6278
6870 - parse_and_execute: if we parse a function definition when
6871 SEVAL_FUNCDEF is set, but don't consume the entire passed string,
6872 throw an error, reset the parser, and return. Part of fix for
6873 CVE-2014-6278
6874 - parse_and_execute: if parsing the shell function definition when
6875 SEVAL_FUNCDEF is set transforms the function name (e.g., if it
6876 begins with a newline or begins or ends with whitespace), throw
6877 an error, reset the parser, and return. Fixes bug reported by
6878 Eric Kobrin <ekobrin@akamai.com>
6879
6880 10/2
6881 ----
6882 jobs.c
6883 - bgp_prune: don't do anything if bgpids.npid == 0 or
6884 bgpids.list == NULL. This can happen if something gets run before
6885 the job control framework is initialized. Bug report from
6886 <mancha1@zoho.com>
6887
6888 10/3
6889 ----
6890 parse.y
6891 - xparse_dolparen: don't set token_to_read to newline after calling
6892 parse_string() and cleaning up when the shell is not interactive. This
6893 makes the parser think it's ok to read new commands even if it's not in
6894 a state where that should be possible. Underlying fix for bug reported
6895 by Michal Zalewski <lcamtuf@coredump.cx> and designated CVE-6278
6896 - parser_remaining_input: new function, returns the portion of
6897 shell_input_line that hasn't yet been read
6898 - current_input_line_state: removed
6899
6900 shell.h
6901 - parser_remaining_input: extern declaration
6902 - current_input_line_state: removed
6903
6904 builtins/evalstring.c
6905 - parse_and_execute: change code that checks whether parse_command has
6906 consumed the entire passed string when SEVAL_FUNCDEF is used to use
6907 parser_remaining_input instead of messing around with (new)
6908 current_input_line_state. Part of fix for CVE-2014-6278
6909
6910 variables.c
6911 - initialize_shell_variables: if we don't call parse_and_execute, free
6912 the temporary string, since parse_and_execute won't. Report and fix
6913 from Eric Kobrin <ekobrin@akamai.com>
6914
6915 10/4
6916 ----
6917 print_cmd.c
6918 - print_function_def: when in posix mode, print shell function
6919 definitions as posix specifies them, without the leading
6920 `function' keyword
6921
6922 general.c
6923 - exportable_function_name: return 1 if the passed string can be
6924 added to the environment as an exported function name. Currently
6925 prohibits function names containing `/' and `=' from being
6926 exported
6927
6928 general.h
6929 - exportable_function_name: extern declaration
6930
6931 builtins/setattr.def
6932 - set_or_show_attributes: if exporting a function with export -f,
6933 call exportable_function_name to determine whether the function
6934 should be exported; don't export function if it returns 0
6935
6936 10/7
6937 ----
6938 builtins/setattr.def
6939 - set_or_show_attributes: don't show identifiers that are invisible
6940 and imported from the environment, since that combination of
6941 attributes means that the imported variable is not a valid shell
6942 identifier. Report from Stephane Chazelas
6943 <stephane.chazelas@gmail.com>
6944
6945 10/8
6946 ----
6947 shell.c
6948 - shell_initialize: set new variable should_be_restricted, which
6949 says whether or not the shell will be a restricted one based on the
6950 shell name; use in calls to initialize_shell_variables (to inhibit
6951 importing shell functions) and initialize_shell_options (to inhibit
6952 parsing $SHELLOPTS) and initialize_bashopts (to inhibit parsing
6953 $BASHOPTS). Report from <paulfm@umn.edu>
6954
6955 10/12
6956 -----
6957 execute_cmd.c
6958 - execute_function: unwind-protect loop_level, set loop_level to 0
6959 when entering a function so break and continue in functions don't
6960 break loops running outside of the function. Fix picked up from
6961 dash via Herbert Xu <herbert@gnodor.apana.org.au>
6962
6963 10/13
6964 -----
6965 doc/Makefile.in
6966 - bashref.pdf: create using texi2dvi --pdf rather than postprocessing
6967 the dvi file, so we have PDF bookmarks and links. Fix from
6968 Siep Kroonenberg <siepo@cybercomm.nl>
6969
6970 10/14
6971 -----
6972 subst.h
6973 - Q_ARITH: new quoting flag. Semantics are per Posix's spec for
6974 arithmetic expansion: act as if string is quoted, but don't treat
6975 double quotes specially (in this case, they will be removed by quote
6976 removal)
6977 - Q_ARRAYSUB: new quoting flag, indicates we are expanding an indexed
6978 array subscript
6979
6980 subst.c
6981 - expand_arith_string: if we are not expanding the string, but we saw
6982 a quote with Q_ARITH specified as one of quoting flags, perform
6983 quote removal even if Q_DOUBLE_QUOTES is specified
6984 - param_expand: change calls to expand_arith_string for $[ and $((
6985 cases to specify Q_ARITH. Now $(( "$x" )) and $(( "x" )) work if x
6986 has a value that evaluates to a valid number, as Posix specifies
6987 - expand_word_internal: add test for quoted&Q_ARITH to the tilde case,
6988 so we continue to perform tilde expansion in arithmetic contexts
6989 - expand_word_internal: if quoted&Q_ARITH, continue processing when we
6990 see a `"', acting as if the double quote isn't present (already
6991 Q_DOUBLE_QUOTED)
6992
6993 arrayfunc.c
6994 - array_expand_index: pass Q_DOUBLE_QUOTED|Q_ARITH|Q_ARRAYSUB as quoted
6995 argument in call to expand_arith_string. This inhibits word
6996 splitting (Q_DOUBLE_QUOTED) while discarding double quotes (Q_ARITH),
6997 identical to the quote flags passed while expanding $(( )) and $[ ].
6998 Q_ARRAYSUB reserved for future use. Fixes problem reported by
6999 Stephane Chazelas <stephane.chazelas@gmail.com>
7000
7001 10/16
7002 -----
7003 subst.c
7004 - parameter_brace_expand_word: if the PF_ASSIGNRHS flag is set and we
7005 are expanding what looks like an array subscripted with @ or *,
7006 make sure the variable we're expanding is actually an array before
7007 we add Q_DOUBLE_QUOTES to the flags. If we don't, things like
7008 scalar[@] will remain quoted. Fixes ubuntu bug 1381567
7009 https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1381567
7010
7011 10/17
7012 -----
7013 {jobs,nojobs}.c
7014 - get_original_tty_job_signals: get original signal dispostions for
7015 SIGTSTP, SIGTTIN, SIGTTOU before we start manipulating them in
7016 make_child
7017 - default_tty_job_signals: make sure we set SIGTSTP, SIGTTIN, or
7018 SIGTTOU to SIG_IGN if they were ignored at shell startup instead of
7019 unconditionally setting them to SIG_DFL. Fixes bug reported by
7020 idallen@idallen.ca
7021
7022 jobs.h
7023 - get_original_tty_job_signals: extern declaration
7024
7025 trap.c
7026 - initialize_traps: add call to get_original_tty_job_signals
7027
7028 10/22
7029 -----
7030 subst.c
7031 - expand_string_for_rhs: when expanding in this context (rhs of a word
7032 expansion or pattern removal), we don't perform word splitting, so
7033 we don't want to split $* if IFS is empty. Fixes bug reported by
7034 Stephane Chazelas <stephane.chazelas@gmail.com>
7035
7036 10/23
7037 -----
7038 subst.c
7039 - param_expand: when expanding $* in a pattern context where the
7040 expansion is quoted (Q_PATQUOTE), don't quote the expansion --
7041 the outer quotes don't make the characters in the expansion of
7042 $* special. Posix interp 221. Reported by Stephane Chazelas
7043 <stephane.chazelas@gmail.com>
7044
7045 10/28
7046 -----
7047 lib/readline/bind.c
7048 - enable-bracketed-paste: new bindable variable, enables support for
7049 a terminal's `bracketed paste mode'. Code contributed by
7050 Daniel Colascione <dancol@dancol.org>
7051
7052 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
7053 - enable-bracketed-paste: add description
7054
7055 lib/readline/{readline.c,rlprivate.h}
7056 - _rl_enable_bracketed_paste: declarations
7057 - #defines for use by bracketed paste implementation
7058
7059 lib/readline/rltty.c
7060 - rl_prep_terminal: send BRACK_PASTE_INIT string to terminal if we
7061 are supposed to enable bracketed-paste mode; change terminal_prepped
7062 to indicate we sent that string and need to clean up
7063 - rl_deprep_terminal: if terminal_prepped indicates we sent the
7064 bracketed-paste mode init string to the terminal, send the cleanup
7065 string before restoring the terminal modes
7066
7067 lib/readline/kill.c
7068 - rl_bracketed_paste_begin: function to read bracketed paste until
7069 BRACK_PASTE_SUFF; discard the suffix, and insert the rest of the
7070 paste as a single (undoable) object. Bound to BRACK_PASTE_PREF
7071
7072 lib/readline/funmap.c
7073 - bracketed-paste-begin: new bindable command, executes
7074 rl_bracketed_paste_begin
7075
7076 lib/readline/readline.c
7077 - bind_bracketed_paste_prefix: new function, sets up to recognize
7078 the bracketed paste prefix sequence (BRACK_PASTE_PREF) in emacs
7079 keymap and vi insertion keymap
7080 - readline_initialize_everything: call bind_bracketed_paste_prefix
7081
7082 11/1
7083 ----
7084 builtins/ulimit.def
7085 - RLIMIT_POSIXLOCKS: now synonym for RLIMIT_LOCKS
7086 - -k: new option: RLIMIT_KQUEUES, max kqueues allocated for this
7087 process
7088 - -P: new option: RLIMIT_NPTS, max number of pseudoterminals available
7089 to this process
7090
7091 doc/{bash.1,bashref.texi}
7092 - document `ulimit -k' option
7093 - document `ulimit -P' option
7094
7095 parse.y
7096 - `timespec list_terminator' production: if the list terminator is `;'
7097 set last_read_token to `;' to allow things like `time ; command' to
7098 time null commands and not throw a syntax error. Patch from
7099 Piotr Grzybowski <narsil.pl@gmail.com>
7100 - `BANG list_terminator' production: do the same thing
7101
7102 variables.c
7103 - sv_optind: use find_shell_variable and get_variable_value so we can
7104 have the variable's context in the case we need to do something
7105 when we are restoring a previous variable context's value
7106
7107 builtins/getopt.h
7108 - sh_getopt_state_t: struct to save sh_getopt's internal state so we
7109 can restore it around function calls in the event that we have a
7110 local copy of OPTIND
7111
7112 builtins/getopt.[ch]
7113 - sh_getopt_{save,restore}_istate: new functions to save and restore
7114 getopt's internal state
7115 - sh_getopt_{alloc,dispose}_istate: new functions to allocate and
7116 deallocate sh_getopt_istate_t objects
7117
7118 execute_cmd.c
7119 - maybe_restore_getopt_state: restore sh_getopt state after executing
7120 function body iff the funtion declared a local copy of OPTIND
7121 - execute_function: save sh_getopt state before executing function body
7122 - execute_function: note in getopt_state->flags whether or not the
7123 function declared a local copy of OPTIND; used by
7124 maybe_restore_getopt_state
7125 - execute_function: maybe restore sh_getopt state before returning via
7126 call to maybe_restore_getopt_state. Fixes bugs with getopts and
7127 state between calls reported in 2011 by Bernd Eggink
7128 <monoped@sudrala.de> and in 2014 by Oyvind Hvidsten
7129 <oyvind.hvidsten@dampir.no>
7130
7131 configure.ac
7132 - enable-function-import: new option, controls whether function imports
7133 are included. Enabled by default. Patch from David Galos
7134 <davegalos@google.com>
7135
7136 config.h.in
7137 - FUNCTION_IMPORT: define controlled by enable-function-import above
7138
7139 variables.c
7140 - initialize_shell_variables: include code to import function
7141 definitions from the environment if FUNCTION_IMPORT is defined
7142
7143 doc/bashref.texi
7144 - --enable_function-import: document new configuration option
7145
7146 11/5
7147 ----
7148 lib/readline/history.c
7149 - history_lines_read_from_file: new variable, set by read_history and
7150 read_history_range to the actual number of lines read from the
7151 history file. The value is valid immediately after a call to one
7152 of those functions
7153 - history_lines_written_to_file: new variable, set by write_history,
7154 history_do_write, and history_truncate_file to the actual number of
7155 lines written to the history file. The value is valid immediately
7156 after a call to one of those functions
7157
7158 variables.c
7159 - sv_histsize: set history_lines_in_file after history_truncate_file()
7160 only if hmax < history_lines_in_file (lines we've already read); a
7161 cosmetic change only
7162
7163 bashhist.c
7164 - load_history: set history_lines_in_file after read_history() from
7165 history_lines_read_from_file, since read_history reads all of the
7166 lines from the history file even if it's more than $HISTSIZE
7167 - maybe_save_shell_history: after calling write_history(), set
7168 history_lines_in_file to history_lines_written_to_file, since we
7169 can assume that we read everyhing we just wrote
7170
7171 builtins/history.def
7172 - history_builtin: after calling read_history (history -r), set the
7173 new value of history_lines_in_file, for the same reason as above
7174 - history_builtin: after calling read_history_range (history -n), set
7175 history_lines_in_file from history_lines_read_from_file
7176
7177 11/6
7178 ----
7179 lib/readline/histfile.c
7180 - history_truncate_file: since we move the old file to a backup copy
7181 before truncating, make sure the new file is owned by the same uid
7182 as the old
7183 - history_do_write: use chown in the same way as history_truncate_file
7184
7185 11/12
7186 -----
7187 lib/readline/display.c
7188 - expand_prompt: takes a new `flags' argument; only one flag defined
7189 so far: PMT_MULTILINE
7190 - expand_prompt: changed all callers to add new flags argument
7191 - rl_expand_prompt, redraw_prompt: make sure to set PMT_MULTILINE in
7192 FLAGS argument to expand_prompt if expanding parts of a prompt
7193 containing embedded newlines
7194 - expand_prompt: only add mode char to last line of a prompt with
7195 embedded newlines, so mode indicator doesn't get lost and gets
7196 updated properly. Fixes problem reported by Renlin Li
7197 <lirenlin@gmail.com>
7198
7199 11/13
7200 -----
7201
7202 lib/readline/display.c
7203 - prompt_modestr: changed prompt_modechar to return a string denoting
7204 the editing mode; default strings for emacs and both vi modes are
7205 #defines in this file. prompt_modestr takes an argument in which
7206 it returns the length of the mode string
7207 - expand_prompt: if expanding mode strings in the prompt, get the
7208 mode string to use and add it at the beginning of the prompt string,
7209 before expanding it. This will allow future work allowing the mode
7210 string to contain invisible characters
7211
7212 11/15
7213 -----
7214 lib/readline/rlprivate.h
7215 - _rl_{emacs,vi_cmd,vi_ins}_mode_str: extern declarations for
7216 variables to hold current values of user-settable mode strings;
7217 variables to hold lengths
7218
7219 lib/readline/rlconf.h
7220 - defines for default values of the mode strings for each editing mode
7221 and keymap
7222
7223 lib/readline/display.c
7224 - _rl_{emacs,vi_cmd,vi_ins}_mode_str: new variables to hold values of
7225 user-settable mode strings
7226 - _rl_{emacs,vi_cmd,vi_ins}_modestr_len: new variables to hold lengths
7227 of corresponding mode string variables
7228 - prompt_modestr: return appropriate user-settable mode string
7229 variables
7230
7231 lib/readline/bind.c
7232 - {emacs,vi-ins,vi-cmd}-mode-string: new user-settable mode string
7233 variables
7234 - sv_{emacs,viins,vicmd}_modestr: variable handling functions for user-
7235 settable mode string variables. Non-null values are run through
7236 rl_translate_keyseq so users can include invisible character
7237 sequences in the mode strings; null values restore the default
7238 - _rl_get_string_variable_value: handle values for new user-settable
7239 mode string variables. Original code contributed by Dylan Cali
7240 <calid1984@gmail.com>
7241
7242 lib/readline/doc/rluser.texi
7243 - {emacs,vi-ins,vi-cmd}-mode-string: document, including the fact that
7244 you can use \1 and \2 to bracket sequences of non-printing
7245 characters
7246
7247 11/16
7248 -----
7249 lib/readline/history.c
7250 - add_history: replace loop that copies history list down one item
7251 with call to memmove to take advantage of whatever efficiencies
7252 libc can offer. Won't be any slower than current loop
7253
7254 lib/readline/display.c
7255 - rl_redraw_prompt_last_line: new function, calls redraw_prompt if
7256 the prompt contains multiple lines; calls rl_forced_update_display
7257 if not
7258
7259 lib/readline/readline.h
7260 - rl_redraw_prompt_last_line: extern declaration, undocumented in
7261 texinfo manual until I get it a little more work
7262
7263 bashline.c
7264 - bash_execute_unix_command: instead of unconditionally calling
7265 rl_forced_update_display, call rl_redraw_prompt_last_line if we
7266 cleared the last line before executing the command. This keeps
7267 commands that don't display any other output but just manipulate
7268 the contents of the line buffer from redisplaying the prompt lines
7269 before the last newline multiple times. Fixes bug reported by
7270 Jesper Nygards <jesper.nygards@gmail.com> and Rob Foehl
7271 <rwf@loonybin.net>. This means that commands that display output
7272 will *only* display the final line of the prompt
7273 - bash_execute_unix_command: if the command returns 124, we redraw
7274 the line unconditionally, including all lines of the prompt
7275
7276 11/18
7277 -----
7278 builtins/mapfile.def
7279 - mapfile_builtin: don't allow a valid array reference through to
7280 mapfile(), since it will just create a shell variable with that name.
7281 Bug and fix from Eduardo A. Bustamante López <dualbus@gmail.com>
7282
7283 11/19
7284 -----
7285 lib/readline/complete.c
7286 - _rl_colored_completion_prefix: new variable, if non-zero, and color
7287 support is compiled in, and the $LS_COLORS variable exists and
7288 contains color definitions, display any common prefix of a set of
7289 completions in blue when displaying all the possible completions.
7290 Doesn't work with menu-complete, which inserts possible completions
7291 inline
7292 - colored_prefix_start(), colored_prefix_end(): new functions, used to
7293 bracket colored completion prefixes
7294 - fnprint: if prefix_bytes is non-zero, and _rl_colored_completion_prefix
7295 is > 0, display the first PREFIX_BYTES bytes of the word bracketed
7296 by calls to colored_prefix_start and colored_prefix_end
7297 - print_filename: if _rl_colored_completion_prefix is > 0, compute the
7298 length in bytes of the common prefix and pass that to fnprint
7299
7300 lib/readline/readline.c
7301 - readline_initialize_everything: initialize the colors from $LS_COLORS
7302 if _rl_colored_completion_prefix is non-zero
7303
7304 lib/readline/colors.c
7305 - _rl_print_prefix_color: new function, changes text color to that
7306 defined for the common prefix of a set of possible completions
7307 (currently cyan, same as directories); currently uses C_PREFIX,
7308 defined in colors.h as C_DIR
7309
7310 lib/readline/colors.h
7311 - _rl_print_prefix_color: new extern declaration
7312
7313 lib/readline/bind.c
7314 - colored-completion-prefix: new bindable variable, if set, common
7315 prefix of a set of possible completions is displayed in color.
7316 Feature requested by several, most recently by Richard Neill
7317 <rn214@richardneill.org> (in a slightly different form) and
7318 Duy Nguyen <pclouds@gmail.com>
7319
7320 11/20
7321 -----
7322 builtins/printf.def
7323 - printf_builtin: allow null (empty) format strings supplied with
7324 -v var to set `var' to the empty string. That is, printf -v var ""
7325 is now the same as var="". Change suggested by Mike Frysinger
7326 <vapier@gentoo.org>
7327
7328 pathexp.h
7329 - FNMATCH_NOCASEGLOB: macro to decide whether or not to pass
7330 FNM_CASEFOLD flag to strmatch depending on whether glob_ignore_case
7331 is set; analogout to FNMATCH_IGNCASE
7332
7333 pathexp.c
7334 - glob_name_is_acceptable: use FNMATCH_NOCASEMATCH to determine flags
7335 passed to strmatch; if nocaseglob is used to generate glob matches,
7336 it should be used to generate ignored matches
7337
7338 11/21
7339 -----
7340 pcomplete.c
7341 - filter_stringlist: the call to strmatch now honors the setting of
7342 nocasematch. Feature request from Ville Skytta <ville.skytta@iki.fi>
7343 back in 2010
7344
7345 doc/bash.1,lib/readline/doc/rluser.texi
7346 - complete -X: document that filtering the list of possible completions
7347 honors the nocasematch option when performing matching
7348
7349 lib/glob/gmisc.c
7350 - include chartypes.h and strmatch.h for new defines
7351 - match_pattern_{wchar,char}: now take new third FLAGS argument, flags
7352 have same meanings as strmatch(); intent is to handle case
7353 insensitive comparisons under same conditions as strmatch
7354 - FOLD: imported case-folding define from sm_loop.c; wide and single-
7355 byte character versions
7356 - match_pattern_{wchar,char}: use FOLD when comparing characters to
7357 honor FNM_CASEFOLD if set in FLAGS argument
7358
7359 externs.h
7360 - match_pattern_{wchar,char}: updated extern declarations
7361
7362 subst.c
7363 - match_{upattern,wpattern}: update strmatch/wcsmatch calls to include
7364 FNMATCH_IGNCASE in flags argument
7365 - match_{upattern,wpattern}: update match_pattern_{char,wchar} calls
7366 to include FNMATCH_IGNCASE in flags argument (consistent with calls
7367 to strmatch). This makes pattern substitution word expansion honor
7368 nocasematch shell option. Feature requested by Davide Baldini
7369 <baldiniebaldini@gmail.com>
7370 - match_wpattern: make sure to fold case if necessary when doing simple
7371 matching
7372
7373 doc/{bash.1,bashref.texi}
7374 - pattern substitution: updated description to include honoring setting
7375 of nocasematch when performing matching
7376
7377 subst.c
7378 - expand_word_internal: optimize handling of "$@" idiom by calling
7379 list_rest_of_args() and quote_list() directly at the top of the
7380 function instead of going through normal code path
7381 - cached_quoted_dollar_at: WORD_LIST of quoted positional parameters,
7382 used by same code above that optimizes "$@"; if non-null we just
7383 return a copy of the list; if null, we save a copy of the list we
7384 create
7385 - invalidate_cached_quoted_dollar_at: convenience function to allow
7386 other parts of the shell (e.g., remember_args()) to destroy the
7387 cached list of quoted positional parameter when the positional
7388 parameters change
7389
7390 builtins/common.c
7391 - remember_args: call invalidate_cached_quoted_dollar_at()
7392
7393 builtins/shift.def
7394 - shift_builtin: call invalidate_cached_quoted_dollar_at after modifying
7395 dollar_vars[]
7396
7397 builtins/source.def
7398 - maybe_pop_dollar_vars: call invalidate_cached_quoted_dollar_at just
7399 to be safe
7400
7401 11/23
7402 -----
7403 builtins/evalfile.c
7404 - _evalfile: return -1 if errno == ENOENT and the flags don't include
7405 FEVAL_ENOENTOK. If we print an error message we should return an
7406 error
7407 - force_execute_file: new function, reads and executes commands from
7408 a file but returns an error if file doesn't exist
7409
7410 builtins/common.h
7411 - force_execute_file: new extern declaration
7412
7413 shell.c
7414 - main: call start_debugger even if dollar_vars[1] == 0 if the shell
7415 isn't interactive (interactive_shell == 0)
7416 - start_debugger: call force_execute_file instead of maybe_execute_file;
7417 turn off debugging mode if it returns value < 0
7418
7419 11/24
7420 -----
7421 hashlib.h
7422 - DEFAULT_HASH_BUCKETS: doubled to 128, cost in memory use is small but
7423 changes traversal order when not sorting results
7424
7425 11/25
7426 -----
7427 doc/{bash.1,bashref.texi}
7428 - make it clearer, by breaking it out into a separate paragraph, that
7429 referencing an array without a subscript is equivalent to referencing
7430 it with subscript 0
7431 - add text saying that referencing any variable using a valid subscript
7432 is OK
7433
7434 11/28
7435 -----
7436
7437 arrayfunc.c
7438 - bind_array_variable, bind_assoc_variable: allow binding value to a
7439 readonly variable if the ASS_FORCE flag is set in the FLAGS
7440 argument
7441
7442 subst.h
7443 - ASS_FORCE: new assignment flag; means to allow assignment even if
7444 variable is marked readonly
7445
7446 builtins/declare.def
7447 - when assigning a value to an array or assoc variable using
7448 something like `declare -r foo=bar' where foo is an existing array
7449 variable, pass the ASS_FORCE to assign_array_var_from_string so
7450 the assignment is allowed. Fixes debian bug 765759
7451 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765759
7452
7453 builtins/setattr.def
7454 - var_attribute_string: new function to return (as argument) a char
7455 array with attribute flag values for a given variable; returns the
7456 length of the array
7457
7458 lib/sh/shquote.c
7459 - sh_quote_reusable: function returning a version of its string
7460 argument that is quoted for reuse
7461
7462 externs.h
7463 - sh_quote_reusable: extern declaration
7464
7465 builtins/common.h
7466 - MAX_ATTRIBUTES: define used to size arrays for attribute flag
7467 characters
7468 - var_attribute_string: new extern function declaration
7469
7470 subst.c
7471 - array_remove_pattern: fixed a bug where `var' instead of `v' was
7472 tested for invisible attribute
7473 - get_var_and_type: fill in a valid *VARP if returning VT_VARIABLE
7474 because callers may need to use it
7475 - parameter_brace_transform: family of functions to implement the new
7476 mksh-inspired ${param@spec} transformation word expansions. Some
7477 of the operators transform the (expanded) value of the parameter,
7478 the rest expand to information about the parameter itself
7479 (array_transform, parameter_list_transform, list_transform,
7480 string_transform, pos_params_assignment, array_var_assignment,
7481 string_var_assignment)
7482 - parameter_brace_expand: changes to parse the new `@' word expansion
7483 operator and call parameter_brace_transform appropriately
7484 - parameter_brace_expand: make sure we handle ${#@} as we have before
7485 even in the presence of the new `@' operator
7486
7487 variables.c
7488 - push_temp_var: make sure to call bind_variable_internal with the
7489 ASS_FORCE flag so we override readonly variables created with
7490 something like `tempvar=foo declare -r foo'.
7491 - bind_variable_internal: honor ASS_FORCE flag to allow binding even
7492 if a variable is readonly
7493
7494 execute_cmd.c
7495 - struct func_array_state: new state to save state of BASH_LINENO,
7496 BASH_SOURCE, and FUNCNAME during function execution so it can be
7497 restored on a jump to top level
7498 - restore_funcarray_state: new function to restore func_array_state
7499 - execute_function: fill in func_array_state variable, add unwind-
7500 protect to restore it on jump to top level, call explicitly at
7501 end of function if subshell != 0 (may not be necessary, but safe
7502 for now). Fixes bug with local assignments to FUNCNAME reported
7503 by Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
7504
7505 11/29
7506 -----
7507 arrayfunc.c
7508 - assign_compound_array_list: turn off ASS_APPEND flag when processing
7509 each individual assignment inside the parens in var+=(...). The
7510 outer += should not affect assignments to existing subscripts;
7511 those should be treated like usual assignments unless += supplied
7512 inside the parens. Bug report from Maarten Billemont
7513 <lhunath@lyndir.com>, fix from Eduardo A. Bustamante López
7514 <dualbus@gmail.com>
7515
7516 config.h.in
7517 - HAVE_PSELECT: define if pselect(2) available
7518
7519 configure.ac
7520 - check for pselect(2), define HAVE_PSELECT if found
7521
7522 lib/readline/input.c
7523 - rl_getc: use pselect(2) to wait for input ready on readline's
7524 input fd or for a signal to arrive, will handle SIGWINCH (which
7525 does not interrupt read(2)) and thus allow resize to happen without
7526 having to wait to read more input. Only works if pselect available
7527 and returns -1/EINTR on a signal even if the signal was installed
7528 with SA_RESTART. From a suggestion from Egmont Koblinger
7529 <egmont@gmail.com>
7530
7531 12/3
7532 ----
7533 variables.c
7534 - flush_temporary_env: new function, disposes all temp variables in
7535 temporary_env hash table
7536 - bind_variable: only try to update a temporary variable's value in the
7537 temporary env if the value argument is not null. Fixes bug reported
7538 by <tangqinghao@360.cn>
7539
7540 variables.h
7541 - flush_temporary_env: new extern declaration
7542
7543 subst.c
7544 - command_substitute: if running command substitution as part of
7545 expanding a redirection (expanding_redir == 1), flush any temporary
7546 environment we've inherited as part of this command, since we are not
7547 supposed to have access to the temporary environment. Since
7548 expanding_redir only controls access to the temporary environment for
7549 variable lookup and binding, we can turn it off in the subshell
7550
7551 12/4
7552 ----
7553 builtins/printf.def
7554 - printstr: make sure a missing precision specifier after a `.' is
7555 treated as 0, as printf(3) specifies. Fixes ubuntu bash bug
7556 1399087 (https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1399087)
7557
7558 12/5
7559 ----
7560 subst.c
7561 - skip_to_delim: if scanning past process substitution (skipcmd == 1,
7562 noprocsub == 0), use extract_delimited_string instead of
7563 extract_process_subst, which was changed a while back (bash-4.3.23)
7564 to use xparse_dolparen. xparse_dolparen complains if the command
7565 or process substitution is unterminated, since it runs the parser,
7566 which is not what we want here. Command substitution does the same
7567 thing. Fixes bug reported by Daniel Kahn Gillmor
7568 <dkg@fifthhorseman.net> as Debian bash bug 771968
7569 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771968)
7570
7571 12/6
7572 ----
7573 subst.c
7574 - command_substitute: short-circuit without forking on a command string
7575 that consists entirely of <blank>s and newlines
7576
7577 jobs.c
7578 - make_child: changes to allow interrupts through if fork fails and
7579 we are sleeping for `forksleep' seconds
7580 - waitchld: make things a little more resilient if CHILD ends up NULL
7581
7582 12/12
7583 -----
7584 lib/readline/complete.c
7585 - rl_display_match_list: when calculating common prefix to display in
7586 color, make sure we correctly handle a common prefix with a trailing
7587 `/' as we do when checking whether or not to add an ellipis.
7588 printable_part() doesn't return the whole pathname if it ends in a
7589 slash, to avoid printing null strings, so we have to make sure we
7590 have the entire prefix
7591
7592 lib/readline/complete.c
7593 - _rl_complete_display_matches_interrupt: new variable, set to 1 by
7594 _rl_complete_sigcleanup to let rl_display_match_list know it has
7595 freed the match list
7596 - display_matches: check for signals during the printing loops with
7597 RL_SIG_RECEIVED(), return immediately if there is a pending signal
7598 (might not want to do this if it's SIGWINCH -- CHECK)
7599 - rl_complete_internal: if _rl_complete_display_matches_interrupt
7600 set after calling display_matches, just null out `matches' since
7601 it's already been freed and call any application-set signal hook
7602
7603 12/14
7604 -----
7605 parse.y
7606 - time_command_acceptable: if the token before a newline is `|',
7607 return 0, since it's not really valid to time inside a pipeline.
7608 Only handles a single newline but allows things like
7609 echo a |
7610 time cat
7611 to invoke /usr/bin/time, which is probably enough to catch the
7612 stray carriage return. Fixes bug reported by Andre Majorel
7613 <aym-ung@teaser.fr>
7614
7615 builtins/declare.def
7616 - declare_internal: don't try to perform compound assignments unless
7617 the WORD_DESC has flags including W_COMPASSIGN (maybe should check
7618 W_ASSIGNMENT as well), avoiding unexpected evaluation if a word
7619 is of the form (word) and is assigned to an array variable like so:
7620 declare -x var=$value. Bug reported by Stephane Chazelas
7621 <stephane.chazelas@gmail.com>. Will eventually be contingent on
7622 compatibility level > 43, but not there yet. TENTATIVE
7623
7624 12/15
7625 -----
7626 lib/sh/Makefile.in
7627 - add missing dependencies for shmatch.o. Pointed out by Sergey
7628 Mikhailov <sergey.mikhailov@gmail.com>
7629
7630 12/16
7631 -----
7632 {execute_cmd,subst}.c
7633 - W_ASSIGNINT: remove, not used any more
7634
7635 execute_cmd.c
7636 - fix_assignment_words: don't look for `-i' option and set W_ASSIGNINT
7637 flag any more; doing things a different way
7638 - shell_expand_word_list: instead of using W_ASSIGNINT flag, since it
7639 doesn't take into account all options that can transform values on
7640 assignment (-l/-u/-c can also), go through option arguments looking
7641 for options that need special handling and add them to the `opts'
7642 array for make_internal_declare to use. Fixes bug with constructs
7643 like `declare -al foo=(UPONE UPTWO UPTHREE)' not being lowercased on
7644 assignment reported by Linda Walsh <bash@tlinx.org>
7645
7646
7647
7648 12/18
7649 -----
7650 lib/readline/readline.c
7651 - rl_internal_char: when we read EOF on a non-empty line, check for
7652 signals and invoke any readline signal handling and any application-
7653 installed signal hook
7654
7655 12/20
7656 -----
7657 lib/readline/readline.c
7658 - rl_internal_char: if we read EOF on a non-empty line, set c to
7659 _rl_eof_char the first time through. If we read EOF the next time,
7660 return EOF from readline(). If callbacks are defined, this returns
7661 EOF immediately, since lastc isn't available. Fix for problem
7662 most recently identified by Jiri Kukacka <jiri.kukacka@orcle.com>,
7663 it has come up in the past
7664
7665 12/21
7666 -----
7667 builtins/declare.def
7668 - declare_internal: keep track of whether or not an assignment statement
7669 argument to declare is an array subscript assignment; need to
7670 differentiate assignments from straight declarations (declare a[4])
7671 which are accepted for backwards compatibility
7672 - assignment statements like declare a[2]=foo are now treated as
7673 straight subscript assignment statements if a already exists as an
7674 array variable
7675 - declare foo='(1 2 3)' is treated as an assignment to foo[0] if foo
7676 exists and is an array, just as it would be if it were an assignment
7677 statement and `declare' was not present. All this from a proposal
7678 by Stephane Chazelas <stephane.chazelas@gmail.com>
7679
7680 12/22
7681 -----
7682 builtins/read.def
7683 - read_tty_modified: function to tell the rest of the shell if the
7684 read builtin has modified the tty
7685 - read_builtin: make sure to initialize terminating signals before
7686 installing a SIGALRM signal handler in case we modify the tty as
7687 well as ask for a timeout; the subsequent call to
7688 initialize_terminating_signals would overwrite the read-builtin-
7689 local SIGALRM handler
7690
7691 builtins/common.h
7692 - read_tty_modified: new extern declaration
7693
7694 shell.c
7695 - exit_shell: if read_tty_modified() returns true, call read_tty_cleanup
7696 to undo the terminal modifications. Extension of previous fixes;
7697 fixes bug with read -s reported by Richard W. Marsden
7698 <richard@marsden.nu>
7699
7700
7701 12/23
7702 -----
7703 builtins/setattr.def
7704 - show_var_attributes: call print_array_assignment and print_assoc_assignment
7705 with a `not quoted' flag so the assignment statements are not
7706 surrounded by single quotes. Caused changes to a lot of test output
7707
7708 12/29
7709 -----
7710 lib/readline/complete.c
7711 - stat_char: Windows doesn't handle X_OK flag to access(2); use file
7712 extensions to determine whether or not a file is executable. Bug
7713 report and fix from Eli Zaretskii <eliz@gnu.org>
7714
7715 configure.ac
7716 - changed version to bash-4.4-devel
7717
7718 lib/readline/readline.h
7719 - changed version to readline-6.4
7720
7721 12/30
7722 -----
7723 readline.h
7724 - struct readline_state: fix types of `ignorefunc' and `attemptfunc'
7725 members
7726
7727 lib/sh/shquote.c,externs.h
7728 - sh_contains_shell_metas, sh_contains_quotes: now take `const char *'
7729 as parameter
7730
7731 stringlib.c,externs.h
7732 - strcreplace: `text' argument now `const char *'
7733
7734 pathexp.[ch]
7735 - quote_globbing_chars: `string' argument now `const char *', accompanying
7736 changes to function local variables
7737
7738 pcomplete.c
7739 - preproc_filterpat: `text' argument now `const char *'
7740 - filter_stringlist: `text' argument now `const char *'
7741
7742 12/31
7743 -----
7744 builtins/evalstring.c
7745 - should_suppress_fork: new function, broke code that decides whether
7746 to turn on CMD_NO_FORK flag out of parse_and_execute into a separate
7747 function
7748
7749 execute_cmd.c
7750 - execute_command_internal: AND_AND, OR_OR: call should_suppress_fork
7751 for the RHS of && and ||, make `make' invocations marginally more
7752 efficient
7753
7754 flags.c
7755 - get_current_flags: returns a bitmap of all single-letter shell
7756 options with a non-zero value meaning option is enabled
7757 - set_current_flags: set current single-letter options from a passed
7758 bitmap, which has presumably been initialized with get_current_flags
7759
7760 flags.h
7761 - {get,set}_current_flags: new extern declarations
7762
7763 builtins/declare.def
7764 - declare_internal: if invoked as `local', interpret name argument of
7765 `-' to mean to save (and restore at shell return) single-letter
7766 shell options
7767
7768 variables.c
7769 - push_func_var: if we encounter `-' as the name of a local variable,
7770 take the value and call set_current_flags on it to restore old
7771 flag settings
7772
7773 builtins/set.def
7774 - get_current_options: returns a bitmap of all shell options settable
7775 with `set', with a non-zero value meaning option is enabled
7776 - set_current_options: set current shell options from a passed
7777 bitmap, which has presumably been initialized with get_current_options
7778
7779
7780 1/1/2015
7781 --------
7782 lib/readline/parens.c
7783 - _rl_blink_matching_paren: initialize to 0 whether or not select(2) is
7784 available. Inconsistency reported by Mark Karpov
7785 <markkarpov@opmbx.org>
7786
7787 builtins/declare.def
7788 - declare_internal: use get_current_options instead of
7789 get_current_flags, so `local -' can be generalized
7790
7791 variables.c
7792 - push_func_var: use set_current_options instead of set_current_flags
7793 so `local -' can be generalized
7794
7795 doc/{bash.1,bashref.texi}
7796 - document new `local -' feature; originally inspired by Robert Elz
7797 <kre@munnari.oz.au> describing feature in NetBSD sh
7798
7799 1/3
7800 ---
7801 lib/readline/{complete,funmap,kill,histfile,util}
7802 lib/readline/readline.h
7803 lib/tilde/tilde.c
7804 - fixes for filename- and evironment-related issues on Windows. Fixes
7805 from Eli Zaretskii <eliz@gnu.org>
7806 - Windows can paste to the console from the clipboard like Cygwin
7807 - Windows uses $APPDATA as a pseudo-$HOME
7808
7809 lib/readline/input.c
7810 - rl_getc: use _getch on Windows to avoid being overridden by a getch
7811 ncurses function
7812 - win32_isatty: replace Windows isatty(3) with a function that does
7813 additional checks, sinces Windows isatty returns non-zero for
7814 every character device. From Eli Zaretskii <eliz@gnu.org>
7815
7816 lib/readline/display.c
7817 - delete_chars: if compiled with ncurses on Windows, this code can
7818 work, so build it in if NCURSES_VERSION defined
7819 - open_some_spaces: ditto
7820
7821 1/6
7822 ---
7823 doc/{bash.1,bashref.texi}
7824 - minor grammar and typo corrections from TonyMc <afmcc@btinternet.com>
7825
7826 1/8
7827 ---
7828 sig.c
7829 - throw_to_top_level: only attempt to run the interrupt trap if SIGINT
7830 is trapped -- minor optimization
7831 - throw_to_top_level: if we are running a trap, call run_trap_cleanup
7832 to turn off the sigmodes flags
7833
7834 trap.c
7835 - _run_trap_internal: temporarily suppress pending SIGINTs while running
7836 one of the traps the shell handles internally (e.g., ERR). Fixes bug
7837 reported by Keith Thompson <keithsthompson@gmail.com>
7838
7839 1/10
7840 ----
7841 bashhist.c
7842 - bash_history_inhibit_expansion: use skip_to_delim with the history
7843 expansion character to see whether or not the instance of the
7844 history expansion character should be skipped because, for instance,
7845 it is in a command substitution. Fixes issue reported by
7846 Zigmund.Ozean@zig-home.localdomain
7847
7848 1/14
7849 ----
7850 lib/readline/isearch.c
7851 - _rl_isearch_dispatch: if we are in a multibyte locale, make sure to
7852 use _rl_find_prev_mbchar when trying to delete characters from the
7853 search string, instead of just chopping off the previous byte.
7854 Fixes bug reported by Kyrylo Shpytsya <kshpitsa@gmail.com>
7855
7856 lib/readline/complete.c
7857 - rl_filename_completion_function: if we tilde-expand `dirname', make
7858 sure we use the expanded result instead of throwing it away for the
7859 quote-removed `users_dirname', which still has any leading tilde.
7860 Fixes bug reported by Dave Rutherford <dave@evilpettingzoo.com>
7861
7862 execute_cmd.c
7863 - select_query: if the read builtin doesn't return anything in REPLY,
7864 return NULL (failure). Fixes bug reported by Etherial Raine
7865 <osirisgothra@hotmail.com>
7866
7867 builtins/read.def
7868 - read_builtin: if REPLY has the readonly or noassign attribute, return
7869 failure
7870
7871 1/16
7872 ----
7873 redir.c
7874 - redir_open: if open() returns -1/EINTR, check traps as well as
7875 using QUIT to handle signals
7876
7877 1/18
7878 ----
7879 jobs.c
7880 - wait_for: make sure queue_sigchld is set to 1 before unblocking
7881 SIGCHLD if MUST_UNBLOCK_CHLD is defined
7882
7883 1/19
7884 ----
7885 pcomplete.h
7886 - new progcomp option: COPT_NOSORT, means to not sort list of possible
7887 completions
7888
7889 pcomplete.c
7890 - pcomp_set_readline_variables: if COPT_NOSORT set in compspec flags,
7891 set rl_sort_completion_duplicates to 0
7892
7893 builtins/complete.def
7894 - _compopt: new option value: -o nosort, sets COPT_NOSORT in compspec
7895 option flags. Provides new -o nosort option for complete and compgen
7896
7897 bashline.c
7898 - attempt_shell_completion: make sure rl_sort_completion_matches is
7899 set to 1 before completion is attempted; allow a compspec to turn
7900 it off
7901
7902 lib/readline/kill.c
7903 - rl_vi_yank_pop: new function, vi-mode version of yank-pop. Original
7904 code from Ian Kelling <ian@iankelling.org>
7905
7906 lib/readline/funmap.c
7907 - `vi-yank-pop': bindable name mapped to rl_vi_yank_pop
7908
7909 lib/readline/readline.h
7910 - rl_vi_yank_pop: extern declaration
7911
7912 1/21
7913 ----
7914 lib/sh/shquote.c
7915 - sh_backslash_quote: change to understand and handle multibyte
7916 characters, using is_basic, COPY_CHAR_P. See
7917 https://bugzilla.redhat.com/show_bug.cgi?id=1184320 for original
7918 report
7919
7920 1/23
7921 ----
7922 include/posixjmp.h
7923 - use setjmp_sigs instead of redefined setjmp, it fails on Cygwin.
7924 Report from Eric Blake <eblake@redhat.com>
7925
7926 builtins/wait.def,shell.c
7927 - use setjmp_sigs instead of setjmp call, since setjmp no longer
7928 redefined to something known
7929
7930 include/chartypes.h, lib/readline/chardefs.h
7931 - make sure all ctype.h macros are called with unsigned char args,
7932 casting to make sure
7933
7934 lib/sh/casemod.c
7935 - sh_modcase: don't assume that the upper and lower case versions of a
7936 character are the same width, so don't try to do the conversion in
7937 place: convert and copy the converted characters one or more at a
7938 time to the returned string
7939 - sh_modcase: since upper and lower case versions of same character
7940 may have different widths in some locales, don't shortcut and assume
7941 that we can do single-byte case modification (toupper) with a
7942 single-byte input character (e.g., `i'). Fix for problem reported
7943 by Stephane Chazelas <stephane.chazelas@gmail.com>
7944
7945 1/31
7946 ----
7947 lib/readline/histfile.c
7948 - history_truncate_file, history_do_write: if the first rename(2)
7949 of the history file to the backup file fails, set the backup file
7950 name to NULL to prevent any later attempts to restore the
7951 original. Report from Jonathan Hankins <jhankins@homewood.k12.al.us>
7952 - history_do_write: don't attempt to back up non-regular files.
7953 Report from Jonathan Hankins <jhankins@homewood.k12.al.us>
7954
7955 2/2
7956 ---
7957 trap.c
7958 - run_interrupt_trap: now takes an argument indicating whether or not
7959 it was called just before a longjmp to top_level; change callers
7960 - run_interrupt_trap: if running a trap and we are being called before
7961 a longjmp to top_level, call run_trap_cleanup on running trap so
7962 a QUIT call while running a DEBUG trap, for instance, doesn't leave
7963 sigmodes[DEBUG_TRAP] including SIG_INPROGRESS. Fixes bug reported
7964 by Chih-Chieh Chou <ccchou@gmail.com>
7965
7966 sig.c
7967 - throw_to_top_level: change call to run_interrupt_trap to pass arg 1
7968 - termsig_handler: change call to run_interrupt_trap
7969
7970 trap.h
7971 - run_interrupt_trap: update extern prototype declaration
7972
7973 2/4
7974 ---
7975 lib/readline/histfile.c
7976 - histfile_backup, histfile_restore: new functions to back up and restore
7977 history file to `filename-', following (one level of) symlinks through
7978 so we don't rename the symlink itself. From a suggestion by
7979 Jonathan Hankins <jhankins@homewood.k12.al.us>
7980
7981 assoc.c
7982 - assoc_to_assign: if an index happens to be `@' or `*', make sure it's
7983 double-quoted. Bug report from Greg Wooledge <wooledg@eeg.ccf.org>
7984
7985 2/5
7986 ---
7987 lib/readline/bind.c
7988 - rl_bind_key: if we are rebinding a key that is not bound to a
7989 function or a macro, construct a key sequence and pass it to
7990 rl_bind_keyseq. Make sure that '\' when it is used as a key is
7991 changed to "\\" so it can survive rl_translate_keyseq. Fixes
7992 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776743
7993
7994 2/8
7995 ---
7996 include/posixjmp.h
7997 - _rl_longjmp, sh_longjmp: new defines, expand to siglongjmp or longjmp
7998 depending on autoconf results, used to avoid redefining longjmp,
7999 remove _OPENNT conditional code. Report from Eric Blake
8000 <eblake@redhat.com>
8001
8002 {bashjmp,quit}.h,{execute_cmd,expr,jobs,sig,trap}.c,builtins/{evalstring.c,return.def}
8003 - change calls to longjmp to use sh_longjmp
8004
8005 lib/readline/util.c
8006 - change calls to longjmp to use _rl_longjmp
8007
8008 2/18
8009 ----
8010 variables.c
8011 - bind_int_variable: make sure `v' is non-null before making it visible
8012
8013 2/19
8014 ----
8015 arrayfunc.c
8016 - assign_array_var_from_word_list: after assignment, mark variable as no
8017 longer invisible
8018 - assign_array_var_from_string: after assignment, mark variable as no
8019 longer invisible
8020
8021 builtins/declare.def
8022 - declare_internal: add warning if an attempt is made to use a quoted
8023 compound assignment as an argument to declare (declare -a foo='( 1 2 )');
8024 backwards compatible with bash-4.3. Still a tentative change
8025
8026 2/20
8027 ----
8028 lib/glob/smatch.c
8029 - is_wcclass: check malloc() return value, return -1 if it fails
8030 Report from Tobias Stoeckmann <tobias@stoeckmann.org>
8031
8032 lib/sh/shmatch.c
8033 - sh_regmatch: check malloc() return value, handle NULL value if it
8034 fails. Report from Tobias Stoeckmann <tobias@stoeckmann.org>
8035
8036 2/22
8037 ----
8038 lib/readline/doc/rltech.texi
8039 - rl_callback_handler_install: note that the handler function should
8040 free the line it receives, as with readline. Suggested by
8041 Ulf Magnusson <ulfalizer@gmail.com>
8042 - Readline Signal Handling: note that application needs to clean up
8043 readline's terminal state if it wants to handle a signal before
8044 the line handler restores it. Suggested by Ulf Magnusson
8045 <ulfalizer@gmail.com>
8046
8047 2/24
8048 ----
8049 lib/readline/histfile.c
8050 - history_do_write,history_truncate_file: if the write fails, make sure
8051 to set history_lines_written_to_file to 0 so we don't lose those
8052 history entries
8053
8054 2/27
8055 ----
8056 execute_cmd.c
8057 - execute_function: unwind-protect the value of line_number_for_err_trap,
8058 so a function that returns a non-zero value and triggers an ERR trap
8059 has the right value for LINENO. Any simple command in the function
8060 body can change it. Bug report from Paul Donohue <gnu@paulsd.com>
8061
8062 3/5
8063 ---
8064 lib/sh/shquote.c
8065 - sh_backslash_quote: cast `c' to `unsigned char' before using as
8066 index into backslash_table. Report and fix from
8067 alexeyv.90@gmail.com
8068
8069 arrayfunc.[ch]
8070 - valid_array_reference: added second `flags' argument for future use;
8071 currently unused
8072
8073 parse.y,{redir,subst,variables,test}.c
8074 builtins/{declare,printf,read,set}.def
8075 - valid_array_reference: changed callers
8076
8077 3/7
8078 ---
8079 lib/readline/signals.c
8080 - _rl_handle_signal: if readline gets a SIGTSTP or SIGTTIN, block
8081 SIGTTOU so a backgrounded readline can reset the terminal settings
8082 appropriately, otherwise the terminal state and readline's idea
8083 of it can get messed up. Original report from Dave Wysochanski
8084 <dwysocha@redhat.com> and Dave Anderson <anderson@redhat.com>
8085
8086 trap.c
8087 - run_pending_traps: don't allow recursive SIGWINCH trap invocations;
8088 they're wasteful and trying to handle a stream of signals while a
8089 user resizes the terminal can lead to malloc errors trying to save
8090 and restore the_pipeline multiple times. Problem reported most
8091 recently by Martin M. S. Pederson (Fedora bash bug 1197768
8092 https://bugzilla.redhat.com/show_bug.cgi?id=1197768)
8093 - reset_or_restore_signal_handlers: set pending_traps to 0 for all
8094 signals when forking a child. TENTATIVE fix
8095
8096 jobs.c
8097 - {save,restore}_pipeline: block SIGCHLD while manipulating the_pipeline
8098 like cleanup_the_pipeline does. XXX - may not be necessary
8099
8100 lib/readline/display.c
8101 - rl_redisplay: fixed case where multibyte character in the prompt
8102 (e.g., \u03bb) in the last screen column causes problems with line
8103 wrapping because the newline marker is put in the middle of the
8104 multibyte char. Most recently reported on Ubuntu by
8105 <sterpe@gmail.com>
8106
8107 pathexp.c
8108 - quote_string_for_globbing: if a bracket expression doesn't have a
8109 closing right bracket, rescan it from just after the opening
8110 bracket without treating it as a bracket expression. Bug report
8111 from Stephane Chazelas <stephane.chazelas@gmail.com>
8112
8113 3/9
8114 ---
8115 subst.c
8116 - process_substitute: keep the last pipeline created to run a process
8117 substitution in LAST_PROCSUB_CHILD; discard it when another one is
8118 created
8119
8120 jobs.[ch]
8121 - discard_pipeline: now global, so process_substitute can call it
8122
8123 jobs.c
8124 - last_procsub_child: new variable, set and modified only by the process
8125 substitution code
8126 - find_pipeline: if the requested pid is in LAST_PROCSUB_CHILD, return
8127 it; analogous to the way this code handles the_pipeline
8128 - waitchld: if we find a child via find_pipeline that is a part of the
8129 last process substitution child, mark that child appropriately. If
8130 the child is dead, add it to the bgp list. This and the previous
8131 change allow waiting for the most recent process substitution (the
8132 one corresponding to $!). Original report from Stephane Chazelas
8133 <stephane.chazelas@gmail.com>
8134
8135 3/10
8136 ----
8137 arrayfunc.c
8138 - unbind_array_element: make sure skipsubscript() doesn't try to parse
8139 embedded quotes in the subscript, since this has already been through
8140 one round of word expansion before calling the unset builtin. (This
8141 function is only called by the unset builtin). Fixes bug reported by
8142 <vampyrebat@gmail.com>
8143
8144 3/17
8145 ----
8146 jobs.c
8147 - waitchld: move code that adds the last process substitution pid to
8148 the bgpids array from waitchld (where it can call malloc in a signal
8149 handler context) to cleanup_dead_jobs
8150
8151 3/19
8152 ----
8153 subst.c
8154 - parameter_brace_expand: if expanding an array in a context where word
8155 splitting will not take place (W_ASSIGNRHS only for now), make sure
8156 to pass the double-quoted flag to chk_atstar so we don't get the
8157 unquoted $* behavior, which will cause unwanted word splitting.
8158 Fixes bug reported by isabella parakiss <izaberina@gmail.com>
8159
8160 arrayfunc.c
8161 - unbind_array_element: don't assume that caller will check and pass
8162 only array variables; don't allow non-array variables to be unset
8163 using the `@' or `*' subscripts and don't allow any subscripts other
8164 than 0; return -2 in those cases
8165 - unbind_array_element: unset a non-array variable if passed a subscript
8166 of `0' (e.g., `unbind "scalar[0]"'). This is new functionality that
8167 parallels the ${scalar[0]} expansion
8168
8169 builtins/set.def
8170 - unset_builtin: don't check whether a variable is an array if it's
8171 referenced using array syntax (scalar[0]); pass it to
8172 unbind_array_element anyway and check the result. This means that
8173 `unset scalar' and `unset scalar[0]' are equivalent
8174
8175 3/20
8176 ----
8177 builtins/set.def
8178 - set_builtin: make `-i' an invalid option, unconditionally for now.
8179 From a bug-bash discussion started by Peng Yu <pengyu.ut@gmail.com>
8180
8181 3/21
8182 ----
8183 lib/readline/colors.c
8184 - _rl_print_color_indicator: handle dangling symlinks (C_ORPHAN) and
8185 the `target' specifier for links (dereference S_ISLNK if the target
8186 exists). Bug report and fix from andreas@stapelspeicher.org
8187
8188 {arrayfunc,subst}.c
8189 - add code to save and restore this_command_name in places that set
8190 this_command_name to NULL to prevent error messages from arithmetic
8191 evaluation. Fixes bug reported by brian.carpenter@gmail.com
8192
8193 builtins/mapfile.def
8194 - do_chop: remove a new DELIM argument from the line, instead of
8195 unconditionally removing newline
8196 - mapfile: if -d delim is supplied and we are breaking fields at DELIM,
8197 remove DELIM if the -t option is supplied by passing DELIM to do_chop().
8198 Suggested by Geir Hauge <geir.hauge@gmail.com>
8199
8200 doc/{bash.1,bashref.texi}
8201 - mapfile: document new -t option behavior, defaults are the same
8202
8203 builtins/alias.def
8204 - print_alias: if the first character of an alias name is `-', add a
8205 `-- ' after `alias' to avoid option errors when trying to reuse the
8206 output. Bug report and fix on savannah from Pasha Bolokhov
8207 <pasha.bolokhov@gmail.com>
8208
8209 3/22
8210 ----
8211 builtins/declare.def
8212 - declare_internal: if creating a variable does not return a valid
8213 variable in VAR, check for null variable before dereferencing it.
8214 This happens with nameref variables referencing variables set to
8215 the empty string.
8216 Fixes bug reported by Arthur200000 <arthur200126@163.com>
8217
8218 3/23
8219 ----
8220 doc/{bash.1,bashref.texi}
8221 - INVOCATION: add language to make it clear that non-interactive login
8222 shells execute ~/.bash_logout if they run the `exit' builtin. From a
8223 question from Christoph Anton Mitterer <calestyo@scientia.net>
8224
8225 4/6
8226 ---
8227 subst.c
8228 - process_substitute: increment and decrement subshell_level around
8229 calls to parse_and_execute, as in command substitution, so
8230 $BASH_SUBSHELL gets new values in the subshell. Fixes inconsistency
8231 pointed out by Peng Yu <pengyu.ut@gmail.com>
8232
8233 doc/{bash.1,bashref.texi}
8234 - read: add clarifying text to note that the -N option does not split
8235 on $IFS, but does retain backslash as an escape character subject
8236 to -r. Report from isabella parakiss <izaberina@gmail.com>
8237
8238 builtins/declare.def
8239 - declare_internal: unless it's the last statement in a {...} block,
8240 NEXT_VARIABLE must be protected by braces. Bug introduced in patch
8241 from 3/22, reported by Eduardo A. Bustamante López
8242 <dualbus@gmail.com>
8243
8244 4/7
8245 ---
8246 parse.y
8247 - shell_getc: if bash is reading input from a string that ends with an
8248 unquoted backslash, add another backslash instead of a newline, since
8249 the backslash and newline will disappear in normal processing. Fixes
8250 bug with `bash -c 'eval \\; echo y' ' skipping the eval command and
8251 setting incorrect exit status, and `bash -ic 'eval \\; echo y' '
8252 seeing EOF on empty line and exiting before the echo. Keep track of
8253 backslash state with last_was_backslash; set in char reading loop.
8254 Fixes bug reported by Eduardo A. Bustamante López <dualbus@gmail.com>
8255
8256 4/8
8257 ---
8258 shell.c
8259 - main: check for $INSIDE_EMACS as well as $EMACS when deciding whether
8260 or not bash is being run in a GNU emacs shell window. Don't bother
8261 checking whether $TERM is unset because variable initialization sets
8262 it to `dumb' if unset. Fixes from Paul Eggert <eggert@CS.UCLA.EDU>
8263
8264 parse.y
8265 - push_token: new function, rotates current_token through last_read_token,
8266 saving old values like yylex() does, sets current_token to argument
8267
8268 evalfile.c
8269 - _evalfile: if current_token is yacc_EOF, push a newline as the value
8270 of current_token instead, using push_token(). yacc_EOF can result if
8271 sourced file doesn't end with a newline but does end with an unescaped
8272 backslash. Fixes bug reported by Pedro Gimeno
8273 <pgwr-842@personal.formauri.es>
8274
8275 lib/readline/histfile.c
8276 - use PARAMS(x) instead of __P(x). Bug reported by Evan Gates
8277 <evan.gates@gmail.com>
8278
8279 4/9
8280 ---
8281 execute_cmd.c
8282 - execute_simple_command: if we haven't already forked, and we have
8283 created FIFOs, turn off the no-fork optimization in the simple
8284 command's flags. Originally reported to savannah by Kuang-che Wu as
8285 https://savannah.gnu.org/support/index.php?108732
8286
8287 4/10
8288 ----
8289 trap.c
8290 - trap_if_untrapped: new function, sets a trap on a signal if that
8291 signal is not already trapped
8292 - maybe_set_debug_trap: new function, sets DEBUG trap to command string
8293 argument only if it's not already trapped
8294
8295 trap.h
8296 - maybe_set_debug_trap: new extern declaration
8297
8298
8299 builtins/source.def
8300 - source_builtin: if the -T option isn't set, use maybe_set_debug_trap
8301 in the unwind-protect instead of unconditionally restoring the old
8302 trap string. That means if the sourced file changes the DEBUG trap,
8303 that new trap will persist instead of being undone when the old
8304 value is restored. Fixes bug reported by Scott Bronson
8305 <bronson@rinspin.com>
8306
8307 builtins/evalstring.c
8308 - parse_string: before we jump to top_level, if we are at the `bottom'
8309 of the parse_and_execute stack (parse_and_execute_level == 0), call
8310 top_level_cleanup() before jumping so the right cleanup happens (e.g.,
8311 cleaning up redirections and other state). Fixes bug reported by
8312 Sam Liddicott <sam@liddicott.com>
8313
8314 4/15
8315 ----
8316 jobs.c
8317 - delete_job: only add J_ASYNC (and not J_FOREGROUND) jobs to the
8318 bgpids array, since Posix says shells only need to save the status
8319 of async jobs. Report and fix from John Fremlin <john@fb.com>
8320
8321 4/17
8322 ----
8323 pcomplib.c
8324 - COMPLETE_HASH_BUCKETS: increase to 256 since bash-completion is
8325 over 300 completions by now
8326
8327 variables.c
8328 - VARIABLES_HASH_BUCKETS: constant used to size shell variables hash
8329 table instead of relying on hash library default. Used in calls
8330 to hash_create in create_variable_tables(), push_temp_var(), and
8331 push_func_var(). Currently set to 1024 because why not? From a
8332 discussion starting at
8333 https://lists.gnu.org/archive/html/bug-bash/2015-04/msg00089.html
8334 - initialize_shell_variables: if FUNCTION_IMPORT is not defined, the
8335 nested conditional compilation causes syntax errors. Bug and fix
8336 from Eric Blake <eblake@redhat.com>
8337
8338 configure.ac
8339 - function-import: fix typo, assign to correct variable. Found as the
8340 result of a report by Eric Blake <eblake@redhat.com>
8341
8342 shell.c
8343 - open_shell_script: check whether or not file argument is a
8344 directory before opening; Posix says that implementations may open
8345 a directory with O_RDONLY. Bug report from
8346 Eduardo A. Bustamante López <dualbus@gmail.com>
8347
8348 4/19
8349 ----
8350 ulimit.def
8351 - fix typo in limits[] declaration of `k'
8352
8353 4/20
8354 ----
8355 configure.ac
8356 - add template definitions set by AC_USE_SYSTEM_EXTENSIONS from a report
8357 from Andreas Schwab <schwab@linux-m68k.org>
8358
8359 variables.c
8360 - FUNCTIONS_HASH_BUCKETS: constant used to size the hash tables used for
8361 shell functions and the text of shell function definitions. Initially
8362 set to 512, even though it's a really rare case that someone has more
8363 than around 150 functions, even with bash-completion
8364
8365 4/21
8366 ----
8367 shell.c
8368 - main: malloc_set_register: change arg to 0 to disable keeping track of
8369 allocations and frees in table; change to 1 for malloc debugging on
8370 demand. Table is too small to keep effective track of allocations on
8371 a modern system, need to use something like valgrind
8372
8373 4/22
8374 ----
8375 shell.c
8376 - main: move cmd_init() (initialize word desc and word list object
8377 caches) after startup files are read so the cache doesn't get filled
8378 up with semi-permanent storage for shell functions and variables
8379
8380 execute_cmd.c
8381 - execute_function: use maybe_set_debug_trap in the same way as source
8382 builtin change from 4/10 to allow functions to reset a DEBUG trap
8383 when set -T not in effect. From a report by Peng Yu
8384 <pengyu.ut@gmail.com>
8385
8386 4/23
8387 ----
8388 execute_cmd.c
8389 - execute_disk_command: don't overwrite value of subshell_environment
8390 by assigning SUBSHELL_FORK; just OR in SUBSHELL_FORK so something
8391 like SUBSHELL_ASYNC or SUBSHELL_PIPE is preserved
8392
8393 jobs.c
8394 - wait_for: don't call give_terminal_to if running in a subshell
8395 environment, not just if running_in_background is set; don't want
8396 shell functions waiting for a process to complete in a pipeline to
8397 give the terminal to the wrong process group. Part of fix for bug
8398 reported by Valentin Bajrami <valentin.bajrami@gmail.com>
8399 - make_child: child process should not try to give the terminal to the
8400 pipeline_pgrp if running as part of a pipeline (SUBSHELL_PIPE in
8401 subshell_environment); functions in execute_cmd.c don't set that
8402 flag until after make_child returns and the child process is running.
8403 Rest of fix for bug reported by Valentin Bajrami
8404 <valentin.bajrami@gmail.com>
8405
8406 4/24
8407 ----
8408 redir.c
8409 - redirection_error: if the redirection involves {varname}, only use
8410 `varname' in the error message if the error code is < 0 (one of the
8411 internal redirection errors, like ambiguous or bad variable name);
8412 otherwise the issue is probably with the filename and should be treated
8413 as usual. Fixes problem reported by Dr. David Alan Gilbert
8414 <dgilbert@redhat.com>
8415
8416 configure.ac,config.h.in
8417 - sys/ioctl.h: add check in AC_CHECK_HEADERS macro, define HAVE_SYS_IOCTL_H
8418
8419 lib/readline/{rltty,terminal}.c
8420 - sys/ioctl.h: include unconditionally for ioctl declaration, avoid
8421 issues with `implicit declaration' warnings. Issue originally
8422 raised on gdb list by Chen Gang <xili_gchen_5257@hotmail.com>
8423
8424 4/27
8425 ----
8426 lib/malloc/table.c
8427 - mem_table: now a circular buffer showing the state of the last
8428 REG_TABLE_SIZE allocations rather than a hash table that quickly
8429 fills up
8430
8431 builtins/declare.def
8432 - typeset_builtin: add -n to list of supported options. Omission
8433 reported by Valentin Bajrami <valentin.bajrami@gmail.com>
8434
8435 unwind_prot.c
8436 - use object caches instead of malloc/free to allocate and deallocate
8437 unwind-protect elements
8438 - uwp_init: initialize unwind-protect element object cache
8439
8440 unwind_prot.h
8441 - uwp_init: extern declaration
8442
8443 shell.c
8444 - main: call uwp_init right after calling cmd_init -- initialize all the
8445 object caches at the same place
8446
8447 lib/malloc/table.[ch]
8448 - mlocation_table: new table to keep track of allocation locations by
8449 file and line, functions to initialize table, record an allocation,
8450 and dump the table to stderr
8451 - mregister_alloc: call mlocation_register_alloc to record the location
8452 (source file/line) for each allocation to pinpoint malloc hot spots
8453 by number of calls. More detail than gprof
8454
8455 parse.y
8456 - set_line_mbstate: replace free/xmalloc pair with xrealloc call
8457 - read_token_word: call alloc_word_desc instead of xmalloc so we can take
8458 advantage of the WORD_DESC cache
8459
8460 4/28
8461 ----
8462 execute_cmd.c
8463 - execute_simple_command: if command execution fails because the command
8464 is a directory, and the `autocd' option is set, add a `--' argument
8465 to the constructed `cd' command to protect against command names with
8466 the same name as options to `cd'. Report and fix from
8467 isabella parakiss <izaberina@gmail.com>
8468
8469 4/30
8470 ----
8471 jobs.c
8472 - printable_job_status, j_strsignal: change calls to strcpy and sprintf
8473 that write to retcode_name_buffer to use strncpy and snprintf to
8474 avoid buffer overflows caused by malicious translations. Bug and fix
8475 from Trammell Hudson <Trammell.Hudson@twosigma.com>
8476
8477 5/1
8478 ---
8479 strtrans.c
8480 - ansicstr: make sure the buffer is at least 12 bytes to ensure enough
8481 space for any eventual call to u32cesc for one multibyte char
8482
8483 5/4
8484 ---
8485 jobs.c
8486 - wait_for: if an interactive shell is running a loop and waiting for
8487 a non-builtin command to exit, and the command exits due to SIGINT,
8488 act as if the shell received the SIGINT as well and break the loop.
8489 This matches the behavior when the shell is running a builtin command
8490 in a loop, and when running a non-builtin command outside a loop, and
8491 seems more broadly useful than running the trap handler over and over
8492 again. Report originally from Kaz Kylheku <kkylheku@gnu.org>
8493
8494 builtins/set.def
8495 - unset_builtin: use different variables for keeping the state of the
8496 -f and -v options than the loop uses to decide whether or not to
8497 treat a name as a function or a variable. Fixes problem with
8498 unset_function setting `sticking' after you unset a function when
8499 invoked with no options. Bug report from Dreamcat4
8500 <dreamcat4@gmail.com>
8501
8502 shell.c
8503 - open_shell_script: set running_shell_script to 1, set to 0 in every
8504 other case (new variable)
8505 - main: when checking whether or not to call start_debugger, test
8506 running_shell_script instead of dollar_vars[1]. The goal is to not
8507 invoke the debugger for interactive shells but allow it to run for
8508 things like `bash --debugger -i /tmp/script'. Problem reported by
8509 Rocky Bernstein <rocky@gnu.org>
8510
8511 lib/readline/histexpand.c
8512 - history_event_delimiter_chars: new (as yet undocumented) variable
8513 containing by default characters that can delimit a history event
8514 specifier without requiring a `:': "^$*%-" as the documentation has
8515 always said. Fixes bug reported by Anders Granlund
8516 <anders.granlund.0@gmail.com>
8517
8518 5/10
8519 ----
8520 lib/glob/gmisc.c
8521 - match_pattern_char, match_pattern_wchar: if passed an empty string,
8522 return a match if the first character of the pattern is `*'
8523
8524 subst.c
8525 - pat_subst: change to allow empty strings to be replaced as long as
8526 pattern matches empty string. Report and fix from isabella parakiss
8527 <izaberina@gmail.com>
8528
8529 5/12
8530 ----
8531 lib/sh/strtrans.c
8532 - ansic_wshouldquote: make behavior consistent in the event of an
8533 invalid multibyte sequence: return 1 to the caller so the string
8534 will be $'...' quoted
8535
8536 builtins/cd.def
8537 - cd_builtin: print the right error message even if printable_filename
8538 changes errno (e.g., EILSEQ)
8539
8540 lib/sh/shquote.c
8541 - sh_backslash_quote: in multibyte locales, even if is_basic does not
8542 return true, backslash-quote an ASCII character that backslash_table
8543 says should be quoted. Part of fix for bug reported by Igor
8544 Bogomazov <ygrex@ygrex.ru>
8545
8546 bashline.c
8547 - directory_exists: new function, dequotes the string argument, removes
8548 any trailing slash, and returns true if the result is a valid
8549 existing filename
8550 - bash_filename_stat_hook,bash_directory_completion_hook: use
8551 directory_exists instead of calling lstat/stat on the quoted
8552 directory name. Rest of fix for bug reported by Igor Bogomazov
8553 <ygrex@ygrex.ru>
8554
8555 5/15
8556 ----
8557 aclocal.m4
8558 - BASH_CHECK_MULTIBYTE: when checking for locale_charset, add $LIBINTL
8559 to $LIBS. If we're using the included lib/intl/libintl.a, it will
8560 include a version of locale_charset
8561
8562 5/17
8563 ----
8564 lib/readline/bind.c
8565 - sv_isrchterm: make sure we check for v[end] == 0 while in the loop
8566 looking for whitespace. Bug report and fix from Sergio Durigan
8567 Junior <sergiodj@sergiodj.net>
8568
8569 lib/sh/shmbchar.c
8570 - mbstrlen,mbsmbchar: move calculation of MB_CUR_MAX out of loop;
8571 calculate it once at beginning
8572
8573 lib/sh/mbscmp.c
8574 - mbscmp: move calculation of MB_CUR_MAX out of loop; calculate it once
8575 at beginning
8576
8577 lib/sh/mbscasecmp.c
8578 - mbscasecmp: move calculation of MB_CUR_MAX out of loop; calculate it
8579 once at beginning
8580
8581 lib/sh/shquote.c
8582 - sh_backslash_quote: move calculation of MB_CUR_MAX out of loop;
8583 calculate it once at beginning
8584
8585 lib/sh/casemod.c
8586 - sh_modcase: move calculation of MB_CUR_MAX out of loop; calculate it
8587 once at beginning
8588
8589 subst.c
8590 - expand_word_internal: move calculation of MB_CUR_MAX out of loops;
8591 calculate it once at beginning of function (XXX should use
8592 locale_mb_cur_max)
8593
8594 5/22
8595 ----
8596 lib/readline/rlmbutil.h
8597 - _rl_wcwidth: new function, short-circuits wcwidth calls for ASCII
8598 printable characters, returns 1 for those
8599 - WCWIDTH: call _rl_wcwidth instead of wcwidth
8600
8601 lib/readline/display.c
8602 - rl_redisplay: move calculation of MB_CUR_MAX out of loop; calculate
8603 it once at beginning. Report and patch from Ole Laursen
8604 <ole.laursen@gmail.com>
8605
8606 5/24
8607 ----
8608 lib/readline/text.c
8609 - rl_insert: change to attempt to batch-insert pending typeahead (not
8610 pushed input or input from a macro) that maps to rl_insert. An
8611 attempt to suppress redisplay until readline reads all typeahead --
8612 pasted input, for instance. Inspired by report from Ole Laursen
8613 <ole.laursen@gmail.com>. XXX - need to make this a bindable
8614 variable; already controlled by _rl_optimize_typeahead
8615
8616 lib/readline/rlprivate.h
8617 - _rl_optimize_typeahead: extern declaration
8618
8619 lib/readline/doc/{hstech.texi,history.3}
8620 - next_history: clarify under what circumstances the history offset is
8621 incremented; suggestion from Glenn Golden <gdg@zplane.com>
8622
8623 print_cmd.c
8624 - print_arith_command: should be compiled in if either DPAREN_ARITHMETIC
8625 or ARITH_FOR_COMMAND is defined. Report from Flavio Medeiros
8626 <flaviomotamederios@gmail.com>
8627
8628 flags.c
8629 - change_flag: new variable verbose_flag, set when `v' flag modified;
8630 sets value of echo_input_at_read correspondingly
8631
8632 flags.h
8633 - verbose_flag: new extern declaration
8634
8635 shell.c
8636 - long_options: --verbose now sets verbose_flag
8637 - main: set echo_input_at_read from verbose_flag after parsing any
8638 long options
8639
8640 builtins/fc.def
8641 - fc_builtin: don't unwind-protect echo_input_at_read directly; set it
8642 to 1 before calling fc_execute_file as before, and reset it to value
8643 of global verbose_flag using set_verbose_flag called from an
8644 unwind_protect. Report from isabella parakiss <izaberina@gmail.com>
8645
8646 builtins/shopt.def
8647 - shopt_set_debug_mode: new function, called when the extdebug shell
8648 option changes. Right now, it sets function_trace_mode when extdebug
8649 is enabled, and turns off when extdebug is disabled. The
8650 documentation has always said that shopt does this. Report from
8651 Peng Yu <pengyu.ut@gmail.com>
8652
8653 5/27
8654 ----
8655 findcmd.[ch]
8656 - add support for EXECIGNORE shell variable, list of extglob patterns
8657 that prevent matching filenames from being identified as executable
8658 files
8659
8660 variables.c
8661 - EXECIGNORE: arrange for findcmd.c:setup_exec_ignore to be called when
8662 $EXECIGNORE changes
8663
8664 variables.h
8665 - sv_execignore: extern declaration
8666
8667 doc/{bash.1,bashref.texi}
8668 - document EXECIGNORE variable
8669
8670 5/28
8671 ----
8672 lib/readline/callback.c
8673 - rl_callback_sigcleanup: new function, cleans up and unsets any state
8674 rl_callback_read_char uses. Intended to be used after a signal
8675
8676 lib/readline/signals.c
8677 - _rl_handle_signal: call rl_callback_sigcleanup on SIGINT. Fixes bug
8678 reported to python group by Martin Panter <vadmium+floss@gmail.com>
8679
8680 lib/readline/isearch.c
8681 - _rl_isearch_cleanup: now a public function so rl_callback_cleanup can
8682 call it
8683
8684 lib/readline/search.c
8685 - _rl_nsearch_cleanup: now a public function so rl_callback_cleanup can
8686 call it
8687
8688 lib/readline/rlprivate.h
8689 - _rl_[in]search_cleanup: extern declarations
8690
8691 lib/readline/readline.h
8692 - rl_callback_sigcleanup: new extern declaration
8693
8694 lib/readline/doc/rltech.texi
8695 - rl_callback_sigcleanup: documented
8696
8697 lib/readline/readline.h
8698 - bump readline version to 7.0 due to addition of rl_callback_sigcleanup
8699
8700 5/29
8701 ----
8702 builtins/declare.def
8703 - declare_internal: if we are trying to change attributes or value for
8704 a nameref variable whose value points to an unset variable, make
8705 sure we create a new variable whose name is the value of the nameref
8706 variable. That is,
8707
8708 declare -n foo=bar
8709 unset foo # unsets bar
8710 declare -i foo
8711
8712 should create a (invisible) variable named `bar' with the integer
8713 attribute. Fixes problem reported by Greg Wooledge
8714 <wooledg@eeg.ccf.org>
8715
8716 builtins/set.def
8717 - unset_builtin: if we find a nameref variable when we look it up with
8718 find_variable (the returned variable has a name different from what
8719 we looked up), make sure we use that new name for the rest of the
8720 function rather than rely on unbind_variable to do the same thing as
8721 find_variable. Fixes problem reported by Greg Wooledge
8722 <wooledg@eeg.ccf.org>
8723 - unset_builtin: if we try to unset a nameref variable whose value is
8724 not a set variable, make sure we don't try to unset the nameref
8725 itself, but rather the variable it points to. This ensures that the
8726 following always works as it should
8727
8728 declare -n foo=bar
8729 unset foo # unsets bar and leaves foo unchanged
8730
8731 lib/readline/funmap.c
8732 - vi-insertion-mode: make sure it maps to rl_vi_insert_mode, which is
8733 actually what the `i' keybinding in vi_movement_keymap maps to.
8734 Cosmetic fix from isabella parakiss <izaberina@gmail.com>
8735
8736 6/2
8737 ---
8738 general.c
8739 - conf_standard_path: moved get_standard_path here from command.def; made
8740 public function
8741
8742 general.h
8743 - conf_standard_path: extern declaration
8744
8745
8746 6/3
8747 ---
8748 parse.y
8749 - parse_matched_pair: make sure that command substitution constructs
8750 within ${...} expansions are parsed as such using parse_comsub, so
8751 the P_FIRSTCLOSE flag doesn't stop parsing if a right brace appears
8752 within the comsub. Report from Christos Zoulas <christos@zoulas.com>
8753
8754 findcmd.c
8755 - search_for_command: take two new flags for FLAGS arg: CMDSRCH_STDPATH,
8756 which means use the command -p path, and CMDSRCH_TEMPENV, currently
8757 unused. Existing flag value of 1 now CMDSRCH_HASH
8758 - search_for_command: don't set `path' to NULL if it wasn't found in
8759 the temporary environment; we can use it later
8760 - search_for_command: look for the hashed file if temp_path == 0, not
8761 if we set path back to 0 (or path lookup failed)
8762 - search_for_command: just call find_user_command_in_path with a
8763 pathlist argument that's set depending on the flags passed
8764 - find_in_path: new function, just calls find_user_command_in_path at
8765 this point
8766 - search_for_command: don't put non-existent files into the hash table
8767
8768 findcmd.h
8769 - CMDSRCH_*: new flags for search_for_command
8770 - find_in_path: extern declaration
8771
8772 execute_cmd.c
8773 - execute_disk_command: check for CMD_STDPATH and call search_for_command
8774 with CMDSRCH_STDPATH if it's set
8775
8776 builtins/command.def
8777 - command_builtin: if -p given without -v or -V, set the CMD_STDPATH
8778 flag in the simple command we construct from the rest of the
8779 argument list. This fixes the command -p cmd issue with changing
8780 $PATH for the duration of `cmd's execution reported by
8781 <sdowdy@rap.ucar.edu>
8782
8783 builtins/common.h
8784 - CDESC_STDPATH: new flag for describe_command; means to use standard
8785 path for command -pv or -pV
8786
8787 builtins/command.def
8788 - command_builtin: if -p given with -v or -V, pass the CDESC_STDPATH
8789 flag to describe_command
8790
8791 builtins/type.def
8792 - describe_command: if given the CDESC_STDPATH flag, use find_in_path
8793 with the conf_standard_path() result. Since `all' will never be on
8794 with this flag, at least not yet, we can allocate and free the path
8795 list. Fixes the bug of a temporary environment value for PATH
8796 preceding a `command -pv' or `command -pV' persisting when the
8797 command finishes and means we use fewer unwind-protects
8798
8799 6/4
8800 ---
8801 Makefile.in (plus other Makefile.ins)
8802 - VPATH: remove `.' from VPATH value. It's not needed any more and it
8803 trips a GNU make 4.1 bug on Cygwin. Report and fix from Eric Blake
8804 <eblake@redhat.com>
8805
8806 lib/readline/histfile.c
8807 - history_tempfile: new function, takes history file name as template
8808 and creates a temp file name including the PID
8809 - history_truncate_file, history_do_write: instead of creating backup
8810 and restoring it on failure, use history_tempfile to create a temp
8811 file name, write to it, then rename to original history filename
8812 (handling symlinks using history_restore()). Original report and
8813 patch from Russell Stuart <russell-savannah@stuart.id.au>
8814
8815 doc/{bash.1,bashref.texi}
8816 - ulimit: clarify that -c and -f are in increments of 512 bytes when
8817 in posix mode. Fix from Robin Johnson <robbat2@gentoo.org> via
8818 <vapier@gentoo.org>
8819
8820 6/9
8821 ---
8822 execute_cmd.c
8823 - execute_in_subshell: don't call restore_default_signal for the exit
8824 trap, reset_signal_handlers already does the right thing and keeps
8825 the trap string around; no need to kill trap string. Bug report
8826 from Miroslav Koskar <mk@mkoskar.com>
8827
8828 6/11
8829 ----
8830 nojobs.c
8831 - find_proc_slot: now takes pid as an argument to avoid finding old
8832 procs when pids wrap around
8833 - add_pid: pass pid to find_proc_slot to avoid multiple instances of
8834 the same pid in the list when pids wrap around. Fixes bug reported
8835 by Roy Keene <rkeene@rkeene.org>
8836
8837 execute_cmd.c
8838 - REAP: test for job_control == 0 also to determine whether or not
8839 to call reap_dead_jobs, since shells without job control enabled
8840 don't report on background process status
8841
8842 doc/bash.1,lib/readline/doc/hsuser.texi
8843 - history: clarify documentation of -a option to note that it will not
8844 append the same line to the history file more than once. Fixes
8845 problem reported by Reuben Thomas <rrt@sc3d.org>
8846
8847 6/12
8848 ----
8849 execute_cmd.c
8850 - execute_in_subshell: don't bother decrementing subshell_level before
8851 this returns; the caller will just exit. This means that
8852 $BASH_SUBSHELL will have consistent values in the subshell and any
8853 subsequent exit trap. Fixes bug reported by Miroslav Koskar
8854 <mk@mkoskar.com>
8855 - shell_execve: before longjmp to subshell_top_level, call reset_parser
8856 to free up any input line and stack of pushed strings
8857
8858 parse.y
8859 - mk_alexpansion: if the last character of the alias is a shell
8860 metacharacter, don't add a space to the string following the alias
8861 value, since that will change the meaning of the command. THIS IS
8862 NOT BACKWARDS COMPATIBLE AND MAY REQUIRE REVERTING. Inspired by an
8863 email message from Jilles Tjoelker <jilles@stack.nl> to austin
8864 group
8865
8866 6/13
8867 ----
8868 subst.c
8869 - dequote_string: don't turn strings consisting of a single CTLESC
8870 into empty strings; return them unmodified. The idea is that there
8871 is nothing to quote. This means that something like
8872 c=$'\001'
8873 x=$c
8874 results in x containing '\001' when IFS=$'\001'. See if this will
8875 cause problems by adding a debugging statement in the code
8876
8877 6/15
8878 ----
8879 parse.y
8880 - CHECK_FOR_RESERVED_WORD: don't return ESAC when you read `esac'
8881 after a `|' while in a case pattern list (parser_state & PST_CASEPAT).
8882 This is Posix grammar rule 4
8883 (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_10_02)
8884
8885 6/16
8886 ----
8887 jobs.c
8888 - wait_for: make sure we queue SIGCHLD signals if a SIGCHLD trap
8889 handler is running (signal_in_progress or IMPOSSIBLE_TRAP_HANDLER),
8890 since we allow recursive trap invocations now
8891 - wait_for: make sure we treat SIGCHLD as trapped if the trap handler
8892 is set to IMPOSSIBLE_TRAP_HANDLER so we don't miss signals during
8893 calls to run_sigchld_trap()
8894
8895 trap.c
8896 - run_pending_traps: since we allow recursive trap handler invocations,
8897 make sure we set pending_traps[SIGCHLD] to 0 while we mark the
8898 signal handler in progress (SIG_INPROGRESS) and don't reset it to 0
8899 after run_sigchld_trap returns in case more SIGCHLDs have been
8900 queued while it's running
8901
8902 6/22
8903 ----
8904 lib/readline/readline.c
8905 - _rl_dispatch_subseq: if we shadowed any function, not just self-
8906 insert, bind that function to the key we shadowed and dispatch on it.
8907 This preserves and dispatches off the original key, not ANYOTHERKEY,
8908 and makes sure we are dispatching from a keymap with the right key
8909 binding. Fixes bug reported by Carlos Pita
8910 <carlosjosepita@gmail.com>
8911
8912 6/23
8913 ----
8914 bashline.c
8915 - attempt_shell_completion: don't read past the end of rl_line_buffer
8916 while skipping assignment statements before command names. Fix for
8917 bug reported by Hanno Böck <hanno@hboeck.de>
8918
8919 lib/readline/parens.c
8920 - _rl_enable_paren_matching: make paren matching work in vi insert
8921 mode. Really, this time. Bug report from Carlos Pita
8922 <carlosjosepita@gmail.com>
8923
8924 6/29
8925 ----
8926 parse.y
8927 - parse_comsub: when starting to parse a word, make sure that we set
8928 lex_rwlen to 0 along with lex_wlen if we are in a position where we
8929 can read a reserved word. Fixes bug reported by Nathan Neulinger
8930 <nneul@neulinger.org>
8931
8932 6/30
8933 ----
8934 sig.h
8935 - include <signal.h> unconditionally and rely on guards in sig.h to
8936 keep from including it more than once. Irix 6.5 defines SIG_DFL
8937 in other files and defeats the test of SIG_DFL. Fixes bug
8938 reported by Klaus Ziegler <klausz@haus-gisela.de>
8939
8940 alias.c
8941 - ALIAS_HASH_BUCKETS: table size increased to 64
8942
8943 7/7
8944 ---
8945
8946 {jobs,nojobs}.c
8947 - wait_sigint_cleanup: new function, to be called by longjmp targets
8948 for wait_intr_buf. Performs any necessary cleanup of internal waitchld
8949 state before going back to top level
8950
8951 jobs.h
8952 - wait_sigint_cleanup: new extern declaration
8953
8954 builtins/wait.def
8955 - wait_builtin: call wait_sigint_cleanup after longjmp back to
8956 wait_intr_buf on interrupt
8957
8958 [bash-4.4-alpha frozen]
8959
8960 7/7
8961 ---
8962 bashline.c
8963 - attempt_shell_completion: when skipping assignment statements, don't
8964 skip past rl_point to find the word on which to perform programmable
8965 completion. Fixes bug reported by Hanno Böck <hanno@hboeck.de>
8966
8967 7/10
8968 ----
8969
8970 pcomplib.c
8971 - compspec_copy: set the refcount on the copy to 1, since it's a freshly
8972 allocated copy and there are no other pointers to it. Fixes memory
8973 leak from gen_progcomp_completions
8974
8975 lib/readline/complete.c
8976 - printable_part: if the pathname passed is just `/', just return it
8977 instead of potentially reading before the `/'. Fixes bug reported
8978 by Hanno Böck <hanno@hboeck.de>
8979
8980 7/11
8981 ----
8982 support/man2html.c
8983 - change calls to malloc to use xmalloc; provide standard xmalloc
8984 definition. Report from Bill Parker <wp02855@gmail.com>
8985
8986 builtins/wait.def
8987 - wait_intr_flag: set to denote validity of wait_intr_buf as target
8988 for longjmp; reset by WAIT_RETURN macro; should always be 0 when
8989 wait_builtin returns
8990
8991 quit.h
8992 - CHECK_WAIT_INTR: now also checks wait_intr_flag to ensure valid state
8993 of wait_intr_buf before sh_longjmp
8994
8995 {jobs,nojobs}.c
8996 - wait_intr_flag: extern declaration for use by CHECK_WAIT_INTR
8997
8998 sig.c
8999 - wait_intr_flag: set back to 0 every place the shell resets state after
9000 a jump to top_level
9001 - sigint_sighandler: only set wait_signal_received if wait_intr_flag
9002 indicates that the wait builtin has correctly set wait_intr_buf.
9003 Final fix for bug reported by Ondrej Oprala <ooprala@redhat.com>
9004
9005 subst.c
9006 - parameter_brace_expand: fix so that ${!vvv@} is not interpreted as
9007 introducing a `@' operator, but instead retains its meaning as all
9008 variables whose name begins with vvv. Fixes bug reported by
9009 konsolebox <konsolebox@gmail.com>
9010
9011 7/14
9012 ----
9013 execute_cmd.c
9014 - execute_connection: remove the fork optimization from and AND_AND
9015 and OR_OR cases; it has trouble with `a && b && c', since the `&&'
9016 is left-associative. Putting that code here can result in unwanted
9017 fork optimizations since the `b' will end up as `second' on a
9018 recursive call to execute_command. Bug reported by Mike Frysinger
9019 <vapier@gentoo.org>
9020
9021 builtins/evalstring.c
9022 - optimize_fork: moved code from execute_connection to here; checks
9023 whether the RHS of a && or || passes the suppress_fork() tests and
9024 turns on the NO_FORK bit if so
9025 - parse_and_execute: if suppress_fork() tests fail, check whether the
9026 command to be executed is a connection and attempt to optimize the
9027 fork for the right side using optimize_fork(). The key is dealing
9028 with the entire command passed to `bash -c' or `eval'
9029
9030 builtins/common.h
9031 - optimize_fork: new extern declaration
9032
9033 execute_cmd.c
9034 - execute_command_internal: enable code put in to undo redirections
9035 before exiting the shell due to `set -e' in the case of a shell
9036 function that gets command-not-found or a syntax error. Reported
9037 back in May, 2014 by Mark Ferrell <major@homeonderanged.org>
9038
9039 bashhist.c
9040 - bash_history_inhibit_expansion: enable change from 1/10 that skips
9041 over history expansion character in command and process
9042 substitution
9043
9044 7/15
9045 ----
9046 lib/readline/{history,undo}.c
9047 - replace_history_data now _hs_replace_history_data
9048
9049 7/16
9050 ----
9051 lib/readline/readline.c
9052 - make sure _rl_to_lower doesn't ever get characters that are outside
9053 of its valid range by casting arg to unsigned char
9054
9055 lib/readline/colors.h
9056 - change completion prefix color (C_PREFIX) to be the same as C_SOCK,
9057 which is less likely to collide with file type colorings (magenta)
9058
9059 lib/readline/complete.c
9060 - fnprint: now takes an additional argument: the full, expanded pathname
9061 corresponding to the `toprint' argument
9062 - fnprint: don't zero out prefix_bytes if we're not printing the
9063 ellipisis but we still want to use prefix_bytes for displaying
9064 the common prefix in a color
9065 - print_filename: move colored-stats display responsibility into fnprint
9066 - fnprint: change so colored-prefix and colored-stats can cooperate
9067 and display filenames with multiple colors: one for the prefix and
9068 one for the file type. The prefix is displayed in the prefix color
9069 and the remainder of the pathname, if any, is displayed in the color
9070 corresponding to the file type. Report and suggestion from Mike
9071 Frysinger <vapier@gentoo.org>
9072
9073 7/17
9074 ----
9075 lib/readline/readline.[ch]
9076 - rl_readline_state: now unsigned long, prepare for more than 32 states
9077
9078
9079 7/18
9080 ----
9081 lib/readline/history.h
9082 - history_offset: now declared here, was always a global variable
9083 - copy_history_entry: now declared here, part of the public interface
9084 - alloc_history_entry: now declared here, part of the public interface
9085
9086 7/20
9087 ----
9088 lib/readline/readline.h
9089 - RL_STATE_CHARSEARCH: new state, for vi mode character search. Was
9090 previously handled by simply setting _rl_callback_func
9091
9092 lib/readline/vi_mode.c
9093 - rl_domove_motion_callback: split into two functions, remaining code
9094 after _rl_dispatch call goes into new function
9095 _rl_vi_domove_motion_cleanup
9096 - rl_vi_char_search: set RL_STATE_CHARSEARCH
9097 - rl_vi_char_search: sets `i2' member of callback data to the key used
9098 to invoke the char search
9099 - _rl_vi_callback_char_search: unset RL_STATE_CHARSEARCH after reading
9100 the character to find
9101 - _rl_vi_domove_motion_cleanup: make sure RL_STATE_VIMOTION is unset in
9102 all cases where this function returns
9103 - _rl_vi_domove_motion_cleanup: use `end' member of vi motion context
9104 as value of rl_end to restore after adding blank at end of line in
9105 rl_domove_motion_callback; avoids need to keep `old_end' and somehow
9106 pass it between the two functions
9107
9108 lib/readline/rlprivate.h
9109 - _rl_vi_domove_motion_cleanup: new extern declaration
9110
9111 lib/readline/callback.c
9112 - rl_callback_read_char: handle RL_STATE_CHARSEARCH, including case
9113 where char search is vi motion command for d/c/y/m and RL_STATE_VIMOTION
9114 is set when this is called. Last of set of fixes for bug reported
9115 by Carlos Pita <carlosjosepita@gmail.com> with vi-mode `dty' command
9116 in callback mode
9117
9118 7/21
9119 ----
9120 subst.c
9121 - command_substitute, process_substitute: add QUIT call in the child
9122 after restoring original signal handlers to catch post-fork SIGINT
9123 or terminating signal
9124
9125 jobs.c,nojobs.c
9126 - make_child: after forking, clear interrupt_state in child
9127 before restoring signal mask so children get their own set of
9128 interrupts
9129
9130 7/22
9131 ----
9132 lib/sh/shquote.c
9133 - sh_double_quote: since all uses of the return value from this function
9134 are for display and not subject to subsequent expansion, we don't
9135 need to protect CTLESC and CTLNUL with CTLESC. Bug report and fix
9136 from isabella parakiss <izaberina@gmail.com>
9137
9138 parse.y
9139 - decode_prompt_string: need to protect literal instances of CTLESC
9140 and CTLNUL with CTLESC, even if they are not coming out of one of
9141 the backslash-expansions
9142
9143 subst.c
9144 - make_internal_declare: fixed memory leak; make_internal_declare should
9145 free the memory it allocates to construct the word list. From Red
9146 Hat bug 1245233; https://bugzilla.redhat.com/show_bug.cgi?id=1245233
9147
9148 lib/readline/readline.c
9149 - _rl_dispatch_subseq: when checking whether an ESC in vi insert mode
9150 should be treated as part of a key sequence or as a single char,
9151 make sure we are getting input from the keyboard before we check
9152 _rl_input_queued(). If we are getting input from a macro, this
9153 causes a needless delay. Report from Carlos Pita
9154 <carlosjosepita@gmail.com>
9155
9156 7/23
9157 ----
9158 input.c
9159 - save_bash_input: before checking to see whether or not a new fd has a
9160 stale associated buffer, make sure that the new fd is within bounds.
9161 Bug report and fix from Alexey Makhalov <makhaloff@gmail.com>
9162
9163
9164 7/24
9165 ----
9166 doc/{bash.1,bashref.texi}
9167 - note that the `return' builtin accepts arguments beginning with `-'
9168 without requiring `--'
9169
9170 7/27
9171 ----
9172 examples/loadables/Makefile.in
9173 - add variables and targets to support `make install'; installs
9174 supported builtins in $(libdir)/bash
9175
9176 7/28
9177 ----
9178 lib/readline/{readline,rlprivate}.h, lib/readline/display.c
9179 - rearrange some structure members for better alignment and to reduce
9180 padding. Fix from <git-dpa@aegee.org>
9181
9182 tests/run-*
9183 - use BASH_TSTOUT instead of hardcoded /tmp/xx as output file
9184
9185 trap.[ch]
9186 - maybe_set_error_trap: set a trap for the ERR trap if it is not already
9187 trapped; similar to maybe_set_debug_trap back from 4/10
9188
9189 lib/malloc/malloc.c
9190 - internal_free: make sure `ubytes' is initialized if MALLOC_WATCH is
9191 defined and we'll be passing it to _malloc_ckwatch. Report from
9192 Flavio Medeiros <flaviomotamederios@gmail.com>
9193
9194 execute_cmd.c
9195 - execute_function: use maybe_set_error_trap in the same way as
9196 maybe_set_debug_trap. Fixes bug reported by David Waddell
9197 <David.Waddell@owmobility.com>
9198
9199 7/29
9200 ----
9201 jobs.c
9202 - wait_for: no longer need to call job_signal_status when checking
9203 whether a comsub shell reaped a child that died due to SIGINT; code
9204 now uses child_caught_sigint
9205
9206 7/30
9207 ----
9208 builtins/exec.def
9209 - exec_builtin: after call to restore_original_signals, need to call
9210 default_tty_job_signals to undo changes done by initialize_job_signals.
9211 Fix for problem reported by Andreas Schwab <schwab@suse.de>
9212
9213 doc/{bash.1,bashref.texi}
9214 - clarify definition of metacharacter to explicitly include newline;
9215 prompted by report from George Gallo <georgeggallo@gmail.com>
9216
9217 8/3
9218 ---
9219 lib/readline/search.c
9220 - _rl_free_history_entry: should be void, not int. Report from
9221 Dilyan Palauzov <dilyan.palauzov@aegee.org>
9222
9223 general.h
9224 - sh_load_func_t, sh_unload_func_t: new function pointer types, used by
9225 enable for load and unload hook functions
9226
9227 builtins/enable.def
9228 - dyn_load_builtin: attempt to execute a function named
9229 BUILTIN_builtin_load, where BUILTIN is the name of the command being
9230 loaded. If that function returns 0, the load fails
9231 - dyn_unload_builtin: attempt to execute a function named
9232 BUILTIN_builtin_unload, where BUILTIN is the name of the command
9233 being unloaded. It offers a dynamic builtin a way to clean up after
9234 itself. Inspired by suggestion from Piotr Grzybowski
9235 <narsil.pl@gmail.com> in response to a bug report from isabella
9236 parakiss <izaberina@gmail.com>
9237
9238 8/6
9239 ---
9240 lib/readline/colors.[ch]
9241 - _rl_print_color_indicator: now takes `const char *' argument
9242
9243 lib/readline/complete.c
9244 - colored_stat_start: now takes `const char *' argument
9245
9246 lib/malloc/table.h
9247 - ma_table_t: `file' member is now `const char *'
9248
9249 lib/malloc/table.c
9250 - mlocation_register_alloc: make sure variable assigned to `file' in
9251 ma_table_t is of type `const char *'. Fixes from Dilyan Palauzov
9252 <dilyan.palauzov@aegee.org>
9253
9254 lib/termcap/termcap.[ch]
9255 - tputs: should return int instead of void
9256
9257 lib/readline/readline.h
9258 - RL_STATE_DONE: correct value, avoid collision
9259
9260 lib/readline/vi_mode.c
9261 - _rl_vi_redoing: now global, added _rl_ prefix to `vi_redoing'
9262
9263 lib/readline/readline.c
9264 - _rl_subseq_result: call _rl_dispatch_subseq instead of rl_dispatch to
9265 avoid changing _rl_dispatching_keymap
9266 - _rl_subseq_result: in the -2 case, set _rl_dispatching_keymap to the
9267 map passed as an argument. Without this, vi mode doesn't call
9268 rl_vi_set_last when it should
9269 - _rl_dispatch_subseq: if redoing a vi mode command with `.'
9270 (_rl_vi_redoing != 0) in callback mode and we're indirecting into
9271 another keymap that has shadowed the key corresponding to the command
9272 we are redoing, just call _rl_subseq_result immediately: vi redo
9273 doesn't need to read any additional input, and rl_vi_redo assumes
9274 that a single call to rl_dispatch is sufficient. Fixes bug reported
9275 by Carlos Pita <carlosjosepita@gmail.com>
9276
9277 8/7
9278 ---
9279 subst.c
9280 - parameter_brace_expand: if a substitution (parameter expansion) error
9281 occurs, and shell_compatibility_level is <= 43, return expansion error
9282 as in all previous versions. If shell_compatibility_level is > 43,
9283 a posix-mode non-interactive shell will consider this a fatal error.
9284 Problem reported by Christian Neukirchen <chneukirchen@gmail.com>
9285
9286 doc/bashref.texi
9287 - documented that word expansion errors cause fatal errors in posix mode
9288 non-interactive shells
9289
9290 8/8
9291 ---
9292 subst.h
9293 - SD_COMPLETE: skip_to_delim being called as part of word completion
9294 - SX_COMPLETE: one of the string_extract functions being called as
9295 part of word completion
9296
9297 bashline.c
9298 - find_cmd_start,find_cmd_end,find_cmd_name: call skip_to_delim with
9299 SD_COMPLETE flag
9300
9301 subst.c
9302 - skip_double_quoted: takes new flags argument; changed callers
9303 - skip_double_quoted: if flags argument includes SX_COMPLETE, pass it
9304 to extract_command_subst
9305 - extract_command_subst: if flags&SX_COMPLETE, call
9306 extract_delimited_string instead of xparse_dolparen, since completion
9307 may call this for unterminated command substitutions. Fixes
9308 (imperfectly) bug reported by Ingo Ruhnke <grumbel@gmail.com>
9309 - skip_to_delim: if passed the SD_COMPLETE flag, pass the SX_COMPLETE
9310 flag to skip_double_quoted
9311 - char_is_quoted: pass SX_COMPLETE flag to skip_double_quoted
9312 - unclosed_pair: pass SX_COMPLETE flag to skip_double_quoted
9313
9314 8/9
9315 ---
9316 execute_cmd.c
9317 - time_command: catch longjmps to top_level and print command timing
9318 statistics even after a jump to top_level. Fixes issue reported by
9319 Sam Watkins <sam@nipl.net>
9320
9321 8/10
9322 ----
9323 config-top.h
9324 - OPENLOG_OPTS: if SYSLOG_HISTORY is defined, define to LOG_PID, so
9325 each message is tagged with the pid
9326
9327 bashhist.h
9328 - bash_syslog_history: the first time it's called, call openlog with
9329 OPENLOG_OPTS and SYSLOG_FACILITY
9330
9331 8/11
9332 ----
9333 doc/{bash.1,bashref.texi}
9334 - GROUPS,FUNCNAME: change description to note that assignments are
9335 silently ignored, but do not return an error (which would constitute
9336 an assignment error and cause posix mode shells to abort). Problem
9337 pointed out by Grzegorz Bajson <gbajson@gmail.com>
9338
9339 8/12
9340 ----
9341 subst.c
9342 - parameter_brace_expand_indir: if the value of the indirectly expanded
9343 variable isn't something that the shell would expand if it were inside
9344 ${}, error out right away before calling parameter_brace_expand_word.
9345 Fixes problem reported by isabella parakiss <izaberina@gmail.com>
9346 - parameter_brace_expand: handle returning &expand_wdesc_error or
9347 &expand_wdesc_fatal from parameter_brace_expand_indir in case it does
9348 that someday
9349
9350 8/13
9351 ----
9352 jobs.c
9353 - {save,restore}_pipeline: saved_pipeline now a linked list of pipelines,
9354 new ones allocated in save_pipeline and freed in restore_pipeline.
9355 This allow multiple nested calls to save_pipeline (e.g., in traps
9356 and then in process substitution). Fix for bug reported by isabella
9357 parakiss <izaberina@gmail.com>
9358
9359 print_cmd.c
9360 - named_function_string: if printing a function with the same name as a
9361 reserved word, add the `function ' keyword before the name to avoid
9362 parsing problems when trying to reuse it as input. Fix for bug
9363 reported by isabella parakiss <izaberina@gmail.com>
9364
9365 8/14
9366 ----
9367 lib/readline/text.c
9368 - rl_insert: when optimizing typeahead, make sure we set rl_last_func
9369 ourselves if we set pending input, since the mainline code path
9370 won't set rl_last_func if input is pending. Fixes bug reported by
9371 Hiroo Hayashi <hiroo.hayashi@computer.org>
9372
9373 8/15
9374 ----
9375 builtins/type.def
9376 - describe_command: if using the short description (CDESC_SHORTDESC) in
9377 posix mode, describe posix special builtins as such. Requested by
9378 Stephane Chazelas <stephane.chazelas@gmail.com>
9379
9380 builtins/enable.def
9381 - BASH_LOADABLES_PATH: a colon-separated list of directories where bash
9382 looks for loadable builtins specified as arguments to `enable -f'
9383
9384 doc/{bash.1,bashref.texi}
9385 - BASH_LOADABLES_PATH: document new shell variable
9386
9387 configure.ac,Makefile.in,builtins/Makefile.in
9388 - loadablesdir: set in configure, substitute into Makefiles. Reserved
9389 for future use
9390
9391 8/18
9392 ----
9393 subst.c
9394 - shell_expand_word_list: if make_internal_declare fails, make sure to
9395 propagate that error return back and make the assignment statement
9396 fail. Fixes seg fault reported by Sergey Tselikh <stselikh@gmail.com>
9397
9398 8/20
9399 ----
9400 builtins/declare.def
9401 - declare_internal: made a slight tweak to the warning message about
9402 quoted compound assignments by printing it only if the array (indexed
9403 or assoc) does not already exist
9404
9405 8/21
9406 ----
9407 braces.c
9408 - mkseq: call strvec_dispose before throw_to_top_level if we saw SIGINT
9409 to avoid a memory leak
9410
9411 trap.c
9412 - maybe_set_return_trap: set the RETURN trap to string if it's not
9413 already trapped, in the same way as the debug and error traps
9414
9415 execute_cmd.c
9416 - execute_function: use maybe_set_return_trap to allow functions to set
9417 return traps that persist across calls even if function tracing is
9418 enabled
9419
9420 lib/readline/input.c
9421 - rl_gather_tyi: make sure errno reset to 0 after select call, for
9422 ioctl and read
9423 - rl_gather_tyi: if read returns -1/EIO, return -1
9424 - rl_read_key: if rl_gather_tyi returns -1/EIO, return READERR if in
9425 RL_STATE_READCMD (reading command in readline_internal_char), EOF
9426 if not (like rl_getc). Continue to return '\n' on other errors;
9427 rl_done = 1 in any case. Fix for issue reported by
9428 Lubomir Rintel <lkundrak@v3.sk>
9429
9430 lib/readline/{misc,text,vi_mode}.c
9431 - fix return values from rl_read_key to handle < 0
9432
9433 8/22
9434 ----
9435
9436 parse.y
9437 - parsing_redirection: macro that expands to true if the last read
9438 token (always passed as an argument) is a redirection token that
9439 will leave us reading a word that's the target of the redirection
9440 - command_token_position: make sure that even if the parser state
9441 indicates we are reading a simple command (PST_REDIRLIST), we do
9442 not perform alias expansion on a WORD that is part of a redirection,
9443 using parsing_redirection() to do so. Fixes but reported to Red Hat
9444 by Robert Alm Nilsson <rorialni@gmail.com>
9445 https://bugzilla.redhat.com/show_bug.cgi?id=795795
9446
9447 builtins/declare.def
9448 - declare_internal: only print the warning now if the variable is not
9449 already an array or if we are not creating an array with -a or -A,
9450 cuts down the spurious warnings
9451 - declare_internal: even if the rhs of the assignment looks like a
9452 compound array, if we're not assigning to an existing array or we're
9453 not creating an array, make it an array subscript assignment. This
9454 means things like declare a[1]='(foo)' and a[1]='(foo)' behave
9455 identically
9456
9457 builtins/help.def
9458 - wdispcolumn: change use of displen and add new dispchars variable to
9459 deal with locales where each wide character does not take up one
9460 column position. Fix for bug reported by Mingye (Arthur) Wang
9461 <arthur200126@hotmail.com>
9462
9463 8/23
9464 ----
9465 sig.c
9466 - sigint_sighandler: if we get a SIGINT while this_shell_builtin ==
9467 wait_builtin, perform the special handling only if wait_intr_flag
9468 is non-zero, don't just use it to set wait_sigint_received. This
9469 makes sure we run bashline_set_event_hook. Fixes bug reported by
9470 isabella parakiss <izaberina@gmail.com>
9471
9472 8/25
9473 ----
9474 subst.h
9475 - SD_HISTEXP: new flag for skip_to_delim, indicates we are looking for
9476 the history expansion character (special double quote handling)
9477 - skip_to_delim: handle SD_HISTEXP flag, changes double quote handling
9478 to be similar to history library: don't call skip_double_quote, make
9479 sure single quotes aren't special in double quotes, but continue to
9480 skip over $(), ${}, and other similar constructs
9481
9482 8/27
9483 ----
9484 support/bash.pc.in
9485 - new file, pkgconfig template for bash, installed to support nascent
9486 loadable builtins dev environment
9487
9488 examples/loadables/Makefile.inc
9489 - new file, example Makefile with correct definitions for loadable
9490 builtin development
9491
9492 configure.ac
9493 - headersdir: directory where headers get installed to support loadable
9494 builtin development
9495 - examples/loadables/Makefile.inc, support/bash.pc: create
9496
9497 Makefile.in
9498 - INSTALLED_HEADERS, INSTALLED_BUILTINS_HEADERS, INSTALLED_INCFILES,
9499 CREATED_HEADERS: new variables holding names of include files to
9500 install into $(headersdir) for loadable builtin development
9501 - install-headers,install-headers-dirs: new targets to support
9502 installing headers into $(headersdir) and subdirectories for loadable
9503 builtin development
9504 - uninstall-headers: target to uninistall headers in $(headersdir)
9505 - uninstall: call uninstall-headers whether or not install-headers
9506 was done; add uninstall in examples/loadables
9507 - install: add install in examples/loadables
9508 - clean: add clean in examples/loadables
9509
9510 examples/loadables/Makefile.in
9511 - install-supported, install-unsupported: new targets, make install
9512 chooses one based on $(SHOBJ_STATUS)
9513 - install-supported: now cds to the top level build directory and
9514 installs the header files
9515 - install-supported: now installs Makefile.inc to $(loadablesdir) as
9516 an example
9517 - uninstall-supported,uninistall-unsupported: uninstall targets,
9518 make uninstall chooses one based on $(SHOBJ_STATUS)
9519
9520 8/31
9521 ----
9522 lib/glob/Makefile.in
9523 - CPPFLAGS: move after ${INCLUDES} so library-specific include paths
9524 take precedence. This is what the other parts of the shell do.
9525 Report from Poor Yorick <org.gnu.lists.bug-bash@pooryorick.com>
9526
9527 builtins/read.def
9528 - reset_alarm: cancel alarm before restoring signal handler to avoid
9529 possible race condition. Report and fix from Oleg Popov
9530 <dev-random@mail.ru>
9531
9532 subst.c
9533 - string_extract_verbatim: if SEPARATORS is "'", don't short-circuit
9534 to string_extract_single_quoted unless the SX_NOCTLESC flag is set.
9535 Callers expect this function to honor CTLESC, even to quote a single
9536 quote. Fixes bug reported by isabella parakiss <izaberina@gmail.com>
9537 and several others
9538
9539 9/2
9540 ---
9541 include/chartypes.h
9542 - TOCTRL: handle '?' by special-casing it to 0x7f. Fixes a problem
9543 with $'\c?' reported by Helmut Karlowski <helmut.karlowski@ish.de>
9544
9545 redir.c
9546 - write_here_string: don't word-split the here string document. The
9547 bash documentation has always said this doesn't happen, even though
9548 bash has done so for years, and other shells that implement here-
9549 strings don't perform any word splitting. The practical effect is
9550 that sequences of IFS characters are collapsed to spaces. Fixes
9551 bug reported by Clint Hepner <clint.hepner@gmail.com>
9552
9553 9/3
9554 ---
9555 doc/{bash.1,bashref.texi}
9556 - add \? to the list of backslash escapes expanded by $'...' ANSI-C
9557 quoting. It was expanded but not documented
9558
9559 lib/readline/util.c
9560 - _rl_audit_tty: updated from Red Hat patch
9561
9562 lib/readline/readline.c
9563 - HAVE_DECL_AUDIT_USER_TTY: correct #define check
9564
9565 9/13
9566 ----
9567 shell.c
9568 - read_from_stdin: make sure value set to 1 appropriately if the shell
9569 is reading from standard input, as Posix seems to specify (?)
9570
9571 lib/readline/kill.c
9572 - _rl_copy_to_kill_ring: don't assume that rl_kill_ring has been
9573 allocated if _rl_last_command_was_kill is non-zero; make sure it's
9574 non-null before indexing into it
9575
9576 9/15
9577 ----
9578 variables.c
9579 - initialize_shell_variables: cope with a NULL env pointer. Fixes bug
9580 reported by ziyunfei <446240525@qq.com>
9581
9582 9/16
9583 ----
9584 builtins/exec.def
9585 - exec_builtin: if -c is supplied, pass an empty array instead of a NULL
9586 pointer to shell_execve
9587
9588 variables.c
9589 - set_pwd: only believe $PWD if it begins with a slash; try to
9590 canonicalize it and set it to physical path if canonicalization fails.
9591 Reported by ziyunfei <446240525@qq.com>
9592
9593 9/17
9594 ----
9595 subst.c
9596 - do_compound_assignment: make sure to dispose of word list generated
9597 by expand_compound_array_assignment; fixes memory leak reported in
9598 https://bugzilla.redhat.com/show_bug.cgi?id=1264101
9599
9600 variables.c
9601 - adjust_shell_level: clamp the value of shell_level at 1000 and reset
9602 there, instead of > 1000, since the itos replacement code doesn't
9603 handle the value 1000. Fixes bug reported by ziyunfei
9604 <446240525@qq.com>
9605
9606 shell.h,parse.y
9607 - save_parser_state,restore_parser_state: now save and restore
9608 redir_stack, short-circuiting if need_here_doc == 0. If we save a
9609 non-zero value for need_here_doc, we have to make sure there is
9610 something valid for gather_here_documents to work on. Fixes bug
9611 reported by Brian Carpenter <brian.carpenter@gmail.com>
9612
9613 9/18
9614 ----
9615 array.c
9616 - array_to_assign: use ansic_shouldquote to check whether each element
9617 value contains non-printable characters and use ansic_quote to
9618 generate the value instead of using sh_double_quote unconditionally
9619
9620 assoc.c
9621 - assoc_to_assign: if either the key or the value of an associative
9622 array element contains non-printable characters (ansic_shouldquote
9623 returns true), use ansic_quote to quote them instead of using double
9624 quotes unconditionally
9625
9626 9/19
9627 ----
9628 subst.c
9629 - pat_subst: handle REP being NULL. Fixes bug reported by Brian
9630 Carpenter <brian.carpenter@gmail.com>
9631
9632 builtins/evalstring.c
9633 - parse_string: if we get a longjmp to top_level with DISCARD as the
9634 code (in which case we are going to go on), return -DISCARD to our
9635 caller (always xparse_dolparen) after doing our own cleanup instead
9636 of calling jump_to_top_level
9637
9638 parse.y
9639 - xparse_dolparen: if parse_string returns < 0, do the appropriate
9640 cleanup and then jump_to_top_level with the negative of the return
9641 value. This allows us to do the appropriate parser cleanup in
9642 case we're not going to exit the shell. Fixes bug reported by Brian
9643 Carpenter <brian.carpenter@gmail.com>
9644
9645 subst.c
9646 - extract_delimited_string: if a recursive call to one of the extract_
9647 functions or a call to ADVANCE_CHAR leaves i past the end of the
9648 string, cut the loop off at the end of the string. Fixes bug
9649 reported by Brian Carpenter <brian.carpenter@gmail.com>
9650
9651 9/20
9652 ----
9653 subst.c
9654 - get_var_and_type: return appropriate values if variable indirection
9655 results in a NULL variable. Fixes bug reported by Brian Carpenter
9656 <brian.carpenter@gmail.com>
9657
9658 lib/readline/history.c
9659 - history_get_time: handle strtol overflows caused by malicious
9660 modifications to timestamps in the history file. Fixes issue
9661 reported by rens@endoria.net
9662
9663 9/21
9664 ----
9665 lib/readline/rlconf.h
9666 - ENABLE_AUDIT_TTY_SUPPORT: now undefined (off) by default
9667
9668 9/24
9669 ----
9670 jobs.c
9671 - waitchld: if we get a SIGINT while waiting for a child to exit, but
9672 the kernel doesn't interrupt the waitpid(2) call, assume the child
9673 caught SIGINT if it exited for some reason other than SIGINT. Fix
9674 suggested by Stephane Chazelas <stephane.chazelas@gmail.com>
9675
9676 input.c
9677 - make_buffered_stream: use B_TEXT in buffered stream flags instead
9678 of (typo) O_TEXT. Report and fix from Eric Blake <eblake@redhat.com>
9679
9680 9/27
9681 ----
9682 execute_cmd.c
9683 - shell_execve: call reset_parser before calling initialize_subshell,
9684 which calls delete_all_aliases. reset_parser wants to free the
9685 pushed string list, which has pointers back into the alias table
9686 (use after free)
9687 - execute_simple_command: if we fork for an async command, make sure
9688 the child process increments shell_level before performing any
9689 word expansions, so $BASH_SUBSHELL is incremented. Fixes issue
9690 reported by ziyunfei <446240525@qq.com>
9691
9692 10/1
9693 ----
9694 builtins/kill.def
9695 - kill_builtin: make -L equivalent to -l for compatibility with other
9696 (Linux) versions of kill
9697
9698 doc/{bash.1,bashref.texi}
9699 - kill: document new `-L' option
9700
9701 10/2
9702 ----
9703 [bash-4.4-beta frozen]
9704
9705 10/5
9706 ----
9707 doc/{bash.1,bashref.texi}
9708 - LC_TIME: document that the shell recognizes it and calls setlocale
9709 when it changes; and that the shell uses it for time formatting
9710
9711 10/6
9712 ----
9713 subst.c
9714 - skip_single_quoted: now takes an additional `flags' argument, like
9715 skip_double_quoted; changed callers
9716 - skip_single_quoted: now pays attention to SX_COMPLETE flag, allows
9717 backslash to escape single quote, like $'...' allows
9718 - skip_to_delim: added case where we are completing and we are
9719 skipping over a $'...' string to call skip_single_quoted with
9720 SX_COMPLETE flag to allow backslash to quote single quote. Fixes
9721 bug reported by Daniel Colascione <dancol@dancol.org>
9722 - char_is_quoted: make analogous changes to handle $'...' so we can
9723 accommodate $'ab \' cd'
9724
9725 10/11
9726 -----
9727 subst.c,bashjmp.h
9728 - no_longjmp_on_fatal_error: now global so other parts of the shell can
9729 use it
9730
9731 arrayfunc.c
9732 - expand_array_index: if no_longjmp_on_fatal_error is non-zero, don't
9733 longjmp to top_level, just return 0. Fixes bug reported by
9734 isabella parakiss <izaberina@gmail.com>
9735
9736 subst.c
9737 - CQ_RETURN: restore old value of no_longjmp_on_fatal_error (oldjmp);
9738 make sure all callers (skip_matched_pair, skip_to_delim,
9739 char_is_quoted) save no_longjmp_on_fatal_error to oldjmp before
9740 setting it to 1
9741
9742 expr.c
9743 - expr_streval: if longjmping after an unbound variable error, jump
9744 back to expr toplevel (evalbuf) if no_longjmp_on_fatal_error is set
9745 in an interactive shell
9746
9747 variables.c
9748 - push_func_var: if pushing an array variable, such as when a variable
9749 in the temporary environment is promoted to an array by mapfile when
9750 the shell is in posix mode (so variable assignments preceding special
9751 builtins or shell functions persist in the shell environment after
9752 the builtin returns), make sure to copy the array or hash table so
9753 the variable is duplicated correctly. Fixes seg fault reported by
9754 Linda Walsh <bash@tlinx.org>
9755
9756 10/13
9757 -----
9758 variables.c
9759 - initialize_shell_variables: add call to sv_shcompat, so BASH_COMPAT
9760 can be set in the initial environment
9761
9762 execute_cmd.c
9763 - execute_function: set loop_level to 0 only if shell_compatibility_level
9764 is greater than bash-4.3; this was kind of an incompatible change.
9765 Report from Carlos Pita <carolosjosepita@gmail.com>
9766
9767 COMPAT,doc/{bash.1,bashref.texi}
9768 - compat43: added loop_level changes to description
9769
9770 10/15
9771 -----
9772 lib/sh/casemod.c,lib/readline/display.c
9773 - make sure mb_cur_max variable is defined outside of HANDLE_MULTIBYTE
9774 if it's used outside HANDLE_MULTIBYTE. Fixes from Greg Wooledge
9775 <wooledg@eeg.ccf.org>
9776
9777 support/Makefile.in
9778 - bash.pc: remove as part of distclean, not clean. Report from Andreas
9779 Schwab <schwab@linux-m68k.org>
9780
9781 10/17
9782 -----
9783 subst.c
9784 - array_var_assignment: make sure to call quote_string or quote_escapes
9785 on the assignment string, so spaces in the assignment survive word
9786 splitting. Fixes bug reported by isabella parakiss
9787 <izaberina@gmail.com>
9788
9789 10/20
9790 -----
9791 doc/{bash.1,bashref.texi}
9792 - word splitting: make sure that newline is listed as one of the IFS
9793 whitespace characters. Fixes omission reported by ziyunfei
9794 <446240525@qq.com>
9795
9796 lib/readline/histfile.c
9797 - history_do_write: make sure that we only create and use the tempfile
9798 if the history file exists and is a regular file. Reported several
9799 times, most recent check the result of a report from
9800 <marko.teiste@gmail.com>
9801
9802 10/22
9803 -----
9804 jobs.c
9805 - delete_all_jobs: if running_only == 0, we are eventually going to
9806 clear the bgpids list, so don't bother to add pids to it in
9807 delete_job (call with DEL_NOBGPID flag if running_only == 0)
9808
9809 10/24
9810 -----
9811 jobs.[ch]
9812 - bgpids: new implementation from a patch from John Fremlin
9813 <john@fb.com>, uses an array for the list of the last CHILD_MAX
9814 terminated background pids, and a separate hash table to search it.
9815 The storage can be freed as a unit, and the size of the hash table
9816 (currently 4096) is independent of the size of the bgpids table
9817
9818 subst.c
9819 - inherit_errexit: new variable to control whether or not command
9820 substitution inherits the -e (errexit) option. Disabled by default
9821
9822 general.c
9823 - posix_initialize: set inherit_errexit = 1 when Posix mode is enabled
9824
9825 builtins/shopt.def
9826 - inherit_errexit: new shell option, tracks value of inherit_errexit,
9827 allows command substitution to inherit the setting of errexit without
9828 posix mode. From a request and patch submitted by Christoph Gysin
9829 <christoph.gysin@gmail.com>
9830
9831 {version,version2}.c
9832 - use #if HAVE_SNPRINTF instead of #if defined in case configure
9833 decides to #define it to 0. Fixes problem reported by Klaus Ziegler
9834 <klausz@haus-gisela.de>
9835
9836 configure.ac
9837 - when checking for sys/resource.h, make sure to include <sys/time.h>
9838 for the benefit of both old systems that require it and new versions
9839 of autoconf that require a header file to compile to report its
9840 presence. Reported by Klaus Ziegler <klausz@haus-gisela.de>
9841
9842 10/26
9843 -----
9844 subst.h
9845 - SD_ARITHEXP: new flag value for skip_to_delim, supports parsing
9846 arithmetic expressions in parameter expansions
9847
9848 subst.c
9849 - skip_to_delim: handle SD_ARITHEXP flag by skipping parentheses for
9850 subexpressions and allowing ?: expression to not terminate an
9851 arithmetic expression delimited by `:'
9852 - skiparith: just call skip_to_delim with the SD_ARITHEXP option and
9853 the right delimiter string and return the right result. Fixes bug
9854 reported by <grishalevit@gmail.com>
9855
9856 include/shmbchar.h
9857 - strip out everything except what is needed to support is_basic and
9858 similar functions, since the mbchar_t typedef apparently conflicts
9859 with some AIX-specific type definition. Problem reported by
9860 Michael Felt <aixtools@gmail.com>
9861
9862 10/27
9863 -----
9864 builtins/{set,ulimit}.def
9865 - {set,ulimit}_builtin: make sure that --help is treated the same as
9866 -? and prints a message and returns. Fixes bug reported by ziyunfei
9867 <446240525@qq.com>
9868
9869 builtins/*.def
9870 - make sure to consistently use builtin_help() instead of mix of that
9871 function and builtin_usage()
9872
9873 10/29
9874 -----
9875 doc/{bash.1,bashref.texi}
9876 - BASH_CMDS, BASH_ALIASES: note that removing elements from these
9877 array variables is not currently reflected in the command hash
9878 table and alias list, respectively. Reported by isabella parakiss
9879 <izaberina@gmail.com>
9880
9881 10/30
9882 -----
9883 eval.c
9884 - reader_loop: if PS0 is set in an interactive shell, expand and
9885 display it after reading a (complete) command but before executing
9886 it. This differs from the DEBUG trap because the DEBUG trap is
9887 executed once for each simple command (and some others, like each
9888 time through a for loop). From a patch submitted by Dan Stromberg
9889 <dstromberglists@gmail.com>
9890
9891 parse.y
9892 - prompt_again: set ps0_prompt from $PS0 in an interactive shell
9893
9894 doc/{bash.1,bashref.texi}
9895 - PS0: document new prompt string
9896
9897 11/3
9898 ----
9899 subst.c
9900 - cond_expand_node: if special > 0, remove quoted nulls from the word
9901 list, since no word splitting takes place. Fixes bug reported by
9902 Corentin Peuvrel <cpeuvrel@pom-monitoring.com>
9903
9904 11/4
9905 ----
9906 doc/{bash.1,builtins.texi}
9907 - inherit_errexit: add to shopt description; modify Posix mode
9908 description
9909
9910 11/9
9911 ----
9912 lib/readline/util.c
9913 - rl_tilde_expand: fix out-of-bounds read caused when this function
9914 is invoked with rl_point == 0. Bug reported by Hanno Böck
9915 <hanno@hboeck.de>
9916
9917 11/11
9918 -----
9919 {nojobs,jobs}.c
9920 - get_original_tty_job_signals: force the original signal disposition
9921 for SIGTSTP/SIGTTIN/SIGTTOU to SIG_DFL in interactive shells. This
9922 will force child processes to get SIG_DFL even if the shell is
9923 started with those signals ignored. From a bug report from
9924 Keith Thompson <keithsthompson@gmail.com>
9925
9926 11/13
9927 -----
9928 make_cmd.c
9929 - make_function_def: if a function is being defined without a source
9930 file, and the shell has not been initialized, assume that the
9931 function is being imported from the environment and set the
9932 source_file struct member to "environment". Set to "main" if the
9933 shell has been initialized. Fixes bug reported on savannah by
9934 Arno-Can Uestuensoez
9935 https://savannah.gnu.org/support/index.php?108903
9936
9937 subst.c
9938 - skip_to_delim: if the shell is in posix mode (posixly_correct != 0)
9939 and performing history expansion ((flags & SD_HISTEXP) != 0), allow
9940 double quotes to quote the history expansion character. TENTATIVE
9941 CHANGE, inspired by
9942 https://savannah.gnu.org/support/index.php?108491
9943
9944 11/14
9945 -----
9946 jobs.c
9947 - wait_for: modify change from 4/23 to only give the terminal to
9948 shell_pgrp if not running in the background and subshell_environment
9949 indicates we're not in a pipeline and not an async command. Fixes
9950 bug reported by konsolebox <konsolebox@gmail.com>
9951
9952 11/16
9953 -----
9954 doc/{bash.1,bashref.texi}
9955 - document new posix-mode behavior of not giving ! special meaning
9956 within double quotes, even if histexpand is enabled
9957
9958 11/17
9959 -----
9960 builtins/evalfile.c
9961 - fc_execute_file: pass FEVAL_BUILTIN flag to _evalfile so it returns
9962 the value of parse_and_execute after executing the commands in the
9963 file. Fixes bug reported by Chris Marusich <cmmarusich@gmail.com>
9964
9965 11/20
9966 -----
9967 subst.c
9968 - process_substitute: don't unconditionally set pipeline_pgrp to
9969 shell_pgrp; do that only if pipeline_pgrp == 0 (we haven't forked
9970 yet) or if we know we haven't forked for a command, a pipeline,
9971 or an async command. Fixes bug reported by
9972 <gnu.20.drkshadow@spamgourmet.com>
9973 as https://savannah.gnu.org/support/index.php?108593
9974
9975 11/24
9976 -----
9977 variables.c
9978 - set_pwd: inherit the value of OLDPWD from the initial environment
9979 if it names a directory. From a report from John Wiersba
9980 <jrw32982@yahoo.com>
9981
9982 builtins/set.def
9983 - -T: fix help text to note that the DEBUG and RETURN traps are both
9984 inherited if this is set. Report from Grisha Levin
9985 <grishalevit@gmail.com>
9986
9987 doc/{bash.1,bashref.texi}
9988 - HISTIGNORE,GLOBIGNORE: note that the pattern matching is subject to
9989 the setting of the `extglob' variable. Clarification raised by
9990 Aharon Robbins <arnold@skeeve.com>
9991
9992 builtins/jobs.def,doc/{bash.1,bashref.texi}
9993 - disown: add text to synopsis making it clear that disown takes a
9994 pid argument. From a report from Matthew Stanfield
9995 <matthew@i-dig.info>
9996
9997 findcmd.c,doc/{bash.1,bashref.texi}
9998 - EXECIGNORE: change pattern matching to use FNMATCH_EXTFLAG like other
9999 IGNORE variables. From a report from Aharon Robbins <arnold@skeeve.com>
10000
10001 trap.c
10002 - _run_trap_internal: make sure to catch and use return values supplied
10003 as arguments to `return'; instead of just catching return, make sure
10004 we use return_catch_value as well. Fixes bug reported by
10005 Grisha Levit <grishalevit@gmail.com>, affects RETURN, DEBUG, ERROR
10006 traps
10007
10008 11/30
10009 -----
10010 lib/readline/display.c
10011 - rl_redisplay: fix code that deals with prompts that contain
10012 multibyte characters whose physical length is longer than the screen
10013 width (so the prompt line wraps) to deal with invisible characters
10014 in the prompt and set the inv_lbreaks offsets correctly and set
10015 lpos appropriately
10016 - _rl_move_cursor_relative: always called with either visible line or
10017 invisible line. Decide whether we are being called with the invisible
10018 line (or a portion thereof) as the DATA argument; make sure to account
10019 for invisible characters in the last line of the prompt by offsetting
10020 the desired buffer offset (NEW) by where DATA starts in invisible line
10021 and checking whether that is past the last invisible character in
10022 the prompt
10023 - _rl_move_cursor_relative: do the same for the visible line by using
10024 the visible line lbreaks array instead of _rl_screenwidth, since
10025 that fails in the presence of multibyte characters (buffer offset
10026 vs. physical screen position). These fix bug with prompts with
10027 multibyte characters and invisible characters that are longer than
10028 the screen width reported by Ryo Furue <ryofurue@gmail.com>
10029
10030 12/1
10031 ----
10032 parse.y,make_cmd.c
10033 - here_doc_first_line: new variable, set to non-zero to indicate the
10034 first line of possibly multiple here documents associated with the
10035 current command. Set in parse.y:gather_here_documents() before
10036 reading any here documents, set to 0 after reading the first line
10037 of any here document in make_cmd.c:make_here_document().
10038
10039 parse.y
10040 - history_delimiting_chars: if parser_state indicates we are reading
10041 a here document, don't use current_command_line_count to see whether
10042 or not we're on the first line of a here document -- it can be fooled
10043 by multi-line commands (or even backslash-escaped newlines). Use
10044 here_doc_first_line to check that directly. Fixes bug reported by
10045 Geoffrey Allott <geoffrey@allott.email>
10046
10047 shell.h,parse.y
10048 - save and restore here_doc_first_line as part of the shell's parser
10049 state
10050
10051 lib/sh/tmpfile.c
10052 - use ANSI-C rand() interface if random() not available. Fixes problem
10053 with linking on (ancient) Solaris 2.4 reported by Klaus Ziegler
10054 <klausz@haus-gisela.de>
10055
10056 12/2
10057 ----
10058 aclocal.m4
10059 - RL_LIB_READLINE_VERSION: if cross-compiling, assume current version
10060 of readline if cross-compiling bash while using an external readline
10061 library. Fix from Barry Davis <barry_davis@stormagic.com>
10062
10063 execute_cmd.c
10064 - execute_builtin: save and restore value of builtin_ignoring_errexit
10065 instead of assuming we can set it back to 0 -- the ignore-errexit
10066 cases might be nested
10067 - execute_builtin: after a builtin executes and eval_unwind is set,
10068 set exit_immediately_on_error to 0 if builtin_ignoring_errexit is
10069 set, and back to the value of errexit otherwise, just like the
10070 code that sets -e does. Fixes short-circuiting bug reported by
10071 Marcin Swigon <swigon.mar@gmail.com>
10072
10073 12/5
10074 ----
10075 builtins/setattr.def
10076 - set_or_show_attributes: instead of using a fixed string for the
10077 options argument to `declare', which results in export adding the
10078 readonly attribute, build the option string dynamically like in
10079 subst.c:shell_expand_word_list()
10080 - set_or_show_attributes: don't add the -r option to declare if the
10081 attribute passed as an argument doesn't include att_readonly; add
10082 -x if the attribute includes att_exported
10083 - set_or_show_attributes: add the -g option to declare so readonly
10084 and export in functions that go through this code path don't create
10085 local variables. Part of fix for bug reported by ziyunfei
10086 <446240525@qq.com>
10087
10088 execute_cmd.c
10089 - make_internal_declare: if we have an assignment builtin that isn't
10090 supposed to create local variables (export/readonly), make sure to
10091 add the W_ASSNGLOBAL flag to each assignment statement word.
10092 Part of fix for bug reported by ziyunfei <446240525@qq.com> where
10093 readonly can create local variables when invoked with a compound
10094 array assignment as an argument within a shell function
10095
10096 subst.c
10097 - make_internal_declare: added third argument: command name. Not used
10098 in any useful way yet
10099 - do_compound_assignment: handle attempted assignments to readonly
10100 variables and print error messages, like bind_variable does and the
10101 callers expect. This means that assignments to readonly array
10102 variables can't go through a code path that allows them to fail
10103 silently
10104
10105 doc/Makefile.in
10106 - uninstall: run install-info --delete after removing the installed
10107 info file to update the directory file
10108
10109 execute_cmd.c
10110 - execute_disk_command: since we still (and have always) perform
10111 redirections in child processes, we need to mark that state so
10112 we know that we're in a child process. subshell_performing_redirections
10113 is the new variable; non-zero when executing do_redirections()
10114
10115 subst.c
10116 - process_substitute: if we are executing process substitution in a
10117 redirection expansion context (expanding_redir == 1), the child
10118 process should not have access to any temporary environment the
10119 parent has. Call flush_tempenv() in the child process to get rid
10120 of it. Fix for bug reported by Clint Hepner <clint.hepner@gmail.com>
10121
10122 12/9
10123 ----
10124 jobs.c
10125 - waitchld: if in posix mode and attempting to let SIGCHLD interrupt the
10126 wait builtin, make sure wait_intr_flag is non-zero before trying to
10127 longjmp to wait_intr_buf. Fixes bug reported by Aharon Robbins
10128 <arnold@skeeve.com>
10129
10130 12/10
10131 -----
10132 lib/readline/display.c
10133 - update_line: if a prompt containing invisible characters changes,
10134 and the change is within the prompt string, we need to redraw the
10135 entire prompt. After that redraw, if the cursor position is after
10136 the first index where the old and new lines differ, we can short-
10137 circuit the update if the line length stays the same
10138 - update_line: if we redraw the entire prompt string because the prompt
10139 contains invisible characters and the first difference is in the
10140 middle of the prompt, we possibly need to adjust our idea of the
10141 first differing character in the old and new lines. We punt and do
10142 a dumb update in this case. Fixes bug with dynamic vi-mode mode
10143 strings containing invisible characters reported by Dylan Cali
10144 <calid1984@gmail.com>
10145
10146 12/11
10147 -----
10148 lib/readline/display.c
10149 - update_line: if we move up to a new screen line, we need to recompute
10150 the number of invisible characters on the new current line
10151 (visible_wrap_offset). Fixes bug reported to bug-readline by
10152 Per Bothner <per@bothner.com>
10153 - update_line: update code that attempts to compute where we are in
10154 the new line buffer. Fixes `vt100' bug reported to bug-readline by
10155 Per Bothner <per@bothner.com>
10156
10157 12/18
10158 -----
10159 execute_cmd.c
10160 - execute_function: unwind-protect and restore BASH_ARGC and BASH_ARGV
10161 - restore_funcarray_state: now global
10162
10163 execute_cmd.h
10164 - make func_array_state type global, add extern function declaration
10165 for restore_funcarray_state
10166
10167 builtins/evalfile.c
10168 - _evalfile: use restore_funcarray_state and pop_args as unwind-protects
10169 to restore BASH_{SOURCE,LINENO,ARGC,ARGV} and FUNCNAME on interrupts.
10170 Fixes bug reported back on 11/10 by Grisha Levit
10171 <grishalevit@gmail.com>
10172
10173 12/20
10174 -----
10175 lib/readline/isearch.c
10176 - _rl_isearch_dispatch: after removing the only character from the
10177 search string with DEL, leaving the search string empty, don't match
10178 the previous line if we didn't have a match before
10179
10180 12/22
10181 -----
10182 bashhist.c
10183 - enable_history_list,remember_on_history: initialize to 0 instead of 1
10184
10185 shell.c
10186 - init_interactive,init_interactive_script: set enable_history_list and
10187 remember_on_history to 1 (defaults)
10188
10189 12/23
10190 -----
10191 variables.c
10192 - initialize_shell_variables: don't inherit PS4 from the environment
10193 if the shell is running with euid == 0; just reset it to `+ '. This
10194 is a known potential vulnerability, since PS4 expansion performs
10195 command substitution in the root shell's context before displaying
10196 it. Discussion started by up201407890@alunos.dcc.fc.up.pt
10197
10198 bashhist.c
10199 - bash_history_reinit: initialize remember_on_history to the value of
10200 enable_history_list (set -o history). Fixes bug reported by
10201 Stephane Chazelas <stephane.chazelas@gmail.com> with command-line
10202 option `-o history' not having any effect
10203
10204 12/28
10205 -----
10206 lib/readline/{history.h,histfile.c}
10207 - history_file_version: new int variable, reserved for future use
10208 - history_multiline_entries: new int variable, can be set by the
10209 calling application to enable reading multi-line history entries
10210 from the history file (currently undocumented)
10211
10212 lib/readline/history.c
10213 - _hs_append_history_line: new function, append a line passed as an
10214 argument to a specified history entry, used to create multi-line
10215 history entries
10216
10217 lib/readline/histfile.c
10218 - read_history_range: implement a heuristic that temporarily sets the
10219 history comment character if the first line read from the history
10220 file looks like it has is a timestamp (#[:digit:]) so we can read
10221 timestamps from the history file properly. Originally reported
10222 back in March 2015 by Christoph Anton Mitterer <calestyo@gmail.com>
10223 - read_history_range: make sure history_multiline_entries is non-zero
10224 if the history file looks like it has timestamps
10225 - read_history_range: if we think we have a history file with timestamps
10226 and we read more than one non-timestamp consecutive history lines,
10227 assume they are part of a single multi-line history entry and paste
10228 them together using _hs_append_history_line. Feature most recently
10229 requested by james harvey <jamespharvey20@gmail.com>, also suggested
10230 by Christoph Anton Mitterer <calestyo@gmail.com>
10231
10232 examples/loadables/setpgid.c
10233 - setpgid: new loadable builtin, originally contributed by Jason
10234 Vas Dias <jason.vas.dias@gmail.com>
10235
10236 12/29
10237 -----
10238 bashhist.c
10239 - bash_history_inhibit_expansion: fix cases where a history expansion
10240 should be skipped because it's in a command or process substitution
10241 but there is another history expansion preceding the substitution
10242 on the command line. Don't let the previous history expansion fool
10243 the function into saying the command substitution history expansion
10244 should be performed
10245
10246 builtins/evalstring.c
10247 - parse_prologue: always unwind-protect history_expansion_inhibited,
10248 since history expansion can be enabled in non-interactive shells,
10249 and calling eval once in a non-interactive shell inhibits history
10250 expansion forever even if `set -o histexpand' was run before the
10251 eval
10252
10253 builtins/common.h
10254 - SEVAL_NOHISTEXP: new flag for parse_and_execute/parse_string; means
10255 to not perform history expansion (decouple from SEVAL_NOHIST, which
10256 now means to not remember commands on history); changed all callers
10257 that had SEVAL_NOHIST to have SEVAL_NOHIST|SEVAL_NOHISTEXP
10258
10259 builtins/evalstring.c
10260 - parse_prologue: instead of calling bash_history_disable, set
10261 remember_on_history to 0 if SEVAL_NOHIST and history_expansion_inhibited
10262 to 1 if SEVAL_NOHISTEXP
10263
10264 12/30
10265 -----
10266 subst.c
10267 - skip_to_histexp: new function, a stripped-down version of skip_to_delim.
10268 Used to skip to the next unquoted instance of the history expansion
10269 character, handles peculiar quoting and command/process substitution
10270 requirements. Better fix for bug reported by
10271 Zigmund.Ozean@zig-home.localdomain back in January, prompted by report
10272 from Keith Thompson <keithsthompson@gmail.com>
10273
10274 bashhist.c
10275 - bash_history_inhibit_expansion: use skip_to_histexp instead of
10276 skip_to_delim
10277
10278 subst.c
10279 - parameter_brace_expand_rhs: if the rhs of an expansion is "$@" and
10280 IFS is null, we need to separate the (quoted) positional parameters
10281 in the returned word with a space, and mark the word as needing to
10282 be split on spaces (W_SPLITSPACE). Fix for issues reported back in
10283 October 2014 as the result of an austin-group discussion, and just
10284 re-reported by Martijn Dekker <martijn@inlv.org>
10285
10286 1/4/2016
10287 --------
10288 execute_cmd.c
10289 - execute_simple_command: if autocd is set, invoke a function named
10290 `cd' if one exists, instead of the shell builtin. Feature requested
10291 by transl8czech@gmail.com
10292
10293 builtins/mkbuiltins.c
10294 - if a command's short description is the same as its name (e.g., `true'),
10295 don't mark the short doc to be translated. Report and fix from
10296 Benno Schulenberg <bensberg@justemail.net>
10297
10298 1/6
10299 ---
10300 subst.c
10301 - command_substitute,process_substitute: before replacing the file
10302 descriptor underlying stdout (fd 1), make sure to purge any pending
10303 stdio output that hasn't been written successfully, even after a
10304 call to fflush(). Fixes bug reported by cks@cs.toronto.edu
10305
10306 1/7
10307 ---
10308 builtins/{echo,printf}.def
10309 - echo_builtin,printf_builtin: don't use terminate_immediately; use
10310 calls to QUIT in the body of the print loop after writes and flushes.
10311 Fixes problem with running the signal handler and exit trap in a
10312 signal context and other bug reported by cks@cs.toronto.edu
10313
10314 builtins/common.c
10315 - sh_chkwrite: put in calls to QUIT to catch signals that interrupt
10316 writes
10317
10318 shell.c
10319 - get_current_user_info: protect endpwent() with #ifdef HAVE_GETPWENT.
10320 Fixes bug reported by pb <p-bauer-schriesheim@t-online.de>
10321
10322 1/8
10323 ---
10324 lib/readline/bind.c
10325 - _rl_init_file_error: now a varargs function so it can take format
10326 strings and arguments and pass them to vfprintf
10327 - rl_parse_and_bind: print a warning if we encounter a key binding
10328 string with one or more hyphens but we don't find a valid modifier
10329 (`control', `meta', etc.). Prompted by a report from Andrew Kurn
10330 <kurn@sfu.ca>
10331 - rl_parse_and_bind: improve several existing error messages now that
10332 _rl_init_file_error takes a variable number of arguments
10333 - rl_variable_bind: print error message upon encountering unknown
10334 variable
10335
10336 1/10
10337 ----
10338 lib/readline/bind.c
10339 - rl_parse_and_bind: if a `bare' keybinding is supplied without any
10340 terminating `:' or whitespace separating it from the command to be
10341 bound, signal an error
10342
10343 1/11
10344 ----
10345 subst.c
10346 - process_substitute: when compiled without job control (JOB_CONTROL not
10347 defined), make sure we call stop_making_children like we do in the job
10348 control code branch, so already_making_children is reset to 0. This
10349 is what command substitution does. Fixes bug reported by Alastair
10350 Hughes <hobbitalastair@yandex.com>
10351
10352 1/12
10353 ----
10354 execute_cmd.c
10355 - execute_in_subshell: if a user subshell (`(command)') or other shell
10356 compound command has an input pipe, note for later by setting
10357 stdin_redir. This will inhibit the implicit redirection of standard
10358 input from /dev/null for async commands executed as part of this
10359 subshell. Fixes bug reported by Martin D Kealey <martin@kurahaupo.gen.nz>
10360 - execute_simple_command: if the shell forks to execute this command
10361 because it has an input pipe, set stdin_redir to inhibit later redirection
10362 from /dev/null for async commands
10363
10364 1/13
10365 ----
10366 execute_cmd.c
10367 - HASH_BANG_BUFSIZE: use #define for size of buffer used in
10368 READ_SAMPLE_BUF instead of straight constant 80
10369 - HASH_BANG_BUFSIZ: increase to 128 because Linux allows 128 chars in
10370 exec header. Reported by Ludovic Courtès <ludo@gnu.org>
10371
10372 configure.ac
10373 - remove support for purify and purecoverage
10374 - change release level to `rc1'
10375
10376 1/15
10377 ----
10378 builtins/enable.def
10379 - dyn_load_builtin: fix missing argument to builtin_error if load function
10380 returns an error. Fix from Aharon Robbins <arnold@skeeve.com>
10381
10382 1/18
10383 ----
10384 builtins/history.def
10385 - histtime: display a better error message for invalid timestamps; use
10386 existing `??' string for empty/missing timestamps or invalid history
10387 entries. Suggestion from Reuben Thomas <rrt@sc3d.org>
10388
10389 1/21
10390 ----
10391 lib/readline/text.c
10392 - rl_insert: when trying to optimize typeahead, make sure to reset the
10393 key sequence and key sequence length when we read a character that is
10394 not bound to self-insert. Bug report from Geir Hauge
10395 <geir.hauge@gmail.com>
10396
10397 1/25
10398 ----
10399 doc/{bash.1,bashref.texi}
10400 - word splitting: add example showing how -d'' is equivalent to -d
10401 after word splitting and null argument removal
10402
10403 1/27
10404 ----
10405 doc/{bash.1,bashref.texi}
10406 - read: modify description to make it more clear that the line is split
10407 using the same rules as word splitting, and use `delimiters' instead
10408 of `separators', which people read the wrong way
10409
10410 2/2
10411 ---
10412 variables.c
10413 - initialize_shell_variables: allow FUNCNEST to set funcnest_max when
10414 imported from the environment. Inspired by
10415 https://bugzilla.redhat.com/show_bug.cgi?id=1274553
10416
10417 2/11
10418 ----
10419 bashhist.c
10420 - bash_history_inhibit_expansion: function should be compiled in only if
10421 BANG_HISTORY is defined. Report from isabella parakiss
10422 <izaberina@gmail.com>
10423
10424 [bash-4.4-rc1 frozen]
10425
10426 2/15
10427 ----
10428 lib/readline/text.c
10429 - rl_refresh_line: call rl_redraw_prompt_last_line instead of
10430 rl_forced_update_display to avoid redrawing all lines of a multiline
10431 prompt (overwriting the last line of the multiline prompt in the
10432 process). Report from Hugh Davenport <hugh@davenport.net.nz>
10433
10434 2/18
10435 ----
10436 subst.c
10437 - parameter_brace_expand: when processing ${!name[@]}, make sure to
10438 free `name' before returning the list of keys to avoid a memory leak.
10439 Fixes bug reported by Emilio PastorMira <Emilio.PastorMira@utimaco.com>
10440
10441 2/19
10442 ----
10443 trap.c
10444 - free_trap_strings: when freeing the `special' traps (NSIG to BASH_NSIG),
10445 check whether or not the `signal' is trapped, as it would be if the
10446 subshell inherited it (errtrace) and don't free the trap string in that
10447 case. Fixes bug reported by Jan Klötzke <jan@kloetzke.net>
10448
10449 2/21
10450 ----
10451 lib/sh/netconn.c
10452 - isnetconn: return false if getpeername fails with errno == EBADF.
10453 Bug and fix from Andrew Gregory <andrew.gregory.8@gmail.com>
10454
10455 builtins/shopt.def
10456 - parse_bashopts: when reading BASHOPTS from the environment, make
10457 sure to call any set functions associated with a variable, instead
10458 of just setting the value to 1. Report and fix from
10459 Vehlow, Jörg <Joerg.Vehlow@kratzer-automation.com>
10460
10461 2/22
10462 ----
10463 lib/readline/complete.c
10464 - rl_display_match_list: don't bother calling strrchr to check the
10465 return value from printable_part() if rl_filename_completion_desired
10466 is non-zero, since in that case printable_part just returns its
10467 argument. Fixes git completion issue reported by
10468 Dilyan Palauzov <dilyan.palauzov@aegee.org>
10469 - _rl_colored_completion_prefix: default is now 0, testing is complete
10470
10471 2/23
10472 ----
10473 variables.c
10474 - assign_hashcmd: if the shell is restricted, reject attempts to add
10475 pathnames containing slashes to the hash table, as the hash builtin
10476 does. Fixes bug reported to savannah by Sylvain Beucler as
10477 https://savannah.gnu.org/support/?108969
10478
10479 2/24
10480 ----
10481 subst.c
10482 - NEED_FPURGE_DECL: need it before externs.h included, since fpurge
10483 is now used in this file. Fixes warning reported by Mike
10484 Frysinger <vapier@gentoo.org>
10485 - skip_double_quoted: add missing argument to declaration
10486
10487 parse.y
10488 - shell_getc: in call to internal_warning, use %lu to print an argument
10489 cast explicitly to unsigned long. Fixes warning reported by Mike
10490 Frysinger <vapier@gentoo.org>
10491
10492 2/27
10493 ----
10494 parse.y
10495 - decode_prompt_string: quote result of \s expansion in case shell has
10496 been invoked with a pathname like '$(id)'. Inspired by report from
10497 Travis Garrell <travis.garrell@oracle.com>
10498 - decode_prompt_string: quote result of \h and \H expansions in the
10499 (unlikely) case that the hostname has been changed to something
10500 malicious including a command substitution. From report from
10501 Travis Garrell <travis.garrell@oracle.com>
10502
10503 builtins/getopts.def
10504 - getopts_unbind_variable: new static function, just calls unbind_variable
10505 for now. Placeholder for any future work to do something special if
10506 OPTARG is readonly. Based on discussion started by Robert Elz
10507 <kre@munnari.oz.au>
10508
10509 lib/readline/vi_mode.c
10510 - rl_vi_unix_word_rubout: new function, implements ^W as Posix specifies
10511 it for vi mode, using whitespace and punctuation characters as word
10512 boundaries. Prompted by question from Carlos Pita
10513 <carolosjosepita@gmail.com>
10514
10515 lib/readline/vi_keymap.c
10516 - bind rl_vi_unix_word_rubout to ^W by default in both insert and
10517 command mode
10518
10519 lib/readline/rltty.c
10520 - _rl_bind_tty_special_chars: if in vi mode, bind the WERASE character
10521 to rl_vi_unix_word_rubout
10522
10523 lib/readline/funmap.c
10524 - vi-unix-word-rubout is new bindable name for rl_vi_unix_word_rubout
10525
10526 lib/readline/readline.h
10527 - rl_vi_unix_word_rubout: new extern declaration
10528
10529 2/28
10530 ----
10531 doc/bash.1
10532 - document readline blink-matching-paren variable
10533 - document readline completion-display-width variable
10534 - document readline completion-map-case variable
10535 - note that the default value of history-size depends on the value of
10536 the HISTSIZE variable. All from a message from Branden Robinson
10537 <g.branden.robinson@gmail.com>
10538
10539 doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
10540 - convert-meta: modify the description to note that readline will turn
10541 the default to off if the locale contains eight-bit characters
10542 - input-meta: modify the description to note that readline will turn
10543 the default to on if the locale contains eight-bit characters
10544 - output-meta: modify the description to note that readline will turn
10545 the default to on if the locale contains eight-bit characters. From
10546 a message from Branden Robinson <g.branden.robinson@gmail.com>
10547
10548 3/6
10549 ---
10550 examples/loadables/Makefile.in
10551 - install-dev: make installdirs a prerequisite; don't rely on the
10552 install-supported target to create it first. Bug with parallel
10553 install (`make -j 4 install') reported by Chris Staub
10554 <cstaub67@gmail.com>
10555
10556 3/12
10557 ----
10558 lib/readline/display.c:
10559 - rl_clear_visible_line: clear all screen lines occupied by the current
10560 visible readline line. Inspired by report from Lauri Ranta
10561 <lauri.ranta@gmail.com>
10562
10563 lib/readline/readline.h
10564 - rl_clear_visible_line: extern declaration
10565
10566 lib/readline/doc/rltech.texi
10567 - rl_clear_visible_line: add documentation
10568
10569 3/19
10570 ----
10571 findcmd.c
10572 - file_status: add inadvertently-dropped test for EXECIGNORE to the
10573 `other' bits check. The check was in the original patch
10574 - search_for_command: if the file should not be considered executable
10575 because it's in the EXECIGNORE blacklist, don't set file_to_lose_on,
10576 since the attempt to execute the last-ditch path will circumvent the
10577 EXECIGNORE setting. Fixes bug reported by Dennis Williamson
10578 <dennistwilliamson@gmail.com>
10579
10580 3/28
10581 ----
10582 lib/readline/display.c
10583 - rl_redisplay: when computing where the cursor should go (and the
10584 physical cursor position) after displaying the prompt, don't adjust
10585 the cursor position by wadjust if there are no multibyte chars in
10586 the prompt. lpos is already a physical cursor position; _rl_screenwidth
10587 is the physical screen width, and we're not calling _rl_col_width and
10588 don't need to take invisible characters into account again. Fixes
10589 bug reported by Andreas Schwab <schwab@linux-m68k.org>
10590
10591 4/1
10592 ---
10593 parse.y
10594 - parse_comsub: when we read `esac' followed by a break character,
10595 turn on the LEX_RESWDOK flag because we can now read another case
10596 statement or other compound command. Fixes bug reported by
10597 Christian Franke <Christian.Franke@t-online.de>, original version
10598 of patch from Piotr Grzybowski <narsil.pl@gmail.com>
10599 - parse_comsub: leave the reserved-word-ok flag set for four-char
10600 reserved words (then/else/elif/done/time) that can be followed by
10601 reserved words; set lex_rwlen to 0 so we know to start reading a
10602 new one
10603
10604 4/7
10605 ---
10606 builtins/{alias,complete,jobs}.def
10607 - {alias,compopt,disown}: add missing `CASE_HELPOPT;' so --help option
10608 prints help longdoc instead of builtin_usage()
10609
10610 4/8
10611 ---
10612 arrayfunc.c
10613 - assign_array_var_from_word_list: use bind_array_var_internal instead
10614 of inline code, so value conversions happen on assignment (case
10615 modification, arithmetic evaluation, etc). Fixes bug reported by
10616 Geir Hauge <geir.hauge@gmail.com>
10617
10618 4/9
10619 ---
10620 shell.c
10621 - main: change the logic that determines whether or not bash is running
10622 under an emacs terminal emulator so it works with future versions of
10623 emacs, which will change to use only $INSIDE_EMACS. Report and fix
10624 from Paul Eggert <eggert@cs.ucla.edu>
10625
10626 lib/glob/sm_loop.c
10627 - EXT: if we see ?(pat), we can match 0 or 1 times, so if we don't
10628 match, we should consume the extglob pattern and go on to attempt
10629 to match the rest of the pattern against the string. Fixes bug
10630 reported by Isabella Parakiss <izaberina@gmail.com>
10631 - GMATCH: in case `*', don't short-circuit and match anything if the
10632 * is the last character in the pattern until after we check the
10633 special cases for matching a `.'. Fixes bugs reported back on 3/23
10634 by Isabella Parakiss <izaberina@gmail.com>
10635
10636 4/13
10637 ----
10638 bashhist.c
10639 - hc_erasedups: fix memory leak by freeing history entry returned by
10640 remove_history. Bug and fix from Seiichi Ishitsuka
10641 <ishitsuka.sc@ncos.nec.co.jp>
10642
10643 4/19
10644 ----
10645 config-top.h
10646 - CD_COMPLAINS: now settable in config-top.h; enables (fatal) error
10647 messages if cd is given multiple directory arguments
10648
10649 4/20
10650 ----
10651 execute_cmd.c
10652 - coproc_setvars: refuse to create variables with names that are not
10653 valid identifiers. Suggestion from Piotr Grzybowski
10654 <narsil.pl@gmail.com>
10655
10656 rltty.c
10657 - rl_tty_set_echoing: interface to set _rl_echoing_p, returning old
10658 value. Inspired by gdb use of _rl_echoing_p when switching
10659 between terminal and curses modes described by Doug Evans
10660 <dje@google.com>
10661
10662 bashline.c
10663 - bash_execute_unix_command: use rl_clear_visible_line instead of
10664 erasing current line on the screen, inspired by same report from
10665 3/12. Still tentative change
10666
10667 configure.ac
10668 - update release status to rc2, may skip this and go directly to
10669 release
10670
10671 4/21
10672 ----
10673 arrayfunc.c
10674 - convert_var_to_array: make sure that the newly-converted array
10675 variable is not marked as being an associative array. Fixes bug
10676 reported by Grisha Levit <grishalevit@gmail.com>
10677 - convert_var_to_assoc: make sure that the newly-converted associative
10678 array variable is not marked as being an indexed array
10679
10680 4/22
10681 ----
10682 builtins/evalstring.c
10683 - should_suppress_fork: don't suppress the fork if there are any traps
10684 set, since that requires that we hang around to react to a signal or
10685 collect the command's exit status and run something. Fixes bug
10686 reported by Brian Vandenberg <phantall@gmail.com>
10687
10688 histexpand.c
10689 - history_tokenize_word: handle >| as a single token. Fix from
10690 Piotr Grzybowski <narsil.pl@gmail.com> from a report from
10691 idallen@idallen-fibe.dyndns.org
10692
10693 4/24
10694 ----
10695 execute_cmd.
10696 - coproc_setvars: don't overwrite readonly variables used as coproc
10697 names. From a report from Grisha Levit <grishalevit@gmail.com>
10698
10699 histexpand.c
10700 - history_tokenize_word: handle strings of digits before redirections
10701 beginning with `<' or `>' as part of the redirection word; handle
10702 strings of digits following `<&' or `>&' as part of the redirection
10703 word. Inspired by patch from Piotr Grzybowski <narsil.pl@gmail.com>
10704 from a report from idallen@idallen-fibe.dyndns.org
10705
10706 lib/readline/complete.c
10707 - rl_display_match_list: if the common prefix is longer than any of
10708 the possible matches, set the length of the common prefix to 0 so
10709 the entire match gets printed for each match
10710 - rl_display_match_list: make sure to output at least one space
10711 between each displayed match, even if the displayed length is
10712 longer than our computed max
10713 - fnprint: if the length of the prefix (prefix_bytes) is greater than
10714 or equal to the length of the string to be printed (print_len), make
10715 sure to set the prefix length to 0 so the entire string is printed.
10716 From a report from Grisha Levit <grishalevit@gmail.com>
10717
10718 4/25
10719 ----
10720 subst.c
10721 - command_substitute: update the conditions under which we give the
10722 terminal to pipeline_pgrp with give_terminal_to to the same ones
10723 where wait_for uses to decide whether to give the terminal back to
10724 shell_pgrp. This code exists to undo the work wait_for does; it
10725 has to give the terminal back to pipeline_pgrp only under those
10726 conditions when wait_for gives it back to the shell pgrp. Fix for
10727 bug reported by Paulo Bardes <bardes0022@gmail.com>
10728
10729 4/26
10730 ----
10731 bashline.c
10732 - bash_filename_stat_hook: temporarily disable the `nounset' shell
10733 option around calls to expand_prompt_string so we don't get error
10734 messages during completion. Fixes issue reported by Eric Pruitt
10735 <eric.pruitt@gmail.com>
10736
10737 4/27
10738 ----
10739 doc/{bash.1,bashref.texi}
10740 - extdebug: clarify that having this option enabled at shell startup
10741 acts identically to --debugger. From a report from Grisha Levit
10742 <grishalevit@gmail.com>
10743
10744 jobs.[ch]
10745 - wait_for_single_pid: now takes additional `int flags' argument
10746
10747 {jobs,execute_cmd}.c,builtins/wait.def
10748 - wait_for_single_pid: changed callers to add extra argument
10749
10750 jobs.c
10751 - wait_for_single_pid: if (flags & 1) == 0, don't print the error
10752 message if PID isn't found; changed execute_pipeline call when
10753 lastpipe is set
10754
10755 4/28
10756 ----
10757 general.c
10758 - bash_tilde_expand: try not setting interrupt_immediately or
10759 terminate_immediately; see what happens with networked password
10760 databases
10761
10762 4/29
10763 ----
10764 subst.c
10765 - parameter_brace_expand, parameter_brace_expand_rhs: now take an
10766 additional `pflags' argument from its caller so we can pass
10767 state
10768 - parameter_brace_expand_rhs: if expand_string_for_rhs returns a
10769 quoted null, but l_hasdollat is set to 1, meaning we saw a quoted
10770 "$@" of some form, we need to turn off special handling of "$@"
10771 so something like "${@-${@-$@}}" expands to an empty string like
10772 Posix says it should. Fixes bug reported by Grisha Levit
10773 <grishalevit@gmail.com>
10774
10775 5/1
10776 ---
10777 variables.c
10778 - bind_variable_internal: if we have a nameref variable with a valid
10779 array reference that is invalid for assignment (e.g., a[*]), and
10780 assign_array_element returns NULL, short-circuit and return NULL.
10781 Fixes bug reported by Grisha Levit <grishalevit@gmail.com>
10782
10783 general.[ch]
10784 - valid_nameref_value: new function, return 1 if passed argument is
10785 a valid variable name argument for a nameref variable: a valid
10786 identifier, a valid array reference, or a valid positional
10787 parameter. Second argument indicates whether the value is to be
10788 used for an assignment; in this case, return an error if the name
10789 consists of all digits
10790
10791 builtins/declare.def
10792 - declare_internal: disallow values for nameref variables that don't
10793 pass the tests in valid_nameref_value. Part of fix for bug
10794 reported by Grisha Levit <grishalevit@gmail.com>
10795
10796 variables.c
10797 - bind_variable_internal: if trying to assign a value to a nameref
10798 variable, throw an error if valid_nameref_value fails (with a second
10799 argument of 1). More fixes for bug reported by Grisha Levit
10800 <grishalevit@gmail.com>
10801
10802 5/2
10803 ---
10804 builtins/declare.def
10805 - declare_internal: don't allow nameref attribute to be applied to an
10806 existing readonly variable; it can be used to circumvent readonly
10807 value. Fix for bug reported by Grisha Levit <grishalevit@gmail.com>
10808
10809 variables.[ch]
10810 - find_variable_last_nameref, find_global_variable_last_nameref: takes
10811 a new flags argument. If flags is non-zero, and we find a nameref
10812 variable that is unset (has no value), return that variable instead
10813 of NULL.
10814
10815 {variables,execute_cmd,arrayfunc,subst}.c,builtins/{declare,set}.def
10816 - find_variable_last_nameref, find_global_variable_last_nameref: change
10817 callers to add flags argument (initially 0)
10818
10819 5/3
10820 ---
10821 variables.c
10822 - bind_variable_internal: make sure we run the value of a namref
10823 variable through valid_nameref_value before doing the assignment.
10824 This can go away if we stop allowing namerefs to refer to positional
10825 parameters
10826
10827 execute_cmd.c
10828 - execute_select_command: if bind_variable returns NULL, handle it as
10829 an error, as if attempting assignment to a readonly variable
10830 - execute_for_command: use 1 as second argument to
10831 find_variable_last_nameref, so it will return an invisible nameref
10832 to assign for each variable in the list
10833 - execute_for_command: if the current word in the list is an invalid
10834 identifier and the loop variable is a nameref, handle it as an error,
10835 as if attempting assignment to a readonly variable
10836
10837 5/4
10838 ---
10839 variables.c
10840 - bind_int_variable: add warning if assigning an int to a nameref
10841 variable
10842 - assign_in_env: if assigning a variable in the temporary environment
10843 that is a namref, throw an error if trying to assign an invalid
10844 value
10845 - bind_variable_value: use valid_nameref_value instead of calls to
10846 legal_identifier and valid_array_reference
10847
10848 execute_cmd.c
10849 - coproc_setvars: if we have a nameref variable as the coproc name, but
10850 it can't be assigned to for some reason, remove the nameref attribute
10851 and issue a warning that we are doing so
10852 - coproc_setvars: don't allow assignment to a nameref variable with an
10853 invalid variable name, using same code as find_or_make_array_variable
10854
10855 general.c
10856 - valid_nameref_value: disallow values consisting solely of digits,
10857 like the positional parameters
10858
10859 builtins/declare.def
10860 - declare_internal: don't call valid_nameref_value on the existing value
10861 of a variable that's being converted to a nameref -- that value is
10862 going to be thrown away and we've already checked the new value
10863 - declare_internal: call bind_variable_value with the ASS_NAMEREF flag
10864 if we're assigning to an existing nameref variable (for instance,
10865 `declare -n x ; declare x=42')
10866
10867 5/5
10868 ---
10869 variables.c
10870 - make_local_variable: if we are being asked to create a local copy of
10871 a nameref variable from a prior scope (checked by looking up
10872 using find_variable_noref), use the nameref variable, not the variable
10873 it references (which we find using find_variable). Bug report from
10874 Grisha Levit <grishalevit@gmail.com> ; fix by Piotr Grzybowski
10875 <narsil.pl@gmail.com>
10876
10877 builtins/declare.def
10878 - declare_internal: if asked to do the same thing as above (difference
10879 is declare -n r=foo in previous case; declare -n r in this one),
10880 don't follow reference var from a previous context. Create a new
10881 local variable (using make_local_variable) and inherit attributes
10882 from previous scope's nameref as above
10883
10884 5/6
10885 ---
10886 builtins/declare.def
10887 - declare_internal: if we are assigning a value to an existing
10888 invisible nameref variable, validate value early so we don't end up
10889 removing the variable after the assignment fails
10890
10891 builtins/shopt.def
10892 - toggle_shopts: don't call set_bashopts here unless $BASHOPTS exists,
10893 since we don't want to set it up before it gets read from the
10894 environment. Keeping BASHOPTS read-only should keep users from
10895 unsetting it. Fix from Grisha Levit <grishalevit@gmail.com>
10896 - shopt_set_debug_mode: make sure error_trace_mode reflects the setting
10897 of extdebug. This one is tentative. Fix from Grisha Levit
10898 <grishalevit@gmail.com>
10899 - shopt_set_debug_mode: call set_shellopts after setting error_trace_mode
10900 or function_trace_mode. Fix from Grisha Levit <grishalevit@gmail.com>
10901
10902 shell.c
10903 - start_debugger: make sure that function_trace_mode and error_trace_mode
10904 reflect the value of debugging_mode, so they are both disabled if we
10905 disable debugging mode because we can't find the debugger start file.
10906 Fix from Grisha Levit <grishalevit@gmail.com>
10907 - start_debugger: set $SHELLOPTS and $BASHOPTS to the option values are
10908 reflected if we change or set them here. Fix from Grisha Levit
10909 <grishalevit@gmail.com>
10910
10911 builtins/set.def
10912 - reset_shell_options: add reset values for: posix, nolog, pipefail.
10913 Fix from Grisha Levit <grishalevit@gmail.com>
10914
10915 builtins/shopt.def
10916 - reset_shopt_options: add reset values for: autocd, checkjobs,
10917 complete_fullquote, dirspell, failglob, globstar, gnu_errfmt,
10918 huponexit, inherit_errexit, interactive_comments, lastpipe,
10919 no_empty_cmd_completion, progcomp. Fix from Grisha Levit
10920 <grishalevit@gmail.com>
10921 - reset_shopt_options: make sure the following options have the right
10922 defaults based on #defines: checkjobs, checkwinsize, direxpand,
10923 extglob, globasciiranges. Fix from Grisha Levit
10924 <grishalevit@gmail.com>
10925
10926 flags.c
10927 - reset_shell_flags: add missing flags, re-initialize history_expansion
10928 based on STRICT_POSIX
10929
10930 5/8
10931 ---
10932 lib/readline/histexpand.c
10933 - history_expand: if any expansion returns 1 from history_expand_internal,
10934 indicating that :p was supplied, make it apply to the entire line
10935 like tcsh and csh. Fixes bug reported by Dean Stanton
10936 <dstanton@tintri.com>
10937
10938 variables.[ch]
10939 - ifsname: move define to variables.h
10940
10941 execute_cmd.c
10942 - execute_for_command: check whether or not the word in the for command
10943 is IFS; call setifs every time the variable is assigned a value.
10944 Fixes bug report from Grisha Levit <grishalevit@gmail.com>
10945
10946 5/16
10947 ----
10948 general.c
10949 - valid_nameref_value: explicitly handle name == 0 and *name == 0 right
10950 away to save calls to legal_identifier
10951
10952 builtins/declare.def
10953 - declare_internal: if trying to set nameref attribute on a variable
10954 with a null value, flag as invalid assignment, just as if running
10955 `declare -n r=""'. Fixes bug report from Grisha Levit
10956 <grishalevit@gmail.com>
10957 - declare_internal: when creating a variable with a temporary value
10958 (""), use ASS_FORCE in the assignment flags to bypass name validity
10959 checks on nameref variable names
10960
10961 variables.c
10962 - bind_variable_internal: don't call valid_nameref_value if we're
10963 forcing assignment with (flags & ASS_FORCE)
10964
10965 builtins/read.def
10966 - read_builtin: handle bind_variable returning NULL when setting REPLY.
10967 Report and fix from Grisha Levit <grishalevit@gmail.com>
10968
10969 builtins/setattr.def
10970 - set_var_attribute: handle bind_variable returning NULL
10971
10972 lib/sh/tmpfile.c
10973 - sh_seedrand(): call srandom() to seed the random number generator
10974 - sh_mktmpname, sh_mktmpfd: if we have random(), assume we have
10975 srandom() and seed the random number generator. Still looking for
10976 better value to see random number generator with
10977
10978 variables.c
10979 - check_unbind_variable: use internal_error instead of builtin_error
10980
10981 {execute_cmd,variables}.c
10982 - fix some places where bind_variable could return NULL and it was not
10983 checked. Fix from Piotr Grzybowski <narsil.pl@gmail.com>
10984
10985 5/17
10986 ----
10987 arrayfunc.c
10988 - convert_var_to_{array,assoc}: make sure to turn off nameref attribute,
10989 since namerefs can't be arrays
10990
10991 execute_cmd.c
10992 - coproc_setvars: if the coproc name names a nameref, resolve the
10993 nameref and use it as the name of the coproc. Suggested by Grisha
10994 Levit <grishalevit@gmail.com>
10995
10996 subst.c
10997 - command_substitute: don't bother calling QUIT after calling
10998 reset_signal_handlers in the child, kill the child with SIGINT in
10999 case we just reset the signal handler to SIG_DFL and we should just
11000 exit instead of throwing to top level. Fixes bug reported by
11001 Grisha Levit <grishalevit@gmail.com>
11002
11003 5/18
11004 ----
11005 variables.c
11006 - find_variable_nameref_for_create: find a nameref variable whose value
11007 doesn't resolve to an existing variable and see whether or not that
11008 value is appropriate for a new variable to be created
11009 - find_variable_nameref_for_assignment: find a nameref variable whose
11010 value doesn't resolve to an existing variable and see whether or not
11011 that value is appropriate for a new variable to be created.
11012 Difference between _assignment and _create is that _assignment
11013 allows the nameref value to be a subscripted array reference
11014
11015 builtins/setattr.def
11016 - set_var_attribute: if variable lookup doesn't return anything, check
11017 for a nameref and make sure that any reference value is something we
11018 should be working on here, using find_variable_nameref_for_create().
11019 If it fails, error out and return, otherwise it's probably a reference
11020 to a variable that hasn't been set yet, so let bind_variable take care
11021 of that. Report from Grisha Levit <grishalevit@gmail.com>
11022
11023 arrayfunc.c
11024 - bind_array_variable: if find_shell_variable returns NULL, check for a
11025 nameref using find_variable_nameref_for_create and create a new array
11026 variable with the value if it returns a valid nameref variable.
11027 Makes `unset var; declare -n ref=var ; ref[0]=foo' work right.
11028 Report from Grisha Levit <grishalevit@gmail.com>
11029
11030 5/19
11031 ----
11032 variables.[ch]
11033 - unbind_variable_noref: unset a variable NAME without following any
11034 nameref chain. If the first instance of the variable with that name
11035 is a nameref, just unset that nameref variable.
11036
11037 builtins/getopts.def
11038 - getopts_unbind_variable: if OPTARG is going to be unbound, use
11039 unbind_variable_noref to unbind that name even if it is a nameref
11040 variable. Issue raised by Grisha Levit <grishalevit@gmail.com>
11041
11042 execute_cmd.c
11043 - coproc_unsetvars: use unbind_variable_noref in case someone sets the
11044 coproc _PID variable as a nameref pointing to something read-only or
11045 strange. Issue raised by Grisha Levit <grishalevit@gmail.com>
11046
11047 builtins/set.def
11048 - set_ignoreeof: use unbind_variable_noref to unset "IGNOREEOF" and
11049 "ignoreeof"
11050 - set_posix_mode: use unbind_variable_noref to unset "POSIXLY_CORRECT"
11051
11052 variables.c
11053 - make_vers_array: use unbind_variable_noref to unset "BASH_VERSINFO"
11054
11055 lib/sh/shmatch.c
11056 - sh_regmatch: use unbind_variable_noref to unset "BASH_REMATCH"
11057
11058 bashline.c
11059 - bash_execute_unix_command: use check_unbind_variable to unset
11060 READLINE_LINE and READLINE_POINT
11061
11062 pcomplete.c
11063 - unbind_compfunc_variables: use unbind_variable_noref to unset
11064 COMP_LINE, COMP_POINT, COMP_WORDS, COMP_CWORD, COMP_TYPE, COMP_KEY
11065 - gen_shell_function_matches: use unbind_variable_noref to unset
11066 COMPREPLY
11067
11068 config-top.h
11069 - USE_MKTEMP/USE_MKSTEMP: define by default to use libc version of
11070 mktemp and mkstemp in lib/sh/tmpfile.c. Recommended by Mike
11071 Frysinger <vapier@gentoo.org> to fix a FreeBSD problem
11072
11073 configure.ac,config.h.in
11074 - mkstemp: check for mkstemp, define HAVE_MKSTEMP if available
11075
11076 config-bot.h
11077 - USE_MKSTEMP: #undef if HAVE_MKSTEMP not defined
11078
11079 5/22
11080 ----
11081 variables.c
11082 - assign_in_env: if appending to a variable's value, make sure we call
11083 make_variable_value with the empty string if expand_assignment_string_to_string
11084 returns NULL, as do_assignment_internal does. Fixes bug with
11085 `str=''; val=foo ; val+=str printenv val' reported by Grisha Levit
11086 <grishalevit@gmail.com>
11087 - assign_in_env: if assigning to a nameref variable in the temporary
11088 environment, and the nameref has a valid value for assignment (even
11089 if the target variable is not set), resolve the nameref and create
11090 a variable in the temporary environment named by the nameref's value.
11091 If the nameref variable is invisible or isn't set to a valid value
11092 for assignment, just create a regular temporary variable with the
11093 nameref's name. This provides a degree of ksh93 compatibility.
11094 Suggested by Grisha Levit <grishalevit@gmail.com>
11095 - find_variable_nameref_context,find_variable_last_nameref_context:
11096 instead of returning NULL when detecting a loop, return a
11097 distinguished value: &nameref_maxloop_value
11098 - bind_variable: catch nameref_maxloop_value so we can do different
11099 things based on whether or not we get it. Right now we don't do
11100 anything different, but we could
11101
11102 5/24
11103 ----
11104 lib/readline/display.c
11105 - update_line,_rl_move_cursor_relative: save value of MB_CUR_MAX in a
11106 variable and use it throughout the functions instead of recomputing it
11107 every time (which possibly costs a function call)
11108
11109 5/25
11110 ----
11111 builtins/declare.def
11112 - declare_internal: only check whether the value being assigned to a
11113 nameref variable is a valid identifier if we're not appending to an
11114 existing value. Suggested by Grisha Levit <grishalevit@gmail.com>
11115 - declare_internal: add a couple of more checks on nameref names:
11116 o make sure `declare -n x[3]=y' is an error
11117 o nameref variable self-references now produce a warning when
11118 in function scope
11119 o nameref variable self-references using subscripted arrays
11120 (a=a[0]) now produce warnings at function scope and errors at
11121 global scope
11122
11123 5/29
11124 ----
11125 builtins/declare.def
11126 - declare_internal: use name of readonly variable when calling sh_readonly
11127 instead of name passed as argument to declare in case we've followed
11128 a nameref chain
11129 - declare_internal: when turning off attributes on a nameref variable
11130 after following the nameref chain and turning them off on the target
11131 variable, don't allow the readonly attribute to be removed. This is
11132 primarily intended to turn off the nameref attribute. Issue pointed
11133 out by Grisha Levit <grishalevit@gmail.com>
11134 - declare_internal: if we are attempting to modify an existing global
11135 nameref variable, and the -n option is supplied, operate on the
11136 nameref variable itself, not the variable it references
11137
11138 doc/{bash.1,bashref.texi}
11139 - change the descriptions of namerefs and declare -n slightly to note
11140 that using the -n option to declare will operate on the nameref
11141 variable itself rather than the variable it references
11142
11143 variables.c
11144 - bind_variable_internal: if trying to assign to a read-only variable,
11145 print the error message using the variable's name instead of the
11146 name passed to bind_variable in case we followed a nameref
11147
11148 builtins/declare.def
11149 - declare_internal: when we're creating a (possibly invisible) variable
11150 as part of another operation, assigning NULL, make sure to use
11151 ASS_FORCE to avoid warning messages from any existing nameref
11152 variables we follow
11153 - declare_internal: allow the nameref attribute to be removed from a
11154 readonly nameref variable without a value but do not allow it to be
11155 removed from a readonly nameref variable that has a value, even if it
11156 doesn't reference an existing variable. This distinction is for ksh93
11157 compatibility. Pointed out by Grisha Levit <grishalevit@gmail.com>
11158
11159 5/31
11160 ----
11161 builtins/declare.def
11162 - declare_internal: if the call to bind_variable_value fails for some
11163 reason, make sure to restore the nameref attribute to flags_on and
11164 flags_off before calling NEXT_VARIABLE
11165
11166 subst.c
11167 - make_internal_declare: handle += append op
11168 - shell_expand_word_list: when transforming assignment statement
11169 arguments to `declare', make sure to handle += append op to avoid
11170 passing invalid identifiers to declare. Report by Grisha Levit
11171 <grishalevit@gmail.com>
11172
11173 6/1
11174 ---
11175 builtins/declare.def
11176 - declare_internal: if a nameref assignment fails, only call delete_var
11177 to delete the variable if we created it in declare_internal in the
11178 first place
11179
11180 general.c
11181 - check_selfref: new function, checks a NAME against a VALUE for nameref
11182 self-reference
11183
11184 general.h
11185 - check_selfref: extern declaration
11186
11187 builtins/declare.def
11188 - declare_internal: call check_selfref to determine whether a given NAME
11189 and VALUE constitute an invalid nameref variable self-reference
11190
11191 variables.c
11192 - bind_variable_internal: call check_selfref to determine whether a
11193 given NAME and VALUE constitute an invalid nameref variable self-
11194 reference
11195
11196 6/2
11197 ---
11198 parse.y
11199 - clear_shell_input_line: new function, clears contents of shell_input_line
11200 and sets index to 0, but doesn't free it
11201
11202 externs.h
11203 - clear_shell_input_line: extern declaration
11204
11205 builtins/evalstring.c
11206 - parse_and_execute: call clear_shell_input_line after setting input to
11207 string to be executed. Fixes problem with command substitution and
11208 multi-line aliases reported by Grisha Levit <grishalevit@gmail.com>
11209
11210 eval.c
11211 - parse_command: only execute PROMPT_COMMAND if the shell is not
11212 currently expanding an alias; use the same tests as parse.y:SHOULD_PROMPT
11213 and parse.y:prompt_again() use to decide whether or not to print a
11214 prompt. Fixes problems with PROMPT_COMMAND and multi-line aliases
11215 reported by Grisha Levit <grishalevit@gmail.com>
11216
11217 builtins/set.def
11218 - unset_builtin: changes to fix three problems reported by Grisha
11219 Levit <grishalevit@gmail.com>:
11220 o if -n is supplied, we should not try to unset a function if
11221 a variable isn't found
11222 o unsetting namerefs whose values are array references does
11223 not work
11224 o unset -n n[0], where n is a nameref, would unset the
11225 referenced variable instead of `n'
11226
11227 redir.c
11228 - redir_varvalue: handle case where nameref var points to subscripted
11229 array reference. Reported by Grisha Levit <grishalevit@gmail.com>
11230
11231 variables.c
11232 - bind_variable_value: make sure to call check_selfref only if aflags
11233 includes ASS_NAMEREF and not ASS_FORCE. Reported by Grisha Levit
11234 <grishalevit@gmail.com>
11235
11236 general.c
11237 - valid_nameref_value: now understands a FLAGS value of 2 to mean that
11238 the name will be used to create a variable, so only legal_identifier
11239 matters
11240
11241 arrayfunc.c
11242 - find_or_make_array_variable: call valid_nameref_value with FLAGS value
11243 of 2 to indicate we will be creating a variable. Fixes mapfile issue
11244 reported by Grisha Levit <grishalevit@gmail.com>
11245
11246 6/5
11247 ---
11248 builtins/declare.def
11249 - declare_internal: only pass ASS_FORCE as part of assignment flags to
11250 assignments concerning arrays
11251 - declare_internal: when at the global scope, if we resolve a nameref
11252 and commit to using the new name, go back to to the beginning of the
11253 loop and use the new name in the checks and variable references.
11254 Make sure we construct the new name as a straight substitution of
11255 the nameref value into the old name, including array subscripts and
11256 rebuilding the correct values for `offset' and `value', since they
11257 are relative to the original value of name.
11258 Fixes several issues with checking use of subscripted array variables
11259 as nameref values
11260 - declare_internal: when calling assign_array_element, make sure to
11261 pass ASS_APPEND if aflags includes it, so things like
11262 declare -a var; var[1]=1; declare var[1]+=4
11263 append to the value appropriately and var[1] ends up being `14'
11264
11265 arrayfunc.c
11266 - valid_array_reference: make sure the array reference is properly
11267 terminated after the first subscript; return invalid if there is
11268 anything following the closing `]'
11269
11270 6/12
11271 ----
11272 variables.c
11273 - bind_variable_internal: if asked to perform an array subscript
11274 assignment on a nameref variable, display a warning and remove the
11275 nameref attribute (as bash-4.3 did). Reported by Dan Douglas
11276 <ormaaj@gmail.com>
11277
11278 6/14
11279 ----
11280 test.c
11281 - posixtest: handle four-argument case where argv[1] == '(' and
11282 argv[4] == ')' by performing two-argument test on $2 and $3.
11283 Reported by Joerg Schilling <Joerg.Schilling@fokus.fraunhofer.de>
11284
11285 6/15
11286 ----
11287 variables.c
11288 - sv_ignoreeof: make sure ignoreeof is set only if IGNOREEOF is set and
11289 has a value (no `local IGNOREEOF'). Reported by Grisha Levit
11290 <grishalevit@gmail.com>
11291 - sv_strict_posix: make sure posixly_correct is set only if
11292 POSIXLY_CORRECT is set and has a value. Reported by Grisha Levit
11293 <grishalevit@gmail.com>
11294
11295 6/16
11296 ----
11297 builtins/declare.def
11298 - declare_internal: analogous to 6/12 change; when performing an array
11299 subscript assignment on a nameref, display a warning, remove the
11300 nameref attribute, and go on
11301
11302 6/21
11303 ----
11304 execute_cmd.c
11305 - shell_execve: make sure errno is (re)set appropriately before
11306 returning error value on exec format error
11307
11308 6/23
11309 ----
11310 subst.c
11311 - param_expand: when expanding $* in a context where splitting is not
11312 desired (pflags & PF_ASSIGNRHS), make sure to quote the word and the
11313 included separators. Reported by Dan Douglas <ormaaj@gmail.com>
11314
11315 6/30
11316 ----
11317 configure.ac
11318 - release version is now `beta2'
11319
11320 execute_cmd.c
11321 - execute_simple_command: even if already_making_children is non-zero,
11322 don't call wait_for if last_made_pid == NO_PID. Indirectly inspired
11323 by report from Nicolas Vivet <nicolas@nzx.io>
11324
11325 7/2
11326 ---
11327 subst.c
11328 - expand_word_internal: when adding an IFS character to the accumulated
11329 string, don't quote it if word expansion is not going to be
11330 performed ((word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0) in the
11331 default case. This was already the case everwhere else, when we did
11332 `goto add_ifs_character;'. Fixes bug reported by Ibrahim M. Ghazal
11333 <imgx64@gmail.com>
11334
11335 subst.[ch],arrayfunc.c
11336 - string_list_dollar_at: now takes a new third argument, currently
11337 reserved for future use; changed callers and declaration
11338
11339 7/7
11340 ---
11341 [bash-4.4-beta2 frozen]
11342
11343 7/9
11344 ---
11345 bashline.c
11346 - check_redir: make sure that index is > 0 before checking previous
11347 char; fixes out of bounds read reported by Hanno Böck
11348 <hanno@hboeck.de>
11349
11350 7/16
11351 ----
11352 subst.c
11353 - parameter_brace_expand: if ${array[@]} or ${array[*]} is supplied
11354 with an unset (or empty) array, and -u is enabled, don't make it
11355 an unbound variable error, like $@ or $* when there are no
11356 positional parameters. Based on report from Ian Allen
11357 <idallen@idallen-fibe.dyndns.org>
11358
11359 lib/readline/signals.c
11360 - rl_pending_signal(): return the number of any signal readline has
11361 caught but is waiting to handle
11362
11363 lib/readline/callback.c
11364 - rl_persistent_signal_handlers: new variable, restores readline-6.2
11365 signal handler semantics: installed at rl_callback_handler_install
11366 time and removed with rl_clear_signals when a complete line has
11367 been read
11368 - _rl_callback_newline: call rl_set_signals if rl_persistent_signal_handlers
11369 is non-zero
11370 - rl_callback_read_char: install signal handlers with rl_set_signals
11371 if rl_persistent_signal_handlers is 0 (the default)
11372 - CALLBACK_READ_RETURN: uninstall signal handlers with rl_clear_signals
11373 only if rl_persistent_signal_handlers is 0 (the default)
11374
11375 lib/readline/readline.h
11376 - rl_pending_signal: new extern declaration
11377 - rl_persistent_signal_handlers: new extern declaration
11378
11379 7/19
11380 ----
11381 execute_cmd.c
11382 - execute_while_or_until: make sure we decrement `continuing' the way
11383 we decrement `breaking' if the loop test indicates we will be
11384 breaking out of the loop. That keeps `until continue' from
11385 keeping `continuing' set to 1. Reported by Dan Douglas
11386 <ormaaj@gmail.com>
11387
11388 7/20
11389 ----
11390 trap.c
11391 - run_pending_traps,_run_trap_internal: save and restore temporary_env,
11392 set temporary_env to 0 before trap runs so traps don't inherit a
11393 command's temporary env. Fixes bug with IFS assignment in tempenv
11394 and trap reported by Andriy Martynets <martynets@volia.ua>
11395
11396 jobs.c
11397 - run_sigchld_trap: save and restore temporary_env, set temporary_env
11398 to 0 before trap runs so traps don't inherit a command's temporary
11399 env (see above)
11400
11401 7/21
11402 ----
11403 execute_cmd.c
11404 - execute_function: unwind-protect function_line_number, in case we
11405 are executing a function inside another function. Reported by
11406 Grisha Levit <grishalevit@gmail.com> in context of evaled functions
11407 and DEBUG traps
11408 - execute_arith_for_command,execute_arith_command,execute_simple_command,
11409 execute_cond_command: make sure line_number doesn't go < 0 when
11410 adjusting it by function_line_number
11411
11412 7/23
11413 ----
11414 subst.c,command.h
11415 - move the PF_ constants to command.h so other files can see them, now
11416 that PF_ASSIGNRHS has meaning to string_list_dollar_at
11417
11418 arrayfunc.h
11419 - AV_ASSIGNRHS: new flag, indicate that ${a[@]} is being expanded on
11420 the RHS of an assignment statement
11421
11422 arrayfunc.c
11423 - array_value_internal: if AV_ASSIGNRHS passed for ${a[@]}, pass
11424 PF_ASSIGNRHS to string_list_dollar_at to support args separated by
11425 spaces even if $IFS does not have the default value. Reported by
11426 Dan Douglas <ormaaj@gmail.com>
11427
11428 subst.c
11429 - string_list_dollar_at: if FLAGS argument includes PF_ASSIGNRHS, obey
11430 rules for $@ on the RHS of an assignment statement: expand to
11431 postitional parameters separated by spaces no matter what the first
11432 character of $IFS is. Reported by Dan Douglas <ormaaj@gmail.com>
11433 - parameter_brace_expand_word: pass AV_ASSIGNRHS as flags value to
11434 array_value if PF_ASSIGNRHS is set and we are expanding an array
11435 variable subscripted by @ or *
11436 - param_expand: pass pflags to string_list_dollar_at in case it contains
11437 PF_ASSIGNRHS
11438 - expand_word_internal: if we have an assignment statement argument to
11439 a declaration builtin (W_ASSIGNARG), turn on W_ASSIGNRHS when we see
11440 the `=' to enable special $@ behavior
11441 - expand_word_internal: if W_ASSIGNARG enabled in word flags, pass that
11442 flag and W_ASSIGNRHS to recursive call to expand_word_internal when
11443 expanding double-quoted string; handles "$@" when IFS is not the
11444 default value and word splitting will not be performed
11445
11446 subst.c
11447 - expand_word_internal: change case that handles '' (single-quoted
11448 empty string) to only discard it if we will not be performing word
11449 splitting (W_NOSPLIT|W_NOSPLIT2), since we need to add a quoted null
11450 argument if the subsequent characters will cause word splitting.
11451 This is how "" (double-quoted empty string) is handled after a bug
11452 fix back in August 2010. Reported by Grisha Levit
11453 <grishalevit@gmail.com>, fix for Posix interp 888
11454
11455 7/27
11456 ----
11457 subst.c
11458 - param_expand: change fix from 6/23 (expanding $* in a context where
11459 word splitting is not performed) to make sure that $* expands to
11460 something before trying to quote the string. Bug and fix from
11461 Andreas Schwab <schwab@suse.de>
11462
11463 lib/readline/bind.c
11464 - _rl_get_string_variable_value: fix a cut-and-paste error that caused
11465 the emacs mode string to be displayed for both vi insert and command
11466 mode strings. Report and fix from Steve Jones <sjml@slohj.org>
11467
11468 7/28
11469 ----
11470 lib/readline/display.c
11471 - update_line: we can't use PROMPT_ENDING_INDEX unless we're testing
11472 against _rl_last_c_pos; if we are testing buffer indices, we need to
11473 use prompt_last_invisible directly. Fixes mode string redisplay issue
11474 with short prompt strings reported by Steve Jones <sjml@slohj.org>
11475
11476 8/4
11477 ---
11478 nojobs.c
11479 - without_job_control: new function, resets child state that's
11480 eventually used to decide whether or not to wait_for children
11481
11482 execute_cmd.c
11483 - initialize_subshell: call without_job_control in both the
11484 JOB_CONTROL and no job control paths so we can reset the state in
11485 subshells that will not cause them to wait_for children
11486 inappropriately. Fixes bug reported by Dan Cross <crossd@gmail.com>
11487
11488 8/5
11489 ---
11490 configure.ac
11491 - release version is now `rc2'
11492
11493 bashline.c
11494 - command_word_completion_function: if direxpand is set, make sure to
11495 run hint_text through bash_directory_completion_hook, since
11496 readline will do that and we want to be able to match the results
11497 readline returns. Fixes bug reported by Pat Somaru
11498 <tuf18542@temple.edu>
11499
11500 command.h
11501 - W_COMPLETE: new flag word value
11502 - PF_COMPLETE: new flags value for param_expand
11503
11504 subst.h
11505 - SX_STRIPDQ: new flag, used for string_extract_double_quoted
11506
11507 bashline.c
11508 - bash_filename_stat_hook,bash_directory_completion_hook: pass W_COMPLETE
11509 flag to expand_prompt_string
11510
11511 subst.c
11512 - expand_word_internal: if W_COMPLETE in word->flags, pass PF_COMPLETE
11513 to param_expand
11514 - param_expand: if PF_COMPLETE in pflags, pass SX_COMPLETE to
11515 extract_command_subst. This allows `"$(echo ~/' to perform
11516 completion successfully
11517 - string_extract_double_quoted: turn third argument into a flags arg,
11518 old STRIPDQ is now set if flags&SX_STRIPDQ
11519 - string_extract_double_quoted: changed callers, if third argument was
11520 1, pass SX_STRIPDQ instead
11521 - expand_word_internal: if W_COMPLETE in word->flags, pass SX_COMPLETE
11522 in flags to string_extract_double_quoted for case '"'
11523 - string_extract_double_quoted: if SX_COMPLETE in flags, pass it to
11524 extract_command_subst
11525 - expand_word_internal: if W_COMPLETE in word->flags, make sure W_COMPLETE
11526 is in temp word passed to recursive call to expand_word_internal to
11527 expand double-quoted string. Fixes bug reported by John Passaro
11528 <john.a.passaro@gmail.com>
11529
11530 8/9
11531 ---
11532 [bash-4.4-rc2 frozen]
11533
11534 8/10
11535 ----
11536 subst.c
11537 - sub_append_string: use size_t variable to store string length to
11538 avoid integer overflow. Report from Siteshwar Vashisht
11539 <svashisht@redhat.com>
11540 - sub_append_string: `size' argument is now pointer to size_t; changed
11541 istring_index in expand_word_internal to accommodate change
11542
11543 lib/sh/ufuncs.c
11544 - include "posixselect.h" if HAVE_SELECT is defined, make sure that
11545 fd_set and the rest are defined
11546
11547 8/11
11548 ----
11549 lib/readline/histexpand.c
11550 - history_tokenize_word: use ISDIGIT instead of isdigit for more
11551 argument checking
11552 - "chardefs.h": include for ISDIGIT define and <ctype.h>. Fix from
11553 Mike Frysinger <vapier@gentoo.org>
11554
11555 lib/sh/eaccess.c,externs.h
11556 - sh_eaccess: first argument now const char *
11557 - sh_stataccess,sh_euidaccess: first argument now const char *, since
11558 sh_stat and sh_eaccess call them.
11559 Fix from Mike Frysinger <vapier@gentoo.org>
11560
11561 lib/glob/glob.c
11562 - sh_eaccess: change local prototype
11563
11564 general.[ch]
11565 - all_digits,legal_identifier,valid_nameref_value,importable_function_name,
11566 exportable_function_name,check_binary_file,file_exists,file_isdir,
11567 file_iswdir,same_file,make_absolute,valid_nameref_value: first
11568 argument (always identifier or filename) is now a `const char *';
11569 some second filename arguments now `const char *'.
11570 Fix from Mike Frysinger <vapier@gentoo.org>
11571
11572 configure.ac,config.h.in
11573 - uintptr_t: make sure it's defined to an integer type wide enough to
11574 hold a pointer
11575
11576 lib/sh/tmpfile.c
11577 - sh_seedrand: use `uintptr_t' to cast pointer value to int value,
11578 instead of allowing truncation to take place, since srandom takes
11579 an `unsigned int'.
11580 Fix from Mike Frysinger <vapier@gentoo.org>
11581
11582 arrayfunc.[ch]
11583 - valid_array_reference,array_variable_name,array_variable_part,
11584 array_value_internal,array_value,get_array_value: first argument
11585 (always variable name) now a `const char *'
11586 Fix from Mike Frysinger <vapier@gentoo.org>
11587
11588 8/19
11589 ----
11590 print_cmd.c
11591 - xtrace_print_word_list: if (xtflags & 2), don't try to quote the
11592 words in the LIST argument. Intended to be used in places where
11593 the list has not yet been expanded
11594 - xtrace_print_for_command_head: call xtrace_print_word_list with
11595 flags argument of 2. Fixes issue reported by Aharon Robbins
11596 <arnold@skeeve.com>
11597 - xtrace_print_select_command_head: call xtrace_print_word_list with
11598 flags argument of 2
11599
11600 8/21
11601 ----
11602 lib/sh/netopen.c
11603 - netopen: fix memory leak by freeing allocated path before error
11604 return. Fix from Dmitry Goncharov <dgoncharov@users.sf.net>
11605
11606 doc/{bash.1,bashref.texi}
11607 - change conditional commands description to make it clearer that
11608 bash doesn't emulate /dev/fd if the OS provides it
11609
11610 8/22
11611 ----
11612 braces.c
11613 - expand_amble: free partial and tem on failure to allocate memory
11614 for merged partial+result strvec. Fix from Dmitry Goncharov
11615 <dgoncharov@users.sf.net>
11616
11617 8/23
11618 ----
11619 jobs.c
11620 - wait_for: don't call get_tty_state when a job finishes if we're
11621 running it as part of programmable completion. We test
11622 rl_readline_state. Fixes bug reported by Jaro Punta
11623 <silly8888@gmail.com>
11624
11625 8/24
11626 ----
11627 subst.c
11628 - pat_subst: fix memory leak (mstr). Fix from Dmitry Goncharov
11629 <dgoncharov@users.sf.net>
11630 - split_at_delims: fix memory leak (d2). Fix from Dmitry Goncharov
11631 <dgoncharov@users.sf.net>
11632
11633 8/26
11634 ----
11635 subst.c
11636 - match_upattern,match_wpattern: make sure that a trailing `*' is
11637 not escaped (preceded by an odd number of backslashes) before we
11638 append a `*' when checking whether a pattern matches anywhere in
11639 the string
11640
11641 lib/readline/{input,signals}.c
11642 - protect instances of SIGQUIT with #ifdef SIGQUIT; apparently
11643 MinGW doesn't define it
11644 - protect instances of SIGHUP with #ifdef SIGHUP; apparently
11645 MinGW doesn't define it. From a report from Simon Sobisch
11646 <simonsobisch@gnu.org>
11647
11648 xmalloc.o
11649 - allocerr: only try to find the break and report it if we're using
11650 the bash malloc; there's no guarantee that any other malloc is
11651 using sbrk()
11652
11653 doc/{bash.1,bashref.texi}
11654 - quote removal: add paragraph mentioning quote removal to beginning
11655 of expansions section, referencing later paragraph. Report from
11656 Michel Lanne <michel.lanne@gmail.com>
11657
11658 8/30
11659 ----
11660 lib/readline/input.c
11661 - protect instances of SIGALRM and SIGWINCH with #ifdef; apparently
11662 MinGW doesn't define them. From a report from Simon Sobisch
11663 <simonsobisch@gnu.org>
11664
11665 subst.c
11666 - SPECIAL_VAR: make sure name is not the empty string before going on,
11667 empty strings can result in unitialized reads
11668 - CHECK_STRING_OVERRUN: semi-general macro to use in *extract* and
11669 similar functions to to check whether a function called to parse an
11670 embedded construct (like a backquoted command substitution) doesn't
11671 consume the entire string because it's unterminated
11672 - skip_double_quoted: make sure other extraction functions don't
11673 consume the entire string (which they can if the construct is
11674 unterminated) before incrementing the index and going on. Uses
11675 CHECK_STRING_OVERRUN
11676 - extract_dollar_brace_string: check for unterminated embedded
11677 constructs consuming the entire string with CHECK_STRING_OVERRUN ('`')
11678 - skip_matched_pair: use CHECK_STRING_OVERRUN to make sure unterminated
11679 embedded "`", $(, ${ don't cause out-of-bounds reads
11680
11681 [bash-4.4 frozen]