committed by
Sindre Sorhus
parent
29ab6e737f
commit
579af2425b
4
pure.zsh
4
pure.zsh
@@ -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}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user