Hub: Getting zsh completions to work when hub is installed with brew

Created on 21 May 2015  路  4Comments  路  Source: github/hub

It's not a question. I figured it out myself and would like to provide a pointer for those, who might encounter the same problem.

If you install hub with homebrew, it adds completions to '/usr/local/share/zsh/site-functions'. But fpath doesn't have this directory by default! It has 'usr/share/zsh/site-functions'.

So all you have to do is add fpath=(/usr/local/share/zsh/site-functions $fpath) at the top of your .zshrc file. Then completions are going to work.

docs

Most helpful comment

@jvanbaarsen Got the same thing. Find any solution?

Edit: For anyone seein' that message, remove github from your zsh plugins.

All 4 comments

Thanks for sharing!

@le0nik Somehow when I try this I get the following error when opening a new zsh session:

zsh:12: command not found: ___main
(eval):1: no matches found: *:all-files
_tags:comptags:36: can only be called from completion function
_tags:comptry:55: can only be called from completion function
_tags:comptags:60: can only be called from completion function
_tags:comptags:67: can only be called from completion function

Is something outdated on my system?

Thanks @le0nik!!!!

@jvanbaarsen Got the same thing. Find any solution?

Edit: For anyone seein' that message, remove github from your zsh plugins.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicksergeant picture nicksergeant  路  3Comments

xxmyjk picture xxmyjk  路  4Comments

kurko picture kurko  路  4Comments

cschwendiman picture cschwendiman  路  4Comments

JacobJae picture JacobJae  路  4Comments