From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12678 invoked by alias); 13 Mar 2018 22:20:36 -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: 23241 Received: (qmail 24679 invoked by uid 1010); 13 Mar 2018 22:20:36 -0000 X-Qmail-Scanner-Diagnostics: from mta04.eastlink.ca 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(24.224.136.10):SA:0(-2.6/5.0):. Processed in 1.28214 secs); 13 Mar 2018 22:20:36 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=utf-8; format=flowed X-Authority-Analysis: v=2.3 cv=dfKuI0fe c=1 sm=1 tr=0 a=RnRVsdTsRxS/hkU0yKjOWA==:117 a=RnRVsdTsRxS/hkU0yKjOWA==:17 a=IkcTkHD0fZMA:10 a=ejCKVNuzxMcA5jhm6RgA:9 a=QEXdDO2ut3YA:10 X-EL-IP-NOAUTH: 24.207.101.9 Subject: Re: (some tips about variables) Re: avoid eval? To: zsh-users@zsh.org References: <059f4f08-7f7f-25d8-dfeb-1653e3c8ba95@eastlink.ca> <20180311225321.shqrx7idd57ie62d@prometheus.u-strasbg.fr> <20180313163634.s4qvlfhdzqplxn4s@prometheus.u-strasbg.fr> <32661718-eaa2-a270-9b88-69156f7ddfe6@eastlink.ca> <20180313203922.37npscl5jzequet3@prometheus.u-strasbg.fr> From: Ray Andrews Message-id: Date: Tue, 13 Mar 2018 14:50:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-reply-to: <20180313203922.37npscl5jzequet3@prometheus.u-strasbg.fr> Content-language: en-CA On 13/03/18 01:39 PM, Marc Chantreux wrote: > > yes it can. another way to keep things very local is to use anonymous > functions so you can write in the middle of your script > > () { > local user > for user { print "hello $user" } > } bob joe ted More good advice, thanks Marc, I haven't used those yet. > wow .. don't overwrite an existing command, ever! To be honest,  I never considered that there was an existing command, I see there is, but whatever it is, I never use it.  I'll pay attention to that now. > you can check the type of a variable using the (t) modifier. > print ${(t)path} > array-special > Thanks, I forgot about that. > IFS is the field separator, $'\n' is the record separator so if you set > IFS to $'\n' you can't basically split nothing captured by read. Ha!  Now I know the difference, I thought they were the same.  You open my eyes Marc.  More latter.