sorry, typo: and in the more recent versions it's a different inconsistency, . is excluded from ? ?? but included in @(?|.?)
should be: and in the more recent versions it's a different inconsistency, . is excluded from ? .? but included in @(?|.?) tho as i said that's a tad askew from... On Mon, Jan 25, 2021 at 3:36 PM gregrwm <rhn-us...@greatlakedata.com> wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -g -O2 > -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong > -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security > uname output: Linux e540 5.4.0-60-generic #67-Ubuntu SMP Tue Jan 5 > 18:31:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux > Machine Type: x86_64-pc-linux-gnu > > Bash Version: 5.0 > Patch Level: 17 > Release Status: release > > Description: > . and .. are excluded from @(?|.?) in > bash 4.2.46(2)-release (CentOS 7.8), but are included in > bash 4.4.19(1)-release (CentOS 8.2) and > bash 5.0.17(1)-release (Ubuntu 20.04/focal). > > is this change in functionality a regression, a "fix", or a new > feature? > is there any option to exclude them? > > in all 3, .. is included in .? > > so oddly in centos7 .. is included in .? but excluded from @(?|.?) > > and in the more recent versions it's a different inconsistency, . > is excluded from ? ?? but included in @(?|.?) > > but that's a bit askew from what actually interests me. if i had > my druthers, there would be an option to set so . and .. would never match > any (sub)glob other than their literal selves (even with dotglob set). > > Repeat-By: > $ echo $BASH_VERSION > 4.2.46(2)-release > $ cat /etc/centos-release > CentOS Linux release 7.8.2003 (Core) > $ echo $BASHOPTS > > checkwinsize:cmdhist:dotglob:expand_aliases:extglob:extquote:force_fignore:globstar:histappend:histreedit:histverify:hostcomplete:interactive_comments:nocaseglob:nocasematch:progcomp:promptvars > $ touch a .b > $ echo ? ?? > a .b > $ echo ? .? #.. is included > a .. .b > $ echo @(?|??) > a .b > $ echo @(?|.?) #. and .. are excluded > a .b > $ > > $ echo $BASH_VERSION > 4.4.19(1)-release > $ cat /etc/centos-release > CentOS Linux release 8.2.2004 (Core) > $ echo $BASHOPTS > > checkwinsize:cmdhist:complete_fullquote:dotglob:expand_aliases:extglob:extquote:force_fignore:globstar:histappend:histreedit:histverify:hostcomplete:interactive_comments:nocaseglob:nocasematch:progcomp:promptvars > $ touch a .b > $ echo ? ?? > a .b > $ echo ? .? #.. is included > a .. .b > $ echo @(?|??) > a .b > $ echo @(?|.?) #. and .. are included > . .. a .b > $ > > $ echo $BASH_VERSION > 5.0.17(1)-release > $ cat /etc/lsb-release > DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=20.04 > DISTRIB_CODENAME=focal > DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS" > $ echo $BASHOPTS > > checkwinsize:cmdhist:complete_fullquote:dotglob:expand_aliases:extglob:extquote:force_fignore:globasciiranges:globstar:histappend:histreedit:histverify:interactive_comments:login_shell:nocaseglob:nocasematch:progcomp:p > $ touch a .b > $ echo ? ?? > a .b > $ echo ? .? #.. is included > a .. .b > $ echo @(?|??) > a .b > $ echo @(?|.?) #. and .. are included > . .. a .b > $ shopt -u dotglob > $ echo ? ?? > a ?? > $ echo ? .? #even with dotglob off .. is still matched > a .. .b > $ echo @(?|??) > a > $ echo @(?|.?) #. is excluded but .. is included > .. a .b > $ >