summaryrefslogtreecommitdiff
path: root/tools/eos-profile-tool/eos-profile-cmd-help.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eos-profile-tool/eos-profile-cmd-help.c')
-rw-r--r--tools/eos-profile-tool/eos-profile-cmd-help.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/tools/eos-profile-tool/eos-profile-cmd-help.c b/tools/eos-profile-tool/eos-profile-cmd-help.c
index 754714f..f81102d 100644
--- a/tools/eos-profile-tool/eos-profile-cmd-help.c
+++ b/tools/eos-profile-tool/eos-profile-cmd-help.c
@@ -9,20 +9,33 @@ eos_profile_cmd_help_parse_args (int argc,
return TRUE;
}
+static gboolean
+print_available_commands (const EosProfileCmd *cmd,
+ gpointer dummy G_GNUC_UNUSED)
+{
+ g_print (" %s%*s%s\n",
+ cmd->name,
+ 14 - strlen (cmd->name), " ",
+ cmd->description);
+
+ return FALSE;
+}
+
int
eos_profile_cmd_help_main (void)
{
g_print (
"eos-profile\n"
"\n"
- "Usage: eos-profile <COMMAND> [OPTIONS...]\n"
+ "Usage: eos-profile <COMMAND> [OPTION…]\n"
"\n"
- "Examples:\n"
- "\n"
- " eos-profile help - This help screen\n"
- " eos-profile show FILE - Shows a capture file\n"
+ "COMMANDS\n"
"\n"
);
+ eos_profile_foreach_cmd (print_available_commands, NULL);
+
+ g_print ("\n");
+
return 0;
}