diff options
author | Benji Dial <benji6283@gmail.com> | 2020-09-13 22:06:40 -0400 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2020-09-13 22:06:40 -0400 |
commit | 44d29a33df81ac07163d5146a9e43a0c4fb80af0 (patch) | |
tree | 94d4fb506a80d73cb53dc9ea66dfc952d7a9432a /src/user/highway/main.c | |
parent | 143156f63e2448733f1a35a74e629fe0ae9bb567 (diff) | |
download | portland-os-44d29a33df81ac07163d5146a9e43a0c4fb80af0.tar.gz |
new shell
Diffstat (limited to 'src/user/highway/main.c')
-rw-r--r-- | src/user/highway/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/user/highway/main.c b/src/user/highway/main.c new file mode 100644 index 0000000..1934920 --- /dev/null +++ b/src/user/highway/main.c @@ -0,0 +1,16 @@ +#include <knob/user.h> +#include <knob/task.h> +#include "cmds.h" +#include "line.h" + +void main(const char *arg) { + source(*arg ? arg : "user/default.rc"); + char cmd_buf[128]; + yield_task(); + tell_user_sz("Portland Highway\nType \"help\" for help.\n"); + while (1) { + tell_user_sz("> "); + ask_user_line_sz(cmd_buf, 127); + run_line(cmd_buf); + } +}
\ No newline at end of file |