diff options
author | Marc Cornellà <marc.cornella@live.com> | 2015-08-04 16:34:03 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2015-08-16 23:02:16 +0200 |
commit | 30bed07e9c9480d1e563d29da5747ce427f58d8d (patch) | |
tree | 99b0063e85a350b9b07a92e5464eaa3c4dd55824 /plugins/git-prompt | |
parent | 94007f7db2d47f3e13e4aac878f0e780a479f628 (diff) | |
download | zsh-30bed07e9c9480d1e563d29da5747ce427f58d8d.tar.gz zsh-30bed07e9c9480d1e563d29da5747ce427f58d8d.tar.bz2 zsh-30bed07e9c9480d1e563d29da5747ce427f58d8d.zip |
Parse UTF-8 output from git status
Diffstat (limited to 'plugins/git-prompt')
-rw-r--r-- | plugins/git-prompt/gitstatus.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 2f02e5fcc..8790f3a3c 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -18,7 +18,7 @@ if po.returncode != 0: # collect git status information untracked, staged, changed, conflicts = [], [], [], [] ahead, behind = 0, 0 -status = [(line[0], line[1], line[2:]) for line in stdout.splitlines()] +status = [(line[0], line[1], line[2:]) for line in stdout.decode('utf-8').splitlines()] for st in status: if st[0] == '#' and st[1] == '#': if len(st[2].strip().split('...')) == 1: @@ -58,4 +58,3 @@ out = ' '.join([ str(len(untracked)), ]) print(out, end='') - |