terminalClear: Clear Terminal Buffer

View source: R/terminal.R

terminalClearR Documentation

Clear Terminal Buffer

Description

Clears the buffer for specified terminal.

Usage

terminalClear(id)

Arguments

id

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

Note

The terminalClear function was added in version 1.1.350 of RStudio.

Examples


## Not run: 
termId <- rstudioapi::terminalCreate()
rstudioapi::terminalSend(termId, 'ls -l\n')
Sys.sleep(3)
rstudioapi::terminalClear(termId)

## End(Not run)



rstudioapi documentation built on July 9, 2023, 6:59 p.m.