junegunn/fzf · error
invalid info style (expected: default|right|hidden|inline[-r
Error message
invalid info style (expected: default|right|hidden|inline[-right][:PREFIX])
What it means
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.
Source
Thrown at src/options.go:2314
case "inline":
return infoInline, defaultInfoPrefix, nil
case "inline-right":
return infoInlineRight, "", nil
case "hidden":
return infoHidden, "", nil
}
type infoSpec struct {
name string
style infoStyle
}
for _, spec := range []infoSpec{
{"inline", infoInline},
{"inline-right", infoInlineRight}} {
if strings.HasPrefix(str, spec.name+":") {
return spec.style, strings.ReplaceAll(str[len(spec.name)+1:], "\n", " "), nil
}
}
return infoDefault, "", errors.New("invalid info style (expected: default|right|hidden|inline[-right][:PREFIX])")
}
func parsePreviewWindow(opts *previewOpts, input string) error {
return parsePreviewWindowImpl(opts, input)
}
func parsePreviewWindowImpl(opts *previewOpts, input string) error {
var err error
tokenRegex := regexp.MustCompile(`[:,]*(<([1-9][0-9]*)\(([^)<]+)\)|[^,:]+)`)
sizeRegex := regexp.MustCompile("^[0-9]+%?$")
offsetRegex := regexp.MustCompile(`^(\+{(-?[0-9]+|n)})?([+-][0-9]+)*(-?/[1-9][0-9]*)?$`)
headerRegex := regexp.MustCompile("^~(0|[1-9][0-9]*)$")
tokens := tokenRegex.FindAllStringSubmatch(input, -1)
var alternative string
for _, match := range tokens {
if len(match[2]) > 0 {
if opts.threshold, err = atoi(match[2]); err != nil {
return errView on GitHub (pinned to bd4efa277b)
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
Example fix
# before fzf --info left # after fzf --info right
Defensive patterns
Strategy: type-guard
Validate before calling
# bash [[ "$INFO" =~ ^(default|right|hidden|inline|inline-right)(:.*)?$ ]] || INFO=default fzf --info "$INFO"
Type guard
info_ok() { [[ "$1" =~ ^(default|right|hidden|inline|inline-right)(:[^:]+)?$ ]]; } Prevention
- Whitelist --info values in config templating
- Upgrade fzf when adopting inline/inline-right styles
When it happens
Trigger: `--info left`, `--info inline:`, `--info=inline-right` (valid) vs `--info inline-right:»` with a typo in the style name like `--info inline_right:»`.
Common situations: 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.
Related errors
- invalid wrap mode: %s (expected: char or word)
- list border cannot be 'line'
- unknown action: ${spec}
- invalid layout (expected: default / reverse / reverse-list)
- history max must be a positive integer
AI-assisted analysis of junegunn/fzf@bd4efa277b (2026-08-15).
Data as JSON: /api/errors/21ed3f4ff5a3b5e9.
Report an issue: GitHub.