summaryrefslogtreecommitdiff
path: root/src/user/highway/line.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/highway/line.c')
-rw-r--r--src/user/highway/line.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/user/highway/line.c b/src/user/highway/line.c
index 40dccfa..b5a54c5 100644
--- a/src/user/highway/line.c
+++ b/src/user/highway/line.c
@@ -57,25 +57,28 @@ void run_line(const char *original_line) {
const char *space;
for (space = line; *space && (*space != ' '); ++space)
;
- if (blockequ(line, "source", space - line))
+ if (blockequ(line, "source ", 7))
source(space + 1);
- else if (blockequ(line, "set", space - line))
+ else if (blockequ(line, "set ", 4))
set(space + 1);
- else if (blockequ(line, "echo", space - line)) {
+ else if (blockequ(line, "echo ", 5)) {
tell_user_sz(space + 1);
tell_user_sz("\n");
}
- else if (blockequ(line, "vars", space - line))
+ else if (blockequ(line, "vars", 5))
dump_vars();
- else if (blockequ(line, "quit", space - line))
+ else if (blockequ(line, "quit", 5))
__pcrt_quit();
- else if (blockequ(line, "help", space - line))
+ else if (blockequ(line, "clear", 6))
+ _clear_screen();
+ else if (blockequ(line, "help", 5))
tell_user_sz("Highway is a command shell for Portland OS. It includes variables and a couple\n"
"of pseudo-commands. Variables are addressed by surrounding with \"$\". The\n"
"following list shows each of the pseudo-commands.\n\n"
" source FILE run each command in FILE\n"
- " set VAR VALUE set $VAR$ to VALUE\n"
+ " clear clear the screen\n"
" echo STRING print STRING\n"
+ " set VAR VALUE set $VAR$ to VALUE\n"
" vars dump variables\n"
" quit exit highway\n"
" help show this\n");