progress-variables: Progress bar variables

Description Details Examples

Description

Progress bar variables

Details

These variables can be used in cli progress bar format strings.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# pb_bar and pb_percent
cli_progress_demo(
  format = "Progress bar: {cli::pb_bar} {cli::pb_percent}",
  total = 100
)

# pb_current and pb_total
cli_progress_demo(
  format = "[{cli::pb_current}/{cli::pb_total}]",
  total = 248
)

# pb_current_bytes, pb_total_bytes
cli_progress_demo(
  format = "[{cli::pb_current_bytes}/{cli::pb_total_bytes}]",
  total = 102800,
  at = seq(0, 102800, by = 1024)
)

RonMobile/cli documentation built on Dec. 18, 2021, 11 a.m.