local_use_cli() marks a package namespace or the environment of a
running function with a special flag that instructs
use cli to format error messages. This formatting happens lazily,
at print-time, in various places:
When an unexpected error is displayed to the user.
When a captured error is printed in the console, for instance via
conditionMessage() is called.
cli formats messages and bullets with indentation and width-wrapping to produce a polished display of messages.
local_use_cli(..., format = TRUE, inline = FALSE, frame = caller_env())
These dots are for future extensions and must be empty.
Whether to use cli at print-time to format messages and bullets.
Whether to use
cli at throw-time to format the inline parts of a message. This
makes it possible to use cli interpolation and formatting with
A package namespace or an environment of a running function.
To use cli formatting automatically in your package:
on_load(local_use_cli()) at the top level of your namespace.
It is also possible to call
local_use_cli() inside a running
function, in which case the flag only applies within that function.