Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

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:

inputoutput
nothingtui
tuitui
anytui

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

Fuzzy match on one column

> [{name: alpha},{name: gamma}] | tui search --fuzzy --columns [name] | tui table | tui debug --keys "tab,type:gm,enter" | get selected.name

Notes

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