From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16997 invoked from network); 25 Jan 2009 10:25:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Jan 2009 10:25:51 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 97579 invoked from network); 25 Jan 2009 10:25:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Jan 2009 10:25:44 -0000 Received: (qmail 16890 invoked by alias); 25 Jan 2009 10:25:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26427 Received: (qmail 16872 invoked from network); 25 Jan 2009 10:25:38 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 25 Jan 2009 10:25:38 -0000 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by bifrost.dotsrc.org (Postfix) with ESMTP id 5CB9880271F0 for ; Sun, 25 Jan 2009 11:25:35 +0100 (CET) Received: by fg-out-1718.google.com with SMTP id e21so2947267fga.37 for ; Sun, 25 Jan 2009 02:25:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=hii7gvuuvUx0+rGHJo4BJeCai27PzTTjr//B1lralHw=; b=V4Ds7ZiTU7qHxITYsBkicbIcaSGpgWd9mFuNJ0vYZPgzqPBXLHD/0Qiunh+J2GbrVx cafdE3kZaXKPCSJy9NirjAi4RYkrpwYiFQj8v3QKmzzUkDLf5OIxI6FQZsLKMCOT7Ef8 El2NSiy2YHzSYatZhAuitdpgY8zvRzsqDzhuQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qZfMWTqWCDLNslQinroUheHwC7lwP55wlSPs3ylg2O//ejyi99iX1eBKPtUKiY1bf8 lsGPuDodJq6r5Jx+w0JEmW6kqjKy9B5eGwK6YVhfvU9Sn85cSs495zbU9+riueEiY7V8 20JDG7ZL9m9zTRsXga1P4mYvOIg7HP5xgM7JI= MIME-Version: 1.0 Received: by 10.86.84.5 with SMTP id h5mr86618fgb.33.1232879135021; Sun, 25 Jan 2009 02:25:35 -0800 (PST) In-Reply-To: <200901251156.04815.arvidjaar@gmail.com> References: <20090124173836.64403fdc@pws-pc> <090124152643.ZM24163@torch.brasslantern.com> <200901251156.04815.arvidjaar@gmail.com> Date: Sun, 25 Jan 2009 11:25:34 +0100 Message-ID: <2d460de70901250225g37845bftbbf4b87f12997a7c@mail.gmail.com> Subject: Re: sourcing a sh file in zsh From: Richard Hartmann To: Andrey Borzenkov Cc: zsh-workers@sunsite.dk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/8900/Sun Jan 25 03:40:27 2009 on bifrost X-Virus-Status: Clean On Sun, Jan 25, 2009 at 09:56, Andrey Borzenkov wrote: > Actually you can always do > > foo=$(<<-\HERE > function foo { > ... > } > HERE) > emulate -c sh $foo The problem with that is that it's not immediately apparent that this function is intended to be executed in a different emulation. Bart's suggestion is a lot easier to read for a third party and will thus create less errors. Richard