{"record":{"id":"a10392c8fe4b48c2","repo":"go-delve/delve","slug":"command-not-available","errorCode":null,"errorMessage":"command not available","messagePattern":"command not available","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/terminal/command.go","lineNumber":754,"sourceCode":"// Merge takes aliases defined in the config struct and merges them with the default aliases.\nfunc (c *Commands) Merge(allAliases map[string][]string) {\n\tfor i := range c.cmds {\n\t\tif c.cmds[i].builtinAliases != nil {\n\t\t\tc.cmds[i].aliases = append(c.cmds[i].aliases[:0], c.cmds[i].builtinAliases...)\n\t\t}\n\t}\n\tfor i := range c.cmds {\n\t\tif aliases, ok := allAliases[c.cmds[i].aliases[0]]; ok {\n\t\t\tif c.cmds[i].builtinAliases == nil {\n\t\t\t\tc.cmds[i].builtinAliases = make([]string, len(c.cmds[i].aliases))\n\t\t\t\tcopy(c.cmds[i].builtinAliases, c.cmds[i].aliases)\n\t\t\t}\n\t\t\tc.cmds[i].aliases = append(c.cmds[i].aliases, aliases...)\n\t\t}\n\t}\n}\n\nvar errNoCmd = errors.New(\"command not available\")\n\nfunc noCmdAvailable(t *Term, ctx callContext, args string) error {\n\treturn errNoCmd\n}\n\nfunc nullCommand(t *Term, ctx callContext, args string) error {\n\treturn nil\n}\n\nfunc (c *Commands) help(t *Term, ctx callContext, args string) error {\n\tif args != \"\" {\n\t\tif p1, p2, ok := strings.Cut(args, \" \"); ok && p1 == \"config\" {\n\t\t\tif !configureValidParameter(t, p2) {\n\t\t\t\treturn errors.New(\"unknown config parameter\")\n\t\t\t}\n\t\t\tif doc := config.Documentation[p2]; doc != \"\" {\n\t\t\t\tfmt.Fprintln(t.stdout, doc)\n\t\t\t\treturn nil","sourceCodeStart":736,"sourceCodeEnd":772,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/terminal/command.go#L736-L772","documentation":"errNoCmd is returned when a terminal command line does not match any registered Delve command. It is the sentinel error of noCmdAvailable, used as a fallback command handler and referenced by help/delve command plumbing.","triggerScenarios":"Typing an unrecognized command at the (dlv) prompt, e.g. 'breakpont main.go:10', or using a command that was removed/renamed in your Delve version.","commonSituations":"Typos at the interactive prompt; following outdated tutorials that reference renamed commands; scripting noninteractive sessions with mistyped commands.","solutions":["Run 'help' at the (dlv) prompt to list valid commands","Check spelling of the command (e.g. 'breakpoints' vs 'breakpoint')","Use command completion (Tab) to find the right command name","Upgrade/downgrade Delve if a documented command is missing in your version"],"exampleFix":"// before\n(dlv) brk main.go:10\n// after\n(dlv) break main.go:10","handlingStrategy":"validation","validationCode":"// Validate command names before scripting noninteractive sessions\nvalid := map[string]bool{\"break\":true, \"breakpoints\":true, \"continue\":true, \"print\":true, \"stack\":true}\nif !valid[cmd] {\n    return fmt.Errorf(\"%q is not a dlv command; run 'help'\", cmd)\n}","typeGuard":null,"tryCatchPattern":"err := term.ExecuteCommand(input)\nif errors.Is(err, errNoCmd) {\n    fmt.Fprintln(os.Stderr, \"unknown command; try 'help' or Tab completion:\", input)\n}","preventionTips":["Run 'help' to list commands before scripting","Use Tab completion at the (dlv) prompt","Pin Delve version in CI to avoid renamed commands","Check the command's current spelling in Documentation/cli"],"tags":["terminal","cli","delve"],"backgroundTag":"unknown-command","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}