summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVon Random <von@vdrandom.org>2022-10-24 00:12:46 +0300
committerVon Random <von@vdrandom.org>2022-10-24 00:12:46 +0300
commit55c0f11b4020a7471377450f5a5dc890902a8ba4 (patch)
tree33393a3d86864664bc5bf90240e57a5993feeb2b
parente9243344a8c08382336d487184a80e519698f28d (diff)
termcompat alteration
-rwxr-xr-xtermcompat22
1 files changed, 13 insertions, 9 deletions
diff --git a/termcompat b/termcompat
index ae5c9ff..4598304 100755
--- a/termcompat
+++ b/termcompat
@@ -1,10 +1,14 @@
-#!/usr/bin/env bash
+#!/usr/bin/env zsh
# run with more compatible TERM value
-typeset -A terms=(
- [alacritty]='xterm'
- [xterm-kitty]='xterm'
- [rxvt-unicode-256color]='rxvt-unicode'
- [st-256color]='xterm-256color'
- [tmux-256color]='screen.xterm-new'
-)
-TERM="${terms[$TERM]:-$TERM}" exec "$@"
+case $TERM in
+ (st-*) ;&
+ (alacritty*) ;&
+ (xterm-kitty) ;&
+ export TERM=xterm;;
+ (rxvt-unicode-*)
+ export TERM=rxvt-unicode;;
+ (tmux-*)
+ export TERM=screen.xterm-new;;
+esac
+
+exec "$@"