Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -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} "
47 changes: 47 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
.ansible*
.bash_history
.cache
.claude
.claude_cache
.chef
.config
.docker
Expand Down
7 changes: 7 additions & 0 deletions .inputrc
Original file line number Diff line number Diff line change
@@ -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 ""
14 changes: 13 additions & 1 deletion .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'