diff options
| author | duckyriley <[email protected]> | 2026-11-27 02:46:04 +0800 |
|---|---|---|
| committer | duckyriley <[email protected]> | 2026-11-27 02:46:04 +0800 |
| commit | 642e8f051a41f2635f3a352d1636422670f0ed5a (patch) | |
| tree | c382fcad9802c8a79dc2cdde265ac0ecca7687eb /assets/shell.bash | |
| parent | 6cffcb0a1cf258521ae847c45819228241b9bbe6 (diff) | |
| download | ducky-main.tar.gz ducky-main.zip | |
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]>
Diffstat (limited to 'assets/shell.bash')
| -rw-r--r-- | assets/shell.bash | 8 |
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 |