Root bash profile script that should be sourced from your automatically sourced profile file. In my personal
experience .bash_profile seems to be the most broadly compatible with various terminals (both independent
and embedded, eg: VS Code).
- ~/.bash_profile
- ~/.profile
- ~/.bashrc
Add this line to whichever profile file from above you use (pro tip, provide an absolute path using $HOME or other path variables that expand to an absolute path to ensure best compatibility with various terminals)
source /path/to/modular_bash_profile/modular_profile_loader.sh
modular_bash_list- Lists all the modules that can be enabledmodular_bash_enable <module-name>- Enables a module by symlinking it in the enabled directorymodular_bash_disable <module-name>- Disagles a module by removing its symlink in the enabled directorymodular_bash_reload- Sources all of the enabled modules in proper ordermodular_bash_rename <old-module-name> <new-module-name>- Safely renames a module while retaining whether it is enabled or notmodular_bash_priority <module-name> <priority>- Change the priority of a module, handles renaming module and any symlinks to reflect the priority change
All of the commands that take a module-name can take just the module name from the global or local modules list,
or can take local/<module-name> or global/<module-name> to explicitly reference the module you wish to target.
Modules in here should not contain anything that is single environment specific or that is private. New modules here should be for things like application/utility/setup things.
This is the place to put anything specifically personal to the local environment it is running on or anything that is private info (credentials/keys/etc).