Send text to an existing terminal.
terminalSend(id, text)
The terminal id. The id
is obtained from
terminalList()
, terminalVisible()
,
terminalCreate()
, or terminalExecute()
.
Character vector containing text to be inserted.
The terminalSend
function was added in version 1.1.350 of
RStudio.
if (FALSE) {
termId <- rstudioapi::terminalCreate()
rstudioapi::terminalSend(termId, 'ls -l\n')
}