Expand description
Terminal control sequence generation — cursor movement, screen, titles, bells.
Terminal control sequence generation — equivalent to Rich’s control.py.
Provides a unified Control type for composing terminal escape sequences:
cursor movement, screen manipulation, window titles, and bells. Individual
control codes can be combined and rendered as ANSI escape sequences.
§Quick Example
use rusty_rich::control::{Control, control_bell, control_home};
let bell = control_bell();
assert_eq!(bell.to_ansi(), "\x07");
let combined = Control::new(&["\x1b[H", "\x1b[2J"]);Structs§
- Control
- A composable terminal control sequence.
Functions§
- control_
bell - Ring the terminal bell.
- control_
clear - Clear the entire screen.
- control_
home - Move cursor to home position.
- control_
move_ to - Move cursor to an absolute position.
- control_
show_ cursor - Show or hide the cursor.
- control_
title - Set terminal window title.
- escape_
control_ codes - Escape control characters in a string, replacing them with visible
representations like
\\a,\\b, etc. - strip_
control_ codes - Strip control characters (bell, backspace, vertical tab, form feed) from a string.