zsh 在屏幕上表现得很奇怪

发布于 2024-09-01 09:03:51 字数 632 浏览 1 评论 0原文

我已将 zsh 设置为默认 shell。只要我不在屏幕内,它就可以正常工作。当我启动 screen 时,看起来好像有些点文件未加载。例如,我的 $PATH 设置不正确,并且缺少一些目录。我不太确定从哪里开始寻找。因为一切都很好,只要我不在屏幕中。

我的点文件可以在 github 上查看。我还使用 oh-my-zsh——你会注意到的。

奇怪行为的示例:

  • 主题看起来略有不同(蓝色箭头应该是白色的)
  • $PATH 中的某些目录未设置:

    <代码>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/Users/Nils/ bin:/usr/local/git/bin:/usr/local/bin VS. /usr/bin:/bin:/usr/sbin:/sbin:/Users/Nils/bin:/usr/local/git/bin:/usr/local/bin

I have zsh set up as my default shell. It works fine as long as i am not within a screen. When i start screen it looks as if some dotfiles are not loaded. For example my $PATH isn't set correctly and some directories are missing. I'm not quite sure where to start looking. Since all is fine, as long as i'm not in a screen.

My dotfiles can be viewed on github. I also use oh-my-zsh — as you will notice.

Examples for weird behavior:

  • The Theme looks slightly different (blue arrow where it should be white)
  • Some directories in $PATH not set:

    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/Users/Nils/bin:/usr/local/git/bin:/usr/local/bin VS. /usr/bin:/bin:/usr/sbin:/sbin:/Users/Nils/bin:/usr/local/git/bin:/usr/local/bin

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

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

发布评论

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

评论(1

坠似风落 2024-09-08 09:03:51

我认为问题是这样的:

source ~/bin/dotfiles/zsh/*
source ~/bin/dotfiles/zsh/functions/*

source命令只接受一个文件参数,其余的作为其他参数而不加载,这意味着只有第一个通配文件被获取,而不是全部。这甚至在没有屏幕的普通终端中都不起作用。尝试这样的事情:

for x in ~/bin/dotfiles/zsh/* ~/bin/dotfiles/zsh/functions/*; source $x

I think the problem is this:

source ~/bin/dotfiles/zsh/*
source ~/bin/dotfiles/zsh/functions/*

The source command takes only one file parameter, the rest is taken as other arguments and not loaded, which means that only the first globbed file is sourced, not all of them. This didn't even work in a normal terminal, without screen. Try something like this instead:

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