summaryrefslogtreecommitdiff
path: root/12_Prompts.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@qosmos.com>2012-03-12 17:57:51 +0100
committerHugues Hiegel <hugues.hiegel@qosmos.com>2012-03-12 17:57:51 +0100
commit56938e40dab485bca704ac9ad457debe722917b1 (patch)
tree81c243725a2e60dd032fd132d4f5d771cf88327d /12_Prompts.zsh
parent6dbc777536af9535a87847e20fe4d9d63753d124 (diff)
[Prompts] Discards glitches with BANG_HIST or AUTO_CORRECT ...
Diffstat (limited to '12_Prompts.zsh')
-rw-r--r--12_Prompts.zsh5
1 files changed, 2 insertions, 3 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index ec88067..61ca77a 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -94,11 +94,10 @@ preexec ()
lines=$(( $lines + $( echo -n "$1" | tr ';\n' '.;' | sed 's/^\(.*[^;]\)\(;*\)$/\2/' | wc -c ) ))
tput sc
- # /TODO/ GET A WAY TO KNOW IF THERE HAVE BEEN AN HIST_BANG OR NOT...
for i in {1..$lines} ; tput cuu1
- print -Pn "$PS1"
+ # 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
- #print -Pn $C_"30"$_C"-$(echo -n "$1" | wc -l)-> ${(q)1} <-"$lines"-\n"
print -Pn "$C_$_prompt_colors[exec]$_C"
}