use SET_LINE_NUMBER to avoid overwriting line_number_for_err trap
while executing the ERR trap. Tentative fix for `caller' problem
reported by Quinn Grier <quinn@quinngrier.com>
+
+configure.ac,patchlevel.h
+ - set bash version to 5.2-devel, meaning shell_compatibility_level = 52,
+ which required updating tests (array.tests, array21.sub,
+ quotearray3.sub, new-exp10.sub, history2.sub). The first three are
+ because bash-5.2 flushes an indexed array but does not unset the
+ variable when given `unset a[@]' or `unset[*]' (that is, it acts
+ like `a=()' instead of `unset a').
tests/tilde.right f
tests/tilde2.tests f
tests/tilde2.right f
+tests/tilde3.sub f
tests/trap.tests f
tests/trap.right f
tests/trap1.sub f 755
-# Makefile for bash-5.0, version 4.31
+# Makefile for bash-5.2, version 5.1
#
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
/* alias.c -- Not a full alias, but just the kind that we use in the
shell. Csh style alias is somewhere else (`over there, in a box'). */
-/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
* chet@ins.cwru.edu
*/
-/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* array.h -- definitions for the interface exported by array.c that allows
the rest of the shell to manipulate array variables. */
-/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* assoc.h -- definitions for the interface exported by assoc.c that allows
the rest of the shell to manipulate associative array variables. */
-/* Copyright (C) 2008,2009-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2008,2009-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* bashansi.h -- Typically included information required by picky compilers. */
-/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* bashhist.c -- bash interface to the GNU history library. */
-/* Copyright (C) 1993-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* bashjmp.h -- wrapper for setjmp.h with necessary bash definitions. */
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* builtins.h -- What a builtin looks like, and where to find them. */
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
# This Makefile for building libbuiltins.a is in -*- text -*- for Emacs.
#
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
/* bashgetopt.c -- `getopt' for use by the builtins. */
-/* Copyright (C) 1992-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* bashgetopt.h -- extern declarations for stuff defined in bashgetopt.c. */
-/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is bind.def, from which is created bind.c.
It implements the builtin "bind" in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is complete.def, from which is created complete.c.
It implements the builtins "complete", "compgen", and "compopt" in Bash.
-Copyright (C) 1999-2020 Free Software Foundation, Inc.
+Copyright (C) 1999-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* evalstring.c - evaluate a string as one or more shell commands. */
-/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is exec.def, from which is created exec.c.
It implements the builtin "exec" in Bash.
-Copyright (C) 1987-2019 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is exit.def, from which is created exit.c.
It implements the builtins "exit", and "logout" in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* gen-helpfiles - create files containing builtin help text */
-/* Copyright (C) 2012-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is hash.def, from which is created hash.c.
It implements the builtin "hash" in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is help.def, from which is created help.c.
It implements the builtin "help" in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is history.def, from which is created history.c.
It implements the builtin "history" in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* mkbuiltins.c - Create builtins.c, builtext.h, and builtdoc.c from
a single source file called builtins.def. */
-/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is set.def, from which is created set.c.
It implements the "set" and "unset" builtins in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is setattr.def, from which is created setattr.c.
It implements the builtins "export" and "readonly", in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is trap.def, from which is created trap.c.
It implements the builtin "trap" in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is ulimit.def, from which is created ulimit.c.
It implements the builtin "ulimit" in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
This file is wait.def, from which is created wait.c.
It implements the builtin "wait" in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* config-bot.h */
/* modify settings or make new ones based on what autoconf tells us. */
-/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* config-top.h - various user-settable options not under the control of autoconf. */
-/* Copyright (C) 2002-2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
#! /bin/sh
-# From configure.ac for Bash 5.1, version 5.034.
+# From configure.ac for Bash 5.2, version 5.036.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for bash 5.1-maint.
+# Generated by GNU Autoconf 2.71 for bash 5.2-devel.
#
# Report bugs to <bug-bash@gnu.org>.
#
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
-PACKAGE_VERSION='5.1-maint'
-PACKAGE_STRING='bash 5.1-maint'
+PACKAGE_VERSION='5.2-devel'
+PACKAGE_STRING='bash 5.2-devel'
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.1-maint to adapt to many kinds of systems.
+\`configure' configures bash 5.2-devel 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.1-maint:";;
+ short | recursive ) echo "Configuration of bash 5.2-devel:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bash configure 5.1-maint
+bash configure 5.2-devel
generated by GNU Autoconf 2.71
Copyright (C) 2021 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.1-maint, which was
+It was created by bash $as_me 5.2-devel, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
ac_config_headers="$ac_config_headers config.h"
-BASHVERS=5.1
-RELSTATUS=maint
+BASHVERS=5.2
+RELSTATUS=devel
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.1-maint, which was
+This file was extended by bash $as_me 5.2-devel, which was
generated by GNU Autoconf 2.71. 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.1-maint
+bash config.status 5.2-devel
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_REVISION([for Bash 5.1, version 5.034])dnl
+AC_REVISION([for Bash 5.2, version 5.036])dnl
-define(bashvers, 5.1)
-define(relstatus, maint)
+define(bashvers, 5.2)
+define(relstatus, devel)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
/* error.c -- Functions for handling errors. */
-/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* eval.c -- reading and evaluating commands. */
-/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
host_cpu = @host_cpu@
host_vendor = @host_vendor@
+STYLE_CFLAGS = @STYLE_CFLAGS@
CFLAGS = @CFLAGS@
LOCAL_CFLAGS = @LOCAL_CFLAGS@
DEFS = @DEFS@
INTL_INC = @INTL_INC@
LIBINTL_H = @LIBINTL_H@
-CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(CFLAGS)
+CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(STYLE_CFLAGS)
#
# These values are generated for configure by ${topdir}/support/shobj-conf.
/* We are in a subshell, so forget that we are running a trap handler or
that the signal handler has changed (we haven't changed it!) */
+ /* XXX - maybe do this for `real' signals and not ERR/DEBUG/RETURN/EXIT
+ traps? */
if (running_trap > 0)
{
run_trap_cleanup (running_trap - 1);
-itrace("execute_in_subshell: setting running_trap = 0");
running_trap = 0; /* XXX - maybe leave this */
}
/* expr.c -- arithmetic expression evaluation. */
-/* Copyright (C) 1990-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1990-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* flags.c -- Everything about flags except the `set' command. That
is in builtins.c */
-/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* general.c -- Stuff that is used by all files. */
-/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* general.h -- defines that everybody likes to use. */
-/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* hashcmd.c - functions for managing a hash table mapping command names to
full pathnames. */
-/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* chartypes.h -- extend ctype.h */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* posixdir.h -- Posix directory reading includes and defines. */
-/* Copyright (C) 1987,1991,2012 Free Software Foundation, Inc.
+/* Copyright (C) 1987,1991,2012,2019,2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* posixtime.h -- wrapper for time.h, sys/times.h mess. */
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* Multibyte character data type.
- Copyright (C) 2001, 2005-2007, 2009-2010 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005-2007, 2009-2010, 2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* stdc.h -- macros to make source compile on both ANSI C and K&R C
compilers. */
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* typemax.h -- encapsulate max values for long, long long, etc. */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* input.c -- functions to perform buffered input with synchronization. */
-/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* This file works with both POSIX and BSD systems. It implements job
control. */
-/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* File-name wildcard pattern matching for GNU.
- Copyright (C) 1985-2020 Free Software Foundation, Inc.
+ Copyright (C) 1985-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne-Again SHell.
# Skeleton Makefile for the GNU malloc code
#
-# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
/* malloc.c - dynamic memory allocation for bash. */
-/* Copyright (C) 1985-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1985-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne-Again SHell.
/* mstats.h - definitions for malloc statistics */
-/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne-Again SHell.
/* chardefs.h -- Character definitions for readline. */
-/* Copyright (C) 1994-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2021 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
/* xmalloc.h -- memory allocation that aborts on errors. */
-/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2009,2010-2021 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
# #
####################################################################
-# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
/* make_cmd.c -- Functions for making instances of the various
parser constructs. */
-/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* This file works under BSD, System V, minix, and Posix systems. It does
not implement job control. */
-/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* parser.h -- Everything you wanted to know about the parser, but were
afraid to ask. */
-/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 8
+#define PATCHLEVEL 0
#endif /* _PATCHLEVEL_H_ */
/* pcomplete.c - functions to generate lists of matches for programmable completion. */
-/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* pcomplib.c - library functions for programmable completion. */
-/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* print_command -- A way to make readable commands from a command tree. */
-/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* redir.h - functions from redir.c. */
-/* Copyright (C) 1997, 2001, 2005, 2008, 2009-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2005, 2008, 2009-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* shell.c -- GNU's idea of the POSIX shell specification. */
-/* Copyright (C) 1987-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* shell.h -- The data structures used by the shell */
-/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* sig.c - interface for shell signal handlers and signal initialization. */
-/* Copyright (C) 1994-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* sig.h -- header file for signal handler definitions. */
-/* Copyright (C) 1994-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
#
# Currently only man2html is built
#
-# Copyright (C) 1998-2018 Free Software Foundation, Inc.
+# Copyright (C) 1998-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# chet@cwru.edu and, optionally, to bash-testers@cwru.edu.
# Other versions send mail to bug-bash@gnu.org.
#
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# chet@cwru.edu and, optionally, to bash-testers@cwru.edu.
# Other versions send mail to bug-bash@gnu.org.
#
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
/* bashversion.c -- Display bash version information. */
-/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* signames.c -- Create an array of signal names. */
-/* Copyright (C) 2006-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* Modified to run with the GNU shell Apr 25, 1988 by bfox. */
-/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* test.h -- external interface to the conditional command code. */
-/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
-BUILD_DIR=/usr/local/build/bash/bash-current
+BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
declare -a b=([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")
declare -ar c
declare -a d=([1]="test test")
+declare -a e=()
declare -a f=([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")
./array.tests: line 135: unset: ps1: not an array variable
./array.tests: line 139: declare: c: cannot destroy array variables in this way
declare -a b=([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")
declare -ar c
declare -a d=([1]="test test")
+declare -a e=()
declare -a f=([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")
declare -a rv=([0]="this" [1]="is" [2]="a" [3]="test" [4]="of" [5]="read" [6]="using" [7]="arrays")
abde
declare -a a=([1]="2" [2]="3" [3]="4")
abcd
unset
-./array21.sub: line 30: typeset: a: not found
+declare -a a=()
declare -A A=([four]="4" [two]="2" [three]="3" [one]="1" )
declare -a a=()
declare -A A=()
one
two
three
-5.1
+5.2
echo ${BASH_VERSION%\.*}
-5.1
+5.2
echo ${BASH_VERSION%\.*}
a
b
<'ab cd'>
<'4'> <'ab cd'>
<>
-argv[1] = <host(2)[5.1]$ >
+argv[1] = <host(2)[5.2]$ >
<
>
<' \t\n'>
declare -A assoc=(["!"]="bang" ["@"]="at" )
declare -A assoc=(["!"]="bang" )
declare -a array=([0]="1" [1]="2" [2]="3")
-./quotearray3.sub: line 94: declare: array: not found
+declare -a array=()
./quotearray3.sub: line 98: declare: array: not found
declare -A map=(["foo\$(uname >/dev/tty)bar"]="1" )
1
cd "$wdir"
+# this test is incomplete; should also test assignment statements (tilde3.sub)
+echo foo=bar:~
+set -o posix
echo foo=bar:~
-set -o posix; echo foo=bar:~
exit 0
/usr/$x/abc
HOME=/usr/$x/abc
/usr/$x/abc
+foo=/home/xyz:/home/xyz
+/home/xyz:/home/xyz
+foo=~:~
+/home/xyz:/home/xyz
eval echo $h
eval $h
echo $HOME
+
+$THIS_SH ./tilde3.sub
--- /dev/null
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# regression test for tilde expansion following unquoted colons in posix mode
+
+HOME=/home/xyz
+
+echo foo=~:~
+foo=~:~
+printf "%s\n" $foo
+
+set -o posix
+
+echo foo=~:~
+foo=~:~
+printf "%s\n" $foo
/* trap.h -- data structures used in the trap mechanism. */
-/* Copyright (C) 1993-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* variables.c -- Functions for hacking shell variables. */
-/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* variables.h -- data structures for shell variables. */
-/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
/* version.c -- distribution and version numbers. */
-/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
#endif
const char * const sccs_version = SCCSVERSION;
-const char * const bash_copyright = N_("Copyright (C) 2020 Free Software Foundation, Inc.");
+const char * const bash_copyright = N_("Copyright (C) 2021 Free Software Foundation, Inc.");
const char * const bash_license = N_("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
/* If == 31, shell compatible with bash-3.1, == 32 with bash-3.2, and so on */
/* version.c -- distribution and version numbers. */
-/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
#endif
const char * const sccs_version = SCCSVERSION;
-const char * const bash_copyright = N_("Copyright (C) 2020 Free Software Foundation, Inc.");
+const char * const bash_copyright = N_("Copyright (C) 2021 Free Software Foundation, Inc.");
const char * const bash_license = N_("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
/* If == 31, shell compatible with bash-3.1, == 32 with bash-3.2, and so on */