Capture PromptKit selectors before retaining callbacks

This commit is contained in:
2026-10-11 13:02:54 +00:00
parent 6d660585d1
commit fba917f5bd
3 changed files with 59 additions and 2 deletions

View File

@@ -37,6 +37,7 @@ func Command[I, S any](suite Suite[I, S]) commandkit.Command {
return command
}
suite.Selectors = append([]commandkit.Flag[I](nil), suite.Selectors...)
showCommands := make([]commandkit.Command, 0, 2)
if suite.InspectPrompt != nil {
showCommands = append(showCommands, newDefinitionCommand(suite, "prompt", true))