Schnouki / git-annex-zsh-completion

zsh completion for git-annex
15 stars 6 forks source link

zsh completing descriptions as well #7

Closed wshanks closed 9 years ago

wshanks commented 9 years ago

I am experiencing a strange issue trying to use the completion function. When I hit tab, zsh uses both the git-annex commands and their descriptions as possible completions. So git-annex sy<Tab> gives

check for data that has no symlinks pointing to it           fixes up symlinks that are staged as part of a commit        sync
fix up symlinks that have become broken                      like watch but automatically syncs changes to other remotes  synchronize with one or more remotes

as the possible completions. I installed the function using the suggested method: added its directory to fpath and then did compinit git-annex. Any idea what could be going on? My only guess is that my version of zsh is kind of old (4.3.10). Does this function use some syntax that was recently added to zsh?

wshanks commented 9 years ago

I tried the using the completion function the same way on a newer version of zsh (5.0.7) and saw the same behavior. Am I not loading the function properly?

dfaligertwood commented 9 years ago

I'm also having this issue.

dfaligertwood commented 9 years ago

Problem was introduced by commit e2b78c6

dfaligertwood commented 9 years ago

Reverting these changes seems to fix this.

wshanks commented 9 years ago

Maybe @ypid can comment on why that commit had these side effects?

dfaligertwood commented 9 years ago

Eyeballing it it looks like it was for code clarity. I've submitted a pull request that fixes the bug anyway.

ypid commented 9 years ago

I did not know that my change had this unintended side effect. Sorry for the inconvenience … The patch from @dfaligertwood fixes it, please merge.

wshanks commented 9 years ago

No problem. I was just checking to make sure we weren't missing something.

Schnouki commented 9 years ago

Merged. Thanks to all of you guys for the bug report and the fix! :smile: