On Tue, Apr 1, 2008 at 11:29 AM, Jonatan Liljedahl <[EMAIL PROTECTED]> wrote:
>
> Michael Homer wrote:
>  > On Tue, Apr 1, 2008 at 10:58 AM, Jonatan Liljedahl <[EMAIL PROTECTED]> 
> wrote:
>  >> Michael Homer wrote:
>  >>  > On Tue, Apr 1, 2008 at 10:27 AM, Jonatan Liljedahl <[EMAIL PROTECTED]> 
> wrote:
>  >>  >> Nick Matteo wrote:
>  >>  >>  > On Mon, Mar 31, 2008 at 8:41 AM, Jonatan Liljedahl <[EMAIL 
> PROTECTED]> wrote:
>  >>  ...
>  >>
>  >>>>  > Moving everything to /etc/zprofile won't work because the main 
> concern
>  >>  >>  > is to make sure it's loaded in all _interactive_ shells. (which
>  >>  >>  > zprofile isn't, it's only login shells; zshrc on the other hand is 
> for
>  >>  >>  > exactly this.)  You could have zshrc source zprofile, or you could
>  >>  >>  > just let scripts run in sh (which they pretty much all do) and 
> leave
>  >>  >>  > the slim config running sh --login (which it does by default) and
>  >>  >>  > everything will be fine.
>  >>  >>
>  >>  >>  No, zprofile is loaded for all login shells, and zshrc is loaded for
>  >>  >>  interactive shells *additionally*. So I really think that zshrc 
> should
>  >>  >>  contain only stuff related to interactive shells, like prompt and
>  >>  >>  aliases, etc.. while important setup, variables (like PATH and 
> programs
>  >>  >>  Environment files) should be in zprofile.
>  >>  > Neither xterm nor any of its derivatives start login shells by
>  >>  > default, so zprofile would not be loaded in them and mayn't have been
>  >>  > beforehand. See the zsh guide for exactly what gets loaded when:
>  >>  > http://zsh.sunsite.dk/Guide/zshguide02.html#l9
>  >>
>  >>  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).
>  > Yes, I'm sure. Take a look at the docs (or stick an echo in your
>  > ~/.zprofile and see what you get output). I think there's an X
>  > resource you can set to make the -ls argument automatic, but I don't
>  > remember what it is.
>  > Environment initialisation probably should be in the profile all the
>  > same, that's what it's meant for, but there are some obstacles to
>  > doing it that need to be considered first. To be honest, I'd probably
>  > be using sh or bash as the login command there anyway.
>
>  Regardless of what shell one has in their slim login command, I still
>  wonders: shouldn't the default gobo settings make zsh --login import the
>  Environent cache and other important env vars?
>
>  I still don't get the reason why env stuff shouldn't be in zprofile,
>  since it seems to work in all cases. (It *is* read by interactive shells
>  too, as promised in the zsh manpages)
I don't have time to reply to the rest of it right now (out the door
in a couple of minutes), and Nick looked to have a reasonable response
below, but that just isn't true. zprofile is *not* read by interactive
shells, as promised by the zsh manpages. Only by login shells. But if
there's a login shell somewhere up the hierarchy (either an
interactive or noninteractive one), PATH and so forth should be
inherited by the usual mechanisms and work.

Environment stuff probably should be in profile, but for a variety of
reasons that doesn't quite work as well as would be liked.
-Michael
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to