We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Inspired by https://github.com/MichaelCereda/pretty-cli#readme and @gaborcsardi's idea for testthat output
cat_status <- function(status, details, info = NULL, status_col = NULL, details_col = status_col) { status <- apply_style(paste0(" ", status, " "), status_col, bg = TRUE) width <- ansistrings::ansi_nchar(status, type = "width") + 1 details <- apply_style(str_indent(details, 0, width), details_col) cat_line(status, " ", details) if (!is.null(info)) { cat_line(str_indent(info, width, width)) } invisible() } str_indent <- function(x, indent = 0, exdent = indent) { if (indent > 0) { indent <- paste0(rep(" ", indent), collapse = "") x <- gsub("^", indent, x) } if (exdent > 0) { indent <- paste0("\n", paste0(rep(" ", exdent), collapse = "")) x <- gsub("\\n", indent, x) } x }
The text was updated successfully, but these errors were encountered:
I think we can leave this to the next version of cli.
cli
Sorry, something went wrong.
Agreed
Closing in favour of #37.
No branches or pull requests
Inspired by https://github.com/MichaelCereda/pretty-cli#readme and @gaborcsardi's idea for testthat output
The text was updated successfully, but these errors were encountered: