adb86fa83d7eba9b6033798395da713f5129ee06

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #1750 from JamesFerguson/master

Make git_remote_branch plugin git-flow friendly

Diff

 1diff --git a/plugins/git-remote-branch/git-remote-branch.plugin.zsh b/plugins/git-remote-branch/git-remote-branch.plugin.zsh
 2index ff98cbf87a296045abbff56082dfeae839f79dbf..6c5ab8f70d38b228bd8d927e1b27b5e186eb6220 100644
 3--- a/plugins/git-remote-branch/git-remote-branch.plugin.zsh
 4+++ b/plugins/git-remote-branch/git-remote-branch.plugin.zsh
 5@@ -6,7 +6,8 @@ _git_remote_branch() {
 6       compadd create publish rename delete track
 7     elif (( CURRENT == 3 )); then
 8       # second arg: remote branch name
 9-      compadd `git branch -r | grep -v HEAD | sed "s/.*\///" | sed "s/ //g"`
10+      remotes=`git remote | tr '\n' '|' | sed "s/\|$//g"`
11+      compadd `git branch -r | grep -v HEAD | sed "s/$remotes\///" | sed "s/ //g"`
12     elif (( CURRENT == 4 )); then
13       # third arg: remote name
14       compadd `git remote`