[git] Add completion for gbx and gbX
that use the git-branch-delete-interactive function. Thanks to @Mikachu for helping with the completion function implementation over the #zsh chat. Closes #265
This commit is contained in:
parent
13eb86d4c8
commit
8655867ca2
2 changed files with 4 additions and 1 deletions
3
modules/git/functions/_git-branch-delete-interactive
Normal file
3
modules/git/functions/_git-branch-delete-interactive
Normal file
|
@ -0,0 +1,3 @@
|
|||
#compdef git-branch-delete-interactive
|
||||
|
||||
words[1]=(git branch); (( CURRENT++ )); service=git; _git
|
|
@ -1,6 +1,6 @@
|
|||
# vim:et sts=2 sw=2 ft=zsh
|
||||
local -a remotes
|
||||
if (( ${*[(I)-r]} || ${*[(I)--remotes]} )); then
|
||||
if (( ${*[(I)(-r|--remotes)]} )); then
|
||||
remotes=(${^*:#-*})
|
||||
else
|
||||
remotes=(${(f)"$(command git rev-parse --abbrev-ref ${^*:#-*}@{u} 2>/dev/null)"})
|
||||
|
|
Loading…
Reference in a new issue