[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sun, 6 Mar 2016 22:16:58 +0000
Today, I realised that GLOBIGNORE doesn't work at all like ksh's
we're not filtering out files whose *name* starts with "x" from
globs but those whose *path* starts with "x".
files whose name starts with "x" will be excluded, but not in
I think the documentation should be clarified, because at the
moment it implies GLOBIGNORE applies to file names (like for
ksh's FIGNORE), not file paths.
Where it becomes borderline a bug is about "." and "..".
The doc says they're always excluded when GLOBIGNORE is
That's true for */* or .* for instance, but not for ./.* or .*/x
$ bash -c 'GLOBIGNORE=x*; echo .*'
$ bash -c 'GLOBIGNORE=x*; echo ./.*'
$ bash -c 'GLOBIGNORE=x*; echo .*/a'
To truely exclude . and .., one needs:
shopt -s extglob
- GLOBIGNORE documentation,
Stephane Chazelas <=