Skip to content

fix(profile): add tab completion for profile subcommand#235

Merged
mbabic84 merged 2 commits into
mainfrom
fix/profile-save-and-tab-completion
Jul 9, 2026
Merged

fix(profile): add tab completion for profile subcommand#235
mbabic84 merged 2 commits into
mainfrom
fix/profile-save-and-tab-completion

Conversation

@mbabic84

@mbabic84 mbabic84 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add tab completion for the kilo-docker profile subcommand across all three supported shells (bash, zsh, fish)

Problem

The profile subcommand had no shell tab completion. Typing kilo-docker profile <TAB> offered nothing — no sub-subcommand suggestions and no dynamic profile name completions. The sessions subcommand had full completion support, but profile was missing entirely.

Solution

Added profile completion support mirroring the existing sessions completion pattern:

  1. Sub-subcommand completion — All 10 profile subcommands (save, list, show, edit, delete, import, export, set-default, unset-default, show-default) now appear in tab completion for all three shells

  2. Dynamic profile name completion — Subcommands that accept a profile name (show, edit, delete, export, set-default) now offer saved profile names via a new --complete mechanism

  3. --complete flag — Added hidden --complete flag to handleProfile() and showProfileCompletions() function, matching the existing sessions --complete pattern

Changes

  • cmd/kilo-docker/profile.go — Added --complete flag handling and showProfileCompletions() function
  • cmd/kilo-docker/handle_completions.go — Updated bash, zsh, and fish completion scripts with profile sub-subcommands and dynamic name completion

mbabic84 added 2 commits July 9, 2026 10:55
- Prompt for confirmation before overwriting an existing profile (respects --yes)
- Show distinct messages for new save vs overwrite
- Add missing Diagnostics field to profileFlags struct
- Add diagnostics case to runProfileSave switch and mergeProfile
- Update profile save help to list all available service flags
- Add tests for overwrite confirmation behavior
Add sub-subcommand completion for all 10 profile subcommands (save,
list, show, edit, delete, import, export, set-default, unset-default,
show-default) in bash, zsh, and fish completion scripts.

Add --complete flag to profile command for dynamic profile name
completion, matching the existing sessions --complete pattern.
@mbabic84
mbabic84 merged commit 0975654 into main Jul 9, 2026
1 check passed
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.45.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@mbabic84
mbabic84 deleted the fix/profile-save-and-tab-completion branch July 9, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant