This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_git_branches() | |
{ | |
local cur | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
CURRENT=`git branch | grep '^*' | awk '{print $2}'` | |
local versions=$(git branch | grep -v $CURRENT) | |
COMPREPLY=($(compgen -W "${versions}" $cur)) | |
} | |
complete -F _git_branches ship |