Hello Frank, > With respect to shells, I usually find that applications, that need to > inject code into a user's shell to be by and large mis-designed. > > Something that *might* make sense is to source stuff from /etc/profile > and “/etc/profile.d/” in POSIX-mode. See ¹, a mail about that from 2011. > Nobody cared enough to reply; which I guess that tells you something > about the urgency of the situation. ;-) > > [1]: > http://lists.alioth.debian.org/pipermail/pkg-zsh-devel/2011-October/000248.html
I’d like to vote for exactly that; sourcing “/etc/profile” in POSIX-mode seems very valid. This file currently seems POSIX without Bashism, and I propose to keep it POSIX. > But like the mails says, even if we did that, it's hard to decide what > because it's not used for portable purposes alone. The bash completion > thing is sourced from there, which other POSIX shells will have a major > problem with. I’m not familiar with other shells, but I don’t think Zsh in POSIX mode provides the “$BASH” variable, so the Bash guard in “/etc/profile” should prevent it from breaking Zsh. Regards, Franklin