Learn R Programming

rstudioapi (version 0.17.0)

terminalContext: Retrieve Information about RStudio Terminals

Description

Returns information about RStudio terminal instances.

Usage

terminalContext(id)

Value

A list with elements:

handlethe internal handle
captioncaption
titletitle set by the shell
working_dirworking directory
shellshell type
runningis terminal process executing
busyis terminal running a program
exit_codeprocess exit code or NULL
connectionwebsockets or rpc
sequencecreation sequence
lineslines of text in terminal buffer
colscolumns in terminal
rowsrows in terminal
pidprocess id of terminal shell
full_screenfull screen program running

Arguments

id

The terminal id. The id is obtained from terminalList(), terminalVisible(), terminalCreate(), or terminalExecute().

Examples

Run this code

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

}


Run the code above in your browser using DataLab