Learn R Programming

rstudioapi (version 0.17.0)

terminalCreate: Create a Terminal

Description

Create a new Terminal.

Usage

terminalCreate(caption = NULL, show = TRUE, shellType = NULL)

Value

The terminal identifier as a character vector (NULL if unable to create the terminal or the given terminal caption is already in use).

Arguments

caption

The desired terminal caption. When NULL or blank, the terminal caption will be chosen by the system.

show

If FALSE, terminal won't be brought to front.

shellType

Shell type for the terminal: NULL or "default" to use the shell selected in Global Options. For Microsoft Windows, alternatives are "win-cmd" for 64-bit Command Prompt, "win-ps" for 64-bit PowerShell, "win-git-bash" for Git Bash, or "win-wsl-bash" for Bash on Windows Subsystem for Linux. On Linux, Mac, and RStudio Server "custom" will use the custom terminal defined in Global Options. If the requested shell type is not available, the default shell will be used, instead.

Examples

Run this code

if (FALSE) {
termId <- rstudioapi::terminalCreate('My Terminal')
}


Run the code above in your browser using DataLab