2
I'm having a really strange problem. Tmux is exporting an environment variable that I used to have exported in my ~/.bashrc
, but which I have since removed (let's just call this $MYSTERIOUS_ENV_VAR
. When I'm in a tmux session and I run echo $MYSTERIOUS_ENV_VAR
, it continues to output the path that I used to have exported in ~/.bashrc
. However, when I run this same echo
command in a normal shell (not in tmux), it gives me back nothing, which is what I'd expect.
I've checked my tmux configuration and my shell startup files and I'm not exporting this anywhere, so I'm really confused about where it's coming from - to be thorough, these are the files I have checked:
~/.bashrc
~/.tmux.conf
~/.bash_profile
If it helps, the environment variable that I'm exporting is $PASSWORD_STORE_DIR
, which is used for the open source password management program, pass. I used to have it point to a custom location, but I removed the export so that my passwords would save to the default location, $HOME/.password-store
.
I feel like I've done something silly and that it's a simple problem, but cannot seem to figure out what it is. Any help would be very much appreciated!
Are you in a
tmux
session that you started before you changed.bashrc
? It still has all the environment variables that it had when you started. – Barmar – 2017-06-06T15:24:27.550I thought this might be the case, but I've tried exiting the tmux session and restarting the terminal app (I'm on OSX) altogether. But the issue persists even in new tmux sessions. – 3cheesewheel – 2017-06-06T18:41:07.887
Maybe it's coming from
.tmux.conf
? – Barmar – 2017-06-06T19:02:33.713I checked that as well. Also no :( – 3cheesewheel – 2017-06-06T20:29:56.320
I'll edit my question to include a list of files I've checked, that might be helpful. – 3cheesewheel – 2017-06-06T20:30:13.310
I am having a similar problem. Did you find a solution? – José D. – 2017-09-11T14:45:29.603
Have you tried various things around
tmux set-environment
? – Steven Lu – 2018-05-25T19:55:02.810