Module: TuiTui::Ansi
- Defined in:
- lib/tui_tui/ansi.rb
Overview
Raw VT/ANSI escape sequences as plain strings.
Constant Summary collapse
- ALT_ON =
enter alternate screen buffer
"\e[?1049h"- ALT_OFF =
leave it, restoring the user’s scrollback
"\e[?1049l"- HIDE =
hide the cursor
"\e[?25l"- SHOW =
show it again
"\e[?25h"- CLEAR =
clear the whole screen
"\e[2J"- CLEAR_LINE =
clear the current line
"\e[2K"- HOME =
move to row 1, col 1
"\e[H"- RESET =
reset all SGR attributes
"\e[0m"- MOUSE_ON =
Mouse reporting: 1002 = button-event tracking 1006 = SGR extended coordinates
"\e[?1002h\e[?1006h"- MOUSE_OFF =
"\e[?1006l\e[?1002l"
Class Method Summary collapse
-
.clipboard(text) ⇒ Object
OSC 52: set the terminal clipboard to ‘text` (base64-encoded).
- .move(row, col) ⇒ Object
Class Method Details
.clipboard(text) ⇒ Object
OSC 52: set the terminal clipboard to ‘text` (base64-encoded).
32 |
# File 'lib/tui_tui/ansi.rb', line 32 def self.clipboard(text) = "\e]52;c;#{[text].pack("m0")}\a" |
.move(row, col) ⇒ Object
29 |
# File 'lib/tui_tui/ansi.rb', line 29 def self.move(row, col) = "\e[#{row};#{col}H" |