feat(update): nudge shell-completion refresh after a real update - #197
Merged
Conversation
`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>
Contributor
There was a problem hiding this comment.
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 --installnext-action togddy update applyresults only whenstatus == "updated". - Add post-install tips in
install.shandinstall.ps1suggestinggddy 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.
Avoid cloning the status string before moving result into CommandResult, and rename the test to describe refreshing/installing completions rather than "reinstalling".
rts1-godaddy
approved these changes
Aug 10, 2026
jhenderson1-godaddy
approved these changes
Aug 10, 2026
This was referenced Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gddy update applynow attaches acompletion --installnext-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.ps1mentiongddy completion --installin their post-install summary.Test plan
cargo checkcargo clippy -- -D warningscargo test(551 passed, including newcompletion_next_actions_suggests_reinstall_only_after_a_real_update)cargo fmt --check🤖 Generated with Claude Code