diff options
author | N Balachandran <nbalacha@redhat.com> | 2017-11-06 10:00:54 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-11-16 14:37:45 +0000 |
commit | 22e14d7f8eb40838a0af8486abfbbd54364e9154 (patch) | |
tree | 78aed6c064a6319254b3ae13b86415909fc35478 /cli/src/cli-cmd-peer.c | |
parent | e1f780ca8f17b8b9615356796093dc7a75f5ff8a (diff) |
cli: gluster help changes
gluster cli help now shows only the top level
help commands. gluster <component> help will now show
help commands for <component>.
> BUG: 1474768
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
(cherry picked from commit 89dc54f50c9f800ca4446ea8fe736e4860588845)
Change-Id: I263f53a0870d80ef4cfaad455fdaa47e2ac4423b
BUG: 1509789
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-peer.c')
-rw-r--r-- | cli/src/cli-cmd-peer.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; } |