1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-12 00:40:07 +00:00

grab last item in list which is the branch instead of relying on position.

This commit is contained in:
Chris Jones 2014-02-21 22:48:38 -08:00
parent 7a546362d3
commit c397000b3b

View file

@ -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: