当您在tmux正在运行的会话中启动新会话或在运行会话中创建新窗口时,其默认行为是运行外壳程序(例如:)bash作为登录外壳程序。
我知道登录外壳程序旨在执行仅在您登录系统时才有意义的配置和过程例程。但是在大多数情况下(除了您可以tmux 用作登录shell之外),当用户只想打开一个新窗口时,这并不是用户的真正意图。
那么将其设为默认行为的理由是tmux什么?
该文档唯一说明此事:
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.
exec sh最终可以忍受...(我没想到。)