[zshrc] Add support for Kitty term emulator

This commit is contained in:
lhark 2018-11-23 13:39:57 -05:00
parent 38b6979c64
commit e0dc869471
2 changed files with 24 additions and 11 deletions

View file

@ -89,4 +89,9 @@ ymsearch() {
mpv --ytdl-format=bestaudio ytdl://ytsearch:"$(xsel -ob)"
}
# Kitty terminfo setup for ssh
ssh_kitty () {
kitty +kitten ssh "$@"
}
# vim: ft=zsh

30
zshrc
View file

@ -51,6 +51,12 @@ colors
# Term specific hacks
case $TERM in
*kitty)
preexec () {
print -n "\e]0;kitty - $1 - ${HOST} - ${PWD}\a"
}
alias ssh='ssh_kitty'
;;
xterm*)
preexec () {
print -n "\e]0;xterm - $1 - ${HOST} - ${PWD}\a"
@ -100,6 +106,17 @@ HISTFILE=~/.history
HISTTIMEFORMAT="%d/%m %H:%M:%S "
######################
# Load ZSH functions #
######################
zmodload zsh/complist
autoload -U compinit promptinit
compinit
colors
autoload -U zsh-mime-setup
######################
# Completion options #
######################
@ -138,17 +155,8 @@ zstyle ':completion:*:manuals' separate-sections true
# comme la recherche d'un paquet aptitude install moz<tab>
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zs
######################
# Load ZSH functions #
######################
zmodload zsh/complist
autoload -U compinit promptinit
compinit
colors
autoload -U zsh-mime-setup
# Enable ssh completion for kitty ssh
compdef ssh_kitty=ssh
################