rstudioapi (version 0.7)

terminalSend: Send Text to a Terminal

Description

Send text to an existing terminal.

Usage

terminalSend(id, text)

Arguments

id

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

text

Character vector containing text to be inserted.

Examples

Run this code
# NOT RUN {
termId <- rstudioapi::terminalCreate()
rstudioapi::terminalSend(termId, 'ls -l\n')
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace