You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in tmux-plugins/tpm#295 and tmux/tmux#4166, run-shell is now setting $SHELL to sh which causes tmux-sensible, at line 103, to incorrectly set default-command to use 'sh' instead of the user-selected shell. This means new panes and windows will fire up with sh instead of what the user expects (e.g., zsh).
A work around is to put set -g default-command "reattach-to-user-namespace -l $SHELL" directly into ones .tmux.conf to override tmux-sensible.
One possible fix would seem to be to modify tmux-sensible to use the tmux default-shell variable instead of $SHELL.
I've also faced this issue, I have analyzed this further more, here are my thoughts on fixing this issue,
removing reattach-to-user-namespace would cause breakage for people using tmux < 2.6
the default-shell variable may or may not be set by the user so relying on it can cause problems.
using tmux showenv -g SHELL will use the system default global $SHELL variable and this overrides the tmux configured default-shell variable, if setting default-shell in tmux config doesn't update the$SHELL variable accordingly, this will load default shell from system's $SHELL variable.
A fault tolerant solution would be to use default-shell variable if it is set, otherwise use tmux showenv -g SHELL as a fallback instead of using $SHELL variable directly.
@bruno-@von please share your opinions on this,
I would love to create a PR implementing this, if it is ok.
That seems reasonable. FYI, as I read the current tmux manpage, default-shell is set by tmux from $SHELL automatically on start-up and does not need to be set by the user's configuration. That matches the behavior I'm seeing (i.e. it is set and I didn't do it).
As described in tmux-plugins/tpm#295 and tmux/tmux#4166,
run-shell
is now setting$SHELL
tosh
which causes tmux-sensible, at line 103, to incorrectly setdefault-command
to use 'sh' instead of the user-selected shell. This means new panes and windows will fire up withsh
instead of what the user expects (e.g.,zsh
).A work around is to put
set -g default-command "reattach-to-user-namespace -l $SHELL"
directly into ones .tmux.conf to override tmux-sensible.One possible fix would seem to be to modify tmux-sensible to use the tmux
default-shell
variable instead of$SHELL
.Or see this comment for other suggested fixes.
The text was updated successfully, but these errors were encountered: