Re: GLOBIGNORE documentation

2016-03-07 Thread Stephane Chazelas
2016-03-07 08:58:05 +0100, Isabella Parakiss: [...] > OTOH this is arguably more useful than its ksh equivalent: > GLOBIGNORE=-*; some-cmd *; some-cmd ./* [...] True, that's probably the one case where the GLOBIGNORE behaviour is actually useful. Note that with ksh93, you've got to write it: FIG

Re: GLOBIGNORE documentation

2016-03-06 Thread Isabella Parakiss
On Sun, Mar 06, 2016 at 10:16:58PM +, Stephane Chazelas wrote: > Today, I realised that GLOBIGNORE doesn't work at all like ksh's > FIGNORE. > > With > > GLOBIGNORE=x* > > we're not filtering out files whose *name* starts with "x" from > globs but those whose *path* starts with "x". > > In

Re: GLOBIGNORE documentation

2016-03-06 Thread Stephane Chazelas
2016-03-06 22:16:58 +, 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