[arch-releng] nullglob

Dieter Plaetinck dieter at plaetinck.be
Wed Jan 26 12:04:10 EST 2011

On Wed, 26 Jan 2011 13:19:07 +0100
Dieter Plaetinck <dieter at plaetinck.be> wrote:

> On Mon, 24 Jan 2011 17:22:18 -0500
> Matthew Gyurgyik <pyther at pyther.net> wrote:
> > Falconindy was right. nullglob affects everything just not the
> > function. I simply fixed it by adding shopt -u nullglob at the end
> > of the function.
> > 
> > I rebased and forced a push therefore there is no "new" commit: 
> > https://github.com/pyther/aif/commit/43d02dc58a63599ff67d3a7e9f89c8b81831b56b
> > 
> > I don't think it is worth it to resend the patch yet again for one
> > line of code, though let me know if that is what you want me to do.
> can you be sure that nullglob must be unset after the function?
> Could it be that nullglob was already set in the beginning?

I can answer my own question:
"nullglob is not on by default because there are other cases where its
behavior would be extremely disconcerting. For example, ls behaves
quite unexpectedly if an unmatched glob is removed from the argument

I actually found some occurrences in the aif codebase where I enable
nullglob, probably the right way forward is to disable those again after
the "critical codepath", check if i didn't break anything else, and then
merge your patch.


More information about the arch-releng mailing list