Screen 启动时无法使用 Zsh 作为登录 shell

发布于 2024-07-18 03:21:40 字数 230 浏览 8 评论 0原文

我将以下内容添加到我的 .zshrc 中,

if [[ $STY = '' ]] then screen -xR; fi

当我现在启动终端时,我会得到 Bash,尽管我在 Terminal > 处有 /bin/zsh Mac 中的设置。

我需要更改哪个变量才能使 Zsh 成为 Screen 中的登录 shell?

I put the following to my .zshrc

if [[ $STY = '' ]] then screen -xR; fi

I get Bash when I start terminal now, although I have /bin/zsh at Terminal > Settings in Mac.

Which variable do I need to change to make Zsh my login shell in Screen?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

帥小哥 2024-07-25 03:21:40

更改 shell(例如更改为 Zsh)的快速方法是运行以下代码

chsh -s /bin/zsh

A fast way to change your shell, for example to Zsh, is to run the following code

chsh -s /bin/zsh
眼趣 2024-07-25 03:21:40
  • 打开您的系统偏好设置
  • 点击帐户
  • 单击显示“单击锁进行更改”的锁图标
  • 按住 Control 键单击或右键单击左侧帐户列表中的帐户名称
  • 选择高级选项...菜单项。
  • 将您的登录 shell 更改为 /bin/zsh
  • 关闭并重新打开 Terminal.app 中的所有 shell。
  • Open your System Preferences.
  • Click on Accounts.
  • Click on the lock icon that says "Click the lock to make changes".
  • Control-click or right click on your account name in the list of accounts on the left.
  • Choose the Advanced Options... menu item.
  • Change your login shell to /bin/zsh.
  • Close and reopen any shells in Terminal.app.
百思不得你姐 2024-07-25 03:21:40

如果环境和其他东西不起作用,那么您可以简单地将其作为 screen 的参数:screen -xR zsh ,screen 将运行 zsh 而不是其他东西(bash)。

If environment and other things aren't working, then you can simply give it as an argument to screen: screen -xR zsh and screen will run zsh instead of something else (bash).

失退 2024-07-25 03:21:40
SHELL=/bin/zsh screen

应该可以工作,即设置环境变量 $SHELL

SHELL=/bin/zsh screen

should work, i. e. set the environment variabe $SHELL

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文