* CSH_NULL_GLOB broken?
@ 1997-06-09 20:49 Steve Talley
1997-06-09 22:05 ` Vincent Lefevre
1997-06-09 23:39 ` Zoltan T. Hidvegi
0 siblings, 2 replies; 3+ messages in thread
From: Steve Talley @ 1997-06-09 20:49 UTC (permalink / raw)
To: zsh-users
CSH_NULL_GLOB doesn't appear to work in 3.1.0:
% unsetopt nomatch
% unsetopt nullglob
% setopt cshnullglob
% ls -d /tmp
/tmp/
% ls -d /blah*
zsh: no match
% ls -d /tmp /blah*
zsh: no match
The last command, according to the zshoptions man page, should have
listed /tmp and ignored the fact that nothing matches /blah*. Am I
missing something?
Thanks,
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: CSH_NULL_GLOB broken?
1997-06-09 20:49 CSH_NULL_GLOB broken? Steve Talley
@ 1997-06-09 22:05 ` Vincent Lefevre
1997-06-09 23:39 ` Zoltan T. Hidvegi
1 sibling, 0 replies; 3+ messages in thread
From: Vincent Lefevre @ 1997-06-09 22:05 UTC (permalink / raw)
To: zsh-users
On Mon, Jun 09, 1997 at 02:49:10PM -0600, Steve Talley wrote:
> CSH_NULL_GLOB doesn't appear to work in 3.1.0:
>
> % unsetopt nomatch
> % unsetopt nullglob
> % setopt cshnullglob
> % ls -d /tmp
> /tmp/
> % ls -d /blah*
> zsh: no match
> % ls -d /tmp /blah*
> zsh: no match
>
> The last command, according to the zshoptions man page, should have
> listed /tmp and ignored the fact that nothing matches /blah*. Am I
> missing something?
Yes: /tmp isn't a pattern. Try for instance: ls -d /tm[p] /blah*
It won't complain.
Note that:
1) tcsh will also complain if you write: ls -d /tmp /blah*
2) If you wanted to regard /tmp as a pattern, it would be difficult to
decide what is a pattern and what isn't. If /tmp were a pattern, -d
should also be a pattern, as zsh cannot guess which arguments will be
regarded as filenames (it depends on the command).
Now, there's something I don't like:
$ ls -d /tmp() /blah
$ ls
zsh: no such file or directory: /blah
$ whence -ac ls
ls: aliased to \ls -bF --color=tty
ls () {
/blah
}
/home/vlefevre/bin-sparc/ls
...
(-bF, --color=tty, -d and /tmp functions are created too.)
--
Vincent Lefevre, vlefevre@ens-lyon.fr | Acorn Risc PC, StrongARM @ 202MHz
http://www.ens-lyon.fr/~vlefevre | 20+1MB RAM, Eagle M2, TV + Teletext
PhD in Computer Science, 1st year | Apple CD-300, SyQuest 270MB (SCSI)
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: CSH_NULL_GLOB broken?
1997-06-09 20:49 CSH_NULL_GLOB broken? Steve Talley
1997-06-09 22:05 ` Vincent Lefevre
@ 1997-06-09 23:39 ` Zoltan T. Hidvegi
1 sibling, 0 replies; 3+ messages in thread
From: Zoltan T. Hidvegi @ 1997-06-09 23:39 UTC (permalink / raw)
To: Steve Talley; +Cc: zsh-users
Steve Talley wrote:
> CSH_NULL_GLOB doesn't appear to work in 3.1.0:
>
> % unsetopt nomatch
> % unsetopt nullglob
> % setopt cshnullglob
> % ls -d /tmp
> /tmp/
> % ls -d /blah*
> zsh: no match
> % ls -d /tmp /blah*
> zsh: no match
>
> The last command, according to the zshoptions man page, should have
> listed /tmp and ignored the fact that nothing matches /blah*. Am I
> missing something?
That's the documented behaviour, and that's how csh works (tcsh at least).
The manual says: `do not report an error unless all the patterns in a
command have no matches'. The above command has only one pattern, /blah*
and it has no matches, so the error comes. /tmp is not a pattern since it
does not conain any glob special characters.
Zoltan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-06-10 0:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-09 20:49 CSH_NULL_GLOB broken? Steve Talley
1997-06-09 22:05 ` Vincent Lefevre
1997-06-09 23:39 ` Zoltan T. Hidvegi
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).