* Help on zsh grammar
@ 1997-01-22 15:39 Dietmar Rempfer
1997-01-22 15:53 ` Andrej Borsenkow
0 siblings, 1 reply; 2+ messages in thread
From: Dietmar Rempfer @ 1997-01-22 15:39 UTC (permalink / raw)
To: redhat-list; +Cc: zsh-workers
I am stuck with the following seemingly trivial problem:
Let us define the following function:
test () { echo \"$*\" }
Now, if I do ``test blabla'', I get "blabla", which is what I want.
But if I say e.g. ``test *.aux'', I would like to see "*.aux" printed out,
but instead I get the message: zsh: no matches found: *.aux.
So the problem is that I have to somehow prevent zsh from trying to expand
the result of $* any further. I have tried all kinds of means to achieve
this, but to no avail. (By the way, the above syntax works just fine in
bash, so I am beginning to wonder whether this is a bug in zsh...)
Any help would be highly appreciated...
================================================================================
_/_/ _/__/ | Dietmar Rempfer
_/ _/ _/ __/ | Sibley School of Mechanical
_/ _/ _/ _/ | and Aerospace Engineering
_/ _/ _/ _/ | Cornell University
_/ _/ _/ __/ | Ithaca, NY 14853-7501
_/ _/ _/___/ | USA
_/ _/ _/ _/ | Tel.: (607) 255-0486
_/ __/ _/ _/ | Fax : (607) 255-1222
_/___/ _/ _/ _/ _/ | e-mail: dietmar@sokrates.mae.cornell.edu
================================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Help on zsh grammar
1997-01-22 15:39 Help on zsh grammar Dietmar Rempfer
@ 1997-01-22 15:53 ` Andrej Borsenkow
0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 1997-01-22 15:53 UTC (permalink / raw)
To: Dietmar Rempfer; +Cc: Zsh workers mailing list
On Wed, 22 Jan 1997, Dietmar Rempfer wrote:
> Let us define the following function:
>
> test () { echo \"$*\" }
>
> Now, if I do ``test blabla'', I get "blabla", which is what I want.
> But if I say e.g. ``test *.aux'', I would like to see "*.aux" printed out,
> but instead I get the message: zsh: no matches found: *.aux.
>
What about
test '*.aux' :-)
But really, you want
unsetopt nomatch
% setopt nomatch
% test *.aux
zsh: no matches found: *.aux
% unsetopt nomatch
% test *.aux
*.aux
% whence -f test
test () {
echo $*
}
greetings
-------------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-01-22 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-22 15:39 Help on zsh grammar Dietmar Rempfer
1997-01-22 15:53 ` Andrej Borsenkow
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).