当前位置:网站首页>Oh my Zsh correct installation posture

Oh my Zsh correct installation posture

2022-06-11 04:58:00 Code master mclaurie

brief introduction

Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, and a few things that make you shout…
I personally like it very much iterm2+oh my zsh Terminal combination of , Very good window segmentation , Friendly command prompt 、 The highlighted 、git Branch display and other functions .

 Insert picture description here

Because the foreign image address is outside the wall , You can't access it recently by using a ladder , So we found the domestic image source , Can install oh my zsh, So share it with you .

curl The way

REMOTE=https://gitee.com/mirrors/oh-my-zsh.git sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"

wget The way

REMOTE=https://gitee.com/mirrors/oh-my-zsh.git sh -c "$(wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh -O -)"

Authority handling

These prompts will appear every time you open the terminal after installation

[oh-my-zsh] Insecure completion-dependent directories detected:
drwxrwxr-x  3 thzt  admin  102  2  8 22:19 /usr/local/share/zsh
drwxrwxr-x  3 thzt  admin  102  2  8 22:31 /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.

We need to use the following statement to change permissions ok 了 .

sudo chown -R root:staff /usr/local/share/zsh
sudo chmod -R 755 /usr/local/share/zsh 
原网站

版权声明
本文为[Code master mclaurie]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110448486938.html