]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.1-rc3 release bash-5.1-testing bash-5.1-rc3
authorChet Ramey <chet.ramey@case.edu>
Tue, 17 Nov 2020 19:18:49 +0000 (14:18 -0500)
committerChet Ramey <chet.ramey@case.edu>
Tue, 17 Nov 2020 19:18:49 +0000 (14:18 -0500)
19 files changed:
CHANGES
CWRU/changelog
MANIFEST
NEWS
array.h
config-top.h
configure
configure.ac
lib/readline/isearch.c
subst.c
test.c
tests/assoc.right
tests/assoc9.sub
tests/casemod.right
tests/casemod.tests
tests/glob.right
tests/glob.tests
tests/glob9.sub [new file with mode: 0644]
tests/history5.sub

diff --git a/CHANGES b/CHANGES
index ef80e17e3c1d0b93358bf85757853d3330c2b253..7a47c7c57a8899e55d57204791d247a2a041f5bc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,23 @@
+This document details the changes between this version, bash-5.1-rc3, and
+the previous version, bash-5.1-rc2.
+
+1. Changes to Bash
+
+a. The `assoc_expand_once' option now affects the evaluation of the -v primary
+   to test and the [[ compound command.
+
+2. Changes to Readline
+
+a. Fixed a bug that could cause point to be set beyond the end of the line
+   buffer when aborting an incremental search.
+
+3. New Features in Bash
+
+4. New Features in Readline
+
+------------------------------------------------------------------------------
 This document details the changes between this version, bash-5.1-rc2, and
-the previous version, bash-5.1-beta.
+the previous version, bash-5.1-rc1.
 
 1. Changes to Bash
 
@@ -599,7 +617,8 @@ e. rl-clear-display: new bindable command that clears the screen and, if
 
 f. New active mark and face feature: when enabled, it will highlight the text
    inserted by a bracketed paste (the `active region') and the text found by
-   incremental and non-incremental history searches.
+   incremental and non-incremental history searches. This is tied to bracketed
+   paste and can be disabled by turning off bracketed paste.
 
 g. Readline sets the mark in several additional commands.
 
index edb74c8f6d0b8aa4c87ebb78ae5de18cc232ca08..ee5d16274d42e459dc3d6720bcf9b7e5991b9cfd 100644 (file)
@@ -9153,3 +9153,19 @@ lib/readline/isearch.c
          Report from Detlef Vollmann <dv@vollmann.ch>
 
 [bash-5.1-rc2 frozen]
+
+                                  11/10
+                                  -----
+lib/readline/isearch.c
+       - _rl_isearch_dispatch: if we are aborting the search, make sure to
+         call _rl_fix_point and to make sure the point and mark are less
+         than the new rl_end, in case they got out of sync. Report and fix
+         from Tillmann Osswald <tosswald@ernw.de>
+
+test.c
+       - unary_test: assume the argument has already been expanded (the code
+         paths for [[ and [ expand it) and add AV_NOEXPAND to the flags passed
+         to array_value if assoc_expand_once is enabled. Prompted by a report
+         from Greg Wooledge <wooledg@eeg.ccf.org>
+
+[bash-5.1-rc3 frozen]
index bb1c0ac9cd920ae8bf6243ed6b3e10c70fa4a2a8..54f327cf409eee5b1fc526bc62cea2beb78ad8c4 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1118,6 +1118,7 @@ tests/glob5.sub           f
 tests/glob6.sub                f
 tests/glob7.sub                f
 tests/glob8.sub                f
+tests/glob9.sub                f
 tests/glob.right       f
 tests/globstar.tests   f
 tests/globstar.right   f
diff --git a/NEWS b/NEWS
index f59dfa21a88a738e9f2da1f3e3bbdddd73503c14..a6170be85e271dcce97f3032dac1ce264c347c2d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -167,7 +167,8 @@ e. rl-clear-display: new bindable command that clears the screen and, if
 
 f. New active mark and face feature: when enabled, it will highlight the text
    inserted by a bracketed paste (the `active region') and the text found by
-   incremental and non-incremental history searches.
+   incremental and non-incremental history searches. This is tied to bracketed
+   paste and can be disabled by turning off bracketed paste.
 
 g. Readline sets the mark in several additional commands.
 
diff --git a/array.h b/array.h
index fe218470c61c18dac398b3204ac0ec5b5ad03f28..189d646f2b012bc66986a2b7824b9dd305d05103 100644 (file)
--- a/array.h
+++ b/array.h
@@ -33,8 +33,8 @@ typedef struct array {
        enum atype      type;
        arrayind_t      max_index;
        int             num_elements;
-       struct array_element *lastref;
        struct array_element *head;
+       struct array_element *lastref;
 } ARRAY;
 
 typedef struct array_element {
index a96b5587ce89b9f7eda3aa12b8d2dd67ea15d9d8..735f75e317944707b7e97932ec74076e60a41d2b 100644 (file)
    which can be fooled under certain not-uncommon circumstances. */
 /* #define SSH_SOURCE_BASHRC */
 
-/* Define if you want the case-capitalizing operators (~[~]) and the
+/* Define if you want the case-toggling operators (~[~]) and the
    `capcase' variable attribute (declare -c). */
-#define  CASEMOD_CAPCASE
+/* TAG: bash-5.2 disable */
+#define CASEMOD_TOGGLECASE
+#define CASEMOD_CAPCASE
 
 /* This is used as the name of a shell function to call when a command
    name is not found.  If you want to name it something other than the
index ee6973a393967b4936f7abea2b68b7857740cf07..13a19874f2ad5aa92149580a08da6b68024ec5a5 100755 (executable)
--- a/configure
+++ b/configure
@@ -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-rc2.
+# Generated by GNU Autoconf 2.69 for bash 5.1-rc3.
 #
 # 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-rc2'
-PACKAGE_STRING='bash 5.1-rc2'
+PACKAGE_VERSION='5.1-rc3'
+PACKAGE_STRING='bash 5.1-rc3'
 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-rc2 to adapt to many kinds of systems.
+\`configure' configures bash 5.1-rc3 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-rc2:";;
+     short | recursive ) echo "Configuration of bash 5.1-rc3:";;
    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-rc2
+bash configure 5.1-rc3
 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-rc2, which was
+It was created by bash $as_me 5.1-rc3, 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=rc2
+RELSTATUS=rc3
 
 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-rc2, which was
+This file was extended by bash $as_me 5.1-rc3, 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-rc2
+bash config.status 5.1-rc3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 5b2fe4d7774b5b04dc168eae3e21e8bf6a7c05d5..dbdc5b856dda4c7a05af5e6c72ce3cf56e27265d 100644 (file)
@@ -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, rc2)
+define(relstatus, rc3)
 
 AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
 
index ef65e5f553df66beea5726a9d4ead3497509a17b..080ba3cbb9c56ca617a306873c731b55ef561e0e 100644 (file)
@@ -619,6 +619,7 @@ opcode_dispatch:
       rl_restore_prompt();
       rl_clear_message ();
 
+      _rl_fix_point (1);       /* in case save_line and save_point are out of sync */
       return -1;
 
     case -5:   /* C-W */
diff --git a/subst.c b/subst.c
index 915fd50beacd0b8023d875df3a41ffbbb48f1bde..9ccbf3366d5c58cbb56ec8ad913c872c7f31ccc5 100644 (file)
--- a/subst.c
+++ b/subst.c
@@ -8820,12 +8820,12 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
   else
 #if defined (CASEMOD_EXPANSIONS)
     /* To enable case-toggling expansions using the `~' operator character
-       define CASEMOD_CAPCASE in config-top.h */
-#  if defined (CASEMOD_CAPCASE)
+       define CASEMOD_TOGGLECASE in config-top.h */
+#  if defined (CASEMOD_TOGGLECASE)
     name = string_extract (string, &t_index, "#%^,~:-=?+/@}", SX_VARNAME);
 #  else
     name = string_extract (string, &t_index, "#%^,:-=?+/@}", SX_VARNAME);
-#  endif /* CASEMOD_CAPCASE */
+#  endif /* CASEMOD_TOGGLECASE */
 #else
     name = string_extract (string, &t_index, "#%:-=?+/@}", SX_VARNAME);
 #endif /* CASEMOD_EXPANSIONS */
diff --git a/test.c b/test.c
index ed1d3ffc7d0df602331f31bdf5f7c7d2b28f1063..e2fd78b359e92804f03b5852397196c4b7f3db70 100644 (file)
--- a/test.c
+++ b/test.c
@@ -627,8 +627,11 @@ unary_test (op, arg)
       if (valid_array_reference (arg, 0))
        {
          char *t;
-         int rtype, ret;
-         t = array_value (arg, 0, 0, &rtype, (arrayind_t *)0);
+         int rtype, ret, flags;
+
+         /* Let's assume that this has already been expanded once. */
+         flags = assoc_expand_once ? AV_NOEXPAND : 0;
+         t = array_value (arg, 0, flags, &rtype, (arrayind_t *)0);
          ret = t ? TRUE : FALSE;
          if (rtype > 0)        /* subscript is * or @ */
            free (t);
index d176bcd47f97d37ebc8509461e47dca5ad1aecd5..e9aa9172cb7d670957fb7d791971b36a27f62532 100644 (file)
@@ -222,6 +222,7 @@ declare -A a=(["80's"]="Depeche Mode" )
 1+5
 declare -A a=(["\$(date >&2)"]="5" )
 declare -A myarray=([foo]="bleh" ["foo[bar"]="bleh" )
+foo
 ./assoc10.sub: line 14: declare: a: cannot convert indexed to associative array
 f: declare -a a
 ./assoc10.sub: line 17: declare: a: cannot convert associative to indexed array
index 8f2a23be4c28b5e42642e4c1fe54d1743c3208ed..b88671873e326f7e34877298ee1f80b9136654be 100644 (file)
@@ -121,3 +121,10 @@ declare myarray["foo[bar"]=bleh
 myarray["foo"]=bleh
 
 declare -p myarray
+
+key='$(date >&2)'
+declare -A aa
+aa[$key]=foo
+echo "${aa[$key]}"
+
+[[ -v aa[$key] ]] || echo bad assoc expansion
index a5840171d3b4500cd50cc4484c1b7a49e884c479..df12475478580f440e1e73aebf7a2982b9b432f5 100644 (file)
@@ -43,7 +43,5 @@ Be Conservative in what you send and Liberal in what you accept
 BE CONSERVATIVE IN WHAT YOU SEND AND LIBERAL IN WHAT YOU ACCEPT
 Be conservative in what you send and liberal in what you accept
 BE CONSERVATIVE IN WHAT YOU SEND AND LIBERAL IN WHAT YOU ACCEPT
-AcknOwlEdgEmEnt acknOwlEdgEmEnt
-oeNoPHiLe OEnOphIlE
 abcdexyz
 ABCDEXYZ
index 20cb1cf5b374fd989b29174d14df6219c21d75b5..56ab20d956ed5b9a6b76b1fe45e20628e96f736f 100644 (file)
@@ -114,8 +114,8 @@ echo ${TEXT2^^}
 M1=${S1^^[aeiou]}
 M2=${U2,,[AEIOU]}
 
-echo ${M1} ${M1~}
-echo ${M2} ${M2~~}
+#echo ${M1} ${M1~}
+#echo ${M2} ${M2~~}
 
 declare -l lower=aBcDe
 lower+=XyZ
index 8ba1acfe362f52f8722e5452a5ad8714c5252417..9496690502b1799eba1c5793eff058f01324e246 100644 (file)
@@ -119,6 +119,8 @@ searchable/.
 6:
 a\*b
 a\\ 1*b*
+é/*
+é/*
 argv[1] = <a>
 argv[2] = <abc>
 argv[3] = <abd>
@@ -133,7 +135,7 @@ argv[2] = <abc>
 argv[3] = <abd>
 argv[4] = <abe>
 tmp/l1 tmp/l2 tmp/*4 tmp/l3
-./glob.tests: line 64: no match: tmp/*4
+./glob.tests: line 65: no match: tmp/*4
 argv[1] = <bdir/>
 argv[1] = <*>
 argv[1] = <a*>
index 9005e4de84fe5a1f9c1a16ee79cd1859019ed3ed..b35d7336ff693ecc871e00feaa7cb02b0551f611 100644 (file)
@@ -29,6 +29,7 @@ ${THIS_SH} ./glob5.sub
 ${THIS_SH} ./glob6.sub
 ${THIS_SH} ./glob7.sub
 ${THIS_SH} ./glob8.sub
+${THIS_SH} ./glob9.sub
 
 MYDIR=$PWD     # save where we are
 
diff --git a/tests/glob9.sub b/tests/glob9.sub
new file mode 100644 (file)
index 0000000..ef2af2b
--- /dev/null
@@ -0,0 +1,13 @@
+LANG=en_US.UTF-8       # safest
+: ${TMPDIR:=/var/tmp}
+HOME=${TMPDIR}
+
+mkdir ~/ಇಳಿಕೆಗಳು
+touch ~/ಇಳಿಕೆಗಳು/{a,b}.txt
+echo ~/ಇಳಿಕೆಗಳು/*.txt >/dev/null
+
+rm -rf ${TMPDIR}/ಇಳಿಕೆಗಳು
+
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
+echo é/*
+echo 'é'/*
index c44ace8ad9ddbd38ce6703c1bda90ab505010f6b..245c28d0d90fb83b7006eaf32e5139c02861e433 100644 (file)
@@ -12,9 +12,9 @@
 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-trap 'rm -f $HISTFILE' 0 1 2 3 6 15
+trap 'rm -f "$OUT"' 0 1 2 3 6 15
 
-HISTFILE=$TMPDIR/fchist-$$
+HISTFILE=$TMPDIR/fchist-$$ ; OUT=$HISTFILE
 unset HISTIGNORE HISTCONTROL
 set -o history
 
@@ -53,3 +53,5 @@ fc -l 1 99
 # other out-of-range behavior for future work
 echo out of range 4
 fc -l -20 -40
+
+unset HISTFILE # suppress writing history file