summaryrefslogtreecommitdiff
path: root/src/Output.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Output.zig')
-rw-r--r--src/Output.zig17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Output.zig b/src/Output.zig
index bd8c79c0..37865fd8 100644
--- a/src/Output.zig
+++ b/src/Output.zig
@@ -898,6 +898,23 @@ fn helpContent(p: *const Pardes, gpa: std.mem.Allocator, prefix: []const u8) ![]
if (!builtins.registry.here(p, row.cmd)) continue;
try w.print("{s}\n", .{row.line});
}
+ // An addon's words, after the core's, each saying whose it is.
+ for (pardes.Kind.wordsOf()) |kw| {
+ const path = if (kw.w.leader == null) "" else std.mem.span(kw.w.leader);
+ if (!std.mem.startsWith(u8, path, prefix) or (prefix.len > 0 and path.len == 0)) continue;
+ var keys: [64]u8 = undefined;
+ var n: usize = 0;
+ if (path.len > 0) for ("SPC") |ch| {
+ keys[n] = ch;
+ n += 1;
+ };
+ for (path) |ch| if (n + 2 <= keys.len) {
+ keys[n] = ' ';
+ keys[n + 1] = ch;
+ n += 2;
+ };
+ try w.print("{s: <12}{s} {s} (addon {s})\n", .{ keys[0..n], std.mem.span(kw.w.name), if (kw.w.doc == null) "" else std.mem.span(kw.w.doc), pardes.Kind.headName(kw.ops) });
+ }
if (show_calls_help) try w.writeAll(calls_help);
if (prefix.len == 0) try w.writeAll(language_footer);
// The paths that run a builtin with a word (config.leader_args), and how