cli: Compose multiple cli functions

View source: R/cli.R

cliR Documentation

Compose multiple cli functions

Description

cli() will record all ⁠cli_*⁠ calls in expr, and emit them together in a single message. This is useful if you want to built a larger piece of output from multiple ⁠cli_*⁠ calls.

Usage

cli(expr)

Arguments

expr

Expression that contains ⁠cli_*⁠ calls. Their output is collected and sent as a single message.

Details

Use this function to build a more complex piece of CLI that would not make sense to show in pieces.

cli({
  cli_h1("Title")
  cli_h2("Subtitle")
  cli_ul(c("this", "that", "end"))
})
#>                                                                                 
#> ── Title ─────────────────────────────────────────────────────────────          
#>                                                                                 
#> ── Subtitle ──                                                                  
#>                                                                                 
#> • this                                                                          
#> • that                                                                          
#> • end                                                                           

Value

Nothing.


cli documentation built on June 22, 2024, 10:57 a.m.