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

Add an append-only log view. Streamed rows appear at the bottom.

Command Type

built-in

Signature

> tui log {flags} (source)

Flags

  • --max-lines {int}: Keep only the last N lines (default 10000).
  • --id {string}: Widget id.
  • --focus: Start with this widget focused.
  • --data {any}: Data for this widget alone, instead of the outer pipeline's.
  • --from {string}: Id of the table, tree, or select whose highlighted row drives this widget.

Parameters

  • source: Closure over the source row whose output is shown.

Input/output types:

inputoutput
nothingtui
tuitui
anytui

Examples

Live log of a slow stream

> 1.. | each {|n| sleep 100ms; $"tick ($n)"} | tui label --title "ticks" | tui log | tui run

Notes

Follows the tail as new items arrive. Mouse wheel and Up/Down scroll; scrolling up pauses follow until you hit the bottom again. --max-lines keeps that many newest lines in the view. Streamed rows share a global store capped at max(10000, --max-lines).

With --from and a closure the log shows the closure's output for the highlighted row of another widget, e.g. tui log --from table-0 {|row| open $row.name | lines }.