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

Add a progress bar.

Command Type

built-in

Signature

> tui progress {flags} (source)

Flags

  • --value, -v {number}: Fixed value to show.
  • --total, -t {number}: Value that fills the bar (default 1, or 100 for values above 1).
  • --label, -l {string}: Text before the percentage.
  • --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 --from row that yields the value.

Input/output types:

inputoutput
nothingtui
tuitui
anytui

Examples

A static bar at 40%

> tui progress --value 0.4 --label copying | tui debug | get screen

A bar driven by a stream

> 1..100 | each {|n| sleep 50ms; $n } | tui progress --total 100 | tui run

Notes

The bar shows --value, or otherwise reads its data: a number, a {value, total} record's value, or the last number in a list, so a streamed counter drives it live. Values above 1 are read out of --total (default 100).

With --from and a closure the bar follows another widget's highlighted row: tui progress --from table-0 {|row| $row.pct }.