From 22e14d7f8eb40838a0af8486abfbbd54364e9154 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Mon, 6 Nov 2017 10:00:54 +0530 Subject: cli: gluster help changes gluster cli help now shows only the top level help commands. gluster help will now show help commands for . > BUG: 1474768 > Signed-off-by: N Balachandran (cherry picked from commit 89dc54f50c9f800ca4446ea8fe736e4860588845) Change-Id: I263f53a0870d80ef4cfaad455fdaa47e2ac4423b BUG: 1509789 Signed-off-by: N Balachandran --- cli/src/cli-cmd-peer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cli/src/cli-cmd-peer.c') diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c index 4802f71eca8..7df60bcb2be 100644 --- a/cli/src/cli-cmd-peer.c +++ b/cli/src/cli-cmd-peer.c @@ -264,7 +264,7 @@ struct cli_cmd cli_probe_cmds[] = { { "peer help", cli_cmd_peer_help_cbk, - "Help command for peer "}, + "display help for peer commands"}, { "pool list", cli_cmd_pool_list_cbk, @@ -281,17 +281,20 @@ cli_cmd_peer_help_cbk (struct cli_state *state, struct cli_cmd_word *in_word, struct cli_cmd *probe_cmd = NULL; int count = 0; + cli_out ("\ngluster peer commands"); + cli_out ("======================\n"); + cmd = GF_CALLOC (1, sizeof (cli_probe_cmds), cli_mt_cli_cmd); memcpy (cmd, cli_probe_cmds, sizeof (cli_probe_cmds)); count = (sizeof (cli_probe_cmds) / sizeof (struct cli_cmd)); cli_cmd_sort (cmd, count); - - for (probe_cmd = cmd; probe_cmd->pattern; probe_cmd++) cli_out ("%s - %s", probe_cmd->pattern, probe_cmd->desc); GF_FREE (cmd); + + cli_out ("\n"); return 0; } -- cgit