I just installed ZSH on a remote server where we are 2 "admins".
I switched my default shell to ZSH with chsh -s $(which zsh). echo $SHELL gives the output /usr/bin/zsh which proves it.
But, when I open my ssh session I receive an error like:
/etc/profile.d/vk.sh:30: command not found: shopt
This error appears only at startup and I see it only once when opening an ssh session.
In my understanding, the other admin placed some custom script with his own aliases and using shopt -s histappend command there as well.
My question is, why my SSH ZSH session invoking that script at startup? Shouldn't it be scoped just to my profile?
What would be a graceful solution for me to run ZSH without affecting/touching his stuff? Should I ask him to move that thing somewhere else in his home dir?
/etc/profile(and scripts it sources in/etc/profile.d) really ought to be POSIX/Bourne compatible, for exactly this reason. OTOH I thought zsh should use its own/etc/zsh/zprofileover/etc/profileanyhow? One old-school workaround you could consider is changing your actual login shell to bash and thenexec /usr/bin/zshat the end of your own~/.profile(or~/.bash_profile, if you have one).