Crystal command to clear the current terminal

Hi guys, I was wondering if there is any function in the crystal API to clear the current terminal screen ? Like the clear command with bash ?

print "\033c"
# or
print "\x1Bc"
1 Like

If you are using tput you can use tput.clear

Since this is roughly the same answer as when you asked about hiding/showing the cursor: go look at tput, it does all the things you want to do with the terminal :-D

2 Likes