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

View File

@@ -101,6 +101,14 @@ Time in seconds to delay git dirty checking for large repositories (git status t
Defines the prompt symbol. The default value is ``. Defines the prompt symbol. The default value is ``.
### `PURE_GIT_DOWN_ARROW`
Defines the git down arrow symbol. The default value is `⇣`.
### `PURE_GIT_UP_ARROW`
Defines the git up arrow symbol. The default value is `⇡`.
## Example ## Example
```sh ```sh