After updating my /etc/shell
file and typing a csh -s /usr/local/bin/zsh
afterwards, I decided to quit and relaunch tmux with hope it will take account of my new $SHELL environment variable. Unfortunately, tmux still shows the old /bin/zsh
after typing echo $SHELL
.
How to tell tmux to inherit the $SHELL variable of the shell that launched it?
CodePudding user response:
set-option -g default-shell "$SHELL_PATH"
in ~/.tmux.conf or /etc/tmux.conf. Works on arch.
You can reload the config file with : source-file e.g.
<C-b>: source-file ~/.tmux.conf
You would need to do it for every tmux instance. Otherwise you may restart
tmux with killall tmux; tmux
these commands will change the path of shell in tmux