zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: Re: Array as parameter
Date: Wed, 2 Nov 2011 11:14:38 +0100	[thread overview]
Message-ID: <CAHYJk3QK6UzAcsQBwoV2rMk9Kga063_pRx8gGXHAoMgie5+_sA@mail.gmail.com> (raw)
In-Reply-To: <slrnjb228m.67l.stephane.chazelas@spam.is.invalid>

On 2 November 2011 10:10, Stephane CHAZELAS <stephane_chazelas@yahoo.fr> wrote:
> 2011-11-1, 22:00(-07), Wayne Davison:
>> However, if you need to be able to keep the array
>> parameter separate from other parameters, you could instead refer to the
>> variable whose name you passed in using ${(P)1} in your function in place
>> of the $1.
>
> Except that it doesn't work for arrays. You'd need to  use eval
> here.

(P) works perfectly fine with arrays.

-- 
Mikael Magnusson


  reply	other threads:[~2011-11-02 10:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20111102033545.GI28043@solfire>
     [not found] ` <CAHSx_SsGPHWkGfspXKo39oZ6G3Rd+H-8_2PAuixHmW94d4VCEg__34702.1825182766$1320210589$gmane$org@mail.gmail.com>
2011-11-02  9:10   ` Stephane CHAZELAS
2011-11-02 10:14     ` Mikael Magnusson [this message]
2011-11-02 12:06       ` Stephane Chazelas
2011-11-02 12:13         ` Mikael Magnusson
2011-11-02 12:15           ` Mikael Magnusson
     [not found] <20111102033545.GI28043__714.249446946447$1320205564$gmane$org@solfire>
2011-11-02  9:04 ` Stephane CHAZELAS

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=CAHYJk3QK6UzAcsQBwoV2rMk9Kga063_pRx8gGXHAoMgie5+_sA@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@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).