---
tests/printf7.sub,tests/exec3.sub
- changes to compensate for some system differences (macos/Linux/BSD)
+
+ 7/6
+ ---
+parse.y,input.h
+ - execute_variable_command: takes an additional FLAGS argument; right
+ now only takes one value. If FLAGS != 0, we save and restore the
+ parser state
+
+eval.c,array.h
+ - execute_array_command: takes an additional flags argument to pass to
+ execute_variable_command for each array element
+ - execute_prompt_command: call execute_array_command or execute_variable_command
+ with 0 as the appropriate flags argument, since we don't need to
+ save and restore the parser state at the point we're calling this
+ Fixes bug reported by Carl Johnson <carl.johnson.new.hampshire@gmail.com>
+
+lib/readline/display.c
+ - WRAP_OFFSET: make sure local_prompt_invis_chars is non-null before
+ dereferencing it
+ Fixes bug reported by Tobias Powalowski <tobias.powalowski@pm.me>
+
+ 7/7
+ ---
+lib/readline/mbutil.c
+ - Make sure _rl_mb_strcaseeqn and _rl_mb_charcasecmp are protected by
+ HAVE_MULTIBYTE
+ Report from Bernd Kuhls <bernd@kuhls.net>
+
+lib/readline/doc/rltech.texi
+ - rl_complete_internal: document that the `?' specifier will insert a
+ single completion if the last completion failed, and that `|' will
+ display possible completions unconditionally.
+
+bashline.c
+ - bash_glob_list_expansions: use `|' to force listing possible
+ completions even in the presence of a single completion after previous
+ completion failure
+ Based on report from A4-Tacks <wdsjxhno1001@163.com>
+
+lib/readline/mbutil.c
+ - _rl_utf8_mblen: accept 4-byte UTF-8 characters beginning with 0xF4
+ Report from Collin Funk <collin.funk1@gmail.com>
+
+ 7/8
+ ---
+builtins/printf.def
+ - printstr: only adjust precision if the decoded precision is >= 0,
+ since decodeint returns -1 on overflow/failure
+
#define ALL_ELEMENT_SUB(c) ((c) == '@' || (c) == '*')
/* In eval.c, but uses ARRAY * */
-extern int execute_array_command (ARRAY *, void *);
+extern int execute_array_command (ARRAY *, void *, int);
#endif /* _ARRAY_H_ */
static int
bash_glob_list_expansions (int count, int key)
{
- return bash_glob_completion_internal ('?');
+ return bash_glob_completion_internal ('|');
}
static int
pr = decodeint (&fmt, 1, -1);
/* pr < precision means we adjusted precision in printf_builtin
for the quoted string length (%Q), so we use the adjusted value */
-#if 0 /*TAG:bash-5.4 20250702 */
+#if 1 /*TAG:bash-5.4 20250702 */
if (pr >= 0 && pr < precision)
#else
if (pr < precision)
#! /bin/sh
# From configure.ac for Bash 5.3, version 5.080.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for bash 5.3-rc2.
+# Generated by GNU Autoconf 2.72 for bash 5.3-maint.
#
# Report bugs to <bug-bash@gnu.org>.
#
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
-PACKAGE_VERSION='5.3-rc2'
-PACKAGE_STRING='bash 5.3-rc2'
+PACKAGE_VERSION='5.3-maint'
+PACKAGE_STRING='bash 5.3-maint'
PACKAGE_BUGREPORT='bug-bash@gnu.org'
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-'configure' configures bash 5.3-rc2 to adapt to many kinds of systems.
+'configure' configures bash 5.3-maint to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bash 5.3-rc2:";;
+ short | recursive ) echo "Configuration of bash 5.3-maint:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bash configure 5.3-rc2
+bash configure 5.3-maint
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bash $as_me 5.3-rc2, which was
+It was created by bash $as_me 5.3-maint, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
BASHVERS=5.3
-RELSTATUS=rc2
+RELSTATUS=maint
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bash $as_me 5.3-rc2, which was
+This file was extended by bash $as_me 5.3-maint, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-bash config.status 5.3-rc2
+bash config.status 5.3-maint
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"
AC_REVISION([for Bash 5.3, version 5.080])dnl
define(bashvers, 5.3)
-define(relstatus, rc2)
+define(relstatus, maint)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
#if defined (ARRAY_VARS)
/* Caller ensures that A has a non-zero number of elements */
int
-execute_array_command (ARRAY *a, void *v)
+execute_array_command (ARRAY *a, void *v, int flags)
{
char *tag;
char **argv;
for (i = 0; i < argc; i++)
{
if (argv[i] && argv[i][0])
- execute_variable_command (argv[i], tag);
+ execute_variable_command (argv[i], tag, flags);
}
strvec_dispose (argv);
return 0;
if (array_p (pcv))
{
if ((pcmds = array_cell (pcv)) && array_num_elements (pcmds) > 0)
- execute_array_command (pcmds, "PROMPT_COMMAND");
+ execute_array_command (pcmds, "PROMPT_COMMAND", 0);
return;
}
else if (assoc_p (pcv))
command_to_execute = value_cell (pcv);
if (command_to_execute && *command_to_execute)
- execute_variable_command (command_to_execute, "PROMPT_COMMAND");
+ execute_variable_command (command_to_execute, "PROMPT_COMMAND", 0);
}
/* Call the YACC-generated parser and return the status of the parse.
extern char *read_secondary_line (int);
extern int find_reserved_word (const char *);
extern void gather_here_documents (void);
-extern void execute_variable_command (const char *, const char *);
+extern void execute_variable_command (const char *, const char *, int);
extern int *save_token_state (void);
extern void restore_token_state (int *);
/* Useful shorthand used by rl_redisplay, update_line, rl_move_cursor_relative */
#define INVIS_FIRST() (local_prompt_invis_chars[0])
-#define WRAP_OFFSET(line, offset) ((line <= prompt_last_screen_line) ? local_prompt_invis_chars[line] : 0)
+#define WRAP_OFFSET(line, offset) ((line <= prompt_last_screen_line && local_prompt_invis_chars) ? local_prompt_invis_chars[line] : 0)
#define W_OFFSET(line, offset) ((line) == 0 ? offset : 0)
#define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
@deftypefun int rl_complete_internal (int what_to_do)
Complete the word at or before point.
@var{what_to_do} says what to do with the completion.
-A value of @samp{?} means list the possible completions.
+A value of @samp{?} means list the possible completions,
+but to insert a single completion if the last completion failed to find
+any matches.
+@samp{|} unconditionally lists the possible completions.
@samp{TAB} means do standard completion.
@samp{*} means insert all of the possible completions.
@samp{!} means to display all of the possible completions,
return 3;
}
}
- else if (c < 0xf4)
+ else if (c <= 0xf4)
{
if (n == 1)
return -2;
#endif
}
+#if defined (HANDLE_MULTIBYTE)
/* Compare the first N characters of S1 and S2 without regard to case. If
FLAGS&1, apply the mapping specified by completion-map-case and make
`-' and `_' equivalent. Returns 1 if the strings are equal. */
return 1;
return (wc1 == wc2);
}
+#endif
}
void
-execute_variable_command (const char *command, const char *vname)
+execute_variable_command (const char *command, const char *vname, int flags)
{
char *last_lastarg;
sh_parser_state_t ps;
- save_parser_state (&ps);
+ if (flags)
+ save_parser_state (&ps);
last_lastarg = save_lastarg ();
parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE|SEVAL_NOTIFY);
- restore_parser_state (&ps);
+ if (flags)
+ restore_parser_state (&ps);
bind_lastarg (last_lastarg);
FREE (last_lastarg);
typedef SHELL_VAR **SVFUNC (void);
-#ifndef HAVE_STRPBRK
-extern char *strpbrk (char *, char *);
-#endif
-
extern STRING_INT_ALIST word_token_alist[];
extern char *signal_names[];