{"record":{"id":"f22f3de16c5657d6","repo":"kovidgoyal/kitty","slug":"unknown-map-option-s","errorCode":null,"errorMessage":"Unknown map option: %s","messagePattern":"Unknown map option: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tools/config/utils.go","lineNumber":293,"sourceCode":"\t\tif !found {\n\t\t\treturn nil, fmt.Errorf(\"No key specified after flag %s\", flag)\n\t\t}\n\t\trest = strings.TrimSpace(rest)\n\t\tif name, value, ok := strings.Cut(flag, \"=\"); ok {\n\t\t\t// --flag=value form\n\t\t\tname = strings.ReplaceAll(name[2:], \"-\", \"_\")\n\t\t\tswitch name {\n\t\t\tcase \"allow_fallback\":\n\t\t\t\tif err := validateAllowFallback(value); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif value == \"none\" {\n\t\t\t\t\tallow_fallback = \"\"\n\t\t\t\t} else {\n\t\t\t\t\tallow_fallback = value\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Unknown map option: %s\", flag)\n\t\t\t}\n\t\t} else {\n\t\t\t// --flag value form (space-separated)\n\t\t\tname := strings.ReplaceAll(flag[2:], \"-\", \"_\")\n\t\t\tswitch name {\n\t\t\tcase \"allow_fallback\":\n\t\t\t\tvalue, after, has_more := strings.Cut(rest, \" \")\n\t\t\t\tif !has_more {\n\t\t\t\t\treturn nil, fmt.Errorf(\"No key specified after %s %s\", flag, value)\n\t\t\t\t}\n\t\t\t\tif err := validateAllowFallback(value); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif value == \"none\" {\n\t\t\t\t\tallow_fallback = \"\"\n\t\t\t\t} else {\n\t\t\t\t\tallow_fallback = value\n\t\t\t\t}","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/tools/config/utils.go#L275-L311","documentation":"While parsing a map directive's --flag=value form, ParseMap hit a flag name it does not recognize (only allow_fallback is supported) and rejected it.","triggerScenarios":"`map --foo=bar ctrl+a 1` in a config file — any --flag=value other than --allow-fallback.","commonSituations":"Copy-pasting map lines from newer/older kitty docs that support different flags, or guessing flag names.","solutions":["Remove the unsupported flag","Use --allow-fallback as the only currently supported flag","Consult the map directive docs for the kitty version in use"],"exampleFix":"# before\nmap --repeat=3 ctrl+a 1\n# after\nmap ctrl+a 1","handlingStrategy":"validation","validationCode":"const, value, ok := strings.Cut(strings.TrimPrefix(flag, \"--\"), \"=\")\n_ = value\nif !ok || const != \"allow-fallback\" && const != \"allow_fallback\" { return fmt.Errorf(\"unsupported flag %q\", flag) }","typeGuard":"func isKnownMapFlag(f string) bool { n := strings.ReplaceAll(strings.TrimPrefix(strings.SplitN(f, \"=\", 2)[0], \"--\"), \"-\", \"_\"); return n == \"allow_fallback\" }","tryCatchPattern":null,"preventionTips":["Only use --allow-fallback on map lines","Check kitty docs for the running version before adding flags"],"tags":["config","map","unknown-option","kitty"],"backgroundTag":"unknown-option","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}