diff --git a/DESCRIPTION b/DESCRIPTION index 478e6c568..e1fdfc515 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -57,4 +57,4 @@ Config/Needs/website: vctrs Config/testthat/edition: 3 Encoding: UTF-8 -RoxygenNote: 7.2.1.9000 +RoxygenNote: 7.2.3 diff --git a/R/cliapp-docs.R b/R/cliapp-docs.R index 0a1100658..0bfc775c8 100644 --- a/R/cliapp-docs.R +++ b/R/cliapp-docs.R @@ -202,6 +202,7 @@ #' ```{asciicast inline-plural} #' ndirs <- 1 #' nfiles <- 13 +#' pkgs <- c("pkg1", "pkg2", "pkg3") #' cli_alert_info("Found {ndirs} director{?y/ies} and {nfiles} file{?s}.") #' cli_text("Will install {length(pkgs)} package{?s}: {.pkg {pkgs}}") #' ``` diff --git a/man/ansi_collapse.Rd b/man/ansi_collapse.Rd index b4dd3a457..062ea3d50 100644 --- a/man/ansi_collapse.Rd +++ b/man/ansi_collapse.Rd @@ -30,7 +30,7 @@ at least \code{trunc = 1} is used. For \code{style = "both-ends"} at least \item{width}{Limit for the display width of the result, in characters. This is a hard limit, and the output will never exceed it. This argument is not implemented for the \code{"both-ends"} style, which -always uses \code{Inf}, with a warning if a fininte \code{width} value is set.} +always uses \code{Inf}, with a warning if a finite \code{width} value is set.} \item{ellipsis}{Character string to use at the place of the truncation. By default, the Unicode ellipsis character is used if the console is diff --git a/man/hash_animal.Rd b/man/hash_animal.Rd index 81f2fb7ea..de61abd3a 100644 --- a/man/hash_animal.Rd +++ b/man/hash_animal.Rd @@ -15,7 +15,7 @@ hash_obj_animal(x, n_adj = 2, serialize_version = 2) \arguments{ \item{x}{Character vector. \code{NA} entries will have an \code{NA} hash.} -\item{n_adj}{Number of adjectives to use. It must be between 0 and 3.} +\item{n_adj}{Number of adjectives to use. It must be from 0 through 3.} \item{serialize_version}{Workspace format version to use, see \code{\link[base:serialize]{base::serialize()}}.} @@ -44,7 +44,7 @@ hash of the input, and converts them into an adjective-animal form to create a human readable hash. \subsection{Number of possible hash values}{ -\code{hash_animals()} uses 1748 animal names and +\code{hash_animal()} uses 1748 animal names and 8946 different adjectives. The number of different hashes you can get for different values of \code{n_adj}:\tabular{rr}{ \code{n_adj} \tab size of the hash table space \cr @@ -64,7 +64,7 @@ and in turn from from \url{https://gfycat.com}. } -\code{hash_raw_anima()} calculates the adjective-animal hash of +\code{hash_raw_animal()} calculates the adjective-animal hash of the bytes of a raw vector. \code{hash_obj_animal()} calculates the adjective-animal hash of diff --git a/man/hash_emoji.Rd b/man/hash_emoji.Rd index c1494e0e3..86b6b073f 100644 --- a/man/hash_emoji.Rd +++ b/man/hash_emoji.Rd @@ -16,7 +16,7 @@ hash_obj_emoji(x, size = 3, serialize_version = 2) \item{x}{Character vector. \code{NA} entries will have an \code{NA} hash.} \item{size}{Number of emojis to use in a hash. Currently it has to -be between 1 and 4.} +be from 1 through 4.} \item{serialize_version}{Workspace format version to use, see \code{\link[base:serialize]{base::serialize()}}.} diff --git a/man/hash_md5.Rd b/man/hash_md5.Rd index 686fe6ff7..5c766d3ac 100644 --- a/man/hash_md5.Rd +++ b/man/hash_md5.Rd @@ -43,7 +43,7 @@ of a raw vector. \code{hash_obj_md5()} calculates the MD5 hash of an R object. The object is serialized into a binary vector first. -\code{hash_file_md5()} calcultaes the MD5 hash of one of more +\code{hash_file_md5()} calculates the MD5 hash of one or more files. } \examples{ diff --git a/man/hash_sha1.Rd b/man/hash_sha1.Rd index 405aff071..cda5b6183 100644 --- a/man/hash_sha1.Rd +++ b/man/hash_sha1.Rd @@ -26,7 +26,7 @@ will have an \code{NA} hash.} \item{paths}{Character vector of file names.} } \value{ -\code{hash_sha1()} returns aharacter vector of hexadecimal +\code{hash_sha1()} returns a character vector of hexadecimal SHA-1 hashes. \code{hash_raw_sha1()} returns a character scalar. diff --git a/man/hash_sha256.Rd b/man/hash_sha256.Rd index d90d569a2..959781770 100644 --- a/man/hash_sha256.Rd +++ b/man/hash_sha256.Rd @@ -26,7 +26,7 @@ will have an \code{NA} hash.} \item{paths}{Character vector of file names.} } \value{ -\code{hash_sha256()} returns aharacter vector of hexadecimal +\code{hash_sha256()} returns a character vector of hexadecimal SHA-256 hashes. \code{hash_raw_sha256()} returns a character scalar. diff --git a/man/inline-markup.Rd b/man/inline-markup.Rd index b2c1e5d07..d328e3573 100644 --- a/man/inline-markup.Rd +++ b/man/inline-markup.Rd @@ -67,26 +67,26 @@ The default theme defines the following inline classes: \item \code{email} for an email address. If the terminal supports ANSI hyperlinks (e.g. RStudio, iTerm2, etc.), then cli creates a clickable link. -See \link{links} for more about cli hyperlinks. +See \link{links} for more information about cli hyperlinks. \item \code{emph} for emphasized text. \item \code{envvar} for the name of an environment variable. \item \code{field} for a generic field, e.g. in a named list. \item \code{file} for a file name. If the terminal supports ANSI hyperlinks (e.g. RStudio, iTerm2, etc.), then cli creates a clickable link that opens the file in RStudio or with the default app for the file type. -See \link{links} for more about cli hyperlinks. +See \link{links} for more information about cli hyperlinks. \item \code{fun} for a function name. If it is in the \code{package::function_name} form, and the terminal supports ANSI hyperlinks (e.g. RStudio, iTerm2, etc.), then cli creates a clickable link. -See \link{links} for more about cli hyperlinks. +See \link{links} for more information about cli hyperlinks. \item \code{help} is a help page of a \emph{function}. If the terminal supports ANSI hyperlinks to help pages (e.g. RStudio), then cli creates a clickable link. It supports link text. -See \link{links} for more about cli hyperlinks. +See \link{links} for more information about cli hyperlinks. \item \code{href} creates a hyperlink, potentially with a link text. If the terminal supports ANSI hyperlinks (e.g. RStudio, iTerm2, etc.), then cli creates a clickable link. -See \link{links} for more about cli hyperlinks. +See \link{links} for more information about cli hyperlinks. \item \code{key} for a keyboard key. \item \code{obj_type_friendly} formats the type of an R object in a readable way, and it should be used with \code{{}}, see an example below. @@ -96,23 +96,23 @@ collapsed vectors (see below) from "and" to "or". \item \code{pkg} for a package name. \item \code{run} is an R expression, that is potentially clickable if the terminal supports ANSI hyperlinks to runnable code (e.g. RStudio). -It supports link text. See \link{links} for more about cli hyperlinks. -\item \code{strong} for strong importance. -\item \code{topic} is a help page of a \emph{ropic}. +It supports link text. See \link{links} for more information about cli hyperlinks. +\item \code{str} for a double quoted string escaped by \code{\link[base:encodeString]{base::encodeString()}}.#' * \code{strong} for strong importance. +\item \code{topic} is a help page of a \emph{topic}. If the terminal supports ANSI hyperlinks to help pages (e.g. RStudio), then cli creates a clickable link. It supports link text. -See \link{links} for more about cli hyperlinks. +See \link{links} for more information about cli hyperlinks. \item \code{type} formats the type of an R object in a readable way, and it should be used with \code{{}}, see an example below. \item \code{url} for a URL. If the terminal supports ANSI hyperlinks (e.g. RStudio, iTerm2, etc.), then cli creates a clickable link. -See \link{links} for more about cli hyperlinks. +See \link{links} for more information about cli hyperlinks. \item \code{var} for a variable name. \item \code{val} for a generic "value". \item \code{vignette} is a vignette. If the terminal supports ANSI hyperlinks to help pages (e.g. RStudio), then cli creates a clickable link. It supports link text. -See \link{links} for more about cli hyperlinks. +See \link{links} for more information about cli hyperlinks. } \if{html}{\out{
}}\preformatted{ul <- cli_ul() @@ -267,11 +267,12 @@ All cli commands that emit text support pluralization. Some examples: \if{html}{\out{
}}\preformatted{ndirs <- 1 nfiles <- 13 -cli_alert_info("Found \{ndirs\} diretor\{?y/ies\} and \{nfiles\} file\{?s\}.") +pkgs <- c("pkg1", "pkg2", "pkg3") +cli_alert_info("Found \{ndirs\} director\{?y/ies\} and \{nfiles\} file\{?s\}.") cli_text("Will install \{length(pkgs)\} package\{?s\}: \{.pkg \{pkgs\}\}") }\if{html}{\out{
}}\if{html}{\out{
-#>  Found 1 diretory and 13 files.                                                
+#>  Found 1 directory and 13 files.                                               
 #> Will install 3 packages: pkg1, pkg2, and pkg3                                   
 
}}