Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git tab completion not working #586

Closed
journalbits opened this issue Jul 1, 2014 · 4 comments
Closed

Git tab completion not working #586

journalbits opened this issue Jul 1, 2014 · 4 comments

Comments

@journalbits
Copy link

I've installed hub following the instructions on the site including alias git=hub and now git completion doesn't work in my zsh shell.

I have oh-my-zsh installed and followed (at least I think I have) the method described here:
bf3f256 in the comments.

However, completion still doesn't work with alias git=hub in my .zshrc file.

Any ideas as to what I could be missing?

I have _hub in ~/.zsh and then fpath=(~/.zsh $fpath) in .zshrc.

@mislav
Copy link
Owner

mislav commented Jul 2, 2014

Is your _hub script up to date with latest release of hub? Your fpath seems to be set up correctly, but you must also ensure that nothing tries to access git before that in your .zshrc, since _git completions might be inadvertantly loaded prematurely.

Which version of zsh are you running? Do you also have _git completion script somewhere in your fpath?

@journalbits
Copy link
Author

Moving fpath=(~/.zsh $fpath) to the top of .zshrc has fixed it.

One other question, is there any way to still use the git completion provided by one of the oh-my-zsh plugins, namely gitfast? The git completion that is now happening is slower and provides me with a load of different options for each tab complete I do.

For example, git ch<TAB> offers up checkout, check-attr, check-ignore, checkout-index, etc, whereas gitfast's completion would just complete it to git checkout.

@mislav
Copy link
Owner

mislav commented Jul 2, 2014

On Wed, Jul 2, 2014 at 5:14 PM, Journal Bits notifications@github.com
wrote:

One other question, is there any way to still use the git completion
provided by one of the oh-my-zsh plugins, namely gitfast?

I don't know how gitfast works, but it's likely that hub's own completion
trumps over whatever way gitfast uses to hook into git completions. This is
because completion scripts usually don't allow for easy extensibility.

If you solved your original issue you could close this and open another one
for gitfast. Link to its implementation please, and give me some time to
review that and see whether we can play well with it.

@journalbits
Copy link
Author

Closing as my initial problem is solved (thanks!).

Opened #587 regarding gitfast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants