diff options
author | Chris Jones <chris@brack3t.com> | 2014-02-21 22:48:38 -0800 |
---|---|---|
committer | Chris Jones <chris@brack3t.com> | 2014-02-21 22:48:38 -0800 |
commit | c397000b3b0c1cf3bceb95dfc5fcdaf1844aa751 (patch) | |
tree | 7d5e2e1e900707113192899277f58559c03342a5 /plugins/git-prompt/gitstatus.py | |
parent | 7a546362d35d6c74f9c301aa477594fdf2cc1bfc (diff) | |
download | zsh-c397000b3b0c1cf3bceb95dfc5fcdaf1844aa751.tar.gz zsh-c397000b3b0c1cf3bceb95dfc5fcdaf1844aa751.tar.bz2 zsh-c397000b3b0c1cf3bceb95dfc5fcdaf1844aa751.zip |
grab last item in list which is the branch instead of relying on position.
Diffstat (limited to 'plugins/git-prompt/gitstatus.py')
-rw-r--r-- | plugins/git-prompt/gitstatus.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 6d64e8277..ef894bff2 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -67,7 +67,7 @@ if bline.find('Not currently on any branch') != -1: '--short', 'HEAD'], stdout=PIPE).communicate()[0][:-1] else: - branch = bline.split(' ')[3] + branch = bline.split(' ')[-1] bstatusline = lines[1] match = behead_re.match(bstatusline) if match: |