When you start a new session in tmux
or create a new window inside a running session, its default behavior is to run a shell (ex.: bash
) as a "login shell".
I understand that a login shell is intended to execute a routine of configurations and procedures that are of interest just when you are logging in a system. But in the majority of the cases (with the exception that you can use tmux
as a login shell) it’s not the true intent of the user to do this when they just wants to open a new window.
So what is the rationale for making this the default behavior of tmux
?
The only thing the documentation says about the matter:
default-command shell-command
Set the command used for new windows (if not specified when the
window is created) to shell-command, which may be any sh(1)
command. The default is an empty string, which instructs tmux
to create a login shell using the value of the default-shell
option.