From 38b42fc970b81f94ef603af36e5a981c6e3d9dbe Mon Sep 17 00:00:00 2001 From: Anund Date: Tue, 17 Dec 2024 21:48:14 +1100 Subject: [PATCH] shell-integration: add bashrc location lookup in Nixos fixes #2979 --- src/shell-integration/bash/ghostty.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shell-integration/bash/ghostty.bash b/src/shell-integration/bash/ghostty.bash index b00ec7609..879e420d8 100644 --- a/src/shell-integration/bash/ghostty.bash +++ b/src/shell-integration/bash/ghostty.bash @@ -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