In Ubuntu Linux, the default prompt(AKA PS1) under xterm terminal mode is :
64 # If this is an xterm set the title to user@host:dir
65 case "$TERM" in
66 xterm*|rxvt*)
67 #PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
68 PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \a\]$PS1"
69 ;;
with the prefix "\[\e]0;....." part, which to send the PS1 content with current directory("\w") included to terminal' title(you may also see it as \033]0; with octal 33 being equivalent to the \e escape sequence). That's why the terminal' title changed when you enter another directory.
Just remove the "\w" that keep the terminal' title to user@host: .
阅读(597) | 评论(0) | 转发(0) |