diff options
Diffstat (limited to 'src/user/highway/highway.c')
-rw-r--r-- | src/user/highway/highway.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/user/highway/highway.c b/src/user/highway/highway.c new file mode 100644 index 0000000..effc131 --- /dev/null +++ b/src/user/highway/highway.c @@ -0,0 +1,21 @@ +#include <knob/user.h> +#include <knob/task.h> +#include <knob/block.h> + +//TODO: load a user environment file containing a PATH-like setting. +//TODO: have an active disk and/or directory + +void main() { + char path_buf[1024 + 4] = "BIN/"; + char *const line_buf = path_buf + 4; + while (1) { + tell_user_sz("> "); + ask_user_line_sz(line_buf, 1023); + if (blockequ(line_buf, "exit", 5)) + return; + if (try_run_command(path_buf)) + yield_task(); + else + tell_user_sz("An error occured trying to run that command.\n"); + } +}
\ No newline at end of file |