From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 6eb1c2a5 for ; Mon, 2 Dec 2019 04:11:52 +0000 (UTC) Received: (qmail 26220 invoked by alias); 2 Dec 2019 04:11:41 -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: List-Unsubscribe: X-Seq: 24489 Received: (qmail 10377 invoked by uid 1010); 2 Dec 2019 04:11:41 -0000 X-Qmail-Scanner-Diagnostics: from 195-159-176-226.customer.powertech.no by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25649. spamassassin: 3.4.2. Clear:RC:0(195.159.176.226):SA:0(-0.3/5.0):. Processed in 2.322415 secs); 02 Dec 2019 04:11:41 -0000 X-Envelope-From: gcszu-zsh-users@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at m.gmane.org does not designate permitted sender hosts) X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: zsh-users@zsh.org To: zsh-users@zsh.org From: Emanuel Berg Subject: Re: shuffle array Date: Mon, 02 Dec 2019 05:10:54 +0100 Message-ID: <86k17fmkoh.fsf@zoho.eu> References: <867e3jxtao.fsf@zoho.eu> <20191129064215.GA14095@prometheus.u-strasbg.fr> <8636e7w0w9.fsf__36104.0529723809$1575015640$gmane$org@zoho.eu> <20191201200719.anzbs27c7phgdnmm@chaz.gmail.com> <86v9qzpwq4.fsf@zoho.eu> <20191201234607.mrajutnpkfr5bmtq@tarpaulin.shahaf.local2> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Mail-Copies-To: never Cancel-Lock: sha1:86+Js3LP+5yI0OgZ+/AFxRb/brE= Daniel Shahaf wrote: >> How do I send the array as a name/pointer >> argument, i.e. not just the value? > > To read an array by name: > > f() { > local array_name=$1 > print -rl -- "${(@P)array_name}" > } > typeset -a foo=(bar baz) > f foo [...] Thanks a lot for all that wonderful info! :) That should be the last piece of the puzzle Gw! > gmane.comp.shells.zsh.user and > zsh-users@zsh.org are the same thing ... OK? -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal