* help with understanding diffs in startup files @ 1997-12-08 10:42 Timothy J Luoma 1997-12-08 11:15 ` Andrew Main 0 siblings, 1 reply; 5+ messages in thread From: Timothy J Luoma @ 1997-12-08 10:42 UTC (permalink / raw) To: zsh-users Well, there's this Linux account I have where there is some system file which is setting up some variables after my .zshenv. Really annoying. Sun and NeXT have never had this problem. Anyway, the only systemwide I can find is /etc/zprofile, and it isn't in there. Is there a way I can tell zsh to let me know what files it is sourcing during startup? What else can I do to figure out where these alias definitions are coming from!??!? Thanks TjL ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: help with understanding diffs in startup files 1997-12-08 10:42 help with understanding diffs in startup files Timothy J Luoma @ 1997-12-08 11:15 ` Andrew Main 1997-12-08 11:24 ` Timothy J Luoma 0 siblings, 1 reply; 5+ messages in thread From: Andrew Main @ 1997-12-08 11:15 UTC (permalink / raw) To: Timothy J Luoma; +Cc: zsh-users Timothy J Luoma wrote: >Well, there's this Linux account I have where there is some system file >which is setting up some variables after my .zshenv. Really annoying. Sun >and NeXT have never had this problem. It is a particular problem with Slackware. >Anyway, the only systemwide I can find is /etc/zprofile, and it isn't in there. /etc/zlogin, /etc/zshrc and /etc/zshenv are also used if present. >Is there a way I can tell zsh to let me know what files it is sourcing >during startup? You could strace it. "zsh -x" might also have some benefit. -zefram ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: help with understanding diffs in startup files 1997-12-08 11:15 ` Andrew Main @ 1997-12-08 11:24 ` Timothy J Luoma 1997-12-08 12:11 ` Andrew Main 0 siblings, 1 reply; 5+ messages in thread From: Timothy J Luoma @ 1997-12-08 11:24 UTC (permalink / raw) To: Andrew Main; +Cc: zsh-users Author: Andrew Main <zefram@tao.co.uk> Original-Date: Mon, 8 Dec 1997 11:15:09 +0000 (GMT) Message-ID: <199712081115.LAA29680@taos.demon.co.uk> > It is a particular problem with Slackware. This is Redhat I think > >Anyway, the only systemwide I can find is /etc/zprofile, and it isn't in > >there. > > /etc/zlogin, /etc/zshrc and /etc/zshenv are also used if present. None of them are. I've always just used one init file. Perhaps this would be a good time to learn what should go in what file. Where should variables go? functions? aliases? bindkeys? I am tempted to put them in .zlogin since that is read last but that is probably not right. TjL ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: help with understanding diffs in startup files 1997-12-08 11:24 ` Timothy J Luoma @ 1997-12-08 12:11 ` Andrew Main 1997-12-08 16:14 ` Bart Schaefer 0 siblings, 1 reply; 5+ messages in thread From: Andrew Main @ 1997-12-08 12:11 UTC (permalink / raw) To: Timothy J Luoma; +Cc: zefram, zsh-users Timothy J Luoma wrote: >I've always just used one init file. Perhaps this would be a good time to >learn what should go in what file. Approximately speaking... >Where should variables go? >functions? .zshenv >aliases? >bindkeys? .zshrc Actually, the division isn't that simple. .zshenv should set up your normal shell environment, including many options, most functions and most variables. .zshrc should set up your interactive shell environment, including many options, all bindkeys and compctls, aliases, and functions and variables that are only used interactively (such as compctl functions and $HISTCHARS). .zprofile (or .zlogin if you prefer) should contain commands to run when you log in, and should not affect the environment at all. -zefram ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: help with understanding diffs in startup files 1997-12-08 12:11 ` Andrew Main @ 1997-12-08 16:14 ` Bart Schaefer 0 siblings, 0 replies; 5+ messages in thread From: Bart Schaefer @ 1997-12-08 16:14 UTC (permalink / raw) To: zsh-users On Dec 8, 5:42am, Timothy J Luoma wrote: } Subject: help with understanding diffs in startup files } } Well, there's this Linux account I have where there is some system file } which is setting up some variables after my .zshenv. Really annoying. Sun } and NeXT have never had this problem. On Dec 8, 11:15am, Andrew Main wrote: } } It is a particular problem with Slackware. On Dec 8, 6:24am, Timothy J Luoma wrote: } } This is Redhat I think The contributed binary RPM for zsh-3.0.5 installs system-wide init files in the directory /etc/zsh/: /etc/zsh/zlogin /etc/zsh/zlogout /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc I haven't looked to see what's in each of them, because I build zsh myself, so I didn't install the binary RPM. On Dec 8, 12:11pm, Andrew Main wrote: } Subject: Re: help with understanding diffs in startup files } } Timothy J Luoma wrote: } >I've always just used one init file. Perhaps this would be a good time to } >learn what should go in what file. } } Actually, the division isn't that simple. .zshenv should set up your } normal shell environment, including many options, most functions and } most variables. .zshrc should set up your interactive shell environment, } including many options, all bindkeys and compctls, aliases, and functions } and variables that are only used interactively (such as compctl functions } and $HISTCHARS). .zprofile (or .zlogin if you prefer) should contain } commands to run when you log in, and should not affect the environment } at all. I agree with everything but the last clause. There's no reason to say that .zprofile or .zlogin should not affect the environment; they should contain commands, possibly including environment settings, that need to happen at least once when you log in, but that then remain constant. For example, my .zlogin does a number of tests of what host type I'm on, what software is installed at what versions and where, and so on, and manipulates the environment accordingly. But that doesn't need to happen every time I start any interactive shell -- unless of course a misguided /etc/zshrc steps on my changes every time. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1997-12-08 16:31 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1997-12-08 10:42 help with understanding diffs in startup files Timothy J Luoma 1997-12-08 11:15 ` Andrew Main 1997-12-08 11:24 ` Timothy J Luoma 1997-12-08 12:11 ` Andrew Main 1997-12-08 16:14 ` Bart Schaefer
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).