This repository contains src_bashrc, a Bash profile script that prepares a hybrid Windows/MSYS2 development environment and orchestrates background git fetch status checks for every repository inside a designated projects directory.

- Environment bootstrapping – Normalizes
PATHandPKG_CONFIG_PATHentries, exports a compact prompt history (PROMPT_DIRTRIM), and defines colorful ANSI helpers for later output. - Cross-platform Node.js helpers – Switches between direct
node.exeexecution andwinpty-wrapped binaries when available, while providingnpm,npx, andsupabaseconvenience aliases. - Python runtime toggle – Detects whether to use Windows Store Python, MSYS2/MinGW Python, or the native Unix runtime and lets you flip the selection by writing to
.disable_win_py. - Workspace-aware defaults – Resolves the working tree root from
$PROJECTS_ROOT(falling back to~/Desktop/projects), ensures the directory exists, and avoids re-running fetches when.disable_fetchis set to1. - Automated git status dashboard – Iterates through every Git repository underneath the projects directory, runs
git fetch --all --prune, and summarizes new commits, upstream drift, unstaged changes, stashes, and newly discovered remote branches. - Interactive controls – Provides
reloadfor re-sourcing the profile,statusfor inspecting the latest aggregated results, and graceful cancellation withCtrl+Cvia signal traps.
- Clone the repository somewhere persistent, for example:
git clone https://example.com/bashrc_gitfetch.git cd bashrc_gitfetch - Backup and remove any existing Bash profile in your home directory so you can switch to the tracked version:
[ -f "$HOME/.bashrc" ] && mv "$HOME/.bashrc" "$HOME/.bashrc.backup" rm -f "$HOME/.bashrc"
- Symlink the repository-managed script into place. Future
git pullupdates will immediately apply to new shells:ln -s "$(pwd)/src_bashrc" "$HOME/.bashrc"
- Source the profile (or open a new terminal) to load the configuration:
source "$HOME/.bashrc"
- Optional: set a custom projects directory before launching the shell session.
export PROJECTS_ROOT="$HOME/code"
On start-up the script prints internet/Python diagnostics, then begins fetching repositories in the background while emitting a tree-formatted summary to "$PROJECTS_ROOT"/.status.
- Toggle Python mode by writing
0(Windows Store) or1(MSYS2/MinGW) to.disable_win_py, then restart your shell. - Temporarily pause background fetches by writing
1to.disable_fetch. - Inspect previous results at any time via the
statusalias or by opening.statusdirectly. - Customize ANSI colors, aliases, and PATH additions to suit your environment.
- Bash 4+
- Git
- Optional:
winpty,attrib, and MSYS2/MinGW toolchains when running on Windows.