fix(profile): add tab completion for profile subcommand#235
Merged
Conversation
- 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.
|
🎉 This PR is included in version 3.45.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
kilo-docker profilesubcommand across all three supported shells (bash, zsh, fish)Problem
The
profilesubcommand had no shell tab completion. Typingkilo-docker profile <TAB>offered nothing — no sub-subcommand suggestions and no dynamic profile name completions. Thesessionssubcommand had full completion support, butprofilewas missing entirely.Solution
Added profile completion support mirroring the existing
sessionscompletion pattern: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 shellsDynamic profile name completion — Subcommands that accept a profile name (
show,edit,delete,export,set-default) now offer saved profile names via a new--completemechanism--completeflag — Added hidden--completeflag tohandleProfile()andshowProfileCompletions()function, matching the existingsessions --completepatternChanges
cmd/kilo-docker/profile.go— Added--completeflag handling andshowProfileCompletions()functioncmd/kilo-docker/handle_completions.go— Updated bash, zsh, and fish completion scripts with profile sub-subcommands and dynamic name completion