Add custom cli style to a vector
cli_vec(x, style = list())
x | Vector that will be collapsed by cli. |
---|---|
style | Style to apply to the vector. It is used as a theme on
a |
You can use this function to change the default parameters of
glue::glue_collapse()
, see an example below.
The style is added as an attribute, so operations that remove attributes will remove the style as well.
cli_format
v <- cli_vec( c("foo", "bar", "foobar"), style = list(vec_sep = " & ", vec_last = " & ") ) cli_text("My list: {v}.")#>