Skip to content

New feature request: cli formatter #210

@pawelru

Description

@pawelru

cli does have a very rich string interpolation mechanism - https://cli.r-lib.org/reference/inline-markup.html
What is also nice about it is that it is a zero-dependent package so it does not increase this package a lot.

Currently, using the default glue_formatter I have:

r$> x <- NULL

r$> logger::log_info("x is {x}")
INFO [2024-09-05 11:05:01]

It would be great to have something like this:

r$> cli::cli_inform("{.var x} is {.var {x}}")
`x` is

For NULL value in particular - it is possible to modify glue appender by .null argument but here I do want to make use of other features of cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions