diff --git a/README.md b/README.md index dc15387..f5d9b62 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ project which tries to follow the Unix principles (sheesh, yet another POSIX OS?) and is loosely inspired by stuff like Linux, BSD and other *nixes I've laid my hands on so far. +![alt text](doc/demo0.png "Demo") + Building -------- diff --git a/doc/demo0.png b/doc/demo0.png new file mode 100644 index 0000000..d14615a Binary files /dev/null and b/doc/demo0.png differ diff --git a/usr/init.c b/usr/init.c index 8e2020e..f4ee9e7 100644 --- a/usr/init.c +++ b/usr/init.c @@ -38,6 +38,7 @@ static int b_cat(const char *path); static int b_curs(const char *arg); static int b_sleep(const char *arg); static int b_help(const char *arg); +static int b_clear(const char *arg); static struct builtin builtins[] = { { @@ -70,6 +71,11 @@ static struct builtin builtins[] = { "Sleep N seconds", b_sleep }, + { + "clear", + "Clear terminal", + b_clear, + }, { "help", "Please help me", @@ -214,6 +220,12 @@ static int b_sleep(const char *arg) { return 0; } +static int b_clear(const char *arg) { + clear(); + curs_set(1, 1); + return 0; +} + static int b_help(const char *arg) { if (arg) { // Describe a specific command