cli_alert {cliapp}R Documentation

CLI alerts

Description

Alerts are typically short status messages.

Usage

cli_alert(text, id = NULL, class = NULL, wrap = FALSE, .envir = parent.frame())

cli_alert_success(
  text,
  id = NULL,
  class = NULL,
  wrap = FALSE,
  .envir = parent.frame()
)

cli_alert_danger(
  text,
  id = NULL,
  class = NULL,
  wrap = FALSE,
  .envir = parent.frame()
)

cli_alert_warning(
  text,
  id = NULL,
  class = NULL,
  wrap = FALSE,
  .envir = parent.frame()
)

cli_alert_info(
  text,
  id = NULL,
  class = NULL,
  wrap = FALSE,
  .envir = parent.frame()
)

Arguments

text

Text of the alert.

id

Id of the alert element. Can be used in themes.

class

Class of the alert element. Can be used in themes.

wrap

Whether to auto-wrap the text of the alert.

.envir

Environment to evaluate the glue expressions in.

Examples


cli_alert("Cannot lock package library.")
cli_alert_success("Package {pkg cliapp} installed successfully.")
cli_alert_danger("Could not download {pkg cliapp}.")
cli_alert_warning("Internet seems to be unreacheable.")
cli_alert_info("Downloaded 1.45MiB of data")

[Package cliapp version 0.1.1 Index]