Prevent use of kittens over ssh for nnn previews

This commit is contained in:
Daniel Flanagan 2021-11-11 11:49:20 -06:00
parent b6ae2318e3
commit 466c011bb7
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -4,7 +4,7 @@ SPLIT="$SPLIT"
TERMINAL="$TERMINAL"
USE_SCOPE="${USE_SCOPE:-0}"
IN_KITTY=0
[ -n "$KITTY_WINDOW_ID" ] && kitty @ ls --no-response >/dev/null 2>&1 && IN_KITTY=1
[ -z "$SSH_CONNECTION" ] && [ -n "$KITTY_WINDOW_ID" ] && kitty @ ls --no-response >/dev/null 2>&1 && IN_KITTY=1
if [ -e "${TMUX%%,*}" ] && tmux -V | grep -q '[ -][3456789]\.'; then
TERMINAL=tmux