Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document cli.default_handler option #708

Open
multimeric opened this issue Jul 26, 2024 · 0 comments
Open

Document cli.default_handler option #708

multimeric opened this issue Jul 26, 2024 · 0 comments

Comments

@multimeric
Copy link
Contributor

The existence of the cli.default_handler option is documented, and I've established that this has to be set to a function with 1 argument. Unfortunately I'm not sure how to work with this argument. It seems to be a cli_message object, which has no methods.

> str(message)
List of 4
 $ message: chr "cli message alert_warning"
 $ type   : chr "alert_warning"
 $ args   :List of 4
  ..$ text :List of 2
  .. ..$ str   : chr "<FCkNXbE-1v5FCkNXbE-1>: <FCkNXbE-1v6FCkNXbE-1>"
  .. ..$ values:<environment: 0x562267b28480> 
  .. ..- attr(*, "class")= chr "cli_glue_delay"
  ..$ id   : chr "cli-155-1"
  ..$ class: NULL
  ..$ wrap : logi FALSE
 $ pid    : int 155
 - attr(*, "class")= chr [1:2] "cli_message" "condition"
> class(message)
[1] "cli_message" "condition"`

In practice I just want to convert the message to a character vector and then save it somewhere. However this class doesn't seem to have a format() method or anything. Can we please document this class and also the cli.default_handler function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant