From 339016a2016281ad98b9faef71f849f409b1d0cc Mon Sep 17 00:00:00 2001 From: Olivier Verdier Date: Sun, 30 May 2010 16:56:12 +0200 Subject: [PATCH] better communication between Python script and shell --- gitstatus.py | 2 +- update_current_git_vars.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gitstatus.py b/gitstatus.py index 09dc9194..b594f718 100755 --- a/gitstatus.py +++ b/gitstatus.py @@ -52,5 +52,5 @@ if div_match: remote = "{behind}{1}{ahead of}{0}".format(*div_match.groups(), **symbols) -print '%s:%s:%s' % (branch,remote,status) +print '\n'.join([branch,remote,status]) diff --git a/update_current_git_vars.sh b/update_current_git_vars.sh index f48a098e..d5e55c23 100644 --- a/update_current_git_vars.sh +++ b/update_current_git_vars.sh @@ -2,4 +2,4 @@ unset __CURRENT_GIT_STATUS local gitstatus="${HOME}/.zsh/gitstatus.py" _GIT_STATUS=`python ${gitstatus}` -__CURRENT_GIT_STATUS=("${(s/:/)_GIT_STATUS}") +__CURRENT_GIT_STATUS=("${(f)_GIT_STATUS}")