tui search for viewers
Add a search box that filters tables, logs, trees, and selects as you type.
Command Type
built-in
Signature
> tui search {flags}
Flags
--placeholder {string}: Placeholder text.--bind {string}: Key that focuses search, for example '/' or 'ctrl+r'.--fuzzy, -f: Fuzzy matching instead of substring.--case-sensitive, -s: Respect case when matching.--columns {list<string>}: Match only these record columns.--id {string}: Widget id.--focus: Start with this widget focused.
Input/output types:
| input | output |
|---|---|
| nothing | tui |
| tui | tui |
| any | tui |
Examples
Filter a table from a search box
> [{name: alpha},{name: beta}] | tui search --placeholder "filter" --bind / | tui table | tui debug --keys "/,type:be,tab,enter" | get selected.nameFuzzy match on one column
> [{name: alpha},{name: gamma}] | tui search --fuzzy --columns [name] | tui table | tui debug --keys "tab,type:gm,enter" | get selected.nameNotes
--bind focuses this search box from anywhere except a text field (for example --bind / or --bind ctrl+r). Esc clears the query; Esc again leaves the box. Enter submits the highlighted row of the list it filters.
Matching is a case-insensitive substring over every field by default. --fuzzy uses the same matcher as input list --fuzzy, --case-sensitive respects case, and --columns [name] matches only those columns.
Scope comes from position: a search box in the outer pipeline filters every list; one placed inside tui split [...] or tui box "name" [...] filters only the widgets in that container.