Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: problem with CSH_NULL_GLOB

Maciej Kalisiak <mac@xxxxxxxxxxxxxx> typed:
:When I "setopt CSH_NULL_GLOB" and do "ls *.cc *.c" in my home directory, it
:lists all the files there (i.e. none of the GLOBs matched anything and they
:have been both removed without error).  I was expecting an error, or at the
:very least nothing to be listed.  Do I misunderstand this option or is there
:something wrong?

It looks like a bug in zsh.  I think you may have NULL_GLOB also set - if
so you will need to unsetopt it until you have a fixed zsh.  You also
didn't say which version - though I can reproduce this with 3.0.8 and a
recent development version.

% mkdir foo
% zsh -f
% setopt CSH_NULL_GLOB
% cd foo
% ls *.cc *.c
zsh: no match
% exit
% zsh -f
% setopt cshnullglob nullglob
% cd foo
% ls *.cc *.c

	If  a  pattern  for  filename  generation  has   no
	matches, delete the pattern from the argument list;
	do not report an error unless all the patterns in a
	command have no matches.  Overrides NULL_GLOB."

Geoff Wing : <gcw@xxxxxxxxx>
Rxvt Stuff : <gcw@xxxxxxxx>
Zsh Stuff  : <gcw@xxxxxxx>

Messages sorted by: Reverse Date, Date, Thread, Author