zsh-users
 help / color / mirror / code / Atom feed
From: Lloyd Zusman <ljz@asfast.com>
To: zsh-users@sunsite.dk
Cc: DervishD <disposable1@telefonica.net>
Subject: Re: Making a script 'sourceable'
Date: Fri, 03 Sep 2004 13:01:02 -0400	[thread overview]
Message-ID: <m31xhj8ey9.fsf@asfast.com> (raw)
In-Reply-To: <20040903163509.GA12618@DervishD>

DervishD <disposable1@telefonica.net> writes:

> [ ... ]
>
>     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?
>
>     Thanks a lot in advance :)
>
>     Raúl Núñez de Arenas Coronado

¡Hola Raúl!  Espero que te encuentres muy bien.

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
  )

Yes, it causes an extra fork, but that's the price I pay for this dual
sourceable/executable capability.


-- 
 Lloyd Zusman
 ljz@asfast.com
 God bless you.


  reply	other threads:[~2004-09-03 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03 16:35 DervishD
2004-09-03 17:01 ` Lloyd Zusman [this message]
2004-09-03 22:16   ` DervishD
2004-09-03 17:20 ` Bart Schaefer
2004-09-04 11:07 DervishD
2004-09-04 15:44 ` Bart Schaefer
2004-09-05 13:33   ` DervishD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31xhj8ey9.fsf@asfast.com \
    --to=ljz@asfast.com \
    --cc=disposable1@telefonica.net \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).