shell-integration: add bashrc location lookup in Nixos

fixes #2979
This commit is contained in:
Anund
2024-12-17 21:48:14 +11:00
parent ae6c4c3f0c
commit 38b42fc970

View File

@ -58,7 +58,8 @@ if [ -n "$GHOSTTY_BASH_INJECT" ]; then
# Arch, Debian, Ubuntu use /etc/bash.bashrc
# Fedora uses /etc/bashrc sourced from ~/.bashrc instead of SYS_BASHRC
# Void Linux uses /etc/bash/bashrc
for rcfile in /etc/bash.bashrc /etc/bash/bashrc ; do
# Nixos uses /etc/bashrc
for rcfile in /etc/bash.bashrc /etc/bash/bashrc /etc/bashrc; do
[ -r "$rcfile" ] && { builtin source "$rcfile"; break; }
done
if [[ -z "$GHOSTTY_BASH_RCFILE" ]]; then GHOSTTY_BASH_RCFILE="$HOME/.bashrc"; fi