On 8/26/22 9:29 PM, Kerin Millar wrote:
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.

Thanks for the report. This was an issue with both constructs using the
same mechanism for parser error recovery and colliding, an easy fix.


For extglob to be arbitrarily enabled in either context is unexpected (and undesirable).

The conditional command behavior is compatible with ksh93, and has been
this way for nearly twenty years. It's documented to behave that way. One
would think people are used to it by now.

The parser change to enable this for backwards compatibility is controlled
by the compatibility mode, and requires an explicit action to enable. It's
a choice to enable compatibility mode, and choices have consequences;
compatibility mode is intended to provide an opportunity to update scripts,
not provide perfect emulation of a previous version.

I understand from Sam James that Gentoo globally forces the compatibility
mode to 5.0. That, too, is a choice.

Paradoxically, this breaks one of the QA tests implemented by portage.

It's certainly ironic.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/


Reply via email to