Skip to content

feat(update): nudge shell-completion refresh after a real update - #197

Merged
jpage-godaddy merged 2 commits into
mainfrom
autocomplete
Aug 10, 2026
Merged

feat(update): nudge shell-completion refresh after a real update#197
jpage-godaddy merged 2 commits into
mainfrom
autocomplete

Conversation

@jpage-godaddy

Copy link
Copy Markdown
Collaborator

Summary

  • gddy update apply now attaches a completion --install next-action to its result when a real update happened (not on "already up to date"), since the command tree may have changed and previously-installed completions could go stale.
  • install.sh / install.ps1 mention gddy completion --install in their post-install summary.
  • Neither the installers nor the updater auto-installs or mutates shell rc files — that stays an explicit, user-run step, consistent with how PATH edits and self-updates are already handled in this codebase.

Test plan

  • cargo check
  • cargo clippy -- -D warnings
  • cargo test (551 passed, including new completion_next_actions_suggests_reinstall_only_after_a_real_update)
  • cargo fmt --check

🤖 Generated with Claude Code

`gddy update apply` swaps the running binary but never refreshed
previously-installed shell completions, so the completion script could
drift from the actual command tree after an upgrade. Attach a
`completion --install` next-action to the result once a real update
happened (skipped on "already up to date" so the frequently-scripted,
no-auth command doesn't nag on every run).

Also mention `gddy completion --install` in install.sh/install.ps1's
post-install summary, matching the existing tone of the PATH warning
there. Neither installer nor the updater ever mutates shell rc files on
its own — that stays an explicit, user-run step.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 10, 2026 17:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the self-updater and installer messaging to prompt users to refresh shell completions after an actual binary update, since the CLI command tree may have changed and prior completions can become stale.

Changes:

  • Attach a completion --install next-action to gddy update apply results only when status == "updated".
  • Add post-install tips in install.sh and install.ps1 suggesting gddy completion --install.
  • Add a unit test to ensure the completion hint is only suggested after a real update.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
rust/src/update/mod.rs Adds conditional next-action guidance for completion refresh after updates, plus a unit test.
install.sh Prints a post-install tip to run gddy completion --install for tab completion.
install.ps1 Prints a post-install tip to run gddy completion --install for tab completion.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rust/src/update/mod.rs
Comment thread rust/src/update/mod.rs Outdated
Avoid cloning the status string before moving result into
CommandResult, and rename the test to describe refreshing/installing
completions rather than "reinstalling".

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@jpage-godaddy
jpage-godaddy merged commit 7b49a46 into main Aug 10, 2026
5 checks passed
@jpage-godaddy
jpage-godaddy deleted the autocomplete branch August 10, 2026 18:58
This was referenced Aug 10, 2026
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.

4 participants