Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
simplify status calc
Browse files Browse the repository at this point in the history
  • Loading branch information
xPMo committed Mar 22, 2019
1 parent c36fb48 commit 5a5ec0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pure.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ prompt_pure_check_git_status() {
setopt localoptions noshwordsplit
local ret left=${1:-0} right=${2:-0}

(( left > 0 )) && ret+="%F{green}$left"
(( left * right > 0 )) && ret+="%F{242}:"
(( right > 0 )) && ret+="%F{red}$right"
(( left )) && ret+="%F{green}$left"
(( left && right )) && ret+="%F{242}:"
(( right )) && ret+="%F{red}$right"

[[ -n $ret ]] || return
typeset -g REPLY="%F{242}[$ret%F{242}]"
Expand Down

0 comments on commit 5a5ec0c

Please sign in to comment.