summaryrefslogtreecommitdiff
path: root/src/cmd/move.zig
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2025-08-16 12:50:23 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2025-08-16 12:50:23 +0200
commit9edc1338b92d1ead4c5f2fad8c0516037963f7b6 (patch)
tree64f3ed617771f9327bd49e3732adb9271e3559cc /src/cmd/move.zig
parent754a74da6052c9f5e8dc4a536c58ccc11cb66369 (diff)
Unify output handling.
Now every command always uses an OutputWriter instead of conditionally writing directly to stdout using std.debug.print.
Diffstat (limited to 'src/cmd/move.zig')
-rw-r--r--src/cmd/move.zig8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cmd/move.zig b/src/cmd/move.zig
index 40e745d..557566f 100644
--- a/src/cmd/move.zig
+++ b/src/cmd/move.zig
@@ -1,6 +1,5 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
-const print = std.debug.print;
const types = @import("./lib/types.zig");
const CommandStatus = types.CommandStatus;
@@ -11,11 +10,8 @@ pub const Move = struct {
_ = move;
const error_msg = "MOVE command not yet implemented\n";
- if (ctx.output_capture) |capture| {
- try capture.write(error_msg);
- } else {
- print("{s}", .{error_msg});
- }
+ var writer = ctx.output_writer;
+ try writer.write(error_msg);
return CommandStatus{ .Code = 1 };
}
};