Add bashrc usage instructions to README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4cfec0b336
commit
fce6ab6e0c
1 changed files with 9 additions and 1 deletions
10
README.md
10
README.md
|
|
@ -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.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue