Whenever I start my iterm terminal. I always get this message followed by prompt on my terminal.
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.
~
➜
What can I do so that it doesn't show all these above [oh-my-zsh]
messages and I can go to direct prompt? Is there anything wrong I did while setting up [oh-my-zsh]
?
It looks like you're trying to use plugins that are not installed. See the following documentation on how to install them:
(basically you want to clone the repos into $ZSH_CUSTOM/plugins
and source them in your .zshrc
, but see the documentation of each for actual commands to use. NOTE: zsh-syntax-highlighting
must be the last plugin sourced.)
The other part of your question is answered in your terminal output:
To fix your permissions you can do so by disabling the write permission of "group" and "others" and making sure that the owner of these directories is either root or your current user.
It looks like the owner is already your current user, however your permissions are rwxrwxr-x
, which are read, write, execute
for users and group, and read, execute
for others. From the warning message you should remove the write permission from group:
sudo chmod 755 zsh
now when you ls -l
you should see rwxr-xr-x
for that directory.
Do the same for the /usr/local/share/zsh/site-functions
directory.
The warning message even gives you an alternative, suggesting you place the following in your ~/.zshrc
file and restart zsh:
ZSH_DISABLE_COMPFIX="true"