{"record":{"id":"8b18cfbe7f275863","repo":"kovidgoyal/kitty","slug":"hyperlink-option-invalid-s","errorCode":null,"errorMessage":"hyperlink option invalid: %s","messagePattern":"hyperlink option invalid: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kittens/hyperlinked_grep/main.go","lineNumber":156,"sourceCode":"\t\t\t}\n\t\t\tfor x := range strings.SplitSeq(v, \",\") {\n\t\t\t\tswitch x {\n\t\t\t\tcase \"none\":\n\t\t\t\t\tkitten_opts.context_lines = false\n\t\t\t\t\tkitten_opts.file_headers = false\n\t\t\t\t\tkitten_opts.matching_lines = false\n\t\t\t\tcase \"all\":\n\t\t\t\t\tkitten_opts.context_lines = true\n\t\t\t\t\tkitten_opts.file_headers = true\n\t\t\t\t\tkitten_opts.matching_lines = true\n\t\t\t\tcase \"matching_lines\":\n\t\t\t\t\tkitten_opts.matching_lines = true\n\t\t\t\tcase \"file_headers\":\n\t\t\t\t\tkitten_opts.file_headers = true\n\t\t\t\tcase \"context_lines\":\n\t\t\t\t\tkitten_opts.context_lines = true\n\t\t\t\tdefault:\n\t\t\t\t\treturn fmt.Errorf(\"hyperlink option invalid: %s\", x)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\thandle_bool_option := func(key string) {\n\t\tswitch key {\n\t\tcase \"no-context-separator\":\n\t\t\tcontext_separator = \"\"\n\t\tcase \"no-filename\":\n\t\t\tkitten_opts.with_filename = false\n\t\tcase \"with-filename\":\n\t\t\tkitten_opts.with_filename = true\n\t\tcase \"heading\":\n\t\t\tkitten_opts.heading = true\n\t\tcase \"no-heading\":\n\t\t\tkitten_opts.heading = false","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/hyperlinked_grep/main.go#L138-L174","documentation":"Inside --kitten hyperlink=..., one comma-separated token did not match any known flag (none, matching_lines, file_headers, context_lines).","triggerScenarios":"Passing --kitten hyperlink=matching-lines (hyphen instead of underscore) or an unknown token like 'all'.","commonSituations":"Guessing flag names; using hyphens where underscores are required; version where a flag doesn't exist yet.","solutions":["Use only the supported tokens: none, matching_lines, file_headers, context_lines","Use underscores, not hyphens","Combine multiple with commas: hyperlink=matching_lines,file_headers"],"exampleFix":"# before\n--kitten hyperlink=file-headers\n# after\n--kitten hyperlink=file_headers","handlingStrategy":"validation","validationCode":"valid := map[string]bool{\"none\":true,\"matching_lines\":true,\"file_headers\":true,\"context_lines\":true}\nfor _, t := range strings.Split(v, \",\") { if !valid[t] { return fmt.Errorf(\"bad token %q\", t) } }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use underscore tokens only","Refer to supported flags list per kitty version"],"tags":["kitty","cli","argument-validation"],"backgroundTag":"invalid-cli-option-value","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}