diff options
| author | Nathan P. Reiner <nathan@nathanreiner.xyz> | 2022-12-16 09:33:11 +0100 |
|---|---|---|
| committer | Nathan P. Reiner <nathan@nathanreiner.xyz> | 2022-12-16 09:33:11 +0100 |
| commit | 10c4a9af585869da2d26c136c49cc79f2ca45e50 (patch) | |
| tree | 9ac955df56f1bf3e245312f5e370bd287f32d0bf /smash/builtin.c | |
| parent | d29b2c8af98f34745eca362fb1d65002170e7156 (diff) | |
implement wstdf
Diffstat (limited to 'smash/builtin.c')
| -rw-r--r-- | smash/builtin.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/smash/builtin.c b/smash/builtin.c index 63a4013..a5bbd17 100644 --- a/smash/builtin.c +++ b/smash/builtin.c @@ -4,6 +4,7 @@ #include "../lib/cstr/cstr.h" #include "../lib/sys/io.h" #include "../lib/sys/chdir.h" +#include "../lib/io/io.h" u64 __find_builtin_function_by_name(const char *name); @@ -32,7 +33,7 @@ int __builtin_fn_exit(int argc, const char **argv) int __builtin_fn_cd(int argc, const char **argv) { if (argc != 2) { - write(STDOUT_FD, "path missing\n", 9); + wstd("cd [path]\n"); return -1; } @@ -41,8 +42,14 @@ int __builtin_fn_cd(int argc, const char **argv) int __builtin_fn_help(int argc, const char **argv) { - write(STDOUT_FD, "This is the help page...\n", 25); - write(STDOUT_FD, "TODO: help page\n", 16); + wstdf("%s\n%s\n\n%s\n%s\n\n%s\n", + "Welcome to smash [ \033[1msma\033[0mll \033[1msh\033[0mell ].", + "\033[2mDon't blame me if it doesn't work, it's definitly a skill issue!\033[0m", + "Syntax:", + " command [args] | command [args] | ... | command [args]", + "Author Nathan P. Reiner <nathan@nathanreiner.xyz>" + ); + return 0; } |