解决oh my zsh Insecure completion-dependent directories detected
生活随笔
收集整理的這篇文章主要介紹了
解决oh my zsh Insecure completion-dependent directories detected
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
安裝oh my zsh 的命令
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"--2021-09-01 15:44:32-- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh 正在解析主機 raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.108.133 正在連接 raw.githubusercontent.com (raw.githubusercontent.com)|151.101.108.133|:443... 已連接。 已發出 HTTP 請求,正在等待回應... 200 OK 長度:8445 (8.2K) [text/plain] 正在保存至: “STDOUT”100%[=================================================================>] 8.25K --.-KB/s 用時 0s 2021-09-01 15:45:09 (21.1 MB/s) - 已寫入至標準輸出 [8445/8445]Cloning Oh My Zsh... Cloning into '/Users/test/.oh-my-zsh'... remote: Enumerating objects: 1140, done. remote: Counting objects: 100% (1140/1140), done. remote: Compressing objects: 100% (1103/1103), done. remote: Total 1140 (delta 19), reused 1127 (delta 19), pack-reused 0 Receiving objects: 100% (1140/1140), 753.95 KiB | 17.00 KiB/s, done. Resolving deltas: 100% (19/19), done.Looking for an existing zsh config... Using the Oh My Zsh template file and adding it to ~/.zshrc.__ ______ / /_ ____ ___ __ __ ____ _____/ /_/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ / /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / \____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_//____/ ....is now installed!Please look over the ~/.zshrc file to select plugins, themes, and options.p.s. Follow us on https://twitter.com/ohmyzshp.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh成功之后,打開新的終端后,會顯示一些信息(以前安裝的時候,沒有這玩意):
[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.所以要把這個信息屏蔽掉:
vim ~/.zshrc
文件第一行加入:
ZSH_DISABLE_COMPFIX="true" # 有的版本有引號, 有的版本無引號,自己嘗試
保存之后,再執行命令:
source ~/.zshrc
總結
以上是生活随笔為你收集整理的解决oh my zsh Insecure completion-dependent directories detected的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 页面加载完后立刻执行JS的两种方法
- 下一篇: “package XXX is not