2016-03-06 22:16:58 +0000, Stephane Chazelas: [...] > $ bash -c 'GLOBIGNORE=x*; echo .*' > .* > $ bash -c 'GLOBIGNORE=x*; echo ./.*' > ./. ./.. > $ bash -c 'GLOBIGNORE=x*; echo .*/a' > ./a ../a > > To truely exclude . and .., one needs: > > shopt -s extglob > GLOBIGNORE='?(*/)@(.|..)' [...]
That's not enough, that would fail to exclude . and .. in .*/file (and also breaks */. globs) GLOBIGNORE='?(*/)@(.|..)?(/*)' would break (common) ./* globs. So, it looks like it's not possible to get the same behaviour as in zsh/mksh/pdksh/fish/Forsyth shell (or ksh93 with FIGNORE='@(.|..)') with GLOBIGNORE after all. -- Stephane