parse | pipe lines.

This commit is contained in:
Kelvin Sherlock
2016-07-26 14:20:11 -04:00
parent 2fdca6ea9d
commit 0524d10590
4 changed files with 36 additions and 9 deletions

View File

@@ -372,7 +372,7 @@ int break_command::execute(Environment &env, const fdmask &fds, bool throwup) {
env.echo("%s", s.c_str());
if (!env.loop()) {
fputs("MPW Shell - Break must be within for or loop.\n", stderr);
fputs("### MPW Shell - Break must be within for or loop.\n", stderr);
return env.status(-3, throwup);
}
@@ -394,7 +394,7 @@ int continue_command::execute(Environment &env, const fdmask &fds, bool throwup)
env.echo("%s", s.c_str());
if (!env.loop()) {
fputs("MPW Shell - Continue must be within for or loop.\n", stderr);
fputs("### MPW Shell - Continue must be within for or loop.\n", stderr);
return env.status(-3, throwup);
}
@@ -433,6 +433,13 @@ int and_command::execute(Environment &e, const fdmask &fds, bool throwup) {
}
int pipe_command::execute(Environment &e, const fdmask &fds, bool throwup) {
// not yet supported!
fputs( "### MPW Shell - Pipes are not yet supported.\n", stderr);
return e.status(1, throwup);
}
int vector_command::execute(Environment &e, const fdmask &fds, bool throwup) {
int rv = 0;