config/.zsh/20_fancy.zsh

24 lines
373 B
Bash
Raw Normal View History

2010-04-22 15:25:14 +02:00
#thx to matthew loar for that!
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