1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-10-16 11:40:46 +00:00

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.
This commit is contained in:
Ian Chesal 2022-06-16 09:58:58 -04:00
parent 1e5b5013a3
commit f816fe1573

View file

@ -2,12 +2,15 @@
# Kitty plugin for oh-my-zsh #
#####################################################
# 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"
# Use this if kssh fails
alias kssh-slow="infocmp -a xterm-kitty | ssh myserver tic -x -o \~/.terminfo /dev/stdin"
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"
# Change the colour theme
alias kitty-theme="kitty +kitten themes"
fi