bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GLOBIGNORE documentation


From: Stephane Chazelas
Subject: Re: GLOBIGNORE documentation
Date: Sun, 6 Mar 2016 22:37:47 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]