Closed sosloow closed 1 year ago
You would need to run a login shell if we want to load ~/.profile
.
I thought terminus runs a login shell by default? If it doesn't, how can I make sure, that terminus runs it?
Ok, as I understand, it should be enabled just by specifying -l
after bash
in cmd
.
And this is exactly how it is in the default config, that I use
{
"name": "Bash",
"cmd": ["bash", "-i", "-l"],
"env": {
},
"enable": true,
"platforms": ["linux", "osx"]
}
What might be the problem with it?
Oh, you are right. I am not sure what has happened. I believe bash login shell reads .bash_profile
first, right?
I think, on my system it reads .profile
first and then sources .bashrc
from there.
But I just tried copying .bashrc
to .bash_profile
, and terminus loaded all of my configs from there.
I always thought, .bash_profile
is used on osx, and on ubuntu it's should be .bashrc
.bash_profile
is different from .bashrc
. bash_profile is for login shell and bashrc is for interactive shell. Note that login shell could be either interactive or non-interactive.
You just need to put
if [[ -f ~/.profile ]]; then
source ~/.profile
fi
if [[ -f ~/.bashrc ]]; then
source ~/.bashrc
fi
in .bash_profile
.
It is I believe the recommended way to make sure the files are always sourced correctly.
Ok, makes sense, thanks.
Hello, I'm using Ubuntu 22.04. After one of the updates terminus stopped loading
~/.profile
and subsequently~/.bashrc
with my env variables and configs. What can I do to debug and fix it?