File: terminalContext.Rd

package info (click to toggle)
r-cran-rstudioapi 0.14-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 892 kB
  • sloc: makefile: 2
file content (43 lines) | stat: -rw-r--r-- 1,435 bytes parent folder | download | duplicates (3)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/terminal.R
\name{terminalContext}
\alias{terminalContext}
\title{Retrieve Information about RStudio Terminals}
\usage{
terminalContext(id)
}
\arguments{
\item{id}{The terminal id. The \code{id} is obtained from
\code{\link{terminalList}()}, \code{\link{terminalVisible}()},
\code{\link{terminalCreate}()}, or \code{\link{terminalExecute}()}.}
}
\value{
A \code{list} with elements: \tabular{ll}{ \code{handle} \tab the
internal handle\cr \code{caption} \tab caption\cr \code{title} \tab title
set by the shell\cr \code{working_dir} \tab working directory\cr
\code{shell} \tab shell type\cr \code{running} \tab is terminal process
executing\cr \code{busy} \tab is terminal running a program\cr
\code{exit_code} \tab process exit code or NULL\cr \code{connection} \tab
websockets or rpc\cr \code{sequence} \tab creation sequence\cr \code{lines}
\tab lines of text in terminal buffer\cr \code{cols} \tab columns in
terminal\cr \code{rows} \tab rows in terminal\cr \code{pid} \tab process id
of terminal shell\cr \code{full_screen} \tab full screen program running\cr
}
}
\description{
Returns information about RStudio terminal instances.
}
\note{
The \code{terminalContext} function was added in version 1.1.350 of
RStudio.
}
\examples{

\dontrun{
termId <- rstudioapi::terminalCreate("example", show = FALSE)
View(rstudioapi::terminalContext(termId))

}


}