From b4ea163e4c06177e088461578fa120d22204a629 Mon Sep 17 00:00:00 2001 From: Patrick Raco Date: Thu, 11 Dec 2025 13:50:05 -0800 Subject: [PATCH 1/3] new aliases --- .gitconfig | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.gitconfig b/.gitconfig index 680359b..3a78a8f 100644 --- a/.gitconfig +++ b/.gitconfig @@ -93,6 +93,53 @@ # not sure about "up" # up = !git pull --rebase --prune $@ && git submodule update --init --recursive # bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f" + + # sick stuff + # + # Resolve conflicts: take base side (ours) or origin/replayed commit (theirs) + take-ours = "!f() { git checkout --ours \"$1\" && git add \"$1\"; }; f" + take-theirs = "!f() { git checkout --theirs \"$1\" && git add \"$1\"; }; f" + + # Safely update the default branch (main/develop/etc.) to match remote + # - Detects default branch from remote HEAD + # - Refuses to run if you have uncommitted changes + update-default = "!f() { \ + remote=${1:-origin}; \ + head_ref=$(git symbolic-ref -q refs/remotes/$remote/HEAD 2>/dev/null); \ + if [ -n \"$head_ref\" ]; then \ + default_branch=${head_ref#refs/remotes/$remote/}; \ + else \ + default_branch=$(git config --get init.defaultBranch || echo main); \ + fi; \ + if ! git diff --quiet || ! git diff --cached --quiet; then \ + echo '🚫 You have uncommitted changes (staged or unstaged).'; \ + echo ' Commit or stash them before running this.'; \ + exit 1; \ + fi; \ + echo \"📌 Default branch detected: $default_branch\"; \ + echo \"🔄 Switching to $default_branch\"; \ + git switch \"$default_branch\" || exit 1; \ + echo \"🚀 Fetching & resetting $default_branch from $remote/$default_branch\"; \ + git fetch --prune \"$remote\" && git reset --hard \"$remote/$default_branch\"; \ + }; f" + + # Update current feature branch with any remote changes (rebases onto origin/branch) + update-feature = "!f() { \ + branch=$(git rev-parse --abbrev-ref HEAD); \ + remote=${1:-origin}; \ + echo \"🚀 Rebasing $branch onto $remote/$branch\"; \ + git fetch --prune \"$remote\" && git rebase \"$remote/$branch\"; \ + }; f" + + # Show the definition of another alias + show-alias = "!f() { \ + val=$(git config --get alias.$1); \ + if [ -z \"$val\" ]; then \ + echo \"No alias named '$1' found\"; \ + exit 1; \ + fi; \ + echo \"alias $1 = $val\"; \ + }; f" [core] excludesfile = /home/praco/.gitignore hooksPath = /Users/racop/.git-hooks From 43a4e3563c5e22638bf0ea9e86df83cd902a55c4 Mon Sep 17 00:00:00 2001 From: Patrick Raco Date: Thu, 11 Dec 2025 14:12:53 -0800 Subject: [PATCH 2/3] new aliases --- .gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index 3a78a8f..5ba367b 100644 --- a/.gitconfig +++ b/.gitconfig @@ -116,7 +116,7 @@ echo ' Commit or stash them before running this.'; \ exit 1; \ fi; \ - echo \"📌 Default branch detected: $default_branch\"; \ + echo \"✅ Default branch detected: $default_branch\"; \ echo \"🔄 Switching to $default_branch\"; \ git switch \"$default_branch\" || exit 1; \ echo \"🚀 Fetching & resetting $default_branch from $remote/$default_branch\"; \ From c2a8e86c3547e25cf1e6897949642e2809bffc5b Mon Sep 17 00:00:00 2001 From: Patrick Raco Date: Tue, 3 Feb 2026 16:30:54 -0800 Subject: [PATCH 3/3] more updates --- .bash_profile | 2 +- .bashrc | 5 ++++- .gitignore | 2 ++ .inputrc | 7 +++++++ .tmux.conf | 14 +++++++++++++- starship.toml | 8 ++++---- 6 files changed, 31 insertions(+), 7 deletions(-) diff --git a/.bash_profile b/.bash_profile index 26adb65..d4717e7 100644 --- a/.bash_profile +++ b/.bash_profile @@ -82,7 +82,7 @@ eb_bin="${HOME}/.ebcli-virtual-env/executables" # export GEM_HOME=$GEM_PATH # this is to remove the nvm path from the PATH so that homebrew installation dirs are not first -nvm deactivate &> /dev/null +command -v nvm &> /dev/null && nvm deactivate &> /dev/null # set Homebrew environment and add brew installtion dirs to PATH # (sets HOMEBREW_REPOSITORY, HOMEBREW_PREFIX, HOMEBREW_CELLAR) diff --git a/.bashrc b/.bashrc index 8409a0f..344f317 100644 --- a/.bashrc +++ b/.bashrc @@ -181,6 +181,9 @@ fi [[ -f "${HOME}/Library/Application Support/codewhisperer/shell/bashrc.post.bash" ]] && builtin source "${HOME}/Library/Application Support/codewhisperer/shell/bashrc.post.bash" # NEW: Using Starship prompt (much faster with built-in caching) -eval "$(starship init bash)" +# Skip Starship in Warp terminal (Warp has its own prompt system) +if [[ "$TERM_PROGRAM" != "WarpTerminal" ]]; then + eval "$(starship init bash)" +fi [ -n "$PS1" ] && echo -en "${RED}.bashrc${NRM} " diff --git a/.gitignore b/.gitignore index 9a8e363..4ced532 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ .ansible* .bash_history .cache +.claude +.claude_cache .chef .config .docker diff --git a/.inputrc b/.inputrc index 4496ade..dece4a1 100644 --- a/.inputrc +++ b/.inputrc @@ -1,2 +1,9 @@ set completion-ignore-case on set show-all-if-ambiguous on + +# Let Starship handle the prompt +# # Fix vi mode history search with Starship prompt +# # Disable readline's vi mode indicators to prevent conflicts with Starship +# set show-mode-in-prompt off +# set vi-ins-mode-string "" +# set vi-cmd-mode-string "" diff --git a/.tmux.conf b/.tmux.conf index 30d2b3d..1413366 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -74,8 +74,20 @@ setw -g automatic-rename on # set -g allow-rename off set -g set-titles on -set -g default-terminal "tmux-256color" +# Use modern bash from homebrew instead of system bash +set -g default-shell /opt/homebrew/bin/bash + +# set -g default-terminal "tmux-256color" +# set -g default-terminal "screen-256color" +set -g default-terminal "xterm-256color" set -ga terminal-overrides ",*256col*:Tc" +# # Fix for vi mode history search - properly handle escape sequences and emoji widths +# set -ga terminal-overrides ',*:sitm=\E[3m' +# set -ga terminal-overrides ',*:ritm=\E[23m' +# set -ga terminal-overrides ',*:smxx=\E[9m' +# set -ga terminal-overrides ',*:rmxx=\E[29m' +# # Force tmux to use Unicode and handle wide characters properly +# set -gq utf8 on set -g status-keys vi set -g history-limit 10000 diff --git a/starship.toml b/starship.toml index 49a84f5..bceee79 100644 --- a/starship.toml +++ b/starship.toml @@ -231,7 +231,7 @@ disabled = false # error_symbol = '☯ [▶](bold fg:color_bright_red)' success_symbol = '[▶](bold fg:color_bright_green)' error_symbol = '[▶](bold fg:color_bright_red)' -vimcmd_symbol = '[](bold fg:color_bright_green)' -vimcmd_replace_one_symbol = '[](bold fg:color_violet)' -vimcmd_replace_symbol = '[](bold fg:color_violet)' -vimcmd_visual_symbol = '[](bold fg:color_green)' +vimcmd_symbol = '[◀](bold fg:color_blue)' +vimcmd_replace_one_symbol = '[◆](bold fg:color_violet)' +vimcmd_replace_symbol = '[◆](bold fg:color_violet)' +vimcmd_visual_symbol = '[◇](bold fg:color_blue)'