Capture completion hints in command metadata

This commit is contained in:
2026-11-03 03:47:23 +00:00
parent 1d193c87fe
commit 0bed76a6f7
6 changed files with 209 additions and 25 deletions

View File

@@ -9,7 +9,7 @@ import (
func interpretFlagTokens(argv []string, flags []commandmeta.Flag, aliases []commandmeta.FlagAlias) ([]string, map[string][]string, []commandmeta.FlagOccurrence, *commandmeta.Failure) {
canonical := make(map[string]commandmeta.Flag, len(flags)*2+2)
help := commandmeta.Flag{Name: "help", Short: "h", Boolean: true}
help := commandmeta.HelpFlag()
canonical["--help"] = help
canonical["-h"] = help
for _, flag := range flags {