Basic rabbitmqctl Bash Completion
_rabbitmqctl()
{
local cur prev opts
COMPREPLY=()
cur=”${COMP_WORDS[COMP_CWORD]}”
prev=”${COMP_WORDS[COMP_CWORD-1]}”
#
# The basic options we’ll complete.
#
opts=”stop stop_app start_app reset force_reset cluster status rotate_logs add_user delete_user change_password list_users add_vhost delete_vhost list_vhosts map_user_vhost unmap_user_vhost list_user_vhosts list_vhost_users list_queues list_exchanges list_bindings list_connections”
#
# Complete the arguments to some of the basic commands.
#
# TBD
COMPREPLY=($(compgen -W “${opts}” — ${cur}))
return 0
}
complete -F _rabbitmqctl rabbitmqctl

Leave a Comment