On Sun, Aug 31, 2025 at 07:49:57 -0600, Stan Marsh wrote:
> But here's the thing: As far as I can tell, extglob is on-by-default - in all
> the
> versions of bash that I was able to test - so I don't understand why OP is
> messing
> around with turning it on and off. Or why Greg is talking about turning it
> on at the
> top of the script.
There's a compile-time option that you (or your distributor) can use
to change the default. However, if you take the original bash source
tarball and run "./configure" with no options and compile it, extglob
will be off by default.
hobbit:/usr/local/src/bash/bash$ ./configure --help | grep glob
--enable-extended-glob include ksh-style extended pattern matching
--enable-extended-glob-default
--enable-glob-asciiranges-default
hobbit:/usr/local/src/bash/bash$ ./configure --help | grep -A2 glob-default
--enable-extended-glob-default
force extended pattern matching to be enabled by
default