diff options
author | N Balachandran <nbalacha@redhat.com> | 2017-08-01 16:58:27 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-11-02 12:54:06 +0000 |
commit | 89dc54f50c9f800ca4446ea8fe736e4860588845 (patch) | |
tree | 3ab8f0d02c5b7cec5d113b60826a7bdffcdc47c7 /cli/src/cli-cmd-peer.c | |
parent | f9eedcad0127705c685e8b192726e46b170f00d1 (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>.
Change-Id: I263f53a0870d80ef4cfaad455fdaa47e2ac4423b
BUG: 1474768
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; } |