Schnouki / git-annex-zsh-completion

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

Complete the subcommand's name #9

Open danielshahaf opened 8 years ago

danielshahaf commented 8 years ago

In zsh -f with autoload compinit && compinit [= standard minimal example setup], git ann<TAB> doesn't complete to git annex. That may be made to work by setting zstyle ':completion:*:*:git:*' user-commands annex in .zshrc. I would consider this a workaround to a missing feature in the upstream _git completion function, but all the same, I suggest to document in README.md the need to set that style.

If I have time I'll fix _git for zsh-5.3 (but even then the zstyle workaround would be needed with zsh≤5.2).

https://github.com/zsh-users/zsh/blob/770500d69db0cf9dcee6ed62455aa79a38ed182e/Completion/Unix/Command/_git#L12-L16

danielshahaf commented 8 years ago

This problem only occurs with zsh 5.2 or older and only when the completion file is not copied into $fpath, but symlinked into it. The upstream fix (to be released in zsh 5.3) is zsh-users/zsh@713eaa055d3914a06b71fe39581486c5b2bef60a.