From 642e8f051a41f2635f3a352d1636422670f0ed5a Mon Sep 17 00:00:00 2001 From: duckyriley Date: Fri, 27 Nov 2026 02:46:04 +0800 Subject: Load the system bashrc before the user's in shell.bash bash skips /etc/bashrc when started with --rcfile, so PATH setup from nix-darwin, Homebrew hooks and other system-wide config never ran in Ducky. Source /etc/bashrc (or /etc/bash.bashrc on Linux) first. Co-Authored-By: Claude Opus 5.5 --- assets/shell.bash | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'assets') diff --git a/assets/shell.bash b/assets/shell.bash index fc4404b..b9e8bc1 100644 --- a/assets/shell.bash +++ b/assets/shell.bash @@ -1,4 +1,10 @@ -# User configuration first; this prompt is scoped to Ducky. +# --rcfile skips the system bashrc, so load it ourselves: it sets PATH for +# Nix/nix-darwin, Homebrew shellenv hooks, and other system-wide tools. +for _rc in /etc/bashrc /etc/bash.bashrc; do + [[ -f $_rc ]] && { source "$_rc"; break; } +done +unset _rc +# User configuration next; this prompt is scoped to Ducky. [[ -f ~/.bashrc ]] && source ~/.bashrc _ducky_prompt() { local status=$? branch -- cgit v1.2.3