Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: sourcing a sh file in zsh



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.


Richard



Messages sorted by: Reverse Date, Date, Thread, Author