summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2015-10-23 16:58:49 +0300
committerMichael Klishin <mklishin@pivotal.io>2015-10-23 16:58:49 +0300
commitb7092c79837da3d89a6a11044fdb31c402590e7a (patch)
tree3b01d66e9748ad1fc98d7c1f7582a842c2641adf /src
parentad461b30e9c0104277dff7ec937354d1fc1e64d5 (diff)
parent035347c4468d0b2d5f433a8e8dd6f41c25737b2c (diff)
downloadrabbitmq-server-git-b7092c79837da3d89a6a11044fdb31c402590e7a.tar.gz
Merge branch 'stable'
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_control_main.erl8
-rw-r--r--src/rabbit_plugins_main.erl8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl
index 59223dc19b..c988ff1a49 100644
--- a/src/rabbit_control_main.erl
+++ b/src/rabbit_control_main.erl
@@ -86,7 +86,8 @@
close_connection,
{trace_on, [?VHOST_DEF]},
{trace_off, [?VHOST_DEF]},
- set_vm_memory_high_watermark
+ set_vm_memory_high_watermark,
+ help
]).
-define(GLOBAL_QUERIES,
@@ -108,7 +109,7 @@
[stop, stop_app, start_app, wait, reset, force_reset, rotate_logs,
join_cluster, change_cluster_node_type, update_cluster_nodes,
forget_cluster_node, rename_cluster_node, cluster_status, status,
- environment, eval, force_boot]).
+ environment, eval, force_boot, help]).
-define(COMMANDS_WITH_TIMEOUT,
[list_user_permissions, list_policies, list_queues, list_exchanges,
@@ -489,6 +490,9 @@ action(eval, Node, [Expr], _Opts, _Inform) ->
{error_string, format_parse_error(E)}
end;
+action(help, _Node, _Args, _Opts, _Inform) ->
+ io:format("~s", [rabbit_ctl_usage:usage()]);
+
action(Command, Node, Args, Opts, Inform) ->
%% For backward compatibility, run commands accepting a timeout with
%% the default timeout.
diff --git a/src/rabbit_plugins_main.erl b/src/rabbit_plugins_main.erl
index a4d5490c09..4aeed4826c 100644
--- a/src/rabbit_plugins_main.erl
+++ b/src/rabbit_plugins_main.erl
@@ -27,7 +27,8 @@
{enable, [?OFFLINE_DEF, ?ONLINE_DEF]},
{disable, [?OFFLINE_DEF, ?ONLINE_DEF]},
{set, [?OFFLINE_DEF, ?ONLINE_DEF]},
- {sync, []}]).
+ {sync, []},
+ {help, []}]).
%%----------------------------------------------------------------------------
@@ -147,7 +148,10 @@ action(disable, Node, ToDisable0, Opts, State = #cli{all = All,
action_change(Opts, Node, Implicit, NewImplicit, State);
action(sync, Node, [], _Opts, State) ->
- sync(Node, true, State).
+ sync(Node, true, State);
+
+action(help, _Node, _Args, _Opts, _State) ->
+ io:format("~s", [rabbit_plugins_usage:usage()]).
%%----------------------------------------------------------------------------