Add bashrc usage instructions to README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2026-03-06 12:02:19 +01:00
commit fce6ab6e0c

View file

@ -4,7 +4,15 @@ This directory contains modular shell configuration files that are automatically
## How It Works ## How It Works
The `~/.bashrc` iterates over all files in `~/.bash.d/` and sources each one that has the **executable bit** set. Non-executable files are silently skipped, which provides a simple way to temporarily disable a configuration (just `chmod -x` the file). Add the following to the end of your `~/.bashrc`:
```bash
for file in $HOME/.bash.d/*; do
[[ -x $file ]] && source $file
done
```
This iterates over all files in `~/.bash.d/` and sources each one that has the **executable bit** set. Non-executable files are silently skipped, which provides a simple way to temporarily disable a configuration (just `chmod -x` the file).
Files are sourced in **lexicographic order**, so numeric prefixes control the load sequence. This matters because later files may depend on functions or variables defined by earlier ones. Files are sourced in **lexicographic order**, so numeric prefixes control the load sequence. This matters because later files may depend on functions or variables defined by earlier ones.