zsh-users
 help / color / mirror / code / Atom feed
From: Kurtis Rader <krader@skepticism.us>
To: "Lawrence Velázquez" <larryv@macports.org>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: surprise with echo
Date: Thu, 18 Dec 2014 21:19:28 -0800	[thread overview]
Message-ID: <CABx2=D_abyadcNT8Lgv+=Z5DqncQfjAaw=qWZ21-MoT-4=eGGA@mail.gmail.com> (raw)
In-Reply-To: <1BF8BB5F-7A65-4837-843F-48D76E1BC7EB@macports.org>

[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]

You apparently missed my point that script was meant to be run by a Plan 9
rc shell. See the "#!/usr/bin/rc" at the top. It was meant to exhibit the
behavior of the shell the zsh RC_EXPAND_PARAM option is meant to emulate.

On Thu, Dec 18, 2014 at 8:39 PM, Lawrence Velázquez <larryv@macports.org>
wrote:
>
> On Dec 18, 2014, at 11:14 PM, Kurtis Rader <krader@skepticism.us> wrote:
>
> > I created a shell script containing
> >
> > #!/usr/bin/rc
> >
> > echo echoing1: $@
> > echo echoing2: $*
> > echo echoing3: $* $@ killed
> > echo echoing4: $@ $* dead
> >
> > echo aaa^$*^bbb
> > echo ccc^$@^ddd
>
> This doesn't reproduce the environment Ray had because your positional
> parameters get substituted into their own words.
>
> % cat /private/tmp/x.zsh
> echo echoing1: $@
> echo echoing2: $*
> echo echoing3: $* $@ killed
> echo echoing4: $@ $* dead
> echo aaa^$*^bbb
> echo ccc^$@^ddd
> echo
> echo "echoing5: $@"
> echo "echoing6: $*"
> echo "echoing7: $* $@ killed"
> echo "echoing8: $@ $* dead"
> % zsh !$
> zsh /private/tmp/x.zsh
> echoing1:
> echoing2:
> echoing3: killed
> echoing4: dead
> aaa^^bbb
> ccc^^ddd
>
> echoing5:
> echoing6:
> echoing7:   killed
> echoing8:   dead
> % zsh -P !$
> zsh -P /private/tmp/x.zsh
> echoing1:
> echoing2:
> echoing3: killed
> echoing4: dead
>
>
>
>
> echoing6:
>
>
> %
>
> vq



-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

  reply	other threads:[~2014-12-19  5:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19  1:24 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABx2=D_abyadcNT8Lgv+=Z5DqncQfjAaw=qWZ21-MoT-4=eGGA@mail.gmail.com' \
    --to=krader@skepticism.us \
    --cc=larryv@macports.org \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).