3 ms·
the full monty: alias c='echo -e "\033c" ; stty sane; setterm -reset; reset; tput reset; clear' doesn't only clear the screen, but also escape any "broken" ter
by adren123 7y ago
the full monty:
alias c='echo -e "\033c" ; stty sane; setterm -reset; reset; tput reset; clear'
doesn't only clear the screen, but also escape any "broken" terminal configuration such as output of a binary on the tty
- Fnoord 7y agosetterm does not work on macOS. I find reset(1) working fine. It already does clear, too.
- JdeBP 7y agoOne of these days, someone will take my portable setterm, which compiles fine on FreeBSD, and compile it on MacOS. (-: * http://jdebp.uk./Softwares/nosh/guide/commands/setterm.xml http://jdebp.uk./Softwares/nosh/guide/commands/setterm.xml
- JdeBP 7y agoOne can spot cargo cult command-line use when two pairs of the commands overlap functionally, and another triplet is the same program by different names. Also note that RIS is a bad idea, discouraged since 1983 I recently discovered, although DEC did not think to tell people outside DEC this for half a decade. Use DECSTR.