0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00
ohmyzsh/plugins/kitty/kitty.plugin.zsh
Ian Chesal 071b8f8921
feat(kitty): add plugin for the kitty terminal (#10994)
* A plugin for the Kitty terminal

Provides a handful of useful aliases for anyone working in a Kitty
terminal. In particular, the kssh command is handy for ensuring that
terminfo is set correctly on remote hosts when  you ssh to them.

* Guard kitty configuration

We should only load these aliases into a terminal that's identifying
itself as an xterm-kitty terminal. They're not useful in any other
situation.
2024-05-28 14:40:30 -07:00

16 lines
689 B
Bash

#####################################################
# Kitty plugin for oh-my-zsh #
#####################################################
if [[ "$TERM" == 'xterm-kitty' ]]; then
## kssh
# Use this when your terminfo isn't recognized on remote hosts.
# See: https://sw.kovidgoyal.net/kitty/faq/#i-get-errors-about-the-terminal-being-unknown-or-opening-the-terminal-failing-when-sshing-into-a-different-computer
alias kssh="kitty +kitten ssh"
compdef kssh='ssh'
# Use this if kssh fails
alias kssh-slow="infocmp -a xterm-kitty | ssh myserver tic -x -o \~/.terminfo /dev/stdin"
# Change the colour theme
alias kitty-theme="kitty +kitten themes"
fi