diff options
author | Von Random <von@vdrandom.org> | 2018-07-18 16:05:28 +0300 |
---|---|---|
committer | Von Random <von@vdrandom.org> | 2018-07-18 16:05:28 +0300 |
commit | 1856014398db904b98ce0d36126d7895a33cd4c4 (patch) | |
tree | e57acd69e6af9549127297aa33dbfb31631a9bcc | |
parent | 761780524c07245e1aeb7f4aac58610cb9ec0a5f (diff) |
replace ssh-compat with termcompat as a more versatile tool
-rwxr-xr-x | ssh-compat | 9 | ||||
-rwxr-xr-x | termcompat | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/ssh-compat b/ssh-compat deleted file mode 100755 index 6744e8e..0000000 --- a/ssh-compat +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# cleanup -256color suffix from term and set something more compatible -typeset -A TERMS -TERMS=( - [st]='xterm' - [tmux]='screen' -) -TEMPTERM="${TERM%%-256color}" -TERM="${TERMS[$TEMPTERM]-${TEMPTERM}}" exec ssh "$@" diff --git a/termcompat b/termcompat new file mode 100755 index 0000000..eebd93d --- /dev/null +++ b/termcompat @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# run with more compatible TERM value +typeset -A terms=( + [rxvt-unicode-256color]='rxvt-unicode' + [st-256color]='xterm-256color' + [tmux-256color]='screen.xterm-new' +) +TERM="${terms[$TERM]:-$TERM}" exec "$@" |