zsh-users
 help / color / mirror / code / Atom feed
* problem with CSH_NULL_GLOB
@ 2000-11-24  1:53 Maciej Kalisiak
  2000-11-24  2:06 ` Geoff Wing
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej Kalisiak @ 2000-11-24  1:53 UTC (permalink / raw)
  To: zsh-users

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?

-- 
Maciej Kalisiak		mac@dgp.toronto.edu	www.dgp.toronto.edu/~mac


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with CSH_NULL_GLOB
  2000-11-24  1:53 problem with CSH_NULL_GLOB Maciej Kalisiak
@ 2000-11-24  2:06 ` Geoff Wing
  2000-11-24  4:15   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Geoff Wing @ 2000-11-24  2:06 UTC (permalink / raw)
  To: zsh-users

Maciej Kalisiak <mac@cs.toronto.edu> 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
%

"CSH_NULL_GLOB <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."

Regards,
-- 
Geoff Wing : <gcw@pobox.com>
Rxvt Stuff : <gcw@rxvt.org>
Zsh Stuff  : <gcw@zsh.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with CSH_NULL_GLOB
  2000-11-24  2:06 ` Geoff Wing
@ 2000-11-24  4:15   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2000-11-24  4:15 UTC (permalink / raw)
  To: zsh-users

On Nov 24,  2:06am, Geoff Wing wrote:
} Subject: Re: problem with CSH_NULL_GLOB
}
} Maciej Kalisiak <mac@cs.toronto.edu> typed:
} :When I "setopt CSH_NULL_GLOB" and do "ls *.cc *.c" in my home directory,
} :it lists all the files there [...]
} 
} It looks like a bug in zsh.  I think you may have NULL_GLOB also set [...]
} 
} "CSH_NULL_GLOB <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."

Hrm.  As nearly as I can tell, this documentation became wrong when the
(N) glob qualifier was introduced.  If CSH_NULL_GLOB overrides (N), all
sorts of bad things happen, so it doesn't.  I just tried zsh-2.4, and
NULL_GLOB still takes effect even in combination with CSH_NULL_GLOB in
that version, too.  I think it should read "Overrides NOMATCH."

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-11-24  4:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-24  1:53 problem with CSH_NULL_GLOB Maciej Kalisiak
2000-11-24  2:06 ` Geoff Wing
2000-11-24  4:15   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).