News for hackers. Stuff that matters.
Re:Clear Your Terminal in Style by ranger207 on Thursday March 05, 2020 @02:26PM (#22497126)
printf "\033c"? I don't know if it resets, but it does clear the scroll buffer. I use it before compiling (printf "\033c"; make) so that I don't have to search for the first error or warning, I can just scroll all the way up.
Re:Clear Your Terminal in Style by 3xblah on Thursday March 05, 2020 @04:16PM (#22498378)
Can substitute a forward slash for the 0 and remove the quotes

   printf \\33c
Another way is to use a program that converts hex to binary. A short script to use when there is no clear, tput, etc, e.g., xxd or nc-data

   exec echo 1b63 |exec xxd -p -r

   echo -e '27\n99\n' |exec nc-data -g

   exec echo |exec sed '1i\
   27 \
   99 

   ' |exec nc-data -g
Re:Clear Your Terminal in Style by teddyh on Thursday March 05, 2020 @05:25PM (#22499007)
\ is a backslash

/ is a forward slash, a.k.a. simply “slash”

Re:Clear Your Terminal in Style by 3xblah on Thursday March 05, 2020 @06:56PM (#22499740)
Not sure why I always get this wrong. Maybe it is because when I draw these characters on a surface, I start from the top not the bottom. Hence the line goes forward for a "backslash" and backward for a "forward slash". What is the etymology of these terms?

Probably better to just use "escape" for backslash and "slash" for forward slash.

Re:Clear Your Terminal in Style by JdeBP on Friday March 06, 2020 @10:28AM (#22504278)
As I said elsewhere in this discussion, use DECSTR instead of RIS unless you really need all of the things that RIS does to actual terminals, like performing selftests and resetting the serial connection. Habitual use of RIS is a bad habit to get into.
Re:Clear Your Terminal in Style by samatman on Thursday March 05, 2020 @03:22PM (#22497735)
On iTerm, that clears everything visible on the screen, but not the scroll history.

Sounds like your terminal clears everything? vt100 variants are a, uh, delightful mix of nearly-compatible dialects...