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 split for viewers

Lay out child widgets side by side (or stacked with --vertical) with draggable dividers.

Command Type

built-in

Signature

> tui split {flags} (children)

Flags

  • --vertical, -v: Stack children top to bottom.
  • --sizes, -s {list<any>}: One size per child: cells, "30%", "1fr", "min:N", "max:N".
  • --ratio, -r {int}: Percent of space for the first child; the rest share the remainder.
  • --id {string}: Widget id.
  • --focus: Start with this widget focused.

Parameters

  • children: Widgets to arrange, e.g. [(tui table) (tui preview)].

Input/output types:

inputoutput
nothingtui
tuitui
anytui

Examples

Table on the left, file preview on the right

> ls | tui split --sizes [40% 1fr] [(tui table --columns [name size]) (tui preview)] | tui run

A fixed 30-cell sidebar

> ls | tui split --sizes [30 1fr] [(tui tree --walk) (tui preview)] | tui run

Two tables with their own rows

> tui split [(ls | tui table) (ps | tui table)] | tui run

Notes

Children are tui values built in parentheses: tui split [(tui table) (tui preview)]. A child can carry its own rows: [(ls | tui table) (ps | tui table)]. Splits nest.

--sizes gives one size per child: an int is cells (20), "30%" a share of the split, "1fr" a share of what is left ("2fr" twice as much), "min:10" / "max:40" bounds. Missing entries are 1fr. --ratio 60 is shorthand for --sizes [60% 1fr]. Drag a divider with the mouse, or Tab to the split and use arrows/hjkl for 1% steps.