From 85254746bf6da8363c2f2190c3a292815ae3877f Mon Sep 17 00:00:00 2001 From: pagedown Date: Sat, 15 Jan 2022 12:34:52 +0800 Subject: [PATCH] Shell integration: Remove functions that run only once at start --- .../fish/vendor_conf.d/kitty-shell-integration.fish | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish index b25ced7f0..ef8a8d52d 100644 --- a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish +++ b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish @@ -4,7 +4,9 @@ status --is-interactive || exit 0 not functions -q _ksi_schedule || exit 0 function _ksi_main + functions --erase _ksi_main _ksi_schedule test -n "$KITTY_SHELL_INTEGRATION" || return 0 + if set -q XDG_DATA_DIRS KITTY_FISH_XDG_DATA_DIR set --global --export --path XDG_DATA_DIRS "$XDG_DATA_DIRS" if set -l index (contains -i "$KITTY_FISH_XDG_DATA_DIR" $XDG_DATA_DIRS) @@ -163,9 +165,8 @@ function _ksi_main functions --erase _ksi_function_is_not_empty end - functions --erase _ksi_main _ksi_schedule end function _ksi_schedule --on-event fish_prompt -d "Setup kitty integration after other scripts have run, we hope" _ksi_main -end \ No newline at end of file +end