From 010803707602fa1de3aa0e18f37a6e7d4cd5dd99 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 22 Feb 2022 21:29:32 +0530 Subject: [PATCH] Dont leak the ENV environ var we use to load our integration script into the shell --- shell-integration/bash/kitty.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index 3d17e9311..cd37384cf 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -34,9 +34,11 @@ _ksi_main() { } if [[ -n "$KITTY_BASH_INJECT" ]]; then + builtin unset ENV; if [[ "$KITTY_BASH_INJECT" == *"posix"* ]]; then if [[ -n "$KITTY_BASH_POSIX_ENV" && -r "$KITTY_BASH_POSIX_ENV" ]]; then builtin source "$KITTY_BASH_POSIX_ENV"; + export ENV="$KITTY_BASH_POSIX_ENV"; fi else set +o posix;