FEDRADIO(1)

NAME
fedradio - single-select radio button field for shell scripts

SYNOPSIS
fedradio row col WIDTH [options]

DESCRIPTION
fedradio is a curses-based radio button (single-select) field designed as a subprocess component for shell scripts. For a multi-select checkbox field, see fedcheck(1).

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.

OPTIONS

-i, --items TEXT
    Pipe-delimited items (e.g. "Small|Medium|Large").

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

-v, --val TEXT
    Initially selected value.

-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 focused item. When omitted, the focused row is shown by applying reverse video over the field color (plain reverse video when no field color is set).

-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.

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.

DISPLAY
(*) Selected ( ) Unselected

EXIT KEYS
The active set is chosen with -e; when omitted, all keys below are active. Enter selects the focused item and then exits. 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

NAVIGATION
Key | Action
Up/Down | Move focus by one item
Space | Select the focused item
Enter | Select the focused item and exit
Home/End | Jump to first/last item
a-z, 0-9 | Jump to next item starting with character

OUTPUT

stdout
    The selected value.

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

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

EXAMPLES
python3 fedradio.py 0 0 25 -i "Small|Medium|Large" -v "Medium"
python3 fedradio.py 2 4 20 -i "Yes|No" -e ENTER,ESC
# Colored radio with custom focus highlight
python3 fedradio.py 0 0 25 -i "Red|Green|Blue" --color cyan,default --select-color bright-white,red

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

AUTHOR
smisco (fed@smisco.biz)

COPYRIGHT
Copyright © 2026 smisco. All rights reserved.