From bba4ce2286c58329f34ebafb9bb3c1a39c8865b9 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Sat, 13 Sep 2025 11:51:51 +0200 Subject: [PATCH] Don't complain about unset 'sourced' If the user's bash profile contains 'set -u' (to protect against typos in variable names; think "rm -Rf $TMp/*"), starting a new kitty terminal resulted in a spurious `bash: sourced: unbound variable` message. --- shell-integration/bash/kitty.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index e6936c36e..6b0374a6a 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -318,7 +318,7 @@ _ksi_main() { builtin local venv="${VIRTUAL_ENV}/bin/activate" builtin local sourced="" _ksi_s_is_ok() { - [[ -z "$sourced" && "$KITTY_CLONE_SOURCE_STRATEGIES" == *",$1,"* ]] && builtin return 0 + [[ -z "${sourced:-}" && "$KITTY_CLONE_SOURCE_STRATEGIES" == *",$1,"* ]] && builtin return 0 builtin return 1 }