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

zsh tab-completion doesn't work #771

Closed
dlion opened this issue Jan 20, 2015 · 12 comments
Closed

zsh tab-completion doesn't work #771

dlion opened this issue Jan 20, 2015 · 12 comments

Comments

@dlion
Copy link

dlion commented Jan 20, 2015

source hub.zsh_completion
_call_function:27: compstate: assignment to invalid subscript range

My version of zsh is

zsh 5.0.2 (x86_64-slackware-linux-gnu)

and my git/hub version are

git version 1.8.4
hub version 2.2.0-rc1

Thank you

@nbraud
Copy link
Contributor

nbraud commented Jan 21, 2015

Works here on zsh 5.0.5.
You might want to try upgrading your zsh and see if this fixes the issue.

@blueyed
Copy link
Contributor

blueyed commented Feb 1, 2015

@dlion
It's not meant to be sourced.
You need to copy / symlink it as _hub into your $fpath.
While at it, you might be interested in checking out an improved version from my PR #788.

@lorenzhs
Copy link

lorenzhs commented Mar 5, 2015

It would be great if that were documented in the README, I was wondering the same thing.

@blueyed
Copy link
Contributor

blueyed commented Mar 8, 2015

@lorenzhs
Do you feel like providing a PR to fix / address this?
Also, have you tried my PR (#788)?

@nunoh
Copy link

nunoh commented Apr 10, 2015

I have the exact same issue. A small explanation follows.

I had git autocompletion working. I added eval "$(hub alias -s)" to my .zshrc and even though doing something like git browse does work (writing all the characters that is) if I try something like git s<tab> I get the standard zsh file completion rather than git/hub specific. Also, in my $fpath I have the an _hub symlink. Any ideas what I might be missing?

I am using version zsh 5.0.7 and hub 2.2.0-g3ea5a9a.

@blueyed
Copy link
Contributor

blueyed commented Apr 10, 2015

if I try something like git s I get the standard zsh file completion rather than git/hub specific

Do you get this completion without the hub=git alias?
Do you have the COMPLETE_ALIASES zsh option set? (should not be set)

@nunoh
Copy link

nunoh commented Apr 12, 2015

If I remove the eval "$(hub alias -s)" from my .zshrc then I have git autocompletion working ok.
And no, I don't have that option set. Any idea?

@blueyed
Copy link
Contributor

blueyed commented Apr 13, 2015

@nunoh
hub alias -s is only alias git=hub, right?
You could try the _complete_debug widget (^X?), which should provide you with debugging output for completion.
Apart from that, my PR at #788 might also help.

@nunoh
Copy link

nunoh commented Apr 13, 2015

@blueyed
I have only alias git=hub as alias. I ended up solving this issue in a different way, by copying the _hub completion file into a predefined folder in the $fpath. Thanks for your help anyway 🙇

@blueyed
Copy link
Contributor

blueyed commented May 11, 2015

I think this issue can be closed: the completion script was not installed correctly in this case.

I'll leave another link to my pending PR to improve the Zsh completion: #788 :)

@a-x-
Copy link

a-x- commented Sep 19, 2015

It would be great if that were documented in the README, I was wondering the same thing.

👍

@mislav
Copy link
Owner

mislav commented Sep 27, 2015

Closing as user config error. Thanks everyone!

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

No branches or pull requests

7 participants