Skip to content

nodef/cls.sh

Repository files navigation

Clear screen and scrollback on Linux.
🐚 Bash, 📜 Files.

cls (similar to clear in Unix-like systems) is a builtin command in Windows Command prompt, which clears the screen and scrollback (entire screen buffer), and resets the cursor to the top-left corner of the screen. The cls command actually has its origins in BASIC. This package provides the same behaviour as mentioned above on Linux (with bash shell). I often prefer this instead of clear when the output of a command is long. You can install this with npm install -g cls.sh.

Stability: Experimental.


# Clear screen, reset cursor, clear scrollback
$ cls


References:



ORG DOI