Zsh Mailing List Archive
Messages sorted by:
Re: zsh startup files
- X-seq: zsh-users 2250
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: zsh startup files
- Date: Sun, 28 Mar 1999 17:57:51 -0800
- In-reply-to: <5logldgt3m.fsf@xxxxxxxxxxxxxxxxxxx>
- 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>
On Mar 28, 5:14pm, Stefan Monnier wrote:
} Subject: Re: zsh startup files
} >>>>> "Bart" == Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
} > The idea behind interleaving the user and system init files is
} > so that, at each decision point in the system administrator's
} > initialization chain, the user gets a chance to step in and change
} > the details with his own initialization.
} Sounds nice in theory, but how about practice ?
Let me first point out that none of this is interesting for non-interactive
shells. So when you later say:
} > (3) Use "exec" in .zshenv or .zprofile as I described above.
} 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
} Could you give a (few) example(s) where the interleaving is beneficial ?
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.
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.
I could come up with other examples, but they'd all be of that same shape.
Yes, in some cases it might be necessary to set your $path in .zshenv and
then set it again in .zlogin, or whatever. The point is that if you care
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.
} It seems it just makes it easy to make changes that don't have the intended
} effect because other code is executed afterwards.
} Ignoring NO_RCS after /etc/zshenv doesn't seem to make anything easier for
} novices but does seem to make things much harder for the experienced user.
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.
Bart Schaefer Brass Lantern Enterprises
Messages sorted by: