-
Notifications
You must be signed in to change notification settings - Fork 134
Description
Shell scripting is not for the faint of heart. For example, .profile tends to be ignored by many different shell contexts. A decent flowchart is available from Shreevatsa:
https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/
I am not of a solid default could exist for the bash configuration path. .bashrc is better, though people often get confused about .bash_profile, and then there is also /etc/profile. And that's just for bash, it gets even crazier for other shells.
Additionally, inlining script contents is inadvisable as it makes it far more difficult to lint and syntax check shell scripts, compared to separate files... you probably want to run some basic ShellCheck commands for any /root configurations, since these will be running at high privilege.