- System: macOS 10.12
- Tmux version: 2.6
As a macports user, I have /opt/local/bin
at the beginning of my PATH
. However, when starting tmux
, it uses /bin/bash
instead of /opt/local/bin/bash
, indeed, the SHELL
variable also points there. This confuses me and causes some .bashrc
settings to break because the version is outdated.
I know I can set the path to tmux's default shell set-option -g default-shell
, but I use my .tmux.conf
on different systems, so it should be OS-agnostic and simply use the shell one would get when executing bash
.
I have all my settings in .bashrc
and source this file in .bash_login
und .bash_profile
, so my PATH
should be available to tmux
.
How can I solve this?
It seems that SHELL
is always /bin/bash
, not sure why. My terminal is configured to start /opt/local/bin/bash -l
at startup.
tmux
, it uses/bin/bash
instead of/opt/local/bin/bash
, indeed, theSHELL
variable also points there." – Which of the two paths do you refer to by "there"? Do you mean theSHELL
variable aftertmux
and the new shell starts? or before? (i.e. in the old shell, if you invoketmux
from already existing shell). Do you usetmux
as a login shell? If not, what is your login shell and what is theSHELL
variable in it? (before you invoketmux
from it).SHELL
is always/bin/bash
, not sure why. My terminal is configured to start/opt/local/bin/bash -l
at startup.