Zsh Mailing List Archive
Messages sorted by:
Re: zsh startup files
- X-seq: zsh-users 2255
- From: Stefan Monnier <firstname.lastname@example.org>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: zsh startup files
- Date: 29 Mar 1999 09:15:48 -0500
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <5l90cmijvs.fsf@xxxxxxxxxxxxxxxxxxx> <19990324181547.A4700@xxxxxxxxxxxxxxxxxxxx> <5l7ls6iee4.fsf@xxxxxxxxxxxxxxxxxxx> <199903250220.VAA12122@xxxxxxxxxxxxxxxxxxxx> <19990325005332.B5194@xxxxxxxxxxxxxxxxxxxx> <9903250903.AA30753@xxxxxxxxxxxxxxxxx> <9903251002.AA18225@xxxxxxxxxxxxxxxxx> <199903251055.LAA02436@xxxxxxxxxxxxxxxxxxxxx> <9903251117.AA09841@xxxxxxxxxxxxxxx> <9903251122.AA14741@xxxxxxxxxxxxxxxxx> <5l1zidiw46.fsf@xxxxxxxxxxxxxxxxxxx> <9903251400.AA54287@xxxxxxxxxxxxxxxxx> <5lyaklgy2w.fsf@xxxxxxxxxxxxxxxxxxx> <990327170423.ZM3271@xxxxxxxxxxxxxxxxxxxxxxx> <5logldgt3m.fsf@xxxxxxxxxxxxxxxxxxx> <990328175751.ZM8402@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: monnier@xxxxxxxxxxxxxxxxxxx
> } Note that this `exec' solution cannot be used for the case of commands
> } executed from `rsh'.
> I say, so what? Only the two zshenv files are being sourced in that case
> The canonical example of this being useful is terminal setup, which is
> frequently done in /etc/profile on SVR4 systems (Motorola, Data General,
> Olivetti, NCR, etc., where Bourne shell is often still the default shell)
> and which a sysadmin is therefore likely to place in /etc/zprofile.
[ passing note: if someone could tell me in which case terminal setup
is useful, I'd be happy to learn. I've never needed any such thing.
I thought it was because I only use xterm terminals, but now that I have
a dumb-terminal plugged into my workstation, I have to revise this
judgment. Maybe the terminal setup is only unnecessary for xterm and
vt220-compatible (i.e. for vt100-style) terminals ? ]
> Settings in zshrc and zlogin (whether /etc/ or ~/.) may depend on correct
> values of TERM, LINES, and COLUMNS; it's too late to fix them after the
> entire system initialization has run (without duplicating the parts that
> rely on them), but too early to fix them before /etc/zprofile.
Could you give examples of zshrc (zlogin is irrelevant to me: you either use
zlogin or zprofile, not both) settings that might depend on TERM/LINES/COLUMNS?
Also, if the sysadmin's files require changes in .zprofile for /etc/zshrc to
work properly, it just means that /etc/zprofile (or /etc/zshrc) is somewhat
bogus. It seems more likely that /etc/zshrc works properly when executed
straight after /etc/zprofile and the .profile might break it.
> about what happens in between in /etc/z*, rather than simply wanting to
> skip it entirely and do only your own stuff, then you need to get your
> shot at it both before and after.
The /etc/z* files should be *minimal*. Anything that is not strictly
necessary should be moved to /etc/user/foo and explicitly sourced from ~/.z*
(themselves inherited from /etc/skel/.z*). This gives the user and the
sysadmin much more freedom and flexibility than the default complex sequence.
> I entirely agree that if what you want is for that other code to NOT run,
> then the current startup file system is deficient. That's a different
> issue from running the code in some other order.
Actually, the ability to use NO_RCS is really all I need since I can then
manually source the files I want in the order I want.
The complex setup suggested by Sweth seems unwarranted and cumbersome.
The only problem with NO_RCS is the logout files, so adding a variable
holding the files to be executed at logout is all that's needed.
Messages sorted by: