Capture the output of cli functions instead of printing it
Examples
cli_fmt({
cli_alert_info("Loading data file")
cli_alert_success("Loaded data file")
})
#> [1] "\033[36mℹ\033[39m Loading data file"
#> [2] "\033[32m✔\033[39m Loaded data file"
Capture the output of cli functions instead of printing it
cli_fmt({
cli_alert_info("Loading data file")
cli_alert_success("Loaded data file")
})
#> [1] "\033[36mℹ\033[39m Loading data file"
#> [2] "\033[32m✔\033[39m Loaded data file"