File: cli_verbatim.Rd

package info (click to toggle)
r-cran-cli 3.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,288 kB
  • sloc: ansic: 16,412; cpp: 37; sh: 13; makefile: 2
file content (48 lines) | stat: -rw-r--r-- 1,741 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cli.R
\name{cli_verbatim}
\alias{cli_verbatim}
\title{CLI verbatim text}
\usage{
cli_verbatim(..., .envir = parent.frame())
}
\arguments{
\item{...}{The text to show, in character vectors. Each element is
printed on a new line.}

\item{.envir}{Environment to evaluate the glue expressions in.}
}
\description{
It is not wrapped, but printed as is. Long lines will overflow.
No glue substitution is performed on verbatim text.
}
\details{
\subsection{Line breaks}{

\if{html}{\out{<div class="sourceCode r">}}\preformatted{cli_verbatim("This has\\nthree\\nlines,")
}\if{html}{\out{</div>}}\if{html}{\out{
<div class="asciicast" style="color: #172431;font-family: 'Fira Code',Monaco,Consolas,Menlo,'Bitstream Vera Sans Mono','Powerline Symbols',monospace;line-height: 1.300000"><pre>
#> This has                                                                        
#> three                                                                           
#> lines,                                                                          
</pre></div>
}}

}

\subsection{Special characters}{

No glue substitution happens here.

\if{html}{\out{<div class="sourceCode r">}}\preformatted{cli_verbatim("No string \{interpolation\} or \{.emph styling\} here")
}\if{html}{\out{</div>}}\if{html}{\out{
<div class="asciicast" style="color: #172431;font-family: 'Fira Code',Monaco,Consolas,Menlo,'Bitstream Vera Sans Mono','Powerline Symbols',monospace;line-height: 1.300000"><pre>
#> No string \{interpolation\} or \{.emph styling\} here                               
</pre></div>
}}

}
}
\seealso{
\code{\link[=cli_code]{cli_code()}} for printing R or other source code.
}