From 0a5ffe9b73f820a47ae594b6a08db9ad3d824d88 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 28 Nov 2021 08:14:16 +0530 Subject: [PATCH] Add a note about _ksi_first_run --- shell-integration/zsh/kitty.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell-integration/zsh/kitty.zsh b/shell-integration/zsh/kitty.zsh index 8d32fa011..2ba42b85a 100644 --- a/shell-integration/zsh/kitty.zsh +++ b/shell-integration/zsh/kitty.zsh @@ -139,6 +139,10 @@ } function _ksi_first_run() { + # We install the real precmd and preexec functions here and remove this function + # from precmd_functions. This ensures that our functions are last. This is needed + # because the zsh prompt_init package actually sets PS1 in a precmd function and the user + # could have setup their own precmd function to set the prompt as well. _ksi_install_completion typeset -a -g precmd_functions local idx=$precmd_functions[(ie)_ksi_first_run]