2017-01-25 01:00:13 +08:00
|
|
|
_rabbitmqctl_complete() {
|
|
|
|
local word completions a
|
|
|
|
local LANG=en_US.UTF-8
|
|
|
|
read -cl a
|
|
|
|
word="$1"
|
2017-01-25 20:26:34 +08:00
|
|
|
completions="$(export LANG=en_US.UTF-8; export LC_CTYPE=en_US.UTF-8; /usr/lib/rabbitmq/bin/rabbitmqctl --auto-complete ${=a})"
|
2017-01-25 01:00:13 +08:00
|
|
|
reply=( "${(ps:\n:)completions}" )
|
|
|
|
}
|
|
|
|
|
2017-01-27 21:37:38 +08:00
|
|
|
compctl -f -K _rabbitmqctl_complete rabbitmqctl
|
|
|
|
|
|
|
|
compctl -f -K _rabbitmqctl_complete rabbitmq-plugins
|
|
|
|
|
|
|
|
compctl -f -K _rabbitmqctl_complete rabbitmq-diagnostics
|