refactor: modular .bashrc.d/ structure
- Rewrite .bashrc as minimal loader (34 lines → loads .bashrc.d/*.sh)
- Clean .bash_profile: single source, Apple Silicon/Intel brew path
- Add .bashrc.d/ with 7 topic modules:
00_env.sh PS1, OSTYPE, colors, pyenv
10_aliases.sh universal aliases
20_functions.sh proxy, dbash, git helpers
30_work.sh work-host detection, LDAP, AWX, Juniper tools
(+ unified-hub-login with env-var creds)
40_k8s.sh kubectl completion + aliases
50_ai_env.sh WORKSPACE/DATA_ROOT/MODEL_ROOT paths
60_dotfiles.sh dotfiles manager aliases, zet shortcuts
- Secrets (SN_PASSWORD, LDAP bind PWs, Unified Hub token) moved
to ~/.bashrc.local (gitignored, written by setup script)
- Update .dotfiles_manifest to track .bashrc.d directory
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
. ~/.bashrc
|
||||
# ~/.bash_profile — macOS login shell entry point
|
||||
# Managed via dotfiles repo: http://172.27.0.35:3000/kenjim/dotfiles
|
||||
# =============================================================================
|
||||
|
||||
[[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]] && . "/opt/homebrew/etc/profile.d/bash_completion.sh"
|
||||
# Load main shell config (which in turn loads .bashrc.d/ and .bashrc.local)
|
||||
[ -f ~/.bashrc ] && source ~/.bashrc
|
||||
|
||||
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" || true
|
||||
|
||||
export BASH_SILENCE_DEPRECATION_WARNING=1
|
||||
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
|
||||
export DOCKER_DEFAULT_PLATFORM=linux/amd64
|
||||
|
||||
# Load .bashrc if it exists
|
||||
if [ -f ~/.bashrc ]; then
|
||||
source ~/.bashrc
|
||||
# Homebrew environment (Apple Silicon path first, Intel fallback)
|
||||
if [ -x /opt/homebrew/bin/brew ]; then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)" 2>/dev/null || true
|
||||
elif [ -x /usr/local/bin/brew ]; then
|
||||
eval "$(/usr/local/bin/brew shellenv)" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Bash completion (installed via brew)
|
||||
[[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]] && \
|
||||
. "/opt/homebrew/etc/profile.d/bash_completion.sh"
|
||||
|
||||
# iTerm2 shell integration (optional, sourced only if present)
|
||||
test -e "${HOME}/.iterm2_shell_integration.bash" && \
|
||||
source "${HOME}/.iterm2_shell_integration.bash" || true
|
||||
|
||||
# Suppress macOS "default shell is now zsh" warning
|
||||
export BASH_SILENCE_DEPRECATION_WARNING=1
|
||||
|
||||
Reference in New Issue
Block a user