cli_progress_step: Simplified cli progress messages, with styling

Description Usage Arguments Details

View source: R/progress-client.R

Description

This is a simplified progress bar, a single (dynamic) message, without progress units.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cli_progress_step(
  msg,
  msg_done = msg,
  msg_failed = msg,
  spinner = FALSE,
  class = if (!spinner) ".alert-info",
  current = TRUE,
  .auto_close = TRUE,
  .envir = parent.frame(),
  ...
)

Arguments

msg

Message to show. It may contain glue substitution and cli styling. It can be updated via cli_progress_update(), as usual. It is style as a cli info alert (see cli_alert_info()).

msg_done

Message to show on successful termination. By default this it is the same as msg and it is styled as a cli success alert (see cli_alert_success()).

msg_failed

Message to show on unsuccessful termination. By default it is the same as msg and it is styled as a cli danger alert (see cli_alert_danger()).

spinner

Whether to show a spinner at the beginning of the line. To make the spinner spin, you'll need to call cli_progress_update() regularly.

class

cli class to add to the message. By default there is no class for steps with a spinner.

current

Passed to cli_progress_bar().

.auto_close

Passed to cli_progress_bar().

.envir

Passed to cli_progress_bar().

...

Passed to cli_progress_bar().

Details

cli_progress_step() always shows the progress message, even if no update is due.


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