summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@qosmos.com>2012-01-16 14:20:01 +0100
committerHugues Hiegel <hugues.hiegel@qosmos.com>2012-01-16 14:20:01 +0100
commitf54174910fb108de76c671693c938815a8a30c2b (patch)
treece1f3a7f4d894e27ab0cd9fabdb54cc7bf4e87d6
parent900ff698b84776ead3de557f73623c6550b154d6 (diff)
[Funcs] preprint uses termcaps
-rw-r--r--01_Functions.zsh8
1 files changed, 5 insertions, 3 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh
index c97b102..4c2f86b 100644
--- a/01_Functions.zsh
+++ b/01_Functions.zsh
@@ -99,14 +99,16 @@ preprint()
local my_color i
my_color=${2-"$prompt_colors[generic]"}
- hbar=
+ hbar=$termcap[as]
for i in {1..$((74 - ${#1} - 5))}
do
- hbar=$hbar-
+ hbar=${hbar}q
done
+ hbar=${hbar}$termcap[ae]
+
if [ "$1" != "" ]
then
- print -Pn "${C_}$my_color;1${_C}${hbar}[${C_}0;$my_color${_C} $1 ${C_}0;$my_color;1${_C}]-\r${C_}0${_C}"
+ print -Pn "${C_}$my_color;1${_C}${hbar}$termcap[as]u$termcap[ae]${C_}0;$my_color${_C} $1 ${C_}0;$my_color;1${_C}$termcap[as]tq$termcap[ae]\r${C_}0${_C}"
else
print -Pn "${C_}$my_color;1${_C}${hbar}-----${C_}0${_C}"
fi