Invisible link to canonical for Microformats

control (slug.term)


slug.term.control

slug.term.control — terminal control sequences

Utilities for clearing the terminal display. These functions print ANSI escape sequences directly to stdout via print.

TOC

Functions

clear()

fn slug.term.control#clear() -> ?

clears the terminal screen and moves the cursor to the top-left.

Equivalent to the clear shell command. Does not clear the scrollback buffer.


clearAll()

fn slug.term.control#clearAll() -> ?

clears the terminal screen, scrollback buffer, and moves the cursor to the top-left.

More thorough than clear — also wipes the scrollback history visible when scrolling up in the terminal.