退出ssh时更新终端title

# ~/.bash_profile

PS1="[\u@\h \w]\$"
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"

    ;;
*)
    ;;
esac

你可能感兴趣的:(ssh)