main.exe __complete "partial input" Returns:
// Add this command cmd := &cobra.Commandfish Parse os.Args in a hidden __complete command: main.exe autocom
main.exe [command] [subcommand] [flags] [args] Example: main.exe autocom
Outputs the completion script to stdout. User adds to their shell profile: main.exe autocom