On Mon, Mar 31, 2008 at 5:58 PM, Jonatan Liljedahl <[EMAIL PROTECTED]> wrote:
>  Are you sure? When I start an xterm by simply typing 'xterm' in another
>  xterm, I get one with stuff from my ~/.zprofile loaded. In case it
>  inherits the variables from the parent xterm, then it's no problem
>  because it would do it also from other parent shells (like slims X session).
>
>  In case of important environment variables, they could even be put in
>  zshenv which are read by all shells, login or not.

Login shell are only those shells invoked by "login."  IE, after
booting on a tty, or coming in from SSH (usually; can be changed in
sshd_config.)  Some terminal emulators can be configured to launch
shells as login shells, or you can use sh --login, but in general when
you invoke a shell at any time other than a login prompt, it's not a
login shell.
Hence why you have zshrc, etc, for interactive shells ;-)

putting too much in zshenv is a bad idea precisely because it must be
parsed by ALL shells.  There is a ridiculous amount of shell forking
in unix (a complex single-line command can easily get up to dozens) so
this is resource-wasteful; especially since usually it will never be
used (IE, when zsh forks a subshell to run some binary, it will source
all this only to exec the binary, with the laboriously-prepared shell
environment never used at all.)

Actually this isn't as big a deal as with sh since most scripts don't
run in zsh anyway.  But there are aesthetic principles here ;-)

As far as duplicating configuration for bash:  all the Scripts (as in
GoboLinux) run in bash so you can't exactly get rid of that
environment ;-)

Nick
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to