Files
dotfiles/bash/.bashrc
T
jsarthak f96891b6ec refactor: consolidate all branches into single-branch Strategy 1
- bash/.bashrc: replace oh-my-bash with minimal unified config
  sources common → aliases → OS overlay → .bashrc.local

- zsh/.zshrc: remove hardcoded macOS PATHs (moved to macos overlay)
  clean sourcing order: common → personal → aliases → OS → .zshrc.local

- shell/common: populated with universal exports (EDITOR, HISTSIZE, etc.)
- shell/macos: Homebrew, Antigravity, Flutter PATH, fzf init, macOS aliases
- shell/linux: xdg-open, xclip, fzf init for Linux

- nvim/plugins/work.lua: Copilot plugin (migrated from origin/work branch)
- nvim/plugins/_init.lua: conditional load via DOTFILES_PROFILE=work env var

- tmux/.tmux.conf.local: per-machine override hook (~/.tmux.conf.machine.local)

- bootstrap.sh: one-command new machine setup with profile support
  usage: bash bootstrap.sh [personal|work]

- .gitignore: comprehensive .local file ignore patterns

All branches (linux, mac, work, linux_personal, linux_work, mac_personal)
can now be deleted — all unique content is merged into master.
2026-07-18 14:38:41 +05:30

44 lines
1.7 KiB
Bash

# 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