* What is the zsh equivalent of csh's set echo?
@ 2002-09-16 19:43 Hall Jeffrey S NPRI
0 siblings, 0 replies; 6+ messages in thread
From: Hall Jeffrey S NPRI @ 2002-09-16 19:43 UTC (permalink / raw)
To: zsh-users
Dear zsh users,
I am trying to debug a zsh script. I want to know what zsh command makes zsh behave like csh does with the set echo command: write out every command after the shell has fully expanded it, right before it is executed. I read the zshall man page but did not find what I was looking for. Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20020916194352.QNEN494619.fep02-mail.bloor.is.net.cable.rogers.com@sunsite.dk>]
* RE: What is the zsh equivalent of csh's set echo?
@ 2002-09-16 21:54 Hall Jeffrey S NPRI
2002-09-16 22:06 ` Bruce Stephens
2002-09-16 22:15 ` David Huttleston Jr
0 siblings, 2 replies; 6+ messages in thread
From: Hall Jeffrey S NPRI @ 2002-09-16 21:54 UTC (permalink / raw)
To: Zsh-Users (E-mail); +Cc: Bosworth Barry T NPRI, Goldman Warren A NPRI
Actually, I figured out my problem. I got burned by the
zsh not splitting parameter substitutions into multiple
words. I had a flag/value pair stored in a variable, like
FOO='-flag value' and was trying to run a program named
proto89 by doing something like
proto89 $FOO.
WRONG! This does NOT work in the zsh. The zsh does not give
command proto89 2 arguments but only 1! That is, zsh does NOT
give the command proto89 the 2 arguments "-flag" and "value"
but only 1 argument "-flag value". proto89 does not report
this problem but simply ignores it, hence my problem. Note
that
echo proto89 $FOO
does not reveal the problem because the user will clearly see
the words "-flag" and "value" separated but does not know that
zsh is giving them to the command as 1 argument.
This "feature" of zsh should be better known. I've used the zsh
for like 8 years and never stumbled (staggered) across this
problem before.
-----Original Message-----
From: Hall Jeffrey S NPRI [mailto:HallJS@Npt.NUWC.Navy.Mil]
Sent: Monday, September 16, 2002 3:44 PM
To: zsh-users@sunsite.dk
Subject: What is the zsh equivalent of csh's set echo?
Dear zsh users,
I am trying to debug a zsh script. I want to know what zsh command makes zsh behave like csh does with the set echo command: write out every command after the shell has fully expanded it, right before it is executed. I read the zshall man page but did not find what I was looking for. Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What is the zsh equivalent of csh's set echo?
2002-09-16 21:54 Hall Jeffrey S NPRI
@ 2002-09-16 22:06 ` Bruce Stephens
2002-09-16 22:15 ` David Huttleston Jr
1 sibling, 0 replies; 6+ messages in thread
From: Bruce Stephens @ 2002-09-16 22:06 UTC (permalink / raw)
To: Zsh-Users (E-mail)
Hall Jeffrey S NPRI <HallJS@Npt.NUWC.Navy.Mil> writes:
> Actually, I figured out my problem. I got burned by the zsh not
> splitting parameter substitutions into multiple words.
[...]
> This "feature" of zsh should be better known. I've used the zsh for
> like 8 years and never stumbled (staggered) across this problem
> before.
It's in the FAQ. It's a feature if you want to treat strings
consistently whether or not they happen to contain spaces.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What is the zsh equivalent of csh's set echo?
2002-09-16 21:54 Hall Jeffrey S NPRI
2002-09-16 22:06 ` Bruce Stephens
@ 2002-09-16 22:15 ` David Huttleston Jr
2002-09-16 22:23 ` David Huttleston Jr
1 sibling, 1 reply; 6+ messages in thread
From: David Huttleston Jr @ 2002-09-16 22:15 UTC (permalink / raw)
To: zsh-users
I've been burned by this also. :(
Is there a way to do something like:
$mycommand $myoptions $@
Where $myoptions could be:
myoptions="-a"
or
myoptions="-a -f myfile.txt"
It always chokes on interpreting "-a -f myfile.txt" as a single
parameter. Any solutions?
On Mon, Sep 16, 2002 at 05:54:18PM -0400, Hall Jeffrey S NPRI wrote:
> Actually, I figured out my problem. I got burned by the
> zsh not splitting parameter substitutions into multiple
> words. I had a flag/value pair stored in a variable, like
> FOO='-flag value' and was trying to run a program named
> proto89 by doing something like
>
> proto89 $FOO.
>
> WRONG! This does NOT work in the zsh. The zsh does not give
> command proto89 2 arguments but only 1! That is, zsh does NOT
> give the command proto89 the 2 arguments "-flag" and "value"
> but only 1 argument "-flag value". proto89 does not report
> this problem but simply ignores it, hence my problem. Note
> that
--
David Huttleston Jr
7941 Tree Lane Suite 200
Madison WI 53717
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What is the zsh equivalent of csh's set echo?
2002-09-16 22:15 ` David Huttleston Jr
@ 2002-09-16 22:23 ` David Huttleston Jr
0 siblings, 0 replies; 6+ messages in thread
From: David Huttleston Jr @ 2002-09-16 22:23 UTC (permalink / raw)
To: zsh-users
Yah, yah, ... read the FAQ :)
Section 3.1 explains it very thoroughly.
On Mon, Sep 16, 2002 at 05:15:46PM -0500, David Huttleston Jr wrote:
> I've been burned by this also. :(
> Is there a way to do something like:
> $mycommand $myoptions $@
>
> Where $myoptions could be:
> myoptions="-a"
> or
> myoptions="-a -f myfile.txt"
>
> It always chokes on interpreting "-a -f myfile.txt" as a single
> parameter. Any solutions?
>
--
David Huttleston Jr
7941 Tree Lane Suite 200
Madison WI 53717
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-09-16 22:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-16 19:43 What is the zsh equivalent of csh's set echo? Hall Jeffrey S NPRI
[not found] <20020916194352.QNEN494619.fep02-mail.bloor.is.net.cable.rogers.com@sunsite.dk>
2002-09-16 20:31 ` Paul Ackersviller
2002-09-16 21:54 Hall Jeffrey S NPRI
2002-09-16 22:06 ` Bruce Stephens
2002-09-16 22:15 ` David Huttleston Jr
2002-09-16 22:23 ` David Huttleston Jr
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).