1
0
mirror of https://github.com/artizirk/dotfiles.git synced 2024-12-22 11:30:15 +02:00

Run ssh in subshell with custom TERM if needed

Remote systems usually don't have alacritty terminfo
This commit is contained in:
Arti Zirk 2023-07-11 14:20:39 +03:00
parent d654de9dbe
commit 01ef149ff2

15
.zshrc
View File

@ -202,9 +202,6 @@ alias htop="htop -d 10"
alias ip="ip -color=auto"
alias cp="cp --reflink=auto"
alias gitg="LANG=en_US.UTF-8 gitg"
if [[ "$TERM" == "alacritty" ]]; then
alias ssh='TERM=xterm-256color ssh'
fi
export EDITOR=nvim
export VISUAL=nvim
@ -267,7 +264,17 @@ function npm {
(
export COLOR=1
export REACT_APP_NO_CLEAR_CONSOLE=1
/usr/bin/npm $@ | cat
exec /usr/bin/npm $@ | cat
)
}
function ssh {
(
if [[ "$TERM" == "alacritty" ]]; then
export TERM=xterm-256color
fi
exec /usr/bin/ssh $@
)
}