module
Opal::Terminal::OSC
Overview
Operating System Command (OSC) escape sequences for modern terminal emulators.
Defined in:
opal/terminal/osc.crClass Method Summary
-
.clipboard_copy(text : String, target : Char = 'c') : String
Generates an OSC 52 clipboard copy escape sequence using strict Base64 encoding.
-
.copy_to_clipboard(text : String, io : IO = STDOUT, target : Char = 'c') : Nil
Directly copies text to the system clipboard via STDOUT using OSC 52.
-
.hyperlink(text : String, url : String, id : String | Nil = nil) : String
Generates an OSC 8 clickable hyperlink escape sequence.
Class Method Detail
def self.clipboard_copy(text : String, target : Char = 'c') : String
#
Generates an OSC 52 clipboard copy escape sequence using strict Base64 encoding. Allows copying text directly into the host OS clipboard over SSH and local terminal sessions. clipboard target: 'c' = primary clipboard, 'p' = selection clipboard
Directly copies text to the system clipboard via STDOUT using OSC 52.
def self.hyperlink(text : String, url : String, id : String | Nil = nil) : String
#
Generates an OSC 8 clickable hyperlink escape sequence. Supported by Windows Terminal, iTerm2, Kitty, WezTerm, Alacritty, GNOME Terminal, etc.