From 76019aa33391b30782d3ffda6b130cbf23eaebd9 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 27 Apr 2015 01:38:14 +0300 Subject: [PATCH] .shellrc: set TERM=rxvt-unicode for tmux If TERM is rxvt set TERM=rxvt-unicode for tmux to set rxvt window title. --- .shellrc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 +} -- 2.39.2