blob: 050457d06543f0967e492771345e93f09ef2e5ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#compdef gitbmerge
#autoload
_gitbcheckout() {
((CURRENT > 2)) && return # Complete only single branch
local gdir branch
gdir="$(git rev-parse --git-common-dir 2>/dev/null)" || return
local branches=()
while read -r branch; do
branches+=("$branch")
done < <(find "$gdir/refs/heads" "$gdir/refs/remotes" -mindepth 1 -printf '%P\n')
_describe -t branches 'gitbcheckout' branches
}
_gitbcheckout
# vim: ft=zsh
|