mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-25 23:03:09 +02:00
commit bash-20201019 snapshot
This commit is contained in:
@@ -9095,3 +9095,35 @@ builtins/trap.def
|
||||
(sigint_sighandler) instead of the default non-interactive one.
|
||||
Fixes bug reported by Daniel Farina <daniel@fdr.io> with a hint
|
||||
from felix <felix@f-hauri.ch>
|
||||
|
||||
10/26
|
||||
-----
|
||||
|
||||
lib/readline/{readline.c,rlprivate.h}
|
||||
- _rl_enable_active_region: new variable, mirrors value of
|
||||
_rl_enable_bracketed_paste
|
||||
- BRACKETED_PASTE_DEFAULT: new define, default initial value of
|
||||
_rl_enable_bracketed_paste and _rl_enable_active_region
|
||||
|
||||
lib/readline/bind.c
|
||||
- hack_special_boolean_var: make sure that _rl_enable_active_region
|
||||
is set appropriately when "enable-bracketed-paste" is modified
|
||||
|
||||
lib/readline/isearch.c
|
||||
- _rl_isearch_dispatch: make sure that we activate the mark on finding
|
||||
the search string only if _rl_enable_active_region is non-zero, even
|
||||
if bracketed paste is enabled
|
||||
|
||||
lib/readline/search.c
|
||||
- noninc_dosearch: make sure that we activate the mark on finding
|
||||
the search string only if _rl_enable_active_region is non-zero, even
|
||||
if bracketed paste is enabled
|
||||
|
||||
lib/readline/kill.c
|
||||
- rl_bracketed_paste_begin: make sure we activate the mark only if
|
||||
_rl_enable_active_region is enabled
|
||||
|
||||
lib/readline/isearch.c
|
||||
- _rl_isearch_dispatch: the requirement for number of available unread
|
||||
characters (bytes) to trigger the bracketed paste test is now
|
||||
BRACK_PASTE_SLEN-1, like for non-incremental searches
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# From configure.ac for Bash 5.1, version 5.022.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for bash 5.1-rc1.
|
||||
# Generated by GNU Autoconf 2.69 for bash 5.1-rc2.
|
||||
#
|
||||
# Report bugs to <bug-bash@gnu.org>.
|
||||
#
|
||||
@@ -581,8 +581,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bash'
|
||||
PACKAGE_TARNAME='bash'
|
||||
PACKAGE_VERSION='5.1-rc1'
|
||||
PACKAGE_STRING='bash 5.1-rc1'
|
||||
PACKAGE_VERSION='5.1-rc2'
|
||||
PACKAGE_STRING='bash 5.1-rc2'
|
||||
PACKAGE_BUGREPORT='bug-bash@gnu.org'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1427,7 +1427,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# 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.1-rc1 to adapt to many kinds of systems.
|
||||
\`configure' configures bash 5.1-rc2 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1492,7 +1492,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bash 5.1-rc1:";;
|
||||
short | recursive ) echo "Configuration of bash 5.1-rc2:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1693,7 +1693,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bash configure 5.1-rc1
|
||||
bash configure 5.1-rc2
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2402,7 +2402,7 @@ cat >config.log <<_ACEOF
|
||||
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.1-rc1, which was
|
||||
It was created by bash $as_me 5.1-rc2, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2800,7 +2800,7 @@ ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
BASHVERS=5.1
|
||||
RELSTATUS=rc1
|
||||
RELSTATUS=rc2
|
||||
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
@@ -21057,7 +21057,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# 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.1-rc1, which was
|
||||
This file was extended by bash $as_me 5.1-rc2, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -21123,7 +21123,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
bash config.status 5.1-rc1
|
||||
bash config.status 5.1-rc2
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
AC_REVISION([for Bash 5.1, version 5.022])dnl
|
||||
|
||||
define(bashvers, 5.1)
|
||||
define(relstatus, rc1)
|
||||
define(relstatus, rc2)
|
||||
|
||||
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
|
||||
|
||||
|
||||
+3
-1
@@ -1812,7 +1812,7 @@ static const struct {
|
||||
{ "convert-meta", &_rl_convert_meta_chars_to_ascii, 0 },
|
||||
{ "disable-completion", &rl_inhibit_completion, 0 },
|
||||
{ "echo-control-characters", &_rl_echo_control_chars, 0 },
|
||||
{ "enable-bracketed-paste", &_rl_enable_bracketed_paste, 0 },
|
||||
{ "enable-bracketed-paste", &_rl_enable_bracketed_paste, V_SPECIAL },
|
||||
{ "enable-keypad", &_rl_enable_keypad, 0 },
|
||||
{ "enable-meta-key", &_rl_enable_meta, 0 },
|
||||
{ "expand-tilde", &rl_complete_with_tilde_expansion, 0 },
|
||||
@@ -1878,6 +1878,8 @@ hack_special_boolean_var (int i)
|
||||
}
|
||||
else if (_rl_stricmp (name, "show-mode-in-prompt") == 0)
|
||||
_rl_reset_prompt ();
|
||||
else if (_rl_stricmp (name, "enable-bracketed-paste") == 0)
|
||||
_rl_enable_active_region = _rl_enable_bracketed_paste;
|
||||
}
|
||||
|
||||
typedef int _rl_sv_func_t PARAMS((const char *));
|
||||
|
||||
@@ -357,7 +357,7 @@ _rl_isearch_dispatch (_rl_search_cxt *cxt, int c)
|
||||
|
||||
/* XXX - experimental code to allow users to bracketed-paste into the search
|
||||
string even when ESC is one of the isearch-terminators. Not perfect yet. */
|
||||
if (_rl_enable_bracketed_paste && c == ESC && strchr (cxt->search_terminators, c) && (n = _rl_nchars_available ()) > (2*BRACK_PASTE_SLEN-1))
|
||||
if (_rl_enable_bracketed_paste && c == ESC && strchr (cxt->search_terminators, c) && (n = _rl_nchars_available ()) > (BRACK_PASTE_SLEN-1))
|
||||
{
|
||||
j = _rl_read_bracketed_paste_prefix (c);
|
||||
if (j == 1)
|
||||
@@ -680,7 +680,8 @@ opcode_dispatch:
|
||||
free (paste);
|
||||
break;
|
||||
}
|
||||
rl_activate_mark ();
|
||||
if (_rl_enable_active_region)
|
||||
rl_activate_mark ();
|
||||
if (cxt->search_string_index + pastelen + 1 >= cxt->search_string_size)
|
||||
{
|
||||
cxt->search_string_size += pastelen + 2;
|
||||
@@ -805,7 +806,8 @@ opcode_dispatch:
|
||||
{
|
||||
cxt->prev_line_found = cxt->lines[cxt->history_pos];
|
||||
rl_replace_line (cxt->lines[cxt->history_pos], 0);
|
||||
rl_activate_mark ();
|
||||
if (_rl_enable_active_region)
|
||||
rl_activate_mark ();
|
||||
rl_point = cxt->sline_index;
|
||||
if (rl_mark_active_p () && cxt->search_string_index > 0)
|
||||
rl_mark = rl_point + cxt->search_string_index;
|
||||
|
||||
+2
-1
@@ -729,7 +729,8 @@ rl_bracketed_paste_begin (int count, int key)
|
||||
buf = _rl_bracketed_text (&len);
|
||||
rl_mark = rl_point;
|
||||
retval = rl_insert_text (buf) == len ? 0 : 1;
|
||||
rl_activate_mark ();
|
||||
if (_rl_enable_active_region)
|
||||
rl_activate_mark ();
|
||||
|
||||
xfree (buf);
|
||||
return (retval);
|
||||
|
||||
@@ -321,7 +321,8 @@ int _rl_show_mode_in_prompt = 0;
|
||||
/* Non-zero means to attempt to put the terminal in `bracketed paste mode',
|
||||
where it will prefix pasted text with an escape sequence and send
|
||||
another to mark the end of the paste. */
|
||||
int _rl_enable_bracketed_paste = 1; /* XXX - for now */
|
||||
int _rl_enable_bracketed_paste = BRACKETED_PASTE_DEFAULT; /* XXX - for now */
|
||||
int _rl_enable_active_region = BRACKETED_PASTE_DEFAULT;
|
||||
|
||||
/* **************************************************************** */
|
||||
/* */
|
||||
|
||||
@@ -312,6 +312,8 @@ extern int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int));
|
||||
extern int _rl_search_getchar PARAMS((_rl_search_cxt *));
|
||||
|
||||
/* kill.c */
|
||||
#define BRACKETED_PASTE_DEFAULT 1
|
||||
|
||||
#define BRACK_PASTE_PREF "\033[200~"
|
||||
#define BRACK_PASTE_SUFF "\033[201~"
|
||||
|
||||
@@ -532,6 +534,7 @@ extern int _rl_revert_all_at_newline;
|
||||
extern int _rl_echo_control_chars;
|
||||
extern int _rl_show_mode_in_prompt;
|
||||
extern int _rl_enable_bracketed_paste;
|
||||
extern int _rl_enable_active_region;
|
||||
extern char *_rl_comment_begin;
|
||||
extern unsigned char _rl_parsing_conditionalized_out;
|
||||
extern Keymap _rl_keymap;
|
||||
|
||||
@@ -192,7 +192,7 @@ noninc_dosearch (char *string, int dir, int flags)
|
||||
|
||||
make_history_line_current (entry);
|
||||
|
||||
if (_rl_enable_bracketed_paste && ((flags & SF_PATTERN) == 0) && ind > 0 && ind < rl_end)
|
||||
if (_rl_enable_active_region && ((flags & SF_PATTERN) == 0) && ind > 0 && ind < rl_end)
|
||||
{
|
||||
rl_point = ind;
|
||||
rl_mark = ind + strlen (string);
|
||||
|
||||
Reference in New Issue
Block a user