diff options
| -rw-r--r-- | src/host/Console.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/host/Console.zig b/src/host/Console.zig index b1915bb..6fdfba4 100644 --- a/src/host/Console.zig +++ b/src/host/Console.zig @@ -224,15 +224,17 @@ pub fn execute(self: *Console, host: *Host, line: []const u8, now: u64) ![]const } var buf: [Line.width + 3]u8 = undefined; var w: std.Io.Writer = .fixed(&buf); + // Names only, so the sketch's help fits the log below them. + w.writeAll("help VERB says more:") catch {}; for (std.enums.values(Verb)) |v| { - if (w.end + @tagName(v).len + verbs.get(v).args.len + 3 > Line.width) { + if (w.end + @tagName(v).len + 1 > Line.width) { self.log(w.buffered()); w.end = 0; } - w.print("{s}{t}{s}{s}", .{ if (w.end == 0) "" else " | ", v, if (verbs.get(v).args.len == 0) "" else " ", verbs.get(v).args }) catch {}; + w.print(" {t}", .{v}) catch {}; } self.log(w.buffered()); - if (host.forward(self, line, now) == .unknown) self.log("help VERB says what one does. Backtick hides the console. Tab completes."); + if (host.forward(self, line, now) == .unknown) self.log("Backtick hides the console. Tab completes."); }, .overlay => { const name = arg orelse return error.ExpectedOverlay; |
