On 25 января 2009 13:25:34 Richard Hartmann wrote: > 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. > 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 )}"