{"record":{"id":"fe71b11bf18cddd2","repo":"kovidgoyal/kitty","slug":"no-key-specified-after-s-s","errorCode":null,"errorMessage":"No key specified after %s %s","messagePattern":"No key specified after (.+?) (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tools/config/utils.go","lineNumber":302,"sourceCode":"\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}\n\t\t\t\trest = strings.TrimSpace(after)\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Unknown map option: %s\", flag)\n\t\t\t}\n\t\t}\n\t\tval = rest\n\t}\n\tspec, action, found := strings.Cut(val, \" \")\n\tif !found {","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/tools/config/utils.go#L284-L320","documentation":"In the space-separated --flag value form, ParseMap cuts the value off at the next space; if no more text follows, there is no key spec remaining and it errors with both the flag and the consumed value.","triggerScenarios":"`map --allow-fallback none` where nothing follows the value — the value consumed the rest of the line leaving no key/action.","commonSituations":"Forgetting the key/action after the flag value, or the value itself containing a space (e.g. `--allow-fallback shifted, ascii`) which truncates the line.","solutions":["Add the key spec and action after the value","Trim spaces inside the comma list: use shifted,ascii without spaces, or prefer the = form"],"exampleFix":"# before\nmap --allow-fallback none\n# after\nmap --allow-fallback none ctrl+a 1","handlingStrategy":"validation","validationCode":"_, after, ok := strings.Cut(rest, \" \")\nif !ok { return fmt.Errorf(\"no key spec after --allow-fallback value\") }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never leave a flag value as the last token on a map line","Use --allow-fallback=value to avoid space-splitting issues"],"tags":["config","map","validation","kitty"],"backgroundTag":"config-missing-value","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}