Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

terminalContext

Retrieve Information about RStudio Terminals


Description

Returns information about RStudio terminal instances.

Usage

terminalContext(id)

Arguments

id

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

Value

A list with elements:

handle the internal handle
caption caption
title title set by the shell
working_dir working directory
shell shell type
running is terminal process executing
busy is terminal running a program
exit_code process exit code or NULL
connection websockets or rpc
sequence creation sequence
lines lines of text in terminal buffer
cols columns in terminal
rows rows in terminal
pid process id of terminal shell
full_screen full screen program running

Note

The terminalContext function was added in version 1.1.350 of RStudio.

Examples

## Not run: 
termId <- rstudioapi::terminalCreate("example", show = FALSE)
View(rstudioapi::terminalContext(termId))


## End(Not run)

rstudioapi

Safely Access the RStudio API

v0.13
MIT + file LICENSE
Authors
Kevin Ushey [aut, cre], JJ Allaire [aut], Hadley Wickham [aut], Gary Ritchie [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.