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

Re: Making a script 'sourceable'



    Hi Lloyd :)

 * Lloyd Zusman <ljz@xxxxxxxxxx> dixit:
> >     So I must, by hand, restore any changed variables, options and,
> > what more? Must I restore any other thing? Is there any simple way of
> > making scripts source-safe or source-aware?
> ¡Hola Raúl!  Espero que te encuentres muy bien.

    Igualmente, Lloyd, cuanto tiempo :))) (list people, sorry for the
spanish bit, just a couple of compliments).

    I'm very happy of reading you again :)

> I'm not sure if this handles the case that you're concerned about, but
> when I want to make a script "sourceable" as well as executable, I do
> this:
> 
>   #!/bin/zsh
>   (
>     # all script stuff goes here
>   )

    That's what I've done a couple of times, but I wanted to avoid
the extra fork... For what Bart says in another message in this
thread, it seems the only way of doing it :(

    Thanks a lot Lloyd :) BTW, you can practice your spanish whenever
you want, just drop me an email :) Un abrazo.
 
    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/



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