1
0
Fork 0
mirror of synced 2024-11-22 15:25:34 -05:00

[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:
Eric Nielsen 2018-04-13 15:13:43 -05:00
parent 13eb86d4c8
commit 8655867ca2
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
#compdef git-branch-delete-interactive
words[1]=(git branch); (( CURRENT++ )); service=git; _git

View file

@ -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)"})