Skip to content

[codex] Fix Docker completion cache refresh - #40

Merged
chetmancini merged 1 commit into
masterfrom
chetmancini/docker-compdump
Jun 2, 2026
Merged

[codex] Fix Docker completion cache refresh#40
chetmancini merged 1 commit into
masterfrom
chetmancini/docker-compdump

Conversation

@chetmancini

Copy link
Copy Markdown
Owner

This updates .zshrc so ~/.docker/completions triggers a non-cached compinit when the existing ~/.zcompdump lacks Docker completion metadata.

Without this, compinit -C can keep using a dump created before Docker was on fpath, so _docker remains unavailable until the dump ages out or is deleted.

Validated with make zsh-check.

@chetmancini
chetmancini marked this pull request as ready for review June 2, 2026 14:58
@chetmancini
chetmancini merged commit 8996771 into master Jun 2, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1bf1b40c9d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .zshrc
# Cached compinit - only regenerate once per day
autoload -Uz compinit
if [[ -n ~/.zcompdump(#qN.mh+24) ]]; then
if [[ "$_compinit_rebuild" == true || -n ~/.zcompdump(#qN.mh+24) ]]; then

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 Force the dump refresh when Docker is absent

When _compinit_rebuild is true, this still invokes plain compinit, which can source the existing ~/.zcompdump whenever the dump header's completion-file count and ZSH_VERSION match the current fpath. In the stale-cache case where Docker was added but the total count stayed the same, the grep check remains true yet compinit reloads the stale dump, so _docker remains unavailable and each new shell keeps doing the slower uncached check; remove/rename the dump or otherwise force regeneration before initializing.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant