git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
documentation update, readme reformatted
[lunaix-os.git]
/
lunaix-os
/
usr
/
sh
/
sh.c
diff --git
a/lunaix-os/usr/sh/sh.c
b/lunaix-os/usr/sh/sh.c
index 5ca47ed093bc0495a25c5dd65558b11676539280..c18b5edc0c435a690e5455bb9b4edf2ee1bce64f 100644
(file)
--- a/
lunaix-os/usr/sh/sh.c
+++ b/
lunaix-os/usr/sh/sh.c
@@
-1,6
+1,6
@@
#include <errno.h>
#include <errno.h>
-#include <
lunaix
/ioctl.h>
-#include <
lunaix/lunaix
.h>
+#include <
sys
/ioctl.h>
+#include <
sys/wait
.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
@@
-182,7
+182,7
@@
sh_loop()
while (1) {
getcwd(pwd, 512);
while (1) {
getcwd(pwd, 512);
- printf("
[%s]$
", pwd);
+ printf("
%s #
", pwd);
int sz = read(stdin, buf, 511);
if (sz < 0) {
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)) {
// currently, this shell only support single argument
if (!parse_cmdline(buf, argv)) {
- printf("\n");
- goto cont;
+ continue;
}
// cmd=="exit"
}
// cmd=="exit"
@@
-204,9
+203,7
@@
sh_loop()
break;
}
break;
}
- sh_exec((const char**)argv);
- cont:
- printf("\n");
+ sh_exec((const char**)argv);
}
}
}
}