On 10/2/22 4:51 AM, Kerin Millar wrote:

$ declare -p BASH_VERSION
declare -- BASH_VERSION="5.2.0(1)-release"
$ BASH_COMPAT=50; shopt extglob; : $(: $(: $(:))); shopt extglob
extglob         off
extglob         on

Thanks for the report. I've attached the patch I applied to fix this.

--
``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/
*** ../bash-5.2-patched/parse.y 2022-08-31 11:47:03.000000000 -0400
--- parse.y     2022-10-05 11:55:18.000000000 -0400
***************
*** 4230,4234 ****
    sh_parser_state_t ps;
    sh_input_line_state_t ls;
!   int orig_ind, nc, sflags, start_lineno;
    char *ret, *ep, *ostring;
  
--- 4230,4234 ----
    sh_parser_state_t ps;
    sh_input_line_state_t ls;
!   int orig_ind, nc, sflags, start_lineno, local_extglob;
    char *ret, *ep, *ostring;
  
***************
*** 4273,4277 ****
    expand_aliases = 0;
  #if defined (EXTENDED_GLOB)
!   global_extglob = extended_glob;             /* for reset_parser() */
  #endif
  
--- 4273,4277 ----
    expand_aliases = 0;
  #if defined (EXTENDED_GLOB)
!   local_extglob = global_extglob = extended_glob;     /* for reset_parser() */
  #endif
  
***************
*** 4291,4294 ****
--- 4291,4297 ----
    restore_parser_state (&ps);
  
+ #if defined (EXTENDED_GLOB)
+   extended_glob = local_extglob;
+ #endif
    token_to_read = 0;
  

Reply via email to