From d0398dca28b20011a62916f9956a7e6666ee62aa Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 7 Apr 2022 17:54:52 +0530 Subject: [PATCH] Bash shell integration: Fix yet another inconsistent use of SYS_BASHRC Why Linux distros are constitutionally incapable of using consistent names and values for anything is beyond me. Fixes #4934 Fixes #4935 --- shell-integration/bash/kitty.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index 2aec98909..d36921cc3 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -39,8 +39,10 @@ _ksi_inject() { if [[ "$kitty_bash_inject" != *"no-rc"* ]]; then # Linux distros build bash with -DSYS_BASHRC. Unfortunately, there is # no way to to probe bash for it and different distros use different files - _ksi_safe_source "$KITTY_BASH_ETC_LOCATION/bash.bashrc" # Arch, Debian, Ubuntu + # Arch, Debian, Ubuntu use /etc/bash.bashrc # Fedora uses /etc/bashrc sourced from ~/.bashrc instead of SYS_BASHRC + # Void Linux uses /etc/bash/bashrc + _ksi_safe_source "$KITTY_BASH_ETC_LOCATION/bash.bashrc" || _ksi_safe_source "$KITTY_BASH_ETC_LOCATION/bash/bashrc" if [[ -z "$KITTY_BASH_RCFILE" ]]; then KITTY_BASH_RCFILE="$HOME/.bashrc"; fi _ksi_safe_source "$KITTY_BASH_RCFILE" fi