Update the status bar (superseded)Source:
The status bar is the last line of the terminal. cli apps can use this to show status information, progress bars, etc. The status bar is kept intact by all semantic cli output.
The text to show, a character vector. It will be collapsed into a single string, and the first line is kept and cut to
console_width(). The message is often associated with the start of a calculation.
The message to use when the message is cleared, when the calculation finishes successfully. If
"done", then this is printed automatically when the calling function (or
The message to use when the message is cleared, when the calculation finishes unsuccessfully. If
"failed", then this is printed automatically when the calling function (or
What to do when this status bar is cleared. If
TRUEthen the content of this status bar is kept, as regular cli output (the screen is scrolled up if needed). If
FALSE, then this status bar is deleted.
Whether to clear the status bar when the calling function finishes (or
.enviris removed from the stack, if specified).
Environment to evaluate the glue expressions in. It is also used to auto-clear the status bar if
What to do when auto-closing the status bar.
cli_status_clear() to clear the status bar.
Often status messages are associated with processes. E.g. the app starts
downloading a large file, so it sets the status bar accordingly. Once the
download is done (or has failed), the app typically updates the status bar
again. cli automates much of this, via the
.auto_result arguments. See examples below.