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.
This commit is contained in:
+26
-160
@@ -7,171 +7,37 @@ case $- in
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# Path to your oh-my-bash installation.
|
||||
export OSH='$HOME/.oh-my-bash'
|
||||
# ── Shared shell config ────────────────────────────────────────────────────────
|
||||
[[ -f ~/.config/shell/common ]] && source ~/.config/shell/common
|
||||
[[ -f ~/.config/shell/aliases ]] && source ~/.config/shell/aliases
|
||||
|
||||
# Set name of the theme to load. Optionally, if you set this to "random"
|
||||
# it'll load a random theme each time that oh-my-bash is loaded.
|
||||
OSH_THEME="font"
|
||||
# ── 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
|
||||
|
||||
# If you set OSH_THEME to "random", you can ignore themes you don't like.
|
||||
# OMB_THEME_RANDOM_IGNORED=("powerbash10k" "wanelo")
|
||||
# You can also specify the list from which a theme is randomly selected:
|
||||
# OMB_THEME_RANDOM_CANDIDATES=("font" "powerline-light" "minimal")
|
||||
# ── Bash-specific init (starship, zoxide, fzf) ────────────────────────────────
|
||||
if [[ -n "$BASH_VERSION" ]]; then
|
||||
# History settings
|
||||
HISTCONTROL=ignoreboth
|
||||
HISTSIZE=10000
|
||||
HISTFILESIZE=20000
|
||||
shopt -s histappend checkwinsize
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
OMB_CASE_SENSITIVE="true"
|
||||
# Starship prompt
|
||||
command -v starship >/dev/null && eval "$(starship init bash)"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion. Case
|
||||
# sensitive completion must be off. _ and - will be interchangeable.
|
||||
OMB_HYPHEN_SENSITIVE="false"
|
||||
# Zoxide (smarter cd)
|
||||
command -v zoxide >/dev/null && eval "$(zoxide init bash)"
|
||||
|
||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
export UPDATE_OSH_DAYS=13
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you don't want the repository to be considered dirty
|
||||
# if there are untracked files.
|
||||
# SCM_GIT_DISABLE_UNTRACKED_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to completely ignore the presence
|
||||
# of untracked files in the repository.
|
||||
# SCM_GIT_IGNORE_UNTRACKED="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output. One of the following values can
|
||||
# be used to specify the timestamp format.
|
||||
# * 'mm/dd/yyyy' # mm/dd/yyyy + time
|
||||
# * 'dd.mm.yyyy' # dd.mm.yyyy + time
|
||||
# * 'yyyy-mm-dd' # yyyy-mm-dd + time
|
||||
# * '[mm/dd/yyyy]' # [mm/dd/yyyy] + [time] with colors
|
||||
# * '[dd.mm.yyyy]' # [dd.mm.yyyy] + [time] with colors
|
||||
# * '[yyyy-mm-dd]' # [yyyy-mm-dd] + [time] with colors
|
||||
# If not set, the default value is 'yyyy-mm-dd'.
|
||||
# HIST_STAMPS='yyyy-mm-dd'
|
||||
|
||||
# Uncomment the following line if you do not want OMB to overwrite the existing
|
||||
# aliases by the default OMB aliases defined in lib/*.sh
|
||||
# OMB_DEFAULT_ALIASES="check"
|
||||
|
||||
# Would you like to use another custom folder than $OSH/custom?
|
||||
# OSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# To disable the uses of "sudo" by oh-my-bash, please set "false" to
|
||||
# this variable. The default behavior for the empty value is "true".
|
||||
OMB_USE_SUDO=true
|
||||
|
||||
# To enable/disable display of Python virtualenv and condaenv
|
||||
# OMB_PROMPT_SHOW_PYTHON_VENV=true # enable
|
||||
# OMB_PROMPT_SHOW_PYTHON_VENV=false # disable
|
||||
|
||||
# To enable/disable Spack environment information
|
||||
# OMB_PROMPT_SHOW_SPACK_ENV=true # enable
|
||||
# OMB_PROMPT_SHOW_SPACK_ENV=false # disable
|
||||
|
||||
# Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*)
|
||||
# Custom completions may be added to ~/.oh-my-bash/custom/completions/
|
||||
# Example format: completions=(ssh git bundler gem pip pip3)
|
||||
# Add wisely, as too many completions slow down shell startup.
|
||||
completions=(
|
||||
git
|
||||
composer
|
||||
ssh
|
||||
)
|
||||
|
||||
# Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*)
|
||||
# Custom aliases may be added to ~/.oh-my-bash/custom/aliases/
|
||||
# Example format: aliases=(vagrant composer git-avh)
|
||||
# Add wisely, as too many aliases slow down shell startup.
|
||||
aliases=(
|
||||
general
|
||||
)
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(
|
||||
git
|
||||
bashmarks
|
||||
starship
|
||||
)
|
||||
|
||||
# Which plugins would you like to conditionally load? (plugins can be found in ~/.oh-my-bash/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
|
||||
# Example format:
|
||||
# if [ "$DISPLAY" ] || [ "$SSH" ]; then
|
||||
# plugins+=(tmux-autoattach)
|
||||
# fi
|
||||
|
||||
# If you want to reduce the initialization cost of the "tput" command to
|
||||
# initialize color escape sequences, you can uncomment the following setting.
|
||||
# This disables the use of the "tput" command, and the escape sequences are
|
||||
# initialized to be the ANSI version:
|
||||
#
|
||||
#OMB_TERM_USE_TPUT=no
|
||||
|
||||
source "$OSH"/oh-my-bash.sh
|
||||
|
||||
# User configuration
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# ssh
|
||||
# export SSH_KEY_PATH="~/.ssh/rsa_id"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-bash libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-bash
|
||||
# users are encouraged to define aliases within the OSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
# Example aliases
|
||||
# alias bashconfig="mate ~/.bashrc"
|
||||
# alias ohmybash="mate ~/.oh-my-bash"
|
||||
# test if the prompt var is not set and also to prevent failures
|
||||
# when `$PS1` is unset and `set -u` is used
|
||||
if [ -z "${PS1:-}" ]; then
|
||||
# prompt var is not set, so this is *not* an interactive shell
|
||||
return
|
||||
# fzf
|
||||
[[ -f ~/.fzf.bash ]] && source ~/.fzf.bash
|
||||
fi
|
||||
|
||||
# If we reach this line of code, then the prompt var is set, so
|
||||
# this is an interactive shell.
|
||||
# Put all the commands here that should run only if this is an
|
||||
# interactive shell.
|
||||
export EDITOR='nvim'
|
||||
export MANROFFOPT="-c"
|
||||
|
||||
# Example command:
|
||||
source ~/.config/shell/common
|
||||
source ~/.config/shell/personal #added by 6500gitsetup
|
||||
source ~/.config/shell/aliases
|
||||
# ── Per-machine local override (untracked) ────────────────────────────────────
|
||||
# Create ~/.bashrc.local on each machine for secrets / host-specific tweaks.
|
||||
[[ -f ~/.bashrc.local ]] && source ~/.bashrc.local
|
||||
|
||||
Reference in New Issue
Block a user