From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11984 invoked by alias); 3 Dec 2016 02:59:31 -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: 22147 Received: (qmail 324 invoked from network); 3 Dec 2016 02:59:31 -0000 X-Qmail-Scanner-Diagnostics: from mta03.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.9):SA:0(-3.6/5.0):. Processed in 0.677401 secs); 03 Dec 2016 02:59:31 -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=-3.6 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RP_MATCHES_RCVD,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.eastlink.ca designates 24.224.136.9 as permitted sender) X-Authority-Analysis: v=2.2 cv=ZvqvEJzG c=1 sm=1 tr=0 a=MRfsBU9oQI9kG0qxcmz51g==:117 a=MRfsBU9oQI9kG0qxcmz51g==:17 a=N659UExz7-8A:10 a=O-hZPBKawHi4LuRHks4A:9 a=pILNOxqGKmIA:10 X-EL-IP-NOAUTH: 24.207.105.139 Message-id: <5842350A.6090400@eastlink.ca> Date: Fri, 02 Dec 2016 18:59:22 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: problem with zmv References: <5840492A.2090304@eastlink.ca> <5841DF8C.8000602@eastlink.ca> <58420592.4040406@eastlink.ca> <161202154727.ZM5584@torch.brasslantern.com> <58420E9B.6090501@eastlink.ca> <161202164926.ZM2970@torch.brasslantern.com> In-reply-to: <161202164926.ZM2970@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 12/02/2016 04:49 PM, Bart Schaefer wrote: > On Dec 2, 4:15pm, Ray Andrews wrote: > } > } BTW, don't I remember something to the effect of changing > } setopts but only for the duration of a given script? If so, that sounds > } like a healthy way of doing it. > > I'm not recalling what you might be thinking of here, but you can > certainly do this: > > alias zmv='() { . zmv }' > > That will load zmv from $path instead of $fpath and use function scope > for the "emulate -L". > Kewl. Works as you say, avoids editing the script and any other complications or gotchas. So the outer function call trumps the protocol for the plain script, that's good to know for any similar issue.