首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当我打开迭代终端时,如何避免显示“[噢-我的-zsh]”消息?

当我打开迭代终端时,如何避免显示“[噢-我的-zsh]”消息?
EN

Stack Overflow用户
提问于 2020-05-02 04:43:00
回答 3查看 4K关注 0票数 2

每当我启动我的迭代终端。我总是在我的终端上收到这条消息,后面跟着提示符。

代码语言:javascript
复制
Last login: Fri May  1 21:33:59 on ttys001
[oh-my-zsh] plugin 'zsh-syntax-highlighting' not found
[oh-my-zsh] plugin 'zsh-autosuggestions' not found
[oh-my-zsh] Insecure completion-dependent directories detected:
drwxrwxr-x  7 david  admin  224 Apr 30 22:22 /usr/local/share/zsh
drwxrwxr-x  6 david  admin  192 Apr 30 23:30 /usr/local/share/zsh/site-functions

[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.

[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh]     compaudit | xargs chmod g-w,o-w

[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.


~
➜

我能做什么使它不显示以上所有的[oh-my-zsh]消息,我可以直接提示符?我在设置[oh-my-zsh]时做错什么了吗?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2020-05-03 10:24:04

看起来你在尝试使用没有安装的插件。请参阅关于如何安装它们的下列文档:

(基本上,您希望将repos克隆到$ZSH_CUSTOM/plugins中并在.zshrc中进行源,但请参阅每个文件中的文档,以供实际的命令使用。注意:zsh-syntax-highlighting 必须是最后一个插件。)

您的问题的另一部分在终端输出中得到了回答:

要修复您的权限,可以禁用“组”和“其他”的写权限,并确保这些目录的所有者是根用户或当前用户。

看起来所有者已经是您的当前用户了,但是您的权限是rwxrwxr-x,对于用户和组是read, write, execute,对于其他用户是read, execute。从警告消息中,您应该从组中移除写权限:

代码语言:javascript
复制
sudo chmod 755 zsh

现在,当您使用ls -l时,您应该会看到该目录的rwxr-xr-x。对/usr/local/share/zsh/site-functions目录也这样做。

警告消息甚至为您提供了另一种选择,建议您在~/.zshrc文件中放置以下内容并重新启动zsh:

代码语言:javascript
复制
ZSH_DISABLE_COMPFIX="true"
票数 7
EN

Stack Overflow用户

发布于 2020-08-19 11:50:21

建议您将以下内容放在您的~/.zsh文件中并重新启动zsh:

ZSH_DISABLE_COMPFIX="true"

票数 2
EN

Stack Overflow用户

发布于 2022-09-13 15:33:24

把这个放在最上面的.zshrc文件上。对我来说很管用。

代码语言:javascript
复制
ZSH_DISABLE_COMPFIX="true"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61554566

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档