From: Oleg Broytman Date: Sun, 26 Apr 2015 22:38:14 +0000 (+0300) Subject: .shellrc: set TERM=rxvt-unicode for tmux X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=76019aa33391b30782d3ffda6b130cbf23eaebd9;p=dotfiles.git .shellrc: set TERM=rxvt-unicode for tmux If TERM is rxvt set TERM=rxvt-unicode for tmux to set rxvt window title. --- diff --git a/.shellrc b/.shellrc index b6c9892..970360f 100644 --- a/.shellrc +++ b/.shellrc @@ -175,3 +175,20 @@ mc() { unset MC_FOUND MC_PWD_FILE MC_SAVE_TERM MC_SLOW MC_TMP_DIR MC_XTERM return $rc } + + +tmux() { + case "$TERM" in + rxvt) + TMUX_SAVE_TERM="$TERM" + TERM=rxvt-unicode + ;; + esac + + command tmux "$@" + rc=$? + + [ -n "$TMUX_SAVE_TERM" ] && TERM="$TMUX_SAVE_TERM" + unset TMUX_SAVE_TERM + return $rc +}