Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

github plugin errors after updating #1727

Closed
omares opened this Issue · 23 comments
@omares

Hey,

after updating to the latest version of oh-my-zsh (git hash 85426a57a2561f675a6ad51754d6687c3ec571c2) i get following erros when opening a new console when the github plugin is enabled:

(anon):6: 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
@shadowhand

Same thing has been happening to me:

(anon):6: 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
@jcbledsoe

I tracked this down to commit 8e368c1 line nos: 4 - 6 for the github plugin. I know nothing about autocomplete shell programming or I'd fix it myself.

@pangratz

I can confirm this too. Removing the github plugin removes the warnings ...

@ryanwmarsh

Worked for me as well. Thanks @jcbledsoe

@axyjo

Reproduced as well. Thanks, @jcbledsoe!

@TylerBrock

Yep, happening for me currently. Bummer.

@TylerBrock

Oh, its related to hub. brew uninstall hub did the trick for me. That way you can keep using the github plugin.

@DarthNerdus

Uninstalling hub defeats the purpose of having the github plugin.

That being said, there's an easy fix! It requires you to reinstall git with homebrew and the --without-completions flag. Picked this up from github/hub#295 (comment)

brew uninstall --force git && brew install git --without-completions

@TylerBrock

Why not just install hub as a gem?

@DarthNerdus

Installing hub as a standalone script (as home-brew does) offers faster start times. This is the message given when you install hub as a gem:

                   You there! Wait, I say!
                  =======================

       If you are a heavy user of `git` on the command
       line  you  may  want  to  install `hub` the old
       fashioned way.  Faster  startup  time,  you see.

       Check  out  the  installation  instructions  at
       https://github.com/defunkt/hub#readme  under the
       "Standalone" section.

       Cheers,
       defunkt
@TylerBrock
@DarthNerdus

brew uninstall --force git && brew install git --without-completions

homebrew is controlling git and applying the appropriate compile flags with this command.
It just requires you to remove the version you have to reinstall it with the applicable flags.

@TylerBrock
@theherk

In my case, and in case anybody else is in my scenario, this error was caused by calling to source git-completion.zsh. That was the wrong way (bash way) of doing it anyway. Removing this allowed oh-my-zsh to do the completion without any errors.

This certainly isn't valuable to development, but since it is the top Google link when I search the error, I thought I would throw it out there.

@bric3

I can confirm the @DarthNerdus solution.

@dlindahl

I can deny the @DarthNerdus solution.

After running brew uninstall --force git && brew install git --without-completions, I still get:

_git:12: command not found: ___main
_default:compcall:12: can only be called from completion function

I have hub installed along with the following plugins:

plugins=(git ruby rails bower brew bundler gem git-extras github gitfast npm sublime)

Any thoughts?

@shadowhand

@dlindahl don't git and gitfast plugins conflict with each other? iirc, they both implement the same stuff... or rather, gitfast implements a smaller subset of git (hence being "fast").

@dlindahl

@shadowhand Maybe? I'm not entirely sure. I guess I was assuming that unsupported gitfast commands would maybe fall through to git.

FWIW, if I remove git, there is no change in the warning. If I remove gitfast, the problem goes away. But I believe the community recommendation is to use gitfast over git, so I would like to keep it...

@mcornella

@dlindahl have you tried disabling the github plugin?

@bric3

I also removed the github plugin, it made my prompt slow anyway.

@chrisbodhi

I removed the gitfast plugin from the list in ~/.zshrc to solve this issue on my machine.

@devinrhode2

I wish I could use the gitfast plugin with github instead of git

git it

@bric3

Hi I don't want to brag about my fork, but I gave up on the git utils of oh-my-zsh to use oh-my-git, unfortunately it wasn't integrating well with oh-my-zsh at that time and it had a few other issues, that's why I forked the project here https://github.com/bric3/oh-my-zsh-git

I use it on a daily basis, so far it's been around a year that I use on a big project, it it's fairly stable and imho fast.

I know that the original author made some major and welcomed nifty updates since then, but I don't know if it integrates with oh-my-zsh

pic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.