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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Rebuild compdump when adding Docker completions

When ~/.zcompdump is newer than 24 hours, the block below still runs compinit -C; the zsh compinit manual says -C omits the check for new completion functions, so users whose existing dump was created before Docker was on fpath will continue to miss _docker until the dump ages out or is deleted. Since this line is intended to make new shells pick up ~/.docker/completions, also force a non--C compinit or invalidate the dump when this directory is newly added.

Useful? React with 👍 / 👎.


# Cached compinit - only regenerate once per day
autoload -Uz compinit
Expand Down Expand Up @@ -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
Expand Down
Loading