# Put all the commands here that should run regardless of whether # this is an interactive or non-interactive shell. # Enable the subsequent settings only in interactive sessions case $- in *i*) ;; *) return;; esac # ── Shared shell config ──────────────────────────────────────────────────────── [[ -f ~/.config/shell/common ]] && source ~/.config/shell/common [[ -f ~/.config/shell/aliases ]] && source ~/.config/shell/aliases # ── OS detection — source the right platform overlay ────────────────────────── case "$(uname -s)" in Darwin) [[ -f ~/.config/shell/macos ]] && source ~/.config/shell/macos ;; Linux) [[ -f ~/.config/shell/linux ]] && source ~/.config/shell/linux ;; esac # ── Bash-specific init (starship, zoxide, fzf) ──────────────────────────────── if [[ -n "$BASH_VERSION" ]]; then # History settings HISTCONTROL=ignoreboth HISTSIZE=10000 HISTFILESIZE=20000 shopt -s histappend checkwinsize # Starship prompt command -v starship >/dev/null && eval "$(starship init bash)" # Zoxide (smarter cd) command -v zoxide >/dev/null && eval "$(zoxide init bash)" # fzf [[ -f ~/.fzf.bash ]] && source ~/.fzf.bash fi export EDITOR='nvim' export MANROFFOPT="-c" # ── Per-machine local override (untracked) ──────────────────────────────────── # Create ~/.bashrc.local on each machine for secrets / host-specific tweaks. [[ -f ~/.bashrc.local ]] && source ~/.bashrc.local