From 857b28d351cde988ddbbebaec236a48dda113a59 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Thu, 27 Aug 2026 12:59:19 -0400 Subject: [PATCH] Shell hygiene: simpler reload, pyenv shim cleanup, ignore rules - zshrc-dev: reload now execs a fresh zsh instead of re-sourcing - zshenv: remove stale pyenv-rehash temp shim (>1min old) before init - gitignore_global: ignore .claude/settings.local.json - zshrc-natera: drop the git switch main->master wrapper --- gitignore_global | 2 ++ zshenv | 3 +++ zshrc-dev | 2 +- zshrc-natera | 9 --------- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/gitignore_global b/gitignore_global index 93bfd12..ef66520 100644 --- a/gitignore_global +++ b/gitignore_global @@ -1,2 +1,4 @@ *~ .DS_Store + +**/.claude/settings.local.json diff --git a/zshenv b/zshenv index a460d99..6646449 100644 --- a/zshenv +++ b/zshenv @@ -21,5 +21,8 @@ fi if command -v pyenv 1>/dev/null 2>&1; then export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" + # Clear a stale rehash temp file left behind by a killed pyenv-rehash. + # A real rehash completes in well under a second; anything older than a minute is stale. + find "$PYENV_ROOT/shims/.pyenv-shim" -mmin +1 -delete 2>/dev/null eval "$(pyenv init -)" fi diff --git a/zshrc-dev b/zshrc-dev index ab301ed..7b44bdc 100644 --- a/zshrc-dev +++ b/zshrc-dev @@ -509,7 +509,7 @@ alias topcmd="history | awk '{print \$2}' | sort | uniq -c | sort -rn | head -10 # ============================================================================ alias code='cursor .' -alias reload='source ~/.zshrc && echo "✅ Shell configuration reloaded"' +alias reload='exec zsh' alias editrc='cursor ~/dotfiles/zshrc' alias editdev='cursor ~/dotfiles/zshrc-dev' alias c='clear' diff --git a/zshrc-natera b/zshrc-natera index d26d098..ffd977a 100644 --- a/zshrc-natera +++ b/zshrc-natera @@ -97,15 +97,6 @@ kb-publish() { echo "Site published." } -# Natera repos use master as primary; rewrite "git switch main" to "git switch master" -git() { - if [[ "$1" == "switch" && "${2:-}" == "main" ]]; then - command git switch master "${@:3}" - else - command git "$@" - fi -} - # Sensitive values (AWS profile, OTEL endpoint, cert paths, refresh alias) are in zshrc-natera.private # Copy zshrc-natera.private.example to zshrc-natera.private and fill in. That file is gitignored. [[ -f ~/dotfiles/zshrc-natera.private ]] && source ~/dotfiles/zshrc-natera.private