From 35a3b9ccfeb9dcd2c88c359108305b7f750622d6 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 14 Aug 2025 17:02:19 +0200 Subject: 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). --- src/eval.zig | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/eval.zig') 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); }, } } -- cgit v1.2.1