mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Shell integration: Dont modify ~/.zshrc
Instead use the ZDOTDIR env var to load the shell integration code
This commit is contained in:
parent
a3370a1d18
commit
f6e0eb4005
5 changed files with 45 additions and 18 deletions
9
shell-integration/zsh/.zshenv
Normal file
9
shell-integration/zsh/.zshenv
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue