Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Portably checking for shell level
- X-seq: zsh-users 7874
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Portably checking for shell level
- Date: Tue, 17 Aug 2004 20:59:40 +0200
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
Hi all :)
I have a shell script that cannot be sourced, because it must be
run in a clean environment. Under zsh I achieve this using 'emulate
-L zsh', or just by checking '$SHLVL' if the script won't run just by
defaulting the ZSH options. The problem is: how to do this portably?
SUS doesn't even define a 'source' builtin, neither a $SHLVL shell
parameter, so I'm completely lost...
I know that this question is a bit offtopic here: if this annoys
anyone, please tell me where could I send this kind of questions.
Otherwise I prefer to ask here because here is where the shell
experts are. And, in any case, sorry if I'm bothering anyone.
Thanks in advance :)
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