aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index 482508f..b543683 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -693,6 +693,15 @@ static bool print_cmd(const char *key, void *value, void *data) {
return text_appendf(data, " %-30s %s\n", usage, help ? help : "");
}
+static bool print_cmd_name(const char *key, void *value, void *data) {
+ CommandDef *cmd = value;
+ return buffer_appendf(data, "%s\n", cmd->name);
+}
+
+void vis_print_cmds(Vis *vis, Buffer *buf) {
+ map_iterate(vis->cmds, print_cmd_name, buf);
+}
+
static bool print_option(const char *key, void *value, void *txt) {
char desc[256];
const OptionDef *opt = value;