From 161f665baef04a58147d6ef547c94e9b4a770670 Mon Sep 17 00:00:00 2001 From: Von Random Date: Mon, 25 Jun 2018 18:41:30 +0300 Subject: [PATCH] slightly more efficient --- ssh-compat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssh-compat b/ssh-compat index bc4846c..6744e8e 100755 --- a/ssh-compat +++ b/ssh-compat @@ -5,4 +5,5 @@ TERMS=( [st]='xterm' [tmux]='screen' ) -TERM="${TERMS[${TERM%%-256color}]-${TERM%%-256color}}" exec ssh "$@" +TEMPTERM="${TERM%%-256color}" +TERM="${TERMS[$TEMPTERM]-${TEMPTERM}}" exec ssh "$@"