Re: . and .. are included where they were excluded before

2021-01-27 Thread Chet Ramey
On 1/27/21 4:07 AM, pepa65 wrote: On 27/01/2021 14.49, k...@plushkava.net wrote: That's why your .? glob doesn't match the .. pathname. Normally, GLOBIGNORE isn't set. After unsetting GLOBIGNORE: That doesn't unset GLOBIGNORE. $ declare -p GLOBIGNORE declare -x GLOBIGNORE="" Depending o

Re: . and .. are included where they were excluded before

2021-01-27 Thread pepa65
On 27/01/2021 14.49, k...@plushkava.net wrote: > That's why your .? glob doesn't match the .. pathname. Normally, > GLOBIGNORE isn't set. After unsetting GLOBIGNORE: $ declare -p GLOBIGNORE declare -x GLOBIGNORE="" $ shopt -u extglob $ echo @(?|.?) -bash: syntax error near unexpected token `(' $

Re: . and .. are included where they were excluded before

2021-01-26 Thread
On 27/01/2021 07:38, pepa65 wrote: On 27/01/2021 14.30, k...@plushkava.net wrote: Note that declare -p BASH_VERSION would report the version of bash that you're currently running interactively. $ declare -p BASH_VERSION declare -- BASH_VERSION="5.0.17(1)-release" Does declare -p GLOBIGNORE s

Re: . and .. are included where they were excluded before

2021-01-26 Thread pepa65
On 27/01/2021 14.30, k...@plushkava.net wrote: > Note that declare -p BASH_VERSION would report the version of bash that > you're currently running interactively. $ declare -p BASH_VERSION declare -- BASH_VERSION="5.0.17(1)-release" > Does declare -p GLOBIGNORE show that the variable is set? Does

Re: . and .. are included where they were excluded before

2021-01-26 Thread
On 27/01/2021 06:50, pepa65 wrote: On 27/01/2021 04.00, k...@plushkava.net wrote: One example is that gregrwm claims the following outcome for 5.0.17(1) in Ubuntu 20.04:-   $   echo @(?|.?)  #. and .. are included . .. a .b $ cat /etc/issue Ubuntu 20.04.1 LTS \n \l $ bash --version GNU

Re: . and .. are included where they were excluded before

2021-01-26 Thread pepa65
On 27/01/2021 04.00, k...@plushkava.net wrote: > One example is that gregrwm claims the following outcome for 5.0.17(1) > in Ubuntu 20.04:- > >   $   echo @(?|.?)  #. and .. are included > . .. a .b $ cat /etc/issue Ubuntu 20.04.1 LTS \n \l $ bash --version GNU bash, version 5.0.17(1)-releas

Re: . and .. are included where they were excluded before

2021-01-26 Thread L A Walsh
On 2021/01/26 09:08, Chet Ramey wrote: That's the real question: whether or not `.' should match @(?|.?), even when dotglob is enabled (and yes, both patterns have to be in there). There isn't really any other. Since it doesn't match ? when dotglob is enabled, there's an obvious inconsistency th

Re: . and .. are included where they were excluded before

2021-01-26 Thread Chet Ramey
On 1/26/21 4:00 PM, k...@plushkava.net wrote: One example is that gregrwm claims the following outcome for 5.0.17(1) in Ubuntu 20.04:-   $   echo @(?|.?)  #. and .. are included . .. a .b Note that '.' is said to be among the pathnames matched. I don't see how this can possibly be the c

Re: . and .. are included where they were excluded before

2021-01-26 Thread
On 26/01/2021 21:13, Chet Ramey wrote: On 1/26/21 4:00 PM, k...@plushkava.net wrote: One example is that gregrwm claims the following outcome for 5.0.17(1) in Ubuntu 20.04:-    $   echo @(?|.?)  #. and .. are included . .. a .b Note that '.' is said to be among the pathnames matched. I d

Re: . and .. are included where they were excluded before

2021-01-26 Thread
On 26/01/2021 20:49, Chet Ramey wrote: On 1/26/21 3:27 PM, k...@plushkava.net wrote: I'm still worried about some of the curious results shown by your original post but I haven't had a chance to test the same platforms yet. Don't be. CentOS is running a version of bash-4.2 (without even all o

Re: . and .. are included where they were excluded before

2021-01-26 Thread Chet Ramey
On 1/26/21 2:34 PM, gregrwm wrote: you're calling .. an explicit match to .? Yes: the leading `.' is explicitly included. i'd interpret explicit match to mean .. wouldn't match anything other than itself (notwithstanding it's been otherwise for over a decade) That's not a glob pattern. The

Re: . and .. are included where they were excluded before

2021-01-26 Thread Chet Ramey
On 1/26/21 3:27 PM, k...@plushkava.net wrote: I'm still worried about some of the curious results shown by your original post but I haven't had a chance to test the same platforms yet. Don't be. CentOS is running a version of bash-4.2 (without even all of the patches applied); that version wa

Re: . and .. are included where they were excluded before

2021-01-26 Thread
On 26/01/2021 19:34, gregrwm wrote: . 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). According to the manual, "[t]he fil

Re: . and .. are included where they were excluded before

2021-01-26 Thread gregrwm
> > > . 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). > According to the manual, "[t]he filenames ‘.’ and ‘..’ must al

Re: . and .. are included where they were excluded before

2021-01-26 Thread Chet Ramey
On 1/25/21 4:36 PM, gregrwm wrote: 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)-rel

Re: . and .. are included where they were excluded before

2021-01-26 Thread
On 26/01/2021 13:04, Lawrence Velázquez wrote: On Jan 26, 2021, at 12:51 AM, "" wrote: On 25/01/2021 21:36, gregrwm wrote: 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 .?

Re: . and .. are included where they were excluded before

2021-01-26 Thread Lawrence Velázquez
> On Jan 26, 2021, at 12:51 AM, "" > wrote: > >> On 25/01/2021 21:36, gregrwm wrote: >> >> 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 .? > > This seems to be as expe

Re: . and .. are included where they were excluded before

2021-01-25 Thread
On 25/01/2021 21:36, gregrwm 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-pare

Re: . and .. are included where they were excluded before

2021-01-25 Thread gregrwm
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