论坛: 公开讨论 (Thread #29045)

Display shell directory in window caption (2011-04-10 13:31 by williambyrne #56736)

It's not uncommon to have 10 TeraTerm simultaneous instances. It would be helpful to include the current shell directory in the window caption bar.

RE: Display shell directory in window caption (2011-04-10 20:23 by (del#1144) #56738)

Your wish is beyond the terminal emulator. Please use shell function like this.

case "${TERM}" in
kterm*|xterm*)
precmd() {
echo -ne "\033]0;${USER}@${HOST%%.*}:${PWD}\007"
}
;;
esac
回复到 #56736