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.
# NOT RUN {
termId <- rstudioapi::terminalCreate()
rstudioapi::terminalSend(termId, 'ls -l\n')
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab