首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >每次我打开一个新的终端,我看到这个,不知道如何修复

每次我打开一个新的终端,我看到这个,不知道如何修复
EN

Stack Overflow用户
提问于 2020-07-29 12:02:49
回答 1查看 1.1K关注 0票数 0

我正在使用MacOSCatalina10.15.6在一个MacBook专业(2012年中期)。

我在编程方面真的很新,我不知道为什么打开终端时总是会出现这种情况:

代码语言:javascript
复制
Last login: Tue Jul 28 18:43:18 on ttys002
[oh-my-zsh] Insecure completion-dependent directories detected:
drwxrwxr-x  7 luigiminardi  admin  224 Jul 24 16:14 /usr/local/share/zsh
drwxrwxr-x  7 luigiminardi  admin  224 Jul 24 15:59 /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.

我在.zshrc中所做的所有修改都是为了这样做的:

代码语言:javascript
复制
# ASDF INSTALLED ON BREW
. $(brew --prefix asdf)/asdf.sh

之后:

代码语言:javascript
复制
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#

但我不知道它是否在正确的地方,或者这是否是问题的原因。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-07-29 17:45:39

在您的ZSH_DISABLE_COMPFIX=true文件中,在$ZSH/oh-my-zsh.sh之前设置$ZSH/oh-my-zsh.sh

这将跳过不安全目录的验证:https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/compfix.zsh

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63153170

复制
相关文章

相似问题

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