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:
parent
b3a3c2e67d
commit
6cc0cb9302
1 changed files with 4 additions and 0 deletions
4
zsh/functions/_git_delete_branch
Normal file
4
zsh/functions/_git_delete_branch
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
_git_delete_branch ()
|
||||||
|
{
|
||||||
|
__gitcomp "$(__git_heads)"
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue