diff --git a/DESCRIPTION b/DESCRIPTION index b42fa86a..37f5f4b4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -61,4 +61,4 @@ Config/Needs/website: Config/testthat/edition: 3 Config/usethis/last-upkeep: 2025-04-25 Encoding: UTF-8 -Config/roxygen2/version: 8.1.0 +Config/roxygen2/version: 8.1.1 diff --git a/R/cli-package.R b/R/cli-package.R index 0ca2549f..c1bb5ac9 100644 --- a/R/cli-package.R +++ b/R/cli-package.R @@ -1,4 +1,4 @@ -#' @aliases cli-package NULL +#' @aliases cli-package NULL __cli_update_due cli_tick_reset ccli_tick_reset ticking #' @keywords internal "_PACKAGE" diff --git a/R/progress-client.R b/R/progress-client.R index 83df8d13..b3cd96fa 100644 --- a/R/progress-client.R +++ b/R/progress-client.R @@ -309,7 +309,6 @@ #' progress messages. #' @family progress bar functions #' @family functions supporting inline markup -#' @aliases __cli_update_due cli_tick_reset ccli_tick_reset ticking #' @export cli_progress_bar <- function( diff --git a/man/cli-package.Rd b/man/cli-package.Rd index a0f4d14e..3b35d854 100644 --- a/man/cli-package.Rd +++ b/man/cli-package.Rd @@ -3,8 +3,14 @@ \docType{package} \name{cli-package} \alias{cli-package} +\alias{__cli_update_due} +\alias{cli_tick_reset} +\alias{ccli_tick_reset} +\alias{ticking} \title{cli: Helpers for Developing Command Line Interfaces} \description{ +\if{html}{\figure{logo.svg}{options: style='float: right' alt='logo' width='120'}} + A suite of tools to build attractive command line interfaces ('CLIs'), from semantic elements: headings, lists, alerts, paragraphs, etc. Supports custom themes via a 'CSS'-like language. It also contains a number of lower level 'CLI' elements: rules, boxes, trees, and 'Unicode' symbols with 'ASCII' alternatives. It support ANSI colors and text styles as well. } \seealso{ diff --git a/man/cli_progress_bar.Rd b/man/cli_progress_bar.Rd index b28bfb92..34c07854 100644 --- a/man/cli_progress_bar.Rd +++ b/man/cli_progress_bar.Rd @@ -2,10 +2,6 @@ % Please edit documentation in R/progress-client.R \name{cli_progress_bar} \alias{cli_progress_bar} -\alias{__cli_update_due} -\alias{cli_tick_reset} -\alias{ccli_tick_reset} -\alias{ticking} \alias{cli_progress_update} \alias{cli_progress_done} \title{cli progress bars} @@ -20,6 +16,7 @@ cli_progress_bar( format_failed = NULL, clear = getOption("cli.progress_clear", TRUE), current = TRUE, + quiet = getOption("cli.disable_progress", FALSE), auto_terminate = type != "download", extra = NULL, .auto_close = TRUE, @@ -83,6 +80,9 @@ it has terminated. Defaults to the \code{cli.progress_clear} option, or bar of the calling function. See more at 'The current progress bar' below.} +\item{quiet}{if \code{TRUE} suppresses output from this function. Defaults to the \code{cli.disable_progress} option, or +\code{TRUE} if unset.} + \item{auto_terminate}{Whether to terminate the progress bar if the number of current units reaches the number of total units.} diff --git a/tests/testthat/_snaps/progress-client.md b/tests/testthat/_snaps/progress-client.md index 9402dc64..03190b77 100644 --- a/tests/testthat/_snaps/progress-client.md +++ b/tests/testthat/_snaps/progress-client.md @@ -109,3 +109,10 @@ [1] "\rfirst\r" "\r \r" "just 1 text\n" "first\r" [5] "\rfirst\r" "\r \r" +# no progress bar when quiet = TRUE + + Code + capture_cli_messages(fun()) + Output + character(0) + diff --git a/tests/testthat/test-package.R b/tests/testthat/test-package.R index 79941e11..f05c05a4 100644 --- a/tests/testthat/test-package.R +++ b/tests/testthat/test-package.R @@ -11,7 +11,7 @@ test_that("No leftover SVG figures", { expect_equal( sort(figs), - sort(c(unique(rd_figs), "logo.svg")) + sort(unique(rd_figs)) ) figs2 <- dir(