summaryrefslogtreecommitdiff
path: root/01_Functions.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2012-01-17 20:35:34 +0100
committerHugues Hiegel <hugues@hiegel.fr>2012-01-17 20:35:34 +0100
commitb7b42704a331475392c7ce262c1a3cf7951eb61b (patch)
tree5cde9187b76f8964e8902f6dc638e9ca467818b2 /01_Functions.zsh
parentf54174910fb108de76c671693c938815a8a30c2b (diff)
Manages termcaps only on good terminals..
Diffstat (limited to '01_Functions.zsh')
-rw-r--r--01_Functions.zsh12
1 files changed, 6 insertions, 6 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh
index 4c2f86b..1431785 100644
--- a/01_Functions.zsh
+++ b/01_Functions.zsh
@@ -48,7 +48,7 @@ term_title()
for word in ${=@} ; command[$#command]=$word
if [ "$command[0]" = "fg" ]
then
- lastjob=$(ps ft `tty` | grep "[0-9]\+[[:blank:]]\+`tty | sed 's/\/dev\///'`[[:blank:]]\+T.\? \+.:.. \\\_ " | tail -n1 | cut -c32-)
+ lastjob=$(ps t `tty` | grep "[0-9]\+[[:blank:]]\+`tty | sed 's/\/dev\///'`[[:blank:]]\+T.\? \+.:.. \\\_ " | tail -n1 | cut -c32-)
set "$lastjob"
fi
if [ "$command[0]" = "screen" -o "$command[0]" = "tmux" ]
@@ -99,18 +99,18 @@ preprint()
local my_color i
my_color=${2-"$prompt_colors[generic]"}
- hbar=$termcap[as]
+ hbar=$T_
for i in {1..$((74 - ${#1} - 5))}
do
- hbar=${hbar}q
+ hbar=${hbar}$_t_q
done
- hbar=${hbar}$termcap[ae]
+ hbar=${hbar}$_T[ae]
if [ "$1" != "" ]
then
- 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}"
+ print -Pn "${C_}$my_color;1${_C}${hbar}$_t_u${C_}0;$my_color${_C} $1 ${C_}0;$my_color;1${_C}$_t_t$_t_q\r${C_}0${_C}"
else
- print -Pn "${C_}$my_color;1${_C}${hbar}-----${C_}0${_C}"
+ print -Pn "${C_}$my_color;1${_C}${hbar}$_t_q$_t_q$_t_q$_t_q$_t_q${C_}0${_C}"
fi
}