From d4f4d56f949581195deaf21a1cd89ce0c2128969 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 22 Feb 2022 21:32:33 +0530 Subject: [PATCH] DRYer --- shell-integration/bash/kitty.bash | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index cd37384cf..e726b12d0 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -36,10 +36,7 @@ _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 + _ksi_safe_source "$KITTY_BASH_POSIX_ENV" && builtin export ENV="$KITTY_BASH_POSIX_ENV"; else set +o posix; # See run_startup_files() in shell.c in the BASH source code