Initial commit: modular bash configuration

Reinitialised repo to purge credential history.
Credential files are now gitignored with .example templates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2026-03-06 11:57:24 +01:00
commit 4cfec0b336
22 changed files with 364 additions and 0 deletions

13
00-path-helper Executable file
View file

@ -0,0 +1,13 @@
# shellcheck shell=bash
# Helper functions to safely modify PATH
# Both check that the directory exists AND prevent duplicates on re-source
# Append directory to PATH (lower priority than existing entries)
path_append() {
[[ -d "$1" ]] && [[ ":$PATH:" != *":$1:"* ]] && PATH="$PATH:$1"
}
# Prepend directory to PATH (higher priority than existing entries)
path_prepend() {
[[ -d "$1" ]] && [[ ":$PATH:" != *":$1:"* ]] && PATH="$1:$PATH"
}