Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sourcing a sh file in zsh
- X-seq: zsh-workers 26428
- From: Andrey Borzenkov <arvidjaar@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: sourcing a sh file in zsh
- Date: Sun, 25 Jan 2009 13:41:37 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=IHToyQJYhIxmvWiGfHhLZvkowBB0u1petMleYMAeiO0=; b=DCeUdqcubYXG65Z0XBm1y6FOVMIOI/0f02es2bjCOv2Zby4HfzH/XdOtBoB+y0lKPc AS26m3vgyDUkAv3EhSd3gw+hbBaJRwur6CY5KtwS1ptSBQvArXdTlNmxqFy8qXPIJ69v e9BNY1WwlT46INp9ZrOg45xTFw785GMHZt7sE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=kmL6nPUBsHWZ+qwbCii7NrmXq8VzxUChK3N/yCm+CQvzCcgwus+Cv1qs+4k9SqX2AT H8aAk3cqRT7gz2ir9Y5Ihn8xFn1bsquTOIqb1gCZIwdMsAxFqDvZSh1gBqs09+O4ua5A 33eT1hvJn9hRiPYcXYl/9YLozxj9hh8iZaUoY=
- In-reply-to: <2d460de70901250225g37845bftbbf4b87f12997a7c@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <BD9D2405-AD6A-4336-9C8A-85149165B6B8@xxxxxxxxx> <200901251156.04815.arvidjaar@xxxxxxxxx> <2d460de70901250225g37845bftbbf4b87f12997a7c@xxxxxxxxxxxxxx>
On 25 ÑÐÐÐÑÑ 2009 13:25:34 Richard Hartmann wrote:
> On Sun, Jan 25, 2009 at 09:56, Andrey Borzenkov <arvidjaar@xxxxxxxxx>
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.
>
I asked already - why would you want to create non-zsh function inline
in zsh script?
Anyway, if you really need it
emulate -? sh -c "${$(<<-\HERE
function foo {
...
}
HERE
)}"
Attachment:
signature.asc
Description: This is a digitally signed message part.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author