From 5e6c4b6caa24e0217b8c53be619cfa7cf563ad89 Mon Sep 17 00:00:00 2001 From: Von Random Date: Fri, 6 Jul 2018 19:36:00 +0300 Subject: [PATCH] tcmp function --- zshrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zshrc b/zshrc index 4b280b9..8c2a252 100644 --- a/zshrc +++ b/zshrc @@ -153,6 +153,7 @@ alias rgrep='command grep --exclude-dir=\.git -R' alias ggrep='command git grep' alias tailf='command less -R +F' alias diff='command diff --color' +alias s='tcmp ssh' # ls alias ls='command ls --color=auto --group-directories-first ' @@ -207,14 +208,13 @@ greset() { /usr/bin/git clean -fd /usr/bin/git reset --hard } -# ssh-compat, when terminfo is missing -s() { - local ssh=$(whence ssh) +# term compatibility for remote stuff +tcmp() { local -A terms=( 'rxvt-unicode-256color' 'rxvt-unicode' 'st-256color' 'xterm-256color' 'tmux-256color' 'screen-256color' ) - TERM=${terms[$TERM]:-$TERM} $ssh "$@" + TERM=${terms[$TERM]:-$TERM} "$@" } # }}}