From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18985 invoked from network); 3 Sep 2004 22:27:59 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Sep 2004 22:27:59 -0000 Received: (qmail 33695 invoked from network); 3 Sep 2004 22:27:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Sep 2004 22:27:53 -0000 Received: (qmail 8355 invoked by alias); 3 Sep 2004 22:27:44 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7973 Received: (qmail 8337 invoked from network); 3 Sep 2004 22:27:43 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Sep 2004 22:27:43 -0000 Received: (qmail 32682 invoked from network); 3 Sep 2004 22:27:43 -0000 Received: from madrid10.amenworld.com (62.193.203.32) by a.mx.sunsite.dk with SMTP; 3 Sep 2004 22:27:41 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i83MRa128564; Sat, 4 Sep 2004 00:27:36 +0200 Received: from disposable1@telefonica.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1C3MM0-0003KL-00>; Sat, 4 Sep 2004 00:16:20 +0200 Date: Sat, 4 Sep 2004 00:16:20 +0200 From: DervishD To: Lloyd Zusman Cc: zsh-users@sunsite.dk, DervishD Subject: Re: Making a script 'sourceable' Message-ID: <20040903221620.GA12790@DervishD> Mail-Followup-To: Lloyd Zusman , zsh-users@sunsite.dk, DervishD References: <20040903163509.GA12618@DervishD> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.1i Organization: Pleyades X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 Hi Lloyd :) * Lloyd Zusman 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/