r-lib / cli

Tools for making beautiful & useful command line interfaces
https://cli.r-lib.org/
Other
644 stars 70 forks source link

Only show first class in {.obj_type_friendly} #669

Closed olivroy closed 7 months ago

olivroy commented 7 months ago

To display like rlang https://github.com/r-lib/rlang/pull/1622

Let me know if you think this is reasonable, and if it requires NEWS.

cli::cli_abort("{.obj_type_friendly {gt::gt(gt::exibble)}}")
Error:
! a <gt_tbl/list> object

With this PR (hopefully)

cli::cli_abort("{.obj_type_friendly {gt::gt(gt::exibble)}}")
Error:
! a <gt_tbl> object
gaborcsardi commented 7 months ago

Thanks!