在 mac 终端上退出 zsh 不会退出窗口

tur*_*use 5 zsh terminal terminal.app macos

当我exit在 MacO 的终端上退出 zsh 时,它给了我一条消息:

logout

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]
Run Code Online (Sandbox Code Playgroud)

但是,这不会关闭终端窗口。

这可能与我遇到的另一个问题有关。我曾经chsh -s /bin/bash将 bash 作为我的主终端 shell。然而这不起作用 - 终端仍然使用 zsh 打开。

Wie*_*and 6

这可以在 Terminal.app 的设置中进行配置:

\n
\n

要在 Mac 上的终端 App 中更改这些偏好设置,请选取“终端”>“偏好设置”,点按“配置文件”,选择一个配置文件,然后点按“Shell”。

\n
\n

https://support.apple.com/en-gb/guide/terminal/trmlshll/2.11/mac/11.0

\n

您正在寻找的设置称为

\n
\n

当 shell 退出时

\n
\n

听起来它被设置为

\n
\n
    \n
  • 如果 shell 完全退出则关闭:如果退出时出现错误,终端窗口将保持打开状态;否则,它会关闭。
  • \n
  • Don\xe2\x80\x99t 关闭窗口:退出时终端窗口保持打开状态。
  • \n
\n
\n

第三个选项是

\n
\n
    \n
  • 关闭窗口:终端窗口在退出时关闭。
  • \n
\n
\n