D.A.B.Tv0.0.17 Tutorial API DABT Tools ↗ GitHub ↗

tui.list

tui.list ID PANE ROW [ACTION] [ROWS]

Creates a scrollable single-choice list.

Parameters

  • ACTION: called as ACTION ID on Enter or double-click.
  • ROWS: height. Omitted or 0: fill the pane.

Notes

  • Keys: Up/Down, PgUp/PgDn, Home/End. At the first/last row Up/Down move focus out.
  • Selection moves call the tui.on_change function.

Example

tui.list files side 0 open_file
tui.list.set files *.txt
open_file() { tui.output view "$(<"$(tui.list.item "$1")")"; }