summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVon Random <von@vdrandom.org>2018-06-25 18:38:42 +0300
committerVon Random <von@vdrandom.org>2018-06-25 18:38:42 +0300
commitbf8d42b4656979b069e9f2e6f6a542cec3f91b9c (patch)
tree9aeef4188a19c9121c874fd921f821ee20bf6608
parentb2d4543bc67174226add9be1f26dfcbecb017a9f (diff)
ssh-compat script; bash is horrifying, but beautiful
-rwxr-xr-xssh-compat8
1 files changed, 8 insertions, 0 deletions
diff --git a/ssh-compat b/ssh-compat
new file mode 100755
index 0000000..bc4846c
--- /dev/null
+++ b/ssh-compat
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+# cleanup -256color suffix from term and set something more compatible
+typeset -A TERMS
+TERMS=(
+ [st]='xterm'
+ [tmux]='screen'
+)
+TERM="${TERMS[${TERM%%-256color}]-${TERM%%-256color}}" exec ssh "$@"