main
 1# Kitty terminal integration
 2[[ -n "$KITTY_INSTALLATION_DIR" ]] || return
 3
 4export KITTY_SHELL_INTEGRATION="no-rc"
 5autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
 6kitty-integration
 7unfunction kitty-integration
 8
 9# SSH wrapper: use raw ssh for shpool sessions (host/session pattern)
10# Kitty SSH kitten interferes with RemoteCommand
11ssh() {
12  if [[ "$1" =~ / ]]; then
13    command ssh "$@"
14  else
15    kitty +kitten ssh "$@"
16  fi
17}