Learn R Programming

terminalgraphics (version 0.1.1)

has_tgp_support: Determine if terminal supports Terminal Graphics Protocol

Description

Determine if terminal supports Terminal Graphics Protocol

Usage

has_tgp_support(warn = FALSE, throw = FALSE)

Value

Returns TRUE if the current terminal supports the Terminal Graphics Protocol and FALSE otherwise. Will also return FALSE when not running in a terminal.

Arguments

warn

show warnings when the protocol is not supported.

throw

throw an error when we are running in a kitty terminal.

Examples

Run this code
if (has_tgp_support()) {
  cat("Yeeh, your terminal supports the terminal graphics protocol!")
}

Run the code above in your browser using DataLab