From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20599 invoked by alias); 13 Mar 2018 02:22:57 -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: 23237 Received: (qmail 14545 invoked by uid 1010); 13 Mar 2018 02:22:57 -0000 X-Qmail-Scanner-Diagnostics: from mout.gmx.net 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(212.227.15.18):SA:0(-2.6/5.0):. Processed in 0.937041 secs); 13 Mar 2018 02:22:57 -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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: llua@gmx.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Subject: Re: avoid eval? To: zsh-users@zsh.org References: <059f4f08-7f7f-25d8-dfeb-1653e3c8ba95@eastlink.ca> <20180311225321.shqrx7idd57ie62d@prometheus.u-strasbg.fr> From: Eric Cook Message-ID: Date: Mon, 12 Mar 2018 22:17:38 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:mBELPySMj6NsgDU3ds7UT5/GSIGErsoLBSG82wD34Z7q5GCjm1w ffiFswfINmKPkccnrdsCN4gBoQKCN4r7UWWkV36KJf4yEa5Wg8cbIFOrcutVPYYvtiP96M7 qcq4vR5rG6jR+Wc7Zdf7hwgo3zwCnSFYhIjcO4lTCnmSzych4befatjHDz5+n908enTsFSK YH1rndcEYdstPT6bSUlCw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Uzo6H+yo4RQ=:4QV79SbShHugHNdKWZdjz8 uoDDRaSrS4skGemD5vlUocErRIoZjHf/a7kIhKbfDbhn9mHCQA2cYUkwqC1DJ4WzT9LhaggSG 7uAldGP+QM1++q+JF8IGmoqTGEonU+MIF+2MukOhcMfaxM25U5sbAGyULQUYWS6vdMR6v21Nd RU4KTj1UGXJtEO9i3cy10WhsLKApES8z4ZVRp5L8p23b9XtLkmi3ZCJ3b7qTP+7/1dCmSUlSP AQt5eK6f89KH+T/KoFFq+quZsoWngDseBCr6W1dEL8cHVNiyZ3RBafrMkUWaIgBo+1MxtaC4K aNJY/D2L6pgNMSVJDo8Yg+7QOKPxN0O/hMC8SOJKFGgGKVXe3YxYUmQtknpjS/be6MVM2nipy QmZ14prR9g7GGHetLsM3+zGOCVkxPwnelpShkj9DDgErDndsRUqxXYpZ3tZ3PRJEdHR1di9hZ /1cy34+q4p1Q9uEFQ0XpDb8dLReoCAobwgf3mqy+eiHF4kAdCXBlK8OoJVfhEy1j4Nfqy1NhX nLJrogzxSaI1iz1HSvITSDL7OPxgvAkTOGx48PkyiypDLBAHWcprWvNYTUnJG253WJ2l+AWNs cvhRUi2L24+D9bgj6Q4tNurvo1KC7rz5H1R7ffQYqW7vG5wDiz5liRmR33tCtzRrsr08M7HlZ l3kXO3QBHt4rRlzAmRUJHM0ePFX57O7KhTu3Ngbbf4yCWV6c1hlFoT7jJ76Cx7GHwEnOVG+ao QnHMq4Ty3qdcMQ98YS9kGg17Xr36eTIhv0z+t3E7RNb2+ZtC1Lg1OnZjc7kxezhpLsKr+epRA 5W4GT+sZ9aQsVWJePKxH8r3nIpuVBrAWQvZoiDg54BZBAQF+T8= On 03/12/2018 10:13 PM, Ray Andrews wrote: > On 11/03/18 05:43 PM, Ray Andrews wrote: >> On 11/03/18 03:53 PM, Marc Chantreux wrote: >>> "$@" expands as an array and "$*" expands as a string so >>> func () cp oldfile "$*" >>> >>> >> Thanks so it does.  I tried that and 50 other ideas.  I just now realized it was because I had $IFS=$'\n' >> >> set in another function :-(  Cost me half the day. >> > Is there any way to immunize my functions against $IFS trouble?  I have functions that seem to require " $IFS=$'\n' " and others that insist on " $IFS=' '  ".  It would be nice if I didn't have to reset it in each function.  I'll bet there will be syntax > that always does the right thing regardless of $IFS. > > In the 10 or so years that i have used zsh, i've never needed to change IFS. but in the functions that you think that you need to change IFS, you would just use local to scope the change to that function.