Add: begin shell with help command
This commit is contained in:
24
src/kernel/shell.c
Normal file
24
src/kernel/shell.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "system.h"
|
||||
#include "../libc/stdio.h"
|
||||
#include "../libc/string.h"
|
||||
|
||||
#define BUFFER_SIZE 256
|
||||
|
||||
void shell_install()
|
||||
{
|
||||
while (1) // Bad!!
|
||||
{
|
||||
char input_buffer[BUFFER_SIZE];
|
||||
colorputs("blankos> ", 9);
|
||||
get_input(input_buffer, BUFFER_SIZE);
|
||||
printf("\n");
|
||||
|
||||
// Childish shell
|
||||
|
||||
if (strcmp(input_buffer, "help") == 0)
|
||||
{
|
||||
printf("This is the Blank Operating System\ndesigned for fun by xamidev\n\nCommand help:\n\n\thelp - shows this message\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user