Shell integration: Dont modify ~/.zshrc

Instead use the ZDOTDIR env var to load the shell integration code
This commit is contained in:
Kovid Goyal
2021-11-27 07:19:59 +05:30
parent a3370a1d18
commit f6e0eb4005
5 changed files with 45 additions and 18 deletions

View File

@@ -0,0 +1,9 @@
if [[ -o interactive && -v ZDOTDIR && -r "$ZDOTDIR/kitty.zsh" ]]; then source "$ZDOTDIR/kitty.zsh"; fi
if [[ -v KITTY_ORIG_ZDOTDIR ]]; then
export ZDOTDIR="$KITTY_ORIG_ZDOTDIR"
unset KITTY_ORIG_ZDOTDIR
else
unset ZDOTDIR
fi
if [[ -v KITTY_ZSH_BASE && -r "$KITTY_ZSH_BASE/.zshenv" ]]; then source "$KITTY_ZSH_BASE/.zshenv"; fi
unset KITTY_ZSH_BASE