junegunn/fzf · error

list border cannot be 'line'

Error message

list border cannot be 'line'

What it means

Thrown by the --list-border handler. A global '--border line' is allowed, but the list pane cannot use the single-line border because the list is a scrollable region — fzf forces it to a box shape. Explicitly passing '--list-border line' is rejected; if 'line' was inherited implicitly from an earlier '--style full:line' and --list-border is given with no argument, it is silently converted to rounded instead.

Source

Thrown at src/options.go:3246

			opts.Margin = defaultMargin()
		case "--no-padding":
			opts.Padding = defaultMargin()
		case "--no-border":
			opts.BorderShape = tui.BorderNone
		case "--border":
			hasArg, arg := optionalNextString()
			if opts.BorderShape, err = parseBorder(arg, !hasArg); err != nil {
				return err
			}
		case "--list-border":
			hasArg, arg := optionalNextString()
			if opts.ListBorderShape, err = parseBorder(arg, !hasArg); err != nil {
				return err
			}
			if opts.ListBorderShape == tui.BorderLine {
				if hasArg {
					// '--list-border line' is not allowed
					return errors.New("list border cannot be 'line'")
				}
				// This is when '--style full:line' is previously specified and
				// '--list-border' is specified without an argument.
				opts.ListBorderShape = tui.BorderRounded
			}
		case "--no-list-border":
			opts.ListBorderShape = tui.BorderNone
		case "--no-list-label":
			opts.ListLabel.label = ""
		case "--list-label":
			opts.ListLabel.label, err = nextString("label required")
			if err != nil {
				return err
			}
		case "--list-label-pos":
			pos, err := nextString("label position required (positive or negative integer or 'center')")
			if err != nil {
				return err

View on GitHub (pinned to bd4efa277b)

Solutions

  1. Use a box shape for the list: `--list-border rounded` (or square/bold/block)
  2. Keep 'line' only on the global --border
  3. Omit --list-border and rely on '--style full:line' conversion to rounded

Example fix

# before
fzf --style full:line --list-border line
# after
fzf --style full:line --list-border rounded
Defensive patterns

Strategy: type-guard

Validate before calling

# bash: map line->rounded for list panes
list_border="${LIST_BORDER:-rounded}"
[ "$list_border" = line ] && list_border=rounded
fzf --list-border "$list_border"

Type guard

list_border_ok() { case "$1" in rounded|square|bold|block|thinblock|double|none|sharp) return 0;; *) return 1;; esac; }

Prevention

When it happens

Trigger: `--list-border line` (explicit argument). Not thrown for `--list-border` with no argument after '--style full:line' (converted to rounded) or for other shapes like rounded/square/bold/block.

Common situations: Migrating a config that used '--border line' to per-pane borders and reusing 'line' for each pane; scripting that copies one border value into --border/--input-border/--list-border flags uniformly.

Related errors


AI-assisted analysis of junegunn/fzf@bd4efa277b (2026-08-15). Data as JSON: /api/errors/f7080b5e38161e96. Report an issue: GitHub.