My bashrc tools/tricks
Find a file
2026-02-21 11:07:13 -08:00
archive removed a bunch of special processing 2023-06-03 18:31:30 -07:00
data Finished rainbow hostname setup. 2025-08-02 16:16:02 -07:00
hostname Added Archie config. 2026-01-11 10:26:15 -08:00
logos one more 2023-06-03 20:01:18 -07:00
.gitignore tweaked to remove some old junk, and add rust 2023-05-29 13:45:56 -07:00
0-builder Update 0-builder 2026-02-16 07:12:32 -08:00
2-loader Faster loading rework 2023-06-03 18:55:25 -07:00
aliases.sh Made pysrc less verbose when searching. 2026-02-21 11:07:13 -08:00
bash_secrets.sh Added secrets loader. 2026-02-07 16:55:35 -08:00
functions.sh added remote shell detection 2023-07-22 11:19:16 -07:00
is_remote.sh added remote shell detection 2023-07-22 11:19:16 -07:00
LICENSE Initial commit with core behavior 2019-10-06 15:59:18 -07:00
misc.sh Disable GUI ssh prompts. 2026-02-07 16:56:58 -08:00
path_enviornment.sh Update path_enviornment.sh 2026-02-16 07:16:56 -08:00
README.md Added README.md 2026-02-16 07:13:59 -08:00
reboot_msg.sh Initial commit with core behavior 2019-10-06 15:59:18 -07:00
toolchains.sh pmbootstrap 2026-02-14 19:58:04 -08:00
tty-colors.sh Added various updates, and tty shell colors 2024-09-01 17:06:34 -07:00
user-completion.sh Added secrets loader. 2026-02-07 16:55:35 -08:00
zz_editor.sh Add zz_editor.sh 2026-02-16 07:18:33 -08:00

Bashrc.d

Setup Instructions

  1. Cleanup your default .bashrc. Inspect the contents of .bashrc, and ensure it does not attempt to source ~/.bashrc.d. If it does (as in the case of RHEL) explicitly comment out or remove those lines.
  2. Clone this repo: git clone https://git.lil-bird.xyz/siriusfox/bashrc.d.git ~/.bashrc.d
  3. Bootstrap the repo by running the "builder" script: bash ~/.bashrc.d/0-builder. This will create 1-compiled within the project as a single-file bashrc.
  4. Test the script: source ~/.bashrc.d/1-compiled
  5. If it works, append the contents of 2-loader to your ~/.bashrc to automatically load 1-compiled when present.

What is this?

This is a simple pure-bash project written to satsify three major objectives:

  1. Collect and segment all of the .bashrc stuff I use in a portable and reusable way across computers.
  2. Consolidate all of that stuff into a single file to speed up the startup time of new shells.
  3. Add per-hostname specific modifications in a way that automatically maintains unique features without having to branch to maintain differences between machines.

The project is largely implemented by the 0-builder script inside this project. The general flow is as follows:

  1. Builder attempts to find a file named <hostname>.meta.sh inside the hostname/ directory. If present, it runs a function within that script called __builder_prebuild to do anything you want.
  2. Builder finds any file in the root of the project with an extension of .sh, and concatinates the files into a monolitic file called 1-compiled.
  3. Builder runs a __builder_postbuild script when present from <hostname>.meta.sh
  4. Builder stops.

This will result in a single file with all of the contents of the various *.sh scripts in a single file called 1-compiled, and by adding a pithy file called 2-loader to your main ~/.bashrc, your normal shell will chainload to include all of the contents.

Tips

The script also exposes a pair of functions to speed up testing configuration changes:

  • __rebuild_bashrcd will run the builder script, but will not source the changes.