Browse Source

replace ssh-compat with termcompat as a more versatile tool

master
Von Random 11 months ago
parent
commit
1856014398
2 changed files with 8 additions and 9 deletions
  1. 0
    9
      ssh-compat
  2. 8
    0
      termcompat

+ 0
- 9
ssh-compat View File

@@ -1,9 +0,0 @@
1
-#!/usr/bin/env bash
2
-# cleanup -256color suffix from term and set something more compatible
3
-typeset -A TERMS
4
-TERMS=(
5
-    [st]='xterm'
6
-    [tmux]='screen'
7
-)
8
-TEMPTERM="${TERM%%-256color}"
9
-TERM="${TERMS[$TEMPTERM]-${TEMPTERM}}" exec ssh "$@"

+ 8
- 0
termcompat View File

@@ -0,0 +1,8 @@
1
+#!/usr/bin/env bash
2
+# run with more compatible TERM value
3
+typeset -A terms=(
4
+    [rxvt-unicode-256color]='rxvt-unicode'
5
+    [st-256color]='xterm-256color'
6
+    [tmux-256color]='screen.xterm-new'
7
+)
8
+TERM="${terms[$TERM]:-$TERM}" exec "$@"

Loading…
Cancel
Save