From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21338 invoked by alias); 3 Dec 2016 17:11:11 -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: 22153 Received: (qmail 28909 invoked from network); 3 Dec 2016 17:11:11 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f174.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.217.174):SA:0(-0.0/5.0):. Processed in 1.446091 secs); 03 Dec 2016 17:11:11 -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=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.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.217.174 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=Wbx9+bcRfkfrQEbsGoq4zqqM1+/iwPrP+F2SovbVVDI=; b=vuB/ZZPZNLpeBRBFU/rb9+EtaMfrk/WdzFbfxtFVObo52nvp1snikcg21/pWRcKCHg 9FiJmyM5WEn6scjQYCDZhgiaafA+pTkTCRyhXCJP1PLQbLwI/lZHwgAT8SeGvFnZt4EI uBFJFhe2ENH4ZvBTiQNpD28uMVp5zqjzrL29iEkOoW9jeoSm476g/buVQbv4NV6R/RNf a4X617xiAKTpQfqrKfQGxJXpLkapB/3PGKOV2QqIEHmmSiAZRe9Vc1MTHpG1yD3NSuOJ SjszVz6tZ4SMQoyIMSC+GkHFNB8sz/A3qhMyprxXbGEs9NX2BeyxdmQaqlQCOeL9TCgV kgOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=Wbx9+bcRfkfrQEbsGoq4zqqM1+/iwPrP+F2SovbVVDI=; b=bCWNQ6XARV9e7VCrlR7CH9K1qIdl/M0RvbvMwOhAWOyCt7meimdbzD7P0nReMgjW4m xGKRDWO+5fTuF7Zy49RI/XvIV16uXMK497riqNBMIqXifoEh/jJnS9aILY/o3Bv0Bw42 qeeJmRiA2FetbYEXbNU5XggS0IsGemYX0Lp2yAdWDN0SXqlJpI+cpi7ufflDtpy1xCpj ErZtAojcalPR32VGGJ9dS2tXpdgLEW3pQJezkwRJjVxe9OG+r6zalsvHQzf2dqlkEjsW 4UNmhOoQcD1T/++wunPfdGrB6II+WShegDxPw3YOo+29LLDT8jPwTk9cBMKQt8PSjXXe F6JQ== X-Gm-Message-State: AKaTC03+UuU3dWdQA5UYE0y9/XF7DCbzRG3JUczDVdYDtVuANaVTOYVBcr8IRQ64LzLnsw== X-Received: by 10.176.1.180 with SMTP id 49mr38677755ual.55.1480784699944; Sat, 03 Dec 2016 09:04:59 -0800 (PST) From: Bart Schaefer Message-Id: <161203090506.ZM5554@torch.brasslantern.com> Date: Sat, 3 Dec 2016 09:05:06 -0800 In-Reply-To: <5842E867.2020700@eastlink.ca> Comments: In reply to Ray Andrews "Re: problem with zmv" (Dec 3, 7:44am) 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> <5842350A.6090400@eastlink.ca> <161202195110.ZM3340@torch.brasslantern.com> <5842E867.2020700@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: problem with zmv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 3, 7:44am, Ray Andrews wrote: } } On 12/02/2016 07:51 PM, Bart Schaefer wrote: } > It occurs to me that it might be slightly better to use } > } > alias zmv='function { . zmv }' } > } Gotcha ... ok, thanks Bart, I'll not try to understand why, that's taken } on faith. I was having trouble coming up with an example last night, but: You may have noticed that "noglob" acts a bit like "command" in that aliases are not expanded: % alias foo='echo you typed' % noglob foo * zsh: command not found: foo So suppose you want aliases expanded after noglob. To do that, you need: % alias noglob='noglob ' (with the trailing space in the quotes). Now: % noglob foo * you typed * % However, if you have % alias zmv='() { . zmv }' % noglob zmv % functions noglob () { . zmv } % It's very unlikely this would happen because you'd probably put some arguments after zmv and get a parse error, but if you replace () with "function" then you get the parse error every time and no accidents. If you want noglob with zmv you have to autoload the real function, as there's no way to use precommand modifiers with an anonymous function.