- ESC]0;stringBEL – Set icon name and window title to string
- ESC]1;stringBEL – Set icon name to string
- ESC]2;stringBEL – Set window title to string
echo -n "\033]0;${USER}@${HOST}\007"
For bash
case $TERM in
xterm*)
PS1="\[\033]0;\u@\h: \w\007\]bash\\$ "
;;
*)
PS1="bash\\$ "
;;
esac
For zsh
case $TERM in
xterm*)
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
;;
esac
No comments:
Post a Comment