From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18793 invoked by alias); 20 Oct 2016 20:28:49 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22013 Received: (qmail 25305 invoked from network); 20 Oct 2016 20:28:49 -0000 X-Qmail-Scanner-Diagnostics: from mail-yb0-f170.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.213.170):SA:0(0.0/5.0):. Processed in 0.356611 secs); 20 Oct 2016 20:28:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE, SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: filipe.silva@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.213.170 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=jaV238G5Fz2f92SPmbjkatkovc9T+xB/W4AdMGyY/MI=; b=VshIhpzsbd5jZLZXILY0n4w4+o5IpRwaP3mCikcf2cJHudvd+kMdVvY0RtcIuGnhCB UXcehu38yGqqPdEBqHxGCutfiKXy406T7QleRewpt5ULd8k1NZtB8Q78hXHNFJZKE3kE u5KfHEJFdGP07HJR7uQZtDOAGvcQ/EFHw5ik5bB17GqIyrOQVdb3/hYP+o1sidQ0GFXn Nytf+QKHIjB65ulZqWZ+G5RRGOEgXawtHI0m4IofFk3Oiw8Jbom/V1Q1jqsLo1gG60lJ O2l0UU4GdXrMeiFcOXb9b9F9U0je3s//spKEQtPJ8w1IBa/8zblXCU2v6io/awzUpPLq ZJPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=jaV238G5Fz2f92SPmbjkatkovc9T+xB/W4AdMGyY/MI=; b=E1fGE7BhbWMLh+K27WmY8UDZGAWxpS9axBs7wUdCc26495T7Q8FAkcRn46PR6U6A1h WaRGZ7Kj5+/yu4tzuw/6afr6XGsSVHvPnpUTIeKQKGN5co1W7ThGag2rRCd0qfXS6zM+ GTSfjVMv1KuUYc2JIZuDaDTiLUlb19d7TxJwmU9OfNFLyo95YNLJ0+OnvqZJ/cLT28B/ NPHb01qYp0Lhbya5TScYVsnfVfbS9vrzipDSBM/3VLFtSJj/X1GzMz5Z13GzOn9mpZgP pYRt4NJ7pBq0Hx/BoyHao5dMk3ke+rmDqpctGPjb39WVMW87iLkxINZ7IHsvuiBqKAvb +TyQ== X-Gm-Message-State: ABUngvc/p3m3qew1l4soE9mEdD0B0ZHBQNeCZ0w6ZOlmgSdGLXkX7I7oguaCn7BZ2pRkEVvUk2ycNRg0zV8wQA== X-Received: by 10.157.56.179 with SMTP id p48mr943586otc.22.1476991963845; Thu, 20 Oct 2016 12:32:43 -0700 (PDT) MIME-Version: 1.0 From: Filipe Silva Date: Thu, 20 Oct 2016 17:32:43 -0200 Message-ID: Subject: revisiting passing arrays to functions To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=001a11c05284575dd1053f50fdd0 --001a11c05284575dd1053f50fdd0 Content-Type: text/plain; charset=UTF-8 I searched through the archives and found this message about passing arrays to functions: http://www.zsh.org/mla/users/2011/msg00967.html Basically it says that it is not very comfortable: % deref() { print ${(P)1}; print ${(P)1[-1]}; } % array=(there once was a hacker named dave) % deref array there once was a hacker named dave dave You have to dereference the array first. But that was in 2011. Is that changed? Do we have a way to pass zsh arrays to a zsh function in a comfortable way? thanks in advance. Filipe --001a11c05284575dd1053f50fdd0--