Close #140 PR: Add git arrows customization. Fixes #139.

This commit is contained in:
Alexander Pyatkin
2015-07-13 12:35:25 +02:00
committed by Sindre Sorhus
parent 29ab6e737f
commit 579af2425b
2 changed files with 10 additions and 2 deletions

View File

@@ -52,8 +52,8 @@ prompt_pure_check_git_arrows() {
command git rev-parse --abbrev-ref @'{u}' &>/dev/null || return
local arrows=""
(( $(command git rev-list --right-only --count HEAD...@'{u}' 2>/dev/null) > 0 )) && arrows='⇣'
(( $(command git rev-list --left-only --count HEAD...@'{u}' 2>/dev/null) > 0 )) && arrows+='⇡'
(( $(command git rev-list --right-only --count HEAD...@'{u}' 2>/dev/null) > 0 )) && arrows="${PURE_GIT_DOWN_ARROW:-}"
(( $(command git rev-list --left-only --count HEAD...@'{u}' 2>/dev/null) > 0 )) && arrows+="${PURE_GIT_UP_ARROW:-}"
# output the arrows
[[ "$arrows" != "" ]] && echo " ${arrows}"
}