diff --git a/.gitconfig b/.gitconfig index 20e757b..9c82248 100644 --- a/.gitconfig +++ b/.gitconfig @@ -16,7 +16,7 @@ st = status ri = rebase --interactive rc = rebase --continue - rom = "!git rebase origin/$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's@^origin/@@' || echo main)" + rom = "!f() { ref=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null); if [ -n \"$ref\" ]; then b=\"${ref#origin/}\"; elif git show-ref --verify --quiet refs/remotes/origin/main; then b=main; elif git show-ref --verify --quiet refs/remotes/origin/master; then b=master; else b=main; fi; git rebase \"origin/$b\"; }; f" wt = worktree wtl = worktree list wta = worktree add diff --git a/.zshrc b/.zshrc index f8b729c..7707fb8 100644 --- a/.zshrc +++ b/.zshrc @@ -583,9 +583,10 @@ if command -v thefuck &> /dev/null; then } fi -# Grok completions on fpath before compinit so they're picked up by the single -# cached compinit below (the grok installer block at the bottom only sets fpath). +# Completion dirs must be on fpath before compinit so they're picked up by the +# single cached compinit below (installer blocks at the bottom only set fpath). [ -d ~/.grok/completions/zsh ] && fpath=(~/.grok/completions/zsh $fpath) +[ -d ~/.docker/completions ] && fpath=(~/.docker/completions $fpath) # Cached compinit - only regenerate once per day autoload -Uz compinit @@ -630,8 +631,7 @@ fi # bun completions [ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun" -# Docker CLI completions (compinit called once above) -fpath=($HOME/.docker/completions $fpath) +# Docker CLI completions are added to fpath above, before compinit # Mise if command -v mise &> /dev/null; then