Hub: Aliasing git to hub breaks git autocompletion in zsh

Created on 15 Apr 2018  路  6Comments  路  Source: github/hub

Using either of

alias git = hub or

eval "$(hub alias -s)"

breaks auto completion for git in zsh.

Is there a way around this?

Most helpful comment

Can you be more specific about how it breaks autocompletion? That is, what's not working? Are you not getting autocompletion at all?

You may need to enable setopt complete_aliases in your Zsh configuration. IIRC, it's off by default.

All 6 comments

Make sure you've both the git and hub completion scripts exists somewhere in your $fpath.

Thanks.. Actually I read somewhere that oh-my-zsh has a good integration with hub with its GitHub plugin. So I started using that and haven't had any problems. Some other people also had a lot of problem with this that were reported as issues here. That's where I learnt about this. Perhaps that could be highlighted when you have the suggestion to alias git to hub

@alphaCTzo7G oh-my-zsh github plugin integrates hub automatically without need add a manual alias. The auto completion works perfectly fine with github plugin.

Can you be more specific about how it breaks autocompletion? That is, what's not working? Are you not getting autocompletion at all?

You may need to enable setopt complete_aliases in your Zsh configuration. IIRC, it's off by default.

I can't reproduce this issue. Both git and hub aliases works out of the box for me, and I did not enable the github plugin.

Can you be more specific about how it breaks autocompletion? That is, what's not working? Are you not getting autocompletion at all?

You may need to enable setopt complete_aliases in your Zsh configuration. IIRC, it's off by default.

This worked perfectly!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kristinita picture Kristinita  路  4Comments

kentcdodds picture kentcdodds  路  4Comments

le0nik picture le0nik  路  4Comments

ssbarnea picture ssbarnea  路  3Comments

jfritzbarnes picture jfritzbarnes  路  3Comments