toybox/toys/other/clear.c
<<
>>
Prefs
   1/* clear.c - clear the screen
   2 *
   3 * Copyright 2012 Rob Landley <rob@landley.net>
   4
   5USE_CLEAR(NEWTOY(clear, NULL, TOYFLAG_USR|TOYFLAG_BIN))
   6
   7config CLEAR
   8  bool "clear"
   9  default y
  10  help
  11    Clear the screen.
  12*/
  13
  14#include "toys.h"
  15
  16void clear_main(void)
  17{
  18  printf("\e[2J\e[H");
  19}
  20