]> git.phdru.name Git - dotfiles.git/commitdiff
.shellrc: simplify TERM handling for tmux
authorOleg Broytman <phd@phdru.name>
Fri, 19 Jun 2015 02:05:13 +0000 (05:05 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 19 Jun 2015 02:05:13 +0000 (05:05 +0300)
.shellrc

index d2007fa8f46f28c61382b14674ccbe274472d53f..67f9b762c91d7388eb23e8b99aa270b0996ec9dd 100644 (file)
--- a/.shellrc
+++ b/.shellrc
@@ -196,15 +196,11 @@ mc() {
 tmux() {
    case "$TERM" in
       rxvt)
-         TMUX_SAVE_TERM="$TERM"
-         TERM=rxvt-unicode
+         TERM=rxvt-unicode command tmux "$@"
       ;;
-   esac
-
-   command tmux "$@"
-   rc=$?
 
-   [ -n "$TMUX_SAVE_TERM" ] && TERM="$TMUX_SAVE_TERM"
-   unset TMUX_SAVE_TERM
-   return $rc
+      *)
+         command tmux "$@"
+      ;;
+   esac
 }