{"record":{"id":"21ed3f4ff5a3b5e9","repo":"junegunn/fzf","slug":"invalid-info-style-expected-default-right-hidden","errorCode":null,"errorMessage":"invalid info style (expected: default|right|hidden|inline[-right][:PREFIX])","messagePattern":"invalid info style \\(expected: default\\|right\\|hidden\\|inline\\[-right\\]\\[:PREFIX\\]\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/options.go","lineNumber":2314,"sourceCode":"\tcase \"inline\":\n\t\treturn infoInline, defaultInfoPrefix, nil\n\tcase \"inline-right\":\n\t\treturn infoInlineRight, \"\", nil\n\tcase \"hidden\":\n\t\treturn infoHidden, \"\", nil\n\t}\n\ttype infoSpec struct {\n\t\tname  string\n\t\tstyle infoStyle\n\t}\n\tfor _, spec := range []infoSpec{\n\t\t{\"inline\", infoInline},\n\t\t{\"inline-right\", infoInlineRight}} {\n\t\tif strings.HasPrefix(str, spec.name+\":\") {\n\t\t\treturn spec.style, strings.ReplaceAll(str[len(spec.name)+1:], \"\\n\", \" \"), nil\n\t\t}\n\t}\n\treturn infoDefault, \"\", errors.New(\"invalid info style (expected: default|right|hidden|inline[-right][:PREFIX])\")\n}\n\nfunc parsePreviewWindow(opts *previewOpts, input string) error {\n\treturn parsePreviewWindowImpl(opts, input)\n}\n\nfunc parsePreviewWindowImpl(opts *previewOpts, input string) error {\n\tvar err error\n\ttokenRegex := regexp.MustCompile(`[:,]*(<([1-9][0-9]*)\\(([^)<]+)\\)|[^,:]+)`)\n\tsizeRegex := regexp.MustCompile(\"^[0-9]+%?$\")\n\toffsetRegex := regexp.MustCompile(`^(\\+{(-?[0-9]+|n)})?([+-][0-9]+)*(-?/[1-9][0-9]*)?$`)\n\theaderRegex := regexp.MustCompile(\"^~(0|[1-9][0-9]*)$\")\n\ttokens := tokenRegex.FindAllStringSubmatch(input, -1)\n\tvar alternative string\n\tfor _, match := range tokens {\n\t\tif len(match[2]) > 0 {\n\t\t\tif opts.threshold, err = atoi(match[2]); err != nil {\n\t\t\t\treturn err","sourceCodeStart":2296,"sourceCodeEnd":2332,"githubUrl":"https://github.com/junegunn/fzf/blob/bd4efa277b49ef34ca4025bff9b1a288e1980eff/src/options.go#L2296-L2332","documentation":"Thrown by parseInfoStyle when --info is not one of the built-in names (default, right, hidden, inline, inline-right) and does not match the 'inline:PREFIX' or 'inline-right:PREFIX' prefix forms. It accepts inline styles with an optional custom prompt prefix; everything else is rejected.","triggerScenarios":"`--info left`, `--info inline:`, `--info=inline-right` (valid) vs `--info inline-right:»` with a typo in the style name like `--info inline_right:»`.","commonSituations":"Assuming 'left' or 'bottom' exists as an info position; version differences (inline/inline-right arrived in newer fzf, older builds reject them); typo in the style-prefix separator.","solutions":["Use one of: default, right, hidden, inline, inline-right, or inline:PREFIX / inline-right:PREFIX","Upgrade fzf if 'inline' styles are not recognized","Verify the colon form: style name immediately followed by ':' and the prefix text"],"exampleFix":"# before\nfzf --info left\n# after\nfzf --info right","handlingStrategy":"type-guard","validationCode":"# bash\n[[ \"$INFO\" =~ ^(default|right|hidden|inline|inline-right)(:.*)?$ ]] || INFO=default\nfzf --info \"$INFO\"","typeGuard":"info_ok() { [[ \"$1\" =~ ^(default|right|hidden|inline|inline-right)(:[^:]+)?$ ]]; }","tryCatchPattern":null,"preventionTips":["Whitelist --info values in config templating","Upgrade fzf when adopting inline/inline-right styles"],"tags":["fzf","go","cli","ui","validation"],"backgroundTag":null,"analyzedSha":"bd4efa277b49ef34ca4025bff9b1a288e1980eff","analyzedAt":"2026-08-15T06:11:46.983Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}