FEDLIST(1)

NAME
fedlist - scrollable list selection for shell scripts

SYNOPSIS
fedlist row col WIDTH ROWS [options]

DESCRIPTION
fedlist is a curses-based scrollable list/select field designed as a subprocess component for shell scripts. It displays a list of items in a fixed-size area and allows the user to navigate and select.

ARGUMENTS

row Screen row (0-indexed). Use @ for current cursor row.

col Screen column (0-indexed). Use @ for current cursor column.

WIDTH
    Visible width in columns.

ROWS
    Visible height in rows (number of items shown at once).

OPTIONS

-i, --items TEXT
    Pipe-delimited list items (e.g. "Apple|Banana|Cherry").

--items-file   FILE
    Load items from file (one per line). Use - for stdin.

-v, --val TEXT
    Initially selected value (first match).

-s, --selected INDEX
    Initially selected index (0-based, default: 0).

-e, --exit KEYS
    Comma-separated exit key mnemonics (default: all).

-q, --quiet
    Suppress exit reason on stderr.

-r, --reverse
    Display in reverse video.

--color FG,BG
    Field colors. ANSI names, optional bright- prefix, or default.

--select-color FG,BG
    Highlight color for the selected item (defaults to reverse video).

-n, --noop
    Display and exit immediately (code 0).

-h  Print brief usage and exit.

--help
    Print full help text and exit.

--version
    Print version and copyright information and exit.

EXIT KEYS
The active set is chosen with -e; when omitted, all keys below are active. Up/Down/PgUp/PgDn only exit at the corresponding list boundary.
Key | stderr | Code
ESC | ESC | 1
Enter | ENTER | 2
Tab | TAB | 3
Shift+Tab | SHIFT-TAB | 4
F10 | F10 | 5
Up at first item | UP_TOP | 6
Down at last item | DOWN_BOTTOM | 7
PgUp at first item | PGUP | 8
PgDn at last item | PGDN | 9

TERMINAL
This field draws inline: it renders only within its own area, over whatever is already on the screen. It does not clear the screen and cannot restore it on exit — the calling script manages the surrounding display. fedform(1) is different: it owns and clears the screen and restores it on exit by default.

While the field is active it runs in raw mode, so Ctrl+C does not interrupt it and flow-control keys (Ctrl+S/Ctrl+Q) are inert; leave the field with a configured exit key.

NAVIGATION
Key | Action
Up/Down | Move selection by one item
PgUp/PgDn | Move selection by one page
Home/End | Jump to first/last item
a-z, 0-9 | Jump to next item starting with character

OUTPUT

stdout
    Selected item text.

stderr
    Exit reason mnemonic (suppressed by --quiet).

exit code
    0 for --noop, 1-9 for exit keys.

EXAMPLES
python3 fedlist.py 0 0 20 5 -i "Apple|Banana|Cherry|Date|Fig"
python3 fedlist.py 2 4 30 10 --items-file options.txt -v "Cherry"
# Colored list with custom selection highlight
python3 fedlist.py 0 0 20 5 -i "Red|Green|Blue" --color yellow,blue --select-color bright-white,red

SEE ALSO
fedline(1), fedarea(1), fedmask(1), fedcheck(1), fedradio(1), fedform(1), fedmake(1), fedsay(1), fedbox(1)

AUTHOR
smisco (fed@smisco.biz)

COPYRIGHT
Copyright © 2026 smisco. All rights reserved.