zsh-users
 help / color / mirror / code / Atom feed
* surprise with echo
@ 2014-12-19  1:24 Ray Andrews
  2014-12-19  3:06 ` Bart Schaefer
  0 siblings, 1 reply; 27+ messages in thread
From: Ray Andrews @ 2014-12-19  1:24 UTC (permalink / raw)
  To: Zsh Users


    test()
    {

       echo  "echoing1: $@"
       echo  "echoing2: $*"
       echo  "echoing3: $* $@ killed"
       echo  "echoing4: $@ $* dead"
    }

    $  test

    echoing2:

... that catches me completely by surprise. " $@ "
anywhere in the string kills it dead.  I traced it back
to:

setopt rc_expand_param

Why should it do that? It's very cool what it permits
as explained in 'the book' p. 288, but is the above
part and parcel of that?

Of course there's nothing to print, but why kill the
entire string?  Something about a null array?
Can that be prevented?  It's all fine if there is an
argument, of course.  Is this a feature?  One could
deliberately design it  so that nothing gets printed
in case of no argument, still it seem counterintuitive.


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

end of thread, other threads:[~2014-12-20  9:45 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-19  1:24 surprise with echo Ray Andrews
2014-12-19  3:06 ` Bart Schaefer
2014-12-19  3:20   ` Lawrence Velázquez
2014-12-19  6:09     ` Ray Andrews
2014-12-19  6:30       ` Kurtis Rader
2014-12-19 17:54         ` Ray Andrews
2014-12-19  4:14   ` Kurtis Rader
2014-12-19  4:39     ` Lawrence Velázquez
2014-12-19  5:19       ` Kurtis Rader
2014-12-19  6:00         ` Lawrence Velázquez
2014-12-19  5:57     ` Bart Schaefer
2014-12-19  6:08       ` Kurtis Rader
2014-12-19  6:58         ` Ray Andrews
2014-12-20  2:55           ` Bart Schaefer
2014-12-20  3:05             ` Kurtis Rader
2014-12-20  3:49             ` Ray Andrews
2014-12-20  4:40               ` Bart Schaefer
2014-12-20  5:50                 ` Ray Andrews
2014-12-19  6:45     ` Ray Andrews
2014-12-19 11:21     ` Oliver Kiddle
2014-12-20  2:09       ` Bart Schaefer
2014-12-20  2:58       ` Kurtis Rader
2014-12-20  3:55         ` Ray Andrews
2014-12-20  5:08           ` Lawrence Velázquez
2014-12-20  5:37             ` Ray Andrews
2014-12-20  9:45               ` ZyX
2014-12-19  6:00   ` Ray Andrews

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).