clear als Builtin-Kommando in shell. Nichts weltbewegendes ;)
diff --git a/trunk/src/modules/c/shell/commmands.c b/trunk/src/modules/c/shell/commmands.c index f1438eb..1ce37a6 100644 --- a/trunk/src/modules/c/shell/commmands.c +++ b/trunk/src/modules/c/shell/commmands.c @@ -243,3 +243,10 @@ int shell_command_source(int argc, char* argv[], const char* args) } } +int shell_command_clear(int argc, char* argv[], const char* args) +{ + printf("\033[1;1H\033[2J"); + + return 0; +} + diff --git a/trunk/src/modules/c/shell/shell.c b/trunk/src/modules/c/shell/shell.c index 25ec1ba..9470fe5 100644 --- a/trunk/src/modules/c/shell/shell.c +++ b/trunk/src/modules/c/shell/shell.c @@ -75,6 +75,7 @@ shell_command_t shell_commands[] = { {"cd", &shell_command_cd}, {"set", &shell_command_set}, {"source", &shell_command_source}, + {"clear", &shell_command_clear}, #ifdef CONFIG_SHELL_BUILTIN_ONLY {"bincat", &shell_command_bincat}, {"cat", &shell_command_cat}, diff --git a/trunk/src/modules/c/shell/shell.h b/trunk/src/modules/c/shell/shell.h index 5564ee8..53a757d 100644 --- a/trunk/src/modules/c/shell/shell.h +++ b/trunk/src/modules/c/shell/shell.h @@ -57,6 +57,7 @@ int shell_command_start(int argc, char* argv[], const char* args); int shell_command_cd(int argc, char* argv[], const char* args); int shell_command_set(int argc, char* argv[], const char* args); int shell_command_source(int argc, char* argv[], const char* args); +int shell_command_clear(int argc, char* argv[], const char* args); #include <lost/config.h>
Attachment:
signature.asc
Description: This is a digitally signed message part.