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.
This commit is contained in:
parent
c28819710b
commit
bba4ce2286
1 changed files with 1 additions and 1 deletions
|
|
@ -318,7 +318,7 @@ _ksi_main() {
|
||||||
builtin local venv="${VIRTUAL_ENV}/bin/activate"
|
builtin local venv="${VIRTUAL_ENV}/bin/activate"
|
||||||
builtin local sourced=""
|
builtin local sourced=""
|
||||||
_ksi_s_is_ok() {
|
_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
|
builtin return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue