summaryrefslogtreecommitdiff
path: root/src/eval.zig
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2025-08-14 17:02:19 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2025-08-14 17:02:19 +0200
commit35a3b9ccfeb9dcd2c88c359108305b7f750622d6 (patch)
treeedb81a2398cf239741c5501a6135b35750054c03 /src/eval.zig
parent63f7353b630c3eb5a6c60118418923b4b358e670 (diff)
Add pipe handling.
It is still buggy when combined with redirections, but it is a start (and I do not know whether combining pipes with redirections is supported by COMMAND.COM in the first place and what the semantics are if so).
Diffstat (limited to 'src/eval.zig')
-rw-r--r--src/eval.zig10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/eval.zig b/src/eval.zig
index 9399c75..a689837 100644
--- a/src/eval.zig
+++ b/src/eval.zig
@@ -128,14 +128,8 @@ pub fn executeCommandWithOutput(command: Command, allocator: Allocator, output_c
return redirect.eval(allocator, output_capture, input_source, executeCommandWithOutput);
},
- else => {
- const error_msg = "Command type not implemented\n";
- if (output_capture) |capture| {
- try capture.write(error_msg);
- } else {
- print("{s}", .{error_msg});
- }
- return CommandStatus{ .Code = 1 };
+ .Pipe => |pipe| {
+ return pipe.eval(allocator, output_capture, input_source, executeCommandWithOutput);
},
}
}