Hi Chet, On Fri, 26 Aug 2022 14:28:00 -0400 Chet Ramey <chet.ra...@case.edu> wrote:
> 1. Changes to Bash > > a. Added a compatibility mode feature that causes the parser to parse command > substitutions as if extglob were enabled. If it is enabled before > execution, > parse at execution will succeed. If not, the subsequent execution parse > will > fail. I harbour some concerns as to both the utility and robustness of this. $ declare -p BASH_VERSION declare -- BASH_VERSION="5.2.0(1)-rc3" $ shopt extglob extglob off $ [[ '' = $(shopt extglob >&2) ]] extglob on $ shopt extglob extglob on $ grep -o extglob <<<"$BASHOPTS" | wc -c 0 For extglob to be arbitrarily enabled in either context is unexpected (and undesirable). For BASHOPTS not to be in agreement with the output of shopt is also unexpected. I presume that this is as a consequence of the above-mentioned change. Paradoxically, this breaks one of the QA tests implemented by portage. I say paradoxically because I'm aware that Gentoo requested a concession pertaining to the relationship between the extglob option and the newly recursive parser. To put it in perspective, it transpired that only one ebuild (package) in its 20620-strong repo was affected and that none of the portions of portage that are written in bash were affected (until now). My concern is that these ostensible concessions to backward-compatibility will end up causing more problems than will be solved. -- Kerin Millar