diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2012-06-07 10:35:01 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2012-06-07 10:35:01 +0200 |
commit | a015d10c67c9cbc6448d25156b1b7841c0337153 (patch) | |
tree | 6545f79de8d27fac648545396ec25e3760c19a37 /12_Prompts.zsh | |
parent | 791d76d44324badcd53a886b4ad291b38ae1544f (diff) |
[Keys/Prompt] up up and awayyy
Diffstat (limited to '12_Prompts.zsh')
-rw-r--r-- | 12_Prompts.zsh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh index 4e70f66..20a4f94 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -91,6 +91,13 @@ __get_prompt_lines() echo $lines } +# Rewrites current prompt. +__up_up () +{ + for i in {1..$(__get_prompt_lines)} + tput cuu1 +} + preexec () { __term_title "$2" @@ -101,10 +108,8 @@ preexec () __hbar __redefine_prompt - local lines=$(__get_prompt_lines "$1") - tput sc - for i in {1..$lines} ; tput cuu1 + __up_up # Only redraws the date, not the full prompt, since we got glitches with BANG_HIST and AUTOCORRECT... print -Pn $(tput cub $COLUMNS ; tput cuf $(($COLUMNS - $DATESIZE)))$C_$_prompt_colors[bar]$_C$DATE tput rc |