From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13721 invoked by alias); 1 Sep 2017 21:23:16 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41631 Received: (qmail 6825 invoked by uid 1010); 1 Sep 2017 21:23:16 -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.15):SA:0(-2.6/5.0):. Processed in 2.886312 secs); 01 Sep 2017 21:23:16 -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_H3,RCVD_IN_MSPIKE_WL,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: function definition with & operator To: zsh-workers@zsh.org References: From: Eric Cook Message-ID: Date: Fri, 1 Sep 2017 17:23:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:agAcx+d1nrmHCvcnIAdwkAICpwU/JhHY4r2d24QSzSy2slpjfWL GbQSaAm/C3yz6alHR9QxoRMy5gfEwxLxA2dW0qCxawmtrnsFgPBhkdLOvpNS5oQILPhe+tH sN4wXXZh58m3R6P4xmEhkZ68RybgEsgV/vdTkKYrGAZ3PBVV9V+ZbD1XxwOzhWRtSO6zFsN GuYAb1wAuZm0J9oWVr1lg== X-UI-Out-Filterresults: notjunk:1;V01:K0:W6jiHsJmPFg=:hVRCGflFG5S/qZH5Wouj9F FtcWsk3mxWGnebvwhzW+/pEb/E4TBAfo7aHAiLtP4F5WzdSDOpmksubKCXqVssDli9XsvN05m k9RlpnduxpIt0oRh676bevYLxtKyqeUJB/HhwQqrNVMoxo/QR1vdn95VOL/jtQU295ilURjNj CsvRpgGp+MIZWqyKxxuiXtVA1V6L5tBY2kPYpJF3Xp//ePvmnPMoY0RH51zvd/+Kpq0krAyrA YjVWKw0ls8AGHPStxAXseOGdzvxGnznmhh3vgKANKM2aU1p8e7gJns0QMOs5djun305Djr4aK pRT9rsIDd7f+IRNhTS7hYv3u2KoNbSs4rPwpkSQ7NhDMDExu6TAJvvKB1kSCqunBTFuBCcwX4 AUSIRVLJRKuAsIllw871B/G31rZbcyXNzYuu0WLigiARhTBYIfvJUF2SDVhElIcovbdV3dBNq RnTmcrX/Ejh8KCRaXEnRG5MFisDm0d9UMqGxNuDh/z7JTT/v2hfk9czWudXp3IV1NI16c9h9a wnGDVpFkv5W68TbqvTAQM9ubSLSVMexqKciUr5gy5WoHVgs54/jTGBmLSKp0dvUC/DdePSax4 3l4/VT/ISCGG8gdQgdvAT9dpNVJYKjJ+Ju/kY57EihdcnjSxHw+iXAgNTowHLiAkIhwKyuNh3 +3EPvH7JGZynVbfVxMmQtPV7VLRek+y/4UJdvxLOJPIx11H6X/1B24az2VELUVYi1x9Q1pg6O JGrWQZ2zBYQ4e9hJpeDI8DdnIFA26VjOVCIcvktC/kqRsnHjmWdsIBM8e+CbfVnJgV3VkILck pHqQkCC8qePZQgPAoK8AXHTwSlxTjiZBDBa64eKzHvPPObkTHo= On 09/01/2017 04:46 PM, Bart Schaefer wrote: > On Fri, Sep 1, 2017 at 11:09 AM, Eric Cook wrote: >> The other week when messing around i noticed that you can define an function >> in (what i thought would be) the background and it will remain in defined. > > Background jobs are always run in a subshell, Exactly what i thought, but if that were the case, foo wouldn't be defined after the first example since & was the terminator used instead of ;. The second example behaves like i would expect.