X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/bffa3430fbbaaad29bec0b5bee9c1f0bfc7fd068..b1644f824d7f4989a94b8a752aadee26cae25069:/lunaix-os/usr/sh/sh.c diff --git a/lunaix-os/usr/sh/sh.c b/lunaix-os/usr/sh/sh.c index 5ca47ed..c18b5ed 100644 --- a/lunaix-os/usr/sh/sh.c +++ b/lunaix-os/usr/sh/sh.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include #include #include @@ -182,7 +182,7 @@ sh_loop() while (1) { getcwd(pwd, 512); - printf("[%s]$ ", pwd); + printf("%s # ", pwd); int sz = read(stdin, buf, 511); if (sz < 0) { @@ -195,8 +195,7 @@ sh_loop() // currently, this shell only support single argument if (!parse_cmdline(buf, argv)) { - printf("\n"); - goto cont; + continue; } // cmd=="exit" @@ -204,9 +203,7 @@ sh_loop() break; } - sh_exec((const char**)argv); - cont: - printf("\n"); + sh_exec((const char**)argv); } }