如何强制 Gnu 屏幕加载我的 bash .profile

Nad*_*dal 20 command-line gnu-screen macos

我有 ~/.bash_profile 每次创建新的 GNU 屏幕时都希望调用它,以便我的所有别名在 GNU 屏幕中工作,因为它们在终端中工作。

这就是我的 ~/.screenrc 的样子。

hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "
Run Code Online (Sandbox Code Playgroud)

小智 35

shell -$SHELL

将上面的行添加到您~/.screenrc~/.bash_profile.


AlG*_*AlG 0

问题有点模糊;shell 启动文件在创建窗口时由屏幕运行,您不会感觉 .bashrc 或 .bash_profile 中的某些内容配置错误。我还没有在 OS X 上使用屏幕时遇到过这个问题。

您尝试过iTerm而不是 screen 吗?我只在 Mac 上使用它,然后在我管理的服务器上使用 screen。