From 6005e2c28709b7317f38bec58786eedfde9fdd12 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 11 Nov 2021 11:54:42 -0600 Subject: [PATCH] Prevent nnn previews using kitty over ssh --- common/nnn/plugins/preview | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/nnn/plugins/preview b/common/nnn/plugins/preview index d437c5e..8553652 100755 --- a/common/nnn/plugins/preview +++ b/common/nnn/plugins/preview @@ -14,6 +14,9 @@ else TERMINAL="${TERMINAL:-xterm}" fi +# we can't actually work if we're about to try the kitty method over SSH, so just exit +[ -n "$SSH_CONNECTION" ] && [ "$TERMINAL" = "kitty" ] && exit 0 + if [ -z "$SPLIT" ] && [ $(($(tput lines) * 2)) -gt "$(tput cols)" ]; then SPLIT='h' elif [ "$SPLIT" != 'h' ]; then