On Tue, 22 Dec 2015, Fotis Georgatos wrote:
Compare bash vs zsh:
http://blog.flowblok.id.au/static/images/shell-startup-actual.png # if
you have similar diagram for your distro, please post! fi. HPC systems
rely on environment modules [1] and bash is still particularly tricky
while using it, after 2 decades :-( .
This diagram essentially reiterates my point, if indirectly: not only is
the current startup excessively complex, it's almost impossible to reason
about and/or use with any expectation of getting it right. (Hint: the
bash portion of the diagram doesn't -- but who can blame them?)
Users on large platforms flee towards other shells (in practice: that's
zsh) due to this sticky issue, which is certainly fixable and, we might
even get a chance to fix some of bash_logout's annoyances, too.
If users are already abandoning bash, how is another feature wedged into
bash going to help? I don't follow the reasoning here. Most of what
could be accomplished with this would be better addressed by something
shell-agnostic like pam_env, or by just reminding users that if they want
feature XYZ, they'll need to source /etc/xyz from their shell startup file
of choice, perhaps via functioning examples in their default files...
if you have ever cought yourself to have a messy bash initialization
file, check it out because it really helps.
In fact, with it you could have most of the common configuration for a
handful of shells *in a single place*.
For whatever it's worth, the way I deal with this is to keep a .profile
full of POSIX shell to handle most of the environment setup -- including
undoing the obnoxiousness sourced from vendor files in /etc that I can't
otherwise convince bash to ignore -- which is in turn sourced by this
preamble in my .bashrc:
[[ "$-" != *i* ]] && return
. ~/.profile
Those two plus a .bash_profile link to .bashrc cover most cases of
{,non-}{login,interactive,bash} shells with reasonably correct "just do
what I want" behavior.
-Rob