junegunn/fzf · error
invalid border style (expected: rounded|sharp|bold|block|thi
Error message
invalid border style (expected: rounded|sharp|bold|block|thinblock|double|dashed|horizontal|vertical|top|bottom|left|right|line|inline|none)
What it means
parseBorder validates --border / --border-label-*= values against the full tui.BorderShape set (rounded, sharp, bold, block, thinblock, double, dashed, horizontal, vertical, top, bottom, left, right, line, inline, none). An unknown word — or a valid word with different casing/whitespace — yields this error listing all accepted values. An empty string is only tolerated when optional=true (option omitted).
Source
Thrown at src/options.go:1001
case "horizontal":
return tui.BorderHorizontal, nil
case "vertical":
return tui.BorderVertical, nil
case "top":
return tui.BorderTop, nil
case "bottom":
return tui.BorderBottom, nil
case "left":
return tui.BorderLeft, nil
case "right":
return tui.BorderRight, nil
case "none":
return tui.BorderNone, nil
}
if optional && str == "" {
return defaultBorderShape, nil
}
return tui.BorderNone, errors.New("invalid border style (expected: rounded|sharp|bold|block|thinblock|double|dashed|horizontal|vertical|top|bottom|left|right|line|inline|none)")
}
func parseKeyChords(str string, message string) (map[tui.Event]string, []tui.Event, error) {
if len(str) == 0 {
return nil, nil, errors.New(message)
}
list := []tui.Event{}
str = regexp.MustCompile("(?i)(alt-),").ReplaceAllString(str, "$1"+string([]rune{escapedComma}))
tokens := strings.Split(str, ",")
if str == "," || strings.HasPrefix(str, ",,") || strings.HasSuffix(str, ",,") || strings.Contains(str, ",,,") {
tokens = append(tokens, ",")
}
chords := make(map[tui.Event]string)
for _, key := range tokens {
if len(key) == 0 {
continue // ignoreView on GitHub (pinned to bd4efa277b)
Solutions
- Pick one of the enumerated values exactly as listed, lowercase: --border rounded
- Use --border (no value) for the default rounded border
- Run fzf --help | grep -A2 border to see values your version supports
- Upgrade fzf (>=0.48) if you need block/thinblock/dashed/double
Example fix
# before fzf --border=curved # after fzf --border=rounded
Defensive patterns
Strategy: validation
Validate before calling
BORDER='rounded' case "$BORDER" in rounded|sharp|bold|block|thinblock|double|dashed|horizontal|vertical|top|bottom|left|right|line|inline|none) ;; *) echo "invalid border: $BORDER" >&2; exit 1;; esac fzf --border="$BORDER"
Type guard
isValidFzfBorder() { case "$1" in rounded|sharp|bold|block|thinblock|double|dashed|horizontal|vertical|top|bottom|left|right|line|inline|none) return 0;; *) return 1;; esac; } Prevention
- Copy border names verbatim from fzf --help of the version you run
- Use lowercase values — matching is case-sensitive
- Verify new shapes (block, thinblock, double, dashed) exist before using them (fzf >= 0.54)
When it happens
Trigger: fzf --border curved (old/invalid name), --border=ROUND (case-sensitive match), --border ' rounded' (leading space), or --border=double on an fzf build where the richer shapes were not yet supported.
Common situations: Dotfiles written for fzf <0.36 that used 'border-sharp'/'border-rounded' style flags then migrated; typos; borders copied from other TUI tools' vocabularies.
Related errors
- not a valid number: ${str}
- invalid format: ${str}
- template should include at least 1 placeholder: ${str}
- invalid algorithm (expected: v1 or v2)
- unsupported key: ${key}
AI-assisted analysis of junegunn/fzf@bd4efa277b (2026-08-15).
Data as JSON: /api/errors/e28731a5c09e9c50.
Report an issue: GitHub.