by yjftsjthsd-h · 3y ago · 0 comments
I appear to have just given up and symlinked them together. Anyone have a better idea?
Edit: Actually, my profile apparently has a conditional to detect what shell it's loaded by (which I did remember), and for at least bash a conditional to detect interactive mode (which I did not). So I'm still dealing with this, just not at the file level.
To make make bash behave in a compatible manner, you need to:
- Delete .bash_profile, so .profile gets sourced instead (works around bash ignoring .profile when .bash_profile exists)
- At the bottom of .profile, call $ENV (works around login bash ignoring bashrc)
- Make .bashrc call or be equal to $ENV
- At the head of $ENV, do an early exit for non-interactive shells (works around bash sourcing the bashrc when invoked non-interactively via SSH or socket, also works around the previous workaround)
In terms of startup logic, bash is the worst shell i've seen so far.
https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-...
It references this blog post:
https://meta.ath0.com/2007/10/23/cleaning-up-bash-customizat...