use more standard ansi+csr escapes. Refs #30

This commit is contained in:
Konstantinos Koukopoulos
2013-10-16 19:12:17 +03:00
parent 278cbfa4ef
commit 8a19e73250

View File

@@ -68,7 +68,7 @@ prompt_pure_precmd() {
command git rev-parse --abbrev-ref @'{u}' &>/dev/null && command git rev-parse --abbrev-ref @'{u}' &>/dev/null &&
(( $(command git rev-list --count HEAD...@'{u}' 2>/dev/null) > 0 )) && (( $(command git rev-list --count HEAD...@'{u}' 2>/dev/null) > 0 )) &&
# some crazy ansi magic to inject the symbol into the previous line # some crazy ansi magic to inject the symbol into the previous line
print -Pn "\e[s\e[A\e[1G\e[`prompt_pure_string_length $prompt_pure_preprompt`C%F{cyan}⇣%f\e[u" print -Pn "\e7\e[A\e[1G\e[`prompt_pure_string_length $prompt_pure_preprompt`C%F{cyan}⇣%f\e8"
} &! } &!
# reset value since `preexec` isn't always triggered # reset value since `preexec` isn't always triggered