wijjit.terminal.ansi.ANSIScreen
- class wijjit.terminal.ansi.ANSIScreen[source]
ANSI screen control codes.
- __init__()
Methods
__init__()Switch back to main screen buffer.
Switch to alternate screen buffer.
clear()Clear entire screen.
Clear current line.
Clear from cursor to end of screen.
Clear from cursor to start of screen.
set_window_title(title)Set the terminal window (and icon) title via OSC 0.
- static clear_to_end()[source]
Clear from cursor to end of screen.
- Returns:
ANSI escape sequence
- Return type:
- static clear_to_start()[source]
Clear from cursor to start of screen.
- Returns:
ANSI escape sequence
- Return type:
- static alternate_buffer_on()[source]
Switch to alternate screen buffer.
- Returns:
ANSI escape sequence
- Return type:
- static alternate_buffer_off()[source]
Switch back to main screen buffer.
- Returns:
ANSI escape sequence
- Return type:
- static set_window_title(title)[source]
Set the terminal window (and icon) title via OSC 0.
OSC 0 sets both the icon name and the window title. The sequence is widely supported across xterm, gnome-terminal, kitty, iTerm2, Windows Terminal, and modern conhost. Embedded control characters and the BEL terminator are stripped from
titleto prevent the sequence from being broken or escaped.