2010-04-22 15:25:14 +02:00
|
|
|
|
|
|
|
#thx to matthew loar for that!
|
2011-04-01 15:12:48 +02:00
|
|
|
#if [[ $TERM == "screen" ]]; then
|
|
|
|
#
|
|
|
|
#function precmd {
|
|
|
|
# #prompt_adam1_precmd
|
|
|
|
# echo -ne "\033]83;title zsh\007"
|
|
|
|
#}
|
|
|
|
#
|
|
|
|
#function preexec {
|
|
|
|
# local foo="$2 "
|
|
|
|
# local bar=${${=foo}[1]}
|
|
|
|
# echo -ne "\033]83;title $bar\007"
|
|
|
|
#}
|
|
|
|
#
|
|
|
|
#fi
|
|
|
|
#
|
|
|
|
## Titre de la fenêtre d'un xterm
|
|
|
|
#case $TERM in
|
|
|
|
# xterm*)
|
|
|
|
# precmd () {print -Pn "\e]0;%n@%m: %~\a"}
|
|
|
|
# ;;
|
|
|
|
#esac
|
2010-04-22 15:25:14 +02:00
|
|
|
|
|
|
|
|
2010-04-22 16:26:09 +02:00
|
|
|
case $TERM in
|
2011-04-01 15:12:48 +02:00
|
|
|
*xterm*|rxvt|rxvt-unicode|rxvt-256color|rxvt-unicode-256color|(dt|k|E)term)
|
|
|
|
precmd () { print -Pn "\e]0;[%n@%M][%~]%#\a" }
|
|
|
|
preexec () { print -Pn "\e]0;[%n@%M][%~]%# ($1)\a" }
|
|
|
|
;;
|
|
|
|
screen)
|
|
|
|
precmd () {
|
|
|
|
print -Pn "\e]83;title \"$1\"\a"
|
|
|
|
print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~]\a"
|
|
|
|
}
|
|
|
|
preexec () {
|
|
|
|
print -Pn "\e]83;title \"$1\"\a"
|
|
|
|
print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~] ($1)\a"
|
|
|
|
}
|
|
|
|
;;
|
2010-04-22 16:26:09 +02:00
|
|
|
esac
|