Clean up prompt
This commit is contained in:
parent
3c07fa6001
commit
e3bec317fc
|
@ -1,7 +1,4 @@
|
||||||
# Pure
|
# Based off Pure <https://github.com/sindresorhus/pure>
|
||||||
# by Sindre Sorhus
|
|
||||||
# https://github.com/sindresorhus/pure
|
|
||||||
# MIT License
|
|
||||||
|
|
||||||
# For my own and others sanity
|
# For my own and others sanity
|
||||||
# git:
|
# git:
|
||||||
|
@ -16,7 +13,6 @@
|
||||||
# %m => shortname host
|
# %m => shortname host
|
||||||
# %(?..) => prompt conditional - %(condition.true.false)
|
# %(?..) => prompt conditional - %(condition.true.false)
|
||||||
|
|
||||||
|
|
||||||
# turns seconds into human readable time
|
# turns seconds into human readable time
|
||||||
# 165392 => 1d 21h 56m 32s
|
# 165392 => 1d 21h 56m 32s
|
||||||
prompt_pure_human_time() {
|
prompt_pure_human_time() {
|
||||||
|
@ -90,7 +86,7 @@ prompt_pure_precmd() {
|
||||||
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='⇣'
|
||||||
(( $(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+='⇡'
|
||||||
print -Pn "\e7\e[A\e[1G\e[`prompt_pure_string_length $prompt_pure_preprompt`C%F{cyan}${arrows}%f\e8"
|
RPROMPT+="\e7\e[A\e[1G\e[`prompt_pure_string_length $prompt_pure_preprompt`C%F{cyan}${arrows}%f\e8"
|
||||||
}
|
}
|
||||||
} &!
|
} &!
|
||||||
|
|
||||||
|
@ -98,7 +94,6 @@ prompt_pure_precmd() {
|
||||||
unset cmd_timestamp
|
unset cmd_timestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
prompt_pure_setup() {
|
prompt_pure_setup() {
|
||||||
# prevent percentage showing up
|
# prevent percentage showing up
|
||||||
# if output doesn't end with a newline
|
# if output doesn't end with a newline
|
||||||
|
|
Loading…
Reference in a new issue