ohmyzsh: Update has broken auto-complete

Just ran update, and started getting compdef errors. I’ve disabled all plugins but z, and still auto complete with z is broken, but the compdef errors stopped

[Oh My Zsh] Would you like to check for updates? [Y/n]: y
Updating Oh My Zsh
remote: Counting objects: 33, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 33 (delta 21), reused 22 (delta 10), pack-reused 0
Unpacking objects: 100% (33/33), done.
From https://github.com/robbyrussell/oh-my-zsh
 * branch            master     -> FETCH_HEAD
   137a554..d012402  master     -> origin/master
 plugins/emacs/emacsclient.sh                         | 29 ++++++++++++++++++++++-------
 plugins/osx/README.md                                | 27 +++++++++++++++++++++++++++
 plugins/osx/_man-preview                             |  5 -----
 plugins/osx/osx.plugin.zsh                           | 16 +---------------
 plugins/taskwarrior/_task                            |  9 +++++----
 plugins/zsh-navigation-tools/.config/znt/n-kill.conf |  2 +-
 plugins/zsh-navigation-tools/.config/znt/n-list.conf |  2 +-
 plugins/zsh-navigation-tools/n-help                  | 43 +++++++++++++++++++++++++++++++++++++++++--
 plugins/zsh-navigation-tools/n-history               | 10 +++++-----
 plugins/zsh-navigation-tools/n-list                  |  5 ++++-
 templates/zshrc.zsh-template                         |  2 +-
 tools/install.sh                                     |  6 ------
 12 files changed, 108 insertions(+), 48 deletions(-)
 create mode 100644 plugins/osx/README.md
 delete mode 100644 plugins/osx/_man-preview
First, rewinding head to replay your work on top of it...
Fast-forwarded master to d012402dada1ec7d8796f2f4b04744d817137b4d.
         __                                     __
  ____  / /_     ____ ___  __  __   ____  _____/ /_
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / /
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/
                        /____/
Hooray! Oh My Zsh has been updated and/or is at the current version.
To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh
Get your Oh My Zsh swag at:  http://shop.planetargon.com/
compdef: unknown command or service: grep
compdef: unknown command or service: grep
compdef: unknown command or service: man
#plugins=(z git gitfast brew osx pep8 python virtualenv virtualenvwrapper)
plugins=(z)

source .zshrc still no z love for auto completion, but compdef errors stopped

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@mcornella and anyone else experiencing this issue. This is definitely permissions issues related to Homebrew and OS X El Capitan. What I can’t explain is why it just now manifested for me with recent oh-my-zsh update.

Background: OS X El Capitan changed some file system permissions as seen here that breaks brew update Following directions in the GitHub issue thread, I changed my permissions for /usr/local with sudo chmod -R g+w /usr/local, which was probably the wrong thing to do!

Verifying permissions issue: Run compaudit if it looks like this, you likely have incorrect permissions. Running it through stat will give you the octal permissions

$ compaudit                                                                                                                                                                                                               
There are insecure directories:
/usr/local/share/zsh/site-functions
/usr/local/Cellar/zsh/5.2/share/zsh/functions
/usr/local/share/zsh
/usr/local/Cellar/zsh/5.2/share/zsh
$
$compaudit | xargs stat -f %Mp%Lp
There are insecure directories:
0775
0775
0775
0775

Per this thread on stackoverflow, the permisions need to be 0755. Also based on ZSH mailing list

FIX: Chmod the insecure directories to 0755. You can do this by passing the following xargs

$ compaudit | xargs chmod 755                                                                                                                                                                                             
There are insecure directories:
$
$ # a second compaudit run shows no errors 
$ compaudit
$  

Next, delete your .zcompdump files, and run compinit

$ rm -f ~/.zcompdump*
$ compinit

This fixed all auto completion issues for me. Therefore I am closing this issue.

@jamesboswell Thanks a lot.

I’ve suffered this error for a whole day!