Add ft's zsh configuration to links section.
[zsh-lovers.git] / zsh_people / bruno_bonfils / rc / titles.rc
1 if [ $TERM = "screen" ]
2 then
3         function title {
4            # Use these two for GNU Screen:
5                 local myhost
6                 myhost=${$(hostname)//.*/}
7            print -nR $'\033k'$myhost$'\033'\\
8            print -nR $'\033]0;'$1$'\a'
9
10         }
11
12         preexec ()
13         {       
14                 emulate -L zsh
15                 local -a cmd; cmd=(${(z)1})
16                 title ${$(hostname)//.*/} "$cmd[1,-1]"
17         }
18
19         eval "function precmd () { 
20                 $functions[precmd]
21                 title \$PWD
22         }"
23 fi