Skip to content

Do not offer completion for more than one datadisk move arg#647

Merged
sairon merged 1 commit into
home-assistant:masterfrom
scop:fix/datadisk-move-single-completion
Apr 2, 2026
Merged

Do not offer completion for more than one datadisk move arg#647
sairon merged 1 commit into
home-assistant:masterfrom
scop:fix/datadisk-move-single-completion

Conversation

@scop
Copy link
Copy Markdown
Member

@scop scop commented Apr 1, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved shell completion behavior for the os datadisk move command to prevent unwanted file completion suggestions when additional arguments are provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 496e853a-5be3-43ef-a4e4-4533ce9ddf42

📥 Commits

Reviewing files that changed from the base of the PR and between 010690f and 98d8123.

📒 Files selected for processing (1)
  • cmd/os_datadisk_move.go

📝 Walkthrough

Walkthrough

Updated the shell completion logic for the os datadisk move command to prevent file completion when arguments are already provided. Added a conditional check returning ShellCompDirectiveNoFileComp when len(args) != 0, while preserving the existing /dev/ prefix completion behavior when no arguments are present.

Changes

Cohort / File(s) Summary
Shell Completion Enhancement
cmd/os_datadisk_move.go
Added guard condition to disable file completion when arguments are present, improving argument completion behavior for the datadisk move command.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: preventing shell completion for multiple arguments in the os datadisk move command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@agners agners requested a review from sairon April 2, 2026 11:37
Copy link
Copy Markdown
Member

@sairon sairon left a comment

Choose a reason for hiding this comment

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

Thanks!

@sairon sairon merged commit c47df2b into home-assistant:master Apr 2, 2026
6 checks passed
@scop scop deleted the fix/datadisk-move-single-completion branch April 2, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants