diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-08-14 11:23:16 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-08-14 11:23:16 +0200 |
commit | 01120b410711cfc490c7a162a03c03ee56d4bf8b (patch) | |
tree | a5390d61b9af495225eb48d39ebf94dd5083ee00 | |
parent | 534cbbfc09a6520adf32ea83edf3cce6583554da (diff) |
[Git] Get git status only if we got a branch…
-rw-r--r-- | 01_Internal.zsh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/01_Internal.zsh b/01_Internal.zsh index 2b404c6..b838237 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -152,12 +152,14 @@ __get_git_fullstatus () local _branch _status _tracking _stashes _branch=$(__get_git_branch) - _status=$(__get_git_branch_status) - [ -n "$_branch" ] && _branch=$C_$_prompt_colors[soft_generic]$_C${${_branch/→/$C_$_status$_C}/←/$C_$_prompt_colors[soft_generic]$_C}$C_$color[none]$_C - - _tracking=$(__get_git_tracking_status) - _stashes=$(__get_git_stashes) + if [ -n "$_branch" ] + then + _status=$(__get_git_branch_status) + _branch=$C_$_prompt_colors[soft_generic]$_C${${_branch/→/$C_$_status$_C}/←/$C_$_prompt_colors[soft_generic]$_C}$C_$color[none]$_C + _tracking=$(__get_git_tracking_status) + _stashes=$(__get_git_stashes) + fi [ -n "$1" ] && popd >/dev/null |