Fix spacing on commits-ahead-behind part
This commit is contained in:
parent
3dc65b4e64
commit
ad0d1cafb4
|
@ -121,16 +121,22 @@ function git_local_remote_diffs()
|
||||||
local commits_behind=$(echo -n "$differences" | awk '{print $2}')
|
local commits_behind=$(echo -n "$differences" | awk '{print $2}')
|
||||||
local ahead="" behind=""
|
local ahead="" behind=""
|
||||||
|
|
||||||
|
local result=""
|
||||||
|
|
||||||
(( $commits_ahead > 0 )) \
|
(( $commits_ahead > 0 )) \
|
||||||
&& ahead="↑$commits_ahead"
|
&& ahead="↑$commits_ahead"
|
||||||
(( $commits_behind > 0 )) \
|
(( $commits_behind > 0 )) \
|
||||||
&& behind="↓$commits_behind"
|
&& behind="↓$commits_behind"
|
||||||
|
|
||||||
if [[ ! -z "${ahead}" ]] || [[ ! -z "${behind}" ]]; then
|
if [[ ! -z "${ahead}" ]]; then
|
||||||
typeset -g REPLY="$ahead $behind"
|
result="${ahead} "
|
||||||
return 0
|
|
||||||
fi
|
fi
|
||||||
return 1
|
|
||||||
|
if [[ ! -z "${behind}" ]]; then
|
||||||
|
result="${behind} "
|
||||||
|
fi
|
||||||
|
|
||||||
|
typeset -g REPLY="${result}"
|
||||||
}
|
}
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
Loading…
Reference in New Issue