From c5ec8d43dff2dde520f0ea1cb721992c4b711eab Mon Sep 17 00:00:00 2001 From: rydesun Date: Wed, 5 Jan 2022 13:05:58 +0800 Subject: [PATCH] Add shell integration --- .config/kitty/kitty.conf | 3 +++ .config/zsh/zshrc | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 48947f5..7184aed 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -21,3 +21,6 @@ map ctrl+g>ctrl+i kitten hints --type=ip --program - map ctrl+g>shift+i kitten hints --type=ip --program @ map ctrl+g>ctrl+n kitten hints --type=linenum nvim +{line} {path} map ctrl+g>ctrl+y kitten hints --type=hyperlink + +# 在zsh中手动集成 +shell_integration disabled diff --git a/.config/zsh/zshrc b/.config/zsh/zshrc index 4d19ea3..9275be4 100644 --- a/.config/zsh/zshrc +++ b/.config/zsh/zshrc @@ -60,6 +60,14 @@ autoload -Uz colors && colors source ${ZDOTDIR}/theme ((_ENV_MODERN_UI)) && _theme_use_icon || _theme_use_text +# 与kitty集成 +if [[ -n "$KITTY_INSTALLATION_DIR" ]]; then + export KITTY_SHELL_INTEGRATION=enabled + autoload -Uz "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration + kitty-integration + unfunction kitty-integration +fi + # 其他 fpath+=(${ZDOTDIR}/functions ${ZDOTDIR}/Completion) # function: 模仿fish折叠路径