Execute a command, showing results in the terminal pane.
Usage
terminalExecute(command, workingDir = NULL, env = character(), show = TRUE)Examples
if (FALSE) { # \dontrun{
termId <- rstudioapi::terminalExecute(
command = 'echo $HELLO && echo $WORLD',
workingDir = '/usr/local',
env = c('HELLO=WORLD', 'WORLD=EARTH'),
show = FALSE)
while (is.null(rstudioapi::terminalExitCode(termId))) {
Sys.sleep(0.1)
}
result <- terminalBuffer(termId)
terminalKill(termId)
print(result)
} # }