Document `cli.default_handler` option
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- r
- Domain
- cli, documentation
Research direction
No file or test is named in the issue. Start by locating the existing documentation for cli.default_handler and the cli_message class, then inspect how the handler receives and can convert the message. Done means both the option and class are documented well enough to explain the argument and how to save the message as character data.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- R
- Stars
- 726
- Forks
- 94
- Avg merge
- 3h 35m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
feature
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Similar issues
-
documentation pkg infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
epiverse-trace/epiparameter#511 ·
-
function:write_dwc
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jbkunst/highcharter#849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100