aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorduckyriley <[email protected]>2026-11-27 02:46:04 +0800
committerduckyriley <[email protected]>2026-11-27 02:46:04 +0800
commit642e8f051a41f2635f3a352d1636422670f0ed5a (patch)
treec382fcad9802c8a79dc2cdde265ac0ecca7687eb
parent6cffcb0a1cf258521ae847c45819228241b9bbe6 (diff)
downloadducky-main.tar.gz
ducky-main.zip
Load the system bashrc before the user's in shell.bashHEADmain
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 <[email protected]>
-rw-r--r--assets/shell.bash8
1 files changed, 7 insertions, 1 deletions
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