Add tab-completion with local branches for git delete-branch

This solution was heavily influenced by @keith's original contribution
in #356, which I think may have worked on some but not all setups due to
personal configuration differences.

The solution in #356 added the `_git_delete_branch` function in the
`zsh/completions` folder, which resulted in the tab-completion working
against `git`, but not against our `g` function. With our new loading
order where functions are loaded first and completions are loaded last,
we can load the `_git_delete_branch` function before any completions are
defined on `git`, `g`, or `hub`, allowing the `_git_delete_branch` shim
to be used by all three of those git-invoking commands/functions.

Close #355.
This commit is contained in:
Geoff Harcourt 2015-11-14 10:15:24 -05:00
parent b3a3c2e67d
commit 6cc0cb9302

View file

@ -0,0 +1,4 @@
_git_delete_branch ()
{
__gitcomp "$(__git_heads)"
}